From 1a005fe243acf2041ba5c911885f467ac43f1db0 Mon Sep 17 00:00:00 2001 From: XuNeal Date: Fri, 19 Jul 2024 17:03:16 +0800 Subject: [PATCH] Revert "fix: remove deprecated fil library (#106)" This reverts commit 1d4c8a9cc875f2ec3da7eaeeb861cc7a1e431eff. --- .github/workflows/build-release-ios.yml | 2 +- Cargo.lock | 891 ++++++++++-------- VERSION | 2 +- imkey-core/ikc-common/Cargo.toml | 10 +- imkey-core/ikc-device/Cargo.toml | 4 +- imkey-core/ikc-wallet/coin-bch/Cargo.toml | 4 +- imkey-core/ikc-wallet/coin-bitcoin/Cargo.toml | 2 +- .../ikc-wallet/coin-btc-fork/Cargo.toml | 4 +- imkey-core/ikc-wallet/coin-cosmos/Cargo.toml | 10 +- .../ikc-wallet/coin-ethereum/Cargo.toml | 10 +- .../ikc-wallet/coin-filecoin/Cargo.toml | 24 +- .../coin-filecoin/src/transaction.rs | 150 +-- .../ikc-wallet/coin-filecoin/src/utils.rs | 21 - token-core/tcx-btc-kin/Cargo.toml | 8 +- token-core/tcx-constants/Cargo.toml | 2 +- token-core/tcx-crypto/Cargo.toml | 2 +- token-core/tcx-filecoin/Cargo.toml | 21 +- token-core/tcx-filecoin/src/address.rs | 99 +- token-core/tcx-filecoin/src/signer.rs | 157 +-- token-core/tcx-filecoin/src/utils.rs | 23 +- token-core/tcx-keystore/Cargo.toml | 2 +- token-core/tcx-migration/Cargo.toml | 2 +- token-core/tcx-primitive/Cargo.toml | 8 +- token-core/tcx-substrate/Cargo.toml | 2 +- token-core/tcx-tron/Cargo.toml | 8 +- token-core/tcx/Cargo.toml | 2 +- 26 files changed, 705 insertions(+), 765 deletions(-) diff --git a/.github/workflows/build-release-ios.yml b/.github/workflows/build-release-ios.yml index bce63acd..4793c399 100644 --- a/.github/workflows/build-release-ios.yml +++ b/.github/workflows/build-release-ios.yml @@ -14,7 +14,7 @@ jobs: build: name: Build iOS Release if: github.event.review.state == 'approved' - runs-on: macos-14 + runs-on: macos-12 steps: - name: Get the latest commit SHA id: sha diff --git a/Cargo.lock b/Cargo.lock index 7b9dc7f9..1a355dd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,7 +130,7 @@ checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -172,6 +172,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + [[package]] name = "base64" version = "0.13.1" @@ -239,9 +245,6 @@ name = "bitflags" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" -dependencies = [ - "serde", -] [[package]] name = "bitvec" @@ -274,6 +277,17 @@ dependencies = [ "cty", ] +[[package]] +name = "blake2b_simd" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.1" @@ -357,11 +371,25 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "bls-signatures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b44c36726a8b4cae930903a96f3193b496664ed7c28f74f1c1b3feae0e212c3" +dependencies = [ + "blst", + "blstrs", + "fff", + "groupy", + "rand_core 0.5.1", + "thiserror", +] + [[package]] name = "blst" -version = "0.3.12" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" +checksum = "dd7cb1b48c09ac759808ad27811ca44e27c037d309f837651fc80506bc19819f" dependencies = [ "cc", "glob", @@ -369,6 +397,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "blstrs" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecf78c2e543a5fd41b41499fc242d603862b436dc2c167658e7f4870523781ac" +dependencies = [ + "blst", + "fff", + "groupy", + "rand_core 0.5.1", +] + [[package]] name = "bs58" version = "0.2.5" @@ -448,15 +488,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "cbor4ii" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544cf8c89359205f4f990d0e6f3828db42df85b5dac95d09157a250eb0749c4" -dependencies = [ - "serde", -] - [[package]] name = "cc" version = "1.0.83" @@ -486,28 +517,13 @@ dependencies = [ [[package]] name = "cid" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd94671561e36e4e7de75f753f577edafb0e7c05d6e4547229fdf7938fbcd2c3" -dependencies = [ - "core2", - "multibase", - "multihash 0.18.1", - "serde", - "serde_bytes", - "unsigned-varint 0.7.2", -] - -[[package]] -name = "cid" -version = "0.11.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3147d8272e8fa0ccd29ce51194dd98f79ddfb8191ba9e3409884e751798acf3a" +checksum = "ff0e3bc0b6446b3f9663c1a6aba6ef06c5aeaa1bc92bd18077be337198ab9768" dependencies = [ - "core2", - "multibase", - "multihash 0.19.1", - "unsigned-varint 0.8.0", + "multibase 0.8.0", + "multihash 0.13.2", + "unsigned-varint 0.5.1", ] [[package]] @@ -534,7 +550,7 @@ dependencies = [ "ikc-common", "ikc-device", "ikc-transport", - "num-bigint", + "num-bigint 0.4.3", "prost", "prost-types", "secp256k1", @@ -555,7 +571,7 @@ dependencies = [ "ikc-common", "ikc-device", "ikc-transport", - "num-bigint", + "num-bigint 0.4.3", "prost", "prost-types", "secp256k1", @@ -566,7 +582,7 @@ name = "coin-btc-fork" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bech32 0.9.1", "bitcoin", "bitcoin_hashes", @@ -576,7 +592,7 @@ dependencies = [ "ikc-device", "ikc-transport", "lazy_static", - "num-bigint", + "num-bigint 0.4.3", "parking_lot", "prost", "prost-types", @@ -591,7 +607,7 @@ name = "coin-ckb" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bech32 0.9.1", "bitcoin", "blake2b-rs", @@ -611,7 +627,7 @@ name = "coin-cosmos" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bech32 0.9.1", "bitcoin", "bitcoin_hashes", @@ -621,7 +637,7 @@ dependencies = [ "ikc-device", "ikc-transport", "linked-hash-map", - "num-bigint", + "num-bigint 0.4.3", "num-integer", "num-traits", "prost", @@ -653,7 +669,7 @@ name = "coin-ethereum" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bitcoin", "bitcoin_hashes", "bytes", @@ -665,7 +681,7 @@ dependencies = [ "jsonrpc-core", "keccak-hash", "lazy_static", - "num-bigint", + "num-bigint 0.4.3", "num-integer", "num-traits", "prost", @@ -686,24 +702,25 @@ version = "0.1.0" dependencies = [ "anyhow", "base32", - "base64", + "base64 0.13.1", "bech32 0.9.1", "bitcoin", "bitcoin_hashes", "blake2b-rs", "bytes", - "cid 0.11.1", - "fvm_ipld_encoding", - "fvm_shared", + "forest_address", + "forest_bigint", + "forest_cid", + "forest_crypto", + "forest_encoding", + "forest_message", + "forest_vm", "hex", "ikc-common", "ikc-device", "ikc-transport", "linked-hash-map", - "multihash-codetable", - "num", - "num-bigint", - "num-derive", + "num-bigint 0.4.3", "num-integer", "num-traits", "prost", @@ -711,9 +728,6 @@ dependencies = [ "secp256k1", "serde", "serde_json", - "serde_tuple", - "strum 0.26.3", - "strum_macros 0.26.4", ] [[package]] @@ -738,7 +752,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bitcoin", - "blake2b_simd", + "blake2b_simd 1.0.1", "hex", "ikc-common", "ikc-device", @@ -770,6 +784,12 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.2.6" @@ -859,6 +879,25 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42014d4c82e74bc17aaccc4bd75d3615d2b8236198de81c51bed5ddefaae6435" +[[package]] +name = "cs_serde_bytes" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc673ddabf48214550526b068dc28065a75f05e21e452880095247c635b1d91" +dependencies = [ + "serde", +] + +[[package]] +name = "cs_serde_cbor" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7b77425566bdb3932243a292a4b072e1e34fb93aba95926f8d4a3b6ce542c5" +dependencies = [ + "half", + "serde", +] + [[package]] name = "ctr" version = "0.9.2" @@ -925,7 +964,42 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", +] + +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", ] [[package]] @@ -994,6 +1068,31 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" +[[package]] +name = "derive_builder" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" +dependencies = [ + "darling", + "derive_builder_core", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1213,7 +1312,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure 0.12.6", + "synstructure", ] [[package]] @@ -1231,6 +1330,18 @@ dependencies = [ "instant", ] +[[package]] +name = "fff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2544d325b4870bd803d371a7df3c6845e84dcfcb6ebe7ffcae0eac6d5d676133" +dependencies = [ + "byteorder 1.4.3", + "cc", + "lazy_static", + "rand_core 0.5.1", +] + [[package]] name = "fiat-crypto" version = "0.2.5" @@ -1285,6 +1396,128 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "forest_address" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36b7dbc8805f7d93e4a3c63a5be26dd521d3a62b20cc9453eaf722022d7f8ee" +dependencies = [ + "data-encoding", + "data-encoding-macro", + "forest_encoding", + "leb128", + "log", + "num-derive", + "num-traits", + "once_cell", + "serde", + "thiserror", +] + +[[package]] +name = "forest_bigint" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559d63f33ef82723a75b2b25703b31c50a55d2950ead45e239e49b19aeefd1e7" +dependencies = [ + "cs_serde_bytes", + "num-bigint 0.3.3", + "num-integer", + "serde", +] + +[[package]] +name = "forest_cid" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1a935d7f977a7debbc507de2ab7990b834d85e94c819e5268b1adaefd7d434" +dependencies = [ + "cid", + "cs_serde_bytes", + "cs_serde_cbor", + "forest_json_utils", + "generic-array 0.14.7", + "integer-encoding", + "multibase 0.9.1", + "multihash 0.13.2", + "serde", +] + +[[package]] +name = "forest_crypto" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecfe12e10b7f6aa5643dcde74533d8192720ab7366ce473ff4043c71b5132c27" +dependencies = [ + "bls-signatures", + "forest_address", + "forest_encoding", + "libsecp256k1 0.6.0", + "num-derive", + "num-traits", + "serde", + "thiserror", +] + +[[package]] +name = "forest_encoding" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c8339c6dc1741c3144ba06cfb0512a2e858bd603be97bff24bf630d91cce7d" +dependencies = [ + "blake2b_simd 0.5.11", + "cs_serde_bytes", + "cs_serde_cbor", + "forest_cid", + "serde", + "serde_repr", + "serde_tuple", + "thiserror", +] + +[[package]] +name = "forest_json_utils" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da39ba6848c04b22e70520a1339f04f304502a0ebfd4526ea8a566452ea62a8" +dependencies = [ + "serde", +] + +[[package]] +name = "forest_message" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c512b9fbaea31e6bbc98c10ae32568a87b7d99b8c1f63d334ec91c482b35d30" +dependencies = [ + "derive_builder", + "forest_address", + "forest_bigint", + "forest_cid", + "forest_crypto", + "forest_encoding", + "forest_vm", + "num-traits", + "serde", +] + +[[package]] +name = "forest_vm" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cba5f1b93b15568dc4d96b333c73a1949bfba11ce539a6b5495c02e9a9d9190a" +dependencies = [ + "forest_address", + "forest_bigint", + "forest_cid", + "forest_encoding", + "lazy_static", + "num-derive", + "num-traits", + "serde", + "thiserror", +] + [[package]] name = "fragile" version = "2.0.0" @@ -1354,7 +1587,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -1387,59 +1620,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fvm_ipld_blockstore" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d064b957420f5ecc137a153baaa6c32e2eb19b674135317200b6f2537eabdbfd" -dependencies = [ - "anyhow", - "cid 0.10.1", - "multihash 0.18.1", -] - -[[package]] -name = "fvm_ipld_encoding" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90608092e31d9a06236268c58f7c36668ab4b2a48afafe3a97e08f094ad7ae50" -dependencies = [ - "anyhow", - "cid 0.10.1", - "fvm_ipld_blockstore", - "multihash 0.18.1", - "serde", - "serde_ipld_dagcbor", - "serde_repr", - "serde_tuple", - "thiserror", -] - -[[package]] -name = "fvm_shared" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a907c935312f9a47a64fbe1d45f2cb7b2b0a5fbb989a90ecac395b40466069d" -dependencies = [ - "anyhow", - "bitflags 2.4.1", - "blake2b_simd", - "cid 0.10.1", - "data-encoding", - "data-encoding-macro", - "fvm_ipld_encoding", - "lazy_static", - "multihash 0.18.1", - "num-bigint", - "num-derive", - "num-integer", - "num-traits", - "serde", - "serde_tuple", - "thiserror", - "unsigned-varint 0.7.2", -] - [[package]] name = "generic-array" version = "0.12.4" @@ -1495,6 +1675,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "groupy" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d38f1bec17d75a7c30b754cd74db6e7cb5927529021ced14fbd622411c04d8b" +dependencies = [ + "fff", + "rand 0.7.3", + "rand_xorshift", + "thiserror", +] + [[package]] name = "h2" version = "0.3.26" @@ -1514,6 +1706,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + [[package]] name = "hash-db" version = "0.15.2" @@ -1550,12 +1748,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - [[package]] name = "hermit-abi" version = "0.3.3" @@ -1643,9 +1835,9 @@ checksum = "fc736091aacb31ddaa4cd5f6988b3c21e99913ac846b41f32538c5fae5d71bfe" [[package]] name = "http" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1665,9 +1857,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -1747,12 +1939,18 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "ikc" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bitcoin", "bytes", "coin-bch", @@ -1786,7 +1984,7 @@ version = "0.1.0" dependencies = [ "aes", "anyhow", - "base64", + "base64 0.13.1", "bitcoin", "byteorder 1.4.3", "bytes", @@ -1796,7 +1994,7 @@ dependencies = [ "hyper-timeout", "hyper-tls", "lazy_static", - "num-bigint", + "num-bigint 0.4.3", "num-integer", "num-traits", "parking_lot", @@ -1817,7 +2015,7 @@ name = "ikc-device" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bytes", "hex", "ikc-common", @@ -1834,7 +2032,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha1 0.6.1", + "sha1", "thiserror", ] @@ -1928,6 +2126,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "integer-encoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c27df786dcc3a75ccd134f83ece166af0a1e5785d52b12b7375d0d063e1d5c47" + [[package]] name = "integer-sqrt" version = "0.1.5" @@ -2015,6 +2219,12 @@ dependencies = [ "spin", ] +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + [[package]] name = "libc" version = "0.2.140" @@ -2027,6 +2237,25 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core 0.2.2", + "libsecp256k1-gen-ecmult 0.2.1", + "libsecp256k1-gen-genmult 0.2.1", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + [[package]] name = "libsecp256k1" version = "0.7.1" @@ -2034,18 +2263,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" dependencies = [ "arrayref", - "base64", + "base64 0.13.1", "digest 0.9.0", "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", + "libsecp256k1-core 0.3.0", + "libsecp256k1-gen-ecmult 0.3.0", + "libsecp256k1-gen-genmult 0.3.0", "rand 0.8.5", "serde", "sha2 0.9.9", "typenum", ] +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + [[package]] name = "libsecp256k1-core" version = "0.3.0" @@ -2057,13 +2297,31 @@ dependencies = [ "subtle", ] +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core 0.2.2", +] + [[package]] name = "libsecp256k1-gen-ecmult" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" dependencies = [ - "libsecp256k1-core", + "libsecp256k1-core 0.3.0", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core 0.2.2", ] [[package]] @@ -2072,7 +2330,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" dependencies = [ - "libsecp256k1-core", + "libsecp256k1-core 0.3.0", ] [[package]] @@ -2211,9 +2469,9 @@ dependencies = [ [[package]] name = "multibase" -version = "0.9.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +checksum = "b78c60039650ff12e140ae867ef5299a58e19dded4d334c849dc7177083667e2" dependencies = [ "base-x", "data-encoding", @@ -2221,90 +2479,71 @@ dependencies = [ ] [[package]] -name = "multihash" -version = "0.18.1" +name = "multibase" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "core2", - "digest 0.10.6", - "multihash-derive 0.8.1", - "serde", - "serde-big-array", - "sha2 0.10.6", - "sha3", - "unsigned-varint 0.7.2", + "base-x", + "data-encoding", + "data-encoding-macro", ] [[package]] name = "multihash" -version = "0.19.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab" dependencies = [ - "core2", - "unsigned-varint 0.7.2", + "blake2b_simd 0.5.11", + "generic-array 0.14.7", + "multihash-derive 0.7.2", + "unsigned-varint 0.5.1", ] [[package]] -name = "multihash-codetable" -version = "0.1.3" +name = "multihash" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35f0fb09f635b18e95053fc2a9a4843272d3acf898792a14471dcf6f83df0cc" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" dependencies = [ - "blake2b_simd", + "blake2b_simd 1.0.1", "blake2s_simd", "blake3", "core2", "digest 0.10.6", - "multihash-derive 0.9.0", - "ripemd", - "sha1 0.10.5", + "multihash-derive 0.8.1", "sha2 0.10.6", "sha3", - "strobe-rs", + "unsigned-varint 0.7.2", ] [[package]] name = "multihash-derive" -version = "0.8.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro-error", "proc-macro2", "quote", "syn 1.0.109", - "synstructure 0.12.6", + "synstructure", ] [[package]] name = "multihash-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "890e72cb7396cb99ed98c1246a97b243cc16394470d94e0bc8b0c2c11d84290e" -dependencies = [ - "core2", - "multihash 0.19.1", - "multihash-derive-impl", -] - -[[package]] -name = "multihash-derive-impl" -version = "0.1.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3958713ce794e12f7c6326fac9aa274c68d74c4881dd37b3e2662b8a2046bb19" +checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 1.1.3", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.69", - "synstructure 0.13.1", + "syn 1.0.109", + "synstructure", ] [[package]] @@ -2315,10 +2554,11 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ + "lazy_static", "libc", "log", "openssl", @@ -2343,25 +2583,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "num" -version = "0.4.3" +name = "num-bigint" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ - "num-bigint", - "num-complex", + "autocfg", "num-integer", - "num-iter", - "num-rational", "num-traits", ] [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ + "autocfg", "num-integer", "num-traits", ] @@ -2383,24 +2621,15 @@ dependencies = [ "zeroize", ] -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - [[package]] name = "num-derive" -version = "0.4.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 1.0.109", ] [[package]] @@ -2415,18 +2644,19 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.46" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ + "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.45" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", @@ -2435,20 +2665,21 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ - "num-bigint", + "autocfg", + "num-bigint 0.4.3", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.19" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", "libm", @@ -2493,9 +2724,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -2514,7 +2745,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -2525,9 +2756,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" dependencies = [ "cc", "libc", @@ -2585,7 +2816,7 @@ checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ "proc-macro2", "syn 1.0.109", - "synstructure 0.12.6", + "synstructure", ] [[package]] @@ -2729,9 +2960,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "platforms" @@ -2855,9 +3086,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -2879,7 +3110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276470f7f281b0ed53d2ae42dd52b4a8d08853a3c70e7fe95882acbb98a6ae94" dependencies = [ "bytes", - "heck 0.4.1", + "heck", "itertools", "lazy_static", "log", @@ -3013,6 +3244,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_xorshift" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" +dependencies = [ + "rand_core 0.5.1", +] + [[package]] name = "redox_syscall" version = "0.3.5" @@ -3048,7 +3288,7 @@ checksum = "2566c4bf6845f2c2e83b27043c3f5dfcd5ba8f2937d6c00dc009bfb51a079dc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -3095,15 +3335,6 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.6", -] - [[package]] name = "rlp" version = "0.5.2" @@ -3305,9 +3536,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -3318,9 +3549,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -3334,52 +3565,22 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.165" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c939f902bb7d0ccc5bce4f03297e161543c2dcb30914faf032c2bd0b7a0d48fc" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ "serde_derive", ] -[[package]] -name = "serde-big-array" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c5113243e4a3a1c96587342d067f3e6b0f50790b6cf40d2868eb647a3eef0e" -dependencies = [ - "serde", -] - [[package]] name = "serde_derive" -version = "1.0.165" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eaae920e25fffe4019b75ff65e7660e72091e59dd204cb5849bbd6a3fd343d7" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", -] - -[[package]] -name = "serde_ipld_dagcbor" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e880e0b1f9c7a8db874642c1217f7e19b29e325f24ab9f0fcb11818adec7f01" -dependencies = [ - "cbor4ii", - "cid 0.10.1", - "scopeguard", - "serde", + "syn 1.0.109", ] [[package]] @@ -3401,7 +3602,7 @@ checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -3447,7 +3648,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -3459,17 +3660,6 @@ dependencies = [ "sha1_smol", ] -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.6", -] - [[package]] name = "sha1_smol" version = "1.0.0" @@ -3533,9 +3723,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -3629,7 +3819,7 @@ dependencies = [ "hash256-std-hasher", "impl-serde", "lazy_static", - "libsecp256k1", + "libsecp256k1 0.7.1", "log", "merlin", "num-traits", @@ -3704,7 +3894,7 @@ dependencies = [ "bytes", "futures", "hash-db", - "libsecp256k1", + "libsecp256k1 0.7.1", "log", "parity-scale-codec", "parking_lot", @@ -3977,7 +4167,7 @@ checksum = "f923762d556417668b192ac2fdc9827ea21e6df011d8a0a7e68f3d5da095a675" dependencies = [ "bitvec", "hex", - "num-bigint", + "num-bigint 0.4.3", "serde", "sha2 0.9.9", "ssz_rs_derive", @@ -4002,17 +4192,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "strobe-rs" -version = "0.8.1" +name = "strsim" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" -dependencies = [ - "bitflags 1.3.2", - "byteorder 1.4.3", - "keccak", - "subtle", - "zeroize", -] +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" [[package]] name = "strum" @@ -4032,22 +4215,13 @@ dependencies = [ "strum_macros 0.25.3", ] -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros 0.26.4", -] - [[package]] name = "strum_macros" version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", @@ -4060,24 +4234,11 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.69", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -4112,9 +4273,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.69" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201fcda3845c23e8212cd466bfebf0bd20694490fc0356ae8e428e0824a915a6" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -4133,17 +4294,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.69", -] - [[package]] name = "tap" version = "1.0.1" @@ -4156,7 +4306,7 @@ version = "0.1.0" dependencies = [ "anyhow", "base58", - "base64", + "base64 0.13.1", "bytes", "ethereum-types", "hex", @@ -4197,7 +4347,7 @@ name = "tcx-atom" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bech32 0.9.1", "bytes", "prost", @@ -4213,7 +4363,7 @@ name = "tcx-btc-kin" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bch_addr", "bech32 0.9.1", "bitcoin", @@ -4222,7 +4372,7 @@ dependencies = [ "bytes", "hex", "mockall", - "num-bigint", + "num-bigint 0.4.3", "num-integer", "num-traits", "prost", @@ -4324,7 +4474,7 @@ name = "tcx-eos" version = "0.1.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bitcoin", "bytes", "prost", @@ -4382,24 +4532,20 @@ version = "0.1.0" dependencies = [ "anyhow", "base32", - "base64", + "base64 0.13.1", "blake2b-rs", "byteorder 1.4.3", "bytes", - "cid 0.11.1", - "fvm_ipld_encoding", - "fvm_shared", + "forest_address", + "forest_cid", + "forest_crypto", + "forest_encoding", + "forest_message", + "forest_vm", "lazy_static", - "multihash-codetable", - "num", - "num-derive", - "num-traits", "prost", "serde", "serde_json", - "serde_tuple", - "strum 0.26.3", - "strum_macros 0.26.4", "tcx-common", "tcx-constants", "tcx-crypto", @@ -4444,7 +4590,7 @@ version = "0.1.0" dependencies = [ "anyhow", "base58", - "base64", + "base64 0.13.1", "bytes", "hex", "lazy_static", @@ -4479,7 +4625,7 @@ dependencies = [ "anyhow", "bitcoin", "bitcoin_hashes", - "blake2b_simd", + "blake2b_simd 1.0.1", "blst", "byteorder 1.4.3", "digest 0.10.6", @@ -4490,7 +4636,7 @@ dependencies = [ "hex-literal", "hkdf", "lazy_static", - "num-bigint", + "num-bigint 0.4.3", "num-traits", "regex", "schnorrkel", @@ -4521,7 +4667,7 @@ version = "0.1.0" dependencies = [ "anyhow", "base58", - "base64", + "base64 0.13.1", "byteorder 1.4.3", "bytes", "parity-scale-codec", @@ -4561,7 +4707,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bitcoin", - "blake2b_simd", + "blake2b_simd 1.0.1", "bytes", "hex", "prost", @@ -4586,7 +4732,7 @@ dependencies = [ "digest 0.10.6", "hex", "hex-literal", - "num-bigint", + "num-bigint 0.4.3", "num-integer", "num-traits", "prost", @@ -4638,7 +4784,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -4759,7 +4905,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -4774,15 +4920,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -4836,7 +4983,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] [[package]] @@ -4983,15 +5130,15 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" +checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" [[package]] name = "unsigned-varint" -version = "0.8.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" [[package]] name = "uuid" @@ -5063,7 +5210,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", "wasm-bindgen-shared", ] @@ -5085,7 +5232,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5417,5 +5564,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.69", + "syn 2.0.48", ] diff --git a/VERSION b/VERSION index a603bb50..a4dd9dba 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.7.5 +2.7.4 diff --git a/imkey-core/ikc-common/Cargo.toml b/imkey-core/ikc-common/Cargo.toml index 2d984820..a3dc774a 100644 --- a/imkey-core/ikc-common/Cargo.toml +++ b/imkey-core/ikc-common/Cargo.toml @@ -11,15 +11,15 @@ hyper = { version = "=0.14.23", features = ["full"] } hyper-tls = "=0.5.0" hyper-timeout = "=0.4.1" rustc-serialize = "=0.3.24" -serde = { version = "=1.0.165", features = ["derive"] } -serde_derive = "=1.0.165" +serde = { version = "=1.0.147", features = ["derive"] } +serde_derive = "=1.0.147" serde_json = "=1.0.89" hex = "=0.4.3" tokio = { version = "=1.28.2", features = ["full"] } regex = "=1.9.3" -num-bigint = "=0.4.6" -num-traits = "=0.2.19" -num-integer = "=0.1.46" +num-bigint = "=0.4.3" +num-traits = "=0.2.15" +num-integer = "=0.1.45" prost = "=0.11.2" bytes = "=1.4.0" prost-types = "=0.11.2" diff --git a/imkey-core/ikc-device/Cargo.toml b/imkey-core/ikc-device/Cargo.toml index d538f3ee..3739d47a 100644 --- a/imkey-core/ikc-device/Cargo.toml +++ b/imkey-core/ikc-device/Cargo.toml @@ -9,8 +9,8 @@ edition = "2018" [dependencies] ikc-common = {path = "../ikc-common"} ikc-transport = {path = "../ikc-transport"} -serde = { version = "=1.0.165", features = ["derive"] } -serde_derive = "=1.0.165" +serde = { version = "=1.0.147", features = ["derive"] } +serde_derive = "=1.0.147" serde_json = "=1.0.89" base64 = "=0.13.1" hex = "=0.4.3" diff --git a/imkey-core/ikc-wallet/coin-bch/Cargo.toml b/imkey-core/ikc-wallet/coin-bch/Cargo.toml index 4fe5d15f..0ec8a606 100644 --- a/imkey-core/ikc-wallet/coin-bch/Cargo.toml +++ b/imkey-core/ikc-wallet/coin-bch/Cargo.toml @@ -17,10 +17,10 @@ secp256k1 = {version ="=0.24.3", features = ["rand", "recovery"] } tiny-bip39 = "=1.0.0" anyhow = "=1.0.79" hex = "=0.4.3" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" bitcoin_hashes = "=0.11.0" -num-bigint = "=0.4.6" +num-bigint = "=0.4.3" bytes = "=1.4.0" prost = "=0.11.2" prost-types = "=0.11.2" diff --git a/imkey-core/ikc-wallet/coin-bitcoin/Cargo.toml b/imkey-core/ikc-wallet/coin-bitcoin/Cargo.toml index a4048972..208aafa0 100644 --- a/imkey-core/ikc-wallet/coin-bitcoin/Cargo.toml +++ b/imkey-core/ikc-wallet/coin-bitcoin/Cargo.toml @@ -14,7 +14,7 @@ bitcoin = "=0.29.2" hex = "=0.4.3" secp256k1 = {version ="=0.24.3", features = ["rand", "recovery"] } bitcoin_hashes = "=0.11.0" -num-bigint = "=0.4.6" +num-bigint = "=0.4.3" anyhow = "=1.0.79" bytes = "=1.4.0" prost = "=0.11.2" diff --git a/imkey-core/ikc-wallet/coin-btc-fork/Cargo.toml b/imkey-core/ikc-wallet/coin-btc-fork/Cargo.toml index e898c856..7c760da9 100644 --- a/imkey-core/ikc-wallet/coin-btc-fork/Cargo.toml +++ b/imkey-core/ikc-wallet/coin-btc-fork/Cargo.toml @@ -16,10 +16,10 @@ secp256k1 = {version ="=0.24.3", features = ["rand", "recovery"] } tiny-bip39 = "=1.0.0" anyhow = "=1.0.79" hex = "=0.4.3" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" bitcoin_hashes = "=0.11.0" -num-bigint = "=0.4.6" +num-bigint = "=0.4.3" bytes = "=1.4.0" prost = "=0.11.2" prost-types = "=0.11.2" diff --git a/imkey-core/ikc-wallet/coin-cosmos/Cargo.toml b/imkey-core/ikc-wallet/coin-cosmos/Cargo.toml index 0288c8a1..6f4c60ea 100644 --- a/imkey-core/ikc-wallet/coin-cosmos/Cargo.toml +++ b/imkey-core/ikc-wallet/coin-cosmos/Cargo.toml @@ -15,12 +15,12 @@ hex = "=0.4.3" bitcoin = "=0.29.2" secp256k1 = {version ="=0.24.3", features = ["rand", "recovery"] } bech32 = "=0.9.1" -serde = { version = "=1.0.165", features = ["derive"] } -serde_derive = "=1.0.165" +serde = { version = "=1.0.147", features = ["derive"] } +serde_derive = "=1.0.147" serde_json = { version = "=1.0.89", default-features = false, features = ["alloc"] } -num-bigint = "=0.4.6" -num-traits = "=0.2.19" -num-integer = "0.1.46" +num-bigint = "=0.4.3" +num-traits = "=0.2.15" +num-integer = "=0.1.45" base64 = "=0.13.1" anyhow = "=1.0.79" bytes = "=1.4.0" diff --git a/imkey-core/ikc-wallet/coin-ethereum/Cargo.toml b/imkey-core/ikc-wallet/coin-ethereum/Cargo.toml index 3f8a6214..185c24c1 100644 --- a/imkey-core/ikc-wallet/coin-ethereum/Cargo.toml +++ b/imkey-core/ikc-wallet/coin-ethereum/Cargo.toml @@ -17,8 +17,8 @@ keccak-hash = "=0.10.0" lazy_static = "=1.4.0" rustc-hex = "=2.1.0" serde_json = "=1.0.89" -serde = { version = "=1.0.165", features = ["derive"] } -serde_derive = "=1.0.165" +serde = { version = "=1.0.147", features = ["derive"] } +serde_derive = "=1.0.147" jsonrpc-core = "=18.0.0" bitcoin = "=0.29.2" bitcoin_hashes = "=0.11.0" @@ -26,9 +26,9 @@ hex = "=0.4.3" regex = "=1.9.3" tiny-keccak = { version = "=2.0.2", features = ["keccak"] } anyhow = "=1.0.79" -num-bigint = "=0.4.6" -num-traits = "=0.2.19" -num-integer = "=0.1.46" +num-bigint = "=0.4.3" +num-traits = "=0.2.15" +num-integer = "=0.1.45" bytes = "=1.4.0" prost = "=0.11.2" prost-types = "=0.11.2" diff --git a/imkey-core/ikc-wallet/coin-filecoin/Cargo.toml b/imkey-core/ikc-wallet/coin-filecoin/Cargo.toml index b98f17af..a6305523 100644 --- a/imkey-core/ikc-wallet/coin-filecoin/Cargo.toml +++ b/imkey-core/ikc-wallet/coin-filecoin/Cargo.toml @@ -16,10 +16,9 @@ bitcoin_hashes = "=0.11.0" hex = "=0.4.3" secp256k1 = {version ="=0.24.3", features = ["rand", "recovery"] } bech32 = "=0.9.1" -num-bigint = "=0.4.6" -num = "0.4.3" -num-traits = "=0.2.19" -num-integer = "=0.1.46" +num-bigint = "=0.4.3" +num-traits = "=0.2.15" +num-integer = "=0.1.45" base64 = "=0.13.1" anyhow = "=1.0.79" bytes = "=1.4.0" @@ -29,16 +28,15 @@ linked-hash-map = { version = "=0.5.6", features = ["serde_impl"] } base32 = "=0.4.0" blake2b-rs = "=0.2.0" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" -multihash-codetable = { version = "=0.1.3", features = ["blake2b"] } -cid = "=0.11.1" -fvm_shared = "=4.3.1" -fvm_ipld_encoding = "0.4.0" -serde_tuple = "0.5.0" -strum_macros = "0.26.3" -strum = { version = "0.26.3", features = ["derive"] } +forest_vm = "=0.3.2" +forest_message = "=0.7.2" +forest_address = "=0.3.2" +forest_encoding = "=0.2.2" +forest_cid = "=0.3.0" +forest_crypto = "=0.5.3" +num_bigint_chainsafe = { package = "forest_bigint", version = "=0.1.4"} bitcoin = "=0.29.2" -num-derive = "0.4.2" diff --git a/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs b/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs index c03cb09c..1338b936 100644 --- a/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs +++ b/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs @@ -2,7 +2,6 @@ use crate::address::FilecoinAddress; use crate::filecoinapi::{FilecoinTxInput, FilecoinTxOutput, Signature}; use crate::utils::{digest, HashSize}; use crate::Result; -use std::borrow::Cow; use ikc_common::apdu::{ApduCheck, Secp256k1Apdu}; use ikc_common::error::CoinError; @@ -10,132 +9,46 @@ use ikc_common::utility::{hex_to_bytes, secp256k1_sign}; use ikc_common::{constants, path, utility, SignParam}; use ikc_device::device_binding::KEY_MANAGER; +use anyhow::anyhow; +use forest_address::Address; +use forest_cid::Cid; +use forest_encoding::Cbor; +use forest_message::UnsignedMessage as ForestUnsignedMessage; +use forest_vm::{Serialized, TokenAmount}; use ikc_transport::message::send_apdu_timeout; use secp256k1::ecdsa::Signature as SecpSignature; use std::str::FromStr; -use num::FromPrimitive; -use num_derive::FromPrimitive; - -use crate::utils::CidCborExt; -use cid::{Cid, CidGeneric}; -use fvm_ipld_encoding::RawBytes; -use fvm_ipld_encoding::{ - de, - repr::{Deserialize_repr, Serialize_repr}, - ser, strict_bytes, -}; -use fvm_shared::address::Address; -use fvm_shared::econ::TokenAmount; -use fvm_shared::message::Message as ForestUnsignedMessage; -use serde_tuple::{self, Deserialize_tuple, Serialize_tuple}; -use std::convert::TryFrom; - #[derive(Default, Debug, Clone, PartialEq, Eq)] pub struct Transaction {} -fn str_to_token_amount(str: &str) -> TokenAmount { - TokenAmount::from_atto(u64::from_str(str).unwrap()) -} - -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub struct ForestSignature { - pub sig_type: SignatureType, - pub bytes: Vec, -} - -impl ser::Serialize for ForestSignature { - fn serialize(&self, serializer: S) -> std::result::Result - where - S: ser::Serializer, - { - let mut bytes = Vec::with_capacity(self.bytes.len() + 1); - // Insert signature type byte - bytes.push(self.sig_type as u8); - bytes.extend_from_slice(&self.bytes); - - strict_bytes::Serialize::serialize(&bytes, serializer) - } -} - -impl<'de> de::Deserialize<'de> for ForestSignature { - fn deserialize(deserializer: D) -> std::result::Result - where - D: de::Deserializer<'de>, - { - let bytes: Cow<'de, [u8]> = strict_bytes::Deserialize::deserialize(deserializer)?; - match bytes.split_first() { - None => Err(de::Error::custom("Cannot deserialize empty bytes")), - Some((&sig_byte, rest)) => { - // Remove signature type byte - let sig_type = SignatureType::from_u8(sig_byte).ok_or_else(|| { - de::Error::custom(format!( - "Invalid signature type byte (must be 1, 2 or 3), was {}", - sig_byte - )) - })?; - - Ok(ForestSignature { - bytes: rest.to_vec(), - sig_type, - }) - } - } - } -} - -#[derive(PartialEq, Clone, Debug, Serialize_tuple, Deserialize_tuple, Hash, Eq)] -pub struct ForestSignedMessage { - pub message: ForestUnsignedMessage, - pub signature: ForestSignature, -} - -#[derive( - Clone, - Debug, - PartialEq, - FromPrimitive, - Copy, - Eq, - Serialize_repr, - Deserialize_repr, - Hash, - strum::Display, - strum::EnumString, -)] -#[repr(u8)] -#[strum(serialize_all = "lowercase")] -pub enum SignatureType { - Secp256k1 = 1, - Bls = 2, - Delegated = 3, -} - impl Transaction { fn convert_message(message: &FilecoinTxInput) -> Result { let to = Address::from_str(&message.to).map_err(|_| CoinError::InvalidAddress)?; let from = Address::from_str(&message.from).map_err(|_| CoinError::InvalidAddress)?; - let value = str_to_token_amount(&message.value); + let value = TokenAmount::from_str(&message.value).map_err(|_| CoinError::InvalidNumber)?; let gas_limit = message.gas_limit; - let gas_fee_cap = str_to_token_amount(&message.gas_fee_cap); - let gas_premium = str_to_token_amount(&message.gas_premium); + let gas_fee_cap = + TokenAmount::from_str(&message.gas_fee_cap).map_err(|_| CoinError::InvalidNumber)?; + let gas_premium = + TokenAmount::from_str(&message.gas_premium).map_err(|_| CoinError::InvalidNumber)?; let message_params_bytes = base64::decode(&message.params).map_err(|_| CoinError::InvalidParam)?; - let params = RawBytes::from(message_params_bytes); - - let tmp = ForestUnsignedMessage { - version: 0, - from, - to, - sequence: message.nonce, - value, - method_num: message.method, - params, - gas_limit: gas_limit as u64, - gas_fee_cap, - gas_premium, - }; + let params = Serialized::new(message_params_bytes); + + let tmp = ForestUnsignedMessage::builder() + .to(to) + .from(from) + .sequence(message.nonce) + .value(value) + .method_num(message.method) + .params(params) + .gas_limit(gas_limit) + .gas_premium(gas_premium) + .gas_fee_cap(gas_fee_cap) + .build() + .map_err(|_| CoinError::InvalidFormat)?; Ok(tmp) } @@ -159,7 +72,7 @@ impl Transaction { let res_msg_pubkey = FilecoinAddress::get_pub_key(sign_param.path.as_str())?; let pubkey_raw = hex_to_bytes(&res_msg_pubkey[..130]).unwrap(); - let mut cid: Cid = as CidCborExt>::from_cbor_blake2b256(&unsigned_message)?; + let mut cid: Cid = unsigned_message.cid()?; let data = &digest(&cid.to_bytes(), HashSize::Default); //organize data @@ -224,15 +137,14 @@ impl Transaction { data_arr[0..64].copy_from_slice(&normalizes_sig_vec[0..64]); data_arr[64] = rec_id.to_i32() as u8; - let forest_sig = ForestSignature { - sig_type: SignatureType::Secp256k1, - bytes: data_arr.clone().to_vec(), - }; - let forest_signed_msg = ForestSignedMessage { + let forest_sig = forest_crypto::Signature::new_secp256k1(data_arr.to_vec()); + let forest_signed_msg = forest_message::SignedMessage { message: unsigned_message, signature: forest_sig, }; - cid = as CidCborExt>::from_cbor_blake2b256(&forest_signed_msg)?; + cid = forest_signed_msg + .cid() + .map_err(|_e| anyhow!("{}", "forest_message cid error"))?; let signature_type = 1; diff --git a/imkey-core/ikc-wallet/coin-filecoin/src/utils.rs b/imkey-core/ikc-wallet/coin-filecoin/src/utils.rs index 458a7fbf..3d24863e 100644 --- a/imkey-core/ikc-wallet/coin-filecoin/src/utils.rs +++ b/imkey-core/ikc-wallet/coin-filecoin/src/utils.rs @@ -1,7 +1,4 @@ use blake2b_rs::Blake2bBuilder; -use cid::Cid; -use fvm_ipld_encoding::Error; -use multihash_codetable::{Code, MultihashDigest}; pub enum HashSize { Checksum = 4, @@ -20,24 +17,6 @@ pub fn digest(ingest: &[u8], hash_size: HashSize) -> Vec { result[0..size].to_vec() } -/// Extension methods for constructing `dag-cbor` [Cid] -pub trait CidCborExt { - /// Default CID builder for Filecoin - /// - /// - The default codec is [`fvm_ipld_encoding::DAG_CBOR`] - /// - The default hash function is 256 bit BLAKE2b - /// - /// This matches [`abi.CidBuilder`](https://github.com/filecoin-project/go-state-types/blob/master/abi/cid.go#L49) in go - fn from_cbor_blake2b256(obj: &S) -> Result { - let bytes = fvm_ipld_encoding::to_vec(obj)?; - Ok(Cid::new_v1( - fvm_ipld_encoding::DAG_CBOR, - Code::Blake2b256.digest(&bytes), - )) - } -} - -impl CidCborExt for Cid {} #[cfg(test)] mod tests { use crate::utils::{digest, HashSize}; diff --git a/token-core/tcx-btc-kin/Cargo.toml b/token-core/tcx-btc-kin/Cargo.toml index bd8e348f..7eede65b 100644 --- a/token-core/tcx-btc-kin/Cargo.toml +++ b/token-core/tcx-btc-kin/Cargo.toml @@ -19,13 +19,13 @@ secp256k1 = {version ="=0.24.3", features = ["rand", "recovery", "rand-std"] } tiny-bip39 = "=1.0.0" bitcoin_hashes = "=0.11.0" #bitcoinconsensus = { version = "0.19.0-2", optional = true } -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" uuid = { version = "=1.2.2", features = ["serde", "v4"] } anyhow = { version = "=1.0.79", features = [] } -num-bigint = "=0.4.6" -num-traits = "=0.2.19" -num-integer = "=0.1.46" +num-bigint = "=0.4.3" +num-traits = "=0.2.15" +num-integer = "=0.1.45" byteorder = "=1.4.3" bech32 = "=0.9.1" prost = "=0.11.2" diff --git a/token-core/tcx-constants/Cargo.toml b/token-core/tcx-constants/Cargo.toml index e5b78e08..fb05447e 100644 --- a/token-core/tcx-constants/Cargo.toml +++ b/token-core/tcx-constants/Cargo.toml @@ -11,5 +11,5 @@ tcx-common = { path = "../tcx-common" } anyhow = { version = "=1.0.79", features = [] } lazy_static = "=1.4.0" serde_json = "=1.0.89" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } parking_lot = "=0.12.1" diff --git a/token-core/tcx-crypto/Cargo.toml b/token-core/tcx-crypto/Cargo.toml index c46e0a7f..fb63c9ec 100644 --- a/token-core/tcx-crypto/Cargo.toml +++ b/token-core/tcx-crypto/Cargo.toml @@ -9,7 +9,7 @@ tcx-constants = {path="../tcx-constants"} tcx-common = {path="../tcx-common"} serde_json = "=1.0.89" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } rand = "=0.8.5" tiny-keccak = { version = "=2.0.2", features = ["keccak"] } scrypt = { version = "=0.10.0", default-features = false } diff --git a/token-core/tcx-filecoin/Cargo.toml b/token-core/tcx-filecoin/Cargo.toml index 8bd6b7d7..663c58c7 100644 --- a/token-core/tcx-filecoin/Cargo.toml +++ b/token-core/tcx-filecoin/Cargo.toml @@ -19,21 +19,14 @@ blake2b-rs = "=0.2.0" anyhow = { version = "=1.0.79", features = [] } byteorder = "=1.4.3" base32 = "=0.4.0" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" base64 = "=0.13.1" lazy_static = "=1.4.0" +forest_vm = "=0.3.2" +forest_message = "=0.7.2" +forest_address = "=0.3.2" +forest_encoding = "=0.2.2" +forest_cid = "=0.3.0" +forest_crypto = "0.5.3" thiserror = "=1.0.56" - - - -multihash-codetable = { version = "=0.1.3", features = ["blake2b"] } -cid = "=0.11.1" -fvm_shared = "=4.3.1" -fvm_ipld_encoding = "0.4.0" -serde_tuple = "0.5.0" -strum_macros = "0.26.3" -strum = { version = "0.26.3", features = ["derive"] } -num-traits = "0.2.15" -num = "0.4.3" -num-derive = "0.4.2" \ No newline at end of file diff --git a/token-core/tcx-filecoin/src/address.rs b/token-core/tcx-filecoin/src/address.rs index 34bc3d85..72b8d422 100644 --- a/token-core/tcx-filecoin/src/address.rs +++ b/token-core/tcx-filecoin/src/address.rs @@ -2,12 +2,11 @@ use tcx_constants::CoinInfo; use tcx_keystore::{Address, Result}; use tcx_primitive::{PublicKey, TypedPublicKey}; -use fvm_shared::address::Network; -use fvm_shared::address::{set_current_network, Address as ForestAddress}; +use forest_address::Address as ForestAddress; use super::Error; use crate::utils::{digest, HashSize}; -use fvm_shared::address::Network::{Mainnet, Testnet}; +use base32::Alphabet; use std::str::FromStr; const MAINNET_PREFIX: &str = "f"; @@ -34,35 +33,55 @@ impl FilecoinAddress { impl Address for FilecoinAddress { fn from_public_key(public_key: &TypedPublicKey, coin: &CoinInfo) -> Result { - match coin.network.as_str() { - "TESTNET" => set_current_network(Testnet), - _ => set_current_network(Mainnet), + let network_prefix = match coin.network.as_str() { + "TESTNET" => TESTNET_PREFIX, + _ => MAINNET_PREFIX, }; + let protocol; + let payload; + let checksum; - let addr_str = match public_key { + match public_key { TypedPublicKey::Secp256k1(pk) => { - let addr = ForestAddress::new_secp256k1(&pk.to_uncompressed())?; - addr.to_string() + protocol = Protocol::Secp256k1; + payload = Self::address_hash(&pk.to_uncompressed()); + + checksum = Self::checksum(&[vec![protocol as u8], payload.to_vec()].concat()); } TypedPublicKey::BLS(pk) => { - let addr = ForestAddress::new_bls(&pk.to_bytes())?; - addr.to_string() + protocol = Protocol::Bls; + payload = pk.to_bytes(); + + checksum = Self::checksum(&[vec![protocol as u8], payload.to_vec()].concat()); } _ => { return Err(Error::InvalidCurveType.into()); } }; - Ok(FilecoinAddress(addr_str)) + Ok(FilecoinAddress(format!( + "{}{}{}", + network_prefix, + protocol as i8, + base32::encode( + Alphabet::RFC4648 { padding: false }, + &[payload, checksum].concat() + ) + .to_lowercase() + ))) } fn is_valid(address: &str, coin: &CoinInfo) -> bool { let ntwk = match coin.network.as_str() { - "TESTNET" => Testnet, - _ => Mainnet, + "TESTNET" => TESTNET_PREFIX, + _ => MAINNET_PREFIX, }; - ntwk.parse_address(address).is_ok() + if !address.starts_with(ntwk) { + return false; + } + + ForestAddress::from_str(address).is_ok() } } @@ -98,47 +117,47 @@ mod tests { FilecoinAddress::is_valid("t12i3bop43tprlnymx2c75u6uvlq7iur2rcd7qsey", &coin_info), true ); - assert_eq!(FilecoinAddress::is_valid("t3qdyntx5snnwgmjkp2ztd6tf6hhcmurxfj53zylrqyympwvzvbznx6vnvdqloate5eviphnzrkupno4wheesa", &coin_info), true); - assert_eq!(FilecoinAddress::is_valid("t3rynpyphoo6pxfzb4ljy3zmf224vjihlok4oewbpjii3uq2mgl7jgrpxsiddaowsxccnnbi2p4ei4sdmsxfaq", &coin_info), true); - assert_eq!(FilecoinAddress::is_valid("t3rynpyphoo6pxfzb4ljy3zmf224vjihlok4oewbpjii3uq2mgl7jgrpxsiddaowsxccnnbi2p4ei4sdmsxfaqt", &coin_info), false); + assert_eq!(FilecoinAddress::is_valid("t3qdyntx5snnwgmjkp2ztd6tf6hhcmurxfj53zylrqyympwvzvbznx6vnvdqloate5eviphnzrkupno4wheesa",&coin_info), true); + assert_eq!(FilecoinAddress::is_valid("t3rynpyphoo6pxfzb4ljy3zmf224vjihlok4oewbpjii3uq2mgl7jgrpxsiddaowsxccnnbi2p4ei4sdmsxfaq",&coin_info), true); + assert_eq!(FilecoinAddress::is_valid("t3rynpyphoo6pxfzb4ljy3zmf224vjihlok4oewbpjii3uq2mgl7jgrpxsiddaowsxccnnbi2p4ei4sdmsxfaqt",&coin_info), false); let coin_info = coin_info_from_param("FILECOIN", "MAINNET", "", "").unwrap(); assert_eq!( FilecoinAddress::is_valid("t12i3bop43tprlnymx2c75u6uvlq7iur2rcd7qsey", &coin_info), false ); - assert_eq!(FilecoinAddress::is_valid("t3qdyntx5snnwgmjkp2ztd6tf6hhcmurxfj53zylrqyympwvzvbznx6vnvdqloate5eviphnzrkupno4wheesa", &coin_info), false); - assert_eq!(FilecoinAddress::is_valid("t3rynpyphoo6pxfzb4ljy3zmf224vjihlok4oewbpjii3uq2mgl7jgrpxsiddaowsxccnnbi2p4ei4sdmsxfaq", &coin_info), false); + assert_eq!(FilecoinAddress::is_valid("t3qdyntx5snnwgmjkp2ztd6tf6hhcmurxfj53zylrqyympwvzvbznx6vnvdqloate5eviphnzrkupno4wheesa",&coin_info), false); + assert_eq!(FilecoinAddress::is_valid("t3rynpyphoo6pxfzb4ljy3zmf224vjihlok4oewbpjii3uq2mgl7jgrpxsiddaowsxccnnbi2p4ei4sdmsxfaq",&coin_info), false); } #[test] fn test_bls_address() { let test_cases = vec![ (vec![173, 88, 223, 105, 110, 45, 78, 145, 234, 134, 200, 129, 233, 56, - 186, 78, 168, 27, 57, 94, 18, 121, 123, 132, 185, 207, 49, 75, 149, 70, - 112, 94, 131, 156, 122, 153, 214, 6, 178, 71, 221, 180, 249, 172, 122, - 52, 20, 221], - "t3vvmn62lofvhjd2ugzca6sof2j2ubwok6cj4xxbfzz4yuxfkgobpihhd2thlanmsh3w2ptld2gqkn2jvlss4a"), + 186, 78, 168, 27, 57, 94, 18, 121, 123, 132, 185, 207, 49, 75, 149, 70, + 112, 94, 131, 156, 122, 153, 214, 6, 178, 71, 221, 180, 249, 172, 122, + 52, 20, 221], + "t3vvmn62lofvhjd2ugzca6sof2j2ubwok6cj4xxbfzz4yuxfkgobpihhd2thlanmsh3w2ptld2gqkn2jvlss4a"), (vec![179, 41, 79, 10, 46, 41, 224, 198, 110, 188, 35, 93, 47, 237, - 202, 86, 151, 191, 120, 74, 246, 5, 199, 90, 246, 8, 230, 166, 61, 92, - 211, 142, 168, 92, 168, 152, 158, 14, 253, 233, 24, 139, 56, 47, - 147, 114, 70, 13], - "t3wmuu6crofhqmm3v4enos73okk2l366ck6yc4owxwbdtkmpk42ohkqxfitcpa57pjdcftql4tojda2poeruwa"), + 202, 86, 151, 191, 120, 74, 246, 5, 199, 90, 246, 8, 230, 166, 61, 92, + 211, 142, 168, 92, 168, 152, 158, 14, 253, 233, 24, 139, 56, 47, + 147, 114, 70, 13], + "t3wmuu6crofhqmm3v4enos73okk2l366ck6yc4owxwbdtkmpk42ohkqxfitcpa57pjdcftql4tojda2poeruwa"), (vec![150, 161, 163, 228, 234, 122, 20, 212, 153, 133, 230, 97, 178, - 36, 1, 212, 79, 237, 64, 45, 29, 9, 37, 178, 67, 201, 35, 88, 156, - 15, 188, 126, 50, 205, 4, 226, 158, 215, 141, 21, 211, 125, 58, 170, - 63, 230, 218, 51], - "t3s2q2hzhkpiknjgmf4zq3ejab2rh62qbndueslmsdzervrhapxr7dftie4kpnpdiv2n6tvkr743ndhrsw6d3a"), + 36, 1, 212, 79, 237, 64, 45, 29, 9, 37, 178, 67, 201, 35, 88, 156, + 15, 188, 126, 50, 205, 4, 226, 158, 215, 141, 21, 211, 125, 58, 170, + 63, 230, 218, 51], + "t3s2q2hzhkpiknjgmf4zq3ejab2rh62qbndueslmsdzervrhapxr7dftie4kpnpdiv2n6tvkr743ndhrsw6d3a"), (vec![134, 180, 84, 37, 140, 88, 148, 117, 247, 209, 111, 90, 172, 1, - 138, 121, 246, 193, 22, 157, 32, 252, 51, 146, 29, 216, 181, 206, 28, - 172, 108, 52, 143, 144, 163, 96, 54, 36, 246, 174, 185, 27, 100, 81, - 140, 46, 128, 149], - "t3q22fijmmlckhl56rn5nkyamkph3mcfu5ed6dheq53c244hfmnq2i7efdma3cj5voxenwiummf2ajlsbxc65a"), + 138, 121, 246, 193, 22, 157, 32, 252, 51, 146, 29, 216, 181, 206, 28, + 172, 108, 52, 143, 144, 163, 96, 54, 36, 246, 174, 185, 27, 100, 81, + 140, 46, 128, 149], + "t3q22fijmmlckhl56rn5nkyamkph3mcfu5ed6dheq53c244hfmnq2i7efdma3cj5voxenwiummf2ajlsbxc65a"), (vec![167, 114, 107, 3, 128, 34, 247, 90, 56, 70, 23, 88, 83, 96, 206, - 230, 41, 7, 10, 45, 157, 40, 113, 41, 101, 229, 242, 110, 204, 64, - 133, 131, 130, 128, 55, 36, 237, 52, 242, 114, 3, 54, 240, 157, 182, - 49, 240, 116], - "t3u5zgwa4ael3vuocgc5mfgygo4yuqocrntuuhcklf4xzg5tcaqwbyfabxetwtj4tsam3pbhnwghyhijr5mixa"), + 230, 41, 7, 10, 45, 157, 40, 113, 41, 101, 229, 242, 110, 204, 64, + 133, 131, 130, 128, 55, 36, 237, 52, 242, 114, 3, 54, 240, 157, 182, + 49, 240, 116], + "t3u5zgwa4ael3vuocgc5mfgygo4yuqocrntuuhcklf4xzg5tcaqwbyfabxetwtj4tsam3pbhnwghyhijr5mixa"), ]; let coin_info = CoinInfo { diff --git a/token-core/tcx-filecoin/src/signer.rs b/token-core/tcx-filecoin/src/signer.rs index d53283f7..413c7526 100644 --- a/token-core/tcx-filecoin/src/signer.rs +++ b/token-core/tcx-filecoin/src/signer.rs @@ -1,106 +1,17 @@ use crate::transaction::{Signature, SignedMessage, UnsignedMessage}; use crate::utils::{digest, HashSize}; use crate::Error; -use fvm_shared::address::Address; -use std::borrow::Cow; - -use crate::utils::CidCborExt; -use cid::{Cid, CidGeneric}; -use fvm_ipld_encoding::RawBytes; -use fvm_ipld_encoding::{ - de, - repr::{Deserialize_repr, Serialize_repr}, - ser, strict_bytes, -}; -use fvm_shared::econ::TokenAmount; -use fvm_shared::message::Message as ForestUnsignedMessage; -use serde_tuple::{self, Deserialize_tuple, Serialize_tuple}; +use anyhow::anyhow; +use forest_address::Address; +use forest_cid::Cid; +use forest_encoding::Cbor; +use forest_message::UnsignedMessage as ForestUnsignedMessage; +use forest_vm::{Serialized, TokenAmount}; use std::convert::TryFrom; use std::str::FromStr; use tcx_constants::CurveType; use tcx_keystore::{tcx_ensure, Keystore, Result, SignatureParameters, Signer, TransactionSigner}; -use num::FromPrimitive; -use num_derive::FromPrimitive; -use strum::*; - -#[derive( - Clone, - Debug, - PartialEq, - FromPrimitive, - Copy, - Eq, - Serialize_repr, - Deserialize_repr, - Hash, - strum::Display, - strum::EnumString, -)] -#[repr(u8)] -#[strum(serialize_all = "lowercase")] -pub enum SignatureType { - Secp256k1 = 1, - Bls = 2, - Delegated = 3, -} - -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub struct ForestSignature { - pub sig_type: SignatureType, - pub bytes: Vec, -} - -impl ser::Serialize for ForestSignature { - fn serialize(&self, serializer: S) -> std::result::Result - where - S: ser::Serializer, - { - let mut bytes = Vec::with_capacity(self.bytes.len() + 1); - // Insert signature type byte - bytes.push(self.sig_type as u8); - bytes.extend_from_slice(&self.bytes); - - strict_bytes::Serialize::serialize(&bytes, serializer) - } -} - -impl<'de> de::Deserialize<'de> for ForestSignature { - fn deserialize(deserializer: D) -> std::result::Result - where - D: de::Deserializer<'de>, - { - let bytes: Cow<'de, [u8]> = strict_bytes::Deserialize::deserialize(deserializer)?; - match bytes.split_first() { - None => Err(de::Error::custom("Cannot deserialize empty bytes")), - Some((&sig_byte, rest)) => { - // Remove signature type byte - let sig_type = SignatureType::from_u8(sig_byte).ok_or_else(|| { - de::Error::custom(format!( - "Invalid signature type byte (must be 1, 2 or 3), was {}", - sig_byte - )) - })?; - - Ok(ForestSignature { - bytes: rest.to_vec(), - sig_type, - }) - } - } - } -} - -#[derive(PartialEq, Clone, Debug, Serialize_tuple, Deserialize_tuple, Hash, Eq)] -pub struct ForestSignedMessage { - pub message: ForestUnsignedMessage, - pub signature: ForestSignature, -} - -fn str_to_token_amount(str: &str) -> TokenAmount { - TokenAmount::from_atto(u64::from_str(str).unwrap()) -} - impl TryFrom<&UnsignedMessage> for ForestUnsignedMessage { type Error = crate::Error; @@ -109,28 +20,30 @@ impl TryFrom<&UnsignedMessage> for ForestUnsignedMessage { ) -> core::result::Result { let to = Address::from_str(&message.to).map_err(|_| Error::InvalidAddress)?; let from = Address::from_str(&message.from).map_err(|_| Error::InvalidAddress)?; - let value = str_to_token_amount(&message.value); + let value = TokenAmount::from_str(&message.value).map_err(|_| Error::InvalidNumber)?; let gas_limit = message.gas_limit; - let gas_fee_cap = str_to_token_amount(&message.gas_fee_cap); - let gas_premium = str_to_token_amount(&message.gas_premium); + let gas_fee_cap = + TokenAmount::from_str(&message.gas_fee_cap).map_err(|_| Error::InvalidNumber)?; + let gas_premium = + TokenAmount::from_str(&message.gas_premium).map_err(|_| Error::InvalidNumber)?; let message_params_bytes = base64::decode(&message.params).map_err(|_| Error::InvalidParam)?; - let params = RawBytes::from(message_params_bytes); + let params = Serialized::new(message_params_bytes); tcx_ensure!(message.method == 0, Error::InvalidMethodId); - let tmp = Self { - version: 0, - from, - to, - sequence: message.nonce, - value, - method_num: message.method, - params, - gas_limit: gas_limit as u64, - gas_fee_cap, - gas_premium, - }; + let tmp = ForestUnsignedMessage::builder() + .to(to) + .from(from) + .sequence(message.nonce) + .value(value) + .method_num(message.method) + .params(params) + .gas_limit(gas_limit) + .gas_premium(gas_premium) + .gas_fee_cap(gas_fee_cap) + .build() + .map_err(|_| Error::InvalidFormat)?; Ok(tmp) } @@ -142,12 +55,12 @@ impl TransactionSigner for Keystore { sign_context: &SignatureParameters, tx: &UnsignedMessage, ) -> Result { - let unsigned_message = ForestUnsignedMessage::try_from(tx)?; + let unsigned_message = forest_message::UnsignedMessage::try_from(tx)?; let signature_type; let signature; - let mut cid: Cid = as CidCborExt>::from_cbor_blake2b256(&unsigned_message)?; + let mut cid: Cid = unsigned_message.cid()?; match sign_context.curve { CurveType::SECP256k1 => { signature_type = 1; @@ -156,24 +69,24 @@ impl TransactionSigner for Keystore { &sign_context.derivation_path, )?; - let forest_signed_msg = ForestSignedMessage { + let forest_sig = forest_crypto::Signature::new_secp256k1(signature.clone()); + let forest_signed_msg = forest_message::SignedMessage { message: unsigned_message, - signature: ForestSignature { - sig_type: SignatureType::Secp256k1, - bytes: signature.clone(), - }, + signature: forest_sig, }; - cid = as CidCborExt>::from_cbor_blake2b256(&forest_signed_msg)?; + cid = forest_signed_msg + .cid() + .map_err(|_e| anyhow!("{}", "forest_message cid error"))?; } CurveType::BLS => { signature_type = 2; - cid = as CidCborExt>::from_cbor_blake2b256(&unsigned_message)?; signature = self.bls_sign( &cid.to_bytes(), &sign_context.derivation_path, "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_", )?; // use unsigned_message https://github.com/filecoin-project/lotus/issues/101 + cid = unsigned_message.cid()?; } _ => return Err(Error::InvalidCurveType.into()), } @@ -295,7 +208,7 @@ mod tests { gas_fee_cap: "151367".to_string(), gas_premium: "150313".to_string(), method: 0, - params: "".to_string(), + params: "".to_string() }; let key_info = @@ -342,7 +255,7 @@ mod tests { gas_fee_cap: "151367".to_string(), gas_premium: "150313".to_string(), method: 0, - params: "".to_string(), + params: "".to_string() }; let key_info = diff --git a/token-core/tcx-filecoin/src/utils.rs b/token-core/tcx-filecoin/src/utils.rs index bdaaeaef..3d24863e 100644 --- a/token-core/tcx-filecoin/src/utils.rs +++ b/token-core/tcx-filecoin/src/utils.rs @@ -1,7 +1,5 @@ use blake2b_rs::Blake2bBuilder; -use cid::Cid; -use fvm_ipld_encoding::Error; -use multihash_codetable::{Code, MultihashDigest}; + pub enum HashSize { Checksum = 4, Payload = 20, @@ -19,25 +17,6 @@ pub fn digest(ingest: &[u8], hash_size: HashSize) -> Vec { result[0..size].to_vec() } -/// Extension methods for constructing `dag-cbor` [Cid] -pub trait CidCborExt { - /// Default CID builder for Filecoin - /// - /// - The default codec is [`fvm_ipld_encoding::DAG_CBOR`] - /// - The default hash function is 256 bit BLAKE2b - /// - /// This matches [`abi.CidBuilder`](https://github.com/filecoin-project/go-state-types/blob/master/abi/cid.go#L49) in go - fn from_cbor_blake2b256(obj: &S) -> Result { - let bytes = fvm_ipld_encoding::to_vec(obj)?; - Ok(Cid::new_v1( - fvm_ipld_encoding::DAG_CBOR, - Code::Blake2b256.digest(&bytes), - )) - } -} - -impl CidCborExt for Cid {} - #[cfg(test)] mod tests { use crate::utils::{digest, HashSize}; diff --git a/token-core/tcx-keystore/Cargo.toml b/token-core/tcx-keystore/Cargo.toml index 49f748be..951801f5 100644 --- a/token-core/tcx-keystore/Cargo.toml +++ b/token-core/tcx-keystore/Cargo.toml @@ -16,7 +16,7 @@ secp256k1 = { version = "=0.24.3", features = ["rand", "recovery"] } tiny-bip39 = "=1.0.0" bitcoin_hashes = "=0.11.0" uuid = { version = "=1.2.2", features = ["serde", "v4"] } -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" anyhow = { version = "=1.0.79", features = [] } regex = "=1.9.3" diff --git a/token-core/tcx-migration/Cargo.toml b/token-core/tcx-migration/Cargo.toml index 42314f61..4b760f51 100644 --- a/token-core/tcx-migration/Cargo.toml +++ b/token-core/tcx-migration/Cargo.toml @@ -33,7 +33,7 @@ prost-types = "=0.11.2" libc = "=0.2.140" log = "=0.4.17" serde_json = "=1.0.89" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } anyhow = { version = "=1.0.79", features = [] } lazy_static = "=1.4.0" hex = "=0.4.3" diff --git a/token-core/tcx-primitive/Cargo.toml b/token-core/tcx-primitive/Cargo.toml index 2da7e089..ad3c655b 100644 --- a/token-core/tcx-primitive/Cargo.toml +++ b/token-core/tcx-primitive/Cargo.toml @@ -19,15 +19,15 @@ hex-literal = "=0.3.4" hex = "=0.4.3" lazy_static = "=1.4.0" anyhow = { version = "=1.0.79", features = [] } -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" tiny-bip39 = "=1.0.0" ed25519-bip32 = "=0.3.2" ed25519-dalek = "=2.1.0" blake2b_simd = "=1.0.1" -blst = "=0.3.12" -num-bigint = "=0.4.6" -num-traits = "=0.2.19" +blst = "=0.3.3" +num-bigint = "=0.4.3" +num-traits = "=0.2.15" sha2 = "=0.10.6" digest = "=0.10.6" hkdf = "=0.12.3" diff --git a/token-core/tcx-substrate/Cargo.toml b/token-core/tcx-substrate/Cargo.toml index e0c0138b..d9d2c18e 100644 --- a/token-core/tcx-substrate/Cargo.toml +++ b/token-core/tcx-substrate/Cargo.toml @@ -28,7 +28,7 @@ anyhow = { version = "=1.0.79", features = [] } #tweetnacl = "0.2.1" xsalsa20poly1305 = "=0.9.0" serde_json = "=1.0.89" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } base64 = "=0.13.1" scrypt = { version = "=0.10.0", default-features = false } regex = "=1.9.3" diff --git a/token-core/tcx-tron/Cargo.toml b/token-core/tcx-tron/Cargo.toml index 93e59d78..91c450c3 100644 --- a/token-core/tcx-tron/Cargo.toml +++ b/token-core/tcx-tron/Cargo.toml @@ -19,13 +19,13 @@ bitcoin = "=0.29.2" secp256k1 = {version = "=0.24.3", features = ["rand", "recovery"] } tiny-bip39 = "=1.0.0" bitcoin_hashes = "=0.11.0" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } serde_json = "=1.0.89" uuid = { version = "=1.2.2", features = ["serde", "v4"] } anyhow = { version = "=1.0.79", features = [] } -num-bigint = "=0.4.6" -num-traits = "=0.2.19" -num-integer = "=0.1.46" +num-bigint = "=0.4.3" +num-traits = "=0.2.15" +num-integer = "=0.1.45" byteorder = "=1.4.3" bytebuffer = "=0.2.1" hex = "=0.4.3" diff --git a/token-core/tcx/Cargo.toml b/token-core/tcx/Cargo.toml index f9b015b9..d895c960 100644 --- a/token-core/tcx/Cargo.toml +++ b/token-core/tcx/Cargo.toml @@ -31,7 +31,7 @@ prost-types = "=0.11.2" libc = "=0.2.140" log = "=0.4.17" serde_json = "=1.0.89" -serde = { version = "=1.0.165", features = ["derive"] } +serde = { version = "=1.0.147", features = ["derive"] } anyhow = { version = "=1.0.79", features = [] } lazy_static = "=1.4.0" hex = "=0.4.3"