From 970147b7cfa3dd3013ceec5bc6eacaea7c0d7bb9 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 12:48:15 +0200 Subject: [PATCH] chore: update dependencies for new Baid64 --- Cargo.lock | 248 +++++++++++++++++------------------------- Cargo.toml | 5 +- consensus/src/stl.rs | 7 +- seals/Cargo.toml | 4 +- seals/src/secret.rs | 41 +++---- src/stl.rs | 2 +- stl/BPCore@0.1.0.sta | 9 +- stl/BPCore@0.1.0.sty | 118 ++++++++++---------- stl/Bitcoin@0.1.0.sta | 4 +- stl/Bitcoin@0.1.0.sty | 120 ++++++++++---------- stl/Tx@0.1.0.sta | 2 +- stl/Tx@0.1.0.sty | 32 +++--- 12 files changed, 271 insertions(+), 321 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec77db05..a64aff00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,18 +77,6 @@ dependencies = [ "libc", ] -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "ascii" version = "1.1.0" @@ -100,12 +88,11 @@ dependencies = [ [[package]] name = "ascii-armor" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743d90b41a39d6e3920eef64a70f6411097cbb47141606a45b2a96533ec7111c" +version = "0.4.0" +source = "git+https://github.com/UBIDECO/ascii-armor#38dc9767f36db3957ac3dade280a04d9a72b6be4" dependencies = [ "amplify", - "baid58", + "baid64", "base85", "sha2", "strict_encoding", @@ -113,27 +100,27 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] -name = "baid58" -version = "0.4.4" +name = "baid64" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0585242d87ed976e05db6ae86a0f771f140104a4b6c91b4c3e43b9b2357486" +checksum = "7b8b80494235048845f856b267a4a1d97df59fd14ed7ca92652f834ce93becc6" dependencies = [ - "base58", - "blake3", + "amplify", + "base64", "mnemonic", "sha2", ] [[package]] -name = "base58" -version = "0.2.0" +name = "base64" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" [[package]] name = "base85" @@ -146,22 +133,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[package]] -name = "blake3" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "block-buffer" @@ -222,7 +196,7 @@ name = "bp-seals" version = "0.11.0-beta.5" dependencies = [ "amplify", - "baid58", + "baid64", "bp-consensus", "bp-dbc", "commit_verify", @@ -234,21 +208,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cc" -version = "1.0.88" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cfg-if" @@ -258,9 +226,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -273,7 +241,7 @@ dependencies = [ [[package]] name = "commit_encoding_derive" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#4ca5963fbf6d57138f5b81ebe70aa095a79d0d9d" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=develop#5e50b251aa5a5c4d83c47dad609a15ef3d50800f" dependencies = [ "amplify", "amplify_syn", @@ -285,7 +253,7 @@ dependencies = [ [[package]] name = "commit_verify" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#4ca5963fbf6d57138f5b81ebe70aa095a79d0d9d" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=develop#5e50b251aa5a5c4d83c47dad609a15ef3d50800f" dependencies = [ "amplify", "commit_encoding_derive", @@ -308,12 +276,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - [[package]] name = "core-foundation-sys" version = "0.8.6" @@ -373,9 +335,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "js-sys", @@ -430,9 +392,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -440,19 +402,13 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" version = "0.2.153" @@ -461,19 +417,15 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "mnemonic" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29fae0e4c0b155d3b019a7cbc27abe4a90e15c06814d27889ce9f5f44e2faf77" -dependencies = [ - "byteorder", - "lazy_static", -] +checksum = "f2b8f3a258db515d5e91a904ce4ae3f73e091149b90cadbdb93d210bee07f63b" [[package]] name = "num-traits" @@ -504,18 +456,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -567,9 +519,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "secp256k1" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" +checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" dependencies = [ "rand", "secp256k1-sys", @@ -578,31 +530,31 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" dependencies = [ "cc", ] [[package]] name = "serde" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.60", ] [[package]] @@ -638,8 +590,7 @@ dependencies = [ [[package]] name = "strict_encoding" version = "2.7.0-beta.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c463f8ea993e323740d78544473e791adb91ac659f5bf2c1a59db64a34f99fc" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#7c46c97c10655612a1c71b984faa62ffc543b226" dependencies = [ "amplify", "half", @@ -649,8 +600,7 @@ dependencies = [ [[package]] name = "strict_encoding_derive" version = "2.7.0-beta.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475fa6f1fdde6e0555422b5111ad34bde30a1459af3599f920c3af9829772c0e" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#7c46c97c10655612a1c71b984faa62ffc543b226" dependencies = [ "amplify_syn", "heck", @@ -662,12 +612,11 @@ dependencies = [ [[package]] name = "strict_types" version = "2.7.0-beta.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "152bd04284e9093f23a911d0d89b7dd950a461af1ed5e243f6215fbcd45e9445" +source = "git+https://github.com/strict-types/strict-types?branch=develop#a2e860f36f24b477712551a6db349edcf08efb3e" dependencies = [ "amplify", "ascii-armor", - "baid58", + "baid64", "half", "indexmap", "sha2", @@ -698,9 +647,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.51" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -709,22 +658,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.60", ] [[package]] @@ -763,9 +712,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -773,24 +722,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -800,9 +749,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -810,28 +759,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-bindgen-test" -version = "0.3.41" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143ddeb4f833e2ed0d252e618986e18bfc7b0e52f2d28d77d05b2f045dd8eb61" +checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" dependencies = [ "console_error_panic_hook", "js-sys", @@ -843,20 +792,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.41" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5211b7550606857312bba1d978a8ec75692eae187becc5e680444fffc5e6f89" +checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.60", ] [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -873,13 +822,14 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", @@ -888,42 +838,48 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" -version = "0.52.3" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" diff --git a/Cargo.toml b/Cargo.toml index e34c50eb..602d554d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,4 +91,7 @@ wasm-bindgen-test = "0.3" features = ["all"] [patch.crates-io] -commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" } +ascii-armor = { git = "https://github.com/UBIDECO/ascii-armor" } +strict_encoding = { git = "https://github.com/strict-types/strict-encoding", branch = "develop" } +strict_types = { git = "https://github.com/strict-types/strict-types", branch = "develop" } +commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "develop" } diff --git a/consensus/src/stl.rs b/consensus/src/stl.rs index a298e19a..533214a8 100644 --- a/consensus/src/stl.rs +++ b/consensus/src/stl.rs @@ -31,13 +31,10 @@ use crate::{ WitnessVer, Wtxid, LIB_NAME_BITCOIN, }; -#[deprecated(since = "0.10.8", note = "use LIB_ID_BP_TX instead")] -pub const LIB_ID_BITCOIN: &str = - "urn:ubideco:stl:HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy"; pub const LIB_ID_BP_TX: &str = - "urn:ubideco:stl:HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy"; + "stl:9WwTYiP2-OadKCZP-cR0bJ@Y-qruINYX-bXZFj8Y-fsQoGgo#signal-color-cipher"; pub const LIB_ID_BP_CONSENSUS: &str = - "urn:ubideco:stl:CZDuuDDpmR3SKQQhLTtV4X5JmosuUCg5kzzXa5Twn4FF#salmon-alcohol-miracle"; + "stl:q7G95wzt-SxT2BMV-t@PokBt-wNYgZTu-AaYAtM3-rYjlzs4#agenda-wolf-pagoda"; #[deprecated(since = "0.10.8", note = "use _bp_tx_stl instead")] fn _bitcoin_stl() -> Result { _bp_tx_stl() } diff --git a/seals/Cargo.toml b/seals/Cargo.toml index da4f16f8..53e6365c 100644 --- a/seals/Cargo.toml +++ b/seals/Cargo.toml @@ -18,10 +18,10 @@ path = "src/lib.rs" [dependencies] amplify = { workspace = true } +baid64 = "0.1.0" single_use_seals = { workspace = true } commit_verify = { workspace = true } strict_encoding = { workspace = true } -baid58 = "0.4.4" bp-consensus = { workspace = true } bp-dbc = { workspace = true } rand = "0.8.5" @@ -39,4 +39,4 @@ serde = [ ] [package.metadata.docs.rs] -features = [ "all" ] +features = ["all"] diff --git a/seals/src/secret.rs b/seals/src/secret.rs index b1fc015a..579d9f47 100644 --- a/seals/src/secret.rs +++ b/seals/src/secret.rs @@ -22,8 +22,8 @@ use std::fmt::{self, Display, Formatter}; use std::str::FromStr; -use amplify::{Bytes32, Wrapper}; -use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32CHECKSUM}; +use amplify::{ByteArray, Bytes32, Wrapper}; +use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use commit_verify::{CommitmentId, DigestExt, Sha256}; /// Confidential version of transaction outpoint-based single-use-seal @@ -50,27 +50,21 @@ impl From for SecretSeal { fn from(hasher: Sha256) -> Self { hasher.finish().into() } } -impl ToBaid58<32> for SecretSeal { +impl DisplayBaid64 for SecretSeal { const HRI: &'static str = "utxob"; - const CHUNKING: Option = CHUNKING_32CHECKSUM; - fn to_baid58_payload(&self) -> [u8; 32] { self.0.into_inner() } - fn to_baid58_string(&self) -> String { self.to_string() } + const CHUNKING: bool = true; + const PREFIX: bool = true; + const EMBED_CHECKSUM: bool = true; + const MNEMONIC: bool = false; + fn to_baid64_payload(&self) -> [u8; 32] { self.to_byte_array() } } -impl FromBaid58<32> for SecretSeal {} +impl FromBaid64Str for SecretSeal {} impl FromStr for SecretSeal { - type Err = Baid58ParseError; - fn from_str(s: &str) -> Result { - SecretSeal::from_baid58_maybe_chunked_str(s, ':', ' ') - } + type Err = Baid64ParseError; + fn from_str(s: &str) -> Result { Self::from_baid64_str(s) } } impl Display for SecretSeal { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if f.alternate() { - write!(f, "{::^}", self.to_baid58()) - } else { - write!(f, "{::^.3}", self.to_baid58()) - } - } + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { self.fmt_baid64(f) } } #[cfg(test)] @@ -79,12 +73,11 @@ mod test { #[test] fn secret_seal_baid58() { - let baid58 = "utxob:2eFrirU-RjqLnqR74-AKRfdnc9M-DpvSRjmZG-mFPrw7nvu-Te1wy83"; - let seal: SecretSeal = baid58.parse().unwrap(); - assert_eq!(baid58, seal.to_string()); - assert_eq!(baid58.replace('-', ""), format!("{seal:#}")); - assert_eq!(seal.to_string(), seal.to_baid58_string()); - let reconstructed = SecretSeal::from_str(&baid58.replace('-', "")).unwrap(); + let baid64 = "utxob:xDfmDF9g-yNOjriV-6Anbe6H-MLJ@@g6-lo7Dd4f-dhWBW8S-XYGBm"; + let seal: SecretSeal = baid64.parse().unwrap(); + assert_eq!(baid64, seal.to_string()); + assert_eq!(seal.to_string(), seal.to_baid64_string()); + let reconstructed = SecretSeal::from_str(&baid64.replace('-', "")).unwrap(); assert_eq!(reconstructed, seal); } } diff --git a/src/stl.rs b/src/stl.rs index a2d8d1c4..10a6a7b8 100644 --- a/src/stl.rs +++ b/src/stl.rs @@ -32,7 +32,7 @@ use strict_types::{CompileError, LibBuilder, TypeLib}; /// Strict types id for the library providing data types from [`dbc`] and /// [`seals`] crates. pub const LIB_ID_BPCORE: &str = - "urn:ubideco:stl:8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2#energy-baboon-piano"; + "stl:bx6W@Ye9-W84klBh-n2vIDku-q1tmF4T-DLS$IqW-6CutpXM#garbo-radius-peru"; fn _bp_core_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_BPCORE), tiny_bset! { diff --git a/stl/BPCore@0.1.0.sta b/stl/BPCore@0.1.0.sta index 550c0541..6d204abb 100644 --- a/stl/BPCore@0.1.0.sta +++ b/stl/BPCore@0.1.0.sta @@ -1,9 +1,10 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2#energy-baboon-piano +Id: stl:bx6W@Ye9-W84klBh-n2vIDku-q1tmF4T-DLS$IqW-6CutpXM#garbo-radius-peru Name: BPCore -Dependency: EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average -Dependency: GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg#egypt-wedding-cupid -Dependency: HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy +Dependencies: + Std#ralph-blue-lucky, + CommitVerify#tennis-peace-olympic, + Bitcoin#signal-color-cipher Checksum-SHA256: 2eb52252d5050acc52d0f2e3b5addc059471b9cf8c2d920c9f6fdddcf6a8fb2b 20~CnZ*pY=$}AplgPGkh3_fq3Q7_j=2#kPT_9!;lWR>~GYywm#15{MZ-bfLFbqC#o>4E?M+l67UG^w8*<_XZ#%uyqCj(P-WB~(HbYuY diff --git a/stl/Bitcoin@0.1.0.sty b/stl/Bitcoin@0.1.0.sty index 71976833..8afcb2b7 100644 --- a/stl/Bitcoin@0.1.0.sty +++ b/stl/Bitcoin@0.1.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:CZDuuDDpmR3SKQQhLTtV4X5JmosuUCg5kzzXa5Twn4FF#salmon-alcohol-miracle + Id: stl:q7G95wzt-SxT2BMV-t@PokBt-wNYgZTu-AaYAtM3-rYjlzs4#agenda-wolf-pagoda Name: Bitcoin Version: 0.1.0 Description: Consensus library for bitcoin protocol @@ -11,17 +11,17 @@ @context typelib Bitcoin -import Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average - use Bool#laser-madam-maxwell +import Std#ralph-blue-lucky + use Bool#oxygen-complex-duet -@mnemonic(politic-cactus-salon) +@mnemonic(fire-mouse-paint) data Bip340Sig : sig [Byte ^ 64], sighash_type SighashType? -@mnemonic(canada-sharp-traffic) +@mnemonic(super-david-graph) data BlockHash : [Byte ^ 32] -@mnemonic(barbara-light-panda) +@mnemonic(ricardo-flipper-urban) data BlockHeader : version I32 , prevBlockHash BlockHash , merkleRoot BlockMerkleRoot @@ -29,49 +29,49 @@ data BlockHeader : version I32 , bits U32 , nonce U32 -@mnemonic(period-time-media) +@mnemonic(canada-century-jacket) data BlockMerkleRoot : [Byte ^ 32] -@mnemonic(kinetic-avenue-escort) +@mnemonic(royal-anatomy-june) data ByteStr : [Byte ^ ..0xffffffff] -@mnemonic(aspect-citrus-nerve) +@mnemonic(poncho-silver-bronze) data CompressedPk : [Byte ^ 33] -@mnemonic(nuclear-coral-gilbert) +@mnemonic(green-lima-song) data ControlBlock : leafVersion LeafVer , outputKeyParity Parity , internalPk InternalPk , merkleBranch TapMerklePath -@mnemonic(student-formula-circus) +@mnemonic(quality-donald-gemini) data FutureLeafVer : U8 -@mnemonic(anita-tactic-bikini) +@mnemonic(almond-canvas-ecology) data InternalPk : XOnlyPk -@mnemonic(anvil-arctic-cloud) +@mnemonic(forever-ariel-perform) data LeafScript : version LeafVer, script ScriptBytes -@mnemonic(tunnel-lagoon-cowboy) +@mnemonic(benefit-carbon-africa) data LeafVer : U8 -@mnemonic(student-avenue-economy) -data LegacyPk : compressed Std.Bool#laser-madam-maxwell, pubkey [Byte ^ 33] +@mnemonic(clever-appear-nominal) +data LegacyPk : compressed Std.Bool, pubkey [Byte ^ 33] -@mnemonic(gondola-middle-style) +@mnemonic(july-delete-maxwell) data LegacySig : sig [Byte ^ ..0xff], sighash_type SighashType -@mnemonic(greek-support-hawaii) +@mnemonic(apple-north-select) data LockHeight : U32 -@mnemonic(tokyo-inch-program) +@mnemonic(lobster-liberal-jump) data LockTime : U32 -@mnemonic(compass-protein-barcode) +@mnemonic(effect-benefit-chemist) data LockTimestamp : U32 -@mnemonic(bless-hippie-shirt) +@mnemonic(brother-sector-quiet) data OpCode : pushBytes0 | pushBytes1 | pushBytes2 | pushBytes3 | pushBytes4 | pushBytes5 | pushBytes6 | pushBytes7 | pushBytes8 | pushBytes9 | pushBytes10 | pushBytes11 @@ -87,123 +87,123 @@ data OpCode : pushBytes0 | pushBytes1 | pushBytes2 | pushBytes3 | checkSigVerify -@mnemonic(pocket-pegasus-frank) +@mnemonic(shadow-scroll-before) data Outpoint : txid Txid, vout Vout -@mnemonic(beach-twist-hotel) +@mnemonic(panic-nova-speed) data OutputPk : XOnlyPk -@mnemonic(method-editor-echo) +@mnemonic(phrase-forest-cool) data Parity : even | odd -@mnemonic(soviet-senator-wisdom) +@mnemonic(vodka-bogart-madonna) data PubkeyHash : [Byte ^ 20] -@mnemonic(delta-jumbo-clone) +@mnemonic(middle-season-baboon) data RedeemScript : ScriptBytes -@mnemonic(pyramid-spray-star) +@mnemonic(metro-picasso-roger) data Sats : U64 -@mnemonic(maestro-source-jackson) +@mnemonic(equator-cockpit-gong) data ScriptBytes : [Byte ^ ..0xffffffff] -@mnemonic(samuel-miami-cave) +@mnemonic(command-brave-album) data ScriptHash : [Byte ^ 20] -@mnemonic(bingo-maestro-silk) +@mnemonic(ribbon-paradox-rival) data ScriptPubkey : ScriptBytes -@mnemonic(rhino-time-rodent) +@mnemonic(copper-verbal-ingrid) data SeqNo : U32 -@mnemonic(prelude-analyze-think) +@mnemonic(minute-alfred-gibson) data SigScript : ScriptBytes -@mnemonic(prefix-pioneer-remark) +@mnemonic(exotic-diet-ford) data SighashFlag : all#1 | none | single -@mnemonic(balsa-equator-ground) -data SighashType : flag SighashFlag, anyoneCanPay Std.Bool#laser-madam-maxwell +@mnemonic(jazz-beatles-pasta) +data SighashType : flag SighashFlag, anyoneCanPay Std.Bool -@mnemonic(europe-welcome-phone) +@mnemonic(calypso-travel-script) data TapBranchHash : [Byte ^ 32] -@mnemonic(weekend-boris-import) +@mnemonic(athlete-serpent-bridge) data TapCode : pushBytes32#32 | pushData1#76 | pushData2 | pushData4 | reserved#80 | return#106 -@mnemonic(middle-jazz-basket) +@mnemonic(micro-brave-pretty) data TapLeafHash : [Byte ^ 32] -@mnemonic(dublin-chemist-version) +@mnemonic(manual-mike-alien) data TapMerklePath : [TapBranchHash ^ ..0x80] -@mnemonic(crash-culture-jamaica) +@mnemonic(paprika-amanda-hunter) data TapNodeHash : [Byte ^ 32] -@mnemonic(telecom-quest-helium) +@mnemonic(congo-bali-castro) data TapScript : ScriptBytes -@mnemonic(texas-tommy-geneva) +@mnemonic(distant-respond-green) data TimeLockInterval : height U16 | time U16 -@mnemonic(milk-gloria-prize) +@mnemonic(anvil-airport-broken) data Tx : version TxVer , inputs [TxIn ^ ..0xffffffff] , outputs [TxOut ^ ..0xffffffff] , lockTime LockTime -@mnemonic(antenna-crater-planet) +@mnemonic(person-atlanta-nickel) data TxIn : prevOutput Outpoint , sigScript SigScript , sequence SeqNo , witness Witness -@mnemonic(design-jacket-spirit) +@mnemonic(oscar-chief-truck) data TxOut : value Sats, scriptPubkey ScriptPubkey -@mnemonic(english-natasha-virus) +@mnemonic(nepal-symbol-uniform) data TxVer : I32 -@mnemonic(cowboy-diego-betty) +@mnemonic(shallow-light-reverse) data Txid : [Byte ^ 32] -@mnemonic(yellow-jaguar-pastel) +@mnemonic(miracle-almanac-record) data UncompressedPk : [Byte ^ 65] -@mnemonic(waiter-salad-casino) +@mnemonic(pogo-trivial-saturn) data VBytes : U32 -@mnemonic(conan-avalon-food) +@mnemonic(orange-maximum-blitz) data VarInt : U64 -@mnemonic(chrome-robin-gallop) +@mnemonic(brush-gloria-heroic) data Vout : U32 -@mnemonic(plasma-august-marion) +@mnemonic(mexico-bikini-athena) data WPubkeyHash : [Byte ^ 20] -@mnemonic(vibrate-charm-spain) +@mnemonic(triton-regard-couple) data WScriptHash : [Byte ^ 32] -@mnemonic(bridge-version-voyage) +@mnemonic(heart-pinball-jump) data WeightUnits : U32 -@mnemonic(sonata-local-slow) +@mnemonic(ship-jessica-wizard) data Witness : [ByteStr ^ ..0xffffffff] -@mnemonic(scholar-juice-titanic) +@mnemonic(alias-vega-shock) data WitnessProgram : version WitnessVer, program [Byte ^ 2..0x28] -@mnemonic(boris-harbor-equal) +@mnemonic(design-epoxy-metro) data WitnessScript : ScriptBytes -@mnemonic(richard-average-unit) +@mnemonic(tower-medusa-eric) data WitnessVer : v0 | v1#81 | v2 | v3 | v4 | v5 | v6 | v7 | v8 | v9 | v10 | v11 @@ -211,10 +211,10 @@ data WitnessVer : v0 | v1#81 | v2 | v3 | v16 -@mnemonic(sushi-polygon-circus) +@mnemonic(manager-rocket-hammer) data Wtxid : [Byte ^ 32] -@mnemonic(evident-finance-promo) +@mnemonic(clever-swim-carpet) data XOnlyPk : [Byte ^ 32] diff --git a/stl/Tx@0.1.0.sta b/stl/Tx@0.1.0.sta index c1cd0aad..3888ee1a 100644 --- a/stl/Tx@0.1.0.sta +++ b/stl/Tx@0.1.0.sta @@ -1,5 +1,5 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:9zw1koriNSQRJBdHbXnTqjCdShzASm915rWgnCBgnKJ4#delphi-magnum-flame +Id: stl:hbSsm3pX-lvluEDR-u10173k-cTdhTqI-75q5wIV-qHYv2V0#germany-detect-export Name: Tx Checksum-SHA256: 33f8156cb27f0f0b244711c5a4a81f1997c915dfc48012b17755cbd51d9b8d78 diff --git a/stl/Tx@0.1.0.sty b/stl/Tx@0.1.0.sty index ec09eba1..ea30ccaf 100644 --- a/stl/Tx@0.1.0.sty +++ b/stl/Tx@0.1.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:9zw1koriNSQRJBdHbXnTqjCdShzASm915rWgnCBgnKJ4#delphi-magnum-flame + Id: stl:hbSsm3pX-lvluEDR-u10173k-cTdhTqI-75q5wIV-qHYv2V0#germany-detect-export Name: Tx Version: 0.1.0 Description: Bitcoin transaction library @@ -13,55 +13,55 @@ typelib Tx -- no dependencies -@mnemonic(kinetic-avenue-escort) +@mnemonic(royal-anatomy-june) data ByteStr : [Byte ^ ..0xffffffff] -@mnemonic(tokyo-inch-program) +@mnemonic(lobster-liberal-jump) data LockTime : U32 -@mnemonic(pocket-pegasus-frank) +@mnemonic(shadow-scroll-before) data Outpoint : txid Txid, vout Vout -@mnemonic(pyramid-spray-star) +@mnemonic(metro-picasso-roger) data Sats : U64 -@mnemonic(maestro-source-jackson) +@mnemonic(equator-cockpit-gong) data ScriptBytes : [Byte ^ ..0xffffffff] -@mnemonic(bingo-maestro-silk) +@mnemonic(ribbon-paradox-rival) data ScriptPubkey : ScriptBytes -@mnemonic(rhino-time-rodent) +@mnemonic(copper-verbal-ingrid) data SeqNo : U32 -@mnemonic(prelude-analyze-think) +@mnemonic(minute-alfred-gibson) data SigScript : ScriptBytes -@mnemonic(milk-gloria-prize) +@mnemonic(anvil-airport-broken) data Tx : version TxVer , inputs [TxIn ^ ..0xffffffff] , outputs [TxOut ^ ..0xffffffff] , lockTime LockTime -@mnemonic(antenna-crater-planet) +@mnemonic(person-atlanta-nickel) data TxIn : prevOutput Outpoint , sigScript SigScript , sequence SeqNo , witness Witness -@mnemonic(design-jacket-spirit) +@mnemonic(oscar-chief-truck) data TxOut : value Sats, scriptPubkey ScriptPubkey -@mnemonic(english-natasha-virus) +@mnemonic(nepal-symbol-uniform) data TxVer : I32 -@mnemonic(cowboy-diego-betty) +@mnemonic(shallow-light-reverse) data Txid : [Byte ^ 32] -@mnemonic(chrome-robin-gallop) +@mnemonic(brush-gloria-heroic) data Vout : U32 -@mnemonic(sonata-local-slow) +@mnemonic(ship-jessica-wizard) data Witness : [ByteStr ^ ..0xffffffff]