diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80efcaa..0662fcb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: strategy: fail-fast: false matrix: - toolchain: [ nightly, beta, stable, 1.76.0 ] + toolchain: [ nightly, beta, stable, 1.77.0 ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master diff --git a/.rustfmt.toml b/.rustfmt.toml index 9017cd7..6d14899 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,5 +1,5 @@ edition = "2021" -version = "Two" +style_edition = "2021" max_width = 100 array_width = 100 diff --git a/Cargo.lock b/Cargo.lock index 16cd9e5..e00057c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aluvm" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db04c1d697d7f5b86d935bfe06cfd0310fd8a6c491b043118bec228597dcede9" +checksum = "f2a6767842958f458dc7010a2a1005db96dfaceadd366d07532c5045bbc81f24" dependencies = [ "amplify", "ascii-armor", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "baid64" @@ -172,12 +172,28 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +[[package]] +name = "bitcoin-io" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" + [[package]] name = "bitcoin-private" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -214,14 +230,14 @@ dependencies = [ [[package]] name = "bp-consensus" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3a99a46063d23d20a3177a04923652b245f31c2a04a6d0c47d5a93dc201a80" +checksum = "54db63118d55e32ea78f8775e98871d442a33e3bdef6419c7964d71b308316c0" dependencies = [ "amplify", "chrono", "commit_verify", - "secp256k1", + "secp256k1 0.30.0", "serde", "strict_encoding", "strict_types", @@ -229,9 +245,9 @@ dependencies = [ [[package]] name = "bp-core" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b8caf04291e2703ce267b1f8baf14f03879a6d1a5afe76e011ada489f172f9" +checksum = "2e51a329150531b12243adf51d978490c796a6a20ec76c506b41c8e1226022bc" dependencies = [ "amplify", "bp-consensus", @@ -248,24 +264,24 @@ dependencies = [ [[package]] name = "bp-dbc" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11fc4081db2147411381b9650765ce683e5065559f1125508696f79cc4cbfedf" +checksum = "9286fb448160672148262317f4647ebdcdd4699ed2bd34401f9799d0920cc376" dependencies = [ "amplify", "base85", "bp-consensus", "commit_verify", - "secp256k1", + "secp256k1 0.30.0", "serde", "strict_encoding", ] [[package]] name = "bp-invoice" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29c4f672b4b82ce7a218b2900254ac8e4b15b0022ed13abffa722571e73d375" +checksum = "2cfe7be7b2d740de57e895f2ac93b305bbd67a2a0914dac424f8569bb9981679" dependencies = [ "amplify", "bech32", @@ -275,9 +291,9 @@ dependencies = [ [[package]] name = "bp-seals" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d607238c2bf2c34d048d14cd798a6365306e0fb6b02211235f3ccad0bc7fa8f1" +checksum = "9873cfe420f4ce5cc539c394c75df0669cdbe2c23eed1930dffe024cb0f13a57" dependencies = [ "amplify", "baid64", @@ -304,9 +320,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.1.16" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "shlex", ] @@ -347,9 +363,9 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a1982dc6c54d2dcfa2bf4398d97e4e80a93f24d2537e58d6110b2b272cff0c" +checksum = "3bf08c4941e147937551f6a3d370552d67f98cf72c9eb18948142596beadd31e" dependencies = [ "amplify", "commit_encoding_derive", @@ -386,9 +402,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -427,9 +443,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "fast32" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ea9bdb2356e5a92403cf23ac493f9b43bd71e4ffd0f800862b841dd723994c" +checksum = "a35a73237400bde66c82e38387343f90d7182a2f2f22729e096a2abd57d75db9" [[package]] name = "fluent-uri" @@ -475,9 +491,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -485,11 +501,20 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -510,12 +535,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", + "serde", ] [[package]] @@ -526,18 +552,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "libc" -version = "0.2.158" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "log" @@ -559,9 +585,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minicov" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" +checksum = "def6d99771d7c499c26ad4d40eb6645eafd3a1553b35fc26ea5a489a45e82d9a" dependencies = [ "cc", "walkdir", @@ -575,9 +601,9 @@ checksum = "f2b8f3a258db515d5e91a904ce4ae3f73e091149b90cadbdb93d210bee07f63b" [[package]] name = "nonasync" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a84b7c873630913f738950f17412b9d5b24cad6866b98b802253f8cbbefabb" +checksum = "4b1005555d351f593bf72ffc3a89a0d42e243df004d2c4ded17699f10b562b98" dependencies = [ "amplify", ] @@ -593,9 +619,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "paste" @@ -620,9 +646,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -668,9 +694,9 @@ dependencies = [ [[package]] name = "rgb-core" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43dc70212f5eff8189f3cdfef2d11f53f7be4c4128db9839b5d56a0f9ef60c98" +checksum = "1cf48c4e395882c5228cd788a78e04674c94f7c177d82afdd87def8619f5dff8" dependencies = [ "aluvm", "amplify", @@ -690,7 +716,7 @@ dependencies = [ [[package]] name = "rgb-interfaces" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" dependencies = [ "aluvm", "amplify", @@ -710,9 +736,8 @@ dependencies = [ [[package]] name = "rgb-invoice" -version = "0.11.0-beta.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d42e9d284f857f3dccce63521789f3da75568f55488d255ebacc8fe343012a5d" +version = "0.11.0-beta.9" +source = "git+https://github.com/RGB-WG/rgb-std?branch=master#ddee8898e4d6a2f156587feabb6f19fca08946c0" dependencies = [ "amplify", "baid64", @@ -731,9 +756,8 @@ dependencies = [ [[package]] name = "rgb-std" -version = "0.11.0-beta.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a97b5e58521f41837b1a92f480041fd72a0659f22cb132354d2bbcba25b25" +version = "0.11.0-beta.9" +source = "git+https://github.com/RGB-WG/rgb-std?branch=master#ddee8898e4d6a2f156587feabb6f19fca08946c0" dependencies = [ "aluvm", "amplify", @@ -787,20 +811,32 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "secp256k1" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "rand", "secp256k1-sys", "serde", ] +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand", + "secp256k1-sys", + "serde", +] + [[package]] name = "secp256k1-sys" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" dependencies = [ "cc", ] @@ -813,16 +849,16 @@ checksum = "52a44aed3002b5ae975f8624c5df3a949cfbf00479e18778b6058fcd213b76e3" dependencies = [ "bitcoin-private", "rand", - "secp256k1", + "secp256k1 0.29.1", "secp256k1-zkp-sys", "serde", ] [[package]] name = "secp256k1-zkp-sys" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6eea7919e0cab992510edfbf40bd9342c0a3c2bb910f2c51355c2cb2d69839" +checksum = "57f08b2d0b143a22e07f798ae4f0ab20d5590d7c68e0d090f2088a48a21d1654" dependencies = [ "cc", "secp256k1-sys", @@ -830,29 +866,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -862,9 +898,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -911,9 +947,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "single_use_seals" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a4c51f21507cf63984c367507f281215073e85b08711ed7da4fc63dbd709e0" +checksum = "ec071f3b3153217f1cb2bca5ba7ac87eeafc446cb35a5c0643dec33495a37244" dependencies = [ "amplify_derive", ] @@ -946,9 +982,9 @@ dependencies = [ [[package]] name = "strict_types" -version = "2.7.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f16e8855a575633815f01482ac927ebaca3d2485aec8e17226c6826de29154e" +checksum = "8bae7475fc901144d8a35d25e36d76aa020b840f233d60532d6d52318718781b" dependencies = [ "amplify", "ascii-armor", @@ -988,9 +1024,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -999,22 +1035,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] @@ -1040,9 +1076,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -1059,9 +1095,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unsafe-libyaml" @@ -1103,9 +1139,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -1114,24 +1150,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -1141,9 +1177,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1151,28 +1187,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-bindgen-test" -version = "0.3.43" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" +checksum = "d381749acb0943d357dcbd8f0b100640679883fcdeeef04def49daf8d33a5426" dependencies = [ "console_error_panic_hook", "js-sys", @@ -1185,20 +1221,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.43" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" +checksum = "c97b2ef2c8d627381e51c071c2ab328eac606d3f69dd82bcbca20a9e389d95f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -1297,9 +1333,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -1322,5 +1358,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] diff --git a/Cargo.toml b/Cargo.toml index 39ffa8f..f829571 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "rgb-interfaces" -version = "0.11.0-beta.8" +version = "0.11.0-beta.9" description = "Collection of the standard RGB smart contract interface" keywords = ["bitcoin", "lightning", "rgb", "smart-contracts", "lnp-bp"] categories = ["cryptography::cryptocurrencies"] authors = ["Dr Maxim Orlovsky "] homepage = "https://github.com/RGB-WG" repository = "https://github.com/RGB-WG/rgb-interfaces" -rust-version = "1.76.0" # rgb-std +rust-version = "1.77.0" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -22,10 +22,10 @@ name = "ifaces" [dependencies] amplify = "4.7.0" strict_encoding = "2.7.0" -strict_types = "2.7.0" -aluvm = "0.11.0-beta.8" -bp-core = "0.11.0-beta.8" -rgb-std = { version = "0.11.0-beta.8" } +strict_types = "2.7.2" +aluvm = "0.11.0-beta.9" +bp-core = "0.11.0-beta.9" +rgb-std = { version = "0.11.0-beta.9" } chrono = "0.4.38" serde_crate = { package = "serde", version = "1.0", optional = true } serde_json = "1.0" @@ -47,3 +47,7 @@ wasm-bindgen-test = "0.3" [package.metadata.docs.rs] features = ["all"] + +[patch.crates-io] +rgb-invoice = { git = "https://github.com/RGB-WG/rgb-std", branch = "master" } +rgb-std = { git = "https://github.com/RGB-WG/rgb-std", branch = "master" } diff --git a/MANIFEST.yml b/MANIFEST.yml index c5f31a0..6e84d0f 100644 --- a/MANIFEST.yml +++ b/MANIFEST.yml @@ -3,7 +3,7 @@ Type: Library Kind: Free software License: Apache-2.0 Language: Rust -Compiler: 1.76 +Compiler: 1.77 Author: Maxim Orlovsky Maintained: LNP/BP Standards Association, Switzerland Maintainers: diff --git a/interfaces/RGB20.rgb b/interfaces/RGB20.rgb index 5e4f2c8..27d5515 100644 Binary files a/interfaces/RGB20.rgb and b/interfaces/RGB20.rgb differ diff --git a/interfaces/RGB20.rgba b/interfaces/RGB20.rgba index 0cde529..6be316e 100644 --- a/interfaces/RGB20.rgba +++ b/interfaces/RGB20.rgba @@ -1,48 +1,48 @@ -----BEGIN RGB KIT----- -Id: rgb:kit:fP4LP8j8-W9c!zB5-YqWBB$A-P6g66Ou-rQATu2M-T2CeKOw +Id: rgb:kit:ysLT4RkG-kraBV5v-vIG8cdn-4W56nD4-MMtYZG4-advTzu4 Version: 2 Interface: RGB20InflatableBurnable; id=BWy2H0Nd-ykgandr-mR5fydi-U$7tFU2-R!z1F9B-MZW0tKo#bishop-poem-dublin; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=jVFbvP4NfeUiD7V9u4Z0Yaq7a5ivOkMvfVAcJkhkuto + suppl=QfC9WBHte6YyCK8ebGesJe7SbEvGYS4IlRBVmE3ODds Interface: RGB20RenamableBurnable; id=FFfPPWDH-4$BWBn7-3QnE8WV-nHj98E8-IoAIZvt-4kiX7YA#theory-memo-puzzle; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=woxY7TXVP1or9vUCIgv4btc27FNoElyBF!ER5cE7V30 + suppl=hCinGM7UdjYFcz0X!9xFU3u5tjycL856yIFMd1QR5xQ Interface: RGB20RenamableInflatable; id=Gzd3DwVy-TtF3Z6V-h981qjU-WV9QmbS-$SB5Tyg-6y5PLPc#battery-consul-mercury; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=0N0774KBnZeW!fF2ABAlDsqIi!anU$opxl9m0lR7erc + suppl=Y!6Hn5i7mhPH3jJfwVrNE$YuQUjuNcwZEF20PnrZ73s Interface: RGB20RenamableInflatableBurnable; id=MkSuvvz2-StGzuV8-Hewq0fo-hMigWm$-UMxXtdP-RCnZyec#asia-domino-respect; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=w$fGswNCSc$SvLDaAtkRr3oC8lo$MdSDVmrT2jZYS48 + suppl=Cvq6WL9Sd6VJkBYVNr61tWyCYLc5JDMqxckOB2ZIcjA Interface: RGB20Inflatable; id=YLpmbnY2-yZn$JdG-ghjwoCP-zj215y0-$XuwA90-o$CP$pg#camel-slogan-comrade; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=NyZIrB5pQtjFEocL!vZP7yPmOFfFZWBhF4Rz1euUcRY + suppl=JYxMIFNhkVREZptzm7Ay5$QNh!SvwlDypLVVAd7xlIA Interface: RGB20RenamableFixed; id=meHrtVTZ-6xAdd0w-rjDttLh-cs2n7zn-sZBzfwz-FcU!i24#jungle-wizard-dollar; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=orMy!IoDYoMShipfxkHs8qRcvcb5Z$vm3$lqbUrO8LQ + suppl=38obz9Y2l9BfdTKuKjbmHjE6P$$Z6Ndx6Uv5GfwyJTo Interface: RGB20RenamableReplaceable; id=r6$dLeVy-H0HQpUy-F2XbX2E-P2JqbHp-wsISD4f-xUEaOKQ#postage-plaza-almond; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=twB$9UYdTZArH3KDU0TphqgJ!qjqhD4mVM5Py3xeEf0 + suppl=Z85b1rl6yn6w5jor98svlbt1LsUKzukhKdXdG4A4ZGQ Interface: RGB20Replaceable; id=w0Z1Za2j-klpfWyT-4coOB!6-90qakW5-AfjmIc9-ejZbKZU#cycle-buzzer-british; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=gP$QpkRegHiMBUDOvKIJhFTkMvH0MUVUCy8hnW7sv!A + suppl=1qH$r2fK0vl1dVBdIW$H8ZenhaVSScSMxLjUjyp3Yf0 Interface: RGB20Burnable; id=yxQRcNJ4-yMnJ0$c-gLjwpdS-8DuJjFn-pWQ4i5C-To2R$U4#basil-gopher-music; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=J$6n9hMEF5bIYpyIJxbErWQoMZUnLZSvII12uwaopKs + suppl=DNs9y1f$7MHIr2x!LTqjvW02VvkmblKgGXXtrzq9ui4 Interface: RGB20Fixed; id=$iUnO9aO-1xhqUd6-1Jm5S5!-wM3ngby-5GVEylQ-ZTAMYDk#tornado-pioneer-bucket; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=A!S5COe4XrAEz5qH$$!PCTZNVfdCNicgKCtL12$c4JU + suppl=94fKeoxMV9aFy2oXrMYldBMmSSdUV!KIdS4YFpGCEZo Type-System: sts:3Vut1$G8-lmJY9!z-CvaNdjp-n0adNAj-IVQQ1jB-SdhQxp4#parker-axiom-meaning -Check-SHA256: abe88631b64337f76fa37a5ca277f043cb10715c4d68e925150881718a02cd51 +Check-SHA256: f25245363528e1d808328daa980e86087a1256c035350a75ed1c4354fb3bf4c5 0tx{aQb$5EFiCD^Y+-a^Vr*qXb#iWDVr*pwR!>~x^Kusb3F_D>3|%=0P4(JM3 91~BkJ``pp2L<+WYM!zJb=Ey6LPIrKAc+<}ouO+1_y#HazXRttFXqDki#07`P*;L4`>n3v9olck(HKSg @@ -266,28 +266,28 @@ W@%+)AYpSLVIXI0Z(?C=AaG%FVQpn}WpW^7Z)J0CCv+ffVRU0?AarPDAZc@Rb!B8Ab9HcVYK5Ib#!obbaONSb8~4rOj=Vhb$BgjYD771 SWreSPh(|tRaI+OEjDs9byGuAHZ5UMXmdGNHD)b1N<}w!000UC1#Gq-LtV;98lBqaN0;(;B|q-bRM{W1 -)L%g{m9(^~Esoh{00000GyrpRX*x_=Q!#aTEoW*(Ic```MlDZcWpq_lYga8cax-;PLsK>_VNqyvIaf7i +)L%g{m9(^~-KQgG00000GyrpRX*x_=Q!#aTEoW*(Ic```MlDZcWpq_lYga8cax-;PLsK>_VNqyvIaf7i EjUU=H+KO50RRFBMrC1ib#i5M6#xPVVs&zEVPb4$3TbX;Y+-a^Vr*pyQ*>c&WMOh-1^@+8M?x|%0u)!z -Jz&S<@Ky$X_d;NW&i*H05kw|b7?wET2nD~cr9mYL^*C)P)03JV`X$z +Jz&S<@Ky$X_d;c&WMOh-1^@+8M?x|%0vk7X4+U~g(RXL1VfW2yjYXC937bpwf#p1)>n=|$_b!gvW&i*H05kw|b7?wE +Q*>c&WMOh-1^@+8M?x|%0vk7X4+U~g(RXL1VfW2yjYXC937bpwf#p1)>n=|$_uZ!>X8-^I05kw|b7?wE T2nD~cr9mYL^*C)P)03JV`X$zRclu*HgYp{Q$tfWEn!h;b2(QvW-T~MMK^Z=009632u5XLbairNa~1#s 3TbX;Y+-a^Vr*pza%FB|ZDC?;We8JrVQyq$a%2Vo1yV;sGB5%%M6SO4_Da#SxnBo+3bcNROo|1j{X;Qc -*H1(#*~#ZFj@f1a0000q0CRI`I!szqF?Dz?XKF+_Zdg!8El*=*bX8SrS1mSjGj&r#Q#LJOQD}2HS2boW +*H1(#*~#bKrz2+o0000q0CRI`I!szqF?Dz?XKF+_Zdg!8El*=*bX8SrS1mSjGj&r#Q#LJOQD}2HS2boW I7&q~cL4wa00Ia`Wnpx6a%FQL00RhOb#iWDVr*p!X>Mk0VRT_)Y-I^@Wo}_@VPb4$2vc-nZe(F{WCj2Q -Qb$5EFalt@W^Q&i$(jEp(V&JrC$Ozb>ku7xOe>5#Z7vrq+J5t%#zD>eGZn=?i*7BB*=7I$001-qb8~4r +2vc-nZe(F{WCj2QQb$5EFanw3>$Ozb>ku7xOe>5#Z7vrq+J5t%#zD>eGZn=?i*DSfBWC~r001-qb8~4r Oj=Vhb$BgjYD771SWreSPh(|tRaI+OEjDs9byGuAHZ5UMXmdGNHD)b1N<}w!0RRC20tiNBVRUtJWpfJv -0SR(tZeeXc&WMOh-1^@+8M?x|%0c&WMOh-1^@+8M?x|%0jbYX5}VRB>! -00mM_VNqyvIaf7iEjUU=H+KO50RRFBMrC1ib#i5MApipiVs&zEVPb4$ 3TbX;Y+-a^Vr*p#a%FIAVPj=sVr*pyQ*>c&WMOh-1^@+8M?x|%0?QN;aMF0l$;s3AATB&9buRvPK}ZMPA!hvW&i*H05kw|b7?wET2nD~cr9mYL^*C)P)03JV`X$zRclu*HgYp{Q$tfWEn!h;b2(Qv +km4>vPK}ZMPTZ#>X8-^I05kw|b7?wET2nD~cr9mYL^*C)P)03JV`X$zRclu*HgYp{Q$tfWEn!h;b2(Qv W-T~MMK^Z=009632u5XLbairNa|!?f2x4_|Zee0!00mMUMA(m1w0!?L{VGDpk+OvDhHAKF%fNXr25$w;Zs!r0000000007 000000000E(i%G%h4}Sf8vn;89aSG|t4s0*&BRFk%a^yrND0jb0t9t*cyH)xK+Rkw`Mu(V|7oQWGN(Z+ diff --git a/interfaces/RGB21.rgb b/interfaces/RGB21.rgb index b1e0633..2cf2ed2 100644 Binary files a/interfaces/RGB21.rgb and b/interfaces/RGB21.rgb differ diff --git a/interfaces/RGB21.rgba b/interfaces/RGB21.rgba index ba7f883..559e7e7 100644 --- a/interfaces/RGB21.rgba +++ b/interfaces/RGB21.rgba @@ -1,16 +1,16 @@ -----BEGIN RGB KIT----- -Id: rgb:kit:0kOWGdGC-3dj$BWI-fTZ9MNE-wQha!NY-fYXOQ$H-CN$zepc +Id: rgb:kit:cRg5Yb68-cpBFFqd-7vDywPK-DOuNi96-3Z9rLe!-0aIp0Sg Version: 2 Interface: RGB21Issuable; id=MTbC0xIy-t4kjnRO-6lrefMT-QDDxtSN-SNOHen$-WEeyyfc#cubic-motif-corona; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=WkDQlqqAYb47f2Aufy!BVRGqn7kVqPexdRKWS8wr$2k + suppl=GAzULFpHvEm9htU97vHGJ3Uk5oKD1R5Atlf8hDRt6Gs Interface: RGB21Unique; id=zaiUh27F-2cYWfcd-FfL5lBc-uUenO66-IYZE0D9-GeVIvGU#forest-heroic-energy; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=gFmKe4lnnxQQzD!IrZsAcUWlQkSYfh$5EwGClOhyOxM + suppl=pUwOFM4E5Yg8PeuBmsqgD4wiq9lORXxpteR$zxJtwyI Type-System: sts:khmpaMuX-TkN$aWG-9khkPeS-s7byD4Q-VtuwEzF-2bqkUZc#alien-phone-bagel -Check-SHA256: 0990d392dadbb1ba0185cf2aab9dcb9d62a191af0dda5ba4844527e481b1ead6 +Check-SHA256: 179f5cc4b329784835a4a86d9049701e00c000d7153379ea1529fc9b0c0bf4bd 0s;XIQb$5EF-dcCbzx#`We8SJT;ua{7X1n8*eMKMIS5Vl+JKgY@eMZUni+<~yI*pqgJC?_Ngk-C4>AJ< *4uOk<_EsKqDt~i^2VW=;sVUJc^^_AA?HnP4dl)m7&~2db~aWFA>JNQ2jD2sV9r$e#NPRGODlp?H>{w_ @@ -59,9 +59,9 @@ AY^Z4b8aVeAZ2lNVQe6DZyV?GAZczOZ*_EVb#!wQZf|Zza$#e1 X>V>}Y*cS+Wo|fObaZ8HaC9JaZyb#7~JZ+C7~Z);_49${>3Z)0I}X>V>IZ)PBMZfkCDcWxkbZ);_4AW1|t0CRI`I!szqF?Dz?XKF+_ Zdg!8El*=*bX8SrS1mSjGj&r#Q#LJOQD}2HS2boWI7&q~cK`qa0x>qi(-Jbbi6fm8x|X+}F*E}Y8&WkR -P95q0SVywS_b!gvW&i*H05kw|b7?wET2nD~cr9mYL^*C)P)03JV`X$zRclu*HgYp{Q$tfWEn!h;b2(Qv +P95q0SVywS_ui)?X8-^I05kw|b7?wET2nD~cr9mYL^*C)P)03JV`X$zRclu*HgYp{Q$tfWEn!h;b2(Qv W-T~MMK^Z=009632u5XLbairNb1VP^3S)0V={Wo~D3VRm6+Y-I{&a$#e1X>V>}YzcB@ZeeX< -Vr*pyQ*>c&WMOh-1^@+8M?x|&0?nwDhi=8$#uk0YMSQ+x1c&WMOh-1^@+8M?x|&0?nwDhi=8$#uk0YMSQ+x1!00mMUMA(m1w0!?L{VGDpk+OvDhHAKF%fNXr25$w;Zs!r0000000007000000000Es;(M& diff --git a/interfaces/RGB25.rgb b/interfaces/RGB25.rgb index f20ccc5..0490bf5 100644 Binary files a/interfaces/RGB25.rgb and b/interfaces/RGB25.rgb differ diff --git a/interfaces/RGB25.rgba b/interfaces/RGB25.rgba index e06e6cb..686076f 100644 --- a/interfaces/RGB25.rgba +++ b/interfaces/RGB25.rgba @@ -1,16 +1,16 @@ -----BEGIN RGB KIT----- -Id: rgb:kit:P!Ecs7UR-r5FQi4m-XjsAofs-pLvMJQ!-cFpUdIZ-9WRR2hs +Id: rgb:kit:XqWYTQfY-MAWpGwM-2Z5uKyl-1bAoR5C-rFlXM39-6DphNWQ Version: 2 Interface: RGB25Base; id=BdKiMHub-RZTYrbS-13G3wt6-4uIchyP-MQF0Kmm-sYgeMkY#prism-cobalt-airport; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=Fgx32zFpZjbIvvfg5qbNNA8vgq694AzJMYYFOioKY8w + suppl=LVfcORx1ZluDVFylIB$zXU2C6ZVluBpCSRMniXAM5B4 Interface: RGB25Burnable; id=CQLcyFgc-TMChxZQ-6$8Owdz-HOytrmh-T9QD8tL-eHy8ZUE#raymond-promise-bamboo; dev=ssi:LZS1ux-gjD9nXPF-OcetUUkW-6r3uSCS6-aQhs9W5f-8JE7w; - suppl=R1Vx!YgQMRIHBGFkOKMiTktpwJTIGRmCGdaVICBZ6hA + suppl=kge1A$YwTO1fxGxzAsesX1PQ9OZDtz!cIIXNsBM9FwA Type-System: sts:3pzOQ8jc-nE9lsSp-a51hPfv-xeYwyK0-evp1qcM-rR!COak#wedding-gong-mental -Check-SHA256: 25186fb00f21984f33ab242b5ec620df90dd34a7f8430372ab0254a8f7d33fe5 +Check-SHA256: 900a5ade96d01f877d275ff57968ed4153059bbaba3a0ca7b063bfa6edc4be2d 0s;XEQb$5EH9}!?WdefyeA22rmXX)ZV_yI}MH~YN>;K=mRmV)&;+=Xmp=8%{dOaKyPp>`{W+ev&_Ht^T vI2G1Jtsm#HCZ5u7Cwae0cHRI0000617UJ>0e1iJJu1QEX=%Xy>vn1>teUKtq)w3djjO=VIO}{ZUjP6H @@ -44,9 +44,9 @@ YK5Ib#!obbaONSb8~4rOj=Vh b$BgjYD771SWreSPh(|tRaI+OEjDs9byGuAHZ5UMXmdGNHD)b1N<}w!000641=6B0dz(d+*sZj++->l; -t}Y?Say-NZ(5a@eh#oRVFOJz}00000GyrpRX*x_=Q!#aTEoW*(Ic```MlDZcWpq_lYga8cax-;PLsK>_ +t}Y?Say-NZ(5a@eh#oRV-lrpH00000GyrpRX*x_=Q!#aTEoW*(Ic```MlDZcWpq_lYga8cax-;PLsK>_ VNqyvIaf7iEjUU=H+KO50RRFBMrC1ib#i5M3;+QNW^!R;bZKvHVQdIfbYX5}VRB>!00mM_VNqyvIaf7iEjUU=H+KO50RRFBMrC1ib#i5M6#xPVVs&zEVPb4$3TAR)V{~b6ZeeT) Q*>c&WMOh-1^@+8M?x|+C;$Ks(i%G%h4}Sf8vn;89aSG|t4s0*&BRFk%a^yrND0jb0t9t*cyH)xK+Rkw `Mu(V|7oQWGN(Z+AyvH&RuaL#D^138|7M^`NNc{jXEg#>2x#JO!0is)`buE3*f$s=7 diff --git a/src/rgb20/wrapper.rs b/src/rgb20/wrapper.rs index 7fa2736..09084f5 100644 --- a/src/rgb20/wrapper.rs +++ b/src/rgb20/wrapper.rs @@ -19,16 +19,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::HashMap; - use rgbstd::interface::{ - AmountChange, ContractIface, FungibleAllocation, IfaceClass, IfaceId, IfaceOp, IfaceWrapper, - OutpointFilter, RightsAllocation, + AssignmentsFilter, ContractIface, ContractOp, FungibleAllocation, IfaceClass, IfaceId, + IfaceWrapper, RightsAllocation, }; use rgbstd::invoice::{Amount, Precision}; use rgbstd::persistence::ContractStateRead; use rgbstd::stl::{AssetSpec, ContractTerms, Details}; -use rgbstd::{AssetTag, XWitnessId}; +use rgbstd::{AssetTag, ContractId, SchemaId, WitnessInfo, XWitnessId}; use strict_encoding::InvalidRString; use super::{Inflation, PrimaryIssue, Rgb20, Rgb20Info}; @@ -105,6 +103,17 @@ impl IfaceWrapper for Rgb20Wrapper { replaced: self.total_replaced_supply(), } } + + #[inline] + fn contract_id(&self) -> ContractId { self.0.contract_id() } + + #[inline] + fn schema_id(&self) -> SchemaId { self.0.state.schema_id() } + + #[inline] + fn witness_info(&self, witness_id: XWitnessId) -> Option { + self.0.witness_info(witness_id) + } } impl Rgb20Wrapper { @@ -183,7 +192,7 @@ impl Rgb20Wrapper { AssetSpec::from_strict_val_unchecked(strict_val) } - pub fn balance(&self, filter: impl OutpointFilter) -> Amount { + pub fn balance(&self, filter: impl AssignmentsFilter) -> Amount { self.allocations(filter) .map(|alloc| alloc.state) .sum::() @@ -191,7 +200,7 @@ impl Rgb20Wrapper { pub fn allocations<'c>( &'c self, - filter: impl OutpointFilter + 'c, + filter: impl AssignmentsFilter + 'c, ) -> impl Iterator + 'c { self.0 .fungible("assetOwner", filter) @@ -200,7 +209,7 @@ impl Rgb20Wrapper { pub fn inflation_allowance_allocations<'c>( &'c self, - filter: impl OutpointFilter + 'c, + filter: impl AssignmentsFilter + 'c, ) -> impl Iterator + 'c { self.0 .fungible("inflationAllowance", filter) @@ -209,7 +218,7 @@ impl Rgb20Wrapper { pub fn update_right<'c>( &'c self, - filter: impl OutpointFilter + 'c, + filter: impl AssignmentsFilter + 'c, ) -> impl Iterator + 'c { self.0 .rights("updateRight", filter) @@ -218,7 +227,7 @@ impl Rgb20Wrapper { pub fn burn_epoch<'c>( &'c self, - filter: impl OutpointFilter + 'c, + filter: impl AssignmentsFilter + 'c, ) -> impl Iterator + 'c { self.0 .rights("burnEpoch", filter) @@ -227,7 +236,7 @@ impl Rgb20Wrapper { pub fn burn_right<'c>( &'c self, - filter: impl OutpointFilter + 'c, + filter: impl AssignmentsFilter + 'c, ) -> impl Iterator + 'c { self.0 .rights("burnRight", filter) @@ -286,12 +295,11 @@ impl Rgb20Wrapper { pub fn total_supply(&self) -> Amount { self.total_issued_supply() - self.total_burned_supply() } - pub fn transfer_history( + pub fn history( &self, - outpoint_filter: impl OutpointFilter + Copy, - ) -> HashMap> { - self.0 - .fungible_ops("assetOwner", outpoint_filter) - .expect("state name is not correct") + filter_outpoints: impl AssignmentsFilter + Clone, + filter_witnesses: impl AssignmentsFilter + Clone, + ) -> Vec { + self.0.history(filter_outpoints, filter_witnesses) } } diff --git a/src/rgb21/wrapper.rs b/src/rgb21/wrapper.rs index cf38864..9cfb14b 100644 --- a/src/rgb21/wrapper.rs +++ b/src/rgb21/wrapper.rs @@ -20,11 +20,11 @@ // limitations under the License. use rgbstd::interface::{ - ContractIface, DataAllocation, IfaceClass, IfaceId, IfaceWrapper, OutpointFilter, + AssignmentsFilter, ContractIface, ContractOp, DataAllocation, IfaceClass, IfaceId, IfaceWrapper, }; use rgbstd::persistence::ContractStateRead; use rgbstd::stl::{bp_tx_stl, rgb_contract_stl, AssetSpec, ContractTerms}; -use rgbstd::Allocation; +use rgbstd::{Allocation, ContractId, SchemaId, WitnessInfo, XWitnessId}; use strict_types::stl::std_stl; use strict_types::{CompileError, LibBuilder, TypeLib}; @@ -72,6 +72,17 @@ impl IfaceWrapper for Rgb21Wrapper { } fn info(&self) -> Self::Info { todo!() } + + #[inline] + fn contract_id(&self) -> ContractId { self.0.contract_id() } + + #[inline] + fn schema_id(&self) -> SchemaId { self.0.state.schema_id() } + + #[inline] + fn witness_info(&self, witness_id: XWitnessId) -> Option { + self.0.witness_info(witness_id) + } } impl Rgb21Wrapper { @@ -114,10 +125,18 @@ impl Rgb21Wrapper { pub fn allocations<'c>( &'c self, - filter: impl OutpointFilter + 'c, + filter: impl AssignmentsFilter + 'c, ) -> impl Iterator + 'c { self.0 .data("assetOwner", filter) .expect("RGB21 interface requires `assetOwner` state") } + + pub fn history( + &self, + filter_outpoints: impl AssignmentsFilter + Clone, + filter_witnesses: impl AssignmentsFilter + Clone, + ) -> Vec { + self.0.history(filter_outpoints, filter_witnesses) + } } diff --git a/src/rgb25/wrapper.rs b/src/rgb25/wrapper.rs index 8f5b5ce..2bba10c 100644 --- a/src/rgb25/wrapper.rs +++ b/src/rgb25/wrapper.rs @@ -20,12 +20,12 @@ // limitations under the License. use rgbstd::interface::{ - ContractIface, FungibleAllocation, IfaceClass, IfaceId, IfaceWrapper, OutpointFilter, + AssignmentsFilter, ContractIface, FungibleAllocation, IfaceClass, IfaceId, IfaceWrapper, }; use rgbstd::invoice::{Amount, Precision}; use rgbstd::persistence::ContractStateRead; use rgbstd::stl::{ContractTerms, Details, Name}; -use rgbstd::AssetTag; +use rgbstd::{AssetTag, ContractId, SchemaId, WitnessInfo, XWitnessId}; use strict_encoding::InvalidRString; use super::{Issue, Rgb25, Rgb25Info}; @@ -55,6 +55,17 @@ impl IfaceWrapper for Rgb25Wrapper { } fn info(&self) -> Self::Info { todo!() } + + #[inline] + fn contract_id(&self) -> ContractId { self.0.contract_id() } + + #[inline] + fn schema_id(&self) -> SchemaId { self.0.state.schema_id() } + + #[inline] + fn witness_info(&self, witness_id: XWitnessId) -> Option { + self.0.witness_info(witness_id) + } } impl Rgb25Wrapper { @@ -105,7 +116,7 @@ impl Rgb25Wrapper { pub fn allocations<'c>( &'c self, - filter: impl OutpointFilter + 'c, + filter: impl AssignmentsFilter + 'c, ) -> impl Iterator + 'c { self.0 .fungible("assetOwner", filter)