diff --git a/Cargo.lock b/Cargo.lock index 2e4cc761..b0e27dd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aluvm" -version = "0.11.0-beta.2" +version = "0.11.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10be187b383247e1902aa5a415f76ffc9a04f197829c46b9ccb6da3582e394f" +checksum = "60bd5631720ae3b92182387baa647e34a45b56ea3e359fa756866a95a64e48f4" dependencies = [ "amplify", "baid58", @@ -23,9 +23,9 @@ dependencies = [ [[package]] name = "amplify" -version = "4.5.0" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8629db306c0bbeb0a402e2918bdcf0026b5ddb24c46460f3bf5410b350d98710" +checksum = "9e711289a6cb28171b4f0e6c8019c69ff9476050508dc082167575d458ff74d0" dependencies = [ "amplify_apfloat", "amplify_derive", @@ -34,21 +34,19 @@ dependencies = [ "ascii", "rand", "serde", - "serde_json", - "serde_yaml", "stringly_conversions", - "toml", "wasm-bindgen", ] [[package]] name = "amplify_apfloat" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5b7f29fad2a3def5dfbfed0da85b886eb927a18fe0296c06e39880b7a96db05" +checksum = "72e23f5ede99065fa6957a633498d2728d51016d61dae23b69c866112b7c61ee" dependencies = [ "amplify_num", "bitflags", + "wasm-bindgen", ] [[package]] @@ -65,9 +63,9 @@ dependencies = [ [[package]] name = "amplify_num" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9681187211554ab98f138ba159e90861b136c20afc680dcff2ba82d020721e27" +checksum = "04c009c5c4de814911b177e2ea59e4930bb918978ed3cce4900d846a6ceb0838" dependencies = [ "serde", "wasm-bindgen", @@ -144,12 +142,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - [[package]] name = "base85" version = "2.0.0" @@ -167,9 +159,9 @@ checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "blake3" @@ -196,7 +188,7 @@ dependencies = [ [[package]] name = "bp-consensus" version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#02b26aeccf66c1c5a92427cd05550e49fde7f5eb" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" dependencies = [ "amplify", "chrono", @@ -210,7 +202,7 @@ dependencies = [ [[package]] name = "bp-core" version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#02b26aeccf66c1c5a92427cd05550e49fde7f5eb" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" dependencies = [ "amplify", "bp-consensus", @@ -228,7 +220,7 @@ dependencies = [ [[package]] name = "bp-dbc" version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#02b26aeccf66c1c5a92427cd05550e49fde7f5eb" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" dependencies = [ "amplify", "base85", @@ -242,7 +234,7 @@ dependencies = [ [[package]] name = "bp-seals" version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#02b26aeccf66c1c5a92427cd05550e49fde7f5eb" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" dependencies = [ "amplify", "baid58", @@ -257,9 +249,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" [[package]] name = "byteorder" @@ -284,9 +276,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", @@ -298,9 +290,8 @@ dependencies = [ [[package]] name = "commit_encoding_derive" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00033f14d67c4169d588f085ea2faeb7b610cf03a74d42ea09eeba31abef2047" +version = "0.11.0-beta.3" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=layouts#d81288a7df7d52e5dfc4b2a17ad43780d6107cc4" dependencies = [ "amplify", "amplify_syn", @@ -312,8 +303,7 @@ dependencies = [ [[package]] name = "commit_verify" version = "0.11.0-beta.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e001679b9be6a5df24facdae179e6ba1cffb503c875d691eac024db8d0f8d1" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=layouts#d81288a7df7d52e5dfc4b2a17ad43780d6107cc4" dependencies = [ "amplify", "commit_encoding_derive", @@ -323,6 +313,7 @@ dependencies = [ "sha2", "strict_encoding", "strict_types", + "vesper-lang", ] [[package]] @@ -349,9 +340,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -400,9 +391,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -434,9 +425,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -457,9 +448,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown", @@ -473,9 +464,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -488,9 +479,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "log" @@ -522,9 +513,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -549,18 +540,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -640,9 +631,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "secp256k1" -version = "0.28.1" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "rand", "secp256k1-sys", @@ -683,29 +674,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.49", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -733,9 +724,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.29" +version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" +checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ "indexmap", "itoa", @@ -766,9 +757,9 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "2.6.2" +version = "2.7.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76decc8ac190a56ba7857c023b69ed52b781ed974c5a181eac62cdbfc99521" +checksum = "a12eaa6985afa31deacc86cdc4935a36960ae09131a1f4e1db430127ebc4f05d" dependencies = [ "amplify", "half", @@ -778,9 +769,9 @@ dependencies = [ [[package]] name = "strict_encoding_derive" -version = "2.0.1" +version = "2.7.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37064ec285e2a633465eb525c8698eea51373dee889fe310e0d32df8343e7f4f" +checksum = "3b1b064a62618a785e6d8f4df13d905dc335b56400d48f9b4f8b12dcba82b260" dependencies = [ "amplify_syn", "heck", @@ -791,13 +782,12 @@ dependencies = [ [[package]] name = "strict_types" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d10cc45e67d452cfe0d87d4714c3250190d97479af3502bbd823651bfe0f505f" +version = "2.7.0-beta.1" +source = "git+https://github.com/strict-types/strict-types?branch=vesper#266f2d8b6e015522e9e7e72af663af9c9d3c7d2c" dependencies = [ "amplify", "baid58", - "base64", + "base85", "half", "indexmap", "serde", @@ -806,6 +796,7 @@ dependencies = [ "sha2", "strict_encoding", "toml", + "vesper-lang", ] [[package]] @@ -831,9 +822,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.43" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ "proc-macro2", "quote", @@ -842,29 +833,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.52" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a48fd946b02c0a526b2e9481c8e2a17755e47039164a86c4070446e3a4614d" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.52" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7fbe9b594d6568a6a1443250a7e67d80b74e1e96f6d1715e1e21cc1888291d3" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.49", ] [[package]] name = "toml" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", @@ -883,9 +874,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" dependencies = [ "indexmap", "serde", @@ -918,6 +909,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vesper-lang" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f72ebd3b32f16ee8ace2bd3058c2bfa0f4820992bd4ea86e73ba228bb13dd2b0" +dependencies = [ + "amplify", + "strict_encoding", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -926,9 +927,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -936,24 +937,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.49", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -963,9 +964,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -973,28 +974,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.49", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "wasm-bindgen-test" -version = "0.3.39" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cf9242c0d27999b831eae4767b2a146feb0b27d332d553e605864acd2afd403" +checksum = "143ddeb4f833e2ed0d252e618986e18bfc7b0e52f2d28d77d05b2f045dd8eb61" dependencies = [ "console_error_panic_hook", "js-sys", @@ -1006,20 +1007,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.39" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794645f5408c9a039fd09f4d113cdfb2e7eba5ff1956b07bcf701cf4b394fe89" +checksum = "a5211b7550606857312bba1d978a8ec75692eae187becc5e680444fffc5e6f89" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.49", ] [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -1027,18 +1028,18 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1051,51 +1052,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.31" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c" +checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 1b0289f6..187dd164 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,10 +22,10 @@ name = "rgbcore-stl" required-features = ["stl"] [dependencies] -amplify = { version = "~4.5.0", features = ["rand"] } -strict_encoding = "~2.6.2" -strict_types = "~1.6.3" -aluvm = { version = "~0.11.0-beta.2", features = ["std"] } +amplify = { version = "~4.6.0", features = ["rand"] } +strict_encoding = "~2.7.0-beta.1" +strict_types = "~2.7.0-beta.1" +aluvm = { version = "~0.11.0-beta.3", features = ["std"] } commit_verify = { version = "~0.11.0-beta.3", features = ["rand", "derive"] } single_use_seals = "~0.11.0-beta.3" bp-core = { version = "~0.11.0-beta.3" } @@ -62,4 +62,9 @@ wasm-bindgen-test = "0.3" features = [ "all" ] [patch.crates-io] +strict_types = { git = "https://github.com/strict-types/strict-types", branch = "vesper" } +commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "layouts" } +bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } +bp-dbc = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } +bp-seals = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } bp-core = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } diff --git a/doc/Commitments.md b/doc/Commitments.md new file mode 100644 index 00000000..9eb90d18 --- /dev/null +++ b/doc/Commitments.md @@ -0,0 +1,275 @@ +# RGB consensus commitments + +RGB commits to client-side validated data using dedicated serialization +mechanism, implemented via `CommitEncode` trait. Depending on the specific data, +the mechanism can be is partially or completely different from strict +serialization, used for data storage. For instance, all data which may be +confidential must be concealed, such that parties having no access to the +original non-confidential values still be able to generate the same +deterministic commitment value and verify single-use seals. + +Any final consensus commitment is a SHA256 tagged hash. The tagging is performed +according to BIP-340, when a commitment-specific fixed ASCII string value is +first hashed with a single SHA256 hash, and the resulting 32 bytes are feed into +a new SHA256 hasher twice before any actual data. + + +## Generating commitment id + +The commitment mechanism uses traits from [`commit_verify`] crate, specifically +its `id.rs`and `merkle.rs` modules. + +### `CommitEncode` trait + +It is the main trait which must be implemented for each type requiring a +dedicated commitment id. + +The trait implementation can be done either with derive macro +`#[derive(CommitEncode)]` or by providing a manual implementation. + +The derive macro takes two arguments: `strategy` and `id`: +- `id` must specify a resulting commitment id type, i.e. type wrapping 32-byte + tagged SHA256 hash, implementing `CommitmentId` trait (the implementation + provides a tag for the hasher - see trait details below). The type must also + provide a converting constructor from `coommit_verify::Sha256` hasher. +- `strategy` specifies a workflow used to feed the type data to the SHA256 + tagged hasher: + * `strategy = strict`: the hasher receive strict-serialized type; + * `strategy = conceal`: the type data are first concealed, and only then are + strict-serialized into the hasher. + +Manual `CommitEncode` implementation must be provided only when the commitment +procedure is custom and can't be implemented using any of the strategies, for +instance when a collection must be merklized (see on merklization below). + +NB: you should never call methods of `CommitEncode` trait directly, and instead +use `CommitId` trait, which is automatically implemented for + +### `CommitmentId` trait + +Each consensus commitment must have a dedicated Rust newtype, which wraps over +inner `Bytes32` - a 32-byte resulting tagged hash value. The type is marked as +a consensus commitment by implementing `CommitmentId` trait for it, which +requires to provide a tag string values for the tagged hash. + +The hash tags are defined using URN strings in form of +`urn:::#`, where `` stands for the organization, +`` is the name of the protocol, `` is the data type name +producing the commitment, and `` is a `YYYY-MM-DD` string for the latest +revision of the commitment layout. + +### `CommitId` trait + +This trait is automatically implemented for all types which have `CommitEncode` +implementation. You can't implement this trait manually and just need to call +its `CommitId::commit_id()` method to produce the final commitment (i.e. bytes +of the tagged hash in form of `CommitmentId`-implementing type). + +The trait also provides `CommitId::commitment_layout()` method, which can be +used for automatically generating the documentation on the commitment workflow. + +## Merklization procedure + +Merlization procedure uses traits and data types from `merkle.rs` module of +`commit_verify` crate. It commits to the tree parameters, such as number of +elements, depth of the tree, as well as depth of each node; and uses tagged +SHA256, like the rest of the commitment procedures used here. + +The main data type, related to the merklization, is `MerkleHash`: it is a tagged +hash (using `urn:ubideco:merkle:node#2024-01-31` tag) representing node at any +position of the tree: leaves, branch nodes and merkle tree root. `MerkleHash` +can be produced in the following ways: +- as a result of merklziation procedure, when it represents Merkle tree root; +- as a root of empty Merkle tree (i.e. collection having 0 elements), by calling + `MerkleHash::void(0u8, 0u32)`, +- as a Merkle leaf, by implementing `CommitEncode` on some type and setting + commitment id to be `MerkleHash`. + +In all of the above cases the hash commits to the tree parameters, which makes +it safe to use the same type for leaves, branches and root nodes. Specifically, +it uses an intermediate structure `MerkleNode`, which is filled with information +on (see [`MerkleNode.vesper`](../stl/MerkleNode.vesper) for details): +- type of node branching (no branches, one branch or two branches), +- depth of the node, as 8-bit unsigned integer, +- width of the tree at its base, as a 256-bit LE unsigned integer, +- node hashes of the branches; if one or both branches are absent, they are + replaced with 32 bytes of repeated 0xFF value. + +A collection in form of a list (Rust `Vec`) or an ordered set of unique +non-repeating items (Rust `BTreeSet`), if wrapped into a confinement (i.e. has +type-defined bounds on the minimum or maximum number of items) can be +automatically merklized when passed as an argument to `MerkleHash::merklize()` +call. The API puts the following requirements on the collection: either +- maximum number of elements must be either 0xFF or 0xFFFF **and** each + collection element must implement `CommitEncode` trait with target id set to + `MerkleHash`, +- or there is a manual implementation of `MerkleLeaves` trait. + +```mermaid +flowchart BT + subgraph Merklization + direction LR + subgraph MerkleNode + branching + depth + width + node1 + node2 + end + MerkleNode -- encode to\ntagged hasher --> MerkleHash + end + MerkleHash ---> MerkleNode + MerkleHash === Root + Leaf -- commit_id ----> MerkleHash +``` + + +## Specific RGB consensus commitments + +Currently, RGB has three consensus commitments: schema, operation and bundle. +Operation commitment for genesis has a second representation, named contract id, +which uses reversed-byte encoding and a special string serialization, but is +generated with the same procedure as the operation commitment. + +The commitment ids can be generated with either type-specific methods +(`schema_id()` for schema, `bundle_id()` for state transition bundle and +`id()` for any operation) or `CommitId::commit_id()` method, which must provide +the equal result. + +Here are more details on each type of the commitments: + +| Commitment ID | Produced by | Procedure | Tag URN suffix(1) | +|----------------------|--------------------------------------|------------------------------------------------------------------------------------------------|-------------------------------| +| `SchemaID` | `RootSchema`, `SubSchema` | strict serialization | `rgb:schema#2024-02-03` | +| `OpId`, `ContractId` | `Genesis`, `Transition`, `Extension` | nested commitments with concealing, merklization etc via intermediate `OpCommitment` structure | `rgb:operation#2024-02-03` | +| `BundleId` | `TransitionBundle` | conceal and partial strict serialization | `rgb:bundle#2024-02-03` | +| `SecretSeal` | `BlindSeal` | strict serialization | `seals:secret#2024-02-03` | +| `ConcealedData` | `RevealedData` | strict serialization | `rgb:state-data#2024-02-12` | +| `ConcealedAttach` | `RevealedAttach` | strict serialization | `rgb:state-attach#2024-02-12` | + +(1): "URN suffix" is a part which follows "urn:lnp-bp:" prefix. + +The last three commitments coincide to be a concealed form of BP seals and RGB state. +These commitments produced by either calling `commit_id` or `conceal` methods of +revealed seal (`BlindSeal`) and state types (`RevealedData` and `RevealedAttach`). + +Additionally to these types there are two other commitment ids used internally +by merklization and strict encoding procedures: `MerkleHash` (discussed in the +Merklization section above) and `StrictHash` from `commit_verify` crate: + +| Commitment ID | Tag URN suffix | +|-------------------|--------------------------------------------------| +| `MerkleHash` | `urn:ubideco:merkle:node#2024-01-31` | +| `StrictHash` | `urn:ubideco:strict-types:value-hash#2024-02-10` | +| `mpc::Commitment` | `urn:ubideco:mpc:commitment#2024-01-31` | + +`StrictHash` can be produced as a result of serialization of any +strict-encodable data; for instance, it is used in compactifying collections +into a single hash field in the process of computing operation ids (described +below). + +Finally, in `commit_verify::mpc`, multi-protocol commitment protocol +implementation, we have a type named `mpc::Commitment`, which is a commitment +to a root of the MPC tree (i.e. the tree's root `MerkleHash` is tag-hashed once +again to produce the final commitment value). + + +### Schema ID + +Schema id, represented by `SchemaId` data type, is produced from `Schema` type +via strict serialization of all the schema data using +`urn:lnp-bp:rgb:schema#2024-02-03` hash tag. No conceal or merklization +procedures are applied; i.e. the commitment id is the same as hashing serialized +schema with the given tag. The full description of how schema data are +serialized into the hasher can be found in [`Schema.vesper`]( +../stl/Schema.vesper) file, which is automatically generated from the RGB rust +code. + +### Operation ID and Contract ID + +Operation id is represented by a `OpId` type and produced for `Genesis`, +`Transition` and `Extension` types via custom algorithm, which first creates a +dedicated `OpCommitment` structure, and strict-serializes it to hasher, +initialized with `urn:lnp-bp:rgb:operation#2024-02-03` hash tag. + +The `OpCommitment` by itself consists of a sub-commitments to blocks of the +operation data, where each sub-commitment is created with a custom procedure. +For instance, operation global state, inputs and assignments are merklized, +such that a succinct proofs of some specific state or input inclusion in RGB +operation can be produced and used in smart contracts. Additionally to that, +assignments are concealed before the merklization, and range proofs are +removed from the commitment, such that an aggregation of the historical proofs +can be applied without changing the operation ids. + +To ensure succinctness, other types of collections, such as redeemed and +defined valencies and list of alternate layer 1 in genesis are not merklized +and strict-serialized producing `StrictHash`, which participates in the final +`OpCommitment` structure. + +```mermaid +flowchart LR + subgraph "Common data" + Ffv --> OpCommitment + TypeCommitment --> OpCommitment + Metadata -- StrictHash --> OpCommitment + Globals -- Merklize --> OpCommitment + Inputs -- Merklize --> OpCommitment + Assignments -- "Conceal\n + Merklize" --> OpCommitment + Redeemed -- StrictHash --> OpCommitment + Valencies -- StrictHash --> OpCommitment + end + + subgraph "Genesis" + schemaId --> BaseCommitment + testnet --> BaseCommitment + altLayers1 -- StrictHash --> BaseCommitment + end + + subgraph "Transition" + tcid[contractId] --> TypeCommitment + transitionType --> TypeCommitment + end + + subgraph "Extension" + ecid[contractId] --> TypeCommitment + extensionType --> TypeCommitment + end + + BaseCommitment --> TypeCommitment + + OpCommitment -- hash --> OpId + OpId -- "reverse bytes\n(genesis only)" --> ContractId +``` + +Additionally to `OpId`, genesis produces `ContractId`, which is made out of the +genesis `OpId` by reversing byte order and using Base58 encoding. + +### Bundle ID + +Bundle id is a unique identifier of state transition bundle, directly used in +constructing multi-protocol commitment tree. Bundle id commits to operation ids +for the participating state transitions and maps of the witness transaction +input to the operation ids. For this purpose, the commitment is created by +strict-encoding `input_map` field of `TransitionBundle` into the hasher, +initialized with tag `urn:lnp-bp:rgb:bundle#2024-02-03`. Input map is serialized +first as a 16-bit little-endian integer specifying the number of the items in +the map, followed by the sequence of pairs of input number (32-bit LE value) +and `OpId` (32-bytes). + +```mermaid +flowchart TD + subgraph Discarded + id((" ")) + end + + subgraph TransitionBundle + inputMap + knownTransitions + end + + inputMap -- encode \n hash --> BundleId + knownTransitions --x Discarded +``` + + +[`commit_verify`]: https://docs.rs/commit_verify diff --git a/src/bin/rgbcore-stl.rs b/src/bin/rgbcore-stl.rs index 4194823a..b3ecb9d5 100644 --- a/src/bin/rgbcore-stl.rs +++ b/src/bin/rgbcore-stl.rs @@ -20,23 +20,108 @@ // See the License for the specific language governing permissions and // limitations under the License. +use std::fs; +use std::io::Write; + +use aluvm::stl::aluvm_stl; +use bp::stl::bp_core_stl; +use commit_verify::stl::commit_verify_stl; +use commit_verify::CommitmentLayout; +use rgb::stl::bp_tx_stl; +use rgb::{SubSchema, Transition}; +use strict_types::stl::{std_stl, strict_types_stl}; use strict_types::typelib::parse_args; +use strict_types::SystemBuilder; fn main() { let (format, dir) = parse_args(); - rgb::stl::rgb_core_stl() - .serialize( - format, - dir, - "0.1.0", - Some( - " + let rgb = rgb::stl::rgb_core_stl(); + + rgb.serialize( + format, + dir.as_ref(), + "0.1.0", + Some( + " Description: Consensus layer for RGB smart contracts Author: Dr Maxim Orlovsky Copyright (C) 2023-2024 LNP/BP Standards Association. All rights reserved. License: Apache-2.0", - ), - ) - .expect("unable to write to the file"); + ), + ) + .expect("unable to write to the file"); + + let std = std_stl(); + let tx = bp_tx_stl(); + let bp = bp_core_stl(); + let cv = commit_verify_stl(); + let st = strict_types_stl(); + let vm = aluvm_stl(); + + let sys = SystemBuilder::new() + .import(rgb) + .unwrap() + .import(vm) + .unwrap() + .import(bp) + .unwrap() + .import(tx) + .unwrap() + .import(cv) + .unwrap() + .import(st) + .unwrap() + .import(std) + .unwrap() + .finalize() + .expect("not all libraries present"); + + let dir = dir.unwrap_or_else(|| ".".to_owned()); + + let mut file = fs::File::create(format!("{dir}/Schema.vesper")).unwrap(); + writeln!( + file, + "{{- + Description: RGB Schema + Author: Dr Maxim Orlovsky + Copyright (C) 2024 LNP/BP Standards Association. All rights reserved. + License: Apache-2.0 +-}} + +Seals vesper lexicon=types+commitments +" + ) + .unwrap(); + let layout = SubSchema::commitment_layout(); + writeln!(file, "{layout}").unwrap(); + let tt = sys.type_tree("RGB.Schema").unwrap(); + writeln!(file, "{tt}").unwrap(); + + let mut file = fs::File::create(format!("{dir}/Transition.vesper")).unwrap(); + writeln!( + file, + "{{- + Description: RGB Transition + Author: Dr Maxim Orlovsky + Copyright (C) 2024 LNP/BP Standards Association. All rights reserved. + License: Apache-2.0 +-}} + +Seals vesper lexicon=types+commitments +" + ) + .unwrap(); + let layout = Transition::commitment_layout(); + writeln!(file, "{layout}").unwrap(); + let tt = sys.type_tree("RGB.OpCommitment").unwrap(); + writeln!(file, "{tt}").unwrap(); + let tt = sys.type_tree("RGB.Transition").unwrap(); + writeln!(file, "{tt}").unwrap(); + + let tt = sys.type_tree("RGB.AnchoredBundle").unwrap(); + fs::write(format!("{dir}/AnchoredBundle.vesper",), format!("{tt}")).unwrap(); + + let tt = sys.type_tree("CommitVerify.MerkleNode").unwrap(); + fs::write(format!("{dir}/MerkleNode.vesper",), format!("{tt}")).unwrap(); } diff --git a/src/contract/anchor.rs b/src/contract/anchor.rs index 5a201620..fc459e1f 100644 --- a/src/contract/anchor.rs +++ b/src/contract/anchor.rs @@ -49,6 +49,14 @@ impl AnchoredBundle { pub fn bundle_id(&self) -> BundleId { self.bundle.bundle_id() } } +impl Ord for AnchoredBundle { + fn cmp(&self, other: &Self) -> Ordering { self.bundle_id().cmp(&other.bundle_id()) } +} + +impl PartialOrd for AnchoredBundle { + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } +} + pub type XAnchor

= XChain>; impl XAnchor

{ diff --git a/src/contract/assignments.rs b/src/contract/assignments.rs index 79ed6023..acd9b378 100644 --- a/src/contract/assignments.rs +++ b/src/contract/assignments.rs @@ -22,14 +22,12 @@ use core::cmp::Ordering; use core::fmt::Debug; -use std::collections::BTreeSet; +use std::collections::{btree_map, BTreeSet}; use std::hash::{Hash, Hasher}; -use std::{io, vec}; use amplify::confinement::{Confined, SmallVec, TinyOrdMap}; -use commit_verify::merkle::{MerkleLeaves, MerkleNode}; -use commit_verify::{CommitEncode, CommitStrategy, CommitmentId, Conceal}; -use strict_encoding::{StrictDumb, StrictEncode, StrictWriter}; +use commit_verify::Conceal; +use strict_encoding::{StrictDumb, StrictEncode}; use super::ExposedState; use crate::contract::seal::GenesisSeal; @@ -231,40 +229,6 @@ where Self: Clone } } -// We do not derive here since we omit serialization of the tag: all data are -// concealed, thus no tag is needed. -impl CommitEncode for Assign -where Self: Clone -{ - fn commit_encode(&self, e: &mut impl io::Write) { - match self { - Assign::Confidential { seal, state } => { - seal.commit_encode(e); - state.commit_encode(e); - } - Assign::ConfidentialState { seal, state } => { - seal.conceal().commit_encode(e); - state.commit_encode(e); - } - Assign::Revealed { seal, state } => { - seal.conceal().commit_encode(e); - state.commit_encode(e); - } - Assign::ConfidentialSeal { seal, state } => { - seal.commit_encode(e); - state.commit_encode(e); - } - } - } -} - -impl CommitmentId for Assign -where Self: Clone -{ - const TAG: [u8; 32] = *b"urn:lnpbp:rgb:owned-state:v1#23A"; - type Id = MerkleNode; -} - impl Assign { pub fn transmutate_seals(&self) -> Assign { match self { @@ -553,38 +517,6 @@ impl TypedAssigns { } } -impl CommitStrategy for TypedAssigns { - type Strategy = - commit_verify::strategies::Merklize<{ u128::from_be_bytes(*b"rgb:state:owned*") }>; -} - -impl MerkleLeaves for TypedAssigns { - type Leaf = MerkleNode; - type LeafIter<'tmp> = vec::IntoIter where Self: 'tmp; - - fn merkle_leaves(&self) -> Self::LeafIter<'_> { - match self { - TypedAssigns::Declarative(vec) => vec - .iter() - .map(AssignRights::commitment_id) - .collect::>(), - TypedAssigns::Fungible(vec) => vec - .iter() - .map(AssignFungible::commitment_id) - .collect::>(), - TypedAssigns::Structured(vec) => vec - .iter() - .map(AssignData::commitment_id) - .collect::>(), - TypedAssigns::Attachment(vec) => vec - .iter() - .map(AssignAttach::commitment_id) - .collect::>(), - } - .into_iter() - } -} - impl TypedAssigns { pub fn transmutate_seals(&self) -> TypedAssigns { match self { @@ -629,18 +561,6 @@ impl Default for Assignments { fn default() -> Self { Self(empty!()) } } -impl CommitEncode for Assignments { - fn commit_encode(&self, mut e: &mut impl io::Write) { - let w = StrictWriter::with(u32::MAX as usize, &mut e); - self.0.len_u8().strict_encode(w).ok(); - for (ty, state) in &self.0 { - let w = StrictWriter::with(u32::MAX as usize, &mut e); - ty.strict_encode(w).ok(); - state.commit_encode(e); - } - } -} - impl Assignments { pub fn transmutate_seals(&self) -> Assignments { Assignments( @@ -650,6 +570,13 @@ impl Assignments { } } +impl IntoIterator for Assignments { + type Item = (AssignmentType, TypedAssigns); + type IntoIter = btree_map::IntoIter>; + + fn into_iter(self) -> Self::IntoIter { self.0.into_iter() } +} + #[derive(Copy, Clone, Eq, PartialEq, Debug, From)] pub enum AssignmentsRef<'op> { #[from] @@ -669,6 +596,13 @@ impl AssignmentsRef<'_> { pub fn is_empty(&self) -> bool { self.len() == 0 } + pub fn flat(&self) -> Assignments { + match *self { + AssignmentsRef::Genesis(a) => a.transmutate_seals(), + AssignmentsRef::Graph(a) => a.clone(), + } + } + pub fn types(&self) -> BTreeSet { match self { AssignmentsRef::Genesis(a) => a.keys().copied().collect(), diff --git a/src/contract/attachment.rs b/src/contract/attachment.rs index 359b5c9e..0f0db2c7 100644 --- a/src/contract/attachment.rs +++ b/src/contract/attachment.rs @@ -25,11 +25,11 @@ use std::str::FromStr; use amplify::{ByteArray, Bytes32}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; use bp::secp256k1::rand::{random, Rng, RngCore}; -use commit_verify::{CommitVerify, Conceal, StrictEncodedProtocol}; +use commit_verify::{CommitId, CommitmentId, Conceal, DigestExt, Sha256}; use strict_encoding::StrictEncode; use super::{ConfidentialState, ExposedState}; -use crate::{MediaType, StateCommitment, StateData, StateType, LIB_NAME_RGB}; +use crate::{ConcealedState, MediaType, RevealedState, StateType, LIB_NAME_RGB}; /// Unique data attachment identifier #[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, From)] @@ -68,7 +68,7 @@ impl AttachId { #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] #[derive(CommitEncode)] -#[commit_encode(conceal, strategy = strict)] +#[commit_encode(strategy = strict, id = ConcealedAttach)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -112,13 +112,13 @@ impl RevealedAttach { impl ExposedState for RevealedAttach { type Confidential = ConcealedAttach; fn state_type(&self) -> StateType { StateType::Attachment } - fn state_data(&self) -> StateData { StateData::Attachment(self.clone()) } + fn state_data(&self) -> RevealedState { RevealedState::Attachment(self.clone()) } } impl Conceal for RevealedAttach { type Concealed = ConcealedAttach; - fn conceal(&self) -> Self::Concealed { ConcealedAttach::commit(self) } + fn conceal(&self) -> Self::Concealed { self.commit_id() } } /// Confidential version of an attachment information. @@ -128,8 +128,6 @@ impl Conceal for RevealedAttach { #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -143,11 +141,15 @@ pub struct ConcealedAttach( impl ConfidentialState for ConcealedAttach { fn state_type(&self) -> StateType { StateType::Attachment } - fn state_commitment(&self) -> StateCommitment { StateCommitment::Attachment(*self) } + fn state_commitment(&self) -> ConcealedState { ConcealedState::Attachment(*self) } +} + +impl From for ConcealedAttach { + fn from(hasher: Sha256) -> Self { hasher.finish().into() } } -impl CommitVerify for ConcealedAttach { - fn commit(revealed: &RevealedAttach) -> Self { Bytes32::commit(revealed).into() } +impl CommitmentId for ConcealedAttach { + const TAG: &'static str = "urn:lnp-bp:rgb:state-attach#2024-02-12"; } #[cfg(test)] diff --git a/src/contract/bundle.rs b/src/contract/bundle.rs index 03053053..bfb4582e 100644 --- a/src/contract/bundle.rs +++ b/src/contract/bundle.rs @@ -20,17 +20,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::BTreeMap; -use std::io::Write; +use std::collections::{btree_map, BTreeMap}; -use amplify::confinement::{Confined, U16}; +use amplify::confinement::{Confined, U16 as U16MAX}; use amplify::{Bytes32, Wrapper}; use bp::Vout; -use commit_verify::{mpc, CommitEncode, CommitmentId}; -use strict_encoding::{StrictDumb, StrictEncode, StrictWriter}; +use commit_verify::{mpc, CommitEncode, CommitEngine, CommitId, CommitmentId, DigestExt, Sha256}; +use strict_encoding::{StrictDumb, StrictEncode}; -use super::OpId; -use crate::{Transition, LIB_NAME_RGB}; +use crate::{OpId, Transition, LIB_NAME_RGB}; pub type Vin = Vout; @@ -51,6 +49,14 @@ pub struct BundleId( Bytes32, ); +impl From for BundleId { + fn from(hasher: Sha256) -> Self { hasher.finish().into() } +} + +impl CommitmentId for BundleId { + const TAG: &'static str = "urn:lnp-bp:rgb:bundle#2024-02-03"; +} + impl From for mpc::Message { fn from(id: BundleId) -> Self { mpc::Message::from_inner(id.into_inner()) } } @@ -59,6 +65,40 @@ impl From for BundleId { fn from(id: mpc::Message) -> Self { BundleId(id.into_inner()) } } +#[derive(Wrapper, WrapperMut, Clone, PartialEq, Eq, Hash, Debug, From)] +#[wrapper(Deref)] +#[wrapper_mut(DerefMut)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) +)] +pub struct InputMap(Confined, 1, U16MAX>); + +impl StrictDumb for InputMap { + fn strict_dumb() -> Self { Self(confined_bmap!(strict_dumb!() => strict_dumb!())) } +} + +impl InputMap { + pub fn with(input: Vin, id: OpId) -> Self { InputMap(Confined::with((input, id))) } +} + +impl IntoIterator for InputMap { + type Item = (Vin, OpId); + type IntoIter = btree_map::IntoIter; + + fn into_iter(self) -> Self::IntoIter { self.0.into_iter() } +} + +impl<'a> IntoIterator for &'a InputMap { + type Item = (&'a Vin, &'a OpId); + type IntoIter = btree_map::Iter<'a, Vin, OpId>; + + fn into_iter(self) -> Self::IntoIter { self.0.iter() } +} + #[derive(Clone, PartialEq, Eq, Debug, From)] #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] @@ -68,31 +108,25 @@ impl From for BundleId { serde(crate = "serde_crate", rename_all = "camelCase") )] pub struct TransitionBundle { - pub input_map: Confined, 1, U16>, - pub known_transitions: Confined, 1, U16>, + pub input_map: InputMap, + pub known_transitions: Confined, 1, U16MAX>, } impl CommitEncode for TransitionBundle { - fn commit_encode(&self, e: &mut impl Write) { - let w = StrictWriter::with(u32::MAX as usize, e); - self.input_map.strict_encode(w).ok(); - } -} + type CommitmentId = BundleId; -impl CommitmentId for TransitionBundle { - const TAG: [u8; 32] = *b"urn:lnpbp:rgb:bundle:v1#20230306"; - type Id = BundleId; + fn commit_encode(&self, e: &mut CommitEngine) { e.commit_to_serialized(&self.input_map); } } impl StrictDumb for TransitionBundle { fn strict_dumb() -> Self { Self { - input_map: confined_bmap! { strict_dumb!() => strict_dumb!() }, + input_map: strict_dumb!(), known_transitions: confined_bmap! { strict_dumb!() => strict_dumb!() }, } } } impl TransitionBundle { - pub fn bundle_id(&self) -> BundleId { self.commitment_id() } + pub fn bundle_id(&self) -> BundleId { self.commit_id() } } diff --git a/src/contract/commit.rs b/src/contract/commit.rs new file mode 100644 index 00000000..796615e4 --- /dev/null +++ b/src/contract/commit.rs @@ -0,0 +1,431 @@ +// RGB Core Library: consensus layer for RGB smart contracts. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Written in 2019-2024 by +// Dr Maxim Orlovsky +// +// Copyright (C) 2019-2024 LNP/BP Standards Association. All rights reserved. +// Copyright (C) 2019-2024 Dr Maxim Orlovsky. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use std::collections::BTreeSet; +use std::fmt::{Display, Formatter}; +use std::str::FromStr; +use std::{fmt, vec}; + +use amplify::confinement::{Confined, MediumOrdMap, U16 as U16MAX}; +use amplify::hex::{FromHex, ToHex}; +use amplify::num::u256; +use amplify::{hex, ByteArray, Bytes32, FromSliceError, Wrapper}; +use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32CHECKSUM}; +use commit_verify::{ + mpc, CommitEncode, CommitEngine, CommitId, CommitmentId, Conceal, DigestExt, MerkleHash, + MerkleLeaves, Sha256, StrictHash, +}; +use strict_encoding::StrictDumb; + +use crate::{ + Assign, AssignmentType, Assignments, BundleId, ConcealedAttach, ConcealedData, ConcealedState, + ConfidentialState, ExposedSeal, ExposedState, Extension, ExtensionType, Ffv, Genesis, + GlobalState, GlobalStateType, Operation, PedersenCommitment, Redeemed, SchemaId, SecretSeal, + Transition, TransitionBundle, TransitionType, TypedAssigns, XChain, LIB_NAME_RGB, +}; + +/// Unique contract identifier equivalent to the contract genesis commitment +#[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, From)] +#[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) +)] +pub struct ContractId( + #[from] + #[from([u8; 32])] + Bytes32, +); + +impl PartialEq for ContractId { + fn eq(&self, other: &OpId) -> bool { self.to_byte_array() == other.to_byte_array() } +} +impl PartialEq for OpId { + fn eq(&self, other: &ContractId) -> bool { self.to_byte_array() == other.to_byte_array() } +} + +impl ContractId { + pub fn copy_from_slice(slice: impl AsRef<[u8]>) -> Result { + Bytes32::copy_from_slice(slice).map(Self) + } +} + +impl ToBaid58<32> for ContractId { + const HRI: &'static str = "rgb"; + const CHUNKING: Option = CHUNKING_32CHECKSUM; + fn to_baid58_payload(&self) -> [u8; 32] { self.to_byte_array() } + fn to_baid58_string(&self) -> String { self.to_string() } +} +impl FromBaid58<32> for ContractId {} +impl Display for ContractId { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + if f.alternate() { + write!(f, "{::^}", self.to_baid58()) + } else { + write!(f, "{::^.3}", self.to_baid58()) + } + } +} +impl FromStr for ContractId { + type Err = Baid58ParseError; + fn from_str(s: &str) -> Result { + Self::from_baid58_maybe_chunked_str(s, ':', '#') + } +} + +impl From for ContractId { + fn from(id: mpc::ProtocolId) -> Self { ContractId(id.into_inner()) } +} + +impl From for mpc::ProtocolId { + fn from(id: ContractId) -> Self { mpc::ProtocolId::from_inner(id.into_inner()) } +} + +/// Unique operation (genesis, extensions & state transition) identifier +/// equivalent to the commitment hash +#[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, From)] +#[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] +#[display(Self::to_hex)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) +)] +pub struct OpId( + #[from] + #[from([u8; 32])] + Bytes32, +); + +impl From for OpId { + fn from(hasher: Sha256) -> Self { hasher.finish().into() } +} + +impl CommitmentId for OpId { + const TAG: &'static str = "urn:lnp-bp:rgb:operation#2024-02-03"; +} + +impl FromStr for OpId { + type Err = hex::Error; + fn from_str(s: &str) -> Result { Self::from_hex(s) } +} + +impl OpId { + pub fn copy_from_slice(slice: impl AsRef<[u8]>) -> Result { + Bytes32::copy_from_slice(slice).map(Self) + } +} + +/// Hash committing to all data which are disclosed by a contract or some part +/// of it (operation, bundle, consignment, disclosure). +#[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, From)] +#[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] +#[display(Self::to_hex)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) +)] +pub struct DiscloseHash( + #[from] + #[from([u8; 32])] + Bytes32, +); + +impl From for DiscloseHash { + fn from(hasher: Sha256) -> Self { hasher.finish().into() } +} + +impl CommitmentId for DiscloseHash { + const TAG: &'static str = "urn:lnp-bp:rgb:disclose#2024-02-16"; +} + +impl FromStr for DiscloseHash { + type Err = hex::Error; + fn from_str(s: &str) -> Result { Self::from_hex(s) } +} + +impl DiscloseHash { + pub fn copy_from_slice(slice: impl AsRef<[u8]>) -> Result { + Bytes32::copy_from_slice(slice).map(Self) + } +} + +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +pub struct AssignmentIndex { + pub ty: AssignmentType, + pub pos: u16, +} + +impl AssignmentIndex { + pub fn new(ty: AssignmentType, pos: u16) -> Self { AssignmentIndex { ty, pos } } +} + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[derive(CommitEncode)] +#[commit_encode(strategy = strict, id = DiscloseHash)] +pub struct OpDisclose { + pub id: OpId, + pub seals: MediumOrdMap>, + pub fungible: MediumOrdMap, + pub data: MediumOrdMap, + pub attach: MediumOrdMap, +} + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[derive(CommitEncode)] +#[commit_encode(strategy = strict, id = DiscloseHash)] +pub struct BundleDisclosure { + pub id: BundleId, + pub known_transitions: Confined, 1, U16MAX>, +} + +impl StrictDumb for BundleDisclosure { + fn strict_dumb() -> Self { + Self { + id: strict_dumb!(), + known_transitions: confined_bset! { strict_dumb!() }, + } + } +} + +impl TransitionBundle { + /// Provides summary about parts of the bundle which are revealed. + pub fn disclose(&self) -> BundleDisclosure { + BundleDisclosure { + id: self.bundle_id(), + known_transitions: Confined::from_iter_unsafe( + self.known_transitions.values().map(|t| t.disclose_hash()), + ), + } + } + + /// Returns commitment to the bundle plus revealed data within it. + pub fn disclose_hash(&self) -> DiscloseHash { self.disclose().commit_id() } +} + +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +pub struct BaseCommitment { + pub schema_id: SchemaId, + pub testnet: bool, + pub alt_layers1: StrictHash, +} + +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB, tags = custom, dumb = Self::Transition(strict_dumb!(), strict_dumb!()))] +pub enum TypeCommitment { + #[strict_type(tag = 0)] + Genesis(BaseCommitment), + + #[strict_type(tag = 1)] + Transition(ContractId, TransitionType), + + #[strict_type(tag = 2)] + Extension(ContractId, ExtensionType), +} + +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[derive(CommitEncode)] +#[commit_encode(strategy = strict, id = OpId)] +pub struct OpCommitment { + pub ffv: Ffv, + pub op_type: TypeCommitment, + pub metadata: StrictHash, + pub globals: MerkleHash, + pub inputs: MerkleHash, + pub assignments: MerkleHash, + pub redeemed: StrictHash, + pub valencies: StrictHash, +} + +impl Genesis { + pub fn commit(&self) -> OpCommitment { + let base = BaseCommitment { + schema_id: self.schema_id, + testnet: self.testnet, + alt_layers1: self.alt_layers1.commit_id(), + }; + OpCommitment { + ffv: self.ffv, + op_type: TypeCommitment::Genesis(base), + metadata: self.metadata.commit_id(), + globals: MerkleHash::merklize(&self.globals), + inputs: MerkleHash::void(0, u256::ZERO), + assignments: MerkleHash::merklize(&self.assignments), + redeemed: Redeemed::default().commit_id(), + valencies: self.valencies.commit_id(), + } + } + + pub fn disclose_hash(&self) -> DiscloseHash { self.disclose().commit_id() } +} + +impl Transition { + pub fn commit(&self) -> OpCommitment { + OpCommitment { + ffv: self.ffv, + op_type: TypeCommitment::Transition(self.contract_id, self.transition_type), + metadata: self.metadata.commit_id(), + globals: MerkleHash::merklize(&self.globals), + inputs: MerkleHash::merklize(&self.inputs), + assignments: MerkleHash::merklize(&self.assignments), + redeemed: Redeemed::default().commit_id(), + valencies: self.valencies.commit_id(), + } + } +} + +impl Extension { + pub fn commit(&self) -> OpCommitment { + OpCommitment { + ffv: self.ffv, + op_type: TypeCommitment::Extension(self.contract_id, self.extension_type), + metadata: self.metadata.commit_id(), + globals: MerkleHash::merklize(&self.globals), + inputs: MerkleHash::void(0, u256::ZERO), + assignments: MerkleHash::merklize(&self.assignments), + redeemed: self.redeemed.commit_id(), + valencies: self.valencies.commit_id(), + } + } +} + +impl ConcealedState { + fn commit_encode(&self, e: &mut CommitEngine) { + match self { + ConcealedState::Void => {} + ConcealedState::Fungible(val) => e.commit_to_serialized(&val.commitment), + ConcealedState::Structured(dat) => e.commit_to_serialized(dat), + ConcealedState::Attachment(att) => e.commit_to_serialized(att), + } + } +} + +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] +pub struct AssignmentCommitment { + pub ty: AssignmentType, + pub state: ConcealedState, + pub seal: XChain, +} + +impl CommitEncode for AssignmentCommitment { + type CommitmentId = MerkleHash; + + fn commit_encode(&self, e: &mut CommitEngine) { + e.commit_to_serialized(&self.ty); + self.state.commit_encode(e); + e.commit_to_serialized(&self.seal); + e.set_finished(); + } +} + +impl Assign { + pub fn commitment(&self, ty: AssignmentType) -> AssignmentCommitment { + let Self::Confidential { seal, state } = self.conceal() else { + unreachable!(); + }; + AssignmentCommitment { + ty, + state: state.state_commitment(), + seal, + } + } +} + +impl MerkleLeaves for Assignments { + type Leaf = AssignmentCommitment; + type LeafIter<'tmp> = vec::IntoIter where Seal: 'tmp; + + fn merkle_leaves(&self) -> Self::LeafIter<'_> { + self.iter() + .flat_map(|(ty, a)| { + match a { + TypedAssigns::Declarative(list) => { + list.iter().map(|a| a.commitment(*ty)).collect::>() + } + TypedAssigns::Fungible(list) => { + list.iter().map(|a| a.commitment(*ty)).collect() + } + TypedAssigns::Structured(list) => { + list.iter().map(|a| a.commitment(*ty)).collect() + } + TypedAssigns::Attachment(list) => { + list.iter().map(|a| a.commitment(*ty)).collect() + } + } + .into_iter() + }) + .collect::>() + .into_iter() + } +} + +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] +pub struct GlobalCommitment { + pub ty: GlobalStateType, + pub state: ConcealedData, +} + +impl CommitEncode for GlobalCommitment { + type CommitmentId = MerkleHash; + + fn commit_encode(&self, e: &mut CommitEngine) { + e.commit_to_serialized(&self.ty); + e.commit_to_serialized(&self.state); + e.set_finished(); + } +} + +impl MerkleLeaves for GlobalState { + type Leaf = GlobalCommitment; + type LeafIter<'tmp> = vec::IntoIter; + + fn merkle_leaves(&self) -> Self::LeafIter<'_> { + self.iter() + .flat_map(|(ty, list)| { + list.iter().map(|val| GlobalCommitment { + ty: *ty, + state: val.conceal(), + }) + }) + .collect::>() + .into_iter() + } +} diff --git a/src/contract/data.rs b/src/contract/data.rs index 83da62ed..46b25d85 100644 --- a/src/contract/data.rs +++ b/src/contract/data.rs @@ -22,37 +22,34 @@ use core::fmt::{self, Debug, Formatter}; use std::cmp::Ordering; -use std::io::Write; use amplify::confinement::SmallBlob; use amplify::hex::ToHex; use amplify::{Bytes32, Wrapper}; use bp::secp256k1::rand::{random, Rng, RngCore}; -use commit_verify::{CommitEncode, CommitVerify, Conceal, StrictEncodedProtocol}; +use commit_verify::{CommitId, CommitmentId, Conceal, DigestExt, Sha256}; use strict_encoding::{StrictSerialize, StrictType}; use super::{ConfidentialState, ExposedState}; -use crate::{StateCommitment, StateData, StateType, LIB_NAME_RGB}; +use crate::{ConcealedState, RevealedState, StateType, LIB_NAME_RGB}; /// Struct using for storing Void (i.e. absent) state #[derive(Copy, Clone, Debug, PartialOrd, Ord, PartialEq, Eq, Hash, Display, Default)] #[display("void")] #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] pub struct VoidState(()); impl ConfidentialState for VoidState { fn state_type(&self) -> StateType { StateType::Void } - fn state_commitment(&self) -> StateCommitment { StateCommitment::Void } + fn state_commitment(&self) -> ConcealedState { ConcealedState::Void } } impl ExposedState for VoidState { type Confidential = VoidState; fn state_type(&self) -> StateType { StateType::Void } - fn state_data(&self) -> StateData { StateData::Void } + fn state_data(&self) -> RevealedState { RevealedState::Void } } impl Conceal for VoidState { @@ -65,8 +62,6 @@ impl Conceal for VoidState { #[wrapper(Deref, AsSlice, BorrowSlice, Hex)] #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] pub struct DataState(SmallBlob); impl StrictSerialize for DataState {} @@ -78,6 +73,8 @@ impl From for DataState { #[derive(Clone, Eq, PartialEq, Hash)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] +#[derive(CommitEncode)] +#[commit_encode(strategy = strict, id = ConcealedData)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] pub struct RevealedData { pub value: DataState, @@ -107,20 +104,13 @@ impl RevealedData { impl ExposedState for RevealedData { type Confidential = ConcealedData; fn state_type(&self) -> StateType { StateType::Structured } - fn state_data(&self) -> StateData { StateData::Structured(self.clone()) } + fn state_data(&self) -> RevealedState { RevealedState::Structured(self.clone()) } } impl Conceal for RevealedData { type Concealed = ConcealedData; - fn conceal(&self) -> Self::Concealed { ConcealedData::commit(self) } -} - -impl CommitEncode for RevealedData { - fn commit_encode(&self, e: &mut impl Write) { - e.write_all(&self.value).ok(); - e.write_all(&self.salt.to_le_bytes()).ok(); - } + fn conceal(&self) -> Self::Concealed { self.commit_id() } } impl PartialOrd for RevealedData { @@ -154,8 +144,6 @@ impl Debug for RevealedData { #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB, rename = "ConcealedData")] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -169,9 +157,13 @@ pub struct ConcealedData( impl ConfidentialState for ConcealedData { fn state_type(&self) -> StateType { StateType::Structured } - fn state_commitment(&self) -> StateCommitment { StateCommitment::Structured(*self) } + fn state_commitment(&self) -> ConcealedState { ConcealedState::Structured(*self) } +} + +impl From for ConcealedData { + fn from(hasher: Sha256) -> Self { hasher.finish().into() } } -impl CommitVerify for ConcealedData { - fn commit(revealed: &RevealedData) -> Self { Bytes32::commit(revealed).into() } +impl CommitmentId for ConcealedData { + const TAG: &'static str = "urn:lnp-bp:rgb:state-data#2024-02-12"; } diff --git a/src/contract/fungible.rs b/src/contract/fungible.rs index 22e0eb0f..14ffd672 100644 --- a/src/contract/fungible.rs +++ b/src/contract/fungible.rs @@ -36,7 +36,6 @@ use core::num::ParseIntError; use core::ops::Deref; use core::str::FromStr; use std::io; -use std::io::Write; use amplify::confinement::U8; use amplify::hex::ToHex; @@ -46,7 +45,7 @@ use amplify::{hex, Array, Bytes32, Wrapper}; use bp::secp256k1::rand::thread_rng; use chrono::{DateTime, Utc}; use commit_verify::{ - CommitEncode, CommitVerify, CommitmentProtocol, Conceal, DigestExt, Sha256, UntaggedProtocol, + CommitVerify, CommitmentProtocol, Conceal, DigestExt, Sha256, UntaggedProtocol, }; use secp256k1_zkp::rand::{Rng, RngCore}; use secp256k1_zkp::SECP256K1; @@ -56,7 +55,7 @@ use strict_encoding::{ }; use super::{ConfidentialState, ExposedState}; -use crate::{schema, AssignmentType, StateCommitment, StateData, StateType, LIB_NAME_RGB}; +use crate::{schema, AssignmentType, ConcealedState, RevealedState, StateType, LIB_NAME_RGB}; #[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, From)] #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] @@ -328,7 +327,7 @@ impl RevealedValue { impl ExposedState for RevealedValue { type Confidential = ConcealedValue; fn state_type(&self) -> StateType { StateType::Fungible } - fn state_data(&self) -> StateData { StateData::Fungible(*self) } + fn state_data(&self) -> RevealedState { RevealedState::Fungible(*self) } } impl Conceal for RevealedValue { @@ -337,15 +336,6 @@ impl Conceal for RevealedValue { fn conceal(&self) -> Self::Concealed { ConcealedValue::commit(self) } } -// We need this manual implementation while conceal procedure is inaccessible -// w/o bulletproofs operational -impl CommitEncode for RevealedValue { - fn commit_encode(&self, e: &mut impl Write) { - let commitment = PedersenCommitment::commit(self); - commitment.commit_encode(e); - } -} - impl PartialOrd for RevealedValue { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } @@ -364,8 +354,6 @@ impl Ord for RevealedValue { #[wrapper(Deref, FromStr, Display, LowerHex)] #[derive(StrictType)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -480,7 +468,6 @@ impl CommitmentProtocol for PedersenProtocol {} #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB, rename = "ConcealedFungible")] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -490,13 +477,12 @@ pub struct ConcealedValue { /// Pedersen commitment to the original [`FungibleState`]. pub commitment: PedersenCommitment, /// Range proof for the [`FungibleState`] not exceeding type boundaries. - #[commit_encode(skip)] pub range_proof: RangeProof, } impl ConfidentialState for ConcealedValue { fn state_type(&self) -> StateType { StateType::Fungible } - fn state_commitment(&self) -> StateCommitment { StateCommitment::Fungible(*self) } + fn state_commitment(&self) -> ConcealedState { ConcealedState::Fungible(*self) } } impl CommitVerify for ConcealedValue { @@ -534,28 +520,10 @@ impl ConcealedValue { #[cfg(test)] mod test { - use std::collections::HashSet; - use amplify::ByteArray; use super::*; - #[test] - fn commitments_determinism() { - let tag = AssetTag::from_byte_array([1u8; 32]); - - let value = RevealedValue::with_rng(15, &mut thread_rng(), tag); - - let generators = (0..10) - .map(|_| { - let mut val = vec![]; - value.commit_encode(&mut val); - val - }) - .collect::>(); - assert_eq!(generators.len(), 1); - } - #[test] fn pedersen_blinding_mismatch() { let mut r = thread_rng(); diff --git a/src/contract/global.rs b/src/contract/global.rs index d24c4672..1fcab74b 100644 --- a/src/contract/global.rs +++ b/src/contract/global.rs @@ -61,8 +61,6 @@ impl IntoIterator for GlobalValues { #[wrapper_mut(DerefMut)] #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), diff --git a/src/contract/mod.rs b/src/contract/mod.rs index 3a5ae2b3..e3ee2f67 100644 --- a/src/contract/mod.rs +++ b/src/contract/mod.rs @@ -33,6 +33,7 @@ mod bundle; #[allow(clippy::module_inception)] mod contract; mod xchain; +mod commit; pub use anchor::{AnchorSet, AnchoredBundle, Layer1, WitnessAnchor, XAnchor}; pub use assignments::{ @@ -40,7 +41,11 @@ pub use assignments::{ TypedAssigns, }; pub use attachment::{AttachId, ConcealedAttach, RevealedAttach}; -pub use bundle::{BundleId, TransitionBundle, Vin}; +pub use bundle::{BundleId, InputMap, TransitionBundle, Vin}; +pub use commit::{ + AssignmentCommitment, AssignmentIndex, BaseCommitment, BundleDisclosure, ContractId, + DiscloseHash, GlobalCommitment, OpCommitment, OpDisclose, OpId, TypeCommitment, +}; pub use contract::{ AssignmentWitness, ContractHistory, ContractState, GlobalOrd, KnownState, Opout, OpoutParseError, OutputAssignment, @@ -52,14 +57,13 @@ pub use fungible::{ }; pub use global::{GlobalState, GlobalValues}; pub use operations::{ - ContractId, Extension, Genesis, Input, Inputs, OpId, OpRef, Operation, Redeemed, Transition, - Valencies, + Extension, Genesis, Input, Inputs, Metadata, OpRef, Operation, Redeemed, Transition, Valencies, }; pub use seal::{ ExposedSeal, GenesisSeal, GraphSeal, OutputSeal, SecretSeal, TxoSeal, WitnessId, WitnessOrd, WitnessPos, XGenesisSeal, XGraphSeal, XOutputSeal, XPubWitness, XWitness, }; -pub use state::{ConfidentialState, ExposedState, StateCommitment, StateData, StateType}; +pub use state::{ConcealedState, ConfidentialState, ExposedState, RevealedState, StateType}; pub use xchain::{ AltLayer1, AltLayer1Set, XChain, XChainParseError, XOutpoint, XCHAIN_BITCOIN_PREFIX, XCHAIN_LIQUID_PREFIX, diff --git a/src/contract/operations.rs b/src/contract/operations.rs index f17f8834..0d0eb58a 100644 --- a/src/contract/operations.rs +++ b/src/contract/operations.rs @@ -20,22 +20,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::{btree_map, btree_set}; -use std::fmt::{self, Display, Formatter}; +use std::cmp::Ordering; +use std::collections::{btree_map, btree_set, BTreeMap}; use std::iter; -use std::str::FromStr; -use amplify::confinement::{SmallBlob, TinyOrdMap, TinyOrdSet}; -use amplify::hex::{FromHex, ToHex}; -use amplify::{hex, ByteArray, Bytes32, FromSliceError, Wrapper}; -use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32CHECKSUM}; -use commit_verify::{mpc, CommitmentId, Conceal}; +use amplify::confinement::{Confined, SmallBlob, TinyOrdMap, TinyOrdSet}; +use amplify::Wrapper; +use commit_verify::{ + CommitEncode, CommitEngine, CommitId, Conceal, MerkleHash, MerkleLeaves, StrictHash, +}; use strict_encoding::{StrictDeserialize, StrictEncode, StrictSerialize}; use crate::schema::{self, ExtensionType, OpFullType, OpType, SchemaId, TransitionType}; use crate::{ - AltLayer1Set, AssignmentType, Assignments, AssignmentsRef, Ffv, GenesisSeal, GlobalState, - GraphSeal, Opout, ReservedByte, TypedAssigns, LIB_NAME_RGB, + AltLayer1Set, Assign, AssignmentIndex, AssignmentType, Assignments, AssignmentsRef, + ConcealedAttach, ConcealedData, ConcealedValue, ContractId, DiscloseHash, ExposedState, Ffv, + GenesisSeal, GlobalState, GraphSeal, OpDisclose, OpId, Opout, ReservedBytes, SecretSeal, + TypedAssigns, VoidState, XChain, LIB_NAME_RGB, }; #[derive(Wrapper, WrapperMut, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Default, From)] @@ -44,11 +45,25 @@ use crate::{ #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] #[derive(CommitEncode)] -#[commit_encode(strategy = strict)] +#[commit_encode(strategy = strict, id = StrictHash)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), - serde(crate = "serde_crate", rename_all = "camelCase") + serde(crate = "serde_crate", transparent) +)] +pub struct Metadata(SmallBlob); + +#[derive(Wrapper, WrapperMut, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Default, From)] +#[wrapper(Deref)] +#[wrapper_mut(DerefMut)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB)] +#[derive(CommitEncode)] +#[commit_encode(strategy = strict, id = StrictHash)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) )] pub struct Valencies(TinyOrdSet); @@ -65,11 +80,11 @@ impl<'a> IntoIterator for &'a Valencies { #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] #[derive(CommitEncode)] -#[commit_encode(strategy = strict)] +#[commit_encode(strategy = strict, id = StrictHash)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), - serde(crate = "serde_crate", rename_all = "camelCase") + serde(crate = "serde_crate", transparent) )] pub struct Redeemed(TinyOrdMap); @@ -85,12 +100,10 @@ impl<'a> IntoIterator for &'a Redeemed { #[wrapper_mut(DerefMut)] #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), - serde(crate = "serde_crate", rename_all = "camelCase") + serde(crate = "serde_crate", transparent) )] pub struct Inputs(TinyOrdSet); @@ -101,9 +114,18 @@ impl<'a> IntoIterator for &'a Inputs { fn into_iter(self) -> Self::IntoIter { self.0.iter().copied() } } +impl MerkleLeaves for Inputs { + type Leaf = Input; + type LeafIter<'tmp> = as MerkleLeaves>::LeafIter<'tmp>; + + fn merkle_leaves(&self) -> Self::LeafIter<'_> { self.0.merkle_leaves() } +} + #[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] +#[derive(CommitEncode)] +#[commit_encode(strategy = strict, id = MerkleHash)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -112,7 +134,8 @@ impl<'a> IntoIterator for &'a Inputs { #[display("{prev_out}")] pub struct Input { pub prev_out: Opout, - reserved: ReservedByte, + #[cfg_attr(feature = "serde", serde(skip))] + reserved: ReservedBytes<2>, } impl Input { @@ -124,95 +147,6 @@ impl Input { } } -/// Unique operation (genesis, extensions & state transition) identifier -/// equivalent to the commitment hash -#[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, From)] -#[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] -#[display(Self::to_hex)] -#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] -#[strict_type(lib = LIB_NAME_RGB)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", transparent) -)] -pub struct OpId( - #[from] - #[from([u8; 32])] - Bytes32, -); - -impl FromStr for OpId { - type Err = hex::Error; - fn from_str(s: &str) -> Result { Self::from_hex(s) } -} - -impl OpId { - pub fn copy_from_slice(slice: impl AsRef<[u8]>) -> Result { - Bytes32::copy_from_slice(slice).map(Self) - } -} - -/// Unique contract identifier equivalent to the contract genesis commitment -#[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, From)] -#[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] -#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] -#[strict_type(lib = LIB_NAME_RGB)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", transparent) -)] -pub struct ContractId( - #[from] - #[from([u8; 32])] - Bytes32, -); - -impl PartialEq for ContractId { - fn eq(&self, other: &OpId) -> bool { self.to_byte_array() == other.to_byte_array() } -} -impl PartialEq for OpId { - fn eq(&self, other: &ContractId) -> bool { self.to_byte_array() == other.to_byte_array() } -} - -impl ContractId { - pub fn copy_from_slice(slice: impl AsRef<[u8]>) -> Result { - Bytes32::copy_from_slice(slice).map(Self) - } -} - -impl ToBaid58<32> for ContractId { - const HRI: &'static str = "rgb"; - const CHUNKING: Option = CHUNKING_32CHECKSUM; - fn to_baid58_payload(&self) -> [u8; 32] { self.to_byte_array() } - fn to_baid58_string(&self) -> String { self.to_string() } -} -impl FromBaid58<32> for ContractId {} -impl Display for ContractId { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if f.alternate() { - write!(f, "{::^}", self.to_baid58()) - } else { - write!(f, "{::^.3}", self.to_baid58()) - } - } -} -impl FromStr for ContractId { - type Err = Baid58ParseError; - fn from_str(s: &str) -> Result { - Self::from_baid58_maybe_chunked_str(s, ':', '#') - } -} - -impl From for ContractId { - fn from(id: mpc::ProtocolId) -> Self { ContractId(id.into_inner()) } -} - -impl From for mpc::ProtocolId { - fn from(id: ContractId) -> Self { mpc::ProtocolId::from_inner(id.into_inner()) } -} - /// RGB contract operation API, defined as trait /// /// Implemented by all contract operation types (see [`OpType`]): @@ -260,12 +194,64 @@ pub trait Operation { /// While public state extension do have parent nodes, they do not contain /// indexed rights. fn inputs(&self) -> Inputs; + + /// Provides summary about parts of the operation which are revealed. + fn disclose(&self) -> OpDisclose { + fn proc_seals( + ty: AssignmentType, + a: &[Assign], + seals: &mut BTreeMap>, + state: &mut BTreeMap, + ) { + for (index, assignment) in a.iter().enumerate() { + if let Some(seal) = assignment.revealed_seal() { + seals.insert(AssignmentIndex::new(ty, index as u16), seal.to_secret_seal()); + } + if let Some(revealed) = assignment.as_revealed_state() { + state.insert(AssignmentIndex::new(ty, index as u16), revealed.conceal()); + } + } + } + + let mut seals: BTreeMap> = bmap!(); + let mut void: BTreeMap = bmap!(); + let mut fungible: BTreeMap = bmap!(); + let mut data: BTreeMap = bmap!(); + let mut attach: BTreeMap = bmap!(); + for (ty, assigns) in self.assignments().flat() { + match assigns { + TypedAssigns::Declarative(a) => { + proc_seals(ty, &a, &mut seals, &mut void); + } + TypedAssigns::Fungible(a) => { + proc_seals(ty, &a, &mut seals, &mut fungible); + } + TypedAssigns::Structured(a) => { + proc_seals(ty, &a, &mut seals, &mut data); + } + TypedAssigns::Attachment(a) => { + proc_seals(ty, &a, &mut seals, &mut attach); + } + } + } + + OpDisclose { + id: self.id(), + seals: Confined::from_collection_unsafe(seals), + fungible: Confined::from_iter_unsafe( + fungible.into_iter().map(|(k, s)| (k, s.commitment)), + ), + data: Confined::from_collection_unsafe(data), + attach: Confined::from_collection_unsafe(attach), + } + } + + fn disclose_hash(&self) -> DiscloseHash { self.disclose().commit_id() } } #[derive(Clone, PartialEq, Eq, Hash, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -276,7 +262,7 @@ pub struct Genesis { pub schema_id: SchemaId, pub testnet: bool, pub alt_layers1: AltLayer1Set, - pub metadata: SmallBlob, + pub metadata: Metadata, pub globals: GlobalState, pub assignments: Assignments, pub valencies: Valencies, @@ -288,7 +274,6 @@ impl StrictDeserialize for Genesis {} #[derive(Clone, PartialEq, Eq, Hash, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -298,7 +283,7 @@ pub struct Extension { pub ffv: Ffv, pub contract_id: ContractId, pub extension_type: ExtensionType, - pub metadata: SmallBlob, + pub metadata: Metadata, pub globals: GlobalState, pub assignments: Assignments, pub redeemed: Redeemed, @@ -308,10 +293,17 @@ pub struct Extension { impl StrictSerialize for Extension {} impl StrictDeserialize for Extension {} +impl Ord for Extension { + fn cmp(&self, other: &Self) -> Ordering { self.id().cmp(&other.id()) } +} + +impl PartialOrd for Extension { + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } +} + #[derive(Clone, PartialEq, Eq, Hash, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -321,7 +313,7 @@ pub struct Transition { pub ffv: Ffv, pub contract_id: ContractId, pub transition_type: TransitionType, - pub metadata: SmallBlob, + pub metadata: Metadata, pub globals: GlobalState, pub inputs: Inputs, pub assignments: Assignments, @@ -331,8 +323,16 @@ pub struct Transition { impl StrictSerialize for Transition {} impl StrictDeserialize for Transition {} +impl Ord for Transition { + fn cmp(&self, other: &Self) -> Ordering { self.id().cmp(&other.id()) } +} + +impl PartialOrd for Transition { + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } +} + impl Conceal for Genesis { - type Concealed = Genesis; + type Concealed = Self; fn conceal(&self) -> Self::Concealed { let mut concealed = self.clone(); concealed @@ -343,13 +343,8 @@ impl Conceal for Genesis { } } -impl CommitmentId for Genesis { - const TAG: [u8; 32] = *b"urn:lnpbp:rgb:genesis:v02#202304"; - type Id = ContractId; -} - impl Conceal for Transition { - type Concealed = Transition; + type Concealed = Self; fn conceal(&self) -> Self::Concealed { let mut concealed = self.clone(); concealed @@ -360,13 +355,8 @@ impl Conceal for Transition { } } -impl CommitmentId for Transition { - const TAG: [u8; 32] = *b"urn:lnpbp:rgb:transition:v02#23B"; - type Id = OpId; -} - impl Conceal for Extension { - type Concealed = Extension; + type Concealed = Self; fn conceal(&self) -> Self::Concealed { let mut concealed = self.clone(); concealed @@ -377,9 +367,19 @@ impl Conceal for Extension { } } -impl CommitmentId for Extension { - const TAG: [u8; 32] = *b"urn:lnpbp:rgb:extension:v02#2304"; - type Id = OpId; +impl CommitEncode for Genesis { + type CommitmentId = OpId; + fn commit_encode(&self, e: &mut CommitEngine) { e.commit_to_serialized(&self.commit()) } +} + +impl CommitEncode for Transition { + type CommitmentId = OpId; + fn commit_encode(&self, e: &mut CommitEngine) { e.commit_to_serialized(&self.commit()) } +} + +impl CommitEncode for Extension { + type CommitmentId = OpId; + fn commit_encode(&self, e: &mut CommitEngine) { e.commit_to_serialized(&self.commit()) } } impl Transition { @@ -406,7 +406,7 @@ impl Operation for Genesis { fn full_type(&self) -> OpFullType { OpFullType::Genesis } #[inline] - fn id(&self) -> OpId { OpId(self.commitment_id().into_inner()) } + fn id(&self) -> OpId { self.commit_id() } #[inline] fn contract_id(&self) -> ContractId { ContractId::from_inner(self.id().into_inner()) } @@ -448,7 +448,7 @@ impl Operation for Extension { fn full_type(&self) -> OpFullType { OpFullType::StateExtension(self.extension_type) } #[inline] - fn id(&self) -> OpId { self.commitment_id() } + fn id(&self) -> OpId { self.commit_id() } #[inline] fn contract_id(&self) -> ContractId { self.contract_id } @@ -490,7 +490,7 @@ impl Operation for Transition { fn full_type(&self) -> OpFullType { OpFullType::StateTransition(self.transition_type) } #[inline] - fn id(&self) -> OpId { self.commitment_id() } + fn id(&self) -> OpId { self.commit_id() } #[inline] fn contract_id(&self) -> ContractId { self.contract_id } @@ -631,6 +631,11 @@ impl<'op> Operation for OpRef<'op> { #[cfg(test)] mod test { + use std::str::FromStr; + + use amplify::ByteArray; + use baid58::ToBaid58; + use super::*; #[test] diff --git a/src/contract/seal.rs b/src/contract/seal.rs index c1cd195d..599ae1fd 100644 --- a/src/contract/seal.rs +++ b/src/contract/seal.rs @@ -23,7 +23,6 @@ use core::fmt::Debug; use std::cmp::Ordering; use std::hash::Hash; -use std::io::Write; use std::num::NonZeroU32; use bp::dbc::Method; @@ -32,7 +31,7 @@ pub use bp::seals::txout::TxoSeal; use bp::seals::txout::{BlindSeal, CloseMethod, ExplicitSeal, SealTxid, VerifyError, Witness}; pub use bp::seals::SecretSeal; use bp::{dbc, Outpoint, Tx, Txid, Vout}; -use commit_verify::{mpc, strategies, CommitEncode, CommitStrategy, Conceal}; +use commit_verify::{mpc, Conceal}; use single_use_seals::SealWitness; use strict_encoding::{StrictDecode, StrictDumb, StrictEncode, StrictType}; @@ -275,23 +274,12 @@ impl SealWitness for XWitness { } } -impl CommitStrategy for XChain> { - type Strategy = strategies::Strict; -} - impl XChain> { /// Converts revealed seal into concealed. #[inline] pub fn to_secret_seal(&self) -> XChain { self.conceal() } } -impl CommitEncode for XChain { - fn commit_encode(&self, e: &mut impl Write) { - e.write_all(&[self.layer1() as u8]).ok(); - self.as_reduced_unsafe().commit_encode(e); - } -} - #[cfg(test)] mod test { use amplify::hex::FromHex; @@ -313,7 +301,7 @@ mod test { let secret = reveal.to_secret_seal(); assert_eq!( secret.to_string(), - "bc:utxob:6JZb8te-bSUsZzCJk-op9E4D8zf-SHTDu2t4W-T21NaPNnb-58DFM9" + "bc:utxob:28Hk9S1-nBLPw4u9j-Zwaftwz8s-k5Y6G7bug-qvoeGn5BF-GPEJoY3" ); assert_eq!(reveal.to_secret_seal(), reveal.conceal()) } diff --git a/src/contract/state.rs b/src/contract/state.rs index 679b7d0a..00092e14 100644 --- a/src/contract/state.rs +++ b/src/contract/state.rs @@ -23,21 +23,18 @@ use core::fmt::Debug; use core::hash::Hash; -use commit_verify::{CommitEncode, Conceal}; +use commit_verify::Conceal; use strict_encoding::{StrictDecode, StrictDumb, StrictEncode}; use crate::{ ConcealedAttach, ConcealedData, ConcealedValue, RevealedAttach, RevealedData, RevealedValue, - LIB_NAME_RGB, }; /// Marker trait for types of state which are just a commitment to the actual /// state data. -pub trait ConfidentialState: - Debug + Hash + StrictDumb + StrictEncode + StrictDecode + CommitEncode + Eq + Copy -{ +pub trait ConfidentialState: Debug + Hash + Eq + Copy { fn state_type(&self) -> StateType; - fn state_commitment(&self) -> StateCommitment; + fn state_commitment(&self) -> ConcealedState; } /// Marker trait for types of state holding explicit state data. @@ -47,14 +44,13 @@ pub trait ExposedState: + StrictEncode + StrictDecode + Conceal - + CommitEncode + Eq + Ord + Clone { - type Confidential: ConfidentialState; + type Confidential: ConfidentialState + StrictEncode + StrictDecode + StrictDumb; fn state_type(&self) -> StateType; - fn state_data(&self) -> StateData; + fn state_data(&self) -> RevealedState; } /// Categories of the state @@ -82,79 +78,51 @@ pub enum StateType { /// Categories of the state #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug)] -#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] -#[strict_type(lib = LIB_NAME_RGB, tags = custom)] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate", rename_all = "camelCase") )] -pub enum StateData { - #[strict_type(tag = 0x00, dumb)] +pub enum RevealedState { Void, - #[strict_type(tag = 0x01)] Fungible(RevealedValue), - #[strict_type(tag = 0x02)] Structured(RevealedData), - #[strict_type(tag = 0xFF)] Attachment(RevealedAttach), } -impl ExposedState for StateData { - type Confidential = StateCommitment; - fn state_type(&self) -> StateType { - match self { - StateData::Void => StateType::Void, - StateData::Fungible(_) => StateType::Fungible, - StateData::Structured(_) => StateType::Structured, - StateData::Attachment(_) => StateType::Attachment, - } - } - fn state_data(&self) -> StateData { self.clone() } -} - -impl Conceal for StateData { - type Concealed = StateCommitment; - fn conceal(&self) -> Self::Concealed { +impl RevealedState { + pub fn state_type(&self) -> StateType { match self { - StateData::Void => StateCommitment::Void, - StateData::Fungible(value) => StateCommitment::Fungible(value.conceal()), - StateData::Structured(data) => StateCommitment::Structured(data.conceal()), - StateData::Attachment(attach) => StateCommitment::Attachment(attach.conceal()), + RevealedState::Void => StateType::Void, + RevealedState::Fungible(_) => StateType::Fungible, + RevealedState::Structured(_) => StateType::Structured, + RevealedState::Attachment(_) => StateType::Attachment, } } } #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] -#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] -#[strict_type(lib = LIB_NAME_RGB, tags = custom)] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate", rename_all = "camelCase") )] #[allow(clippy::large_enum_variant)] -pub enum StateCommitment { - #[strict_type(tag = 0x00, dumb)] +pub enum ConcealedState { Void, - #[strict_type(tag = 0x01)] Fungible(ConcealedValue), - #[strict_type(tag = 0x02)] Structured(ConcealedData), - #[strict_type(tag = 0xFF)] Attachment(ConcealedAttach), } -impl ConfidentialState for StateCommitment { +impl ConfidentialState for ConcealedState { fn state_type(&self) -> StateType { match self { - StateCommitment::Void => StateType::Void, - StateCommitment::Fungible(_) => StateType::Fungible, - StateCommitment::Structured(_) => StateType::Structured, - StateCommitment::Attachment(_) => StateType::Attachment, + ConcealedState::Void => StateType::Void, + ConcealedState::Fungible(_) => StateType::Fungible, + ConcealedState::Structured(_) => StateType::Structured, + ConcealedState::Attachment(_) => StateType::Attachment, } } - fn state_commitment(&self) -> StateCommitment { *self } + fn state_commitment(&self) -> ConcealedState { *self } } diff --git a/src/contract/xchain.rs b/src/contract/xchain.rs index 89080bc3..62232d6f 100644 --- a/src/contract/xchain.rs +++ b/src/contract/xchain.rs @@ -22,13 +22,12 @@ use std::cmp::Ordering; use std::fmt::{Debug, Display, Formatter}; -use std::io::Write; use std::str::FromStr; use std::{fmt, io}; use amplify::confinement::TinyOrdSet; use bp::{Bp, Outpoint}; -use commit_verify::{CommitEncode, Conceal}; +use commit_verify::{Conceal, StrictHash}; use strict_encoding::{ DecodeError, DefineUnion, ReadTuple, ReadUnion, StrictDecode, StrictDumb, StrictEncode, StrictSum, StrictType, StrictUnion, TypedRead, TypedWrite, WriteUnion, @@ -82,6 +81,8 @@ impl AltLayer1 { #[wrapper_mut(DerefMut)] #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] +#[derive(CommitEncode)] +#[commit_encode(strategy = strict, id = StrictHash)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -89,14 +90,6 @@ impl AltLayer1 { )] pub struct AltLayer1Set(TinyOrdSet); -impl CommitEncode for AltLayer1Set { - fn commit_encode(&self, e: &mut impl Write) { - for c in self.iter() { - e.write_all(&[*c as u8]).ok(); - } - } -} - #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] #[cfg_attr( feature = "serde", @@ -161,12 +154,12 @@ where T: StrictDumb + StrictEncode fn strict_encode(&self, writer: W) -> io::Result { writer.write_union::(|w| { let w = w - .define_newtype::(fname!(Self::ALL_VARIANTS[0].1)) - .define_newtype::(fname!(Self::ALL_VARIANTS[1].1)) + .define_newtype::(vname!(Self::ALL_VARIANTS[0].1)) + .define_newtype::(vname!(Self::ALL_VARIANTS[1].1)) .complete(); Ok(match self { - XChain::Bitcoin(t) => w.write_newtype(fname!(Self::ALL_VARIANTS[0].1), t)?, - XChain::Liquid(t) => w.write_newtype(fname!(Self::ALL_VARIANTS[1].1), t)?, + XChain::Bitcoin(t) => w.write_newtype(vname!(Self::ALL_VARIANTS[0].1), t)?, + XChain::Liquid(t) => w.write_newtype(vname!(Self::ALL_VARIANTS[1].1), t)?, } .complete()) }) @@ -295,6 +288,23 @@ impl XChain { } } +impl<'a, T: Copy> XChain<&'a T> { + pub fn copied(self) -> XChain { self.map(|t| *t) } +} + +impl<'a, T: Clone> XChain<&'a T> { + pub fn cloned(self) -> XChain { self.map(T::clone) } +} + +impl XChain> { + pub fn transpose(self) -> Option> { + match self { + XChain::Bitcoin(inner) => inner.map(XChain::Bitcoin), + XChain::Liquid(inner) => inner.map(XChain::Liquid), + } + } +} + impl Iterator for XChain { type Item = XChain<::Item>; diff --git a/src/lib.rs b/src/lib.rs index e29a1f35..defc7df6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,27 +63,35 @@ pub use prelude::*; pub const LIB_NAME_RGB: &str = "RGB"; -/// Reserved byte. -#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Default, Debug, Display)] +// TODO: Move to amplify crate + +/// Reserved bytes. +#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display)] #[display("reserved")] #[derive(StrictType, StrictEncode)] #[strict_type(lib = LIB_NAME_RGB)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", rename_all = "camelCase") -)] -pub struct ReservedByte(u8); +pub struct ReservedBytes([u8; LEN]); + +impl Default for ReservedBytes { + fn default() -> Self { Self([VAL; LEN]) } +} + +impl From<[u8; LEN]> for ReservedBytes { + fn from(value: [u8; LEN]) -> Self { + assert_eq!(value, [VAL; LEN]); + Self(value) + } +} mod _reserved { use strict_encoding::{DecodeError, ReadTuple, StrictDecode, TypedRead}; - use crate::ReservedByte; + use crate::ReservedBytes; - impl StrictDecode for ReservedByte { + impl StrictDecode for ReservedBytes { fn strict_decode(reader: &mut impl TypedRead) -> Result { let reserved = reader.read_tuple(|r| r.read_field().map(Self))?; - if reserved != ReservedByte::default() { + if reserved != ReservedBytes::::default() { Err(DecodeError::DataIntegrityError(format!( "unsupported reserved byte value indicating a future RGB version. Please \ update your software, or, if the problem persists, contact your vendor \ @@ -94,6 +102,53 @@ mod _reserved { } } } + + #[cfg(feature = "serde")] + mod _serde { + use std::fmt; + + use serde_crate::de::Visitor; + use serde_crate::{de, Deserialize, Deserializer, Serialize, Serializer}; + + use super::*; + + impl Serialize for ReservedBytes { + fn serialize(&self, serializer: S) -> Result + where S: Serializer { + // Doing nothing + serializer.serialize_unit() + } + } + + impl<'de, const LEN: usize, const VAL: u8> Deserialize<'de> for ReservedBytes { + fn deserialize(deserializer: D) -> Result + where D: Deserializer<'de> { + #[derive(Default)] + pub struct UntaggedUnitVisitor; + + impl<'de> Visitor<'de> for UntaggedUnitVisitor { + type Value = (); + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + write!(formatter, "reserved unit") + } + + fn visit_none(self) -> Result<(), E> + where E: de::Error { + Ok(()) + } + + fn visit_unit(self) -> Result<(), E> + where E: de::Error { + Ok(()) + } + } + + deserializer.deserialize_unit(UntaggedUnitVisitor)?; + Ok(default!()) + } + } + } } /// Fast-forward version code @@ -101,8 +156,6 @@ mod _reserved { #[display("RGB/1.{0}")] #[derive(StrictType, StrictEncode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] -#[commit_encode(strategy = strict)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), diff --git a/src/schema/schema.rs b/src/schema/schema.rs index aa9cb163..cbd609dc 100644 --- a/src/schema/schema.rs +++ b/src/schema/schema.rs @@ -27,7 +27,7 @@ use std::str::FromStr; use amplify::confinement::{TinyOrdMap, TinyOrdSet}; use amplify::{ByteArray, Bytes32}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; -use commit_verify::{CommitStrategy, CommitmentId}; +use commit_verify::{CommitEncode, CommitEngine, CommitId, CommitmentId, DigestExt, Sha256}; use strict_encoding::{StrictDecode, StrictDeserialize, StrictEncode, StrictSerialize, StrictType}; use strict_types::TypeSystem; @@ -57,7 +57,6 @@ impl GlobalStateType { #[display("0x{0:04X}")] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -73,7 +72,6 @@ impl ExtensionType { #[display("0x{0:04X}")] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB)] -#[derive(CommitEncode)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -90,7 +88,7 @@ impl TransitionType { /// Schema identifier. /// -/// Schema identifier commits to all of the schema data. +/// Schema identifier commits to all the schema data. #[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, From)] #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] @@ -106,6 +104,14 @@ pub struct SchemaId( Bytes32, ); +impl From for SchemaId { + fn from(hasher: Sha256) -> Self { hasher.finish().into() } +} + +impl CommitmentId for SchemaId { + const TAG: &'static str = "urn:lnp-bp:rgb:schema#2024-02-03"; +} + impl ToBaid58<32> for SchemaId { const HRI: &'static str = "sc"; const CHUNKING: Option = CHUNKING_32; @@ -135,9 +141,15 @@ impl SchemaId { pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } -pub trait SchemaRoot: Clone + Eq + StrictType + StrictEncode + StrictDecode + Default {} -impl SchemaRoot for () {} -impl SchemaRoot for RootSchema {} +pub trait SchemaRoot: Clone + Eq + StrictType + StrictEncode + StrictDecode + Default { + fn schema_id(&self) -> SchemaId; +} +impl SchemaRoot for () { + fn schema_id(&self) -> SchemaId { SchemaId::from_byte_array([0u8; 32]) } +} +impl SchemaRoot for RootSchema { + fn schema_id(&self) -> SchemaId { self.schema_id() } +} pub type RootSchema = Schema<()>; pub type SubSchema = Schema; @@ -166,6 +178,25 @@ pub struct Schema { pub script: Script, } +impl CommitEncode for Schema { + type CommitmentId = SchemaId; + + fn commit_encode(&self, e: &mut CommitEngine) { + e.commit_to_serialized(&self.ffv); + e.commit_to_option(&self.subset_of.as_ref().map(Root::schema_id)); + + e.commit_to_map(&self.global_types); + e.commit_to_map(&self.owned_types); + e.commit_to_set(&self.valency_types); + e.commit_to_serialized(&self.genesis); + e.commit_to_map(&self.extensions); + e.commit_to_map(&self.transitions); + + e.commit_to_serialized(&self.type_system.id()); + e.commit_to_serialized(&self.script); + } +} + impl PartialEq for Schema { fn eq(&self, other: &Self) -> bool { self.schema_id() == other.schema_id() } } @@ -178,21 +209,12 @@ impl PartialOrd for Schema { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } -impl CommitStrategy for Schema { - type Strategy = commit_verify::strategies::Strict; -} - -impl CommitmentId for Schema { - const TAG: [u8; 32] = *b"urn:lnpbp:rgb:schema:v01#202302A"; - type Id = SchemaId; -} - impl StrictSerialize for Schema {} impl StrictDeserialize for Schema {} impl Schema { #[inline] - pub fn schema_id(&self) -> SchemaId { self.commitment_id() } + pub fn schema_id(&self) -> SchemaId { self.commit_id() } pub fn blank_transition(&self) -> TransitionSchema { let mut schema = TransitionSchema::default(); diff --git a/src/schema/state.rs b/src/schema/state.rs index 9d1752b0..68f6788e 100644 --- a/src/schema/state.rs +++ b/src/schema/state.rs @@ -20,7 +20,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use strict_encoding::constants::U64; +use strict_encoding::Primitive; use strict_types::SemId; use crate::{StateType, LIB_NAME_RGB}; @@ -96,7 +96,7 @@ impl StateSchema { pub enum FungibleType { #[default] #[display("64bit")] - Unsigned64Bit = U64.into_code(), + Unsigned64Bit = Primitive::U64.into_code(), } #[derive(Clone, PartialEq, Eq, Hash, Debug)] diff --git a/src/stl.rs b/src/stl.rs index 2c385b8c..6f73da44 100644 --- a/src/stl.rs +++ b/src/stl.rs @@ -28,11 +28,13 @@ use strict_types::stl::{std_stl, strict_types_stl}; use strict_types::typelib::LibBuilder; use strict_types::{CompileError, TypeLib}; -use crate::{AnchoredBundle, ContractState, Extension, Genesis, SubSchema, LIB_NAME_RGB}; +use crate::{ + AnchoredBundle, ContractState, Extension, Genesis, OpCommitment, SubSchema, LIB_NAME_RGB, +}; /// Strict types id for the library providing data types for RGB consensus. pub const LIB_ID_RGB: &str = - "urn:ubideco:stl:141hHBYBr2mzKyskZbRuwazYC9ki5x9ZrrzQHLbgBzx#oscar-rufus-tractor"; + "urn:ubideco:stl:Hzv1xPBtQfqcGYeisvS2V9DPj1VRC5WyYfME2RtmuRpu#blitz-english-eric"; fn _rgb_core_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_RGB), tiny_bset! { @@ -48,6 +50,7 @@ fn _rgb_core_stl() -> Result { .transpile::() .transpile::() .transpile::() + .transpile::() .compile() } diff --git a/src/validation/state.rs b/src/validation/state.rs index 586e9da6..878aa75e 100644 --- a/src/validation/state.rs +++ b/src/validation/state.rs @@ -24,8 +24,8 @@ use strict_types::TypeSystem; use crate::schema::AssignmentType; use crate::{ - validation, Assign, ConfidentialState, ExposedSeal, ExposedState, OpId, StateCommitment, - StateData, StateSchema, + validation, Assign, ConcealedState, ConfidentialState, ExposedSeal, ExposedState, OpId, + RevealedState, StateSchema, }; impl StateSchema { @@ -40,8 +40,8 @@ impl StateSchema { match data { Assign::Confidential { state, .. } | Assign::ConfidentialState { state, .. } => { match (self, state.state_commitment()) { - (StateSchema::Declarative, StateCommitment::Void) => {} - (StateSchema::Fungible(_), StateCommitment::Fungible(value)) => { + (StateSchema::Declarative, ConcealedState::Void) => {} + (StateSchema::Fungible(_), ConcealedState::Fungible(value)) => { // [SECURITY-CRITICAL]: Bulletproofs validation if let Err(err) = value.verify_range_proof() { status.add_failure(validation::Failure::BulletproofsInvalid( @@ -51,12 +51,12 @@ impl StateSchema { )); } } - (StateSchema::Structured(_), StateCommitment::Structured(_)) => { + (StateSchema::Structured(_), ConcealedState::Structured(_)) => { status.add_info(validation::Info::UncheckableConfidentialState( *opid, state_type, )); } - (StateSchema::Attachment(_), StateCommitment::Attachment(_)) => { + (StateSchema::Attachment(_), ConcealedState::Attachment(_)) => { status.add_info(validation::Info::UncheckableConfidentialState( *opid, state_type, )); @@ -74,8 +74,8 @@ impl StateSchema { } Assign::Revealed { state, .. } | Assign::ConfidentialSeal { state, .. } => { match (self, state.state_data()) { - (StateSchema::Declarative, StateData::Void) => {} - (StateSchema::Attachment(media_type), StateData::Attachment(attach)) + (StateSchema::Declarative, RevealedState::Void) => {} + (StateSchema::Attachment(media_type), RevealedState::Attachment(attach)) if !attach.media_type.conforms(media_type) => { status.add_failure(validation::Failure::MediaTypeMismatch { @@ -85,7 +85,7 @@ impl StateSchema { found: attach.media_type, }); } - (StateSchema::Fungible(schema), StateData::Fungible(v)) + (StateSchema::Fungible(schema), RevealedState::Fungible(v)) if v.value.fungible_type() != *schema => { status.add_failure(validation::Failure::FungibleTypeMismatch { @@ -95,8 +95,8 @@ impl StateSchema { found: v.value.fungible_type(), }); } - (StateSchema::Fungible(_), StateData::Fungible(_)) => {} - (StateSchema::Structured(sem_id), StateData::Structured(data)) => { + (StateSchema::Fungible(_), RevealedState::Fungible(_)) => {} + (StateSchema::Structured(sem_id), RevealedState::Structured(data)) => { if type_system .strict_deserialize_type(*sem_id, data.value.as_ref()) .is_err() diff --git a/stl/AnchoredBundle.vesper b/stl/AnchoredBundle.vesper new file mode 100644 index 00000000..f03c04ea --- /dev/null +++ b/stl/AnchoredBundle.vesper @@ -0,0 +1,323 @@ +AnchoredBundle rec + anchor union XChainAnchorSet + bitcoin union AnchorSet wrapped tag=0 + tapret rec AnchorMerkleProofTapretProof wrapped tag=0 + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec TapretProof + pathProof rec TapretPathProof + some union TapretNodePartner option wrapped tag=1 + rightBranch rec TapretRightBranch wrapped tag=2 + nonce is U8 + opret rec AnchorMerkleProofOpretProof wrapped tag=1 + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + dual rec tag=2 + tapret rec AnchorMerkleProofTapretProof + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec TapretProof + pathProof rec TapretPathProof + some union TapretNodePartner option wrapped tag=1 + rightBranch rec TapretRightBranch wrapped tag=2 + nonce is U8 + opret rec AnchorMerkleProofOpretProof + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + liquid union AnchorSet wrapped tag=1 + tapret rec AnchorMerkleProofTapretProof wrapped tag=0 + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec TapretProof + pathProof rec TapretPathProof + some union TapretNodePartner option wrapped tag=1 + rightBranch rec TapretRightBranch wrapped tag=2 + nonce is U8 + opret rec AnchorMerkleProofOpretProof wrapped tag=1 + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + dual rec tag=2 + tapret rec AnchorMerkleProofTapretProof + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec TapretProof + pathProof rec TapretPathProof + some union TapretNodePartner option wrapped tag=1 + rightBranch rec TapretRightBranch wrapped tag=2 + nonce is U8 + opret rec AnchorMerkleProofOpretProof + txid bytes len=32 aka=Txid + mpcProof rec MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + bundle rec TransitionBundle + inputMap map len=1..MAX16 aka=InputMap + key is U32 aka=Vout + value bytes len=32 aka=OpId + knownTransitions map len=1..MAX16 + key bytes len=32 aka=OpId + value rec Transition + ffv is U16 aka=Ffv + contractId bytes len=32 aka=ContractId + transitionType is U16 aka=TransitionType + metadata bytes len=0..MAX16 aka=Metadata + globals map len=0..MAX8 aka=GlobalState + key is U16 aka=GlobalStateType + value list len=1..MAX16 aka=GlobalValues + RevealedData rec + value bytes len=0..MAX16 aka=DataState + salt is U128 + inputs set len=0..MAX8 aka=Inputs + Input rec + prevOut rec Opout + op bytes len=32 aka=OpId + ty is U16 aka=AssignmentType + no is U16 + reserved bytes len=2 aka=ReservedBytes2 + assignments map len=0..MAX8 aka=AssignmentsBlindSealTxPtr + key is U16 aka=AssignmentType + value union TypedAssignsBlindSealTxPtr + declarative list len=0..MAX16 wrapped tag=0 + AssignVoidStateBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + fungible list len=0..MAX16 wrapped tag=1 + AssignRevealedValueBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec RevealedFungible + value union FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec RevealedFungible + value union FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + structured list len=0..MAX16 wrapped tag=2 + AssignRevealedDataBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedData + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedData + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + attachment list len=0..MAX16 wrapped tag=3 + AssignRevealedAttachBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedAttach + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedAttach + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum MediaType any=255 + salt is U64 + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum MediaType any=255 + salt is U64 + valencies set len=0..MAX8 aka=Valencies + element is U16 aka=ValencyType diff --git a/stl/MerkleNode.vesper b/stl/MerkleNode.vesper new file mode 100644 index 00000000..e6b28b01 --- /dev/null +++ b/stl/MerkleNode.vesper @@ -0,0 +1,6 @@ +MerkleNode rec + branching enum NodeBranching void=0 single=1 branch=2 + depth is U8 + width is U256 + node1 bytes len=32 aka=MerkleHash + node2 bytes len=32 aka=MerkleHash diff --git a/stl/RGB@0.1.0.sta b/stl/RGB@0.1.0.sta index 58498c6d..41c0b588 100644 --- a/stl/RGB@0.1.0.sta +++ b/stl/RGB@0.1.0.sta @@ -1,335 +1,339 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:2PcZtrPrfQCu27qw8b4Wz4cEqUn2PpgSkDHwF4qVyyrq +Id: Hzv1xPBtQfqcGYeisvS2V9DPj1VRC5WyYfME2RtmuRpu#blitz-english-eric Name: RGB Dependencies: - urn:ubideco:stl:ZtHaBzu9ojbDahaGKEXe5v9DfSDxLERbLkEB23R6Q6V, - urn:ubideco:stl:5XLKQ1sNryZm9bdFKU2kBY3MPYdZXhchVdQKBbHA3gby, - urn:ubideco:stl:8wHziC7Bxa3BwctUh6EVBanosrvRHecCTPUjkZT4btNd, - urn:ubideco:stl:9KALDYR8Nyjq4FdMW6kYoL7vdkWnqPqNuFnmE9qHpNjZ, - urn:ubideco:stl:DVtm25LRKU4TjbyZmVxPhvCmctZ6vKkPKqfpU2QsDNUo, - urn:ubideco:stl:HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 + c8Tnib31q1p7szyPukEGDoQzJQ5qJwPCn5uZCHUXzB9#cupid-metro-warning, + 57sPvZcwQaziec3ux249XoCMhziQpKB8Yw99U5oRwfqW#deluxe-safari-random, + 5teCJyjMWaxbQK8vdga2soWh2U7waERS3ev8KHShJcgv#trumpet-scratch-pelican, + DVtm25LRKU4TjbyZmVxPhvCmctZ6vKkPKqfpU2QsDNUo#exodus-axiom-tommy, + DzTvt9gGhPUKD8Dkkjk9PDBhkJ4gtWxXWQjxnmUYLNrs#voyage-kimono-disco, + HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy -A1JHQgYIbJMpP1Zo7NnfnUB1CNehMyMWREFWAosurAm/5d+NQgxDb21taXRWZXJp -ZnlDNAOU2Bsw4lIokCYe82/5+Kg5UZH1C2leIyoes7dByAtTdHJpY3RUeXBlc3Xq -Y3PT+CMVa0ZzCeZQ+znreH0zK5BVVNgLcEBVSAFSBkJQQ29yZXuEgDye+uIRJad8 -LDm8cNL96PlDrg39nPTmgu3HZspwA1N0ZLmzB6Bap1ZJhkNCbroWCz+PjGj56E/9 -zS2FQAp57Q9gBUFsdVZN9WwTYiP2OadKCZPcR0bJ+YqruINYXbXZFj8YfsQoGgoH -Qml0Y29pbgYFQWx1Vk0CAG3voSbhvHXh/0hL+4XBNNEMMtyMHkDgaUsc1qfr3Nxh -B0xpYlNpdGWnMFUCLflcyPCJo0WiP5beUSnAE7cO8SfYIZBBlftTCgVMaWJJZAZC -UENvcmUNAAF8B10AQEsWlZgbF8NhLca46q4Nf3BZYpIWdV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~cywiMb7^mGa{vkfWOW`w +sTH9-LlJ`2|Ay5Z(?oEikl{+~pis;@Q*TJ#0cNz9gpb5|Ibh#3lIwO7kh2b~5Yat +1R4r0u5eSq}aR2}S000000RI300000001I?-VQzD2bZKvHa{vkfG*S<)6P6lYy(# +<=BR_>s@(?%#f7ArN-=Rj?7Ns(10lmj>c*;HH-+nx*l=M-QoGleKhk#vs%IKt8i% +IbTe*gdg000000RI3000000019+@aAi|@b97~G0!XQB?8_As^WnPDotHzoVsdtr@ +aSRwVWi2G1l#x)zof7oiPG643gHJ7x;*+(o97D-WiY6Oxis%K^ujrr2XPctjrBQEn_gi@y%2uu6czw;j3Za^^pA<|F_B0000000930 +00000000VacWz~5RC#b^a{vkfhyLPaScq)s9KMExvw34D6J>+NwrBxfixd_%u|$W +t0XWJO;DsW`<2iyxl(NH_SanmT=*kQZ;pml#x`}ri^8f$<000000RI300000001S +3vY-Mg^c~p6DWpe-t0Y>fS!w4MxxaL=+DqP^k2!wz9AHH68xp8!<%Jqp^&Hw-a00 +0000RI300000000(DfZe??6a{;SD{|dyAYDEzER9^-pDoqKDkX2Z-)7v*JaEw{tO +hXD~cywiMb7^mGa{vkfWOW`wsTH9-LlJ`2|Ay5Z(?oEikl{+~pis;@Q*TJ#0cNz9 +gpb5|Ibh#3lIwO7kh2b~5Yat1R4r0u5eSq}aR2}S000000RI300000001I?-VQzD +2bZKvHa{vkfG*S<)6P6lYy(#<=BR_>s@(?%#f7ArN-=Rj?7Ns(10lmj>c*;HH-+n +x*l=M-QoGleKhk#vs%IKt8i%IbTe*gdg000000RI3000000019+@aAi|@b97~G0! +XQB?8_As^WnPDotHzoVsdtr@aSRwVWi2G1l#x)zof7oiPG643gHJ7x;*+(o97D-W +iY6OM0r~W-2xh +K9cV^W63=w?&L0!XQB?8_As^W +nPDotHzoVsdtr@aSRwVWi2G1l#x)ziR}e6rQG)02XJT?*g=|B=zREie$*y(7k2+* +P~cYjROi{baY{3Xl-R~bN~eb0YWfgg^0-1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LMnX>MdwWn +pYocu;h51OfmDVrg_^Z)t7-1pxvG|HJk{=BHQW>(iVt$m2HN5eB?Xzf>dBv8whnK +UZ)@C#Wt^wA&hNfbvI8l{tqo-}{|djZ8YAkJtUQVz<=+25f0@b!lV(1pxvG|HJk{ +=BHQW>(iVt$m2HN5eB?Xzf>dBv8whnKUZ)@C#Wt^wA&hNfbvI8l{tqo-}{|djZ8Y +AkJtUQVz<>3SVL%GX>LMnX>MdwWnpYocxhw=0sseMX>?<6X>I@o0RjmB!}dYur&r +|b)0{BK<2K$A2E0wbR3p=|s`fKKS8%Y#aju4Y+v8xG!`|yM#YZ$vY*ct@ +WCQ{L2V!Y-V{d7000jX82>-+OLFT7dqK>mX$cszrKCL=@F5H{a;)B(Tlt4rog*WC0S0Voadl~A00jX82>-+OLFT7dqK>mX$cszrKCL=@F5H{a;)B(Tlt4rog +*WC5LiQKVQFqtWn*$>bW>$vYy<)T2V!Y-V{d7000jX82>-+OLFT7d-+OLFT7d?<6X>I@o0Rr`G6Jj +IwIj2eqliWu}$@z+_xPw?-wb>Rw7=FYk8VaL=Li5Yl(a@n1+Ku60FILp}Zw|!7cE +!MGSxid=WmW+OY-w?IX=DHe0Rr`G6JjIwIj2eqliWu}$@z+_xPw?-wb>Rw7=FYk8 +VaL=Li5Yl(a@n1+Ku60FILp}Zw|!7cE!MGSxid=WmW -----END STRICT TYPE LIB----- diff --git a/stl/RGB@0.1.0.stl b/stl/RGB@0.1.0.stl index f3df00c2..b2750c6f 100644 Binary files a/stl/RGB@0.1.0.stl and b/stl/RGB@0.1.0.stl differ diff --git a/stl/RGB@0.1.0.sty b/stl/RGB@0.1.0.sty index 7aa3a33d..e0062b67 100644 --- a/stl/RGB@0.1.0.sty +++ b/stl/RGB@0.1.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:2PcZtrPrfQCu27qw8b4Wz4cEqUn2PpgSkDHwF4qVyyrq#russian-child-member + Id: urn:ubideco:stl:Hzv1xPBtQfqcGYeisvS2V9DPj1VRC5WyYfME2RtmuRpu#blitz-english-eric Name: RGB Version: 0.1.0 Description: Consensus layer for RGB smart contracts @@ -8,142 +8,169 @@ License: Apache-2.0 -} +@context typelib RGB -import urn:ubideco:stl:ZtHaBzu9ojbDahaGKEXe5v9DfSDxLERbLkEB23R6Q6V#rhino-cover-frog as CommitVerify --- Imports: --- MerkleProof := urn:ubideco:semid:4E7NDL8Nm1EXtcenS9idAx1LAXvTu2wRdYsxT8Q2hgRC#carol-alamo-denver --- MerkleNode := urn:ubideco:semid:6kxYeCatpncbA9UiTdsFbxbxJdU56x6MdmTRkEeGAv6R#iceberg-rocket-velvet - -import urn:ubideco:stl:5XLKQ1sNryZm9bdFKU2kBY3MPYdZXhchVdQKBbHA3gby#south-strong-welcome as StrictTypes --- Imports: --- Primitive := urn:ubideco:semid:3T3zMmQxuir7TsdjhBLaETJfLH4mr5amAseXDePnzhMT#hobby-cable-puzzle --- Variant := urn:ubideco:semid:3kQKwMdjA637pgAS3nF6SBooJrEbSNemqYtfZUYWinS6#tractor-sofia-company --- TypeSystem := urn:ubideco:semid:47es12nMYaA5M7zMejQHAydsRPW6juta8ensLigXMBDP#linda-yellow-rival --- VariantInfoSemId := urn:ubideco:semid:4Lhtbe9Fk5Xi5w1rYmY6VcNHKiPzvbBE9Z7ox8JYLfGF#star-consul-english --- UnionVariantsSemId := urn:ubideco:semid:5B1DxehrbHq1bwC671nskfn2wVqDjMLkuaS7bpC3VxJk#studio-modern-nuclear --- EnumVariants := urn:ubideco:semid:6Zt75MUKawbZuckCDFLEtanNvFbsoGZo7hdwdy6TJytE#list-sherman-viking --- UnnamedFieldsSemId := urn:ubideco:semid:7mWKWSN4oLP5RHpJp2ofSR2DmPLnoGWnSdaT7XkLjJDL#hippie-world-sandra --- NamedFieldsSemId := urn:ubideco:semid:7t4xRL7UV1zB1pm8nT6mM7LQTKDXrhJtCpXXeY1DdWTi#jordan-kiwi-nickel --- FieldSemId := urn:ubideco:semid:7xPYsYdNDXSyVVY1FFRMkwYzn6ggw8PXV45A8vtdGGrK#speed-patriot-gallery --- SemId := urn:ubideco:semid:8Ckj2p3GLKina636pSKJkj7GB6ft8XeoP4jfGkRUNwtp#cargo-plasma-catalog --- TySemId := urn:ubideco:semid:9CmodzHmcjTizoBRGs6QuGgeBugHz1HinSdWyuXiTKea#vista-edgar-dominic --- Ident := urn:ubideco:semid:9SkVki7nQ7WRGN2ayWjySv7QSh6ftrakdNRbE2sSbUYw#connect-fragile-exile --- Sizing := urn:ubideco:semid:9jnMbAs5A91zjK9KDrLuFH42WtinmB8GY6JE6BMY31hw#canoe-gordon-amazon --- FieldName := urn:ubideco:semid:CK7zqXpkDGwatYDy1bVHoARAq1xTi85DFueWrZdFE7du#orient-spell-talent - -import urn:ubideco:stl:8wHziC7Bxa3BwctUh6EVBanosrvRHecCTPUjkZT4btNd#ruby-heaven-madrid as BPCore --- Imports: --- TapretNodePartner := urn:ubideco:semid:6o6mGBNbDXJCcNgk5ohP6wgXcdXZvYd1ZWy1GMBy5q2#iceberg-poker-active --- ExplicitSealTxid := urn:ubideco:semid:FxnQvXfa6koZmm6uyZCPwnGrMi3UzY588kKN9ipN72L#antenna-darwin-emotion --- TapretProof := urn:ubideco:semid:24LBor5ZVKjGk4uBbEb28w6D7rroV3mpVAntNAWQsYaP#forum-paint-tunnel --- TapretPathProof := urn:ubideco:semid:2LANtvWZDRes61SHKFxtFPzSuTzaKQGCUvYsNowNf3n3#stage-element-update --- AnchorMerkleProofTapretProof := urn:ubideco:semid:2RRuXmkGM51gpruJzNCL6mSFm7nQFrP6zXm6CmNr77uE#arcade-modest-fossil --- Method := urn:ubideco:semid:49Mf3pFa3gZNQXJarv9nKCMrZ3NFn2ME9Q3dCAsXhpAe#trilogy-tahiti-valid --- TapretRightBranch := urn:ubideco:semid:4nZtVVw7QJaMDHYffkHBWhxXSkLXLcJ89qTLZH4Z3xck#basket-prelude-bridge --- BlindSealTxPtr := urn:ubideco:semid:5ircUcbD1UjEKsAKMcvdfjS9UcVCEcs47BWAZ5UDqYdr#austria-icon-waiter --- OpretProof := urn:ubideco:semid:5oMeVsXXeicrdvrCCEZQiKWcrDHy4nQPbaQGhtnwM3ug#segment-ambient-totem --- AnchorMerkleProofOpretProof := urn:ubideco:semid:7mkYAw62Vi8BuyQ16qGg3bgFw8WVtTXUkJoYBv1qoNg4#tape-mental-legacy --- SecretSeal := urn:ubideco:semid:81NKrdc9pBoBjsKaGBVN9wXLG4tKjkK4f8DLj7TNMZxh#santana-domingo-needle --- BlindSealTxid := urn:ubideco:semid:Cu4G4njDjd2mgmz4FsvFAwRKwBpksmZ9CB9AJhSNx5dk#kimono-golf-price --- TxPtr := urn:ubideco:semid:CyRtMpPJkKLX3AdhgY7ZyA7PnYAzCo7yFTeYwwGsUBhn#strange-source-father - -import urn:ubideco:stl:9KALDYR8Nyjq4FdMW6kYoL7vdkWnqPqNuFnmE9qHpNjZ#justice-rocket-type as Std --- Imports: --- Bool := urn:ubideco:semid:7ZhBHGSJm9ixmm8Z9vCX7i5Ga7j5xrW8t11nsb1Cgpnx#laser-madam-maxwell --- AlphaNumLodash := urn:ubideco:semid:8iBe2dh8beD1KUairdqCacEcxAr4h55XfUQN2PspWXjz#north-sound-salsa - -import urn:ubideco:stl:DVtm25LRKU4TjbyZmVxPhvCmctZ6vKkPKqfpU2QsDNUo#exodus-axiom-tommy as AluVM --- Imports: --- LibSite := urn:ubideco:semid:8Q9NNyK2PCcjZ7U7rDGUJBhk8q37hAnWLgSizGLmr56g#mission-papa-mercy --- LibId := urn:ubideco:semid:CFdqBJb1FVEwSwuQp47acj2bCFJgJn9J9NKVdoZuG625#rebel-factor-rodeo - -import urn:ubideco:stl:HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy as Bitcoin --- Imports: --- Vout := urn:ubideco:semid:3HHRtSJW5fnGkdVW1EVDH7B97Y79WhwvKyyfsaBkuQkk#chrome-robin-gallop --- ScriptBytes := urn:ubideco:semid:3Y4AgjkFbDusgo3YqRDWv9BznDeAJEUDEPeEq1mpSkAR#maestro-source-jackson --- TapNodeHash := urn:ubideco:semid:4M8xyvABKKKJseN6Pme5eKrAuusMNMXoY5s6ifsEcreC#crash-culture-jamaica --- LeafScript := urn:ubideco:semid:7SUbonQ62tSaBTPpbZPACQo2NogXodi2mW5WEEDfBvp4#brenda-round-micro --- Txid := urn:ubideco:semid:C1GfCrG7AXu2sFhRBspd7KpJK2YgyTkVy6pty5rZynRs#cowboy-diego-betty --- InternalPk := urn:ubideco:semid:CQjz6cdRfD4cr8oUKmgBUEVkjbcNJ5L8eLc7qGeNHQVu#meter-nerve-chicken --- LeafVer := urn:ubideco:semid:DGELfUvcU62GNQRo7HaMbKDzYQwdYRMW3b91JHd4d3WY#tunnel-lagoon-cowboy --- XOnlyPk := urn:ubideco:semid:J1BbH2Lx8P3yw9G244d92MMTP5jrkiaVzsr6FzRxpfur#evident-finance-promo - - - --- urn:ubideco:semid:EVMd4HiFWvuPQv5JaVPecRY8oyqRNR92gxYUaCFFWqXp#banana-mouse-plaster -data AltLayer1 :: liquid:1 - --- urn:ubideco:semid:AWiT5HsZJueysPSX7FUubH1GjiTnADaHdUv6fNZKxHnB#salmon-taxi-ohio -data AltLayer1Set :: {AltLayer1 ^ ..0xff} --- urn:ubideco:semid:ByCxcZ2hYTTJ8yoUhpUuHaxceQoAjqsxSF9zJkED3JuM#soviet-arsenal-complex -data AluScript :: libs {AluVM.LibId -> ^ ..0xff [Byte]}, entryPoints {[Byte ^ 3] -> AluVM.LibSite {- urn:ubideco:semid:8Q9NNyK2PCcjZ7U7rDGUJBhk8q37hAnWLgSizGLmr56g#mission-papa-mercy -}} --- urn:ubideco:semid:4GL38RVDhs4JkL5phqyF6pguwL6Av8qTUWCVNfGeWdUg#history-joel-ivory -data AnchorSet :: tapret:1 BPCore.AnchorMerkleProofTapretProof {- urn:ubideco:semid:2RRuXmkGM51gpruJzNCL6mSFm7nQFrP6zXm6CmNr77uE#arcade-modest-fossil -} - | opret BPCore.AnchorMerkleProofOpretProof {- urn:ubideco:semid:7mkYAw62Vi8BuyQ16qGg3bgFw8WVtTXUkJoYBv1qoNg4#tape-mental-legacy -} - | dual (tapret BPCore.AnchorMerkleProofTapretProof {- urn:ubideco:semid:2RRuXmkGM51gpruJzNCL6mSFm7nQFrP6zXm6CmNr77uE#arcade-modest-fossil -}, opret BPCore.AnchorMerkleProofOpretProof {- urn:ubideco:semid:7mkYAw62Vi8BuyQ16qGg3bgFw8WVtTXUkJoYBv1qoNg4#tape-mental-legacy -}) --- urn:ubideco:semid:8N8sQGRwEmmxKLwUiE4GQ89ziPzgBi7BfSjaNz9ozRKv#verbal-slow-lemon -data AnchoredBundle :: anchor XChainAnchorSet, bundle TransitionBundle --- urn:ubideco:semid:EZoxBpGenvb9UVze1zuwuEHqQJAqw2m3T8za5gbX1JZk#buzzer-pattern-craft -data AssetTag :: [Byte ^ 32] --- urn:ubideco:semid:86oEReUQtpkBF5ag57qt8QYeRoADcnsYVWUhd1hZYF9B#police-castle-fractal -data AssignRevealedAttachBlindSealTxPtr :: confidential (seal XChainSecretSeal, state ConcealedAttach) +import BPCore#c8Tnib31q1p7szyPukEGDoQzJQ5qJwPCn5uZCHUXzB9#cupid-metro-warning + use TapretNodePartner#iceberg-poker-active + use ExplicitSealTxid#antenna-darwin-emotion + use TapretProof#forum-paint-tunnel + use TapretPathProof#stage-element-update + use Method#trilogy-tahiti-valid + use TapretRightBranch#basket-prelude-bridge + use BlindSealTxPtr#austria-icon-waiter + use OpretProof#segment-ambient-totem + use SecretSeal#santana-domingo-needle + use AnchorMerkleProofOpretProof#mammal-ethnic-crown + use BlindSealTxid#kimono-golf-price + use TxPtr#strange-source-father + use AnchorMerkleProofTapretProof#forward-chemist-panda + +import CommitVerify#57sPvZcwQaziec3ux249XoCMhziQpKB8Yw99U5oRwfqW#deluxe-safari-random + use MerkleHash#culture-metro-modular + use StrictHash#cheese-final-locate + use MerkleProof#labor-hilton-magenta + +import StrictTypes#5teCJyjMWaxbQK8vdga2soWh2U7waERS3ev8KHShJcgv#trumpet-scratch-pelican + use VariantName#snow-gray-extreme + use Primitive#hobby-cable-puzzle + use VariantInfoSemId#clone-panama-guru + use UnnamedFieldsSemId#hippie-world-sandra + use NamedFieldsSemId#jordan-kiwi-nickel + use FieldSemId#speed-patriot-gallery + use SemId#cargo-plasma-catalog + use Ident#connect-fragile-exile + use Sizing#canoe-gordon-amazon + use EnumVariants#correct-dream-albert + use TypeSystem#panel-data-lazarus + use FieldName#orient-spell-talent + use TySemId#kimono-catalog-mango + use Variant#textile-cowboy-dragon + use UnionVariantsSemId#iceberg-road-crack + +import AluVM#DVtm25LRKU4TjbyZmVxPhvCmctZ6vKkPKqfpU2QsDNUo#exodus-axiom-tommy + use LibSite#mission-papa-mercy + use LibId#rebel-factor-rodeo + +import Std#DzTvt9gGhPUKD8Dkkjk9PDBhkJ4gtWxXWQjxnmUYLNrs#voyage-kimono-disco + use Bool#laser-madam-maxwell + use AlphaNumLodash#north-sound-salsa + +import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy + use Vout#chrome-robin-gallop + use ScriptBytes#maestro-source-jackson + use TapNodeHash#crash-culture-jamaica + use LeafScript#brenda-round-micro + use Txid#cowboy-diego-betty + use InternalPk#meter-nerve-chicken + use LeafVer#tunnel-lagoon-cowboy + use XOnlyPk#evident-finance-promo + + +@mnemonic(banana-mouse-plaster) +data AltLayer1 : liquid#1 + + +@mnemonic(salmon-taxi-ohio) +data AltLayer1Set : {AltLayer1 ^ ..0xff} + +@mnemonic(soviet-arsenal-complex) +data AluScript : libs {AluVM.LibId -> ^ ..0xff [Byte]}, entryPoints {[Byte ^ 3] -> AluVM.LibSite#mission-papa-mercy} + +@mnemonic(aurora-blast-brown) +data AnchorSet : tapret#1 BPCore.AnchorMerkleProofTapretProof#forward-chemist-panda + | opret BPCore.AnchorMerkleProofOpretProof#mammal-ethnic-crown + | dual (tapret BPCore.AnchorMerkleProofTapretProof#forward-chemist-panda, opret BPCore.AnchorMerkleProofOpretProof#mammal-ethnic-crown) + +@mnemonic(verbal-slow-lemon) +data AnchoredBundle : anchor XChainAnchorSet, bundle TransitionBundle + +@mnemonic(buzzer-pattern-craft) +data AssetTag : [Byte ^ 32] + +@mnemonic(police-castle-fractal) +data AssignRevealedAttachBlindSealTxPtr : confidential (seal XChainSecretSeal, state ConcealedAttach) | confidentialState (seal XChainBlindSealTxPtr, state ConcealedAttach) | confidentialSeal (seal XChainSecretSeal, state RevealedAttach) | revealed (seal XChainBlindSealTxPtr, state RevealedAttach) --- urn:ubideco:semid:GMetkMHmE6pvWF7v4cVkh5FQW1cBWSb4F38oge4Le8wG#parker-locate-madrid -data AssignRevealedAttachBlindSealTxid :: confidential (seal XChainSecretSeal, state ConcealedAttach) + +@mnemonic(parker-locate-madrid) +data AssignRevealedAttachBlindSealTxid : confidential (seal XChainSecretSeal, state ConcealedAttach) | confidentialState (seal XChainBlindSealTxid, state ConcealedAttach) | confidentialSeal (seal XChainSecretSeal, state RevealedAttach) | revealed (seal XChainBlindSealTxid, state RevealedAttach) --- urn:ubideco:semid:AbqXzWbeC4QTe3RGDg1tgZoq8Cg79wPfgxC418mbLZWc#fabric-exotic-road -data AssignRevealedDataBlindSealTxPtr :: confidential (seal XChainSecretSeal, state ConcealedData) + +@mnemonic(fabric-exotic-road) +data AssignRevealedDataBlindSealTxPtr : confidential (seal XChainSecretSeal, state ConcealedData) | confidentialState (seal XChainBlindSealTxPtr, state ConcealedData) | confidentialSeal (seal XChainSecretSeal, state RevealedData) | revealed (seal XChainBlindSealTxPtr, state RevealedData) --- urn:ubideco:semid:8DRTcwcPXjALBUhs8QSutcQj4KyxejP6nVGpmSPcma5s#iron-design-king -data AssignRevealedDataBlindSealTxid :: confidential (seal XChainSecretSeal, state ConcealedData) + +@mnemonic(iron-design-king) +data AssignRevealedDataBlindSealTxid : confidential (seal XChainSecretSeal, state ConcealedData) | confidentialState (seal XChainBlindSealTxid, state ConcealedData) | confidentialSeal (seal XChainSecretSeal, state RevealedData) | revealed (seal XChainBlindSealTxid, state RevealedData) --- urn:ubideco:semid:HpDAZ3iWVWNFP5oUrXNSifNop1wHGmfK7csUXkWbf3jE#avatar-house-ammonia -data AssignRevealedValueBlindSealTxPtr :: confidential (seal XChainSecretSeal, state ConcealedFungible) + +@mnemonic(avatar-house-ammonia) +data AssignRevealedValueBlindSealTxPtr : confidential (seal XChainSecretSeal, state ConcealedFungible) | confidentialState (seal XChainBlindSealTxPtr, state ConcealedFungible) | confidentialSeal (seal XChainSecretSeal, state RevealedFungible) | revealed (seal XChainBlindSealTxPtr, state RevealedFungible) --- urn:ubideco:semid:DFdcr9izr4NmVJJojKFXWPPYnWVM3RNU2K6oxMhDZmYx#popular-vista-urgent -data AssignRevealedValueBlindSealTxid :: confidential (seal XChainSecretSeal, state ConcealedFungible) + +@mnemonic(popular-vista-urgent) +data AssignRevealedValueBlindSealTxid : confidential (seal XChainSecretSeal, state ConcealedFungible) | confidentialState (seal XChainBlindSealTxid, state ConcealedFungible) | confidentialSeal (seal XChainSecretSeal, state RevealedFungible) | revealed (seal XChainBlindSealTxid, state RevealedFungible) --- urn:ubideco:semid:6Nr3ZJAAV8ukSmVJHChmUkbGFzdAbCjzXbmoxrDNcmwc#slogan-change-green -data AssignVoidStateBlindSealTxPtr :: confidential (seal XChainSecretSeal, state VoidState) + +@mnemonic(slogan-change-green) +data AssignVoidStateBlindSealTxPtr : confidential (seal XChainSecretSeal, state VoidState) | confidentialState (seal XChainBlindSealTxPtr, state VoidState) | confidentialSeal (seal XChainSecretSeal, state VoidState) | revealed (seal XChainBlindSealTxPtr, state VoidState) --- urn:ubideco:semid:BqQbSTu2tdDVLMnTx2rpKFYF47oEwrc2fGrTZGzDrueV#classic-cubic-ingrid -data AssignVoidStateBlindSealTxid :: confidential (seal XChainSecretSeal, state VoidState) + +@mnemonic(classic-cubic-ingrid) +data AssignVoidStateBlindSealTxid : confidential (seal XChainSecretSeal, state VoidState) | confidentialState (seal XChainBlindSealTxid, state VoidState) | confidentialSeal (seal XChainSecretSeal, state VoidState) | revealed (seal XChainBlindSealTxid, state VoidState) --- urn:ubideco:semid:A9sThAqgwKPfuJcR4GDfTQHUAbbS5sbEXG5XVk7FZHEg#hunter-hello-retro -data AssignmentType :: U16 --- urn:ubideco:semid:Bu8iXz4MmJnuUMW6AFAepa8BAa4DXLVAMdrNrkLh3S7a#granite-history-canvas -data AssignmentsBlindSealTxPtr :: {AssignmentType -> ^ ..0xff TypedAssignsBlindSealTxPtr} --- urn:ubideco:semid:7ZGXPWXsK641fCB8nipeDy4ZR9BTQ9Q8c9E2vj2ufNq5#center-nevada-promise -data AssignmentsBlindSealTxid :: {AssignmentType -> ^ ..0xff TypedAssignsBlindSealTxid} --- urn:ubideco:semid:9uzoSojhudYvNZYgTmJ5sMwwxzLtdLnfUeudT6Ro8i23#delta-member-agenda -data AttachId :: [Byte ^ 32] --- urn:ubideco:semid:9zzp5XyDaLvZSGhCEWtey1Y7xdD1soEYdGaimjyZexyf#agenda-ivory-blast -data BlindingFactor :: [Byte ^ 32] --- urn:ubideco:semid:HyVyGxhRswAZ3BHJqx6PKmcEGCUSHaL1Rc7qxxi811qE#pizza-natural-cyclone -data ConcealedAttach :: [Byte ^ 32] --- urn:ubideco:semid:8YQWVpKJBaYsAwrXvuLDNEDEKRZxfoQJpu1G7X2ZN1tL#mirage-invite-newton -data ConcealedData :: [Byte ^ 32] --- urn:ubideco:semid:5UUVzBtqMkymxQmDry4ay4aoXLLojTQQyHGrdSWis3Jt#window-basket-actor -data ConcealedFungible :: commitment PedersenCommitment, rangeProof RangeProof --- urn:ubideco:semid:AKAMGBAMmu7DZ9kMpwqSfDepEJf5PUB6BsufJ4zz88QB#beast-korea-perfect -data ContractHistory :: schemaId SchemaId + +@mnemonic(hunter-hello-retro) +data AssignmentType : U16 + +@mnemonic(explain-nato-passage) +data AssignmentWitness : absent () + | present XChainTxid + +@mnemonic(granite-history-canvas) +data AssignmentsBlindSealTxPtr : {AssignmentType -> ^ ..0xff TypedAssignsBlindSealTxPtr} + +@mnemonic(center-nevada-promise) +data AssignmentsBlindSealTxid : {AssignmentType -> ^ ..0xff TypedAssignsBlindSealTxid} + +@mnemonic(delta-member-agenda) +data AttachId : [Byte ^ 32] + +@mnemonic(goblin-accent-number) +data BaseCommitment : schemaId SchemaId + , testnet Std.Bool#laser-madam-maxwell + , altLayers1 CommitVerify.StrictHash#cheese-final-locate + +@mnemonic(agenda-ivory-blast) +data BlindingFactor : [Byte ^ 32] + +@mnemonic(pizza-natural-cyclone) +data ConcealedAttach : [Byte ^ 32] + +@mnemonic(mirage-invite-newton) +data ConcealedData : [Byte ^ 32] + +@mnemonic(window-basket-actor) +data ConcealedFungible : commitment PedersenCommitment, rangeProof RangeProof + +@mnemonic(beast-korea-perfect) +data ContractHistory : schemaId SchemaId , rootSchemaId SchemaId? , contractId ContractId , global {GlobalStateType -> ^ ..0xff {GlobalOrd -> ^ ..0xffffffff RevealedData}} @@ -151,115 +178,168 @@ data ContractHistory :: schemaId SchemaId , fungibles {OutputAssignmentRevealedValue ^ ..0xffffffff} , data {OutputAssignmentRevealedData ^ ..0xffffffff} , attach {OutputAssignmentRevealedAttach ^ ..0xffffffff} --- urn:ubideco:semid:Bho42Xw8wPy2nWxgz6H51rNdBBusaPyrVQT8VypvpZ3w#alarm-danube-vampire -data ContractId :: [Byte ^ 32] --- urn:ubideco:semid:AGRkqu4XCz7HJnTiG3DbE6xvMrU1D9vwH2gtJiuHtAyQ#client-major-stamp -data ContractState :: schema SchemaSchema, history ContractHistory --- urn:ubideco:semid:4wCasNtcxRnicsUakyXzzRdzemmUk8deBzrCqyRLiesL#deluxe-history-acrobat -data Extension :: ffv Ffv + +@mnemonic(alarm-danube-vampire) +data ContractId : [Byte ^ 32] + +@mnemonic(client-major-stamp) +data ContractState : schema SchemaSchema, history ContractHistory + +@mnemonic(diana-archive-liquid) +data DataState : [Byte] + +@mnemonic(cubic-inca-maestro) +data Extension : ffv Ffv , contractId ContractId , extensionType ExtensionType - , metadata [Byte] + , metadata Metadata , globals GlobalState , assignments AssignmentsBlindSealTxid , redeemed Redeemed , valencies Valencies --- urn:ubideco:semid:5EA8tZw7MhL13SCX33m98QLykB6iZFJ3ynukkiCqnh6U#peace-tiger-elastic -data ExtensionSchema :: metadata StrictTypes.SemId {- urn:ubideco:semid:8Ckj2p3GLKina636pSKJkj7GB6ft8XeoP4jfGkRUNwtp#cargo-plasma-catalog -} + +@mnemonic(peace-tiger-elastic) +data ExtensionSchema : metadata StrictTypes.SemId#cargo-plasma-catalog , globals {GlobalStateType -> ^ ..0xff Occurrences} , redeems {ValencyType ^ ..0xff} , assignments {AssignmentType -> ^ ..0xff Occurrences} , valencies {ValencyType ^ ..0xff} --- urn:ubideco:semid:7m9MHRdHSXnhYiheDeXybxnHAxPRgs84USnVELFH98Cd#mission-salsa-parole -data ExtensionType :: U16 --- urn:ubideco:semid:FiMEyh3t5FKEsUqVTgQFYJ5XfJF9m2RwKMN9NckympSG#silence-motel-toronto -data Ffv :: U16 --- urn:ubideco:semid:CD8fR4UCdn4ZE6Y6bNPFkDpXdMCMH1Y8nVPx7NGqqYHB#natasha-profit-winter -data FungibleState :: bits64:8 U64 --- urn:ubideco:semid:HpiuYTT7BuhCmoNs2GrwNrHNUx3i3yf6GjDiFphLKeQV#profit-bazooka-present -data FungibleType :: unsigned64Bit:8 - --- urn:ubideco:semid:F7ZK3wjiiBY57d8tMRbXW6nsDb86Lnjbq1GXRvbGv34c#relax-emotion-nitro -data Genesis :: ffv Ffv + +@mnemonic(mission-salsa-parole) +data ExtensionType : U16 + +@mnemonic(silence-motel-toronto) +data Ffv : U16 + +@mnemonic(natasha-profit-winter) +data FungibleState : bits64#8 U64 + +@mnemonic(profit-bazooka-present) +data FungibleType : unsigned64Bit#8 + + +@mnemonic(darwin-between-pilot) +data Genesis : ffv Ffv , schemaId SchemaId - , testnet Std.Bool {- urn:ubideco:semid:7ZhBHGSJm9ixmm8Z9vCX7i5Ga7j5xrW8t11nsb1Cgpnx#laser-madam-maxwell -} + , testnet Std.Bool#laser-madam-maxwell , altLayers1 AltLayer1Set - , metadata [Byte] + , metadata Metadata , globals GlobalState , assignments AssignmentsBlindSealTxid , valencies Valencies --- urn:ubideco:semid:7vb54CDdNg8xJtKZjnbYReqaxHAdmbfoFezH8CsLQWsS#andrea-amigo-grid -data GenesisSchema :: metadata StrictTypes.SemId {- urn:ubideco:semid:8Ckj2p3GLKina636pSKJkj7GB6ft8XeoP4jfGkRUNwtp#cargo-plasma-catalog -} + +@mnemonic(andrea-amigo-grid) +data GenesisSchema : metadata StrictTypes.SemId#cargo-plasma-catalog , globals {GlobalStateType -> ^ ..0xff Occurrences} , assignments {AssignmentType -> ^ ..0xff Occurrences} , valencies {ValencyType ^ ..0xff} --- urn:ubideco:semid:9UUjMhuGNyLiWhT9hC2wCVfzBfABUHMtqcEqVykQTTBm#north-llama-empire -data GlobalOrd :: witnessAnchor WitnessAnchor?, idx U16 --- urn:ubideco:semid:Ekg4cNmYPqSZn14jQ4GD2tStBFX6S6aUk5bmLDRTaap8#ranger-middle-roman -data GlobalState :: {GlobalStateType -> ^ ..0xff GlobalValues} --- urn:ubideco:semid:ES98zed1FQ1XHZJptvv3ecWF6XFCdQsG1NvtkADYkugP#night-mixer-monaco -data GlobalStateSchema :: semId StrictTypes.SemId {- urn:ubideco:semid:8Ckj2p3GLKina636pSKJkj7GB6ft8XeoP4jfGkRUNwtp#cargo-plasma-catalog -}, maxItems U16 --- urn:ubideco:semid:FQ6qHu9gQzjZu3i7dasU7T1PGi4qZi1a4goxJbHxHkbU#seminar-major-tape -data GlobalStateType :: U16 --- urn:ubideco:semid:AnBpS97EbffL9PYZLfHKESeLoNeosEbLinQM9VqGeG2x#bicycle-europe-shampoo -data GlobalValues :: [RevealedData ^ 1..] --- urn:ubideco:semid:MXcKv35FafL8vRPoxfaZaG96L3bLiNsTtfsJiCLwc23#classic-chariot-domino -data Input :: prevOut Opout, reserved ReservedByte --- urn:ubideco:semid:4Pv4CN7nfHbbKyoEBvRVrnihhv7uP8y6QNi6FNRCNjUq#puzzle-guru-oregano -data Inputs :: {Input ^ ..0xff} --- urn:ubideco:semid:5TNhPhpZzE6iDWXaUpdsTAwVsCZj5e9Z8AqFU1ii6HHa#light-nelson-brain -data MediaType :: any:255 - --- urn:ubideco:semid:33ug4TwTBFQxz7D3YdFmwpKET415dv5zQRh5CkavC5fL#deal-orca-aztec -data NoiseDumb :: [Byte ^ 512] --- urn:ubideco:semid:4gjtVBchJQ5f1aAzoyxYWeGp6qZi9dPudJCbWKYKhw1a#unicorn-empire-mama -data Occurrences :: min U16, max U16 --- urn:ubideco:semid:B5hRc3ekuQsCAgsk8dmPVfytVDbvECJ3g2ANqrwSLE2p#slow-samuel-ceramic -data OpId :: [Byte ^ 32] --- urn:ubideco:semid:8EYQPboNCwpv9Nt9FQ47idjzNwCFBtDzRUmAuYEheahW#shallow-match-tokyo -data Opout :: op OpId + +@mnemonic(north-llama-empire) +data GlobalOrd : witnessAnchor WitnessAnchor?, idx U16 + +@mnemonic(ranger-middle-roman) +data GlobalState : {GlobalStateType -> ^ ..0xff GlobalValues} + +@mnemonic(night-mixer-monaco) +data GlobalStateSchema : semId StrictTypes.SemId#cargo-plasma-catalog, maxItems U16 + +@mnemonic(seminar-major-tape) +data GlobalStateType : U16 + +@mnemonic(bicycle-europe-shampoo) +data GlobalValues : [RevealedData ^ 1..] + +@mnemonic(joseph-price-summer) +data Input : prevOut Opout, reserved ReservedBytes2 + +@mnemonic(canada-chicken-analyze) +data InputMap : {Bitcoin.Vout -> ^ 1.. OpId} + +@mnemonic(puzzle-guru-oregano) +data Inputs : {Input ^ ..0xff} + +@mnemonic(light-nelson-brain) +data MediaType : any#255 + + +@mnemonic(moment-patriot-patron) +data Metadata : [Byte] + +@mnemonic(deal-orca-aztec) +data NoiseDumb : [Byte ^ 512] + +@mnemonic(unicorn-empire-mama) +data Occurrences : min U16, max U16 + +@mnemonic(canyon-climax-promo) +data OpCommitment : ffv Ffv + , opType TypeCommitment + , metadata CommitVerify.StrictHash#cheese-final-locate + , globals CommitVerify.MerkleHash#culture-metro-modular + , inputs CommitVerify.MerkleHash#culture-metro-modular + , assignments CommitVerify.MerkleHash#culture-metro-modular + , redeemed CommitVerify.StrictHash#cheese-final-locate + , valencies CommitVerify.StrictHash#cheese-final-locate + +@mnemonic(slow-samuel-ceramic) +data OpId : [Byte ^ 32] + +@mnemonic(shallow-match-tokyo) +data Opout : op OpId , ty AssignmentType , no U16 --- urn:ubideco:semid:6D7oEZGP4eHYSgfJeP1Dyc6Qgc4ph4budoDSuFmtJ5zj#jungle-quota-front -data OutputAssignmentRevealedAttach :: opout Opout + +@mnemonic(think-record-medusa) +data OutputAssignmentRevealedAttach : opout Opout , seal XChainExplicitSealTxid , state RevealedAttach - , witness XChainTxid? --- urn:ubideco:semid:7eRgyX7MZuLw9bdqGZRMJezC36u53CQ8vUsrwpuU3ATz#shake-vega-snow -data OutputAssignmentRevealedData :: opout Opout + , witness AssignmentWitness + +@mnemonic(nectar-nectar-capsule) +data OutputAssignmentRevealedData : opout Opout , seal XChainExplicitSealTxid , state RevealedData - , witness XChainTxid? --- urn:ubideco:semid:4SNmowDSb3dv7WASKKpiRRWsmr9t5VjULSmYRPV3CcyC#burma-plate-degree -data OutputAssignmentRevealedValue :: opout Opout + , witness AssignmentWitness + +@mnemonic(control-boris-motif) +data OutputAssignmentRevealedValue : opout Opout , seal XChainExplicitSealTxid , state RevealedFungible - , witness XChainTxid? --- urn:ubideco:semid:3EAtrfNu9ptxdaoZkCzj2UvzUMSwDci52kkgJoYBWuz3#garden-eagle-bagel -data OutputAssignmentVoidState :: opout Opout + , witness AssignmentWitness + +@mnemonic(avatar-beatles-protein) +data OutputAssignmentVoidState : opout Opout , seal XChainExplicitSealTxid , state VoidState - , witness XChainTxid? --- urn:ubideco:semid:5twbh2U5hyaowidwum1iRNCqebBLxTuZTuNPt3SaRT13#nepal-delta-earth -data PedersenCommitment :: [Byte ^ 33] --- urn:ubideco:semid:73TpZuiyRWAuV9GRSj9H7tDf3JXwVvmT4teTXhKxdue1#invent-stock-result -data RangeProof :: placeholder:255 NoiseDumb --- urn:ubideco:semid:9gee8HH6yNbqyLe9tA3N5zcCTReMDe6y2yfcybWyYApm#scoop-press-scuba -data Redeemed :: {ValencyType -> ^ ..0xff OpId} --- urn:ubideco:semid:5ezr9uJrSdzez89fTCRWvKwGv6coMmQeXizK371oYdZ2#balloon-justin-place -data ReservedByte :: U8 --- urn:ubideco:semid:2odg1kiUEtjxBa9MzQmkyDPxKe2hdt6aASEGQTEHAJYU#cigar-network-event -data RevealedAttach :: id AttachId + , witness AssignmentWitness + +@mnemonic(nepal-delta-earth) +data PedersenCommitment : [Byte ^ 33] + +@mnemonic(invent-stock-result) +data RangeProof : placeholder#255 NoiseDumb + +@mnemonic(scoop-press-scuba) +data Redeemed : {ValencyType -> ^ ..0xff OpId} + +@mnemonic(pocket-habitat-soviet) +data ReservedBytes2 : [Byte ^ 2] + +@mnemonic(cigar-network-event) +data RevealedAttach : id AttachId , mediaType MediaType , salt U64 --- urn:ubideco:semid:3DcMJ3YRokNwKN8Cce1ZqsYpiTEuto7EY1szCMEDH97A#velvet-david-manual -data RevealedData :: [Byte] --- urn:ubideco:semid:5rdcWxUW6LxoRQKrPs2EszvTTPrjmKKWPzHeZi1FjWhX#canal-pagoda-ralph -data RevealedFungible :: value FungibleState + +@mnemonic(ivory-bogart-stock) +data RevealedData : value DataState, salt U128 + +@mnemonic(canal-pagoda-ralph) +data RevealedFungible : value FungibleState , blinding BlindingFactor , tag AssetTag --- urn:ubideco:semid:Df1oP2CtYZ1aULEoV5oicwQkNVgGkaFuqW3dktV847k5#margo-mission-virus -data Schema :: ffv Ffv + +@mnemonic(fresh-beatles-empire) +data Schema : ffv Ffv , subsetOf ()? , globalTypes {GlobalStateType -> ^ ..0xff GlobalStateSchema} , ownedTypes {AssignmentType -> ^ ..0xff StateSchema} @@ -267,12 +347,14 @@ data Schema :: ffv Ffv , genesis GenesisSchema , extensions {ExtensionType -> ^ ..0xff ExtensionSchema} , transitions {TransitionType -> ^ ..0xff TransitionSchema} - , typeSystem StrictTypes.TypeSystem {- urn:ubideco:semid:47es12nMYaA5M7zMejQHAydsRPW6juta8ensLigXMBDP#linda-yellow-rival -} + , typeSystem StrictTypes.TypeSystem#panel-data-lazarus , script Script --- urn:ubideco:semid:AyzbMn4ux89LLU8ho1L4pQa5TXsmRdHd79oh6SXdrCmd#garcia-smoke-ozone -data SchemaId :: [Byte ^ 32] --- urn:ubideco:semid:AjnKkNbkCAtjJaTJUW2F36wcPEApCtTWCzm6RUWBVQzB#tourist-monday-exile -data SchemaSchema :: ffv Ffv + +@mnemonic(garcia-smoke-ozone) +data SchemaId : [Byte ^ 32] + +@mnemonic(heaven-object-august) +data SchemaSchema : ffv Ffv , subsetOf Schema? , globalTypes {GlobalStateType -> ^ ..0xff GlobalStateSchema} , ownedTypes {AssignmentType -> ^ ..0xff StateSchema} @@ -280,73 +362,99 @@ data SchemaSchema :: ffv Ffv , genesis GenesisSchema , extensions {ExtensionType -> ^ ..0xff ExtensionSchema} , transitions {TransitionType -> ^ ..0xff TransitionSchema} - , typeSystem StrictTypes.TypeSystem {- urn:ubideco:semid:47es12nMYaA5M7zMejQHAydsRPW6juta8ensLigXMBDP#linda-yellow-rival -} + , typeSystem StrictTypes.TypeSystem#panel-data-lazarus , script Script --- urn:ubideco:semid:HyVVQCc7o1wnC3oo1VTHzcpMuVsvzFBTnSFe6xVSiDAV#process-media-second -data Script :: aluVm AluScript --- urn:ubideco:semid:tECDKfnyyGZgwoorc1VynUBq9unv34u9WvRBUTduoRK#report-agatha-level -data StateSchema :: declarative () + +@mnemonic(process-media-second) +data Script : aluVm AluScript + +@mnemonic(report-agatha-level) +data StateSchema : declarative () | fungible FungibleType - | structured StrictTypes.SemId {- urn:ubideco:semid:8Ckj2p3GLKina636pSKJkj7GB6ft8XeoP4jfGkRUNwtp#cargo-plasma-catalog -} + | structured StrictTypes.SemId#cargo-plasma-catalog | attachment MediaType --- urn:ubideco:semid:GLm25xw5WvH5UBJHQw6FVyZbAHYVjXtS1HtkYVPJ1FjT#folio-barbara-guru -data Transition :: ffv Ffv + +@mnemonic(morph-romeo-float) +data Transition : ffv Ffv , contractId ContractId , transitionType TransitionType - , metadata [Byte] + , metadata Metadata , globals GlobalState , inputs Inputs , assignments AssignmentsBlindSealTxPtr , valencies Valencies --- urn:ubideco:semid:LnohmzqG7bkCL7hAjWd2tUrvEP1Pe5C6oiv5r5KjF2G#boxer-nadia-alias -data TransitionBundle :: inputMap {Bitcoin.Vout -> ^ 1.. OpId}, knownTransitions {OpId -> ^ 1.. Transition} --- urn:ubideco:semid:4d7FmcvNey5X175gyggcn4wftcf7mtGyn6N4r6Ek4roX#fiction-caramel-fractal -data TransitionSchema :: metadata StrictTypes.SemId {- urn:ubideco:semid:8Ckj2p3GLKina636pSKJkj7GB6ft8XeoP4jfGkRUNwtp#cargo-plasma-catalog -} + +@mnemonic(museum-result-logic) +data TransitionBundle : inputMap InputMap, knownTransitions {OpId -> ^ 1.. Transition} + +@mnemonic(fiction-caramel-fractal) +data TransitionSchema : metadata StrictTypes.SemId#cargo-plasma-catalog , globals {GlobalStateType -> ^ ..0xff Occurrences} , inputs {AssignmentType -> ^ ..0xff Occurrences} , assignments {AssignmentType -> ^ ..0xff Occurrences} , valencies {ValencyType ^ ..0xff} --- urn:ubideco:semid:4XEmzMLZTXc4XB3njvemMq5qdMmx5EKJPAXpJaBPrqCb#puma-joshua-evita -data TransitionType :: U16 --- urn:ubideco:semid:Gbg8NjDV5x6NnhVzmqksPgAc2hgYzMNcgiu4iHggmQcB#orchid-season-bishop -data TypedAssignsBlindSealTxPtr :: declarative [AssignVoidStateBlindSealTxPtr] + +@mnemonic(puma-joshua-evita) +data TransitionType : U16 + +@mnemonic(medusa-amigo-reunion) +data TypeCommitment : genesis BaseCommitment + | transition (ContractId, TransitionType) + | extension (ContractId, ExtensionType) + +@mnemonic(orchid-season-bishop) +data TypedAssignsBlindSealTxPtr : declarative [AssignVoidStateBlindSealTxPtr] | fungible [AssignRevealedValueBlindSealTxPtr] | structured [AssignRevealedDataBlindSealTxPtr] - | attachment:255 [AssignRevealedAttachBlindSealTxPtr] --- urn:ubideco:semid:5X4gpjBJD2jiYSSTYrmEb3QZPxHRFDo4TwgUhuZjLVW4#rondo-roman-expand -data TypedAssignsBlindSealTxid :: declarative [AssignVoidStateBlindSealTxid] + | attachment#255 [AssignRevealedAttachBlindSealTxPtr] + +@mnemonic(rondo-roman-expand) +data TypedAssignsBlindSealTxid : declarative [AssignVoidStateBlindSealTxid] | fungible [AssignRevealedValueBlindSealTxid] | structured [AssignRevealedDataBlindSealTxid] - | attachment:255 [AssignRevealedAttachBlindSealTxid] --- urn:ubideco:semid:FXixNMTaiMJMqp5qQCyb67oPrzryjAXxsk6kvsFQoHTi#andy-mango-brother -data Valencies :: {ValencyType ^ ..0xff} --- urn:ubideco:semid:5mswXMrudHpJEnuoLA86YY2VHN5iL56hmKcmh5k1h3e5#palma-exit-pupil -data ValencyType :: U16 --- urn:ubideco:semid:49HkbZvGaJE3phHjLBMQCR3NK1sGA462HJr5BkqQ6YQr#nectar-ceramic-driver -data VoidState :: () --- urn:ubideco:semid:HtyS3FW8duiA8o1TV13jiK5BUJtebY1JvghTkz9sVuNM#henry-prepare-company -data WitnessAnchor :: witnessOrd WitnessOrd, witnessId XChainTxid --- urn:ubideco:semid:JAhqqYxn4oDEDefAeAHFcAtNQJqQBHo6q5xqbviV3L3q#jacket-fiction-sound -data WitnessOrd :: onChain WitnessPos + | attachment#255 [AssignRevealedAttachBlindSealTxid] + +@mnemonic(andy-mango-brother) +data Valencies : {ValencyType ^ ..0xff} + +@mnemonic(palma-exit-pupil) +data ValencyType : U16 + +@mnemonic(nectar-ceramic-driver) +data VoidState : () + +@mnemonic(henry-prepare-company) +data WitnessAnchor : witnessOrd WitnessOrd, witnessId XChainTxid + +@mnemonic(jacket-fiction-sound) +data WitnessOrd : onChain WitnessPos | offChain () --- urn:ubideco:semid:zaGYZruf2pxiZqk1bjmoivxK8DkFycoyjQB52uHYhGL#robert-average-artist -data WitnessPos :: height U32, timestamp I64 --- urn:ubideco:semid:7ypgzk2JFQpQQbtUFua1uyGu6N7aUxkiXokmjrJDNQnq#floor-emotion-riviera -data XChainAnchorSet :: bitcoin AnchorSet + +@mnemonic(robert-average-artist) +data WitnessPos : height U32, timestamp I64 + +@mnemonic(floor-emotion-riviera) +data XChainAnchorSet : bitcoin AnchorSet | liquid AnchorSet --- urn:ubideco:semid:Ag5MktqPQsAWFoJEaUfNw6AvjYtLFXMwupw9chdEwEKE#prime-loyal-escort -data XChainBlindSealTxPtr :: bitcoin BPCore.BlindSealTxPtr {- urn:ubideco:semid:5ircUcbD1UjEKsAKMcvdfjS9UcVCEcs47BWAZ5UDqYdr#austria-icon-waiter -} - | liquid BPCore.BlindSealTxPtr {- urn:ubideco:semid:5ircUcbD1UjEKsAKMcvdfjS9UcVCEcs47BWAZ5UDqYdr#austria-icon-waiter -} --- urn:ubideco:semid:9kefL6S8Tr5a7hMTPg6M8Ruh9Da7s3LV6L4HJDQH69vJ#biology-domain-domain -data XChainBlindSealTxid :: bitcoin BPCore.BlindSealTxid {- urn:ubideco:semid:Cu4G4njDjd2mgmz4FsvFAwRKwBpksmZ9CB9AJhSNx5dk#kimono-golf-price -} - | liquid BPCore.BlindSealTxid {- urn:ubideco:semid:Cu4G4njDjd2mgmz4FsvFAwRKwBpksmZ9CB9AJhSNx5dk#kimono-golf-price -} --- urn:ubideco:semid:F6RPJgZMGop2K5QBdWK1bP57ifXo5g76Jet1fEtbi3Wh#ozone-quick-hippie -data XChainExplicitSealTxid :: bitcoin BPCore.ExplicitSealTxid {- urn:ubideco:semid:FxnQvXfa6koZmm6uyZCPwnGrMi3UzY588kKN9ipN72L#antenna-darwin-emotion -} - | liquid BPCore.ExplicitSealTxid {- urn:ubideco:semid:FxnQvXfa6koZmm6uyZCPwnGrMi3UzY588kKN9ipN72L#antenna-darwin-emotion -} --- urn:ubideco:semid:FmzeQkRM31bz3UNNTZTV2DWDyCMVSabzQWcdb1PpL2Ao#palace-random-taxi -data XChainSecretSeal :: bitcoin BPCore.SecretSeal {- urn:ubideco:semid:81NKrdc9pBoBjsKaGBVN9wXLG4tKjkK4f8DLj7TNMZxh#santana-domingo-needle -} - | liquid BPCore.SecretSeal {- urn:ubideco:semid:81NKrdc9pBoBjsKaGBVN9wXLG4tKjkK4f8DLj7TNMZxh#santana-domingo-needle -} --- urn:ubideco:semid:AFRnr7FmAC7DtKDQZj9eCzuf9Tp8E6UckpVouwDmwq5S#cubic-museum-lemon -data XChainTxid :: bitcoin Bitcoin.Txid {- urn:ubideco:semid:C1GfCrG7AXu2sFhRBspd7KpJK2YgyTkVy6pty5rZynRs#cowboy-diego-betty -} - | liquid Bitcoin.Txid {- urn:ubideco:semid:C1GfCrG7AXu2sFhRBspd7KpJK2YgyTkVy6pty5rZynRs#cowboy-diego-betty -} + +@mnemonic(prime-loyal-escort) +data XChainBlindSealTxPtr : bitcoin BPCore.BlindSealTxPtr#austria-icon-waiter + | liquid BPCore.BlindSealTxPtr#austria-icon-waiter + +@mnemonic(biology-domain-domain) +data XChainBlindSealTxid : bitcoin BPCore.BlindSealTxid#kimono-golf-price + | liquid BPCore.BlindSealTxid#kimono-golf-price + +@mnemonic(ozone-quick-hippie) +data XChainExplicitSealTxid : bitcoin BPCore.ExplicitSealTxid#antenna-darwin-emotion + | liquid BPCore.ExplicitSealTxid#antenna-darwin-emotion + +@mnemonic(palace-random-taxi) +data XChainSecretSeal : bitcoin BPCore.SecretSeal#santana-domingo-needle + | liquid BPCore.SecretSeal#santana-domingo-needle + +@mnemonic(cubic-museum-lemon) +data XChainTxid : bitcoin Bitcoin.Txid#cowboy-diego-betty + | liquid Bitcoin.Txid#cowboy-diego-betty + diff --git a/stl/Schema.vesper b/stl/Schema.vesper new file mode 100644 index 00000000..bd1b90e0 --- /dev/null +++ b/stl/Schema.vesper @@ -0,0 +1,150 @@ +{- + Description: RGB Schema + Author: Dr Maxim Orlovsky + Copyright (C) 2024 LNP/BP Standards Association. All rights reserved. + License: Apache-2.0 +-} + +Seals vesper lexicon=types+commitments + +SchemaId commitment hasher=SHA256 tagged=urn:lnp-bp:rgb:schema#2024-02-03 + Ffv serialized + SchemaId serialized + GlobalStateSchema map len=0..MAX8 + GlobalStateType mapKey + GlobalStateSchema mapValue + StateSchema map len=0..MAX8 + AssignmentType mapKey + StateSchema mapValue + ValencyType set len=0..MAX8 + ValencyType element + GenesisSchema serialized + ExtensionSchema map len=0..MAX8 + ExtensionType mapKey + ExtensionSchema mapValue + TransitionSchema map len=0..MAX8 + TransitionType mapKey + TransitionSchema mapValue + TypeSysId serialized + Script serialized + +Schema rec + ffv is U16 aka=Ffv + some is Unit option wrapped tag=1 + globalTypes map len=0..MAX8 + key is U16 aka=GlobalStateType + value rec GlobalStateSchema + semId bytes len=32 aka=SemId + maxItems is U16 + ownedTypes map len=0..MAX8 + key is U16 aka=AssignmentType + value union StateSchema + declarative is Unit tag=0 + fungible enum FungibleType wrapped unsigned64Bit=8 tag=1 + structured bytes len=32 wrapped aka=SemId tag=2 + attachment enum MediaType wrapped any=255 tag=3 + valencyTypes set len=0..MAX8 + element is U16 aka=ValencyType + genesis rec GenesisSchema + metadata bytes len=32 aka=SemId + globals map len=0..MAX8 + key is U16 aka=GlobalStateType + value rec Occurrences + min is U16 + max is U16 + assignments map len=0..MAX8 + key is U16 aka=AssignmentType + value rec Occurrences + min is U16 + max is U16 + valencies set len=0..MAX8 + element is U16 aka=ValencyType + extensions map len=0..MAX8 + key is U16 aka=ExtensionType + value rec ExtensionSchema + metadata bytes len=32 aka=SemId + globals map len=0..MAX8 + key is U16 aka=GlobalStateType + value rec Occurrences + min is U16 + max is U16 + redeems set len=0..MAX8 + element is U16 aka=ValencyType + assignments map len=0..MAX8 + key is U16 aka=AssignmentType + value rec Occurrences + min is U16 + max is U16 + valencies set len=0..MAX8 + element is U16 aka=ValencyType + transitions map len=0..MAX8 + key is U16 aka=TransitionType + value rec TransitionSchema + metadata bytes len=32 aka=SemId + globals map len=0..MAX8 + key is U16 aka=GlobalStateType + value rec Occurrences + min is U16 + max is U16 + inputs map len=0..MAX8 + key is U16 aka=AssignmentType + value rec Occurrences + min is U16 + max is U16 + assignments map len=0..MAX8 + key is U16 aka=AssignmentType + value rec Occurrences + min is U16 + max is U16 + valencies set len=0..MAX8 + element is U16 aka=ValencyType + typeSystem map len=0..MAX24 aka=TypeSystem + key bytes len=32 aka=SemId + value union TySemId + primitive is U8 wrapped aka=Primitive tag=0 + unicode is Unit tag=1 + enum set len=1..MAX8 wrapped aka=EnumVariants tag=2 + Variant rec + name ascii len=1..100 aka=VariantName aka=Ident charset=AlphaNumLodash + tag is U8 + union map len=0..MAX8 wrapped aka=UnionVariantsSemId tag=3 + key is U8 + value rec VariantInfoSemId + name ascii len=1..100 aka=VariantName aka=Ident charset=AlphaNumLodash + ty bytes len=32 aka=SemId + tuple list len=1..MAX8 wrapped aka=UnnamedFieldsSemId tag=4 + element bytes len=32 aka=SemId + struct list len=1..MAX8 wrapped aka=NamedFieldsSemId tag=5 + FieldSemId rec + name ascii len=1..100 aka=FieldName aka=Ident charset=AlphaNumLodash + ty bytes len=32 aka=SemId + array tuple tag=6 + _ bytes len=32 aka=SemId + _ is U16 + list tuple tag=7 + _ bytes len=32 aka=SemId + Sizing rec + min is U64 + max is U64 + set tuple tag=8 + _ bytes len=32 aka=SemId + Sizing rec + min is U64 + max is U64 + map tuple tag=9 + _ bytes len=32 aka=SemId + _ bytes len=32 aka=SemId + Sizing rec + min is U64 + max is U64 + script union Script + aluVm rec AluScript wrapped tag=0 + libs map len=0..MAX8 + key bytes len=32 aka=LibId + value bytes len=0..MAX16 + entryPoints map len=0..MAX16 + key bytes len=3 + value rec LibSite + lib bytes len=32 aka=LibId + pos is U16 + diff --git a/stl/Transition.vesper b/stl/Transition.vesper new file mode 100644 index 00000000..faab95a2 --- /dev/null +++ b/stl/Transition.vesper @@ -0,0 +1,264 @@ +{- + Description: RGB Transition + Author: Dr Maxim Orlovsky + Copyright (C) 2024 LNP/BP Standards Association. All rights reserved. + License: Apache-2.0 +-} + +Seals vesper lexicon=types+commitments + +OpId commitment hasher=SHA256 tagged=urn:lnp-bp:rgb:operation#2024-02-03 + OpCommitment serialized + +OpCommitment rec + ffv is U16 aka=Ffv + opType union TypeCommitment + genesis rec BaseCommitment wrapped tag=0 + schemaId bytes len=32 aka=SchemaId + testnet enum Bool false=0 true=1 + altLayers1 bytes len=32 aka=StrictHash + transition tuple tag=1 + _ bytes len=32 aka=ContractId + _ is U16 aka=TransitionType + extension tuple tag=2 + _ bytes len=32 aka=ContractId + _ is U16 aka=ExtensionType + metadata bytes len=32 aka=StrictHash + globals bytes len=32 aka=MerkleHash + inputs bytes len=32 aka=MerkleHash + assignments bytes len=32 aka=MerkleHash + redeemed bytes len=32 aka=StrictHash + valencies bytes len=32 aka=StrictHash + +Transition rec + ffv is U16 aka=Ffv + contractId bytes len=32 aka=ContractId + transitionType is U16 aka=TransitionType + metadata bytes len=0..MAX16 aka=Metadata + globals map len=0..MAX8 aka=GlobalState + key is U16 aka=GlobalStateType + value list len=1..MAX16 aka=GlobalValues + RevealedData rec + value bytes len=0..MAX16 aka=DataState + salt is U128 + inputs set len=0..MAX8 aka=Inputs + Input rec + prevOut rec Opout + op bytes len=32 aka=OpId + ty is U16 aka=AssignmentType + no is U16 + reserved bytes len=2 aka=ReservedBytes2 + assignments map len=0..MAX8 aka=AssignmentsBlindSealTxPtr + key is U16 aka=AssignmentType + value union TypedAssignsBlindSealTxPtr + declarative list len=0..MAX16 wrapped tag=0 + AssignVoidStateBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + fungible list len=0..MAX16 wrapped tag=1 + AssignRevealedValueBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec RevealedFungible + value union FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec RevealedFungible + value union FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + structured list len=0..MAX16 wrapped tag=2 + AssignRevealedDataBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedData + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedData + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + attachment list len=0..MAX16 wrapped tag=3 + AssignRevealedAttachBlindSealTxPtr union + confidential rec tag=0 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedAttach + confidentialState rec tag=1 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedAttach + confidentialSeal rec tag=2 + seal union XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum MediaType any=255 + salt is U64 + revealed rec tag=3 + seal union XChainBlindSealTxPtr + bitcoin rec BlindSealTxPtr wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxPtr wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid union TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum MediaType any=255 + salt is U64 + valencies set len=0..MAX8 aka=Valencies + element is U16 aka=ValencyType +