From c1239bcff2be6cf8fdd5485b6ffe17b2551e05db Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 16 Apr 2024 12:59:03 +0200 Subject: [PATCH 01/52] chore: update dependencies --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/stl/stl.rs | 2 +- stl/RGBStd@0.11.0.sta | 675 +++++++++++++++++++++--------------------- stl/RGBStd@0.11.0.stl | Bin 19007 -> 19054 bytes stl/RGBStd@0.11.0.sty | 77 ++--- stl/Transfer.vesper | 3 +- 7 files changed, 382 insertions(+), 379 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 164fb445..5cc34080 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -645,7 +645,7 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=script-refactor#f071856b400dca9b2a708399869a840094864ad1" +source = "git+https://github.com/RGB-WG/rgb-core?branch=schema-timestamp#24283042b45fa33bdc008bc867920f89701e2d1d" dependencies = [ "aluvm", "amplify", diff --git a/Cargo.toml b/Cargo.toml index 1f810d63..e15efd96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -105,5 +105,5 @@ 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" } -rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "script-refactor" } +rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "schema-timestamp" } aluvm = { git = "https://github.com/AluVM/rust-aluvm", branch = "v0.11" } diff --git a/src/stl/stl.rs b/src/stl/stl.rs index 4ec80442..cdabd92e 100644 --- a/src/stl/stl.rs +++ b/src/stl/stl.rs @@ -41,7 +41,7 @@ pub const LIB_ID_RGB_CONTRACT: &str = /// Strict types id for the library representing of RGB StdLib data types. pub const LIB_ID_RGB_STD: &str = - "urn:ubideco:stl:HtpEoiybmLecFLALYqwveqJUqYiJBmACJhuYGqZZ5cWD#radius-quick-june"; + "urn:ubideco:stl:3pMVtZGkCfgvh86wD6XNAGjVagPWtdm9RyuUGwzZyqRA#icon-senator-billy"; fn _rgb_std_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_RGB_STD), tiny_bset! { diff --git a/stl/RGBStd@0.11.0.sta b/stl/RGBStd@0.11.0.sta index 485823af..18e2ea56 100644 --- a/stl/RGBStd@0.11.0.sta +++ b/stl/RGBStd@0.11.0.sta @@ -1,21 +1,21 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:HtpEoiybmLecFLALYqwveqJUqYiJBmACJhuYGqZZ5cWD#radius-quick-june +Id: urn:ubideco:stl:3pMVtZGkCfgvh86wD6XNAGjVagPWtdm9RyuUGwzZyqRA#icon-senator-billy Name: RGBStd Dependency: 8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2#energy-baboon-piano Dependency: ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79#idea-judo-benny Dependency: APYERRUMyWqLadwTv8tEFifHMPGpL3xGFSBxwaKYpmcV#square-mammal-uncle Dependency: EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average +Dependency: G9ADEUbm6xYfs1SeCAc1gcL4jzF91AMCDoZtcz2EHHjZ#zipper-politic-answer Dependency: GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg#egypt-wedding-cupid Dependency: HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy -Dependency: HaoH9fcSHtGypuJMnGQJZWxbJvHPZKQbaBBBSFaLDv11#fossil-network-airline -Checksum-SHA256: 0618a5eb45b8a464d35c1ba35c8b97c8b23764e59b8e8f0f30ba1f418f77c606 +Checksum-SHA256: 39cfedafc537f173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WGwGk8!v -9Q_Burb1iY6uLjdgCpx0000000000{{R300000033g#@Wo~0>Wpe-t0klbV>y4sI -1`s@E56F8fklyDJ5CGWY|JRA^^qjKEod5s;000000RI300000001I?-VQzD2bZKv -Ha{vhe#Lx;1iwohEKiTY-Y{fIU9rOJ4bmbo~md~IlstR}60000000000{{R30000 -003T1e7Wo~n6Z*Fq{2>~E=v$W?FX7&!JgM>Z5$qdf1XIM;d6Gitq1dLoUYexV800 -0000093000000000JMa&m8Sa{vhe9gA(9kNyc0Tk&y%nI8O&d`?noi+BrsLVb;P9>sz!w -R?~xCJVDs=f6?Te&8llzya+h9g#U)KCv!uZBmweYio(+0000000000{{R3000000 -25D(+aBOn`2?1%`Im0dveug{l#TKuRD0DRYEe4PvA$D-m$@rOs=yU)8000000093 -000000000Yfb#QQOWo>0{baMa+0RTVtXM?om9voxM-ByRjL8wpw-&sRQrh?d8AKZaXsV>_O8;rU6aoQ7jn{9gWsHQ -TT*!NY-2xPCij92xQytrt(pkH>QC#I7ZYc=C7cDZ6-Q(CNQ=2XkX`X>fFN00{z%e -?|%n1pG};`Z*ur%-By7#`f0`)7RBV`ju>1K(+#0FUt(B5@%}!Nc_l<+UWKlan6w6 -n@*%OGVN|z@OH%j0000000030{{R300000Ab7^O8VRUtJWpe-u0pipZP!Z9Fy4s@ -&s7y*hO1UlNfirx{z*_V4e8lMKApvN;I318k^1Q)udqJD6M*}*jBphB7>#f=Rtta -Puw7dWS000000093000000000P0Z)9m^X=QQ)0|;Sab98cHV{`xrZ+2yJa%p5`0R -?7hZeeWy7*1hrWn@NaWo%?Yb8~5DZf#|5bX0k8Wd;KRX=DQSV|*5PeC-LD9{i1bP -Eu-%cnf?&eT{Y=#eyxhdypiD{^Dg=h-~N_zJ`Red1EINWrM}GXaQb}6c#qIM2EQq -ZeeX@0*IE!ct3_)YGXT|b>aC*shoymRs3H5hBe!;F2TcrP}3(cK(6LD#rwNz2*s{WQVl8bg5o8r0 -R+^o=IRl4@n|>JtwI*n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S+XYD&Ml#00; -----END STRICT TYPE LIB----- diff --git a/stl/RGBStd@0.11.0.stl b/stl/RGBStd@0.11.0.stl index 8edcacb51a7b5c0f562227235208f4c521251fd3..a98f319d06fb97acaeaf03cf0272998ce4665a08 100644 GIT binary patch delta 1893 zcmdl#h4I}K#tBPR9(;?fUbm`c=_HeK5i#R78yTDbEu|qXER}JKr(aUfnZg|8?lk$M zy~4z!rkmv$v)CBfCU>$w)&JKd=6SzjpWUAs0>2(fZ`Yh;`|J88vAcD*CVgk!^7En` zUr=gsYEfBgic@7tYO%%UJdSk6&3`!gSk=3{L}G0g^(XoZbN^z!qhUR1(>Cd&9TO|% zd<^{UmF6vH3r@~R%}w0Q#h=2ZK*)8I4@xOaUMJ~8oI)$9bYc`%5u-?PbB(kSBVm>2 zWS$UK#HSQRSdovM9$`hZ}q z?mMOmx{U1Usd=fznZ*pOj7)^WezJkuHp0f9#F{1yp1(`HdOR<^_5^Y=n&j1!azD z06~SD@0juv;X;sc+7_)2gyNZC9{XT%o`|r$Z*`8K%O{_;zCc*fUYnDI6}9s!Og?72 zp0L8Hc4r7G+T3Vg%uG<#nBB#tBO&D>x`jd}*rkExAUlqUJ5T8};&YgQnGF zXLmkj+x(AHgmtqee+riZAqys7;8B=-SJH<#g_%<6gcW{}sv<^_;^x)TMvR12{*`$` zSP`RK6k$cxa(aXnos=tfAQWhXB4Bfkyf+a(>*iC~%&sU#gvz1ny~*r~Et8L{Y7-9j zi~I_@jO^*Dd8x&j#SE;BOoZZKa=h9$!p8pLP?#L5?n_vqynw>wN9rMj74lgtOfJ)~ zCsv`+OAuD0yKtVa%G=Q)| zU{r3_HhWKmhe1Y0S+qJ3ife-TP2Tc65!UfppCj!0Kh_rrD|%ydlCYwFUWLhDZPyc4 zxSLC1@)Nr?1Ql-HU|-BkP}O945rxUg&L;>fd}E_9IopMZq92&%H-C4@CnAV}sdMr+ RH*dmr6O-0AA9P>K1ORm97+wGX diff --git a/stl/RGBStd@0.11.0.sty b/stl/RGBStd@0.11.0.sty index 64f90f4c..27d42182 100644 --- a/stl/RGBStd@0.11.0.sty +++ b/stl/RGBStd@0.11.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:HtpEoiybmLecFLALYqwveqJUqYiJBmACJhuYGqZZ5cWD#radius-quick-june + Id: urn:ubideco:stl:3pMVtZGkCfgvh86wD6XNAGjVagPWtdm9RyuUGwzZyqRA#icon-senator-billy Name: RGBStd Version: 0.11.0 Description: RGB standard library @@ -60,36 +60,7 @@ import Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average use AlphaCapsLodash#winter-vampire-energy use AlphaSmallLodash#plastic-snake-modular -import CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg#egypt-wedding-cupid - use MerkleHash#culture-metro-modular - use MerkleProof#labor-hilton-magenta - use ReservedBytes1#joker-lemon-mental - use ReservedBytes2#pocket-habitat-soviet - use ReservedBytes4#claudia-drink-digital - -import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy - use SeqNo#rhino-time-rodent - use TxIn#pagoda-david-reform - use Vout#chrome-robin-gallop - use ScriptBytes#maestro-source-jackson - use TapNodeHash#crash-culture-jamaica - use LockTime#tokyo-inch-program - use SigScript#tiger-paprika-juliet - use LeafScript#brenda-round-micro - use TxOut#hostel-source-marion - use Sats#pyramid-spray-star - use Witness#quiz-junior-farmer - use Txid#cowboy-diego-betty - use TxVer#english-natasha-virus - use InternalPk#meter-nerve-chicken - use LeafVer#tunnel-lagoon-cowboy - use ScriptPubkey#denmark-human-degree - use ByteStr#kinetic-avenue-escort - use Tx#deluxe-bernard-genetic - use Outpoint#dinner-yoga-danube - use XOnlyPk#evident-finance-promo - -import RGB#HaoH9fcSHtGypuJMnGQJZWxbJvHPZKQbaBBBSFaLDv11#fossil-network-airline +import RGB#G9ADEUbm6xYfs1SeCAc1gcL4jzF91AMCDoZtcz2EHHjZ#zipper-politic-answer use ExtensionSchema#ship-karma-david use BundleId#desert-divide-visible use Identity#stock-teacher-falcon @@ -98,7 +69,6 @@ import RGB#HaoH9fcSHtGypuJMnGQJZWxbJvHPZKQbaBBBSFaLDv11#fossil-network-airline use GenesisSchema#exhibit-decade-orca use AltLayer1Set#manual-cycle-circus use OwnedStateSchema#pacific-truck-sharon - use Schema#nevada-smart-desire use AssetTags#arctic-oasis-cable use AssignmentsBlindSealTxid#morris-enrico-miller use VoidState#nectar-ceramic-driver @@ -126,6 +96,7 @@ import RGB#HaoH9fcSHtGypuJMnGQJZWxbJvHPZKQbaBBBSFaLDv11#fossil-network-airline use AttachId#delta-member-agenda use BlindingFactor#agenda-ivory-blast use AssignmentType#hunter-hello-retro + use Schema#stop-stand-harmony use XChainBlindSealTxPtr#prime-loyal-escort use Opout#india-joshua-adam use AssignVoidStateBlindSealTxid#noise-veteran-gloria @@ -159,6 +130,36 @@ import RGB#HaoH9fcSHtGypuJMnGQJZWxbJvHPZKQbaBBBSFaLDv11#fossil-network-airline use RevealedData#switch-enigma-ruby use AssignRevealedValueBlindSealTxid#colony-miguel-olga +import CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg#egypt-wedding-cupid + use MerkleHash#culture-metro-modular + use MerkleProof#labor-hilton-magenta + use ReservedBytes1#joker-lemon-mental + use ReservedBytes2#pocket-habitat-soviet + use ReservedBytes4#claudia-drink-digital + use ReservedBytes8#helena-button-combat + +import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy + use SeqNo#rhino-time-rodent + use TxIn#pagoda-david-reform + use Vout#chrome-robin-gallop + use ScriptBytes#maestro-source-jackson + use TapNodeHash#crash-culture-jamaica + use LockTime#tokyo-inch-program + use SigScript#tiger-paprika-juliet + use LeafScript#brenda-round-micro + use TxOut#hostel-source-marion + use Sats#pyramid-spray-star + use Witness#quiz-junior-farmer + use Txid#cowboy-diego-betty + use TxVer#english-natasha-virus + use InternalPk#meter-nerve-chicken + use LeafVer#tunnel-lagoon-cowboy + use ScriptPubkey#denmark-human-degree + use ByteStr#kinetic-avenue-escort + use Tx#deluxe-bernard-genetic + use Outpoint#dinner-yoga-danube + use XOnlyPk#evident-finance-promo + @mnemonic(hexagon-alias-robot) data AnchoredBundles : tapret#1 (BPCore.AnchorMerkleProofTapretProof#everest-laura-modem, RGB.TransitionBundle#bishop-mirage-sigma) @@ -177,14 +178,14 @@ data AssignIface : ownedState OwnedIface @mnemonic(tommy-picasso-spell) data BundledWitness : pubWitness RGB.XChainPubWitness#animal-pretend-exile, anchoredBundles AnchoredBundles -@mnemonic(manual-cafe-human) +@mnemonic(eclipse-section-africa) data Consignmentfalse : version ContainerVer , transfer Std.Bool#laser-madam-maxwell , terminals {RGB.BundleId -> Terminal} , genesis RGB.Genesis#arsenal-charter-guest , extensions {RGB.Extension#anvil-aurora-evita ^ ..0xffffffff} , bundles {BundledWitness ^ ..0xffffffff} - , schema RGB.Schema#nevada-smart-desire + , schema RGB.Schema#stop-stand-harmony , ifaces {Iface -> ^ ..0xff IfaceImpl} , supplements {ContractSuppl ^ ..0xff} , types StrictTypes.TypeSystem#carmen-nova-quasi @@ -192,14 +193,14 @@ data Consignmentfalse : version ContainerVer , attachments {RGB.AttachId -> [Byte ^ ..0xffffff]} , signatures {ContentId -> ^ ..0xff ContentSigs} -@mnemonic(david-legal-owner) +@mnemonic(capital-year-medusa) data Consignmenttrue : version ContainerVer , transfer Std.Bool#laser-madam-maxwell , terminals {RGB.BundleId -> Terminal} , genesis RGB.Genesis#arsenal-charter-guest , extensions {RGB.Extension#anvil-aurora-evita ^ ..0xffffffff} , bundles {BundledWitness ^ ..0xffffffff} - , schema RGB.Schema#nevada-smart-desire + , schema RGB.Schema#stop-stand-harmony , ifaces {Iface -> ^ ..0xff IfaceImpl} , supplements {ContractSuppl ^ ..0xff} , types StrictTypes.TypeSystem#carmen-nova-quasi @@ -289,10 +290,10 @@ data IfaceImpl : version VerNo @mnemonic(monday-igloo-jupiter) data ImplId : [Byte ^ 32] -@mnemonic(igor-arena-weekend) +@mnemonic(domino-pulse-oxford) data Kit : version ContainerVer , ifaces {Iface ^ ..0xff} - , schemata {RGB.Schema#nevada-smart-desire ^ ..0xff} + , schemata {RGB.Schema#stop-stand-harmony ^ ..0xff} , iimpls {IfaceImpl ^ ..0xff} , supplements {ContractSuppl ^ ..0xff} , types StrictTypes.TypeSystem#carmen-nova-quasi diff --git a/stl/Transfer.vesper b/stl/Transfer.vesper index d954745f..14100b94 100644 --- a/stl/Transfer.vesper +++ b/stl/Transfer.vesper @@ -1542,6 +1542,8 @@ Consignmenttrue rec ffv is U16 aka=Ffv flags bytes len=1 aka=ReservedBytes1 name ascii len=1..100 aka=TypeName charset=AlphaCapsLodash + timestamp is I64 + developer ascii len=0..4096 aka=Identity charset=AsciiPrintable metaTypes map len=0..MAX8 key is U16 aka=MetaType value bytes len=32 aka=SemId @@ -1625,7 +1627,6 @@ Consignmenttrue rec some rec LibSite option wrapped tag=1 lib bytes len=32 aka=LibId pos is U16 - developer ascii len=0..4096 aka=Identity charset=AsciiPrintable ifaces map len=0..MAX8 key rec Iface version enum VerNo v0=0 v1=1 From d0d2d49a58f52ab929c256e9b2ef510a4a49d950 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 16 Apr 2024 12:59:17 +0200 Subject: [PATCH 02/52] persistence: return more informative schema and interface info objects --- src/info.rs | 108 ++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + src/persistence/memory.rs | 9 ++-- src/persistence/stash.rs | 8 ++- src/persistence/stock.rs | 15 +++--- 5 files changed, 121 insertions(+), 20 deletions(-) create mode 100644 src/info.rs diff --git a/src/info.rs b/src/info.rs new file mode 100644 index 00000000..0e35bdc8 --- /dev/null +++ b/src/info.rs @@ -0,0 +1,108 @@ +// RGB standard library for working with smart contracts on Bitcoin & Lightning +// +// 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. +// +// 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::BTreeMap; + +use chrono::{DateTime, TimeZone, Utc}; +use rgb::{Identity, SchemaId}; +use strict_encoding::{FieldName, TypeName}; + +use crate::interface::{Iface, IfaceId, IfaceImpl, ImplId, VerNo}; +use crate::persistence::SchemaIfaces; + +#[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +pub struct IfaceInfo { + pub id: IfaceId, + pub version: VerNo, + pub name: TypeName, + pub developer: Identity, + pub created_at: DateTime, + pub inherits: Vec, + pub default_op: Option, +} + +impl IfaceInfo { + pub fn with(iface: &Iface) -> Self { + IfaceInfo { + id: iface.iface_id(), + version: iface.version, + name: iface.name.clone(), + developer: iface.developer.clone(), + created_at: Utc + .timestamp_opt(iface.timestamp, 0) + .single() + .unwrap_or_else(Utc::now), + inherits: iface.inherits.iter().cloned().collect(), + default_op: iface.default_operation.clone(), + } + } +} + +#[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +pub struct SchemaInfo { + pub id: SchemaId, + pub name: TypeName, + pub developer: Identity, + pub created_at: DateTime, + pub implements: BTreeMap, +} + +impl SchemaInfo { + pub fn with(schema_ifaces: &SchemaIfaces) -> Self { + let schema = &schema_ifaces.schema; + SchemaInfo { + id: schema.schema_id(), + name: schema.name.clone(), + developer: schema.developer.clone(), + created_at: Utc + .timestamp_opt(schema.timestamp, 0) + .single() + .unwrap_or_else(Utc::now), + implements: schema_ifaces + .iimpls + .iter() + .map(|(id, iimpl)| (*id, ImplInfo::with(iimpl))) + .collect(), + } + } +} + +#[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +pub struct ImplInfo { + pub id: ImplId, + pub iface_id: IfaceId, + pub developer: Identity, + pub created_at: DateTime, +} + +impl ImplInfo { + pub fn with(iimpl: &IfaceImpl) -> Self { + ImplInfo { + id: iimpl.impl_id(), + iface_id: iimpl.iface_id, + developer: iimpl.developer.clone(), + created_at: Utc + .timestamp_opt(iimpl.timestamp, 0) + .single() + .unwrap_or_else(Utc::now), + } + } +} diff --git a/src/lib.rs b/src/lib.rs index af5c4cd5..4c987770 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -87,6 +87,7 @@ pub mod containers; pub mod persistence; pub mod resolvers; pub mod accessors; +pub mod info; pub use bp::{Outpoint, Txid}; pub use invoice::{Allocation, Amount, CoinAmount, OwnedFraction, Precision, TokenIndex}; diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index 2acda196..ea10e0bf 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -34,7 +34,7 @@ use rgb::{ Extension, Genesis, GenesisSeal, GraphSeal, Identity, OpId, Operation, Opout, Schema, SchemaId, SecretSeal, TransitionBundle, XChain, XOutputSeal, XWitnessId, }; -use strict_encoding::{StrictDeserialize, StrictSerialize, TypeName}; +use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::TypeSystem; use super::{ @@ -93,11 +93,8 @@ impl StashReadProvider for MemStash { .ok_or_else(|| StashInconsistency::LibAbsent(id).into()) } - fn ifaces(&self) -> Result, Self::Error> { - Ok(self - .ifaces - .iter() - .map(|(id, iface)| (*id, iface.name.clone()))) + fn ifaces(&self) -> Result, Self::Error> { + Ok(self.ifaces.values()) } fn iface(&self, iface: impl Into) -> Result<&Iface, StashProviderError> { diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index 8be289d1..a8b9b9dc 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -35,7 +35,7 @@ use rgb::{ AttachId, BundleId, ContractId, Extension, Genesis, GraphSeal, Identity, OpId, Operation, Schema, SchemaId, TransitionBundle, XChain, XWitnessId, }; -use strict_encoding::{FieldName, TypeName}; +use strict_encoding::FieldName; use strict_types::typesys::UnknownType; use strict_types::TypeSystem; @@ -188,9 +188,7 @@ impl Stash

{ #[doc(hidden)] pub fn as_provider(&self) -> &P { &self.provider } - pub(super) fn ifaces( - &self, - ) -> Result + '_, StashError

> { + pub(super) fn ifaces(&self) -> Result + '_, StashError

> { Ok(self.provider.ifaces().map_err(StashError::ReadProvider)?) } pub(super) fn iface(&self, iface: impl Into) -> Result<&Iface, StashError

> { @@ -564,7 +562,7 @@ pub trait StashReadProvider { fn type_system(&self) -> Result<&TypeSystem, Self::Error>; fn lib(&self, id: LibId) -> Result<&Lib, ProviderError>; - fn ifaces(&self) -> Result, Self::Error>; + fn ifaces(&self) -> Result, Self::Error>; fn iface(&self, iface: impl Into) -> Result<&Iface, ProviderError>; fn schemata(&self) -> Result, Self::Error>; fn schema(&self, schema_id: SchemaId) -> Result<&SchemaIfaces, ProviderError>; diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 0e4be667..ddcc769e 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -37,7 +37,7 @@ use rgb::{ ContractState, DbcProof, EAnchor, GraphSeal, OpId, Operation, Opout, SchemaId, SecretSeal, Transition, WitnessAnchor, XChain, XOutpoint, XOutputSeal, XWitnessId, }; -use strict_encoding::{FieldName, TypeName}; +use strict_encoding::FieldName; use super::{ Index, IndexError, IndexInconsistency, IndexProvider, IndexReadProvider, IndexWriteProvider, @@ -51,6 +51,7 @@ use crate::containers::{ Contract, Fascia, PubWitness, SealWitness, Terminal, TerminalSeal, Transfer, TransitionInfo, TransitionInfoError, ValidConsignment, ValidContract, ValidKit, ValidTransfer, }; +use crate::info::{IfaceInfo, SchemaInfo}; use crate::interface::resolver::DumbResolver; use crate::interface::{ BuilderError, ContractBuilder, ContractIface, Iface, IfaceId, IfaceRef, TransitionBuilder, @@ -371,18 +372,14 @@ impl Stock { #[doc(hidden)] pub fn as_index_provider(&self) -> &P { self.index.as_provider() } - pub fn ifaces( - &self, - ) -> Result + '_, StockError> { - Ok(self.stash.ifaces()?) + pub fn ifaces(&self) -> Result + '_, StockError> { + Ok(self.stash.ifaces()?.map(IfaceInfo::with)) } pub fn iface(&self, iface: impl Into) -> Result<&Iface, StockError> { Ok(self.stash.iface(iface)?) } - pub fn schemata( - &self, - ) -> Result + '_, StockError> { - Ok(self.stash.schemata()?) + pub fn schemata(&self) -> Result + '_, StockError> { + Ok(self.stash.schemata()?.map(SchemaInfo::with)) } pub fn schema(&self, schema_id: SchemaId) -> Result<&SchemaIfaces, StockError> { Ok(self.stash.schema(schema_id)?) From 1231ab832030578cbba38e4a7213a6b5c5876e3b Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 16 Apr 2024 13:00:22 +0200 Subject: [PATCH 03/52] iface: add concept of interface class --- src/interface/iface.rs | 18 ++++++++++++++++-- src/interface/mod.rs | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 0f187b51..053c37ca 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -33,9 +33,9 @@ use strict_encoding::{ FieldName, StrictDecode, StrictDeserialize, StrictDumb, StrictEncode, StrictSerialize, StrictType, TypeName, VariantName, }; -use strict_types::{SemId, SymbolicSys}; +use strict_types::{SemId, SymbolicSys, TypeLib}; -use crate::interface::{IfaceDisplay, VerNo}; +use crate::interface::{ContractIface, IfaceDisplay, VerNo}; use crate::LIB_NAME_RGB_STD; /// Interface identifier. @@ -322,6 +322,20 @@ pub struct TransitionIface { pub default_assignment: Option, } +/// A class of interfaces: one or several interfaces inheriting from each other. +/// +/// Interface standards like RGB20, RGB21 and RGB25 are actually interface +/// classes. +pub trait IfaceClass: From { + const IFACE_NAME: &'static str; + const IFACE_IDS: &'static [IfaceId]; + + type Features: Sized + Clone + Default; + + fn iface(features: Self::Features) -> Iface; + fn stl() -> TypeLib; +} + /// Interface definition. #[derive(Clone, Eq, Hash, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] diff --git a/src/interface/mod.rs b/src/interface/mod.rs index 2ce58020..0d4ba751 100644 --- a/src/interface/mod.rs +++ b/src/interface/mod.rs @@ -41,7 +41,7 @@ pub use contract::{ pub use contractum::IfaceDisplay; pub use filters::{FilterExclude, FilterIncludeAll, OutpointFilter, WitnessFilter}; pub use iface::{ - ArgMap, AssignIface, ExtensionIface, GenesisIface, GlobalIface, Iface, IfaceId, + ArgMap, AssignIface, ExtensionIface, GenesisIface, GlobalIface, Iface, IfaceClass, IfaceId, IfaceInconsistency, IfaceRef, Modifier, OpName, OwnedIface, Req, TransitionIface, ValencyIface, }; pub use iimpl::{IfaceImpl, ImplId, NamedField, NamedType, NamedVariant, SchemaTypeIndex}; From 48597e1133b29cc4d2fcf1bc9170d15f7b49c5d5 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 16 Apr 2024 16:24:24 +0200 Subject: [PATCH 04/52] persistance: add better contract enumerators --- src/interface/iface.rs | 29 ++++++++++++++-- src/persistence/stash.rs | 11 +++--- src/persistence/stock.rs | 72 ++++++++++++++++++++++++++++------------ 3 files changed, 85 insertions(+), 27 deletions(-) diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 053c37ca..45013da9 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -21,7 +21,7 @@ use std::cmp::Ordering; use std::collections::HashMap; -use std::fmt::{self, Display, Formatter}; +use std::fmt::{self, Debug, Display, Formatter}; use std::str::FromStr; use amplify::confinement::{TinyOrdMap, TinyOrdSet, TinyString, TinyVec}; @@ -35,7 +35,8 @@ use strict_encoding::{ }; use strict_types::{SemId, SymbolicSys, TypeLib}; -use crate::interface::{ContractIface, IfaceDisplay, VerNo}; +use crate::interface::{ContractIface, IfaceDisplay, IfaceImpl, VerNo}; +use crate::persistence::SchemaIfaces; use crate::LIB_NAME_RGB_STD; /// Interface identifier. @@ -326,14 +327,28 @@ pub struct TransitionIface { /// /// Interface standards like RGB20, RGB21 and RGB25 are actually interface /// classes. +/// +/// The instances implementing this trait are used as wrappers around +/// [`ContractIface`] object, allowing a simple API matching the interface class +/// requirements. pub trait IfaceClass: From { const IFACE_NAME: &'static str; const IFACE_IDS: &'static [IfaceId]; + /// An object which allows to configure specific interface features to + /// select one interface from the class. type Features: Sized + Clone + Default; + /// Object which represent concise summary about a contract; + type Info: Clone + Eq + Debug; + fn iface(features: Self::Features) -> Iface; + fn iface_id(features: Self::Features) -> IfaceId; fn stl() -> TypeLib; + + /// Constructs information object describing a specific class in terms of + /// the interface class. + fn info(&self) -> Self::Info; } /// Interface definition. @@ -403,6 +418,16 @@ impl Iface { ) } + pub fn find_abstractable_impl<'a>( + &self, + schema_ifaces: &'a SchemaIfaces, + ) -> Option<&'a IfaceImpl> { + self.inherits + .iter() + .rev() + .find_map(move |parent| schema_ifaces.iimpls.get(parent)) + } + pub fn check(&self) -> Result<(), Vec> { let proc_globals = |op_name: &OpName, globals: &ArgMap, diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index a8b9b9dc..d5ef9445 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -42,7 +42,8 @@ use strict_types::TypeSystem; use crate::accessors::{MergeReveal, MergeRevealError}; use crate::containers::{BundledWitness, Consignment, ContentId, Kit, SealWitness, SigBlob}; use crate::interface::{ - ContractBuilder, ContractSuppl, Iface, IfaceId, IfaceImpl, IfaceRef, TransitionBuilder, + ContractBuilder, ContractSuppl, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef, + TransitionBuilder, }; use crate::{SecretSeal, LIB_NAME_RGB_STD}; @@ -221,11 +222,13 @@ impl Stash

{ Ok(self.provider.witness(witness_id)?) } - pub(super) fn contract_ids_by_iface( + pub(super) fn contracts_by( &self, - iface: impl Into, ) -> Result + '_, StashError

> { - Ok(self.provider.contract_ids_by_iface(iface.into())?) + Ok(C::IFACE_IDS + .iter() + .filter_map(|id| self.provider.contract_ids_by_iface(*id).ok()) + .flatten()) } pub(super) fn contract_supplements( &self, diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index ddcc769e..a3fc88ea 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -54,8 +54,8 @@ use crate::containers::{ use crate::info::{IfaceInfo, SchemaInfo}; use crate::interface::resolver::DumbResolver; use crate::interface::{ - BuilderError, ContractBuilder, ContractIface, Iface, IfaceId, IfaceRef, TransitionBuilder, - VelocityHint, + BuilderError, ContractBuilder, ContractIface, Iface, IfaceClass, IfaceId, IfaceRef, + TransitionBuilder, VelocityHint, }; use crate::resolvers::ResolveHeight; @@ -384,19 +384,22 @@ impl Stock { pub fn schema(&self, schema_id: SchemaId) -> Result<&SchemaIfaces, StockError> { Ok(self.stash.schema(schema_id)?) } + pub fn contract_ids( &self, ) -> Result + '_, StockError> { Ok(self.stash.contract_ids()?) } - /// Iterates over all contract ids which can be interfaced using a specific - /// interface. - pub fn contracts_ifaceable( + pub fn contracts_by( &self, - iface: impl Into, - ) -> Result + '_, StockError> { - Ok(self.stash.contract_ids_by_iface(iface)?) + ) -> Result + '_, StockError> { + Ok(self.stash.contracts_by::()?.filter_map(|id| { + self.contract_iface_class::(id) + .as_ref() + .map(C::info) + .ok() + })) } /// Iterates over ids of all contract assigning state to the provided set of @@ -437,6 +440,43 @@ impl Stock { }) } + pub fn contract_iface_class( + &self, + contract_id: ContractId, + ) -> Result> { + let (schema_ifaces, history) = self.contract_raw(contract_id)?; + let iimpl = schema_ifaces + .iimpls + .values() + .find(|iimpl| C::IFACE_IDS.contains(&iimpl.iface_id)) + .or_else(|| { + schema_ifaces.iimpls.keys().find_map(|id| { + let iface = self.stash.iface(*id).ok()?; + iface.find_abstractable_impl(schema_ifaces) + }) + }) + .ok_or_else(|| { + ContractIfaceError::NoAbstractImpl( + C::IFACE_IDS[0], + schema_ifaces.schema.schema_id(), + ) + })?; + + let iface = self.stash.iface(iimpl.iface_id)?; + let (types, _) = self.stash.extract(&schema_ifaces.schema, [iface])?; + + let state = ContractState { + schema: schema_ifaces.schema.clone(), + history: history.clone(), + }; + Ok(ContractIface { + state, + iface: iimpl.clone(), + types, + } + .into()) + } + /// Returns the best matching abstract interface to a contract. pub fn contract_iface( &self, @@ -447,19 +487,9 @@ impl Stock { let iface = self.stash.iface(iface)?; let iface_id = iface.iface_id(); - let iimpl = schema_ifaces - .iimpls - .get(&iface_id) - .or_else(|| { - iface - .inherits - .iter() - .rev() - .find_map(|parent| schema_ifaces.iimpls.get(parent)) - }) - .ok_or_else(|| { - ContractIfaceError::NoAbstractImpl(iface_id, schema_ifaces.schema.schema_id()) - })?; + let iimpl = iface.find_abstractable_impl(schema_ifaces).ok_or_else(|| { + ContractIfaceError::NoAbstractImpl(iface_id, schema_ifaces.schema.schema_id()) + })?; let (types, _) = self.stash.extract(&schema_ifaces.schema, [iface])?; From 43ff7732b734037c2d4c870f130054828530ab2c Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 17 Apr 2024 01:25:30 +0200 Subject: [PATCH 05/52] persistence: refactor the way SchemaInterfaces is working --- src/info.rs | 62 ++++++++++++++++++++++++++++++++++++--- src/interface/iface.rs | 2 +- src/persistence/memory.rs | 8 +++-- src/persistence/stash.rs | 25 ++++++++++------ src/persistence/stock.rs | 2 +- 5 files changed, 81 insertions(+), 18 deletions(-) diff --git a/src/info.rs b/src/info.rs index 0e35bdc8..e281163d 100644 --- a/src/info.rs +++ b/src/info.rs @@ -19,7 +19,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::BTreeMap; +use std::fmt::{self, Display, Formatter, Write}; use chrono::{DateTime, TimeZone, Utc}; use rgb::{Identity, SchemaId}; @@ -56,13 +56,38 @@ impl IfaceInfo { } } +impl Display for IfaceInfo { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "{: <40}", self.name)?; + f.write_char(f.fill())?; + write!(f, "{}", self.version)?; + f.write_char(f.fill())?; + write!(f, "{}", self.developer)?; + f.write_char(f.fill())?; + write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; + f.write_char(f.fill())?; + write!(f, "{}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; + f.write_char(f.fill())?; + writeln!( + f, + "{}", + self.inherits + .iter() + .map(|f| f.to_string()) + .collect::>() + .join(", ") + )?; + writeln!(f, "\t{}", self.id) + } +} + #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] pub struct SchemaInfo { pub id: SchemaId, pub name: TypeName, pub developer: Identity, pub created_at: DateTime, - pub implements: BTreeMap, + pub implements: Vec, } impl SchemaInfo { @@ -79,25 +104,42 @@ impl SchemaInfo { implements: schema_ifaces .iimpls .iter() - .map(|(id, iimpl)| (*id, ImplInfo::with(iimpl))) + .map(|(name, iimpl)| ImplInfo::with(name.clone(), iimpl)) .collect(), } } } +impl Display for SchemaInfo { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "{: <40}", self.name)?; + f.write_char(f.fill())?; + write!(f, "{}", self.developer)?; + f.write_char(f.fill())?; + writeln!(f, "{}", self.created_at.format("%Y-%m-%d"))?; + f.write_char(f.fill())?; + for info in &self.implements { + writeln!(f, "\t{info}",)?; + } + Ok(()) + } +} + #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] pub struct ImplInfo { pub id: ImplId, pub iface_id: IfaceId, + pub iface_name: TypeName, pub developer: Identity, pub created_at: DateTime, } impl ImplInfo { - pub fn with(iimpl: &IfaceImpl) -> Self { + pub fn with(iface_name: TypeName, iimpl: &IfaceImpl) -> Self { ImplInfo { id: iimpl.impl_id(), iface_id: iimpl.iface_id, + iface_name, developer: iimpl.developer.clone(), created_at: Utc .timestamp_opt(iimpl.timestamp, 0) @@ -106,3 +148,15 @@ impl ImplInfo { } } } + +impl Display for ImplInfo { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "{: <40}", self.iface_name)?; + f.write_char(f.fill())?; + write!(f, "{}", self.developer)?; + f.write_char(f.fill())?; + write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; + f.write_char(f.fill())?; + writeln!(f, "{}", self.id) + } +} diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 45013da9..ba46c71c 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -425,7 +425,7 @@ impl Iface { self.inherits .iter() .rev() - .find_map(move |parent| schema_ifaces.iimpls.get(parent)) + .find_map(move |parent| schema_ifaces.get(*parent)) } pub fn check(&self) -> Result<(), Vec> { diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index ea10e0bf..1f01fbb8 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -132,7 +132,7 @@ impl StashReadProvider for MemStash { let schemata = self .schemata .iter() - .filter(|(_, iface)| iface.iimpls.contains_key(&iface_id)) + .filter(|(_, iface)| iface.contains(iface_id)) .map(|(schema_id, _)| schema_id) .collect::>(); Ok(self @@ -259,8 +259,10 @@ impl StashWriteProvider for MemStash { .schemata .get_mut(&iimpl.schema_id) .expect("unknown schema"); - let present = schema_ifaces.iimpls.contains_key(&iimpl.iface_id); - schema_ifaces.iimpls.insert(iimpl.iface_id, iimpl)?; + let iface = self.ifaces.get(&iimpl.iface_id).expect("unknown interface"); + let iface_name = iface.name.clone(); + let present = schema_ifaces.iimpls.contains_key(&iface_name); + schema_ifaces.iimpls.insert(iface_name, iimpl)?; Ok(!present) } diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index d5ef9445..43728cc3 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -35,7 +35,7 @@ use rgb::{ AttachId, BundleId, ContractId, Extension, Genesis, GraphSeal, Identity, OpId, Operation, Schema, SchemaId, TransitionBundle, XChain, XWitnessId, }; -use strict_encoding::FieldName; +use strict_encoding::{FieldName, TypeName}; use strict_types::typesys::UnknownType; use strict_types::TypeSystem; @@ -156,7 +156,7 @@ pub enum StashDataError { )] pub struct SchemaIfaces { pub schema: Schema, - pub iimpls: TinyOrdMap, + pub iimpls: TinyOrdMap, } impl SchemaIfaces { @@ -166,6 +166,14 @@ impl SchemaIfaces { iimpls: none!(), } } + + pub fn get(&self, id: IfaceId) -> Option<&IfaceImpl> { + self.iimpls.values().find(|iimpl| iimpl.iface_id == id) + } + + pub fn contains(&self, id: IfaceId) -> bool { + self.iimpls.values().any(|iimpl| iimpl.iface_id == id) + } } #[derive(Debug)] @@ -274,8 +282,7 @@ impl Stash

{ let iface = self.iface(iface)?; let iface_id = iface.iface_id(); let iimpl = schema_ifaces - .iimpls - .get(&iface_id) + .get(iface_id) .ok_or(StashDataError::NoIfaceImpl(schema_id, iface_id))?; let (types, scripts) = self.extract(&schema_ifaces.schema, [iface])?; @@ -300,8 +307,7 @@ impl Stash

{ let iface = self.iface(iface)?; let schema = &schema_ifaces.schema; let iimpl = schema_ifaces - .iimpls - .get(&iface.iface_id()) + .get(iface.iface_id()) .ok_or(StashDataError::NoIfaceImpl(schema.schema_id(), iface.iface_id()))?; let genesis = self.provider.genesis(contract_id)?; @@ -351,7 +357,7 @@ impl Stash

{ let (types, _) = self.extract(&schema_ifaces.schema, [iface])?; - let mut builder = if let Some(iimpl) = schema_ifaces.iimpls.get(&iface.iface_id()) { + let mut builder = if let Some(iimpl) = schema_ifaces.get(iface.iface_id()) { TransitionBuilder::blank_transition( contract_id, iface.clone(), @@ -360,8 +366,9 @@ impl Stash

{ types, ) } else { - let (default_iface_id, default_iimpl) = schema_ifaces.iimpls.first_key_value().unwrap(); - let default_iface = self.iface(*default_iface_id)?; + let (default_iface_name, default_iimpl) = + schema_ifaces.iimpls.first_key_value().unwrap(); + let default_iface = self.iface(default_iface_name.clone())?; TransitionBuilder::blank_transition( contract_id, diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index a3fc88ea..d0d40f41 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -451,7 +451,7 @@ impl Stock { .find(|iimpl| C::IFACE_IDS.contains(&iimpl.iface_id)) .or_else(|| { schema_ifaces.iimpls.keys().find_map(|id| { - let iface = self.stash.iface(*id).ok()?; + let iface = self.stash.iface(id.clone()).ok()?; iface.find_abstractable_impl(schema_ifaces) }) }) From 675c6493a13b2e356e1942915dc42a0599a12aa4 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 17 Apr 2024 21:32:38 +0200 Subject: [PATCH 06/52] display URN prefix only in alt mode --- src/containers/consignment.rs | 2 +- src/containers/kit.rs | 2 +- src/interface/iface.rs | 2 +- src/interface/iimpl.rs | 2 +- src/interface/suppl.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index 27e38ff5..be39fe0c 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -90,7 +90,7 @@ impl ToBaid58<32> for ConsignmentId { impl FromBaid58<32> for ConsignmentId {} impl Display for ConsignmentId { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if !f.alternate() { + if f.alternate() { f.write_str("urn:lnp-bp:con:")?; } if f.sign_minus() { diff --git a/src/containers/kit.rs b/src/containers/kit.rs index bd98ace2..110c2347 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -77,7 +77,7 @@ impl ToBaid58<32> for KitId { impl FromBaid58<32> for KitId {} impl Display for KitId { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if !f.alternate() { + if f.alternate() { f.write_str("urn:lnp-bp:kit:")?; } if f.sign_minus() { diff --git a/src/interface/iface.rs b/src/interface/iface.rs index ba46c71c..3e6155dd 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -74,7 +74,7 @@ impl ToBaid58<32> for IfaceId { impl FromBaid58<32> for IfaceId {} impl Display for IfaceId { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if !f.alternate() { + if f.alternate() { f.write_str("urn:lnp-bp:if:")?; } if f.sign_minus() { diff --git a/src/interface/iimpl.rs b/src/interface/iimpl.rs index a529cc0c..005b6315 100644 --- a/src/interface/iimpl.rs +++ b/src/interface/iimpl.rs @@ -84,7 +84,7 @@ impl ToBaid58<32> for ImplId { impl FromBaid58<32> for ImplId {} impl Display for ImplId { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if !f.alternate() { + if f.alternate() { f.write_str("urn:lnp-bp:im:")?; } if f.sign_minus() { diff --git a/src/interface/suppl.rs b/src/interface/suppl.rs index a3053f01..d71bb155 100644 --- a/src/interface/suppl.rs +++ b/src/interface/suppl.rs @@ -68,7 +68,7 @@ impl ToBaid58<32> for SupplId { impl FromBaid58<32> for SupplId {} impl Display for SupplId { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if !f.alternate() { + if f.alternate() { f.write_str("urn:lnp-bp:suppl:")?; } if f.sign_minus() { From 78fc28891fe33bdcad0b4611a19387ba91e33b2f Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 17 Apr 2024 21:32:55 +0200 Subject: [PATCH 07/52] info: improve printing out information --- src/info.rs | 48 ++++++++++++++++++++++++++-------------- src/interface/iface.rs | 2 +- src/persistence/stock.rs | 10 ++++++++- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/src/info.rs b/src/info.rs index e281163d..6d752bf0 100644 --- a/src/info.rs +++ b/src/info.rs @@ -19,13 +19,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +use std::collections::HashMap; use std::fmt::{self, Display, Formatter, Write}; use chrono::{DateTime, TimeZone, Utc}; use rgb::{Identity, SchemaId}; use strict_encoding::{FieldName, TypeName}; -use crate::interface::{Iface, IfaceId, IfaceImpl, ImplId, VerNo}; +use crate::interface::{Iface, IfaceId, IfaceImpl, IfaceRef, ImplId, VerNo}; use crate::persistence::SchemaIfaces; #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] @@ -35,12 +36,13 @@ pub struct IfaceInfo { pub name: TypeName, pub developer: Identity, pub created_at: DateTime, - pub inherits: Vec, + pub inherits: Vec, pub default_op: Option, } impl IfaceInfo { - pub fn with(iface: &Iface) -> Self { + pub fn with(iface: &Iface, names: &HashMap) -> Self { + eprintln!("{:#?}", names); IfaceInfo { id: iface.iface_id(), version: iface.version, @@ -50,7 +52,17 @@ impl IfaceInfo { .timestamp_opt(iface.timestamp, 0) .single() .unwrap_or_else(Utc::now), - inherits: iface.inherits.iter().cloned().collect(), + inherits: iface + .inherits + .iter() + .map(|id| { + names + .get(id) + .cloned() + .map(IfaceRef::Name) + .unwrap_or(IfaceRef::Id(*id)) + }) + .collect(), default_op: iface.default_operation.clone(), } } @@ -58,25 +70,25 @@ impl IfaceInfo { impl Display for IfaceInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{: <40}", self.name)?; + write!(f, "{: <18}", self.developer.to_string())?; f.write_char(f.fill())?; write!(f, "{}", self.version)?; f.write_char(f.fill())?; - write!(f, "{}", self.developer)?; - f.write_char(f.fill())?; write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; f.write_char(f.fill())?; - write!(f, "{}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; + write!(f, "{:24}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; f.write_char(f.fill())?; - writeln!( + write!( f, - "{}", + "{:32}", self.inherits .iter() .map(|f| f.to_string()) .collect::>() .join(", ") )?; + writeln!(f, "{}", self.name)?; + f.write_char(f.fill())?; writeln!(f, "\t{}", self.id) } } @@ -112,14 +124,16 @@ impl SchemaInfo { impl Display for SchemaInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{: <40}", self.name)?; + write!(f, "{: <18}", self.developer.to_string())?; + f.write_char(f.fill())?; + write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; f.write_char(f.fill())?; - write!(f, "{}", self.developer)?; + write!(f, "{: <80}", self.id.to_string())?; f.write_char(f.fill())?; - writeln!(f, "{}", self.created_at.format("%Y-%m-%d"))?; + writeln!(f, "{: <24}", self.name)?; f.write_char(f.fill())?; for info in &self.implements { - writeln!(f, "\t{info}",)?; + writeln!(f, "\t{info}")?; } Ok(()) } @@ -151,12 +165,12 @@ impl ImplInfo { impl Display for ImplInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{: <40}", self.iface_name)?; + write!(f, "{: <24}", self.iface_name)?; f.write_char(f.fill())?; - write!(f, "{}", self.developer)?; + write!(f, "{: <18}", self.developer.to_string())?; f.write_char(f.fill())?; write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; f.write_char(f.fill())?; - writeln!(f, "{}", self.id) + write!(f, "{: <80}", self.id.to_string()) } } diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 3e6155dd..5c740459 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -95,7 +95,7 @@ impl IfaceId { pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } -#[derive(Clone, PartialEq, Eq, Debug, Display, From)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Display, From)] #[display(inner)] pub enum IfaceRef { #[from] diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index d0d40f41..8186218b 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -373,7 +373,15 @@ impl Stock { pub fn as_index_provider(&self) -> &P { self.index.as_provider() } pub fn ifaces(&self) -> Result + '_, StockError> { - Ok(self.stash.ifaces()?.map(IfaceInfo::with)) + let names = self + .stash + .ifaces()? + .map(|iface| (iface.iface_id(), iface.name.clone())) + .collect::>(); + Ok(self + .stash + .ifaces()? + .map(move |iface| IfaceInfo::with(iface, &names))) } pub fn iface(&self, iface: impl Into) -> Result<&Iface, StockError> { Ok(self.stash.iface(iface)?) From c6c125abee832d5ff0e1cd43f3bff4ee7fbf66a7 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 17 Apr 2024 22:56:44 +0200 Subject: [PATCH 08/52] iface: complete deterministic builder. Closes #111 --- src/interface/builder.rs | 387 +++++++++++++++++++++++++++++++++------ 1 file changed, 326 insertions(+), 61 deletions(-) diff --git a/src/interface/builder.rs b/src/interface/builder.rs index 27d2abb4..a45609f3 100644 --- a/src/interface/builder.rs +++ b/src/interface/builder.rs @@ -153,6 +153,21 @@ impl ContractBuilder { } } + pub fn deterministic( + iface: Iface, + schema: Schema, + iimpl: IfaceImpl, + types: TypeSystem, + scripts: Scripts, + ) -> Self { + Self { + builder: OperationBuilder::deterministic(iface, schema, iimpl, types), + testnet: true, + alt_layers1: none!(), + scripts, + } + } + pub fn type_system(&self) -> &TypeSystem { self.builder.type_system() } pub fn set_mainnet(mut self) -> Self { @@ -232,32 +247,29 @@ impl ContractBuilder { mut self, name: impl Into, seal: impl Into>, - value: u64, + value: impl Into, ) -> Result { let name = name.into(); let seal = seal.into(); self.check_layer1(seal.layer1())?; - let type_id = self - .builder - .assignments_type(&name) - .ok_or(BuilderError::AssignmentNotFound(name.clone()))?; - let tag = match self.builder.asset_tags.get(&type_id) { - Some(asset_tag) => *asset_tag, - None => { - let asset_tag = AssetTag::new_random( - format!( - "{}/{}", - self.builder.schema.schema_id(), - self.builder.iface.iface_id() - ), - type_id, - ); - self.builder.asset_tags.insert(type_id, asset_tag)?; - asset_tag - } - }; + self.builder.init_asset_tag(name.clone())?; + self.builder = self.builder.add_fungible_state(name, seal, value)?; + Ok(self) + } - self.builder = self.builder.add_fungible_state(name, seal, value, tag)?; + pub fn add_fungible_state_det( + mut self, + name: impl Into, + seal: impl Into>, + value: impl Into, + blinding: BlindingFactor, + ) -> Result { + let name = name.into(); + let seal = seal.into(); + self.check_layer1(seal.layer1())?; + let tag = self.builder.init_asset_tag(name.clone())?; + let state = RevealedValue::with_blinding(value.into(), blinding, tag); + self.builder = self.builder.add_fungible_state_det(name, seal, state)?; Ok(self) } @@ -273,6 +285,18 @@ impl ContractBuilder { Ok(self) } + pub fn add_data_det( + mut self, + name: impl Into, + seal: impl Into>, + data: RevealedData, + ) -> Result { + let seal = seal.into(); + self.check_layer1(seal.layer1())?; + self.builder = self.builder.add_data_det(name, seal, data)?; + Ok(self) + } + pub fn add_attachment( mut self, name: impl Into, @@ -285,7 +309,23 @@ impl ContractBuilder { Ok(self) } + pub fn add_attachment_det( + mut self, + name: impl Into, + seal: impl Into>, + attachment: RevealedAttach, + ) -> Result { + let seal = seal.into(); + self.check_layer1(seal.layer1())?; + self.builder = self.builder.add_attachment_det(name, seal, attachment)?; + Ok(self) + } + pub fn issue_contract(self) -> Result, BuilderError> { + debug_assert!( + !self.builder.deterministic, + "for issuing deterministic contracts please use issue_contract_det method" + ); self.issue_contract_det(Utc::now().timestamp()) } @@ -293,6 +333,14 @@ impl ContractBuilder { self, timestamp: i64, ) -> Result, BuilderError> { + debug_assert!( + self.builder.deterministic, + "for issuing deterministic contracts please use deterministic constructor" + ); + self.issue_contract_raw(timestamp) + } + + fn issue_contract_raw(self, timestamp: i64) -> Result, BuilderError> { let (schema, iface, iimpl, global, assignments, types, asset_tags) = self.builder.complete(None); @@ -361,6 +409,16 @@ impl TransitionBuilder { Self::with(contract_id, iface, schema, iimpl, TransitionType::BLANK, types) } + pub fn blank_transition_det( + contract_id: ContractId, + iface: Iface, + schema: Schema, + iimpl: IfaceImpl, + types: TypeSystem, + ) -> Self { + Self::deterministic(contract_id, iface, schema, iimpl, TransitionType::BLANK, types) + } + pub fn default_transition( contract_id: ContractId, iface: Iface, @@ -376,6 +434,21 @@ impl TransitionBuilder { Ok(Self::with(contract_id, iface, schema, iimpl, transition_type, types)) } + pub fn default_transition_det( + contract_id: ContractId, + iface: Iface, + schema: Schema, + iimpl: IfaceImpl, + types: TypeSystem, + ) -> Result { + let transition_type = iface + .default_operation + .as_ref() + .and_then(|name| iimpl.transition_type(name)) + .ok_or(BuilderError::NoOperationSubtype)?; + Ok(Self::deterministic(contract_id, iface, schema, iimpl, transition_type, types)) + } + pub fn named_transition( contract_id: ContractId, iface: Iface, @@ -391,6 +464,21 @@ impl TransitionBuilder { Ok(Self::with(contract_id, iface, schema, iimpl, transition_type, types)) } + pub fn named_transition_det( + contract_id: ContractId, + iface: Iface, + schema: Schema, + iimpl: IfaceImpl, + transition_name: impl Into, + types: TypeSystem, + ) -> Result { + let transition_name = transition_name.into(); + let transition_type = iimpl + .transition_type(&transition_name) + .ok_or(BuilderError::TransitionNotFound(transition_name))?; + Ok(Self::deterministic(contract_id, iface, schema, iimpl, transition_type, types)) + } + fn with( contract_id: ContractId, iface: Iface, @@ -407,6 +495,22 @@ impl TransitionBuilder { } } + fn deterministic( + contract_id: ContractId, + iface: Iface, + schema: Schema, + iimpl: IfaceImpl, + transition_type: TransitionType, + types: TypeSystem, + ) -> Self { + Self { + contract_id, + builder: OperationBuilder::deterministic(iface, schema, iimpl, types), + transition_type, + inputs: none!(), + } + } + pub fn type_system(&self) -> &TypeSystem { self.builder.type_system() } pub fn transition_type(&self) -> TransitionType { self.transition_type } @@ -506,24 +610,32 @@ impl TransitionBuilder { self.add_fungible_state(assignment_name, seal.into(), value) } - pub fn add_fungible_state_raw( + pub fn add_fungible_default_state_det( + self, + seal: impl Into>, + value: u64, + blinding: BlindingFactor, + ) -> Result { + let assignment_name = self.default_assignment()?.clone(); + self.add_fungible_state_det(assignment_name, seal.into(), value, blinding) + } + + pub fn add_fungible_state( mut self, - type_id: AssignmentType, + name: impl Into, seal: impl Into>, value: impl Into, - blinding: BlindingFactor, ) -> Result { - let tag = self.builder.asset_tag_raw(type_id)?; - let state = RevealedValue::with_blinding(value.into(), blinding, tag); - self.builder = self.builder.add_fungible_state_raw(type_id, seal, state)?; + self.builder = self.builder.add_fungible_state(name.into(), seal, value)?; Ok(self) } - pub fn add_fungible_state( + pub fn add_fungible_state_det( mut self, name: impl Into, seal: impl Into>, - value: u64, + value: impl Into, + blinding: BlindingFactor, ) -> Result { let name = name.into(); let type_id = self @@ -531,8 +643,22 @@ impl TransitionBuilder { .assignments_type(&name) .ok_or(BuilderError::AssignmentNotFound(name.clone()))?; let tag = self.builder.asset_tag_raw(type_id)?; + let state = RevealedValue::with_blinding(value.into(), blinding, tag); - self.builder = self.builder.add_fungible_state(name, seal, value, tag)?; + self.builder = self.builder.add_fungible_state_det(name, seal, state)?; + Ok(self) + } + + pub fn add_fungible_state_raw( + mut self, + type_id: AssignmentType, + seal: impl Into>, + value: impl Into, + blinding: BlindingFactor, + ) -> Result { + let tag = self.builder.asset_tag_raw(type_id)?; + let state = RevealedValue::with_blinding(value.into(), blinding, tag); + self.builder = self.builder.add_fungible_state_raw(type_id, seal, state)?; Ok(self) } @@ -546,6 +672,16 @@ impl TransitionBuilder { Ok(self) } + pub fn add_data_det( + mut self, + name: impl Into, + seal: impl Into>, + data: RevealedData, + ) -> Result { + self.builder = self.builder.add_data_det(name, seal, data)?; + Ok(self) + } + pub fn add_data_raw( mut self, type_id: AssignmentType, @@ -577,6 +713,16 @@ impl TransitionBuilder { Ok(self) } + pub fn add_attachment_det( + mut self, + name: impl Into, + seal: impl Into>, + attachment: RevealedAttach, + ) -> Result { + self.builder = self.builder.add_attachment_det(name, seal, attachment)?; + Ok(self) + } + pub fn complete_transition(self) -> Result { let (_, _, _, global, assignments, _, _) = self.builder.complete(Some(&self.inputs)); @@ -606,6 +752,7 @@ pub struct OperationBuilder { iface: Iface, iimpl: IfaceImpl, asset_tags: AssetTags, + deterministic: bool, global: GlobalState, rights: TinyOrdMap>, 1, U16>>, @@ -625,6 +772,25 @@ impl OperationBuilder { iface, iimpl, asset_tags: none!(), + deterministic: false, + + global: none!(), + rights: none!(), + fungible: none!(), + attachments: none!(), + data: none!(), + + types, + } + } + + fn deterministic(iface: Iface, schema: Schema, iimpl: IfaceImpl, types: TypeSystem) -> Self { + OperationBuilder { + schema, + iface, + iimpl, + asset_tags: none!(), + deterministic: true, global: none!(), rights: none!(), @@ -702,6 +868,24 @@ impl OperationBuilder { Ok(self) } + pub fn init_asset_tag(&mut self, name: impl Into) -> Result { + let name = name.into(); + let type_id = self + .assignments_type(&name) + .ok_or(BuilderError::AssignmentNotFound(name))?; + + if let Some(tag) = self.asset_tags.get(&type_id) { + Ok(*tag) + } else { + let asset_tag = AssetTag::new_random( + format!("{}/{}", self.schema.schema_id(), self.iface.iface_id()), + type_id, + ); + self.asset_tags.insert(type_id, asset_tag)?; + Ok(asset_tag) + } + } + // TODO: Add methods for adding metadata pub fn add_global_state( @@ -742,6 +926,11 @@ impl OperationBuilder { seal: impl Into>, state: PersistedState, ) -> Result { + debug_assert!( + self.deterministic, + "to add owned state in deterministic way the builder has to be created using `*_det` \ + constructor" + ); let name = name.into(); let type_id = self .assignments_type(&name) @@ -779,6 +968,20 @@ impl OperationBuilder { } } + fn add_rights( + self, + name: impl Into, + seal: impl Into>, + ) -> Result { + let name = name.into(); + + let type_id = self + .assignments_type(&name) + .ok_or(BuilderError::AssignmentNotFound(name))?; + + self.add_rights_raw(type_id, seal) + } + fn add_rights_raw( mut self, type_id: AssignmentType, @@ -802,18 +1005,46 @@ impl OperationBuilder { Ok(self) } - fn add_rights( + fn add_fungible_state( self, name: impl Into, seal: impl Into>, + value: impl Into, ) -> Result { + debug_assert!( + !self.deterministic, + "for adding state to deterministic contracts you have to use add_*_det methods" + ); + let name = name.into(); let type_id = self .assignments_type(&name) .ok_or(BuilderError::AssignmentNotFound(name))?; + let tag = self.asset_tag_raw(type_id)?; - self.add_rights_raw(type_id, seal) + let state = RevealedValue::new_random_blinding(value.into(), tag); + self.add_fungible_state_raw(type_id, seal, state) + } + + fn add_fungible_state_det( + self, + name: impl Into, + seal: impl Into>, + state: RevealedValue, + ) -> Result { + debug_assert!( + self.deterministic, + "to add owned state in deterministic way the builder has to be created using `*_det` \ + constructor" + ); + + let name = name.into(); + + let type_id = self + .assignments_type(&name) + .ok_or(BuilderError::AssignmentNotFound(name))?; + self.add_fungible_state_raw(type_id, seal, state) } fn add_fungible_state_raw( @@ -841,21 +1072,46 @@ impl OperationBuilder { Ok(self) } - fn add_fungible_state( + fn add_data( self, name: impl Into, seal: impl Into>, - value: u64, - tag: AssetTag, + value: impl StrictSerialize, ) -> Result { + debug_assert!( + !self.deterministic, + "for adding state to deterministic contracts you have to use add_*_det methods" + ); + let name = name.into(); + let serialized = value.to_strict_serialized::()?; + let state = DataState::from(serialized); let type_id = self .assignments_type(&name) .ok_or(BuilderError::AssignmentNotFound(name))?; - let state = RevealedValue::new_random_blinding(value, tag); - self.add_fungible_state_raw(type_id, seal, state) + self.add_data_raw(type_id, seal, RevealedData::new_random_salt(state)) + } + + fn add_data_det( + self, + name: impl Into, + seal: impl Into>, + state: RevealedData, + ) -> Result { + debug_assert!( + self.deterministic, + "to add owned state in deterministic way the builder has to be created using `*_det` \ + constructor" + ); + + let name = name.into(); + let type_id = self + .assignments_type(&name) + .ok_or(BuilderError::AssignmentNotFound(name))?; + + self.add_data_raw(type_id, seal, state) } fn add_data_raw( @@ -881,21 +1137,49 @@ impl OperationBuilder { Ok(self) } - fn add_data( + fn add_attachment( self, name: impl Into, seal: impl Into>, - value: impl StrictSerialize, + state: AttachedState, ) -> Result { + debug_assert!( + !self.deterministic, + "for adding state to deterministic contracts you have to use add_*_det methods" + ); + let name = name.into(); - let serialized = value.to_strict_serialized::()?; - let state = DataState::from(serialized); let type_id = self .assignments_type(&name) .ok_or(BuilderError::AssignmentNotFound(name))?; - self.add_data_raw(type_id, seal, RevealedData::new_random_salt(state)) + self.add_attachment_raw( + type_id, + seal, + RevealedAttach::new_random_salt(state.id, state.media_type), + ) + } + + fn add_attachment_det( + self, + name: impl Into, + seal: impl Into>, + state: RevealedAttach, + ) -> Result { + debug_assert!( + self.deterministic, + "to add owned state in deterministic way the builder has to be created using `*_det` \ + constructor" + ); + + let name = name.into(); + + let type_id = self + .assignments_type(&name) + .ok_or(BuilderError::AssignmentNotFound(name))?; + + self.add_attachment_raw(type_id, seal, state) } fn add_attachment_raw( @@ -922,25 +1206,6 @@ impl OperationBuilder { Ok(self) } - fn add_attachment( - self, - name: impl Into, - seal: impl Into>, - state: AttachedState, - ) -> Result { - let name = name.into(); - - let type_id = self - .assignments_type(&name) - .ok_or(BuilderError::AssignmentNotFound(name))?; - - self.add_attachment_raw( - type_id, - seal, - RevealedAttach::new_random_salt(state.id, state.media_type), - ) - } - fn complete( self, inputs: Option<&TinyOrdMap>, From 36335d4ac98822c14babe39c36a030b5f3e70cd8 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 18 Apr 2024 09:09:02 +0200 Subject: [PATCH 09/52] stl: improve Attachment type --- src/stl/specs.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stl/specs.rs b/src/stl/specs.rs index cad74091..59553231 100644 --- a/src/stl/specs.rs +++ b/src/stl/specs.rs @@ -25,6 +25,7 @@ use std::fmt::{self, Debug, Formatter}; use std::str::FromStr; use amplify::confinement::{Confined, NonEmptyString, SmallOrdSet, SmallString, U8}; +use amplify::Bytes32; use invoice::Precision; use strict_encoding::stl::{Alpha, AlphaNum, AsciiPrintable}; use strict_encoding::{ @@ -255,7 +256,7 @@ impl FromStr for RicardianContract { } } -#[derive(Clone, Eq, PartialEq, Hash, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_CONTRACT)] #[cfg_attr( @@ -267,7 +268,7 @@ pub struct Attachment { #[strict_type(rename = "type")] #[cfg_attr(feature = "serde", serde(rename = "type"))] pub ty: MediaType, - pub digest: [u8; 32], + pub digest: Bytes32, } impl StrictSerialize for Attachment {} impl StrictDeserialize for Attachment {} From 718e876880dae1185b37aeb600306b6213d4fc31 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 19 Apr 2024 13:19:49 +0200 Subject: [PATCH 10/52] containers: add convenience checks for tapret and opret anchor types --- src/containers/anchors.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/containers/anchors.rs b/src/containers/anchors.rs index bebc9676..86c730d5 100644 --- a/src/containers/anchors.rs +++ b/src/containers/anchors.rs @@ -259,9 +259,11 @@ impl AnchorSet { map.into_values() .map(|msg| BundleId::from_byte_array(msg.to_byte_array())) } -} -impl AnchorSet { + pub fn has_tapret(&self) -> bool { matches!(self, Self::Tapret(_) | Self::Double { .. }) } + + pub fn has_opret(&self) -> bool { matches!(self, Self::Opret(_) | Self::Double { .. }) } + pub fn merge_reveal(self, other: Self) -> Result { match (self, other) { (Self::Tapret(anchor), Self::Tapret(a)) if a.matches(&anchor) => { @@ -332,6 +334,10 @@ impl AnchoredBundles

{ } } + pub fn has_tapret(&self) -> bool { matches!(self, Self::Tapret(..) | Self::Double { .. }) } + + pub fn has_opret(&self) -> bool { matches!(self, Self::Opret(..) | Self::Double { .. }) } + pub fn pairs(&self) -> vec::IntoIter<(EAnchor

, &TransitionBundle)> where P: Clone { match self { From 76b6da4c1af821b159a32c76a0c02afd97a23e66 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 19 Apr 2024 15:42:59 +0200 Subject: [PATCH 11/52] containers: fix anchor merge-reveal operation Closes #196 --- src/accessors/merge_reveal.rs | 26 +++---------------------- src/containers/anchors.rs | 36 ++++++++++++++++------------------- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/src/accessors/merge_reveal.rs b/src/accessors/merge_reveal.rs index c0d48cf8..df4ecac1 100644 --- a/src/accessors/merge_reveal.rs +++ b/src/accessors/merge_reveal.rs @@ -26,8 +26,8 @@ use amplify::Wrapper; use bp::Txid; use commit_verify::{mpc, Conceal}; use rgb::{ - Assign, Assignments, BundleId, EAnchor, ExposedSeal, ExposedState, Extension, Genesis, OpId, - Operation, Transition, TransitionBundle, TypedAssigns, + Assign, Assignments, BundleId, ExposedSeal, ExposedState, Extension, Genesis, OpId, Operation, + Transition, TransitionBundle, TypedAssigns, }; #[derive(Copy, Clone, Eq, PartialEq, Debug, Display, Error, From)] @@ -38,9 +38,6 @@ pub enum MergeRevealError { /// error which should be reported to the software vendor. OperationMismatch(OpId, OpId), - /// mismatch between anchor DBC commitment schemes. - DbcMismatch, - /// mismatch in anchor chains: one grip references bitcoin transaction /// {bitcoin} and the other merged part references liquid transaction /// {liquid}. @@ -52,18 +49,11 @@ pub enum MergeRevealError { /// anchors in anchored bundle are not equal for bundle {0}. AnchorsNonEqual(BundleId), - /// anchors for the same witness do not match each other. - AnchorsMismatch, - - #[from] - #[display(inner)] - AnchorMismatch(mpc::MergeError), - /// the merged bundles contain more transitions than inputs. InsufficientInputs, /// contract id provided for the merge-reveal operation doesn't match - /// multi-protocol commitment. + /// multiprotocol commitment. #[from(mpc::InvalidProof)] #[from(mpc::LeafNotKnown)] ContractMismatch, @@ -264,16 +254,6 @@ impl MergeRevealContract for AnchoredBundle { } */ -impl MergeReveal for EAnchor { - fn merge_reveal(mut self, other: Self) -> Result { - self.mpc_proof.merge_reveal(other.mpc_proof)?; - if self.dbc_proof != other.dbc_proof { - return Err(MergeRevealError::DbcMismatch); - } - Ok(self) - } -} - impl MergeReveal for Genesis { fn merge_reveal(mut self, other: Self) -> Result { let self_id = self.id(); diff --git a/src/containers/anchors.rs b/src/containers/anchors.rs index 86c730d5..65f9466c 100644 --- a/src/containers/anchors.rs +++ b/src/containers/anchors.rs @@ -25,7 +25,7 @@ use std::vec; use amplify::ByteArray; use bp::dbc::opret::OpretProof; use bp::dbc::tapret::TapretProof; -use bp::dbc::Anchor; +use bp::dbc::{anchor, Anchor}; use bp::{Tx, Txid}; use commit_verify::{mpc, CommitId, ReservedBytes}; use rgb::{ @@ -264,38 +264,34 @@ impl AnchorSet { pub fn has_opret(&self) -> bool { matches!(self, Self::Opret(_) | Self::Double { .. }) } - pub fn merge_reveal(self, other: Self) -> Result { + pub fn merge_reveal(self, other: Self) -> Result { match (self, other) { - (Self::Tapret(anchor), Self::Tapret(a)) if a.matches(&anchor) => { - Ok(Self::Tapret(anchor)) - } - (Self::Opret(anchor), Self::Opret(a)) if a.matches(&anchor) => Ok(Self::Opret(anchor)), + (Self::Tapret(anchor), Self::Tapret(a)) => Ok(Self::Tapret(anchor.merge_reveal(a)?)), + (Self::Opret(anchor), Self::Opret(a)) => Ok(Self::Opret(anchor.merge_reveal(a)?)), (Self::Tapret(tapret), Self::Opret(opret)) | (Self::Opret(opret), Self::Tapret(tapret)) => Ok(Self::Double { tapret, opret }), (Self::Double { tapret, opret }, Self::Tapret(t)) | - (Self::Tapret(t), Self::Double { tapret, opret }) - if t.matches(&tapret) => - { - Ok(Self::Double { tapret, opret }) - } + (Self::Tapret(t), Self::Double { tapret, opret }) => Ok(Self::Double { + tapret: tapret.merge_reveal(t)?, + opret, + }), (Self::Double { tapret, opret }, Self::Opret(o)) | - (Self::Opret(o), Self::Double { tapret, opret }) - if o.matches(&opret) => - { - Ok(Self::Double { tapret, opret }) - } - + (Self::Opret(o), Self::Double { tapret, opret }) => Ok(Self::Double { + tapret, + opret: opret.merge_reveal(o)?, + }), ( Self::Double { tapret, opret }, Self::Double { tapret: t, opret: o, }, - ) if t.matches(&tapret) && o.matches(&opret) => Ok(Self::Double { tapret, opret }), - - _ => Err(MergeRevealError::AnchorsMismatch), + ) => Ok(Self::Double { + tapret: tapret.merge_reveal(t)?, + opret: opret.merge_reveal(o)?, + }), } } } From 75dd8cafbe456a39b8e09491e8abe6eca691ccfb Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 19 Apr 2024 16:32:43 +0200 Subject: [PATCH 12/52] chore: rename accessors mod to contract --- src/containers/anchors.rs | 3 +-- src/containers/consignment.rs | 3 +-- src/{accessors => contract}/assignments.rs | 0 src/{accessors => contract}/bundle.rs | 2 +- src/{accessors => contract}/merge_reveal.rs | 0 src/{accessors => contract}/mod.rs | 0 src/interface/resolver.rs | 2 +- src/lib.rs | 5 +++-- src/persistence/stash.rs | 3 +-- src/persistence/stock.rs | 2 +- 10 files changed, 9 insertions(+), 11 deletions(-) rename src/{accessors => contract}/assignments.rs (100%) rename src/{accessors => contract}/bundle.rs (98%) rename src/{accessors => contract}/merge_reveal.rs (100%) rename src/{accessors => contract}/mod.rs (100%) diff --git a/src/containers/anchors.rs b/src/containers/anchors.rs index bebc9676..12a3d82f 100644 --- a/src/containers/anchors.rs +++ b/src/containers/anchors.rs @@ -34,8 +34,7 @@ use rgb::{ }; use strict_encoding::StrictDumb; -use crate::accessors::{BundleExt, MergeReveal, MergeRevealError, RevealError}; -use crate::LIB_NAME_RGB_STD; +use crate::{BundleExt, MergeReveal, MergeRevealError, RevealError, LIB_NAME_RGB_STD}; #[derive(Clone, Eq, PartialEq, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index be39fe0c..b6ee5fe9 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -46,11 +46,10 @@ use super::{ TerminalDisclose, ASCII_ARMOR_CONSIGNMENT_TYPE, ASCII_ARMOR_CONTRACT_, ASCII_ARMOR_TERMINAL, ASCII_ARMOR_VERSION, }; -use crate::accessors::BundleExt; use crate::containers::anchors::ToWitnessId; use crate::interface::{ContractSuppl, Iface, IfaceImpl}; use crate::resolvers::ResolveHeight; -use crate::{SecretSeal, LIB_NAME_RGB_STD}; +use crate::{BundleExt, SecretSeal, LIB_NAME_RGB_STD}; pub type Transfer = Consignment; pub type Contract = Consignment; diff --git a/src/accessors/assignments.rs b/src/contract/assignments.rs similarity index 100% rename from src/accessors/assignments.rs rename to src/contract/assignments.rs diff --git a/src/accessors/bundle.rs b/src/contract/bundle.rs similarity index 98% rename from src/accessors/bundle.rs rename to src/contract/bundle.rs index 134c2fb7..ddd95eca 100644 --- a/src/accessors/bundle.rs +++ b/src/contract/bundle.rs @@ -21,7 +21,7 @@ use rgb::{GraphSeal, OpId, Operation, Transition, TransitionBundle, XChain}; -use crate::accessors::TypedAssignsExt; +use crate::contract::TypedAssignsExt; #[derive(Clone, Eq, PartialEq, Debug, Display, Error)] #[display(doc_comments)] diff --git a/src/accessors/merge_reveal.rs b/src/contract/merge_reveal.rs similarity index 100% rename from src/accessors/merge_reveal.rs rename to src/contract/merge_reveal.rs diff --git a/src/accessors/mod.rs b/src/contract/mod.rs similarity index 100% rename from src/accessors/mod.rs rename to src/contract/mod.rs diff --git a/src/interface/resolver.rs b/src/interface/resolver.rs index a0cbd733..2e3e25d4 100644 --- a/src/interface/resolver.rs +++ b/src/interface/resolver.rs @@ -21,11 +21,11 @@ use std::convert::Infallible; +use rgb::validation::{ResolveWitness, WitnessResolverError}; use rgb::XWitnessTx; use strict_encoding::StrictDumb; use crate::resolvers::ResolveHeight; -use crate::validation::{ResolveWitness, WitnessResolverError}; use crate::{WitnessAnchor, XWitnessId}; pub(crate) struct DumbResolver; diff --git a/src/lib.rs b/src/lib.rs index 4c987770..b5b65178 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,12 +86,13 @@ pub mod interface; pub mod containers; pub mod persistence; pub mod resolvers; -pub mod accessors; +mod contract; pub mod info; pub use bp::{Outpoint, Txid}; +pub use contract::{BundleExt, MergeReveal, MergeRevealError, RevealError, TypedAssignsExt}; pub use invoice::{Allocation, Amount, CoinAmount, OwnedFraction, Precision, TokenIndex}; -pub use rgb::*; +pub use rgb::prelude::*; pub use stl::{LIB_NAME_RGB_CONTRACT, LIB_NAME_RGB_STD}; /// BIP32 derivation index for outputs which may contain assigned RGB state. diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index 69553ffe..c1fa3f73 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -37,13 +37,12 @@ use strict_encoding::{FieldName, TypeName}; use strict_types::typesys::UnknownType; use strict_types::TypeSystem; -use crate::accessors::{MergeReveal, MergeRevealError}; use crate::containers::{BundledWitness, Consignment, ContentId, Kit, SealWitness, SigBlob}; use crate::interface::{ ContractBuilder, ContractSuppl, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef, TransitionBuilder, }; -use crate::{SecretSeal, LIB_NAME_RGB_STD}; +use crate::{MergeReveal, MergeRevealError, SecretSeal, LIB_NAME_RGB_STD}; #[derive(Clone, Eq, PartialEq, Debug, Display, Error, From)] #[display(inner)] diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 93ed4a14..0ee67e71 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -45,7 +45,6 @@ use super::{ StashInconsistency, StashProvider, StashReadProvider, StashWriteProvider, StateProvider, StateReadProvider, StateUpdateError, StateWriteProvider, }; -use crate::accessors::{MergeRevealError, RevealError}; use crate::containers::{ AnchorSet, AnchoredBundles, Batch, BuilderSeal, BundledWitness, Consignment, ContainerVer, Contract, Fascia, PubWitness, SealWitness, Terminal, TerminalSeal, Transfer, TransitionInfo, @@ -58,6 +57,7 @@ use crate::interface::{ TransitionBuilder, VelocityHint, }; use crate::resolvers::ResolveHeight; +use crate::{MergeRevealError, RevealError}; pub type ContractAssignments = HashMap>; From c97ecbc2ff4af84e3067bbfb7d3a9bd83bf9752d Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 19 Apr 2024 19:58:45 +0200 Subject: [PATCH 13/52] chore: update dependencies --- Cargo.lock | 22 +++++++++++----------- Cargo.toml | 10 +++++----- src/lib.rs | 1 + 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b3a2247..98a62f14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ version = 3 [[package]] name = "aluvm" version = "0.11.0-beta.5" -source = "git+https://github.com/AluVM/rust-aluvm?branch=v0.11#d18ea84836a8a96f3dfe61c99b94f2eab1417819" +source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#fafec9e124b10d4653cec7ef7804e1a9bda97844" dependencies = [ "amplify", "ascii-armor", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "bp-consensus" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#3e373d2926f5519bae39055fbe2864e3fcce2677" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" dependencies = [ "amplify", "chrono", @@ -244,7 +244,7 @@ dependencies = [ [[package]] name = "bp-core" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#3e373d2926f5519bae39055fbe2864e3fcce2677" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" dependencies = [ "amplify", "bp-consensus", @@ -262,7 +262,7 @@ dependencies = [ [[package]] name = "bp-dbc" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#3e373d2926f5519bae39055fbe2864e3fcce2677" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" dependencies = [ "amplify", "base85", @@ -288,7 +288,7 @@ dependencies = [ [[package]] name = "bp-seals" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#3e373d2926f5519bae39055fbe2864e3fcce2677" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" dependencies = [ "amplify", "baid58", @@ -336,7 +336,7 @@ dependencies = [ [[package]] name = "commit_encoding_derive" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#4ca5963fbf6d57138f5b81ebe70aa095a79d0d9d" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" dependencies = [ "amplify", "amplify_syn", @@ -348,7 +348,7 @@ dependencies = [ [[package]] name = "commit_verify" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#4ca5963fbf6d57138f5b81ebe70aa095a79d0d9d" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" dependencies = [ "amplify", "commit_encoding_derive", @@ -645,7 +645,7 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#177c908bc7b097fd640a7cd30afe0b624bca3580" +source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#bc8243c61de9eac0f8c1cbf2f92922efb216efc3" dependencies = [ "aluvm", "amplify", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "single_use_seals" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#4ca5963fbf6d57138f5b81ebe70aa095a79d0d9d" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" dependencies = [ "amplify_derive", ] @@ -1001,9 +1001,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index b88cc0b0..4a4d1887 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,9 +98,9 @@ features = ["all"] [patch.crates-io] commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" } single_use_seals = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" } -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" } +bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } +bp-dbc = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } +bp-seals = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } +bp-core = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "develop" } -aluvm = { git = "https://github.com/AluVM/rust-aluvm", branch = "v0.11" } +aluvm = { git = "https://github.com/AluVM/rust-aluvm", branch = "develop" } diff --git a/src/lib.rs b/src/lib.rs index b5b65178..296e9c40 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -93,6 +93,7 @@ pub use bp::{Outpoint, Txid}; pub use contract::{BundleExt, MergeReveal, MergeRevealError, RevealError, TypedAssignsExt}; pub use invoice::{Allocation, Amount, CoinAmount, OwnedFraction, Precision, TokenIndex}; pub use rgb::prelude::*; +pub use rgb::rgbasm; pub use stl::{LIB_NAME_RGB_CONTRACT, LIB_NAME_RGB_STD}; /// BIP32 derivation index for outputs which may contain assigned RGB state. From 6341d2a240ef612571b20fd7c18423f960453146 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 19 Apr 2024 20:57:01 +0200 Subject: [PATCH 14/52] iface: fix deterministic contract issuance --- src/interface/builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/builder.rs b/src/interface/builder.rs index a45609f3..52169171 100644 --- a/src/interface/builder.rs +++ b/src/interface/builder.rs @@ -326,7 +326,7 @@ impl ContractBuilder { !self.builder.deterministic, "for issuing deterministic contracts please use issue_contract_det method" ); - self.issue_contract_det(Utc::now().timestamp()) + self.issue_contract_raw(Utc::now().timestamp()) } pub fn issue_contract_det( From 82707a1da1f529d420905d25656db283fe58f528 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 19 Apr 2024 21:24:28 +0200 Subject: [PATCH 15/52] info: add serde support --- Cargo.lock | 1 + Cargo.toml | 1 + src/info.rs | 15 +++++++++++++++ src/interface/iface.rs | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 5cc34080..1def46a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,6 +329,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", "windows-targets", ] diff --git a/Cargo.toml b/Cargo.toml index e15efd96..9d85b1e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,6 +74,7 @@ default = [] all = ["fs", "serde"] serde = [ "serde_crate", + "chrono/serde", "amplify/serde", "strict_encoding/serde", "strict_types/serde", diff --git a/src/info.rs b/src/info.rs index 6d752bf0..1dbca87a 100644 --- a/src/info.rs +++ b/src/info.rs @@ -30,6 +30,11 @@ use crate::interface::{Iface, IfaceId, IfaceImpl, IfaceRef, ImplId, VerNo}; use crate::persistence::SchemaIfaces; #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] pub struct IfaceInfo { pub id: IfaceId, pub version: VerNo, @@ -94,6 +99,11 @@ impl Display for IfaceInfo { } #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] pub struct SchemaInfo { pub id: SchemaId, pub name: TypeName, @@ -140,6 +150,11 @@ impl Display for SchemaInfo { } #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] pub struct ImplInfo { pub id: ImplId, pub iface_id: IfaceId, diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 5c740459..798a6d9a 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -97,6 +97,11 @@ impl IfaceId { #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Display, From)] #[display(inner)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] pub enum IfaceRef { #[from] #[from(&'static str)] From d0b2e5c94dfce22a2562f1c91e547f1b916b513c Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 19 Apr 2024 21:54:46 +0200 Subject: [PATCH 16/52] persistence: export schema kits --- src/persistence/stock.rs | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 8186218b..cfb7393c 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -48,8 +48,8 @@ use super::{ use crate::accessors::{MergeRevealError, RevealError}; use crate::containers::{ AnchorSet, AnchoredBundles, Batch, BuilderSeal, BundledWitness, Consignment, ContainerVer, - Contract, Fascia, PubWitness, SealWitness, Terminal, TerminalSeal, Transfer, TransitionInfo, - TransitionInfoError, ValidConsignment, ValidContract, ValidKit, ValidTransfer, + Contract, Fascia, Kit, PubWitness, SealWitness, Terminal, TerminalSeal, Transfer, + TransitionInfo, TransitionInfoError, ValidConsignment, ValidContract, ValidKit, ValidTransfer, }; use crate::info::{IfaceInfo, SchemaInfo}; use crate::interface::resolver::DumbResolver; @@ -597,6 +597,27 @@ impl Stock { Ok(self.stash.blank_builder(contract_id, iface)?) } + pub fn export_schema(&self, schema_id: SchemaId) -> Result> { + let mut kit = Kit::default(); + let schema_ifaces = self.schema(schema_id)?; + kit.schemata + .push(schema_ifaces.schema.clone()) + .expect("single item"); + for name in schema_ifaces.iimpls.keys() { + let iface = self.stash.iface(name.clone())?; + kit.ifaces.push(iface.clone()).expect("type guarantees"); + } + kit.iimpls + .extend(schema_ifaces.iimpls.values().cloned()) + .expect("type guarantees"); + let (types, scripts) = self.stash.extract(&schema_ifaces.schema, &kit.ifaces)?; + kit.scripts + .extend(scripts.into_values()) + .expect("type guarantees"); + kit.types = types; + Ok(kit.validate().expect("stock produced invalid kit")) + } + pub fn export_contract( &self, contract_id: ContractId, From ffcca5fd3e2f9a2fdd0a23324093414dd34db896 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 20 Apr 2024 00:26:43 +0200 Subject: [PATCH 17/52] stl: add Article and ContractSpec for RGB25 --- src/stl/mod.rs | 4 +-- src/stl/specs.rs | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/src/stl/mod.rs b/src/stl/mod.rs index a32a0449..9f14f7be 100644 --- a/src/stl/mod.rs +++ b/src/stl/mod.rs @@ -31,8 +31,8 @@ use error::Error; pub use invoice::LIB_NAME_RGB_CONTRACT; pub use mime::{MediaRegName, MediaType}; pub use specs::{ - AssetSpec, AssetTerms, Attachment, BurnMeta, Details, IssueMeta, Name, RicardianContract, - Ticker, + Article, AssetSpec, AssetTerms, Attachment, BurnMeta, ContractSpec, Details, IssueMeta, Name, + RicardianContract, Ticker, }; pub use stl::{ aluvm_stl, bp_core_stl, bp_tx_stl, commit_verify_stl, rgb_contract_stl, rgb_core_stl, diff --git a/src/stl/specs.rs b/src/stl/specs.rs index 59553231..238cd935 100644 --- a/src/stl/specs.rs +++ b/src/stl/specs.rs @@ -64,6 +64,20 @@ pub struct IssueMeta { impl StrictSerialize for IssueMeta {} impl StrictDeserialize for IssueMeta {} +#[derive(Wrapper, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, From)] +#[wrapper(Deref, Display, FromStr)] +#[derive(StrictDumb, StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_CONTRACT, dumb = { Article::from("DUMB") })] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) +)] +pub struct Article(RString); + +impl_ident_type!(Article); +impl_ident_subtype!(Article); + #[derive(Wrapper, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, From)] #[wrapper(Deref, Display, FromStr)] #[derive(StrictDumb, StrictType, StrictEncode, StrictDecode)] @@ -229,6 +243,76 @@ impl AssetSpec { pub fn details(&self) -> Option<&str> { self.details.as_ref().map(|d| d.as_str()) } } +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +#[derive(StrictDumb, StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_CONTRACT)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] +pub struct ContractSpec { + pub article: Option

, + pub name: Name, + pub details: Option
, + pub precision: Precision, +} +impl StrictSerialize for ContractSpec {} +impl StrictDeserialize for ContractSpec {} + +impl ContractSpec { + pub fn new(name: &'static str, precision: Precision) -> ContractSpec { + ContractSpec { + article: None, + name: Name::from(name), + details: None, + precision, + } + } + + pub fn with( + article: &str, + name: &str, + precision: Precision, + details: Option<&str>, + ) -> Result { + Ok(ContractSpec { + article: Some(Article::try_from(article.to_owned())?), + name: Name::try_from(name.to_owned())?, + details: details.map(Details::from_str).transpose()?, + precision, + }) + } + + pub fn from_strict_val_unchecked(value: &StrictVal) -> Self { + let article = value.unwrap_struct("article").unwrap_option(); + let name = value.unwrap_struct("name").unwrap_string(); + let details = value + .unwrap_struct("details") + .unwrap_option() + .map(StrictVal::unwrap_string); + let precision = value.unwrap_struct("precision").unwrap_enum(); + Self { + article: article.map(|val| { + Article::from_str(&val.unwrap_string()).expect("invalid contract article") + }), + name: Name::from_str(&name).expect("invalid contract name"), + details: details + .as_deref() + .map(Details::from_str) + .transpose() + .expect("invalid contract details"), + precision, + } + } + + pub fn article(&self) -> Option<&str> { self.article.as_ref().map(|a| a.as_str()) } + + pub fn name(&self) -> &str { self.name.as_str() } + + pub fn details(&self) -> Option<&str> { self.details.as_ref().map(|d| d.as_str()) } +} + #[derive(Clone, Eq, PartialEq, Hash, Debug, Display, Default)] #[display(inner)] #[derive(StrictType, StrictEncode, StrictDecode)] From 25a9713127f8e5b04becd21945fa70f7230f421f Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 20 Apr 2024 00:29:07 +0200 Subject: [PATCH 18/52] stl: rename AssetTerms to ContractTerms --- src/stl/mod.rs | 4 +-- src/stl/specs.rs | 8 ++--- src/stl/stl.rs | 10 ++++-- stl/RGBContract@0.11.0.sta | 68 ++++++++++++++++++++----------------- stl/RGBContract@0.11.0.stl | Bin 1820 -> 2136 bytes stl/RGBContract@0.11.0.sty | 17 +++++++--- 6 files changed, 63 insertions(+), 44 deletions(-) diff --git a/src/stl/mod.rs b/src/stl/mod.rs index 9f14f7be..82bffb6a 100644 --- a/src/stl/mod.rs +++ b/src/stl/mod.rs @@ -31,8 +31,8 @@ use error::Error; pub use invoice::LIB_NAME_RGB_CONTRACT; pub use mime::{MediaRegName, MediaType}; pub use specs::{ - Article, AssetSpec, AssetTerms, Attachment, BurnMeta, ContractSpec, Details, IssueMeta, Name, - RicardianContract, Ticker, + Article, AssetSpec, Attachment, BurnMeta, ContractSpec, ContractTerms, Details, IssueMeta, + Name, RicardianContract, Ticker, }; pub use stl::{ aluvm_stl, bp_core_stl, bp_tx_stl, commit_verify_stl, rgb_contract_stl, rgb_core_stl, diff --git a/src/stl/specs.rs b/src/stl/specs.rs index 238cd935..ff916371 100644 --- a/src/stl/specs.rs +++ b/src/stl/specs.rs @@ -377,14 +377,14 @@ impl Attachment { derive(Serialize, Deserialize), serde(crate = "serde_crate", rename_all = "camelCase") )] -pub struct AssetTerms { +pub struct ContractTerms { pub text: RicardianContract, pub media: Option, } -impl StrictSerialize for AssetTerms {} -impl StrictDeserialize for AssetTerms {} +impl StrictSerialize for ContractTerms {} +impl StrictDeserialize for ContractTerms {} -impl AssetTerms { +impl ContractTerms { pub fn from_strict_val_unchecked(value: &StrictVal) -> Self { let text = RicardianContract::from_str(&value.unwrap_struct("text").unwrap_string()) .expect("invalid text"); diff --git a/src/stl/stl.rs b/src/stl/stl.rs index 9cb29d05..fc9a2fb9 100644 --- a/src/stl/stl.rs +++ b/src/stl/stl.rs @@ -29,7 +29,10 @@ use strict_types::stl::{std_stl, strict_types_stl}; use strict_types::typesys::SystemBuilder; use strict_types::{CompileError, LibBuilder, SemId, SymbolicSys, TypeLib, TypeSystem}; -use super::{AssetSpec, AssetTerms, BurnMeta, Error, IssueMeta, MediaType, LIB_NAME_RGB_CONTRACT}; +use super::{ + AssetSpec, BurnMeta, ContractSpec, ContractTerms, Error, IssueMeta, MediaType, + LIB_NAME_RGB_CONTRACT, +}; use crate::containers::{Contract, Kit, Transfer}; use crate::stl::ProofOfReserves; use crate::LIB_NAME_RGB_STD; @@ -37,7 +40,7 @@ use crate::LIB_NAME_RGB_STD; /// Strict types id for the library providing standard data types which may be /// used in RGB smart contracts. pub const LIB_ID_RGB_CONTRACT: &str = - "urn:ubideco:stl:7isbv9C7vzzuNUvpPPbxnLFj7V6XZHP8kWPAZezjvaqx#barbara-limit-cricket"; + "urn:ubideco:stl:8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage"; /// Strict types id for the library representing of RGB StdLib data types. pub const LIB_ID_RGB_STD: &str = @@ -66,8 +69,9 @@ fn _rgb_contract_stl() -> Result { }) .transpile::() .transpile::() + .transpile::() .transpile::() - .transpile::() + .transpile::() .transpile::() .transpile::() .transpile::() diff --git a/stl/RGBContract@0.11.0.sta b/stl/RGBContract@0.11.0.sta index 931be7ee..75f24025 100644 --- a/stl/RGBContract@0.11.0.sta +++ b/stl/RGBContract@0.11.0.sta @@ -1,9 +1,9 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:7isbv9C7vzzuNUvpPPbxnLFj7V6XZHP8kWPAZezjvaqx#barbara-limit-cricket +Id: urn:ubideco:stl:8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage Name: RGBContract Dependency: EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average Dependency: HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy -Checksum-SHA256: 0f51b4b06f3c0ac1f954ec0a27fdf747925b6d61e4ee4554cc222a3081cc0882 +Checksum-SH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n^h#00aU61a5C`WdHyG0R(ezZDjxj0Rbl0%7CM_g} +3!I_91NfxtbRARj$2dg@Ue53tjM-(@zIPWprU_Y;y$x00;m90RR9100000{{R300 +00002}yHvb!AOubYTVo2y$g}WpZ|9a{vhe4$>Ms8HM=uUmE|%CLL8DYpYB02F=7s +{mYlP#7GIv0000000000|Nj60000003{7QZX<<@jXHH>lWd#8M2m;D19&dx0-7pM +3Z=O*v*GCA9fL-<|HrZsA`NnJlR44ft2n5}(1bO(?uXL+B(gNn{L2}utxi<$D8ry +%w450x400000002M$00000000S1Wn^h#RC#b^1_K0id2nR`H##wFzD%69Jm}oVMeH)yxSXPG-2S`Bl9odUD)7AWmOR*scd-Xkl`5Wpn@p0ssVVZ*FA(00035 +b8l^B00jX7H##wFzD%69V==6ANi>WNCJ3b7^91WdH4q11 +PWtiZggo)X>4q11qE$sV{&f>31nqsX-#Qka&HF;V`Xl1X-#Qka&HI(Zeeb32?%6m +V`)xdZf^<+V`Xl1X-;8oZwmx)X=85;2xMhrX;5inZw(1!Wo~q7P-$at4h3dqZFFx +B31nqsX+~vjbZ-y}V`Xl1X+~vjbZ-#^VRUqF5)V*vZ*OK#W>RHyWpZ|9a|Qwgb#! +=d0`+VYVk7oBr%DNv+($;q`HHK!gIHa)*%m(-e#9sm3g~J;&0HnY62ZUYgq2{$1_f|(Z*OJ*2mk;;0000000000|Nj60000005mISmVRB??V +QxcjZgg^CV{`=p00;m90000000000|Nj600000022^QdYh`i;0RRXB$}AplgPGkh +3_fq3Q7_j=2#kPT_9!;lWR>~GYywm#f+K+Rb@1)9wcJs8k=}EVt)knrbu3HK~$nTv~4Cws7DO}@p{wRscEGG+kD=L{48 diff --git a/stl/RGBContract@0.11.0.sty b/stl/RGBContract@0.11.0.sty index 2abb229a..2c093103 100644 --- a/stl/RGBContract@0.11.0.sty +++ b/stl/RGBContract@0.11.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:7isbv9C7vzzuNUvpPPbxnLFj7V6XZHP8kWPAZezjvaqx#barbara-limit-cricket + Id: urn:ubideco:stl:8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage Name: RGBContract Version: 0.11.0 Description: Types for writing RGB contracts and interfaces @@ -28,21 +28,30 @@ data Allocation : TokenIndex, OwnedFraction @mnemonic(burma-picasso-granite) data Amount : U64 +@mnemonic(james-karl-master) +data Article : [Std.Alpha#october-urgent-tunnel ^ 1..0x20] + @mnemonic(xray-giant-nina) data AssetSpec : ticker Ticker , name Name , details Details? , precision Precision -@mnemonic(flower-anita-austin) -data AssetTerms : text RicardianContract, media Attachment? - @mnemonic(flame-unicorn-fruit) data Attachment : type MediaType, digest [Byte ^ 32] @mnemonic(gabriel-fiber-oregano) data BurnMeta : burnProofs {ProofOfReserves} +@mnemonic(sonic-retro-robin) +data ContractSpec : article Article? + , name Name + , details Details? + , precision Precision + +@mnemonic(mega-gate-candle) +data ContractTerms : text RicardianContract, media Attachment? + @mnemonic(network-kayak-adam) data Details : [Unicode ^ 1..0xff] From 351cfe70795fdc7ef0a0eaeec692cd598347e8e7 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 20 Apr 2024 01:17:24 +0200 Subject: [PATCH 19/52] containers: fix armor headers --- Cargo.lock | 21 +++++++++++++++++---- Cargo.toml | 2 +- src/containers/consignment.rs | 20 +++++++++++--------- src/containers/kit.rs | 17 +++++++++++++---- src/containers/mod.rs | 2 +- 5 files changed, 43 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6cdf9d1..f058aa00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.11.0-beta.5" source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#fafec9e124b10d4653cec7ef7804e1a9bda97844" dependencies = [ "amplify", - "ascii-armor", + "ascii-armor 0.2.0", "baid58", "blake3", "getrandom", @@ -132,6 +132,19 @@ dependencies = [ "strict_encoding", ] +[[package]] +name = "ascii-armor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44ce552de9efa4fdee1a7920f3587e17689bf4a4ba149a7892f91820673c1e29" +dependencies = [ + "amplify", + "baid58", + "base85", + "sha2", + "strict_encoding", +] + [[package]] name = "autocfg" version = "1.2.0" @@ -650,7 +663,7 @@ source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#bc8243c61de9eac0 dependencies = [ "aluvm", "amplify", - "ascii-armor", + "ascii-armor 0.2.0", "baid58", "bp-core", "chrono", @@ -688,7 +701,7 @@ version = "0.11.0-beta.5" dependencies = [ "aluvm", "amplify", - "ascii-armor", + "ascii-armor 0.3.0", "baid58", "base85", "bp-core", @@ -914,7 +927,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "152bd04284e9093f23a911d0d89b7dd950a461af1ed5e243f6215fbcd45e9445" dependencies = [ "amplify", - "ascii-armor", + "ascii-armor 0.2.0", "baid58", "half", "indexmap", diff --git a/Cargo.toml b/Cargo.toml index 18c2c312..84c470b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ license = "Apache-2.0" [workspace.dependencies] amplify = "4.6.0" -ascii-armor = "0.2.0" +ascii-armor = "0.3.0" baid58 = "0.4.4" strict_encoding = "2.7.0-beta.3" strict_types = "2.7.0-beta.3" diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index b6ee5fe9..7a597799 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -43,8 +43,8 @@ use strict_types::TypeSystem; use super::{ BundledWitness, ContainerVer, ContentId, ContentSigs, IndexedConsignment, Terminal, - TerminalDisclose, ASCII_ARMOR_CONSIGNMENT_TYPE, ASCII_ARMOR_CONTRACT_, ASCII_ARMOR_TERMINAL, - ASCII_ARMOR_VERSION, + TerminalDisclose, ASCII_ARMOR_CONSIGNMENT_TYPE, ASCII_ARMOR_CONTRACT, ASCII_ARMOR_IFACE, + ASCII_ARMOR_SCHEMA, ASCII_ARMOR_TERMINAL, ASCII_ARMOR_VERSION, }; use crate::containers::anchors::ToWitnessId; use crate::interface::{ContractSuppl, Iface, IfaceImpl}; @@ -386,7 +386,7 @@ impl StrictArmor for Consignment { fn armor_id(&self) -> Self::Id { self.commit_id() } fn armor_headers(&self) -> Vec { - let mut headers = vec![ + vec![ ArmorHeader::new(ASCII_ARMOR_VERSION, self.version.to_string()), ArmorHeader::new( ASCII_ARMOR_CONSIGNMENT_TYPE, @@ -396,11 +396,13 @@ impl StrictArmor for Consignment { s!("contract") }, ), - ArmorHeader::new(ASCII_ARMOR_CONTRACT_, self.contract_id().to_string()), - ]; - for bundle_id in self.terminals.keys() { - headers.push(ArmorHeader::new(ASCII_ARMOR_TERMINAL, bundle_id.to_string())); - } - headers + ArmorHeader::new(ASCII_ARMOR_CONTRACT, self.contract_id().to_string()), + ArmorHeader::new(ASCII_ARMOR_SCHEMA, self.schema.schema_id().to_string()), + ArmorHeader::with( + ASCII_ARMOR_IFACE, + self.ifaces.keys().map(|iface| iface.name.to_string()), + ), + ArmorHeader::with(ASCII_ARMOR_TERMINAL, self.terminals.keys().map(BundleId::to_string)), + ] } } diff --git a/src/containers/kit.rs b/src/containers/kit.rs index 110c2347..e9f243c2 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -206,7 +206,8 @@ impl StrictArmor for Kit { fn armor_id(&self) -> Self::Id { self.kit_id() } fn armor_headers(&self) -> Vec { - let mut headers = vec![ArmorHeader::new(ASCII_ARMOR_VERSION, self.version.to_string())]; + let mut headers = + vec![ArmorHeader::new(ASCII_ARMOR_VERSION, format!("{:#}", self.version))]; for iface in &self.ifaces { let mut header = ArmorHeader::new(ASCII_ARMOR_IFACE, iface.name.to_string()); header.params.push((s!("id"), iface.iface_id().to_string())); @@ -214,12 +215,20 @@ impl StrictArmor for Kit { } for iimpl in &self.iimpls { let mut header = ArmorHeader::new(ASCII_ARMOR_IIMPL, iimpl.impl_id().to_string()); - header.params.push((s!("of"), iimpl.iface_id.to_string())); - header.params.push((s!("for"), iimpl.schema_id.to_string())); + header + .params + .push((s!("interface"), iimpl.iface_id.to_string())); + header + .params + .push((s!("schema"), iimpl.schema_id.to_string())); headers.push(header); } for schema in &self.schemata { - headers.push(ArmorHeader::new(ASCII_ARMOR_SCHEMA, schema.schema_id().to_string())); + let mut header = ArmorHeader::new(ASCII_ARMOR_SCHEMA, schema.name.to_string()); + header + .params + .push((s!("id"), schema.schema_id().to_string())); + headers.push(header); } headers.push(ArmorHeader::new(ASCII_ARMOR_TYPE_SYSTEM, self.types.id().to_string())); for lib in &self.scripts { diff --git a/src/containers/mod.rs b/src/containers/mod.rs index fea9f8dd..bafb3c7f 100644 --- a/src/containers/mod.rs +++ b/src/containers/mod.rs @@ -58,7 +58,7 @@ pub const ASCII_ARMOR_NAME: &str = "Name"; pub const ASCII_ARMOR_IFACE: &str = "Interface"; pub const ASCII_ARMOR_IIMPL: &str = "Implementation"; pub const ASCII_ARMOR_SCHEMA: &str = "Schema"; -pub const ASCII_ARMOR_CONTRACT_: &str = "Contract"; +pub const ASCII_ARMOR_CONTRACT: &str = "Contract"; pub const ASCII_ARMOR_VERSION: &str = "Version"; pub const ASCII_ARMOR_TERMINAL: &str = "Terminal"; pub const ASCII_ARMOR_SUPPL: &str = "Supplement"; From e23fdc55d2d675ee8f4c1fcc4b9ce51dcfb80e7c Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 21 Apr 2024 03:17:26 +0200 Subject: [PATCH 20/52] iface: fix abstract interface resolution --- src/interface/iface.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 5b96e125..ed1b6787 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -432,10 +432,12 @@ impl Iface { &self, schema_ifaces: &'a SchemaIfaces, ) -> Option<&'a IfaceImpl> { - self.inherits - .iter() - .rev() - .find_map(move |parent| schema_ifaces.get(*parent)) + schema_ifaces.get(self.iface_id()).or_else(|| { + self.inherits + .iter() + .rev() + .find_map(move |parent| schema_ifaces.get(*parent)) + }) } pub fn check(&self) -> Result<(), Vec> { From bd4ece6a48c186d60d827e8010ec9aa0822cbbaa Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 21 Apr 2024 04:08:13 +0200 Subject: [PATCH 21/52] containers: fix version header in armored consignments --- src/containers/consignment.rs | 2 +- src/containers/util.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index 7a597799..500c339d 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -387,7 +387,7 @@ impl StrictArmor for Consignment { fn armor_id(&self) -> Self::Id { self.commit_id() } fn armor_headers(&self) -> Vec { vec![ - ArmorHeader::new(ASCII_ARMOR_VERSION, self.version.to_string()), + ArmorHeader::new(ASCII_ARMOR_VERSION, format!("{:#}", self.version)), ArmorHeader::new( ASCII_ARMOR_CONSIGNMENT_TYPE, if self.transfer { diff --git a/src/containers/util.rs b/src/containers/util.rs index e33c4e6e..742f1e93 100644 --- a/src/containers/util.rs +++ b/src/containers/util.rs @@ -78,12 +78,12 @@ impl Terminal { derive(Serialize, Deserialize), serde(crate = "serde_crate", rename_all = "camelCase") )] -#[display(lowercase)] #[non_exhaustive] #[repr(u8)] pub enum ContainerVer { // V0 and V1 was a previous version before v0.11, currently not supported. #[default] + #[display("v2", alt = "2")] V2 = 2, } From 5b7043b119767d89a336d9be6cfd820cf895eff6 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 21 Apr 2024 04:08:26 +0200 Subject: [PATCH 22/52] containers: change order of armored headers for kit --- src/containers/kit.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/containers/kit.rs b/src/containers/kit.rs index e9f243c2..addc37b0 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -208,6 +208,13 @@ impl StrictArmor for Kit { fn armor_headers(&self) -> Vec { let mut headers = vec![ArmorHeader::new(ASCII_ARMOR_VERSION, format!("{:#}", self.version))]; + for schema in &self.schemata { + let mut header = ArmorHeader::new(ASCII_ARMOR_SCHEMA, schema.name.to_string()); + header + .params + .push((s!("id"), schema.schema_id().to_string())); + headers.push(header); + } for iface in &self.ifaces { let mut header = ArmorHeader::new(ASCII_ARMOR_IFACE, iface.name.to_string()); header.params.push((s!("id"), iface.iface_id().to_string())); @@ -223,13 +230,6 @@ impl StrictArmor for Kit { .push((s!("schema"), iimpl.schema_id.to_string())); headers.push(header); } - for schema in &self.schemata { - let mut header = ArmorHeader::new(ASCII_ARMOR_SCHEMA, schema.name.to_string()); - header - .params - .push((s!("id"), schema.schema_id().to_string())); - headers.push(header); - } headers.push(ArmorHeader::new(ASCII_ARMOR_TYPE_SYSTEM, self.types.id().to_string())); for lib in &self.scripts { headers.push(ArmorHeader::new(ASCII_ARMOR_SCRIPT, lib.id().to_string())); From 44d5dc614a5dd06b0aad4d7fa6505e77bd421e7a Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 21 Apr 2024 04:47:19 +0200 Subject: [PATCH 23/52] chore: update armored dependencies --- Cargo.lock | 27 +- Cargo.toml | 2 + src/stl/stl.rs | 5 +- stl/RGBContract@0.11.0.sta | 7 +- stl/RGBContract@0.11.0.sty | 16 +- stl/RGBStd@0.11.0.sta | 17 +- stl/RGBStd@0.11.0.sty | 195 +++++---- stl/Transfer.vesper | 864 ++++++++----------------------------- 8 files changed, 310 insertions(+), 823 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f058aa00..a4c9d0d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ version = 3 [[package]] name = "aluvm" version = "0.11.0-beta.5" -source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#fafec9e124b10d4653cec7ef7804e1a9bda97844" +source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#d21a5bec78917e61f569ce0da58852bccd92642a" dependencies = [ "amplify", "ascii-armor 0.2.0", @@ -322,9 +322,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cc" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cfg-if" @@ -659,7 +659,7 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#bc8243c61de9eac0f8c1cbf2f92922efb216efc3" +source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#648bb45ab4dd4c000e8ba1872a2a7ce47cd2217e" dependencies = [ "aluvm", "amplify", @@ -898,8 +898,7 @@ dependencies = [ [[package]] name = "strict_encoding" version = "2.7.0-beta.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c463f8ea993e323740d78544473e791adb91ac659f5bf2c1a59db64a34f99fc" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#03d4b8ff346e8582632388c4112585d5cf714a0a" dependencies = [ "amplify", "half", @@ -910,8 +909,7 @@ dependencies = [ [[package]] name = "strict_encoding_derive" version = "2.7.0-beta.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475fa6f1fdde6e0555422b5111ad34bde30a1459af3599f920c3af9829772c0e" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#03d4b8ff346e8582632388c4112585d5cf714a0a" dependencies = [ "amplify_syn", "heck", @@ -923,11 +921,10 @@ dependencies = [ [[package]] name = "strict_types" version = "2.7.0-beta.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "152bd04284e9093f23a911d0d89b7dd950a461af1ed5e243f6215fbcd45e9445" +source = "git+https://github.com/strict-types/strict-types?branch=develop#acc3a7508c49c34c3344e2dd4359e1ade08fae67" dependencies = [ "amplify", - "ascii-armor 0.2.0", + "ascii-armor 0.3.0", "baid58", "half", "indexmap", @@ -974,18 +971,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 84c470b1..025a5734 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,6 +97,8 @@ wasm-bindgen-test = "0.3" features = ["all"] [patch.crates-io] +strict_encoding = { git = "https://github.com/strict-types/strict-encoding", branch = "develop" } +strict_types = { git = "https://github.com/strict-types/strict-types", branch = "develop" } commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" } single_use_seals = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" } bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } diff --git a/src/stl/stl.rs b/src/stl/stl.rs index fc9a2fb9..8e06596b 100644 --- a/src/stl/stl.rs +++ b/src/stl/stl.rs @@ -40,11 +40,10 @@ use crate::LIB_NAME_RGB_STD; /// Strict types id for the library providing standard data types which may be /// used in RGB smart contracts. pub const LIB_ID_RGB_CONTRACT: &str = - "urn:ubideco:stl:8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage"; + "8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage"; /// Strict types id for the library representing of RGB StdLib data types. -pub const LIB_ID_RGB_STD: &str = - "urn:ubideco:stl:HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda"; +pub const LIB_ID_RGB_STD: &str = "HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda"; fn _rgb_std_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_RGB_STD), tiny_bset! { diff --git a/stl/RGBContract@0.11.0.sta b/stl/RGBContract@0.11.0.sta index 75f24025..7688fe69 100644 --- a/stl/RGBContract@0.11.0.sta +++ b/stl/RGBContract@0.11.0.sta @@ -1,8 +1,9 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage +Id: 8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage Name: RGBContract -Dependency: EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average -Dependency: HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy +Dependencies: + Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi, + Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 Checksum-SHA256: bbaa91443a548615fa7d425b87b7af3428b67ebecf029a360bbb8f7b5ce58761 3sOfyLvL<$a$#e10?I5NZ-bfLFbqC#o>4E?M+l67UG^w8*<_XZ#%uyqCj(P-Wc6$ diff --git a/stl/RGBContract@0.11.0.sty b/stl/RGBContract@0.11.0.sty index 2c093103..0face5ac 100644 --- a/stl/RGBContract@0.11.0.sty +++ b/stl/RGBContract@0.11.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage + Id: 8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage Name: RGBContract Version: 0.11.0 Description: Types for writing RGB contracts and interfaces @@ -11,12 +11,12 @@ @context typelib RGBContract -import Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average +import Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi use AsciiPrintable#prize-solar-driver use Alpha#october-urgent-tunnel use AlphaSmall#song-accent-mammal -import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy +import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 use Vout#chrome-robin-gallop use Txid#cowboy-diego-betty use Outpoint#dinner-yoga-danube @@ -29,7 +29,7 @@ data Allocation : TokenIndex, OwnedFraction data Amount : U64 @mnemonic(james-karl-master) -data Article : [Std.Alpha#october-urgent-tunnel ^ 1..0x20] +data Article : [Std.Alpha ^ 1..0x20] @mnemonic(xray-giant-nina) data AssetSpec : ticker Ticker @@ -59,7 +59,7 @@ data Details : [Unicode ^ 1..0xff] data IssueMeta : reserves {ProofOfReserves} @mnemonic(telecom-pixel-initial) -data MediaRegName : [Std.AlphaSmall#song-accent-mammal ^ 1..0x40] +data MediaRegName : [Std.AlphaSmall ^ 1..0x40] @mnemonic(robert-decide-dispute) data MediaType : type MediaRegName @@ -67,7 +67,7 @@ data MediaType : type MediaRegName , charset MediaRegName? @mnemonic(ruby-tennis-lotus) -data Name : [Std.AsciiPrintable#prize-solar-driver ^ 1..0x28] +data Name : [Std.AsciiPrintable ^ 1..0x28] @mnemonic(vital-edgar-quota) data OwnedFraction : U64 @@ -81,13 +81,13 @@ data Precision : indivisible | deci | centi | milli @mnemonic(liquid-owner-london) -data ProofOfReserves : utxo Bitcoin.Outpoint#dinner-yoga-danube, proof [Byte] +data ProofOfReserves : utxo Bitcoin.Outpoint, proof [Byte] @mnemonic(bundle-turbo-verona) data RicardianContract : [Unicode] @mnemonic(proton-logic-weekend) -data Ticker : [Std.Alpha#october-urgent-tunnel ^ 1..0x8] +data Ticker : [Std.Alpha ^ 1..0x8] @mnemonic(connect-farmer-havana) data TokenIndex : U32 diff --git a/stl/RGBStd@0.11.0.sta b/stl/RGBStd@0.11.0.sta index 45c2fbe6..d8193d93 100644 --- a/stl/RGBStd@0.11.0.sta +++ b/stl/RGBStd@0.11.0.sta @@ -1,13 +1,14 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda +Id: HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda Name: RGBStd -Dependency: 8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2#energy-baboon-piano -Dependency: ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79#idea-judo-benny -Dependency: APYERRUMyWqLadwTv8tEFifHMPGpL3xGFSBxwaKYpmcV#square-mammal-uncle -Dependency: EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average -Dependency: FdtTxVxBBVXJaayVZoM1dhSHqszVHMenivcPd2v4PP1H#scoop-laptop-almanac -Dependency: GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg#egypt-wedding-cupid -Dependency: HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy +Dependencies: + BPCore#8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2, + StrictTypes#ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79, + AluVM#APYERRUMyWqLadwTv8tEFifHMPGpL3xGFSBxwaKYpmcV, + Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi, + RGB#FdtTxVxBBVXJaayVZoM1dhSHqszVHMenivcPd2v4PP1H, + CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg, + Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 Checksum-SHA256: 2fe317aeabf5966fc2d5d84a3a31732387b3875d40ea2000b6e80f4adf68912a 22w{tQ*>kpZyuKUhrL_QB$OCu+VTUE>b16EcuX?V{EC+7E3Kt-20~CnZ*pabmdAK diff --git a/stl/RGBStd@0.11.0.sty b/stl/RGBStd@0.11.0.sty index f25bebf7..90f6ef5e 100644 --- a/stl/RGBStd@0.11.0.sty +++ b/stl/RGBStd@0.11.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda + Id: HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda Name: RGBStd Version: 0.11.0 Description: RGB standard library @@ -11,7 +11,7 @@ @context typelib RGBStd -import BPCore#8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2#energy-baboon-piano +import BPCore#8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2 use TapretNodePartner#iceberg-poker-active use TapretProof#forum-paint-tunnel use TapretPathProof#stage-element-update @@ -25,7 +25,7 @@ import BPCore#8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2#energy-baboon-piano use BlindSealTxid#kimono-golf-price use TxPtr#strange-source-father -import StrictTypes#ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79#idea-judo-benny +import StrictTypes#ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79 use VariantInfoSemId#garlic-weekend-nirvana use UnionVariantsSemId#soviet-yoyo-nikita use VariantName#fiesta-center-yoga @@ -45,7 +45,7 @@ import StrictTypes#ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79#idea-judo-benny use NamedFieldsSemId#clever-prize-sinatra use FieldName#toyota-plasma-austria -import AluVM#APYERRUMyWqLadwTv8tEFifHMPGpL3xGFSBxwaKYpmcV#square-mammal-uncle +import AluVM#APYERRUMyWqLadwTv8tEFifHMPGpL3xGFSBxwaKYpmcV use IsaSeg#sharp-user-fantasy use Lib#wedding-gate-truck use IsaName#spirit-example-carrot @@ -53,14 +53,14 @@ import AluVM#APYERRUMyWqLadwTv8tEFifHMPGpL3xGFSBxwaKYpmcV#square-mammal-uncle use LibId#rebel-factor-rodeo use LibSeg#courage-mexico-cinema -import Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi#aspirin-mango-average +import Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi use AlphaCaps#digital-mirage-dream use AsciiPrintable#prize-solar-driver use Bool#laser-madam-maxwell use AlphaCapsLodash#winter-vampire-energy use AlphaSmallLodash#plastic-snake-modular -import RGB#FdtTxVxBBVXJaayVZoM1dhSHqszVHMenivcPd2v4PP1H#scoop-laptop-almanac +import RGB#FdtTxVxBBVXJaayVZoM1dhSHqszVHMenivcPd2v4PP1H use ExtensionSchema#ship-karma-david use BundleId#desert-divide-visible use GlobalValues#compact-denver-vitamin @@ -130,7 +130,7 @@ import RGB#FdtTxVxBBVXJaayVZoM1dhSHqszVHMenivcPd2v4PP1H#scoop-laptop-almanac use RevealedData#switch-enigma-ruby use AssignRevealedValueBlindSealTxid#colony-miguel-olga -import CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg#egypt-wedding-cupid +import CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg use MerkleHash#culture-metro-modular use MerkleProof#labor-hilton-magenta use ReservedBytes1#joker-lemon-mental @@ -138,7 +138,7 @@ import CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg#egypt-wedding-c use ReservedBytes4#claudia-drink-digital use ReservedBytes8#helena-button-combat -import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy +import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 use SeqNo#rhino-time-rodent use TxIn#pagoda-david-reform use Vout#chrome-robin-gallop @@ -162,49 +162,49 @@ import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilog @mnemonic(ramirez-benny-brave) -data AnchoredBundles : tapret#1 (BPCore.AnchorMerkleProofTapretProof#everest-laura-modem, RGB.TransitionBundle#yoga-kansas-albert) - | opret (BPCore.AnchorMerkleProofOpretProof#cable-final-podium, RGB.TransitionBundle#yoga-kansas-albert) - | double (tapretAnchor BPCore.AnchorMerkleProofTapretProof#everest-laura-modem - , tapretBundle RGB.TransitionBundle#yoga-kansas-albert - , opretAnchor BPCore.AnchorMerkleProofOpretProof#cable-final-podium - , opretBundle RGB.TransitionBundle#yoga-kansas-albert) +data AnchoredBundles : tapret#1 (BPCore.AnchorMerkleProofTapretProof, RGB.TransitionBundle) + | opret (BPCore.AnchorMerkleProofOpretProof, RGB.TransitionBundle) + | double (tapretAnchor BPCore.AnchorMerkleProofTapretProof + , tapretBundle RGB.TransitionBundle + , opretAnchor BPCore.AnchorMerkleProofOpretProof + , opretBundle RGB.TransitionBundle) @mnemonic(galileo-stuart-night) data AssignIface : ownedState OwnedIface - , public Std.Bool#laser-madam-maxwell - , required Std.Bool#laser-madam-maxwell - , multiple Std.Bool#laser-madam-maxwell + , public Std.Bool + , required Std.Bool + , multiple Std.Bool @mnemonic(tommy-picasso-spell) -data BundledWitness : pubWitness RGB.XChainPubWitness#animal-pretend-exile, anchoredBundles AnchoredBundles +data BundledWitness : pubWitness RGB.XChainPubWitness, anchoredBundles AnchoredBundles @mnemonic(ninja-reward-wizard) data Consignmentfalse : version ContainerVer - , transfer Std.Bool#laser-madam-maxwell + , transfer Std.Bool , terminals {RGB.BundleId -> Terminal} - , genesis RGB.Genesis#modem-maxwell-santana - , extensions {RGB.Extension#pigment-color-budget ^ ..0xffffffff} + , genesis RGB.Genesis + , extensions {RGB.Extension ^ ..0xffffffff} , bundles {BundledWitness ^ ..0xffffffff} - , schema RGB.Schema#stop-stand-harmony + , schema RGB.Schema , ifaces {Iface -> ^ ..0xff IfaceImpl} , supplements {ContractSuppl ^ ..0xff} - , types StrictTypes.TypeSystem#carmen-nova-quasi - , scripts {AluVM.Lib#wedding-gate-truck ^ ..0x400} + , types StrictTypes.TypeSystem + , scripts {AluVM.Lib ^ ..0x400} , attachments {RGB.AttachId -> [Byte ^ ..0xffffff]} , signatures {ContentId -> ^ ..0xff ContentSigs} @mnemonic(cairo-poem-script) data Consignmenttrue : version ContainerVer - , transfer Std.Bool#laser-madam-maxwell + , transfer Std.Bool , terminals {RGB.BundleId -> Terminal} - , genesis RGB.Genesis#modem-maxwell-santana - , extensions {RGB.Extension#pigment-color-budget ^ ..0xffffffff} + , genesis RGB.Genesis + , extensions {RGB.Extension ^ ..0xffffffff} , bundles {BundledWitness ^ ..0xffffffff} - , schema RGB.Schema#stop-stand-harmony + , schema RGB.Schema , ifaces {Iface -> ^ ..0xff IfaceImpl} , supplements {ContractSuppl ^ ..0xff} - , types StrictTypes.TypeSystem#carmen-nova-quasi - , scripts {AluVM.Lib#wedding-gate-truck ^ ..0x400} + , types StrictTypes.TypeSystem + , scripts {AluVM.Lib ^ ..0x400} , attachments {RGB.AttachId -> [Byte ^ ..0xffffff]} , signatures {ContentId -> ^ ..0xff ContentSigs} @@ -213,8 +213,8 @@ data ContainerVer : v2#2 @mnemonic(jargon-brown-family) -data ContentId : schema RGB.SchemaId#garcia-smoke-ozone - | genesis RGB.ContractId#alarm-danube-vampire +data ContentId : schema RGB.SchemaId + | genesis RGB.ContractId | iface IfaceId | ifaceImpl ImplId | suppl SupplId @@ -223,7 +223,7 @@ data ContentId : schema RGB.SchemaId#garcia-smoke-ozone data ContentSigs : {RGB.Identity -> ^ 1..0xa SigBlob} @mnemonic(slang-mars-belgium) -data ContractSuppl : contractId RGB.ContractId#alarm-danube-vampire +data ContractSuppl : contractId RGB.ContractId , ticker TickerSuppl , mediaKit [Unicode ^ ..0xff] , globalState {RGB.AssignmentType -> ^ ..0xff OwnedStateSuppl} @@ -232,50 +232,50 @@ data ContractSuppl : contractId RGB.ContractId#alarm-danube-vampire @mnemonic(austria-rudolf-command) data ExtensionIface : modifier Modifier - , optional Std.Bool#laser-madam-maxwell - , metadata {StrictTypes.FieldName#toyota-plasma-austria ^ ..0xff} - , globals {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences#unicorn-empire-mama} - , assignments {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences#unicorn-empire-mama} - , redeems {StrictTypes.FieldName#toyota-plasma-austria ^ ..0xff} - , valencies {StrictTypes.FieldName#toyota-plasma-austria ^ ..0xff} - , errors {StrictTypes.VariantName#fiesta-center-yoga ^ ..0xff} - , defaultAssignment StrictTypes.FieldName#toyota-plasma-austria? + , optional Std.Bool + , metadata {StrictTypes.FieldName ^ ..0xff} + , globals {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} + , assignments {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} + , redeems {StrictTypes.FieldName ^ ..0xff} + , valencies {StrictTypes.FieldName ^ ..0xff} + , errors {StrictTypes.VariantName ^ ..0xff} + , defaultAssignment StrictTypes.FieldName? @mnemonic(ballad-bicycle-iris) data GenesisIface : modifier Modifier - , metadata {StrictTypes.FieldName#toyota-plasma-austria ^ ..0xff} - , globals {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences#unicorn-empire-mama} - , assignments {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences#unicorn-empire-mama} - , valencies {StrictTypes.FieldName#toyota-plasma-austria ^ ..0xff} - , errors {StrictTypes.VariantName#fiesta-center-yoga ^ ..0xff} + , metadata {StrictTypes.FieldName ^ ..0xff} + , globals {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} + , assignments {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} + , valencies {StrictTypes.FieldName ^ ..0xff} + , errors {StrictTypes.VariantName ^ ..0xff} @mnemonic(garbo-justice-atomic) -data GlobalIface : semId StrictTypes.SemId#cargo-plasma-catalog? - , required Std.Bool#laser-madam-maxwell - , multiple Std.Bool#laser-madam-maxwell +data GlobalIface : semId StrictTypes.SemId? + , required Std.Bool + , multiple Std.Bool @mnemonic(magenta-juliet-greek) data Iface : version VerNo - , name StrictTypes.TypeName#gray-bonanza-kilo + , name StrictTypes.TypeName , inherits [IfaceId ^ ..0xff] , timestamp I64 - , metadata {StrictTypes.FieldName -> ^ ..0xff StrictTypes.SemId#cargo-plasma-catalog} + , metadata {StrictTypes.FieldName -> ^ ..0xff StrictTypes.SemId} , globalState {StrictTypes.FieldName -> ^ ..0xff GlobalIface} , assignments {StrictTypes.FieldName -> ^ ..0xff AssignIface} , valencies {StrictTypes.FieldName -> ^ ..0xff ValencyIface} , genesis GenesisIface , transitions {StrictTypes.FieldName -> ^ ..0xff TransitionIface} , extensions {StrictTypes.FieldName -> ^ ..0xff ExtensionIface} - , defaultOperation StrictTypes.FieldName#toyota-plasma-austria? + , defaultOperation StrictTypes.FieldName? , errors {StrictTypes.VariantName -> ^ ..0xff [Unicode ^ ..0xff]} - , developer RGB.Identity#stock-teacher-falcon + , developer RGB.Identity @mnemonic(vendor-polite-gong) data IfaceId : [Byte ^ 32] @mnemonic(snow-habitat-collect) data IfaceImpl : version VerNo - , schemaId RGB.SchemaId#garcia-smoke-ozone + , schemaId RGB.SchemaId , ifaceId IfaceId , timestamp I64 , metadata {NamedFieldMetaType ^ ..0xff} @@ -285,7 +285,7 @@ data IfaceImpl : version VerNo , transitions {NamedFieldTransitionType ^ ..0xff} , extensions {NamedFieldExtensionType ^ ..0xff} , errors {NamedVariantu8 ^ ..0xff} - , developer RGB.Identity#stock-teacher-falcon + , developer RGB.Identity @mnemonic(monday-igloo-jupiter) data ImplId : [Byte ^ 32] @@ -293,11 +293,11 @@ data ImplId : [Byte ^ 32] @mnemonic(domino-pulse-oxford) data Kit : version ContainerVer , ifaces {Iface ^ ..0xff} - , schemata {RGB.Schema#stop-stand-harmony ^ ..0xff} + , schemata {RGB.Schema ^ ..0xff} , iimpls {IfaceImpl ^ ..0xff} , supplements {ContractSuppl ^ ..0xff} - , types StrictTypes.TypeSystem#carmen-nova-quasi - , scripts {AluVM.Lib#wedding-gate-truck} + , types StrictTypes.TypeSystem + , scripts {AluVM.Lib} , signatures {ContentId -> ^ ..0xff ContentSigs} @mnemonic(recycle-field-hope) @@ -305,39 +305,39 @@ data Modifier : abstract | override | final#255 @mnemonic(claudia-roof-village) -data NamedFieldAssignmentType : id RGB.AssignmentType#hunter-hello-retro - , name StrictTypes.FieldName#toyota-plasma-austria - , reserved CommitVerify.ReservedBytes4#claudia-drink-digital +data NamedFieldAssignmentType : id RGB.AssignmentType + , name StrictTypes.FieldName + , reserved CommitVerify.ReservedBytes4 @mnemonic(exact-ruby-soda) -data NamedFieldExtensionType : id RGB.ExtensionType#mission-salsa-parole - , name StrictTypes.FieldName#toyota-plasma-austria - , reserved CommitVerify.ReservedBytes4#claudia-drink-digital +data NamedFieldExtensionType : id RGB.ExtensionType + , name StrictTypes.FieldName + , reserved CommitVerify.ReservedBytes4 @mnemonic(owner-fiesta-boston) -data NamedFieldGlobalStateType : id RGB.GlobalStateType#seminar-major-tape - , name StrictTypes.FieldName#toyota-plasma-austria - , reserved CommitVerify.ReservedBytes4#claudia-drink-digital +data NamedFieldGlobalStateType : id RGB.GlobalStateType + , name StrictTypes.FieldName + , reserved CommitVerify.ReservedBytes4 @mnemonic(mambo-bermuda-farmer) -data NamedFieldMetaType : id RGB.MetaType#index-shadow-pattern - , name StrictTypes.FieldName#toyota-plasma-austria - , reserved CommitVerify.ReservedBytes4#claudia-drink-digital +data NamedFieldMetaType : id RGB.MetaType + , name StrictTypes.FieldName + , reserved CommitVerify.ReservedBytes4 @mnemonic(absent-stick-nova) -data NamedFieldTransitionType : id RGB.TransitionType#puma-joshua-evita - , name StrictTypes.FieldName#toyota-plasma-austria - , reserved CommitVerify.ReservedBytes4#claudia-drink-digital +data NamedFieldTransitionType : id RGB.TransitionType + , name StrictTypes.FieldName + , reserved CommitVerify.ReservedBytes4 @mnemonic(candle-mirror-alcohol) -data NamedFieldValencyType : id RGB.ValencyType#palma-exit-pupil - , name StrictTypes.FieldName#toyota-plasma-austria - , reserved CommitVerify.ReservedBytes4#claudia-drink-digital +data NamedFieldValencyType : id RGB.ValencyType + , name StrictTypes.FieldName + , reserved CommitVerify.ReservedBytes4 @mnemonic(pedro-george-connect) data NamedVariantu8 : id U8 - , name StrictTypes.VariantName#fiesta-center-yoga - , reserved CommitVerify.ReservedBytes4#claudia-drink-digital + , name StrictTypes.VariantName + , reserved CommitVerify.ReservedBytes4 @mnemonic(contact-remote-popular) data OwnedIface : any () @@ -345,15 +345,15 @@ data OwnedIface : any () | amount () | anyData () | anyAttach () - | data StrictTypes.SemId#cargo-plasma-catalog + | data StrictTypes.SemId @mnemonic(office-hexagon-exile) data OwnedStateSuppl : meaning [Unicode ^ ..0xff], velocity VelocityHint @mnemonic(pixel-bravo-tactic) -data PubWitness : txid Bitcoin.Txid#cowboy-diego-betty - , tx Bitcoin.Tx#deluxe-bernard-genetic? - , spv CommitVerify.ReservedBytes1#joker-lemon-mental +data PubWitness : txid Bitcoin.Txid + , tx Bitcoin.Tx? + , spv CommitVerify.ReservedBytes1 @mnemonic(chris-update-father) data SigBlob : [Byte ^ 1..0x1000] @@ -362,30 +362,29 @@ data SigBlob : [Byte ^ 1..0x1000] data SupplId : [Byte ^ 32] @mnemonic(permit-crimson-parole) -data Terminal : seals {RGB.XChainTerminalSeal#bread-tarzan-touch} +data Terminal : seals {RGB.XChainTerminalSeal} @mnemonic(battery-cecilia-politic) -data TerminalSeal : concealedUtxo BPCore.SecretSeal#santana-domingo-needle - | witnessVout VoutSeal +data TerminalSeal : VoutSeal? @mnemonic(mailbox-tempo-billy) data TickerSuppl : absent () - | global (RGB.GlobalStateType#seminar-major-tape, StrictTypes.Path#secret-romeo-mustang) - | owned (RGB.AssignmentType#hunter-hello-retro, StrictTypes.Path#secret-romeo-mustang) + | global (RGB.GlobalStateType, StrictTypes.Path) + | owned (RGB.AssignmentType, StrictTypes.Path) @mnemonic(radius-weather-analyze) data TransitionIface : modifier Modifier - , optional Std.Bool#laser-madam-maxwell - , metadata {StrictTypes.FieldName#toyota-plasma-austria ^ ..0xff} - , globals {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences#unicorn-empire-mama} - , inputs {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences#unicorn-empire-mama} - , assignments {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences#unicorn-empire-mama} - , valencies {StrictTypes.FieldName#toyota-plasma-austria ^ ..0xff} - , errors {StrictTypes.VariantName#fiesta-center-yoga ^ ..0xff} - , defaultAssignment StrictTypes.FieldName#toyota-plasma-austria? + , optional Std.Bool + , metadata {StrictTypes.FieldName ^ ..0xff} + , globals {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} + , inputs {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} + , assignments {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} + , valencies {StrictTypes.FieldName ^ ..0xff} + , errors {StrictTypes.VariantName ^ ..0xff} + , defaultAssignment StrictTypes.FieldName? @mnemonic(input-tripod-oscar) -data ValencyIface : required Std.Bool#laser-madam-maxwell +data ValencyIface : required Std.Bool @mnemonic(textile-politic-harris) data VelocityHint : unspecified | seldom#15 | episodic#31 | regular#63 @@ -397,8 +396,8 @@ data VerNo : v0 | v1 @mnemonic(concert-venice-jacket) -data VoutSeal : method BPCore.Method#trilogy-tahiti-valid - , vout Bitcoin.Vout#chrome-robin-gallop +data VoutSeal : method BPCore.Method + , vout Bitcoin.Vout , blinding U64 diff --git a/stl/Transfer.vesper b/stl/Transfer.vesper index a918a3a0..5133d972 100644 --- a/stl/Transfer.vesper +++ b/stl/Transfer.vesper @@ -61,40 +61,24 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -103,22 +87,14 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec ConcealedFungible commitment bytes len=33 aka=PedersenCommitment rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -127,9 +103,7 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedFungible value union FungibleState bits64 is U64 wrapped tag=0 @@ -137,14 +111,8 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -157,42 +125,26 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedData value bytes len=0..MAX16 aka=DataState salt is U128 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -203,43 +155,27 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedAttach id bytes len=32 aka=AttachId mediaType enum MediaType any=255 salt is U64 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -270,40 +206,24 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -312,22 +232,14 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec ConcealedFungible commitment bytes len=33 aka=PedersenCommitment rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -336,9 +248,7 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedFungible value union FungibleState bits64 is U64 wrapped tag=0 @@ -346,14 +256,8 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -366,42 +270,26 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedData value bytes len=0..MAX16 aka=DataState salt is U128 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -412,43 +300,27 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxid 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedAttach id bytes len=32 aka=AttachId mediaType enum MediaType any=255 salt is U64 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - seal union XChainBlindSealTxid - bitcoin rec BlindSealTxid wrapped tag=0 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 aka=Txid - vout is U32 aka=Vout - blinding is U64 - liquid rec BlindSealTxid wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + liquid rec BlindSealTxid option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -511,49 +383,25 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState @@ -561,27 +409,15 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec ConcealedFungible commitment bytes len=33 aka=PedersenCommitment rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec ConcealedFungible @@ -589,9 +425,7 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedFungible value union FungibleState bits64 is U64 wrapped tag=0 @@ -599,19 +433,9 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedFungible @@ -623,51 +447,27 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedData value bytes len=0..MAX16 aka=DataState salt is U128 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedData @@ -677,52 +477,28 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedAttach id bytes len=32 aka=AttachId mediaType enum MediaType any=255 salt is U64 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedAttach @@ -774,49 +550,25 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState @@ -824,27 +576,15 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec ConcealedFungible commitment bytes len=33 aka=PedersenCommitment rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec ConcealedFungible @@ -852,9 +592,7 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedFungible value union FungibleState bits64 is U64 wrapped tag=0 @@ -862,19 +600,9 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedFungible @@ -886,51 +614,27 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedData value bytes len=0..MAX16 aka=DataState salt is U128 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedData @@ -940,52 +644,28 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedAttach id bytes len=32 aka=AttachId mediaType enum MediaType any=255 salt is U64 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedAttach @@ -1041,49 +721,25 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState @@ -1091,27 +747,15 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec ConcealedFungible commitment bytes len=33 aka=PedersenCommitment rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec ConcealedFungible @@ -1119,9 +763,7 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedFungible value union FungibleState bits64 is U64 wrapped tag=0 @@ -1129,19 +771,9 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedFungible @@ -1153,51 +785,27 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedData value bytes len=0..MAX16 aka=DataState salt is U128 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedData @@ -1207,52 +815,28 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedAttach id bytes len=32 aka=AttachId mediaType enum MediaType any=255 salt is U64 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedAttach @@ -1303,49 +887,25 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState @@ -1353,27 +913,15 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec ConcealedFungible commitment bytes len=33 aka=PedersenCommitment rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec ConcealedFungible @@ -1381,9 +929,7 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedFungible value union FungibleState bits64 is U64 wrapped tag=0 @@ -1391,19 +937,9 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedFungible @@ -1415,51 +951,27 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedData value bytes len=0..MAX16 aka=DataState salt is U128 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedData @@ -1469,52 +981,28 @@ Consignmenttrue rec 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 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 + liquid bytes len=32 option wrapped aka=SecretSeal tag=1 state rec RevealedAttach id bytes len=32 aka=AttachId mediaType enum MediaType any=255 salt is U64 lock bytes len=2 aka=ReservedBytes2 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 + liquid rec BlindSealTxPtr option wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 option wrapped aka=Txid tag=1 vout is U32 aka=Vout blinding is U64 state rec RevealedAttach From 0af53fe9056821fac5333f0b6ad844af611a1a5e Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 21 Apr 2024 11:54:58 +0200 Subject: [PATCH 24/52] iface: fix builder errors --- src/interface/builder.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/interface/builder.rs b/src/interface/builder.rs index b52803dd..53120a91 100644 --- a/src/interface/builder.rs +++ b/src/interface/builder.rs @@ -59,11 +59,11 @@ pub enum BuilderError { /// transition `{0}` is not known to the schema. TransitionNotFound(FieldName), - /// state `{0}` provided to the builder has invalid name. + /// unknown owned state name `{0}`. InvalidStateField(FieldName), - /// state `{0}` provided to the builder has invalid name. - InvalidState(AssignmentType), + /// state `{0}` provided to the builder has invalid type. + InvalidStateType(AssignmentType), /// asset tag for state `{0}` must be added before any fungible state of /// the same type. @@ -987,8 +987,8 @@ impl OperationBuilder { seal: impl Into>, ) -> Result { let state_schema = self.state_schema(type_id); - if *state_schema != OwnedStateSchema::Fungible(FungibleType::Unsigned64Bit) { - return Err(BuilderError::InvalidState(type_id)); + if *state_schema != OwnedStateSchema::Declarative { + return Err(BuilderError::InvalidStateType(type_id)); } let seal = seal.into(); @@ -1054,7 +1054,7 @@ impl OperationBuilder { ) -> Result { let state_schema = self.state_schema(type_id); if *state_schema != OwnedStateSchema::Fungible(FungibleType::Unsigned64Bit) { - return Err(BuilderError::InvalidState(type_id)); + return Err(BuilderError::InvalidStateType(type_id)); } let seal = seal.into(); @@ -1131,7 +1131,7 @@ impl OperationBuilder { } } } else { - return Err(BuilderError::InvalidState(type_id)); + return Err(BuilderError::InvalidStateType(type_id)); } Ok(self) } @@ -1188,7 +1188,7 @@ impl OperationBuilder { state: RevealedAttach, ) -> Result { let state_schema = self.state_schema(type_id); - if let OwnedStateSchema::Structured(_) = *state_schema { + if let OwnedStateSchema::Attachment(_) = *state_schema { let seal = seal.into(); match self.attachments.get_mut(&type_id) { Some(assignments) => { @@ -1200,7 +1200,7 @@ impl OperationBuilder { } } } else { - return Err(BuilderError::InvalidState(type_id)); + return Err(BuilderError::InvalidStateType(type_id)); } Ok(self) } From 1e120fc875100a1175e1e318225333064a857721 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 21 Apr 2024 12:26:03 +0200 Subject: [PATCH 25/52] iface: complete adding rights and attachment assignments in builder --- src/interface/builder.rs | 44 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/interface/builder.rs b/src/interface/builder.rs index 53120a91..444b8c79 100644 --- a/src/interface/builder.rs +++ b/src/interface/builder.rs @@ -1273,14 +1273,56 @@ impl OperationBuilder { let state_data = TypedAssigns::Structured(state_data); (id, state_data) }); + let owned_rights = self.rights.into_iter().map(|(id, vec)| { + let vec_data = vec.into_iter().map(|seal| match seal { + BuilderSeal::Revealed(seal) => Assign::Revealed { + seal, + state: none!(), + lock: none!(), + }, + BuilderSeal::Concealed(seal) => Assign::ConfidentialSeal { + seal, + state: none!(), + lock: none!(), + }, + }); + let state_data = Confined::try_from_iter(vec_data).expect("at least one element"); + let state_data = TypedAssigns::Declarative(state_data); + (id, state_data) + }); + let owned_attachments = self.attachments.into_iter().map(|(id, vec)| { + let vec_data = vec.into_iter().map(|(seal, value)| match seal { + BuilderSeal::Revealed(seal) => Assign::Revealed { + seal, + state: value, + lock: none!(), + }, + BuilderSeal::Concealed(seal) => Assign::ConfidentialSeal { + seal, + state: value, + lock: none!(), + }, + }); + let state_data = Confined::try_from_iter(vec_data).expect("at least one element"); + let state_data = TypedAssigns::Attachment(state_data); + (id, state_data) + }); let owned_state = Confined::try_from_iter(owned_state).expect("same size"); let owned_data = Confined::try_from_iter(owned_data).expect("same size"); + let owned_rights = Confined::try_from_iter(owned_rights).expect("same size"); + let owned_attachments = Confined::try_from_iter(owned_attachments).expect("same size"); let mut assignments = Assignments::from_inner(owned_state); assignments .extend(Assignments::from_inner(owned_data).into_inner()) - .expect(""); + .expect("too many assignments"); + assignments + .extend(Assignments::from_inner(owned_rights).into_inner()) + .expect("too many assignments"); + assignments + .extend(Assignments::from_inner(owned_attachments).into_inner()) + .expect("too many assignments"); (self.schema, self.iface, self.iimpl, self.global, assignments, self.types, self.asset_tags) } From 883759c46ae1337cae5e179e44db8b957ab12b14 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 21 Apr 2024 21:08:03 +0200 Subject: [PATCH 26/52] iface: add implementation integrity check --- src/interface/iface.rs | 12 ++++ src/interface/iimpl.rs | 154 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 163 insertions(+), 3 deletions(-) diff --git a/src/interface/iface.rs b/src/interface/iface.rs index ed1b6787..409c403d 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -28,6 +28,7 @@ use std::str::FromStr; use amplify::confinement::{TinyOrdMap, TinyOrdSet, TinyString, TinyVec}; use amplify::{ByteArray, Bytes32}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; +use chrono::{DateTime, TimeZone, Utc}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; use rgb::{Identity, Occurrences}; use strict_encoding::{ @@ -496,6 +497,13 @@ impl Iface { let mut errors = vec![]; + let now = Utc::now(); + match Utc.timestamp_opt(self.timestamp, 0).single() { + Some(ts) if ts > now => errors.push(IfaceInconsistency::FutureTimestamp(ts)), + None => errors.push(IfaceInconsistency::InvalidTimestamp(self.timestamp)), + _ => {} + } + for name in &self.genesis.metadata { if !self.metadata.contains_key(name) { errors.push(IfaceInconsistency::UnknownMetadata(OpName::Genesis, name.clone())); @@ -632,6 +640,10 @@ pub enum OpName { #[derive(Clone, Eq, PartialEq, Hash, Debug, Display, Error)] #[display(doc_comments)] pub enum IfaceInconsistency { + /// timestamp is invalid ({0}). + InvalidTimestamp(i64), + /// timestamp in the future ({0}). + FutureTimestamp(DateTime), /// unknown global state '{1}' referenced from {0}. UnknownGlobal(OpName, FieldName), /// unknown valency '{1}' referenced from {0}. diff --git a/src/interface/iimpl.rs b/src/interface/iimpl.rs index 005b6315..22cc9a85 100644 --- a/src/interface/iimpl.rs +++ b/src/interface/iimpl.rs @@ -25,16 +25,17 @@ use std::str::FromStr; use amplify::confinement::TinyOrdSet; use amplify::{ByteArray, Bytes32}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; +use chrono::{DateTime, TimeZone, Utc}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; use rgb::{ - AssignmentType, ExtensionType, GlobalStateType, Identity, MetaType, SchemaId, TransitionType, - ValencyType, + AssignmentType, ExtensionType, GlobalStateType, Identity, MetaType, Schema, SchemaId, + TransitionType, ValencyType, }; use strict_encoding::{FieldName, StrictDumb, VariantName}; use strict_types::encoding::{StrictDecode, StrictEncode, StrictType}; use crate::interface::iface::IfaceId; -use crate::interface::VerNo; +use crate::interface::{Iface, VerNo}; use crate::{ReservedBytes, LIB_NAME_RGB_STD}; pub trait SchemaTypeIndex: @@ -326,3 +327,150 @@ impl IfaceImpl { .map(|nt| &nt.name) } } + +#[derive(Clone, Eq, PartialEq, Hash, Debug, Display, Error)] +#[display(doc_comments)] +pub enum ImplInconsistency { + /// timestamp is invalid ({0}). + InvalidTimestamp(i64), + /// timestamp in the future ({0}). + FutureTimestamp(DateTime), + + /// interface metadata field '{0}' is not resolved by the implementation. + IfaceMetaAbsent(FieldName), + /// implementation metadata field '{0}' maps to an unknown schema metadata + /// type {1}. + SchemaMetaAbsent(FieldName, MetaType), + + /// interface global state field '{0}' is not resolved by the + /// implementation. + IfaceGlobalAbsent(FieldName), + /// implementation global state field '{0}' maps to an unknown schema global + /// state type {1}. + SchemaGlobalAbsent(FieldName, GlobalStateType), + + /// interface owned state field '{0}' is not resolved by the + /// implementation. + IfaceAssignmentAbsent(FieldName), + /// implementation owned state field '{0}' maps to an unknown schema owned + /// state type {1}. + SchemaAssignmentAbsent(FieldName, AssignmentType), + + /// interface valency field '{0}' is not resolved by the implementation. + IfaceValencyAbsent(FieldName), + /// implementation valency field '{0}' maps to an unknown schema valency + /// {1}. + SchemaValencyAbsent(FieldName, ValencyType), + + /// interface state transition name '{0}' is not resolved by the + /// implementation. + IfaceTransitionAbsent(FieldName), + /// implementation state transition name '{0}' maps to an unknown schema + /// state transition type {1}. + SchemaTransitionAbsent(FieldName, TransitionType), + + /// interface state extension name '{0}' is not resolved by the + /// implementation. + IfaceExtensionAbsent(FieldName), + /// implementation state extension name '{0}' maps to an unknown schema + /// state extension type {1}. + SchemaExtensionAbsent(FieldName, ExtensionType), + + /// interface error field '{0}' is not resolved by the implementation. + IfaceErrorAbsent(VariantName), +} + +impl IfaceImpl { + pub fn check(&self, iface: &Iface, schema: &Schema) -> Result<(), Vec> { + let mut errors = vec![]; + + let now = Utc::now(); + match Utc.timestamp_opt(self.timestamp, 0).single() { + Some(ts) if ts > now => errors.push(ImplInconsistency::FutureTimestamp(ts)), + None => errors.push(ImplInconsistency::InvalidTimestamp(self.timestamp)), + _ => {} + } + + for name in iface.metadata.keys() { + if self.metadata.iter().all(|field| &field.name != name) { + errors.push(ImplInconsistency::IfaceMetaAbsent(name.clone())); + } + } + for field in &self.metadata { + if !schema.meta_types.contains_key(&field.id) { + errors.push(ImplInconsistency::SchemaMetaAbsent(field.name.clone(), field.id)); + } + } + + for name in iface.global_state.keys() { + if self.global_state.iter().all(|field| &field.name != name) { + errors.push(ImplInconsistency::IfaceGlobalAbsent(name.clone())); + } + } + for field in &self.global_state { + if !schema.global_types.contains_key(&field.id) { + errors.push(ImplInconsistency::SchemaGlobalAbsent(field.name.clone(), field.id)); + } + } + + for name in iface.assignments.keys() { + if self.assignments.iter().all(|field| &field.name != name) { + errors.push(ImplInconsistency::IfaceAssignmentAbsent(name.clone())); + } + } + for field in &self.assignments { + if !schema.owned_types.contains_key(&field.id) { + errors + .push(ImplInconsistency::SchemaAssignmentAbsent(field.name.clone(), field.id)); + } + } + + for name in iface.valencies.keys() { + if self.valencies.iter().all(|field| &field.name != name) { + errors.push(ImplInconsistency::IfaceValencyAbsent(name.clone())); + } + } + for field in &self.valencies { + if !schema.valency_types.contains(&field.id) { + errors.push(ImplInconsistency::SchemaValencyAbsent(field.name.clone(), field.id)); + } + } + + for name in iface.transitions.keys() { + if self.transitions.iter().all(|field| &field.name != name) { + errors.push(ImplInconsistency::IfaceTransitionAbsent(name.clone())); + } + } + for field in &self.transitions { + if !schema.transitions.contains_key(&field.id) { + errors + .push(ImplInconsistency::SchemaTransitionAbsent(field.name.clone(), field.id)); + } + } + + for name in iface.extensions.keys() { + if self.extensions.iter().all(|field| &field.name != name) { + errors.push(ImplInconsistency::IfaceExtensionAbsent(name.clone())); + } + } + for field in &self.extensions { + if !schema.extensions.contains_key(&field.id) { + errors.push(ImplInconsistency::SchemaExtensionAbsent(field.name.clone(), field.id)); + } + } + + for name in iface.errors.keys() { + if self.errors.iter().all(|variant| &variant.name != name) { + errors.push(ImplInconsistency::IfaceErrorAbsent(name.clone())); + } + } + + // TODO: Warn about repeated field names + + if errors.is_empty() { + Ok(()) + } else { + Err(errors) + } + } +} From 5ffe44195176abab8eb9160f69f30a23794d25a3 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 22 Apr 2024 12:15:00 +0200 Subject: [PATCH 27/52] chore: fix dependnecies --- Cargo.lock | 113 +++++++++++++++++++++++--------------- src/interface/builder.rs | 3 +- src/interface/contract.rs | 4 +- 3 files changed, 72 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 164fb445..812fff16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,10 +5,10 @@ version = 3 [[package]] name = "aluvm" version = "0.11.0-beta.5" -source = "git+https://github.com/AluVM/rust-aluvm?branch=v0.11#a08387f744f6679b6ee308e70f99099c318824db" +source = "git+https://github.com/AluVM/rust-aluvm?branch=v0.11#d18ea84836a8a96f3dfe61c99b94f2eab1417819" dependencies = [ "amplify", - "ascii-armor", + "ascii-armor 0.2.0", "baid58", "blake3", "getrandom", @@ -132,6 +132,19 @@ dependencies = [ "strict_encoding", ] +[[package]] +name = "ascii-armor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44ce552de9efa4fdee1a7920f3587e17689bf4a4ba149a7892f91820673c1e29" +dependencies = [ + "amplify", + "baid58", + "base85", + "sha2", + "strict_encoding", +] + [[package]] name = "autocfg" version = "1.2.0" @@ -230,7 +243,7 @@ dependencies = [ [[package]] name = "bp-consensus" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#40d155151b57325ad82edf838196b52ad27af188" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#722dd940ccb231faeab249a64a782d7f90fba935" dependencies = [ "amplify", "chrono", @@ -244,7 +257,7 @@ dependencies = [ [[package]] name = "bp-core" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#40d155151b57325ad82edf838196b52ad27af188" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#722dd940ccb231faeab249a64a782d7f90fba935" dependencies = [ "amplify", "bp-consensus", @@ -262,7 +275,7 @@ dependencies = [ [[package]] name = "bp-dbc" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#40d155151b57325ad82edf838196b52ad27af188" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#722dd940ccb231faeab249a64a782d7f90fba935" dependencies = [ "amplify", "base85", @@ -288,7 +301,7 @@ dependencies = [ [[package]] name = "bp-seals" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#40d155151b57325ad82edf838196b52ad27af188" +source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#722dd940ccb231faeab249a64a782d7f90fba935" dependencies = [ "amplify", "baid58", @@ -309,9 +322,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cc" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cfg-if" @@ -321,9 +334,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -336,7 +349,7 @@ dependencies = [ [[package]] name = "commit_encoding_derive" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#503e5da35642f52b090f7e232a8aeaccb05463cc" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" dependencies = [ "amplify", "amplify_syn", @@ -348,7 +361,7 @@ dependencies = [ [[package]] name = "commit_verify" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#503e5da35642f52b090f7e232a8aeaccb05463cc" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" dependencies = [ "amplify", "commit_encoding_derive", @@ -596,9 +609,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -645,11 +658,11 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=script-refactor#f071856b400dca9b2a708399869a840094864ad1" +source = "git+https://github.com/RGB-WG/rgb-core?branch=script-refactor#938248bb981bc4a82f06cc0e694c3c7f9e4dcda7" dependencies = [ "aluvm", "amplify", - "ascii-armor", + "ascii-armor 0.2.0", "baid58", "bp-core", "chrono", @@ -687,7 +700,7 @@ version = "0.11.0-beta.5" dependencies = [ "aluvm", "amplify", - "ascii-armor", + "ascii-armor 0.2.0", "baid58", "base85", "bp-core", @@ -801,29 +814,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", @@ -876,15 +889,16 @@ dependencies = [ [[package]] name = "single_use_seals" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#503e5da35642f52b090f7e232a8aeaccb05463cc" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" dependencies = [ "amplify_derive", ] [[package]] name = "strict_encoding" -version = "2.7.0-beta.1" -source = "git+https://github.com/strict-types/strict-encoding?branch=rstring#89ea1c2f02402cbda8bbe78ae9a629446f84e474" +version = "2.7.0-beta.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c463f8ea993e323740d78544473e791adb91ac659f5bf2c1a59db64a34f99fc" dependencies = [ "amplify", "half", @@ -894,8 +908,9 @@ dependencies = [ [[package]] name = "strict_encoding_derive" -version = "2.7.0-beta.1" -source = "git+https://github.com/strict-types/strict-encoding?branch=rstring#89ea1c2f02402cbda8bbe78ae9a629446f84e474" +version = "2.7.0-beta.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "475fa6f1fdde6e0555422b5111ad34bde30a1459af3599f920c3af9829772c0e" dependencies = [ "amplify_syn", "heck", @@ -906,11 +921,11 @@ dependencies = [ [[package]] name = "strict_types" -version = "2.7.0-beta.2" -source = "git+https://github.com/strict-types/strict-types?branch=develop#2e6b57b7b46efe9b6db430b56ba4a83f2c7776be" +version = "2.7.0-beta.3" +source = "git+https://github.com/strict-types/strict-types?branch=develop#acc3a7508c49c34c3344e2dd4359e1ade08fae67" dependencies = [ "amplify", - "ascii-armor", + "ascii-armor 0.3.0", "baid58", "half", "indexmap", @@ -946,9 +961,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.58" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -957,22 +972,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -998,9 +1013,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap", "serde", @@ -1070,7 +1085,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", "wasm-bindgen-shared", ] @@ -1104,7 +1119,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1137,7 +1152,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1231,3 +1246,13 @@ checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" dependencies = [ "memchr", ] + +[[patch.unused]] +name = "strict_encoding" +version = "2.7.0-beta.1" +source = "git+https://github.com/strict-types/strict-encoding?branch=rstring#89ea1c2f02402cbda8bbe78ae9a629446f84e474" + +[[patch.unused]] +name = "strict_encoding_derive" +version = "2.7.0-beta.1" +source = "git+https://github.com/strict-types/strict-encoding?branch=rstring#89ea1c2f02402cbda8bbe78ae9a629446f84e474" diff --git a/src/interface/builder.rs b/src/interface/builder.rs index 52169171..b52803dd 100644 --- a/src/interface/builder.rs +++ b/src/interface/builder.rs @@ -914,8 +914,7 @@ impl OperationBuilder { .sem_id; self.types.strict_deserialize_type(sem_id, &serialized)?; - self.global - .add_state(type_id, RevealedData::new_random_salt(serialized))?; + self.global.add_state(type_id, serialized.into())?; Ok(self) } diff --git a/src/interface/contract.rs b/src/interface/contract.rs index 68dbe6bb..be5539e0 100644 --- a/src/interface/contract.rs +++ b/src/interface/contract.rs @@ -258,9 +258,9 @@ impl ContractIface { let state = unsafe { self.state.global_unchecked(type_id) }; let state = state .into_iter() - .map(|revealed| { + .map(|data| { self.types - .strict_deserialize_type(type_schema.sem_id, revealed.value.as_ref()) + .strict_deserialize_type(type_schema.sem_id, data.as_ref()) .map(TypedVal::unbox) }) .take(type_schema.max_items as usize) From 0a392e705e1cfd246508021467f2963552d366d7 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 22 Apr 2024 13:46:39 +0200 Subject: [PATCH 28/52] iface: fix deterministic constructor method name in assertions --- src/interface/builder.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/interface/builder.rs b/src/interface/builder.rs index 444b8c79..dd67c220 100644 --- a/src/interface/builder.rs +++ b/src/interface/builder.rs @@ -927,8 +927,8 @@ impl OperationBuilder { ) -> Result { debug_assert!( self.deterministic, - "to add owned state in deterministic way the builder has to be created using `*_det` \ - constructor" + "to add owned state in deterministic way the builder has to be created using \ + deterministic constructor" ); let name = name.into(); let type_id = self @@ -1034,8 +1034,8 @@ impl OperationBuilder { ) -> Result { debug_assert!( self.deterministic, - "to add owned state in deterministic way the builder has to be created using `*_det` \ - constructor" + "to add owned state in deterministic way the builder has to be created using \ + deterministic constructor" ); let name = name.into(); @@ -1101,8 +1101,8 @@ impl OperationBuilder { ) -> Result { debug_assert!( self.deterministic, - "to add owned state in deterministic way the builder has to be created using `*_det` \ - constructor" + "to add owned state in deterministic way the builder has to be created using \ + deterministic constructor" ); let name = name.into(); @@ -1168,8 +1168,8 @@ impl OperationBuilder { ) -> Result { debug_assert!( self.deterministic, - "to add owned state in deterministic way the builder has to be created using `*_det` \ - constructor" + "to add owned state in deterministic way the builder has to be created using \ + deterministic constructor" ); let name = name.into(); From 569f33e170c25bf81465529acf181b1a6f9c401c Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 22 Apr 2024 19:25:51 +0200 Subject: [PATCH 29/52] iface: add issuer identity to contract builder --- src/interface/builder.rs | 13 +++++++++---- src/persistence/stash.rs | 2 ++ src/persistence/stock.rs | 9 ++++++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/interface/builder.rs b/src/interface/builder.rs index dd67c220..95ee8964 100644 --- a/src/interface/builder.rs +++ b/src/interface/builder.rs @@ -31,8 +31,9 @@ use rgb::validation::Scripts; use rgb::{ validation, AltLayer1, AltLayer1Set, AssetTag, AssetTags, Assign, AssignmentType, Assignments, BlindingFactor, ContractId, DataState, ExposedSeal, FungibleType, Genesis, GenesisSeal, - GlobalState, GraphSeal, Input, Layer1, Opout, OwnedStateSchema, RevealedAttach, RevealedData, - RevealedValue, Schema, Transition, TransitionType, TypedAssigns, XChain, XOutpoint, + GlobalState, GraphSeal, Identity, Input, Layer1, Opout, OwnedStateSchema, RevealedAttach, + RevealedData, RevealedValue, Schema, Transition, TransitionType, TypedAssigns, XChain, + XOutpoint, }; use strict_encoding::{FieldName, SerializeError, StrictSerialize}; use strict_types::{decode, TypeSystem}; @@ -135,10 +136,12 @@ pub struct ContractBuilder { testnet: bool, alt_layers1: AltLayer1Set, scripts: Scripts, + issuer: Identity, } impl ContractBuilder { pub fn with( + issuer: Identity, iface: Iface, schema: Schema, iimpl: IfaceImpl, @@ -150,10 +153,12 @@ impl ContractBuilder { testnet: true, alt_layers1: none!(), scripts, + issuer, } } pub fn deterministic( + issuer: Identity, iface: Iface, schema: Schema, iimpl: IfaceImpl, @@ -165,6 +170,7 @@ impl ContractBuilder { testnet: true, alt_layers1: none!(), scripts, + issuer, } } @@ -356,8 +362,7 @@ impl ContractBuilder { globals: global, assignments, valencies: none!(), - // TODO: Add APIs for providing issuer information - issuer: none!(), + issuer: self.issuer, validator: none!(), }; diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index c1fa3f73..9a9a7be0 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -270,6 +270,7 @@ impl Stash

{ pub(super) fn contract_builder( &self, + issuer: Identity, schema_id: SchemaId, iface: impl Into, ) -> Result> { @@ -283,6 +284,7 @@ impl Stash

{ let (types, scripts) = self.extract(&schema_ifaces.schema, [iface])?; let builder = ContractBuilder::with( + issuer, iface.clone(), schema_ifaces.schema.clone(), iimpl.clone(), diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 190c042c..686db7d3 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -34,8 +34,8 @@ use commit_verify::Conceal; use invoice::{Amount, Beneficiary, InvoiceState, NonFungible, RgbInvoice}; use rgb::{ validation, AssignmentType, BlindingFactor, BundleId, ContractHistory, ContractId, - ContractState, DbcProof, EAnchor, GraphSeal, OpId, Operation, Opout, SchemaId, SecretSeal, - Transition, WitnessAnchor, XChain, XOutpoint, XOutputSeal, XWitnessId, + ContractState, DbcProof, EAnchor, GraphSeal, Identity, OpId, Operation, Opout, SchemaId, + SecretSeal, Transition, WitnessAnchor, XChain, XOutpoint, XOutputSeal, XWitnessId, }; use strict_encoding::FieldName; @@ -574,10 +574,13 @@ impl Stock { pub fn contract_builder( &self, + issuer: impl Into, schema_id: SchemaId, iface: impl Into, ) -> Result> { - Ok(self.stash.contract_builder(schema_id, iface)?) + Ok(self + .stash + .contract_builder(issuer.into(), schema_id, iface)?) } pub fn transition_builder( From adb875d5d80bc6126226b5089796794e761bb0b2 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 22 Apr 2024 19:51:23 +0200 Subject: [PATCH 30/52] remove unnecessary debug code --- src/info.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/info.rs b/src/info.rs index 1dbca87a..35178036 100644 --- a/src/info.rs +++ b/src/info.rs @@ -47,7 +47,6 @@ pub struct IfaceInfo { impl IfaceInfo { pub fn with(iface: &Iface, names: &HashMap) -> Self { - eprintln!("{:#?}", names); IfaceInfo { id: iface.iface_id(), version: iface.version, From 28f9492df5369f7366b325592b1bc7d3171e9a4b Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 22 Apr 2024 21:01:19 +0200 Subject: [PATCH 31/52] persistence: enumerate contract info objects rather than contract ids --- src/info.rs | 41 ++++++++++++++++++++++++++++++++++++++- src/persistence/memory.rs | 4 ++-- src/persistence/stash.rs | 12 ++++-------- src/persistence/stock.rs | 8 ++++---- 4 files changed, 50 insertions(+), 15 deletions(-) diff --git a/src/info.rs b/src/info.rs index 35178036..d8b53276 100644 --- a/src/info.rs +++ b/src/info.rs @@ -23,7 +23,7 @@ use std::collections::HashMap; use std::fmt::{self, Display, Formatter, Write}; use chrono::{DateTime, TimeZone, Utc}; -use rgb::{Identity, SchemaId}; +use rgb::{ContractId, Genesis, Identity, Operation, SchemaId}; use strict_encoding::{FieldName, TypeName}; use crate::interface::{Iface, IfaceId, IfaceImpl, IfaceRef, ImplId, VerNo}; @@ -188,3 +188,42 @@ impl Display for ImplInfo { write!(f, "{: <80}", self.id.to_string()) } } + +#[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] +pub struct ContractInfo { + pub id: ContractId, + pub schema_id: SchemaId, + pub issuer: Identity, + pub issued_at: DateTime, +} + +impl ContractInfo { + pub fn with(genesis: &Genesis) -> Self { + ContractInfo { + id: genesis.contract_id(), + schema_id: genesis.schema_id, + issuer: genesis.issuer.clone(), + issued_at: Utc + .timestamp_opt(genesis.timestamp, 0) + .single() + .unwrap_or_else(Utc::now), + } + } +} + +impl Display for ContractInfo { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "{: <18}", self.issuer.to_string())?; + f.write_char(f.fill())?; + write!(f, "{}", self.issued_at.format("%Y-%m-%d"))?; + f.write_char(f.fill())?; + write!(f, "{: <80}", self.id.to_string())?; + f.write_char(f.fill())?; + writeln!(f, "{: <80}", self.schema_id) + } +} diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index 219f5098..56ed99df 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -119,8 +119,8 @@ impl StashReadProvider for MemStash { .ok_or_else(|| StashInconsistency::SchemaAbsent(schema_id).into()) } - fn contract_ids(&self) -> Result, Self::Error> { - Ok(self.geneses.keys().copied()) + fn geneses(&self) -> Result, Self::Error> { + Ok(self.geneses.values()) } fn contract_ids_by_iface( diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index 9a9a7be0..a7c049b2 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -208,14 +208,10 @@ impl Stash

{ pub(super) fn schema(&self, schema_id: SchemaId) -> Result<&SchemaIfaces, StashError

> { Ok(self.provider.schema(schema_id)?) } - pub(super) fn contract_ids( - &self, - ) -> Result + '_, StashError

> { - self.provider - .contract_ids() - .map_err(StashError::ReadProvider) - } + pub(super) fn geneses(&self) -> Result + '_, StashError

> { + self.provider.geneses().map_err(StashError::ReadProvider) + } pub(super) fn genesis(&self, contract_id: ContractId) -> Result<&Genesis, StashError

> { Ok(self.provider.genesis(contract_id)?) } @@ -579,7 +575,6 @@ pub trait StashReadProvider { fn schemata(&self) -> Result, Self::Error>; fn schema(&self, schema_id: SchemaId) -> Result<&SchemaIfaces, ProviderError>; - fn contract_ids(&self) -> Result, Self::Error>; fn contract_ids_by_iface( &self, iface: impl Into, @@ -596,6 +591,7 @@ pub trait StashReadProvider { contract_id: ContractId, ) -> Result, Self::Error>; + fn geneses(&self) -> Result, Self::Error>; fn genesis(&self, contract_id: ContractId) -> Result<&Genesis, ProviderError>; fn witness_ids(&self) -> Result, Self::Error>; fn bundle_ids(&self) -> Result, Self::Error>; diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 686db7d3..f7103fd7 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -50,7 +50,7 @@ use crate::containers::{ Contract, Fascia, Kit, PubWitness, SealWitness, Terminal, TerminalSeal, Transfer, TransitionInfo, TransitionInfoError, ValidConsignment, ValidContract, ValidKit, ValidTransfer, }; -use crate::info::{IfaceInfo, SchemaInfo}; +use crate::info::{ContractInfo, IfaceInfo, SchemaInfo}; use crate::interface::resolver::DumbResolver; use crate::interface::{ BuilderError, ContractBuilder, ContractIface, Iface, IfaceClass, IfaceId, IfaceRef, @@ -395,10 +395,10 @@ impl Stock { Ok(self.stash.schema(schema_id)?) } - pub fn contract_ids( + pub fn contracts( &self, - ) -> Result + '_, StockError> { - Ok(self.stash.contract_ids()?) + ) -> Result + '_, StockError> { + Ok(self.stash.geneses()?.map(ContractInfo::with)) } pub fn contracts_by( From 2a16b7b2e2ffc13cd020a3c26e7a9cbdd60bac77 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 22 Apr 2024 21:52:20 +0200 Subject: [PATCH 32/52] persistence: API for getting contracts by abstract interfaces --- src/persistence/memory.rs | 77 ++++++++++++++++++++++++--------------- src/persistence/stash.rs | 45 ++++++++++++++++------- src/persistence/stock.rs | 27 +++----------- 3 files changed, 85 insertions(+), 64 deletions(-) diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index 56ed99df..23047144 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -38,13 +38,13 @@ use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::TypeSystem; use super::{ - IndexInconsistency, IndexProvider, IndexReadError, IndexReadProvider, IndexWriteError, - IndexWriteProvider, SchemaIfaces, StashInconsistency, StashProvider, StashProviderError, - StashReadProvider, StashWriteProvider, StateProvider, StateReadProvider, StateUpdateError, - StateWriteProvider, + ContractIfaceError, IndexInconsistency, IndexProvider, IndexReadError, IndexReadProvider, + IndexWriteError, IndexWriteProvider, SchemaIfaces, StashInconsistency, StashProvider, + StashProviderError, StashReadProvider, StashWriteProvider, StateProvider, StateReadProvider, + StateUpdateError, StateWriteProvider, }; use crate::containers::{AnchorSet, ContentId, ContentSigs, SealWitness, SigBlob}; -use crate::interface::{ContractSuppl, Iface, IfaceId, IfaceImpl, IfaceRef}; +use crate::interface::{ContractSuppl, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef}; use crate::resolvers::ResolveHeight; use crate::LIB_NAME_RGB_STD; @@ -109,6 +109,37 @@ impl StashReadProvider for MemStash { fn schemata(&self) -> Result, Self::Error> { Ok(self.schemata.values()) } + fn schemata_by( + &self, + ) -> Result, Self::Error> { + Ok(self + .schemata + .values() + .filter(|schema_ifaces| self.impl_for::(schema_ifaces).is_ok())) + } + + fn impl_for<'a, C: IfaceClass + 'a>( + &'a self, + schema_ifaces: &'a SchemaIfaces, + ) -> Result<&'a IfaceImpl, StashProviderError> { + schema_ifaces + .iimpls + .values() + .find(|iimpl| C::IFACE_IDS.contains(&iimpl.iface_id)) + .or_else(|| { + schema_ifaces.iimpls.keys().find_map(|id| { + let iface = self.iface(id.clone()).ok()?; + iface.find_abstractable_impl(schema_ifaces) + }) + }) + .ok_or_else(move || { + ContractIfaceError::NoAbstractImpl( + C::IFACE_IDS[0], + schema_ifaces.schema.schema_id(), + ) + .into() + }) + } fn schema( &self, @@ -119,30 +150,6 @@ impl StashReadProvider for MemStash { .ok_or_else(|| StashInconsistency::SchemaAbsent(schema_id).into()) } - fn geneses(&self) -> Result, Self::Error> { - Ok(self.geneses.values()) - } - - fn contract_ids_by_iface( - &self, - iface: impl Into, - ) -> Result, StashProviderError> { - let iface = self.iface(iface)?; - let iface_id = iface.iface_id(); - let schemata = self - .schemata - .iter() - .filter(|(_, iface)| iface.contains(iface_id)) - .map(|(schema_id, _)| schema_id) - .collect::>(); - Ok(self - .geneses - .iter() - .filter(move |(_, genesis)| schemata.contains(&genesis.schema_id)) - .map(|(contract_id, _)| contract_id) - .copied()) - } - fn contract_supplements( &self, contract_id: ContractId, @@ -155,6 +162,18 @@ impl StashReadProvider for MemStash { .into_iter()) } + fn geneses(&self) -> Result, Self::Error> { + Ok(self.geneses.values()) + } + + fn geneses_by(&self) -> Result, Self::Error> { + Ok(self.schemata_by::()?.flat_map(|schema_ifaces| { + self.geneses + .values() + .filter(|genesis| schema_ifaces.schema.schema_id() == genesis.schema_id) + })) + } + fn genesis( &self, contract_id: ContractId, diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index a7c049b2..bcd6da24 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -42,6 +42,7 @@ use crate::interface::{ ContractBuilder, ContractSuppl, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef, TransitionBuilder, }; +use crate::persistence::ContractIfaceError; use crate::{MergeReveal, MergeRevealError, SecretSeal, LIB_NAME_RGB_STD}; #[derive(Clone, Eq, PartialEq, Debug, Display, Error, From)] @@ -73,6 +74,8 @@ pub enum StashError { pub enum ProviderError { #[from] Inconsistency(StashInconsistency), + #[from] + Iface(ContractIfaceError), Connectivity(E), } @@ -81,6 +84,7 @@ impl From::Error>> for match err { ProviderError::Inconsistency(e) => StashError::Inconsistency(e), ProviderError::Connectivity(e) => StashError::ReadProvider(e), + ProviderError::Iface(e) => StashError::Data(StashDataError::NoAbstractIface(e)), } } } @@ -141,6 +145,10 @@ pub enum StashDataError { /// schema {0} doesn't implement interface {1}. NoIfaceImpl(SchemaId, IfaceId), + + #[from] + #[display(inner)] + NoAbstractIface(ContractIfaceError), } #[derive(Clone, Eq, PartialEq, Debug)] @@ -208,10 +216,23 @@ impl Stash

{ pub(super) fn schema(&self, schema_id: SchemaId) -> Result<&SchemaIfaces, StashError

> { Ok(self.provider.schema(schema_id)?) } + pub(super) fn impl_for<'a, C: IfaceClass + 'a>( + &'a self, + schema_ifaces: &'a SchemaIfaces, + ) -> Result<&'a IfaceImpl, StashError

> { + Ok(self.provider.impl_for::(schema_ifaces)?) + } pub(super) fn geneses(&self) -> Result + '_, StashError

> { self.provider.geneses().map_err(StashError::ReadProvider) } + pub(super) fn geneses_by<'a, C: IfaceClass + 'a>( + &'a self, + ) -> Result + 'a, StashError

> { + self.provider + .geneses_by::() + .map_err(StashError::ReadProvider) + } pub(super) fn genesis(&self, contract_id: ContractId) -> Result<&Genesis, StashError

> { Ok(self.provider.genesis(contract_id)?) } @@ -222,14 +243,6 @@ impl Stash

{ Ok(self.provider.witness(witness_id)?) } - pub(super) fn contracts_by( - &self, - ) -> Result + '_, StashError

> { - Ok(C::IFACE_IDS - .iter() - .filter_map(|id| self.provider.contract_ids_by_iface(*id).ok()) - .flatten()) - } pub(super) fn contract_supplements( &self, contract_id: ContractId, @@ -574,11 +587,17 @@ pub trait StashReadProvider { fn iface(&self, iface: impl Into) -> Result<&Iface, ProviderError>; fn schemata(&self) -> Result, Self::Error>; fn schema(&self, schema_id: SchemaId) -> Result<&SchemaIfaces, ProviderError>; - - fn contract_ids_by_iface( + fn schemata_by( &self, - iface: impl Into, - ) -> Result, ProviderError>; + ) -> Result, Self::Error>; + fn impl_for<'a, C: IfaceClass + 'a>( + &'a self, + schema_ifaces: &'a SchemaIfaces, + ) -> Result<&'a IfaceImpl, ProviderError>; + fn geneses(&self) -> Result, Self::Error>; + fn geneses_by(&self) -> Result, Self::Error>; + fn genesis(&self, contract_id: ContractId) -> Result<&Genesis, ProviderError>; + fn contract_schema( &self, contract_id: ContractId, @@ -591,8 +610,6 @@ pub trait StashReadProvider { contract_id: ContractId, ) -> Result, Self::Error>; - fn geneses(&self) -> Result, Self::Error>; - fn genesis(&self, contract_id: ContractId) -> Result<&Genesis, ProviderError>; fn witness_ids(&self) -> Result, Self::Error>; fn bundle_ids(&self) -> Result, Self::Error>; fn bundle(&self, bundle_id: BundleId) -> Result<&TransitionBundle, ProviderError>; diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index f7103fd7..d4886912 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -401,11 +401,11 @@ impl Stock { Ok(self.stash.geneses()?.map(ContractInfo::with)) } - pub fn contracts_by( - &self, - ) -> Result + '_, StockError> { - Ok(self.stash.contracts_by::()?.filter_map(|id| { - self.contract_iface_class::(id) + pub fn contracts_by<'a, C: IfaceClass + 'a>( + &'a self, + ) -> Result + 'a, StockError> { + Ok(self.stash.geneses_by::()?.filter_map(|genesis| { + self.contract_iface_class::(genesis.contract_id()) .as_ref() .map(C::info) .ok() @@ -455,22 +455,7 @@ impl Stock { contract_id: ContractId, ) -> Result> { let (schema_ifaces, history) = self.contract_raw(contract_id)?; - let iimpl = schema_ifaces - .iimpls - .values() - .find(|iimpl| C::IFACE_IDS.contains(&iimpl.iface_id)) - .or_else(|| { - schema_ifaces.iimpls.keys().find_map(|id| { - let iface = self.stash.iface(id.clone()).ok()?; - iface.find_abstractable_impl(schema_ifaces) - }) - }) - .ok_or_else(|| { - ContractIfaceError::NoAbstractImpl( - C::IFACE_IDS[0], - schema_ifaces.schema.schema_id(), - ) - })?; + let iimpl = self.stash.impl_for::(schema_ifaces)?; let iface = self.stash.iface(iimpl.iface_id)?; let (types, _) = self.stash.extract(&schema_ifaces.schema, [iface])?; From aa314fde5d5663090be3d1ddd9d8cf3c93a0472b Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 22 Apr 2024 23:42:24 +0200 Subject: [PATCH 33/52] info: improve ContractInfo --- src/info.rs | 23 ++++++++++++++++++----- src/interface/contract.rs | 2 ++ src/persistence/stock.rs | 13 ++++++++----- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/info.rs b/src/info.rs index d8b53276..72bbca12 100644 --- a/src/info.rs +++ b/src/info.rs @@ -23,7 +23,7 @@ use std::collections::HashMap; use std::fmt::{self, Display, Formatter, Write}; use chrono::{DateTime, TimeZone, Utc}; -use rgb::{ContractId, Genesis, Identity, Operation, SchemaId}; +use rgb::{AltLayer1Set, ContractId, Genesis, Identity, Operation, SchemaId}; use strict_encoding::{FieldName, TypeName}; use crate::interface::{Iface, IfaceId, IfaceImpl, IfaceRef, ImplId, VerNo}; @@ -189,7 +189,7 @@ impl Display for ImplInfo { } } -#[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +#[derive(Clone, Eq, PartialEq, Hash, Debug)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -200,6 +200,8 @@ pub struct ContractInfo { pub schema_id: SchemaId, pub issuer: Identity, pub issued_at: DateTime, + pub testnet: bool, + pub alt_layers1: AltLayer1Set, } impl ContractInfo { @@ -212,6 +214,8 @@ impl ContractInfo { .timestamp_opt(genesis.timestamp, 0) .single() .unwrap_or_else(Utc::now), + testnet: genesis.testnet, + alt_layers1: genesis.alt_layers1.clone(), } } } @@ -220,10 +224,19 @@ impl Display for ContractInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { write!(f, "{: <18}", self.issuer.to_string())?; f.write_char(f.fill())?; - write!(f, "{}", self.issued_at.format("%Y-%m-%d"))?; - f.write_char(f.fill())?; write!(f, "{: <80}", self.id.to_string())?; f.write_char(f.fill())?; - writeln!(f, "{: <80}", self.schema_id) + write!( + f, + "bitcoin{: <8}", + self.alt_layers1 + .iter() + .map(|layer| format!(", {layer}")) + .collect::() + )?; + f.write_char(f.fill())?; + write!(f, "{}", self.issued_at.format("%Y-%m-%d"))?; + f.write_char(f.fill())?; + writeln!(f, "{}", self.schema_id) } } diff --git a/src/interface/contract.rs b/src/interface/contract.rs index be5539e0..e85a2e20 100644 --- a/src/interface/contract.rs +++ b/src/interface/contract.rs @@ -32,6 +32,7 @@ use strict_encoding::{FieldName, StrictDecode, StrictDumb, StrictEncode}; use strict_types::typify::TypedVal; use strict_types::{decode, StrictVal, TypeSystem}; +use crate::info::ContractInfo; use crate::interface::{IfaceImpl, OutpointFilter, WitnessFilter}; use crate::LIB_NAME_RGB_STD; @@ -232,6 +233,7 @@ pub struct ContractIface { pub state: ContractState, pub iface: IfaceImpl, pub types: TypeSystem, + pub info: ContractInfo, } // TODO: Introduce witness checker: additional filter returning only those data diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index d4886912..2ff22ca8 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -428,7 +428,7 @@ impl Stock { fn contract_raw( &self, contract_id: ContractId, - ) -> Result<(&SchemaIfaces, &ContractHistory), StockError> { + ) -> Result<(&SchemaIfaces, &ContractHistory, ContractInfo), StockError> { let history = self .state .contract_state(contract_id) @@ -436,14 +436,15 @@ impl Stock { .ok_or(StockError::StateInconsistency(contract_id))?; let schema_id = history.schema_id(); let schema_ifaces = self.stash.schema(schema_id)?; - Ok((schema_ifaces, history)) + let info = ContractInfo::with(self.stash.genesis(contract_id)?); + Ok((schema_ifaces, history, info)) } pub fn contract_state( &self, contract_id: ContractId, ) -> Result> { - let (schema_ifaces, history) = self.contract_raw(contract_id)?; + let (schema_ifaces, history, _) = self.contract_raw(contract_id)?; Ok(ContractState { schema: schema_ifaces.schema.clone(), history: history.clone(), @@ -454,7 +455,7 @@ impl Stock { &self, contract_id: ContractId, ) -> Result> { - let (schema_ifaces, history) = self.contract_raw(contract_id)?; + let (schema_ifaces, history, info) = self.contract_raw(contract_id)?; let iimpl = self.stash.impl_for::(schema_ifaces)?; let iface = self.stash.iface(iimpl.iface_id)?; @@ -468,6 +469,7 @@ impl Stock { state, iface: iimpl.clone(), types, + info, } .into()) } @@ -478,7 +480,7 @@ impl Stock { contract_id: ContractId, iface: impl Into, ) -> Result> { - let (schema_ifaces, history) = self.contract_raw(contract_id)?; + let (schema_ifaces, history, info) = self.contract_raw(contract_id)?; let iface = self.stash.iface(iface)?; let iface_id = iface.iface_id(); @@ -496,6 +498,7 @@ impl Stock { state, iface: iimpl.clone(), types, + info, }) } From dcf62120a43234c550fb66a2612d4c129737905a Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 23 Apr 2024 01:19:28 +0200 Subject: [PATCH 34/52] fix serde serialization of id types --- Cargo.lock | 12 ++++++------ src/containers/consignment.rs | 11 ++++------- src/containers/kit.rs | 9 +++------ src/interface/iface.rs | 9 +++------ src/interface/iimpl.rs | 11 ++++------- src/interface/suppl.rs | 9 +++------ 6 files changed, 23 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a4c9d0d2..d746b97c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ version = 3 [[package]] name = "aluvm" version = "0.11.0-beta.5" -source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#d21a5bec78917e61f569ce0da58852bccd92642a" +source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#75782d845e29ba9afcb9dab967513932f73ccf49" dependencies = [ "amplify", "ascii-armor 0.2.0", @@ -243,7 +243,7 @@ dependencies = [ [[package]] name = "bp-consensus" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" dependencies = [ "amplify", "chrono", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "bp-core" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" dependencies = [ "amplify", "bp-consensus", @@ -275,7 +275,7 @@ dependencies = [ [[package]] name = "bp-dbc" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" dependencies = [ "amplify", "base85", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "bp-seals" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#fb281e3b2d81a9aee7d393b6c574a3a4f62ad132" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" dependencies = [ "amplify", "baid58", @@ -659,7 +659,7 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#648bb45ab4dd4c000e8ba1872a2a7ce47cd2217e" +source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#9b34f1bd14c7b82b050c6932966b8956d569ce02" dependencies = [ "aluvm", "amplify", diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index 500c339d..cf0ff83f 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -35,8 +35,8 @@ use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; use commit_verify::{CommitEncode, CommitEngine, CommitId, CommitmentId, DigestExt, Sha256}; use rgb::validation::{ResolveWitness, Validator, Validity, Warning, CONSIGNMENT_MAX_LIBS}; use rgb::{ - validation, AttachId, BundleId, ContractHistory, ContractId, Extension, Genesis, GraphSeal, - Operation, Schema, SchemaId, XChain, + impl_serde_baid58, validation, AttachId, BundleId, ContractHistory, ContractId, Extension, + Genesis, GraphSeal, Operation, Schema, SchemaId, XChain, }; use strict_encoding::{StrictDeserialize, StrictDumb, StrictSerialize}; use strict_types::TypeSystem; @@ -61,11 +61,6 @@ pub type Contract = Consignment; #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", transparent) -)] pub struct ConsignmentId( #[from] #[from([u8; 32])] @@ -110,6 +105,8 @@ impl ConsignmentId { pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } +impl_serde_baid58!(ConsignmentId); + pub type ValidContract = ValidConsignment; pub type ValidTransfer = ValidConsignment; diff --git a/src/containers/kit.rs b/src/containers/kit.rs index addc37b0..3ea530f1 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -30,7 +30,7 @@ use amplify::Bytes32; use armor::{ArmorHeader, AsciiArmor, StrictArmor}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; use commit_verify::{CommitEncode, CommitEngine, CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{validation, Schema}; +use rgb::{impl_serde_baid58, validation, Schema}; use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::TypeSystem; @@ -49,11 +49,6 @@ use crate::LIB_NAME_RGB_STD; #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", transparent) -)] pub struct KitId( #[from] #[from([u8; 32])] @@ -98,6 +93,8 @@ impl KitId { pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } +impl_serde_baid58!(KitId); + #[derive(Clone, Debug, Display)] #[display("{kit}")] pub struct ValidKit { diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 409c403d..30491221 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -30,7 +30,7 @@ use amplify::{ByteArray, Bytes32}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; use chrono::{DateTime, TimeZone, Utc}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{Identity, Occurrences}; +use rgb::{impl_serde_baid58, Identity, Occurrences}; use strict_encoding::{ FieldName, StrictDecode, StrictDeserialize, StrictDumb, StrictEncode, StrictSerialize, StrictType, TypeName, VariantName, @@ -48,11 +48,6 @@ use crate::LIB_NAME_RGB_STD; #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", transparent) -)] pub struct IfaceId( #[from] #[from([u8; 32])] @@ -97,6 +92,8 @@ impl IfaceId { pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } +impl_serde_baid58!(IfaceId); + #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Display, From)] #[display(inner)] #[cfg_attr( diff --git a/src/interface/iimpl.rs b/src/interface/iimpl.rs index 22cc9a85..82fe67e9 100644 --- a/src/interface/iimpl.rs +++ b/src/interface/iimpl.rs @@ -28,8 +28,8 @@ use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; use chrono::{DateTime, TimeZone, Utc}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; use rgb::{ - AssignmentType, ExtensionType, GlobalStateType, Identity, MetaType, Schema, SchemaId, - TransitionType, ValencyType, + impl_serde_baid58, AssignmentType, ExtensionType, GlobalStateType, Identity, MetaType, Schema, + SchemaId, TransitionType, ValencyType, }; use strict_encoding::{FieldName, StrictDumb, VariantName}; use strict_types::encoding::{StrictDecode, StrictEncode, StrictType}; @@ -57,11 +57,6 @@ impl SchemaTypeIndex for TransitionType {} #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", transparent) -)] pub struct ImplId( #[from] #[from([u8; 32])] @@ -105,6 +100,8 @@ impl ImplId { pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } +impl_serde_baid58!(ImplId); + /// Maps certain form of type id (global or owned state or a valency) to a /// human-readable name. /// diff --git a/src/interface/suppl.rs b/src/interface/suppl.rs index d71bb155..56ae2798 100644 --- a/src/interface/suppl.rs +++ b/src/interface/suppl.rs @@ -27,7 +27,7 @@ use amplify::confinement::{SmallBlob, TinyOrdMap, TinyString}; use amplify::{ByteArray, Bytes32}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{AssignmentType, ContractId, GlobalStateType}; +use rgb::{impl_serde_baid58, AssignmentType, ContractId, GlobalStateType}; use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::value; @@ -40,11 +40,6 @@ use crate::LIB_NAME_RGB_STD; #[wrapper(Deref, BorrowSlice, Hex, Index, RangeOps)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", transparent) -)] pub struct SupplId( #[from] #[from([u8; 32])] @@ -89,6 +84,8 @@ impl SupplId { pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } +impl_serde_baid58!(SupplId); + /// Contract supplement, providing non-consensus information about standard /// way of working with the contract data. Each contract can have only a single /// valid supplement; the supplement is attached to the contract via trusted From db618945daab606b216189863eb0341b710f2180 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 23 Apr 2024 11:40:45 +0200 Subject: [PATCH 35/52] containers: refactor supplements --- src/containers/consignment.rs | 6 +- src/containers/kit.rs | 6 +- src/containers/mod.rs | 5 + src/{interface => containers}/suppl.rs | 176 +++++++-- src/containers/util.rs | 6 +- src/interface/mod.rs | 2 - src/persistence/memory.rs | 23 +- src/persistence/stash.rs | 23 +- src/persistence/stock.rs | 23 +- src/stl/stl.rs | 3 +- stl/RGBStd@0.11.0.sta | 526 +++++++++++++------------ stl/RGBStd@0.11.0.stl | Bin 19054 -> 19152 bytes stl/RGBStd@0.11.0.sty | 72 ++-- stl/Transfer.vesper | 45 +-- 14 files changed, 530 insertions(+), 386 deletions(-) rename src/{interface => containers}/suppl.rs (56%) diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index cf0ff83f..ca048ab0 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -42,12 +42,12 @@ use strict_encoding::{StrictDeserialize, StrictDumb, StrictSerialize}; use strict_types::TypeSystem; use super::{ - BundledWitness, ContainerVer, ContentId, ContentSigs, IndexedConsignment, Terminal, + BundledWitness, ContainerVer, ContentId, ContentSigs, IndexedConsignment, Supplement, Terminal, TerminalDisclose, ASCII_ARMOR_CONSIGNMENT_TYPE, ASCII_ARMOR_CONTRACT, ASCII_ARMOR_IFACE, ASCII_ARMOR_SCHEMA, ASCII_ARMOR_TERMINAL, ASCII_ARMOR_VERSION, }; use crate::containers::anchors::ToWitnessId; -use crate::interface::{ContractSuppl, Iface, IfaceImpl}; +use crate::interface::{Iface, IfaceImpl}; use crate::resolvers::ResolveHeight; use crate::{BundleExt, SecretSeal, LIB_NAME_RGB_STD}; @@ -182,7 +182,7 @@ pub struct Consignment { pub ifaces: TinyOrdMap, /// Known supplements. - pub supplements: TinyOrdSet, + pub supplements: TinyOrdSet, /// Type system covering all types used in schema, interfaces and /// implementations. diff --git a/src/containers/kit.rs b/src/containers/kit.rs index 3ea530f1..45f80aeb 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -35,11 +35,11 @@ use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::TypeSystem; use super::{ - ASCII_ARMOR_IFACE, ASCII_ARMOR_IIMPL, ASCII_ARMOR_SCHEMA, ASCII_ARMOR_SCRIPT, + Supplement, ASCII_ARMOR_IFACE, ASCII_ARMOR_IIMPL, ASCII_ARMOR_SCHEMA, ASCII_ARMOR_SCRIPT, ASCII_ARMOR_SUPPL, ASCII_ARMOR_TYPE_SYSTEM, ASCII_ARMOR_VERSION, }; use crate::containers::{ContainerVer, ContentId, ContentSigs}; -use crate::interface::{ContractSuppl, Iface, IfaceImpl}; +use crate::interface::{Iface, IfaceImpl}; use crate::LIB_NAME_RGB_STD; /// Kit identifier. @@ -138,7 +138,7 @@ pub struct Kit { pub iimpls: TinyOrdSet, - pub supplements: TinyOrdSet, + pub supplements: TinyOrdSet, /// Type system covering all types used in schema, interfaces and /// implementations. diff --git a/src/containers/mod.rs b/src/containers/mod.rs index bafb3c7f..55a2c939 100644 --- a/src/containers/mod.rs +++ b/src/containers/mod.rs @@ -37,6 +37,7 @@ mod partials; mod indexed; mod file; mod kit; +mod suppl; pub use anchors::{ AnchorSet, AnchoredBundles, BundledWitness, PubWitness, SealWitness, ToWitnessId, XPubWitness, @@ -52,6 +53,10 @@ pub use partials::{ Batch, BundleDichotomy, CloseMethodSet, Fascia, TransitionInfo, TransitionInfoError, }; pub use seal::{BuilderSeal, TerminalSeal, VoutSeal}; +pub use suppl::{ + AnnotationName, Annotations, ContentRef, SupplId, SupplItem, SupplMap, SupplSub, Supplement, + TickerSuppl, VelocityHint, SUPPL_ANNOT_VELOCITY, +}; pub use util::{ContainerVer, ContentId, ContentSigs, SigBlob, Terminal, TerminalDisclose}; pub const ASCII_ARMOR_NAME: &str = "Name"; diff --git a/src/interface/suppl.rs b/src/containers/suppl.rs similarity index 56% rename from src/interface/suppl.rs rename to src/containers/suppl.rs index 56ae2798..20dcb28c 100644 --- a/src/interface/suppl.rs +++ b/src/containers/suppl.rs @@ -23,16 +23,22 @@ use std::fmt; use std::fmt::{Display, Formatter}; use std::str::FromStr; -use amplify::confinement::{SmallBlob, TinyOrdMap, TinyString}; +use amplify::confinement::{SmallBlob, TinyOrdMap}; use amplify::{ByteArray, Bytes32}; use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{impl_serde_baid58, AssignmentType, ContractId, GlobalStateType}; -use strict_encoding::{StrictDeserialize, StrictSerialize}; +use rgb::{impl_serde_baid58, AssignmentType, ContractId, GlobalStateType, Identity, SchemaId}; +use strict_encoding::stl::{AlphaCaps, AlphaNumDash}; +use strict_encoding::{ + DeserializeError, FieldName, RString, StrictDeserialize, StrictSerialize, TypeName, VariantName, +}; use strict_types::value; +use crate::interface::{IfaceId, ImplId}; use crate::LIB_NAME_RGB_STD; +pub const SUPPL_ANNOT_VELOCITY: &str = "Velocity"; + /// Contract supplement identifier. /// /// Contract supplement identifier commits to all of the supplement data. @@ -86,6 +92,102 @@ impl SupplId { impl_serde_baid58!(SupplId); +#[derive(Wrapper, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, From, Display)] +#[wrapper(Deref, FromStr)] +#[display(inner)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) +)] +pub struct AnnotationName(RString); + +impl Default for AnnotationName { + fn default() -> Self { Self::from("") } +} + +impl From<&'static str> for AnnotationName { + fn from(s: &'static str) -> Self { Self(RString::from(s)) } +} + +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD, tags = order, dumb = ContentRef::Schema(strict_dumb!()))] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] +pub enum ContentRef { + Schema(SchemaId), + Genesis(ContractId), + Iface(IfaceId), + IfaceImpl(ImplId), +} + +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD, tags = repr, into_u8, try_from_u8)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] +#[repr(u8)] +pub enum SupplSub { + #[default] + Itself = 0, + Meta = 1, + Global, + Owned, + Valency, + Assignment, + Genesis, + Transition, + Extension, + Exception, +} + +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Default)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD, tags = custom)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] +pub enum SupplItem { + #[default] + #[strict_type(tag = 0)] + Default, + #[strict_type(tag = 1)] + TypeNo(u16), + #[strict_type(tag = 0x11)] + TypeName(TypeName), + #[strict_type(tag = 0x12)] + FieldName(FieldName), + #[strict_type(tag = 0x13)] + VariantName(VariantName), +} + +#[derive(Wrapper, WrapperMut, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default, From)] +#[wrapper(Deref)] +#[wrapper_mut(DerefMut)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] +pub struct SupplMap(TinyOrdMap); + +#[derive(Wrapper, WrapperMut, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default, From)] +#[wrapper(Deref)] +#[wrapper_mut(DerefMut)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] +pub struct Annotations(TinyOrdMap); + /// Contract supplement, providing non-consensus information about standard /// way of working with the contract data. Each contract can have only a single /// valid supplement; the supplement is attached to the contract via trusted @@ -100,23 +202,42 @@ impl_serde_baid58!(SupplId); derive(Serialize, Deserialize), serde(crate = "serde_crate", rename_all = "camelCase") )] -pub struct ContractSuppl { - pub contract_id: ContractId, - pub ticker: TickerSuppl, - /// Media kit is a URL string which provides JSON information on media files - /// and colors that should be used for UI, - pub media_kit: TinyString, - pub global_state: TinyOrdMap, - pub owned_state: TinyOrdMap, - /// TLV-encoded custom fields. - pub extensions: TinyOrdMap, -} - -impl StrictSerialize for ContractSuppl {} -impl StrictDeserialize for ContractSuppl {} - -impl ContractSuppl { +pub struct Supplement { + pub content_id: ContentRef, + pub timestamp: i64, + pub creator: Identity, + /// Strict-encoded custom fields. + pub annotations: TinyOrdMap, +} + +impl StrictSerialize for Supplement {} +impl StrictDeserialize for Supplement {} + +impl Supplement { pub fn suppl_id(&self) -> SupplId { self.commit_id() } + + pub fn get_default( + &self, + sub: SupplSub, + name: impl Into, + ) -> Option> { + let annotation = self + .annotations + .get(&sub)? + .get(&SupplItem::Default)? + .get(&name.into())?; + Some(T::from_strict_serialized(annotation.clone())) + } + + pub fn get( + &self, + sub: SupplSub, + item: SupplItem, + name: impl Into, + ) -> Option> { + let annotation = self.annotations.get(&sub)?.get(&item)?.get(&name.into())?; + Some(T::from_strict_serialized(annotation.clone())) + } } #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] @@ -136,18 +257,8 @@ pub enum TickerSuppl { Owned(AssignmentType, value::Path), } -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] -#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] -#[strict_type(lib = LIB_NAME_RGB_STD)] -#[cfg_attr( - feature = "serde", - derive(Serialize, Deserialize), - serde(crate = "serde_crate", rename_all = "camelCase") -)] -pub struct OwnedStateSuppl { - pub meaning: TinyString, - pub velocity: VelocityHint, -} +impl StrictSerialize for TickerSuppl {} +impl StrictDeserialize for TickerSuppl {} #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Display, Default)] #[derive(StrictType, StrictEncode, StrictDecode)] @@ -175,6 +286,9 @@ pub enum VelocityHint { HighFrequency = 255, } +impl StrictSerialize for VelocityHint {} +impl StrictDeserialize for VelocityHint {} + impl VelocityHint { pub fn with_value(value: &u8) -> Self { match *value { diff --git a/src/containers/util.rs b/src/containers/util.rs index 742f1e93..954537cd 100644 --- a/src/containers/util.rs +++ b/src/containers/util.rs @@ -26,8 +26,8 @@ use commit_verify::StrictHash; use rgb::{BundleId, ContractId, Identity, SchemaId, XChain}; use strict_encoding::StrictDumb; -use super::TerminalSeal; -use crate::interface::{IfaceId, ImplId, SupplId}; +use super::{SupplId, TerminalSeal}; +use crate::interface::{IfaceId, ImplId}; use crate::{SecretSeal, LIB_NAME_RGB_STD}; #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug)] @@ -87,7 +87,7 @@ pub enum ContainerVer { V2 = 2, } -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[derive(StrictType, strict_encoding::StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD, tags = order, dumb = ContentId::Schema(strict_dumb!()))] #[cfg_attr( diff --git a/src/interface/mod.rs b/src/interface/mod.rs index 0d4ba751..0d8210ed 100644 --- a/src/interface/mod.rs +++ b/src/interface/mod.rs @@ -27,7 +27,6 @@ mod iface; mod iimpl; mod contract; mod builder; -mod suppl; mod filters; pub(crate) mod resolver; mod contractum; @@ -46,7 +45,6 @@ pub use iface::{ }; pub use iimpl::{IfaceImpl, ImplId, NamedField, NamedType, NamedVariant, SchemaTypeIndex}; pub use inheritance::{CheckInheritance, ExtensionError, InheritanceFailure}; -pub use suppl::{ContractSuppl, OwnedStateSuppl, SupplId, TickerSuppl, VelocityHint}; #[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, Default)] #[derive(StrictType, StrictEncode, StrictDecode)] diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index 23047144..6ac55f0d 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -43,8 +43,10 @@ use super::{ StashProviderError, StashReadProvider, StashWriteProvider, StateProvider, StateReadProvider, StateUpdateError, StateWriteProvider, }; -use crate::containers::{AnchorSet, ContentId, ContentSigs, SealWitness, SigBlob}; -use crate::interface::{ContractSuppl, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef}; +use crate::containers::{ + AnchorSet, ContentId, ContentRef, ContentSigs, SealWitness, SigBlob, Supplement, +}; +use crate::interface::{Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef}; use crate::resolvers::ResolveHeight; use crate::LIB_NAME_RGB_STD; @@ -61,7 +63,7 @@ pub struct MemStash { schemata: TinyOrdMap, ifaces: TinyOrdMap, geneses: TinyOrdMap, - suppl: TinyOrdMap>, + suppl: TinyOrdMap>, bundles: LargeOrdMap, extensions: LargeOrdMap, witnesses: LargeOrdMap, @@ -150,13 +152,13 @@ impl StashReadProvider for MemStash { .ok_or_else(|| StashInconsistency::SchemaAbsent(schema_id).into()) } - fn contract_supplements( + fn supplements( &self, - contract_id: ContractId, - ) -> Result, Self::Error> { + content_ref: ContentRef, + ) -> Result, Self::Error> { Ok(self .suppl - .get(&contract_id) + .get(&content_ref) .cloned() .unwrap_or_default() .into_iter()) @@ -285,11 +287,10 @@ impl StashWriteProvider for MemStash { Ok(!present) } - fn add_suppl(&mut self, suppl: ContractSuppl) -> Result<(), confinement::Error> { - match self.suppl.get_mut(&suppl.contract_id) { + fn add_suppl(&mut self, suppl: Supplement) -> Result<(), confinement::Error> { + match self.suppl.get_mut(&suppl.content_id) { None => { - self.suppl - .insert(suppl.contract_id, confined_bset![suppl])?; + self.suppl.insert(suppl.content_id, confined_bset![suppl])?; } Some(suppls) => suppls.push(suppl)?, } diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index bcd6da24..f2d160c8 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -37,10 +37,11 @@ use strict_encoding::{FieldName, TypeName}; use strict_types::typesys::UnknownType; use strict_types::TypeSystem; -use crate::containers::{BundledWitness, Consignment, ContentId, Kit, SealWitness, SigBlob}; +use crate::containers::{ + BundledWitness, Consignment, ContentId, ContentRef, Kit, SealWitness, SigBlob, Supplement, +}; use crate::interface::{ - ContractBuilder, ContractSuppl, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef, - TransitionBuilder, + ContractBuilder, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef, TransitionBuilder, }; use crate::persistence::ContractIfaceError; use crate::{MergeReveal, MergeRevealError, SecretSeal, LIB_NAME_RGB_STD}; @@ -243,12 +244,12 @@ impl Stash

{ Ok(self.provider.witness(witness_id)?) } - pub(super) fn contract_supplements( + pub(super) fn supplements( &self, - contract_id: ContractId, - ) -> Result + '_, StashError

> { + content_ref: ContentRef, + ) -> Result + '_, StashError

> { self.provider - .contract_supplements(contract_id) + .supplements(content_ref) .map_err(StashError::ReadProvider) } @@ -605,10 +606,10 @@ pub trait StashReadProvider { let genesis = self.genesis(contract_id)?; self.schema(genesis.schema_id) } - fn contract_supplements( + fn supplements( &self, - contract_id: ContractId, - ) -> Result, Self::Error>; + content_ref: ContentRef, + ) -> Result, Self::Error>; fn witness_ids(&self) -> Result, Self::Error>; fn bundle_ids(&self) -> Result, Self::Error>; @@ -640,7 +641,7 @@ pub trait StashWriteProvider { fn replace_lib(&mut self, lib: Lib) -> Result; fn consume_types(&mut self, types: TypeSystem) -> Result<(), Self::Error>; - fn add_suppl(&mut self, suppl: ContractSuppl) -> Result<(), Self::Error>; + fn add_suppl(&mut self, suppl: Supplement) -> Result<(), Self::Error>; fn import_sigs(&mut self, content_id: ContentId, sigs: I) -> Result<(), Self::Error> where I: IntoIterator, diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 2ff22ca8..92b7f1b1 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -27,6 +27,7 @@ use std::error::Error; use std::fmt::Debug; use amplify::confinement::{Confined, U24}; +use amplify::Wrapper; use bp::seals::txout::CloseMethod; use bp::Vout; use chrono::Utc; @@ -47,14 +48,15 @@ use super::{ }; use crate::containers::{ AnchorSet, AnchoredBundles, Batch, BuilderSeal, BundledWitness, Consignment, ContainerVer, - Contract, Fascia, Kit, PubWitness, SealWitness, Terminal, TerminalSeal, Transfer, - TransitionInfo, TransitionInfoError, ValidConsignment, ValidContract, ValidKit, ValidTransfer, + ContentRef, Contract, Fascia, Kit, PubWitness, SealWitness, SupplItem, SupplSub, Terminal, + TerminalSeal, Transfer, TransitionInfo, TransitionInfoError, ValidConsignment, ValidContract, + ValidKit, ValidTransfer, VelocityHint, SUPPL_ANNOT_VELOCITY, }; use crate::info::{ContractInfo, IfaceInfo, SchemaInfo}; use crate::interface::resolver::DumbResolver; use crate::interface::{ BuilderError, ContractBuilder, ContractIface, Iface, IfaceClass, IfaceId, IfaceRef, - TransitionBuilder, VelocityHint, + TransitionBuilder, }; use crate::resolvers::ResolveHeight; use crate::{MergeRevealError, RevealError}; @@ -813,11 +815,20 @@ impl Stock { |id: ContractId, assignment_type: AssignmentType| -> Result, StockError> { - let mut suppl = self.stash.contract_supplements(id)?; + let mut suppl = self.stash.supplements(ContentRef::Genesis(id))?; let velocity = suppl .next() - .and_then(|mut s| s.owned_state.remove(&assignment_type).ok().flatten()) - .map(|s| s.velocity) + .and_then(|suppl| { + suppl + .get( + SupplSub::Assignment, + SupplItem::TypeNo(assignment_type.to_inner()), + SUPPL_ANNOT_VELOCITY, + ) + .transpose() + .ok() + .flatten() + }) .unwrap_or_default(); let vout = allocator(id, assignment_type, velocity) .ok_or(ComposeError::NoBlankOrChange(velocity, assignment_type))?; diff --git a/src/stl/stl.rs b/src/stl/stl.rs index 8e06596b..4c53411c 100644 --- a/src/stl/stl.rs +++ b/src/stl/stl.rs @@ -43,7 +43,8 @@ pub const LIB_ID_RGB_CONTRACT: &str = "8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage"; /// Strict types id for the library representing of RGB StdLib data types. -pub const LIB_ID_RGB_STD: &str = "HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda"; +pub const LIB_ID_RGB_STD: &str = + "DSKog3fAanZsJtyb6T6EhC7YsGzSVpMvbwzAaMR2Fw2x#round-gallery-granite"; fn _rgb_std_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_RGB_STD), tiny_bset! { diff --git a/stl/RGBStd@0.11.0.sta b/stl/RGBStd@0.11.0.sta index d8193d93..9851ef12 100644 --- a/stl/RGBStd@0.11.0.sta +++ b/stl/RGBStd@0.11.0.sta @@ -1,5 +1,5 @@ -----BEGIN STRICT TYPE LIB----- -Id: HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda +Id: DSKog3fAanZsJtyb6T6EhC7YsGzSVpMvbwzAaMR2Fw2x#round-gallery-granite Name: RGBStd Dependencies: BPCore#8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2, @@ -9,7 +9,7 @@ Dependencies: RGB#FdtTxVxBBVXJaayVZoM1dhSHqszVHMenivcPd2v4PP1H, CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg, Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 -Checksum-SHA256: 2fe317aeabf5966fc2d5d84a3a31732387b3875d40ea2000b6e80f4adf68912a +Checksum-SHA256: e9e83938b5835515cc11a02c05cd0383914f5980fbe58922ca984a2caabcea43 22w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Rd!+}uR&I%H;Zhc4rMebB1F3n9N~i1&*psIYbe~D+lDi5bqd6#2RQ5b30000000000{{R30000003T1e7 -Wo~n6Z*Fq{3Id3h$9O-6TWVuFo^|2*NvWKMV^#cK{)RQ%ur9&Ffl%7c3KFtzeMkX -EA+j6jSvOzzj`=$tQ7TTPTlV%#s+0lZjgc-S?5?)1%ait7cFU*+SlBQ}qUMZzj0G -Zo$^Ym80000000030000000000GWMyVyb!>D`aAk5~bZKvH00aU61a5C`WdHyG0R -(ezZDjxj0Ro7Y$9O-6TWVuFo^|2*NvWKMV^#cK{)RQ%ur9&Ffl%7c3KFtzeMkXEA -+j6jSvOzzj`=$tQ7TTPTlV%#s+0z0a&m8Sa{vkgh?d8AKZaXsV>_O8;rU6aoQ7jn -{9gWsHQTT*!NY-27G-TVOoF>TP~iq@EpxIAJkW|bxf0cjZ_S(-RDIXZ00;m90000 -000000{{R30000000000000000{{R300000031nqxmXt^Q! -_(7)eI|9J+~PG;1sZRb{yDsxmXt^Q!_(7)eI|9J+~P -G;1sZRb{yDsp#+${pKVqYC33O>~Wpi|4ZEyepNC<6ZbYW -y+bYTDq0fk4AAY-IrL)X3sn8uEIAb96<{u8^WSc;WdI2Q;T3Y}t2FHbrZuYW9;a;o9C2r%wJn-iV^)-T_{8X?0 -000000000{{R30000003t@9}X=iS2Wo~qH00{xII=UJ=+5Tf#jsPjO5fl!wu-VSA -F~Wyx2n?=z<1McM00000000300000000009c42H~ZewX>a{vhev`KaAjiO5i5Ikl -N$a^c0-scez0NCUI*NN=(oU+NC0000000000{{R30000003v_Z}ZgXjLX>V?G00{ -xa&49>A_ZDDj_00{!wcDJr0>xmXt^Q!_(7)eI|9J+~PG;1sZRb{yDs>|7OfXMBBA%xJ00000000300000000006X=!b -6Y;yn!0cqSh!!8bfhCA-X7O#&ebTs=d29O{jc5u?k_?d+0bN~PV000000RI30000 -0001I<A!jhb7OL8aCCD32?C3MMhXlB -{7p~#IUnK7*iRD1_SX>8*VRb+m26o+wg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;|Ee6T7Eb&yx3o;Ob2~ +0000000000{{R30000003ukO^Vqt7kbYXO500{x%6>{mTH0=VWHLC6&r)>Wmac7~ +mEt*+lR+M@8#OS2}0000000030000000000BVRLh7XKrm}Zgg`12?4S?x*9v#{$p +5<04cQ*6b`Yl+0L*r!iQ=I46b_PEw2Co000000093000000000SgVQgh?V`*h`00 +{xKNp8vdNtQ0000000030000000000Bb +aG*Cb7^#GZ*Fq{2?4~=3Ji-2;gvtx?3QfBGq@e|{PlF@A262BpeU*eci8{{00000 +0093000000000VQcywiMb7^mGa{vheAa%2}=M-l44yS{JJ-^8e&ar1$OmGuL_c;W +NTrq1$0000000000{{R300000024!+`Z*p@02>~68ZJm$*bQT#MS^;)G^h3Q|vEv +YuXxlaOpD(X65X=Ao000000093000000000SOWp-t3Z*XOD0@-%At|RM-7FP4C0! +$c5M*keTiDNWtECN+!xbCX5C=aShmo?tm0ybDbOs0qc4cyNX>V=;l-_zLn%tmAe68Jly{Qj?Kss0n +y)C8xzFm#1PkyMk25DwtV`Xyy2>~KR__itlH(7>D+9a{vheY1}!(E)IT%JMP66ua78nH2W6nS|(c0 +000000000{{R30000003v+dFaBO95Wo~qH00{wr<$R}`Uc#(_W3yv_L|MsGz(M!3 +4#<3XKll8|{2`VA00000000300000000005ba`-Pa{`E#$9O-6TWVuFo^|2*NvWK +MV^#cK{)RQ%ur9&Ffl#=9J7pXh@)WHXPsxwRa_q#eC5d?QckL;=cxTY*zj_CAV{& +P5baMa+0*ik}3Je7NO;7qcAK}c{PZGxV*AUa!)kyl4Y*|3I0$eZ446YJqYXnIA$d +KCT_8)Q1kl&k5q%<<^Zdvel#Q*>R000000RR6000000019(yXKrD1b#i5M015%() +D=(>(T2L(qY0=?NxmXt^Q!_(7)eI|9J+~PG;1 +sZRb{yDsg6`?#s5rWnKhSeO?L~x^!;Y#eFP|P}0Z%Ez*ZeeX@0*IE!ct +3_)YGXT|b>aC*shoymRs3H5hBe!;F2TcrP}3(cK(6LD#rwNz2*s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T TYPE LIB----- diff --git a/stl/RGBStd@0.11.0.stl b/stl/RGBStd@0.11.0.stl index 6b8cfe0761baf9be82c8a2a957ed070c942dbf77..cc126f340d50bb1d5f1cb49bde01b609b124b9e7 100644 GIT binary patch delta 783 zcmaDih4I2v#tr6TjQo==#3oLDCl zCOmz+ZBPUMtlyoJ%`{avuadT5QD}HtvwU{kp*4-ko0IEZB2NY%aQwcR??g?7{r5j7 z{wPkHJi~I;<_!u(%tWc2yg}ji=HsfijJ#aV`FSO&c_l%qX)G+0pQ(PH%%a}3Ia*Uz zfS^H}XITDY-~7%|kx`E`xU`@k$Fn3gmxYyqJtZ|Qu{5Uy=xIi_lFEWqzkCLuZyA^b zIl#Qc$@BEpCZ9J@;1uFa%S_El@dJxY(ox_R<}OPt%1q2Ffe1~W>!4TT>#3<-756h^igYq#IBIHbGt>+-gj?H+aKb!%5#53<-l zec4LxjiK60MLA0{b5n~;5_1a}7(CdMi&7Iy@{1;aR8^c@ZK@E@od{2U#lQp=@l7!H zO(tTQTK delta 837 zcmcaGmGRva#tr6Tj6#zw#3rgrAKX8qYE|0%owdu86r7cBt0eP%vX+`9xPy11~0lzMHc3cYs4^6*B%s5XX$ECGon8JiWv z{TVfmES%7G{+Ge_Yq58-*m;jHzrV=SM`4asM)#Meb>6>M&-m*pT`@^k;ga;FQ zZfas)W?nkTPw0;1C`--BPtGi-Vp4HxUJ1}-Mz-{v{G`Mj2396;u*KUbOja~d z)FPC!m{`F<1=9u$ZICtvLfSUJay4WL;0c5Jz#}uSgqe-IG_SZIH90daGc|>QtvEF& zB|n#+Befv2I6oybS)RQpHN7+^vB;hytthpy6zJ}H-i*xj3^xcbx$^&HX|JsS;IcL0 diff --git a/stl/RGBStd@0.11.0.sty b/stl/RGBStd@0.11.0.sty index 90f6ef5e..c1d6bcb0 100644 --- a/stl/RGBStd@0.11.0.sty +++ b/stl/RGBStd@0.11.0.sty @@ -1,5 +1,5 @@ {- - Id: HjK8eSCT2mMZWQmCS5BBWgjaq8BQp5og2yP6EXVnWqFH#alibi-gemini-brenda + Id: DSKog3fAanZsJtyb6T6EhC7YsGzSVpMvbwzAaMR2Fw2x#round-gallery-granite Name: RGBStd Version: 0.11.0 Description: RGB standard library @@ -29,10 +29,8 @@ import StrictTypes#ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79 use VariantInfoSemId#garlic-weekend-nirvana use UnionVariantsSemId#soviet-yoyo-nikita use VariantName#fiesta-center-yoga - use Step#isabel-point-moment use Primitive#hobby-cable-puzzle use EnumVariants#fast-content-copy - use Path#secret-romeo-mustang use TySemId#congo-satire-gossip use UnnamedFieldsSemId#hippie-world-sandra use SemId#cargo-plasma-catalog @@ -41,7 +39,6 @@ import StrictTypes#ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79 use FieldSemId#beast-traffic-enrico use TypeSystem#carmen-nova-quasi use Variant#colony-polo-senator - use KeyStep#frozen-margo-cannon use NamedFieldsSemId#clever-prize-sinatra use FieldName#toyota-plasma-austria @@ -169,6 +166,12 @@ data AnchoredBundles : tapret#1 (BPCore.AnchorMerkleProofTapretProof, RGB.Tran , opretAnchor BPCore.AnchorMerkleProofOpretProof , opretBundle RGB.TransitionBundle) +@mnemonic(pandora-film-society) +data AnnotationName : [Std.AlphaCaps ^ ..0xff] + +@mnemonic(algebra-bikini-tunnel) +data Annotations : {AnnotationName -> ^ ..0xff [Byte]} + @mnemonic(galileo-stuart-night) data AssignIface : ownedState OwnedIface , public Std.Bool @@ -178,7 +181,7 @@ data AssignIface : ownedState OwnedIface @mnemonic(tommy-picasso-spell) data BundledWitness : pubWitness RGB.XChainPubWitness, anchoredBundles AnchoredBundles -@mnemonic(ninja-reward-wizard) +@mnemonic(bonus-opinion-mary) data Consignmentfalse : version ContainerVer , transfer Std.Bool , terminals {RGB.BundleId -> Terminal} @@ -187,13 +190,13 @@ data Consignmentfalse : version ContainerVer , bundles {BundledWitness ^ ..0xffffffff} , schema RGB.Schema , ifaces {Iface -> ^ ..0xff IfaceImpl} - , supplements {ContractSuppl ^ ..0xff} + , supplements {Supplement ^ ..0xff} , types StrictTypes.TypeSystem , scripts {AluVM.Lib ^ ..0x400} , attachments {RGB.AttachId -> [Byte ^ ..0xffffff]} , signatures {ContentId -> ^ ..0xff ContentSigs} -@mnemonic(cairo-poem-script) +@mnemonic(declare-austin-enjoy) data Consignmenttrue : version ContainerVer , transfer Std.Bool , terminals {RGB.BundleId -> Terminal} @@ -202,7 +205,7 @@ data Consignmenttrue : version ContainerVer , bundles {BundledWitness ^ ..0xffffffff} , schema RGB.Schema , ifaces {Iface -> ^ ..0xff IfaceImpl} - , supplements {ContractSuppl ^ ..0xff} + , supplements {Supplement ^ ..0xff} , types StrictTypes.TypeSystem , scripts {AluVM.Lib ^ ..0x400} , attachments {RGB.AttachId -> [Byte ^ ..0xffffff]} @@ -219,17 +222,15 @@ data ContentId : schema RGB.SchemaId | ifaceImpl ImplId | suppl SupplId +@mnemonic(fish-voodoo-teacher) +data ContentRef : schema RGB.SchemaId + | genesis RGB.ContractId + | iface IfaceId + | ifaceImpl ImplId + @mnemonic(adios-import-collect) data ContentSigs : {RGB.Identity -> ^ 1..0xa SigBlob} -@mnemonic(slang-mars-belgium) -data ContractSuppl : contractId RGB.ContractId - , ticker TickerSuppl - , mediaKit [Unicode ^ ..0xff] - , globalState {RGB.AssignmentType -> ^ ..0xff OwnedStateSuppl} - , ownedState {RGB.AssignmentType -> ^ ..0xff OwnedStateSuppl} - , extensions {U16 -> ^ ..0xff [Byte]} - @mnemonic(austria-rudolf-command) data ExtensionIface : modifier Modifier , optional Std.Bool @@ -290,12 +291,12 @@ data IfaceImpl : version VerNo @mnemonic(monday-igloo-jupiter) data ImplId : [Byte ^ 32] -@mnemonic(domino-pulse-oxford) +@mnemonic(street-sample-collect) data Kit : version ContainerVer , ifaces {Iface ^ ..0xff} , schemata {RGB.Schema ^ ..0xff} , iimpls {IfaceImpl ^ ..0xff} - , supplements {ContractSuppl ^ ..0xff} + , supplements {Supplement ^ ..0xff} , types StrictTypes.TypeSystem , scripts {AluVM.Lib} , signatures {ContentId -> ^ ..0xff ContentSigs} @@ -347,9 +348,6 @@ data OwnedIface : any () | anyAttach () | data StrictTypes.SemId -@mnemonic(office-hexagon-exile) -data OwnedStateSuppl : meaning [Unicode ^ ..0xff], velocity VelocityHint - @mnemonic(pixel-bravo-tactic) data PubWitness : txid Bitcoin.Txid , tx Bitcoin.Tx? @@ -361,17 +359,34 @@ data SigBlob : [Byte ^ 1..0x1000] @mnemonic(partner-austin-dinner) data SupplId : [Byte ^ 32] +@mnemonic(ivan-adios-aspirin) +data SupplItem : default () + | typeNo U16 + | typeName#17 StrictTypes.TypeName + | fieldName StrictTypes.FieldName + | variantName StrictTypes.VariantName + +@mnemonic(martin-belgium-between) +data SupplMap : {SupplItem -> ^ ..0xff Annotations} + +@mnemonic(lazarus-shallow-amigo) +data SupplSub : itself | meta | global | owned + | valency | assignment | genesis | transition + | extension | exception + + +@mnemonic(depend-lola-money) +data Supplement : contentId ContentRef + , timestamp I64 + , creator RGB.Identity + , annotations {SupplSub -> ^ ..0xff SupplMap} + @mnemonic(permit-crimson-parole) data Terminal : seals {RGB.XChainTerminalSeal} @mnemonic(battery-cecilia-politic) data TerminalSeal : VoutSeal? -@mnemonic(mailbox-tempo-billy) -data TickerSuppl : absent () - | global (RGB.GlobalStateType, StrictTypes.Path) - | owned (RGB.AssignmentType, StrictTypes.Path) - @mnemonic(radius-weather-analyze) data TransitionIface : modifier Modifier , optional Std.Bool @@ -386,11 +401,6 @@ data TransitionIface : modifier Modifier @mnemonic(input-tripod-oscar) data ValencyIface : required Std.Bool -@mnemonic(textile-politic-harris) -data VelocityHint : unspecified | seldom#15 | episodic#31 | regular#63 - | frequent#127 | highFrequency#255 - - @mnemonic(sabine-harlem-absorb) data VerNo : v0 | v1 diff --git a/stl/Transfer.vesper b/stl/Transfer.vesper index 5133d972..0abcf348 100644 --- a/stl/Transfer.vesper +++ b/stl/Transfer.vesper @@ -1252,28 +1252,29 @@ Consignmenttrue rec reserved bytes len=4 aka=ReservedBytes4 developer ascii len=0..4096 aka=Identity charset=AsciiPrintable supplements set len=0..MAX8 - ContractSuppl rec - contractId bytes len=32 aka=ContractId - ticker union TickerSuppl - absent is Unit tag=0 - global tuple tag=1 - _ is U16 aka=GlobalStateType - owned tuple tag=2 - _ is U16 aka=AssignmentType - mediaKit str len=0..MAX8 - globalState map len=0..MAX8 - key is U16 aka=AssignmentType - value rec OwnedStateSuppl - meaning str len=0..MAX8 - velocity enum VelocityHint unspecified=0 seldom=15 episodic=31 regular=63 frequent=127 highFrequency=255 - ownedState map len=0..MAX8 - key is U16 aka=AssignmentType - value rec OwnedStateSuppl - meaning str len=0..MAX8 - velocity enum VelocityHint unspecified=0 seldom=15 episodic=31 regular=63 frequent=127 highFrequency=255 - extensions map len=0..MAX8 - key is U16 - value bytes len=0..MAX16 + Supplement rec + contentId union ContentRef + schema bytes len=32 wrapped aka=SchemaId tag=0 + genesis bytes len=32 wrapped aka=ContractId tag=1 + iface bytes len=32 wrapped aka=IfaceId tag=2 + ifaceImpl bytes len=32 wrapped aka=ImplId tag=3 + timestamp is I64 + creator ascii len=0..4096 aka=Identity charset=AsciiPrintable + annotations map len=0..MAX8 + key enum { + SupplSub itself=0 meta=1 global=2 owned=3 valency=4 assignment=5 genesis=6 transition=7 + extension=8 exception=9 + } + value map len=0..MAX8 aka=SupplMap + key union SupplItem + default is Unit tag=0 + typeNo is U16 wrapped tag=1 + typeName ascii len=1..100 wrapped aka=TypeName charset=AlphaCapsLodash tag=2 + fieldName ascii len=1..100 wrapped aka=FieldName charset=AlphaSmallLodash tag=3 + variantName ascii len=1..100 wrapped aka=VariantName charset=AlphaSmallLodash tag=4 + value map len=0..MAX8 aka=Annotations + key ascii len=0..MAX8 aka=AnnotationName charset=AlphaCaps + value bytes len=0..MAX16 types map len=0..MAX24 aka=TypeSystem key bytes len=32 aka=SemId value union TySemId From 0fe3b2195212f57c423cc5cd3c07c0fe642eecbc Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 23 Apr 2024 12:39:35 +0200 Subject: [PATCH 36/52] containers: draft signature validation --- src/containers/consignment.rs | 7 +++++-- src/containers/kit.rs | 7 ++++++- src/containers/mod.rs | 5 ++++- src/containers/util.rs | 26 ++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index ca048ab0..870efecf 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -349,9 +349,11 @@ impl Consignment { } } - pub fn validate( + pub fn validate( self, - resolver: &mut R, + resolver: &mut impl ResolveWitness, + // TODO: Add sig validator + //_: &impl SigValidator, testnet: bool, ) -> Result, (validation::Status, Consignment)> { let index = IndexedConsignment::new(&self); @@ -365,6 +367,7 @@ impl Consignment { // TODO: check that interface ids match implementations // TODO: check bundle ids listed in terminals are present in the consignment // TODO: check attach ids from data containers are present in operations + // TODO: validate sigs and remove untrusted if validity != Validity::Valid { Err((status, self)) diff --git a/src/containers/kit.rs b/src/containers/kit.rs index 45f80aeb..ee27da53 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -184,12 +184,17 @@ impl Kit { #[inline] pub fn kit_id(&self) -> KitId { self.commit_id() } - pub fn validate(self) -> Result { + pub fn validate( + self, + // TODO: Add sig validator + //_: &impl SigValidator, + ) -> Result { let status = validation::Status::new(); // TODO: // - Verify integrity for each interface // - Verify implementations against interfaces // - Check schema integrity + // - Validate content sigs and remove untrusted ones Ok(ValidKit { validation_status: status, kit: self, diff --git a/src/containers/mod.rs b/src/containers/mod.rs index 55a2c939..e8888dd8 100644 --- a/src/containers/mod.rs +++ b/src/containers/mod.rs @@ -57,7 +57,10 @@ pub use suppl::{ AnnotationName, Annotations, ContentRef, SupplId, SupplItem, SupplMap, SupplSub, Supplement, TickerSuppl, VelocityHint, SUPPL_ANNOT_VELOCITY, }; -pub use util::{ContainerVer, ContentId, ContentSigs, SigBlob, Terminal, TerminalDisclose}; +pub use util::{ + ContainerVer, ContentId, ContentSigs, DumbValidator, SigBlob, SigValidator, SigValidity, + Terminal, TerminalDisclose, +}; pub const ASCII_ARMOR_NAME: &str = "Name"; pub const ASCII_ARMOR_IFACE: &str = "Interface"; diff --git a/src/containers/util.rs b/src/containers/util.rs index 954537cd..22136bd7 100644 --- a/src/containers/util.rs +++ b/src/containers/util.rs @@ -87,6 +87,32 @@ pub enum ContainerVer { V2 = 2, } +pub trait SigValidator { + fn validate_sig(&self, identity: &Identity, sig: SigBlob) -> SigValidity; +} + +pub struct DumbValidator; +impl SigValidator for DumbValidator { + fn validate_sig(&self, _: &Identity, _: SigBlob) -> SigValidity { SigValidity::Untrusted } +} + +#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display)] +#[display(lowercase)] +#[repr(u8)] +pub enum SigValidity { + Invalid = 0, + Unknown = 0x10, + Untrusted = 0x40, + Trusted = 0x80, + Ultimate = 0xC0, +} + +impl SigValidity { + pub fn should_accept(self) -> bool { self >= Self::Unknown } + pub fn should_use(self) -> bool { self >= Self::Trusted } + pub fn must_use(self) -> bool { self >= Self::Ultimate } +} + #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[derive(StrictType, strict_encoding::StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD, tags = order, dumb = ContentId::Schema(strict_dumb!()))] From 638095281673e3046e014cfd1ca2ed32d520949f Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 14:46:55 +0200 Subject: [PATCH 37/52] chore: upgrade from Baid58 to Baid64 identifiers --- Cargo.lock | 81 ++- Cargo.toml | 13 +- invoice/Cargo.toml | 3 +- invoice/src/parse.rs | 130 ++--- src/containers/consignment.rs | 45 +- src/containers/file.rs | 2 +- src/containers/kit.rs | 47 +- src/containers/suppl.rs | 51 +- src/interface/iface.rs | 45 +- src/interface/iimpl.rs | 46 +- src/stl/error.rs | 4 +- src/stl/stl.rs | 4 +- stl/RGBContract@0.11.0.sta | 94 ++-- stl/RGBContract@0.11.0.stl | Bin 2136 -> 2623 bytes stl/RGBContract@0.11.0.sty | 82 +-- stl/RGBStd@0.11.0.sta | 662 +++++++++++------------ stl/RGBStd@0.11.0.stl | Bin 19152 -> 19357 bytes stl/RGBStd@0.11.0.sty | 386 +++++++------- stl/Transfer.vesper | 964 ++++++++++++++++++++++++++-------- 19 files changed, 1576 insertions(+), 1083 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d746b97c..42c5d792 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,11 +5,11 @@ version = 3 [[package]] name = "aluvm" version = "0.11.0-beta.5" -source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#75782d845e29ba9afcb9dab967513932f73ccf49" +source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#d8efe3007a5680a99cf86159b8dcc81cf1ed7278" dependencies = [ "amplify", - "ascii-armor 0.2.0", - "baid58", + "ascii-armor", + "baid64", "blake3", "getrandom", "half", @@ -121,25 +121,11 @@ dependencies = [ [[package]] name = "ascii-armor" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743d90b41a39d6e3920eef64a70f6411097cbb47141606a45b2a96533ec7111c" -dependencies = [ - "amplify", - "baid58", - "base85", - "sha2", - "strict_encoding", -] - -[[package]] -name = "ascii-armor" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44ce552de9efa4fdee1a7920f3587e17689bf4a4ba149a7892f91820673c1e29" +version = "0.4.0" +source = "git+https://github.com/UBIDECO/ascii-armor#38dc9767f36db3957ac3dade280a04d9a72b6be4" dependencies = [ "amplify", - "baid58", + "baid64", "base85", "sha2", "strict_encoding", @@ -152,22 +138,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] -name = "baid58" -version = "0.4.4" +name = "baid64" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0585242d87ed976e05db6ae86a0f771f140104a4b6c91b4c3e43b9b2357486" +checksum = "7b8b80494235048845f856b267a4a1d97df59fd14ed7ca92652f834ce93becc6" dependencies = [ - "base58", - "blake3", + "amplify", + "base64", "mnemonic", "sha2", ] [[package]] -name = "base58" -version = "0.2.0" +name = "base64" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" [[package]] name = "base85" @@ -243,7 +229,7 @@ dependencies = [ [[package]] name = "bp-consensus" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#970147b7cfa3dd3013ceec5bc6eacaea7c0d7bb9" dependencies = [ "amplify", "chrono", @@ -257,7 +243,7 @@ dependencies = [ [[package]] name = "bp-core" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#970147b7cfa3dd3013ceec5bc6eacaea7c0d7bb9" dependencies = [ "amplify", "bp-consensus", @@ -275,7 +261,7 @@ dependencies = [ [[package]] name = "bp-dbc" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#970147b7cfa3dd3013ceec5bc6eacaea7c0d7bb9" dependencies = [ "amplify", "base85", @@ -301,10 +287,10 @@ dependencies = [ [[package]] name = "bp-seals" version = "0.11.0-beta.5" -source = "git+https://github.com/BP-WG/bp-core?branch=develop#91e195d45a24c3e5623f0cbe0738ea2fca315bae" +source = "git+https://github.com/BP-WG/bp-core?branch=develop#970147b7cfa3dd3013ceec5bc6eacaea7c0d7bb9" dependencies = [ "amplify", - "baid58", + "baid64", "bp-consensus", "bp-dbc", "commit_verify", @@ -350,7 +336,7 @@ dependencies = [ [[package]] name = "commit_encoding_derive" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=develop#5e50b251aa5a5c4d83c47dad609a15ef3d50800f" dependencies = [ "amplify", "amplify_syn", @@ -362,7 +348,7 @@ dependencies = [ [[package]] name = "commit_verify" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=develop#5e50b251aa5a5c4d83c47dad609a15ef3d50800f" dependencies = [ "amplify", "commit_encoding_derive", @@ -659,12 +645,12 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#9b34f1bd14c7b82b050c6932966b8956d569ce02" +source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#afc19b96340336ef82266b0372a1365de72b104d" dependencies = [ "aluvm", "amplify", - "ascii-armor 0.2.0", - "baid58", + "ascii-armor", + "baid64", "bp-core", "chrono", "commit_verify", @@ -683,12 +669,13 @@ name = "rgb-invoice" version = "0.11.0-beta.5" dependencies = [ "amplify", - "baid58", + "baid64", "bp-core", "bp-invoice", "fluent-uri", "indexmap", "percent-encoding", + "rand", "rgb-core", "serde", "strict_encoding", @@ -701,8 +688,8 @@ version = "0.11.0-beta.5" dependencies = [ "aluvm", "amplify", - "ascii-armor 0.3.0", - "baid58", + "ascii-armor", + "baid64", "base85", "bp-core", "chrono", @@ -890,7 +877,7 @@ dependencies = [ [[package]] name = "single_use_seals" version = "0.11.0-beta.5" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=v0.11#f51e1e0d010b1531acc939d2443af552e8755bb7" +source = "git+https://github.com/LNP-BP/client_side_validation?branch=develop#5e50b251aa5a5c4d83c47dad609a15ef3d50800f" dependencies = [ "amplify_derive", ] @@ -898,7 +885,7 @@ dependencies = [ [[package]] name = "strict_encoding" version = "2.7.0-beta.3" -source = "git+https://github.com/strict-types/strict-encoding?branch=develop#03d4b8ff346e8582632388c4112585d5cf714a0a" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#7fbf31b2bc0f117cba5ae676e46e4ef3656616f5" dependencies = [ "amplify", "half", @@ -909,7 +896,7 @@ dependencies = [ [[package]] name = "strict_encoding_derive" version = "2.7.0-beta.3" -source = "git+https://github.com/strict-types/strict-encoding?branch=develop#03d4b8ff346e8582632388c4112585d5cf714a0a" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#7fbf31b2bc0f117cba5ae676e46e4ef3656616f5" dependencies = [ "amplify_syn", "heck", @@ -921,11 +908,11 @@ dependencies = [ [[package]] name = "strict_types" version = "2.7.0-beta.3" -source = "git+https://github.com/strict-types/strict-types?branch=develop#acc3a7508c49c34c3344e2dd4359e1ade08fae67" +source = "git+https://github.com/strict-types/strict-types?branch=develop#a2e860f36f24b477712551a6db349edcf08efb3e" dependencies = [ "amplify", - "ascii-armor 0.3.0", - "baid58", + "ascii-armor", + "baid64", "half", "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 025a5734..c2355a3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,8 @@ license = "Apache-2.0" [workspace.dependencies] amplify = "4.6.0" -ascii-armor = "0.3.0" -baid58 = "0.4.4" +ascii-armor = "0.4.0" +baid64 = "0.1.0" strict_encoding = "2.7.0-beta.3" strict_types = "2.7.0-beta.3" commit_verify = { version = "0.11.0-beta.5", features = ["stl"] } @@ -55,6 +55,7 @@ crate-type = ["cdylib", "rlib"] # We need this for WASM [dependencies] amplify = { workspace = true } ascii-armor = { workspace = true } +baid64 = { workspace = true } strict_encoding = { workspace = true } strict_types = { workspace = true } commit_verify = { workspace = true } @@ -62,7 +63,6 @@ bp-core = { workspace = true } rgb-core = { workspace = true } rgb-invoice = { version = "0.11.0-beta.5", path = "invoice" } aluvm = "0.11.0-beta.5" -baid58 = { workspace = true } base85 = "=2.0.0" chrono = "0.4.31" indexmap = { workspace = true } @@ -97,13 +97,14 @@ wasm-bindgen-test = "0.3" features = ["all"] [patch.crates-io] +ascii-armor = { git = "https://github.com/UBIDECO/ascii-armor" } strict_encoding = { git = "https://github.com/strict-types/strict-encoding", branch = "develop" } strict_types = { git = "https://github.com/strict-types/strict-types", branch = "develop" } -commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" } -single_use_seals = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" } +commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "develop" } +single_use_seals = { git = "https://github.com/LNP-BP/client_side_validation", branch = "develop" } bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } bp-dbc = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } bp-seals = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } bp-core = { git = "https://github.com/BP-WG/bp-core", branch = "develop" } -rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "develop" } aluvm = { git = "https://github.com/AluVM/rust-aluvm", branch = "develop" } +rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "develop" } diff --git a/invoice/Cargo.toml b/invoice/Cargo.toml index 181595f6..830ccce2 100644 --- a/invoice/Cargo.toml +++ b/invoice/Cargo.toml @@ -17,7 +17,7 @@ name = "invoice" [dependencies] amplify = { workspace = true } -baid58 = { workspace = true } +baid64 = { workspace = true } strict_encoding = { workspace = true } strict_types = { workspace = true } bp-core = { workspace = true } @@ -27,6 +27,7 @@ indexmap = { workspace = true } fluent-uri = "0.1.4" percent-encoding = "2.3.0" serde_crate = { workspace = true, optional = true } +rand = "0.8.5" [features] default = [] diff --git a/invoice/src/parse.rs b/invoice/src/parse.rs index 68c37cbb..dc7a5da8 100644 --- a/invoice/src/parse.rs +++ b/invoice/src/parse.rs @@ -61,7 +61,7 @@ pub enum TransportParseError { InvalidTransportHost(String), } -#[derive(Clone, PartialEq, Eq, Debug, Display, Error, From)] +#[derive(Debug, Display, Error, From)] #[display(doc_comments)] pub enum InvoiceParseError { #[from] @@ -107,7 +107,7 @@ pub enum InvoiceParseError { #[from] #[display(inner)] - Id(baid58::Baid58ParseError), + Id(baid64::Baid64ParseError), /// can't recognize beneficiary "{0}": it should be either a bitcoin address /// or a blinded UTXO seal. @@ -151,7 +151,7 @@ impl RgbInvoice { } impl Display for RgbTransport { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self { RgbTransport::JsonRpc { tls, host } => { let s = if *tls { "s" } else { "" }; @@ -266,8 +266,12 @@ impl Display for RgbInvoice { fn fmt(&self, f: &mut Formatter) -> fmt::Result { let amt = self.owned_state.to_string(); if let Some(contract) = self.contract { - Display::fmt(&contract, f)?; - f.write_str("/")?; + let id = if f.alternate() { + contract.to_string().replace('-', "") + } else { + contract.to_string() + }; + write!(f, "{id}/")?; } else { write!(f, "rgb:{OMITTED}/")?; } @@ -285,7 +289,12 @@ impl Display for RgbInvoice { if !amt.is_empty() { write!(f, "{amt}+")?; } - Display::fmt(&self.beneficiary, f)?; + let beneficiary = if f.alternate() { + self.beneficiary.to_string().replace('-', "") + } else { + self.beneficiary.to_string() + }; + f.write_str(&beneficiary)?; if self.has_params() { f.write_str("?")?; } @@ -433,45 +442,45 @@ mod test { #[test] fn parse() { // rgb20/rgb25 parameters - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); assert_eq!(format!("{invoice:#}"), invoice_str.replace('-', "")); // rgb21 parameters - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB21/1@\ - 1+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB21/1@1+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); assert_eq!(format!("{invoice:#}"), invoice_str.replace('-', "")); // no amount - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/bc:\ - utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/bc:utxob:\ + zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // no allocation - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB21/bc:\ - utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB21/bc:utxob:\ + zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // no contract ID let invoice_str = - "rgb:~/RGB20/bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + "rgb:~/RGB20/bc:utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // no contract ID nor iface - let invoice_str = "rgb:~/~/bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + let invoice_str = "rgb:~/~/bc:utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // contract ID provided but no iface - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/~/bc:utxob:\ - egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/~/bc:utxob:\ + zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::ContractIdNoIface))); @@ -479,57 +488,55 @@ mod test { let invalid_contract_id = "invalid"; let invoice_str = format!( "rgb:{invalid_contract_id}/RGB20/bc:utxob:\ - egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb" + zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F" ); let result = RgbInvoice::from_str(&invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidContractId(c)) if c == invalid_contract_id)); // with expiration - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ expiry=1682086371"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // bad expiration - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ - expiry=six"; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?expiry=six"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidExpiration(_)))); // with bad query parameter - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ - expiry"; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?expiry"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidQueryParam(_)))); // with an unknown query parameter - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ unknown=new"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // with two unknown query parameters - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ unknown=new&another=new"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // with expiration and an unknown query parameter - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ expiry=1682086371&unknown=new"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.to_string(), invoice_str); // with an unknown query parameter containing percent-encoded text - let invoice_base = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?"; + let invoice_base = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?"; let query_key_encoded = ":@-%20%23"; let query_key_decoded = ":@- #"; let query_val_encoded = "?/.%26%3D"; @@ -546,40 +553,39 @@ mod test { // no scheme let invoice_str = "2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/~/bc:utxob:\ - egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::Invalid))); // invalid scheme let invoice_str = "bad:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/~/bc:utxob:\ - egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb"; + zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidScheme(_)))); // empty transport endpoint specification - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ - endpoints="; + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?endpoints="; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidQueryParam(_)))); // invalid transport endpoint specification - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=bad"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidQueryParam(_)))); // invalid transport variant - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=rpca://host.example.com"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidQueryParam(_)))); // rgb-rpc variant - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=rpc://host.example.com"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.transports, vec![RgbTransport::JsonRpc { @@ -589,8 +595,8 @@ mod test { assert_eq!(invoice.to_string(), invoice_str); // rgb-rpc variant, host containing authentication, "-" characters and port - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=rpcs://user:pass@host-1.ex-ample.com:1234"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.transports, vec![RgbTransport::JsonRpc { @@ -600,8 +606,8 @@ mod test { assert_eq!(invoice.to_string(), invoice_str); // rgb-rpc variant, IPv6 host - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=rpcs://%5B2001:db8::1%5D:1234"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); assert_eq!(invoice.transports, vec![RgbTransport::JsonRpc { @@ -611,30 +617,30 @@ mod test { assert_eq!(invoice.to_string(), invoice_str); // rgb-rpc variant with missing host - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=rpc://"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidQueryParam(_)))); // rgb-rpc variant with invalid separator - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=rpc/host.example.com"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::InvalidQueryParam(_)))); // rgb-rpc variant with invalid transport host specification - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=rpc://ho]t"; let result = RgbInvoice::from_str(invoice_str); assert!(matches!(result, Err(InvoiceParseError::Uri(_)))); // rgb+http variant let invoice_str = "rgb:\ - 2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?endpoints=https://\ + 11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/\ + 100+bc:utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?endpoints=https://\ host.example.com"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); let transports = vec![RgbTransport::RestHttp { @@ -645,8 +651,8 @@ mod test { assert_eq!(invoice.to_string(), invoice_str); // rgb+ws variant - let invoice_str = "rgb:2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?\ + let invoice_str = "rgb:11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/100+bc:\ + utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?\ endpoints=wss://host.example.com"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); let transports = vec![RgbTransport::WebSockets { @@ -660,8 +666,8 @@ mod test { // multiple transports let invoice_str = "rgb:\ - 2WBcas9-yjzEvGufY-9GEgnyMj7-beMNMWA8r-sPHtV1nPU-TMsGMQX/RGB20/\ - 100+bc:utxob:egXsFnw-5Eud7WKYn-7DVQvcPbc-rR69YmgmG-veacwmUFo-uMFKFb?endpoints=rpcs://\ + 11Fa@$Dk-rUWXhy8-7H35qXm-pLGGLOo-txBWUgj-tbOaSbI/RGB20/\ + 100+bc:utxob:zlVS28Rb-amM5lih-ONXGACC-IUWD0Y$-0JXcnWZ-MQn8VEI-B39@F?endpoints=rpcs://\ host1.example.com,http://host2.example.com,ws://host3.example.com"; let invoice = RgbInvoice::from_str(invoice_str).unwrap(); let transports = vec![ diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index 870efecf..0064ccff 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -31,11 +31,11 @@ use amplify::confinement::{ }; use amplify::{ByteArray, Bytes32}; use armor::{ArmorHeader, AsciiArmor, StrictArmor}; -use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; +use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use commit_verify::{CommitEncode, CommitEngine, CommitId, CommitmentId, DigestExt, Sha256}; use rgb::validation::{ResolveWitness, Validator, Validity, Warning, CONSIGNMENT_MAX_LIBS}; use rgb::{ - impl_serde_baid58, validation, AttachId, BundleId, ContractHistory, ContractId, Extension, + impl_serde_baid64, validation, AttachId, BundleId, ContractHistory, ContractId, Extension, Genesis, GraphSeal, Operation, Schema, SchemaId, XChain, }; use strict_encoding::{StrictDeserialize, StrictDumb, StrictSerialize}; @@ -75,38 +75,29 @@ impl CommitmentId for ConsignmentId { const TAG: &'static str = "urn:lnp-bp:rgb:consignment#2024-03-11"; } -impl ToBaid58<32> for ConsignmentId { - const HRI: &'static str = "con"; - const CHUNKING: Option = CHUNKING_32; - fn to_baid58_payload(&self) -> [u8; 32] { self.to_byte_array() } - fn to_baid58_string(&self) -> String { self.to_string() } -} -impl FromBaid58<32> for ConsignmentId {} -impl Display for ConsignmentId { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if f.alternate() { - f.write_str("urn:lnp-bp:con:")?; - } - if f.sign_minus() { - write!(f, "{:.2}", self.to_baid58()) - } else { - write!(f, "{:#.2}", self.to_baid58()) - } - } +impl DisplayBaid64 for ConsignmentId { + const HRI: &'static str = "rgb:csg"; + const CHUNKING: bool = true; + const PREFIX: bool = true; + const EMBED_CHECKSUM: bool = false; + const MNEMONIC: bool = true; + fn to_baid64_payload(&self) -> [u8; 32] { self.to_byte_array() } } +impl FromBaid64Str for ConsignmentId {} impl FromStr for ConsignmentId { - type Err = Baid58ParseError; - fn from_str(s: &str) -> Result { - Self::from_baid58_maybe_chunked_str(s.trim_start_matches("urn:lnp-bp:"), ':', '#') - } + type Err = Baid64ParseError; + fn from_str(s: &str) -> Result { Self::from_baid64_str(s) } +} +impl Display for ConsignmentId { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { self.fmt_baid64(f) } } + +impl_serde_baid64!(ConsignmentId); + impl ConsignmentId { pub const fn from_array(id: [u8; 32]) -> Self { Self(Bytes32::from_array(id)) } - pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } -impl_serde_baid58!(ConsignmentId); - pub type ValidContract = ValidConsignment; pub type ValidTransfer = ValidConsignment; diff --git a/src/containers/file.rs b/src/containers/file.rs index 43809fb6..479364b5 100644 --- a/src/containers/file.rs +++ b/src/containers/file.rs @@ -31,7 +31,7 @@ use crate::containers::{Contract, Kit, Transfer}; const RGB_PREFIX: [u8; 4] = *b"RGB\x00"; const MAGIC_LEN: usize = 3; -#[derive(Clone, Eq, PartialEq, Debug, Display, Error, From)] +#[derive(Debug, Display, Error, From)] #[display(doc_comments)] pub enum LoadError { /// invalid file data. diff --git a/src/containers/kit.rs b/src/containers/kit.rs index ee27da53..946b3d6b 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -26,11 +26,11 @@ use std::str::FromStr; use aluvm::library::Lib; use amplify::confinement::{SmallOrdSet, TinyOrdMap, TinyOrdSet}; -use amplify::Bytes32; +use amplify::{ByteArray, Bytes32}; use armor::{ArmorHeader, AsciiArmor, StrictArmor}; -use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; +use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use commit_verify::{CommitEncode, CommitEngine, CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{impl_serde_baid58, validation, Schema}; +use rgb::{impl_serde_baid64, validation, Schema}; use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::TypeSystem; @@ -63,38 +63,29 @@ impl CommitmentId for KitId { const TAG: &'static str = "urn:lnp-bp:rgb:kit#2024-04-09"; } -impl ToBaid58<32> for KitId { - const HRI: &'static str = "kit"; - const CHUNKING: Option = CHUNKING_32; - fn to_baid58_payload(&self) -> [u8; 32] { self.to_byte_array() } - fn to_baid58_string(&self) -> String { self.to_string() } -} -impl FromBaid58<32> for KitId {} -impl Display for KitId { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if f.alternate() { - f.write_str("urn:lnp-bp:kit:")?; - } - if f.sign_minus() { - write!(f, "{:.2}", self.to_baid58()) - } else { - write!(f, "{:#.2}", self.to_baid58()) - } - } +impl DisplayBaid64 for KitId { + const HRI: &'static str = "rgb:kit"; + const CHUNKING: bool = true; + const PREFIX: bool = true; + const EMBED_CHECKSUM: bool = false; + const MNEMONIC: bool = false; + fn to_baid64_payload(&self) -> [u8; 32] { self.to_byte_array() } } +impl FromBaid64Str for KitId {} impl FromStr for KitId { - type Err = Baid58ParseError; - fn from_str(s: &str) -> Result { - Self::from_baid58_maybe_chunked_str(s.trim_start_matches("urn:lnp-bp:"), ':', '#') - } + type Err = Baid64ParseError; + fn from_str(s: &str) -> Result { Self::from_baid64_str(s) } } +impl Display for KitId { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { self.fmt_baid64(f) } +} + +impl_serde_baid64!(KitId); + impl KitId { pub const fn from_array(id: [u8; 32]) -> Self { KitId(Bytes32::from_array(id)) } - pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } -impl_serde_baid58!(KitId); - #[derive(Clone, Debug, Display)] #[display("{kit}")] pub struct ValidKit { diff --git a/src/containers/suppl.rs b/src/containers/suppl.rs index 20dcb28c..1815bcc4 100644 --- a/src/containers/suppl.rs +++ b/src/containers/suppl.rs @@ -25,9 +25,9 @@ use std::str::FromStr; use amplify::confinement::{SmallBlob, TinyOrdMap}; use amplify::{ByteArray, Bytes32}; -use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; +use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{impl_serde_baid58, AssignmentType, ContractId, GlobalStateType, Identity, SchemaId}; +use rgb::{impl_serde_baid64, AssignmentType, ContractId, GlobalStateType, Identity, SchemaId}; use strict_encoding::stl::{AlphaCaps, AlphaNumDash}; use strict_encoding::{ DeserializeError, FieldName, RString, StrictDeserialize, StrictSerialize, TypeName, VariantName, @@ -60,42 +60,33 @@ impl CommitmentId for SupplId { const TAG: &'static str = "urn:lnp-bp:rgb:suppl#2024-03-11"; } -impl ToBaid58<32> for SupplId { - const HRI: &'static str = "suppl"; - const CHUNKING: Option = CHUNKING_32; - fn to_baid58_payload(&self) -> [u8; 32] { self.to_byte_array() } - fn to_baid58_string(&self) -> String { self.to_string() } -} -impl FromBaid58<32> for SupplId {} -impl Display for SupplId { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if f.alternate() { - f.write_str("urn:lnp-bp:suppl:")?; - } - if f.sign_minus() { - write!(f, "{:.2}", self.to_baid58()) - } else { - write!(f, "{:#.2}", self.to_baid58()) - } - } +impl DisplayBaid64 for SupplId { + const HRI: &'static str = "rgb:sup"; + const CHUNKING: bool = false; + const PREFIX: bool = true; + const EMBED_CHECKSUM: bool = false; + const MNEMONIC: bool = false; + fn to_baid64_payload(&self) -> [u8; 32] { self.to_byte_array() } } +impl FromBaid64Str for SupplId {} impl FromStr for SupplId { - type Err = Baid58ParseError; - fn from_str(s: &str) -> Result { - Self::from_baid58_maybe_chunked_str(s.trim_start_matches("urn:lnp-bp:"), ':', '#') - } + type Err = Baid64ParseError; + fn from_str(s: &str) -> Result { Self::from_baid64_str(s) } +} +impl Display for SupplId { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { self.fmt_baid64(f) } } + +impl_serde_baid64!(SupplId); + impl SupplId { pub const fn from_array(id: [u8; 32]) -> Self { Self(Bytes32::from_array(id)) } - pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } -impl_serde_baid58!(SupplId); - #[derive(Wrapper, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, From, Display)] #[wrapper(Deref, FromStr)] #[display(inner)] -#[derive(StrictType, StrictEncode, StrictDecode)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD)] #[cfg_attr( feature = "serde", @@ -104,10 +95,6 @@ impl_serde_baid58!(SupplId); )] pub struct AnnotationName(RString); -impl Default for AnnotationName { - fn default() -> Self { Self::from("") } -} - impl From<&'static str> for AnnotationName { fn from(s: &'static str) -> Self { Self(RString::from(s)) } } diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 30491221..437944dd 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -27,10 +27,10 @@ use std::str::FromStr; use amplify::confinement::{TinyOrdMap, TinyOrdSet, TinyString, TinyVec}; use amplify::{ByteArray, Bytes32}; -use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; +use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use chrono::{DateTime, TimeZone, Utc}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{impl_serde_baid58, Identity, Occurrences}; +use rgb::{impl_serde_baid64, Identity, Occurrences}; use strict_encoding::{ FieldName, StrictDecode, StrictDeserialize, StrictDumb, StrictEncode, StrictSerialize, StrictType, TypeName, VariantName, @@ -62,38 +62,29 @@ impl CommitmentId for IfaceId { const TAG: &'static str = "urn:lnp-bp:rgb:interface#2024-02-04"; } -impl ToBaid58<32> for IfaceId { - const HRI: &'static str = "if"; - const CHUNKING: Option = CHUNKING_32; - fn to_baid58_payload(&self) -> [u8; 32] { self.to_byte_array() } - fn to_baid58_string(&self) -> String { self.to_string() } -} -impl FromBaid58<32> for IfaceId {} -impl Display for IfaceId { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if f.alternate() { - f.write_str("urn:lnp-bp:if:")?; - } - if f.sign_minus() { - write!(f, "{:.2}", self.to_baid58()) - } else { - write!(f, "{:#.2}", self.to_baid58()) - } - } +impl DisplayBaid64 for IfaceId { + const HRI: &'static str = "rgb:ifc"; + const CHUNKING: bool = true; + const PREFIX: bool = true; + const EMBED_CHECKSUM: bool = false; + const MNEMONIC: bool = true; + fn to_baid64_payload(&self) -> [u8; 32] { self.to_byte_array() } } +impl FromBaid64Str for IfaceId {} impl FromStr for IfaceId { - type Err = Baid58ParseError; - fn from_str(s: &str) -> Result { - Self::from_baid58_maybe_chunked_str(s.trim_start_matches("urn:lnp-bp:"), ':', '#') - } + type Err = Baid64ParseError; + fn from_str(s: &str) -> Result { Self::from_baid64_str(s) } +} +impl Display for IfaceId { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { self.fmt_baid64(f) } } + +impl_serde_baid64!(IfaceId); + impl IfaceId { pub const fn from_array(id: [u8; 32]) -> Self { IfaceId(Bytes32::from_array(id)) } - pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } } -impl_serde_baid58!(IfaceId); - #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Display, From)] #[display(inner)] #[cfg_attr( diff --git a/src/interface/iimpl.rs b/src/interface/iimpl.rs index 82fe67e9..955a048d 100644 --- a/src/interface/iimpl.rs +++ b/src/interface/iimpl.rs @@ -24,11 +24,11 @@ use std::str::FromStr; use amplify::confinement::TinyOrdSet; use amplify::{ByteArray, Bytes32}; -use baid58::{Baid58ParseError, Chunking, FromBaid58, ToBaid58, CHUNKING_32}; +use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use chrono::{DateTime, TimeZone, Utc}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; use rgb::{ - impl_serde_baid58, AssignmentType, ExtensionType, GlobalStateType, Identity, MetaType, Schema, + impl_serde_baid64, AssignmentType, ExtensionType, GlobalStateType, Identity, MetaType, Schema, SchemaId, TransitionType, ValencyType, }; use strict_encoding::{FieldName, StrictDumb, VariantName}; @@ -71,36 +71,28 @@ impl CommitmentId for ImplId { const TAG: &'static str = "urn:lnp-bp:rgb:iface-impl#2024-02-04"; } -impl ToBaid58<32> for ImplId { - const HRI: &'static str = "im"; - const CHUNKING: Option = CHUNKING_32; - fn to_baid58_payload(&self) -> [u8; 32] { self.to_byte_array() } - fn to_baid58_string(&self) -> String { self.to_string() } -} -impl FromBaid58<32> for ImplId {} -impl Display for ImplId { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - if f.alternate() { - f.write_str("urn:lnp-bp:im:")?; - } - if f.sign_minus() { - write!(f, "{:.2}", self.to_baid58()) - } else { - write!(f, "{:#.2}", self.to_baid58()) - } - } +impl DisplayBaid64 for ImplId { + const HRI: &'static str = "rgb:imp"; + const CHUNKING: bool = true; + const PREFIX: bool = true; + const EMBED_CHECKSUM: bool = false; + const MNEMONIC: bool = true; + fn to_baid64_payload(&self) -> [u8; 32] { self.to_byte_array() } } +impl FromBaid64Str for ImplId {} impl FromStr for ImplId { - type Err = Baid58ParseError; - fn from_str(s: &str) -> Result { - Self::from_baid58_maybe_chunked_str(s.trim_start_matches("urn:lnp-bp:"), ':', '#') - } + type Err = Baid64ParseError; + fn from_str(s: &str) -> Result { Self::from_baid64_str(s) } } -impl ImplId { - pub fn to_mnemonic(&self) -> String { self.to_baid58().mnemonic() } +impl Display for ImplId { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { self.fmt_baid64(f) } } -impl_serde_baid58!(ImplId); +impl_serde_baid64!(ImplId); + +impl ImplId { + pub const fn from_array(id: [u8; 32]) -> Self { ImplId(Bytes32::from_array(id)) } +} /// Maps certain form of type id (global or owned state or a valency) to a /// human-readable name. diff --git a/src/stl/error.rs b/src/stl/error.rs index da6d756f..72f9767c 100644 --- a/src/stl/error.rs +++ b/src/stl/error.rs @@ -20,7 +20,7 @@ // limitations under the License. use amplify::IoError; -use baid58::Baid58ParseError; +use baid64::Baid64ParseError; use strict_types::{typesys, CompileError}; #[allow(dead_code)] @@ -29,7 +29,7 @@ pub(super) enum Error { #[from(std::io::Error)] Io(IoError), #[from] - Baid58(Baid58ParseError), + Baid64(Baid64ParseError), #[from] Compile(CompileError), #[from] diff --git a/src/stl/stl.rs b/src/stl/stl.rs index 4c53411c..19265c41 100644 --- a/src/stl/stl.rs +++ b/src/stl/stl.rs @@ -40,11 +40,11 @@ use crate::LIB_NAME_RGB_STD; /// Strict types id for the library providing standard data types which may be /// used in RGB smart contracts. pub const LIB_ID_RGB_CONTRACT: &str = - "8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage"; + "stl:@r5yXt4a-v3XXv0M-E9Z6eoh-BFZweik-fxS6CB4-8AaO@MM#rover-annual-disney"; /// Strict types id for the library representing of RGB StdLib data types. pub const LIB_ID_RGB_STD: &str = - "DSKog3fAanZsJtyb6T6EhC7YsGzSVpMvbwzAaMR2Fw2x#round-gallery-granite"; + "stl:hYQHisDw-Xlm3v1j-P7A1VJg-luZS$ja-0AZHFIx-QtWo@SY#carrot-salt-sport"; fn _rgb_std_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_RGB_STD), tiny_bset! { diff --git a/stl/RGBContract@0.11.0.sta b/stl/RGBContract@0.11.0.sta index 7688fe69..cc68c674 100644 --- a/stl/RGBContract@0.11.0.sta +++ b/stl/RGBContract@0.11.0.sta @@ -1,53 +1,63 @@ -----BEGIN STRICT TYPE LIB----- -Id: 8Nxihgfg2yWzdoQAZYPf3QpfEnJ7HmwCWzN8cMQ5miK5#cantina-hexagon-baggage +Id: stl:@r5yXt4a-v3XXv0M-E9Z6eoh-BFZweik-fxS6CB4-8AaO@MM#rover-annual-disney Name: RGBContract Dependencies: - Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi, - Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 -Checksum-SHA256: bbaa91443a548615fa7d425b87b7af3428b67ebecf029a360bbb8f7b5ce58761 + Std#ralph-blue-lucky, + Bitcoin#signal-color-cipher +Checksum-SHA256: 6347d5f0a4c36a074fd3b6abb98041f64798a4a233e1742a352edc330dddbf3d 3sOfyLvL<$a$#e10?I5NZ-bfLFbqC#o>4E?M+l67UG^w8*<_XZ#%uyqCj(P-Wc6$ lVk7oBr%DNv+($;q`HHK!gIHa)*%m(-e#9sm3I{@IbYpL6ZUP5FX>?<6X>J1mA>% $n#j0HLDJN5-IKgM_J7b(p+0MPGk2Gl)y2(Rz1Xgc#bfbbo^UK%K(4i9Ajp1M~R@ C@!4#dQE#lUD;OiKi1Rs>XdX=LbXK+Rkw`Mu(V|7oQWGN(Z+AyvH&RuaL#N1_Q*>kl07$+g7b@t4MVjY>G@u4Q3HlB(d+LiLJm-R=h;`?dxDG*c -V`*tna%paKVPb4$f+K+Rb@1)9wcJs8k=}EVt)knrbu3H%}LT}R3zlrzz1YybYW?1a{vSa00eGtZe;)f009JZZ*64&1pxs+D{{BQuNq?vw$ -uLzi?1~hlkP@ao_$9uVE}^UN!R2FaB^j1X>)0BZUJ2b#21aJj($Hn^F!mAeRLol5 -%ecA&%UCtOO8MBUm^-YbaY{3Xl-R~bOr(hba`-P0pa3$zDa{vh -e4$>Ms8HM=uUmE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6OD0<^0n_2##VWXRdjy=DB -@qgYOj0000000000{{R30000003ukO^Vqt7kbYXO5015(#mdAKMhFfZ5JDzpn`AM -mqhGSLyUjBwP+psRd!+}uR&I%H;Zhc4rM99K@5|(<4SV7$Q=&CebuM;tt7#0000000000{{R30000003t@9}X -=iS2Wo~qH015(#mdAKMhFfZ5JDzpn`AMmqhGSLyUjBwP+psRd!+}uR&I%H;Zhc4r -M9vwnX#I -noRj)90000000000{{R300000033g#@Wo~0>Wpe-u0*IE!ct3_)YGXT|b>aC*sho -ymRs3H5hBe!;F2TcrP}$Q8a&E~MdrEcY@yCR7m_J&?z!=+JMP@#y5YO%1IbVPabaG*Cb7^#GZ*Fq{3Id3h -$9O-6TWVuFo^|2*NvWKMV^#cK{)RQ%ur9&Ffl%7c3KFtzeMkXEA+j6jSvOzzj`=$ -tQ7TTPTlV%#s+0i_HCJx~sdaC*shoymRs3H5hBe!;F2 -TcrP}WpZJ3X>V=- -1OfmAZf|a7000011aog~WdH>M0*IE!ct3_)YGXT|b>aC*shoymRs3H5hBe!;F2Tc -rP}$a2mk>90000000030000000000000000000300000000009WMy_`Y;SO7a -st_Qx2_}Wi56D#s{%|INk;!1x`|^nYb*j)Ww`FDvM3L#NtZR=*#b6fKrj{&;*~}; -9gH8=MXs-W5e*Cg;5Y|KW?^GxNn`~900#g7Kp+4KNoHYVWl3#tYz7Pmc4cyNX>V= -;OmsqKkxP5xCLpf?kur-g(F6&@HI9dWN1yNftOldQ2yE2yJC_VPs)+VE_pMg-4MfW29n3*S-gs#*TR)c;|Ee6T7Eb&yx3o;Ob2~ -0000000000{{R30000003ukO^Vqt7kbYXO500{x%6>{mTH0=VWHLC6&r)>Wmac7~ -mEt*+lR+M@8#OS2}0000000030000000000BVRLh7XKrm}Zgg`12?4S?x*9v#{$p -5<04cQ*6b`Yl+0L*r!iQ=I46b_PEw2Co000000093000000000SgVQgh?V`*h`00 -{xKNp8vdNtQ0000000030000000000Bb -aG*Cb7^#GZ*Fq{2?4~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2Wo~qH015&{>Z4!V_T!KNI`QJ|h6;Zj^jB$MPK+?7Lu3>C`4HI~ +v{(W1V6JV*{3!yZ{M3XW@z+pGEG00000000 +00{{R300000033g#@Wo~0>Wpe-t0!8YhU)%QMkO4aJ;_ZeCe;xE!X<$x_Fs4If6Z +`oP*&DQ20rFt3ZOHs70;T-agdg$OP=xIp;K4#IcLF!~asU7T000000RI30000000 +0w1pa&K~T00{y`>Z4!V_T!KNI`QJ|h6;Zj^jB$MPK+?7Lu3>C`4HI&hQW&>`ZdvN +B=ndTz*X~v;Uq>`<)y^XImOPdju4Lk0000000030000000000HWMyVyb!>D&b8~5 +DZf#|5bN~bb00eGtZe;)f009JZZ*64&1pxv@>Z4!V_T!KNI`QJ|h6;Zj^jB$MPK+ +?7Lu3>C`4HI~v{(W1V6JV*{3!yZ{M3XW@z+p~GYywm#VTK~nd +#>$v +Yz6}cZDn+5Z)5^*9+vrsy<5&Clo)5)@&l6UwYFh+Ofu5^ik9drt)+7=w-6<{ZeNoKcy!1~?PoRaGVc5iib0`+VYVk7oBr%DNv+($;q`HHK!gIH +a)*%m(-e#9sm3L)b@L&d6G@+l`%qd385?K@+fP1(-9sgE>i7rMzqbqHc?X>Md`Zf +5`h2m -----END STRICT TYPE LIB----- diff --git a/stl/RGBStd@0.11.0.stl b/stl/RGBStd@0.11.0.stl index cc126f340d50bb1d5f1cb49bde01b609b124b9e7..2e954f9aba25340e3bc4c46fae8e647c219853b4 100644 GIT binary patch delta 7300 zcmeHLX;4$y66OXW5Rg^bkqfe`5JUomeHVx^fS|aNkPAdeh*=P12?Aym70~k#a05k9 zal|E}@=!|@QE+5aamHN%$5C+^R}l0C)OyyGRfnlqQ&UruKgo~I*M0i*>Hfa%C`PuG zAoCT&gM1?dOnktj$|X16^b{fF7x(+c1d;KpxvUuKI%2gSQ~UjZ#xE)n0v;1@!5SXoKN+c;c0`^d6lIJ{4wb+CGW*Q9pG{FaUj z3-YQr9?+90N^K*sc*#S=2QLX%o+od`T+{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Peo(?QPti2B-G%$JOh~!tN9dZ+!M^peuUYfdqGH@?KQf z4N4!kFMnlFmM}qF9e?<&Wl2va*_Nl5!b@WWMXAivFU(;NI zZgnKV4Q+TrjzZUNifEuP;l{iR`ftbHBfpTW3-25XIsSKWe4_4yL4#~^*AhPT2!Vhj z543El$;V9|Hz!YwQW)q@Czs%lw?}n_l+Q=x=^}#sAxBT+^Gv7Q)xNoOk;1p zd~VT+cz)?88}}%Um)#q(x+0;7&LD*+Wzf2ZgKe7(o7h}>-rZz_qeXJOz;4{^oa}A$ zFF9dtRHe{x&qk`m+&0?F8qVvD^z7QMb=Y}S=5BK)nRQ*yxtuzF!K}E0b5eRv%6YWf y%Ltr&Bn?=o;cX8|-nsrN>SMhM%jR&Ck?HJ7pl0-Uq2_-dsx=c-TDZec3HmRx1iuIX diff --git a/stl/RGBStd@0.11.0.sty b/stl/RGBStd@0.11.0.sty index c1d6bcb0..11217f2f 100644 --- a/stl/RGBStd@0.11.0.sty +++ b/stl/RGBStd@0.11.0.sty @@ -1,5 +1,5 @@ {- - Id: DSKog3fAanZsJtyb6T6EhC7YsGzSVpMvbwzAaMR2Fw2x#round-gallery-granite + Id: stl:hYQHisDw-Xlm3v1j-P7A1VJg-luZS$ja-0AZHFIx-QtWo@SY#carrot-salt-sport Name: RGBStd Version: 0.11.0 Description: RGB standard library @@ -11,154 +11,157 @@ @context typelib RGBStd -import BPCore#8UmJsi3csjCEFCEVXvjLeAgvmqxY52iY5EMfTvbyzWx2 - use TapretNodePartner#iceberg-poker-active - 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 AnchorMerkleProofTapretProof#everest-laura-modem - use SecretSeal#santana-domingo-needle - use AnchorMerkleProofOpretProof#cable-final-podium - use BlindSealTxid#kimono-golf-price - use TxPtr#strange-source-father - -import StrictTypes#ACBoDKVqDSuPrZLs2W2bLVj2TnpThzUMcJJrC3GhsQ79 - use VariantInfoSemId#garlic-weekend-nirvana - use UnionVariantsSemId#soviet-yoyo-nikita - use VariantName#fiesta-center-yoga - use Primitive#hobby-cable-puzzle - use EnumVariants#fast-content-copy - use TySemId#congo-satire-gossip - use UnnamedFieldsSemId#hippie-world-sandra - use SemId#cargo-plasma-catalog - use Sizing#canoe-gordon-amazon - use TypeName#gray-bonanza-kilo - use FieldSemId#beast-traffic-enrico - use TypeSystem#carmen-nova-quasi - use Variant#colony-polo-senator - use NamedFieldsSemId#clever-prize-sinatra - use FieldName#toyota-plasma-austria - -import AluVM#APYERRUMyWqLadwTv8tEFifHMPGpL3xGFSBxwaKYpmcV - use IsaSeg#sharp-user-fantasy - use Lib#wedding-gate-truck - use IsaName#spirit-example-carrot - use LibSite#mission-papa-mercy - use LibId#rebel-factor-rodeo - use LibSeg#courage-mexico-cinema - -import Std#EcCNgrgLaygt3tCZNu2ZVEzMzSAZYEUeTNAVi5E81YWi - use AlphaCaps#digital-mirage-dream - use AsciiPrintable#prize-solar-driver - use Bool#laser-madam-maxwell - use AlphaCapsLodash#winter-vampire-energy - use AlphaSmallLodash#plastic-snake-modular - -import RGB#FdtTxVxBBVXJaayVZoM1dhSHqszVHMenivcPd2v4PP1H - use ExtensionSchema#ship-karma-david - use BundleId#desert-divide-visible - use GlobalValues#compact-denver-vitamin - use Identity#stock-teacher-falcon - use MetaValue#voodoo-budget-weekend - use InputMap#ravioli-rudolf-inch - use GenesisSchema#exhibit-decade-orca - use AltLayer1Set#manual-cycle-circus - use OwnedStateSchema#pacific-truck-sharon - use AssetTags#arctic-oasis-cable - use AssignmentsBlindSealTxid#morris-enrico-miller - use VoidState#nectar-ceramic-driver - use DataState#diana-archive-liquid - use TransitionType#puma-joshua-evita - use Occurrences#unicorn-empire-mama - use AssignVoidStateBlindSealTxPtr#russian-demand-kimono - use MediaType#light-nelson-brain - use ValencyType#palma-exit-pupil - use PedersenCommitment#nepal-delta-earth - use ConcealedFungible#open-conan-barcode - use AssignRevealedDataBlindSealTxid#master-rhino-rapid - use ExtensionType#mission-salsa-parole - use RevealedAttach#antenna-balloon-manager - use RevealedFungible#light-sonar-civil - use ConcealedData#mirage-invite-newton - use MetaType#index-shadow-pattern - use TransitionSchema#left-condor-famous - use AssignRevealedDataBlindSealTxPtr#trinity-trilogy-atomic - use XChainBlindSealTxid#biology-domain-domain - use AttachId#delta-member-agenda - use BlindingFactor#agenda-ivory-blast - use AssignmentType#hunter-hello-retro - use Schema#stop-stand-harmony - use XChainBlindSealTxPtr#prime-loyal-escort - use Opout#india-joshua-adam - use AssignVoidStateBlindSealTxid#noise-veteran-gloria - use SchemaId#garcia-smoke-ozone - use OpId#slow-samuel-ceramic - use ContractId#alarm-danube-vampire - use AssignmentsBlindSealTxPtr#meteor-express-liberal - use TypedAssignsBlindSealTxid#stuart-chapter-dance - use FungibleState#natasha-profit-winter - use Inputs#impact-wedding-example - use XChainPubWitness#animal-pretend-exile - use TypedAssignsBlindSealTxPtr#robert-event-mother - use AltLayer1#banana-mouse-plaster - use AssignRevealedAttachBlindSealTxid#subway-amanda-kevin - use AssetTag#buzzer-pattern-craft - use Extension#pigment-color-budget - use Input#export-content-vitamin - use GlobalStateType#seminar-major-tape - use Ffv#silence-motel-toronto - use AssignRevealedValueBlindSealTxPtr#chamber-balsa-forbid - use XChainSecretSeal#palace-random-taxi - use Valencies#lady-paper-anvil - use GlobalState#social-swim-amanda - use AssignRevealedAttachBlindSealTxPtr#eric-budget-orca - use GlobalStateSchema#warning-magnet-blonde - use Redeemed#money-campus-annual - use TransitionBundle#yoga-kansas-albert - use Transition#phoenix-cinema-mega - use XChainTerminalSeal#bread-tarzan-touch - use Genesis#modem-maxwell-santana - use Metadata#chef-ritual-garcia - use FungibleType#profit-bazooka-present - use ConcealedAttach#pizza-natural-cyclone - use RevealedData#switch-enigma-ruby - use AssignRevealedValueBlindSealTxid#colony-miguel-olga - -import CommitVerify#GCWLX5TjFmMDCJr5cxWtwoSajBWDWbkQVSuTNbrtD1tg - use MerkleHash#culture-metro-modular - use MerkleProof#labor-hilton-magenta - use ReservedBytes1#joker-lemon-mental - use ReservedBytes2#pocket-habitat-soviet - use ReservedBytes4#claudia-drink-digital - use ReservedBytes8#helena-button-combat - -import Bitcoin#HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9 - use SeqNo#rhino-time-rodent - use TxIn#pagoda-david-reform - use Vout#chrome-robin-gallop - use ScriptBytes#maestro-source-jackson - use TapNodeHash#crash-culture-jamaica - use LockTime#tokyo-inch-program - use SigScript#tiger-paprika-juliet - use LeafScript#brenda-round-micro - use TxOut#hostel-source-marion - use Sats#pyramid-spray-star - use Witness#quiz-junior-farmer - use Txid#cowboy-diego-betty - use TxVer#english-natasha-virus - use InternalPk#meter-nerve-chicken - use LeafVer#tunnel-lagoon-cowboy - use ScriptPubkey#denmark-human-degree - use ByteStr#kinetic-avenue-escort - use Tx#deluxe-bernard-genetic - use Outpoint#dinner-yoga-danube - use XOnlyPk#evident-finance-promo - - -@mnemonic(ramirez-benny-brave) +import StrictTypes#century-comrade-chess + use VariantName#theory-austin-before + use FieldName#present-flute-herman + use Primitive#deliver-arrow-boxer + use TySemId#popcorn-super-young + use FieldSemId#spiral-road-marco + use TypeName#edgar-carol-mystery + use UnnamedFieldsSemId#freedom-degree-gregory + use SemId#logic-absorb-hilton + use Variant#humor-regard-promise + use Sizing#courage-alien-salon + use NamedFieldsSemId#solar-salad-smoke + use EnumVariants#dispute-natasha-vega + use VariantInfoSemId#museum-edward-mirror + use UnionVariantsSemId#santana-address-pepper + use TypeSystem#adrian-boris-sponsor + +import AluVM#congo-archive-folio + use Lib#gate-biology-optimal + use LibSite#ultra-grace-message + use IsaName#taboo-olympic-cloud + use LibId#germany-culture-olivia + use IsaSeg#size-shake-olga + use LibSeg#lemon-philips-horse + +import BPCore#garbo-radius-peru + use TapretNodePartner#roger-member-educate + use TapretProof#marco-border-sample + use TapretPathProof#kiwi-mirror-paris + use Method#bali-boris-plasma + use TapretRightBranch#miracle-patriot-touch + use BlindSealTxPtr#fortune-iron-salmon + use OpretProof#good-village-flex + use AnchorMerkleProofTapretProof#meter-mobile-appear + use SecretSeal#dollar-iris-wizard + use AnchorMerkleProofOpretProof#prime-salsa-magnet + use BlindSealTxid#media-judge-anita + use TxPtr#italian-july-eddie + +import RGB#bless-donald-poker + use ExtensionSchema#active-eddie-empty + use BundleId#carmen-farmer-diesel + use GlobalValues#pilot-boris-alice + use MetaValue#split-package-recycle + use InputMap#octavia-north-gram + use GenesisSchema#iron-forbid-hamlet + use AltLayer1Set#flute-flex-bottle + use OwnedStateSchema#python-snake-capsule + use AssetTags#anita-nice-deliver + use AssignmentsBlindSealTxid#telecom-right-visible + use VoidState#email-snow-safari + use DataState#short-noise-postal + use TransitionType#picture-reflex-brigade + use Occurrences#source-olga-mirage + use AssignVoidStateBlindSealTxPtr#profit-granite-fuji + use MediaType#isabel-heaven-north + use ValencyType#aloha-dublin-brush + use PedersenCommitment#pupil-scale-jerome + use ConcealedFungible#story-shrink-aloha + use AssignRevealedDataBlindSealTxid#fantasy-monica-jump + use ExtensionType#apropos-scoop-viva + use Schema#junior-remote-jordan + use RevealedAttach#before-bravo-partner + use RevealedFungible#origin-iris-insect + use ConcealedData#ivan-tripod-young + use MetaType#quebec-mission-quota + use TransitionSchema#jumbo-matrix-normal + use AssignRevealedDataBlindSealTxPtr#ritual-license-arcade + use XChainBlindSealTxid#dynamic-life-brown + use AttachId#factor-hair-everest + use BlindingFactor#animal-plume-minus + use AssignmentType#secret-penguin-limit + use XChainBlindSealTxPtr#senator-limbo-raymond + use Opout#yoga-samba-karma + use AssignVoidStateBlindSealTxid#senior-beyond-cement + use SchemaId#ramirez-patron-simon + use OpId#picnic-single-gloria + use ContractId#uniform-welcome-papa + use AssignmentsBlindSealTxPtr#canyon-eternal-optimal + use TypedAssignsBlindSealTxid#pogo-social-idea + use FungibleState#guide-poker-coconut + use Inputs#herman-liberal-galaxy + use XChainPubWitness#carrot-import-nova + use TypedAssignsBlindSealTxPtr#flipper-marble-plate + use Identity#smart-pioneer-nominal + use AltLayer1#edison-survive-nitro + use AssignRevealedAttachBlindSealTxid#cobalt-eddie-resume + use AssetTag#slang-amber-club + use Extension#emotion-quality-society + use Input#actor-minus-multi + use GlobalStateType#yoga-quick-jasmine + use Ffv#pigment-career-hippie + use AssignRevealedValueBlindSealTxPtr#cuba-needle-salami + use XChainSecretSeal#alex-griffin-left + use Valencies#light-letter-comet + use GlobalState#stadium-barcode-bazaar + use AssignRevealedAttachBlindSealTxPtr#karma-podium-melon + use GlobalStateSchema#connect-ricardo-lava + use Redeemed#mile-lady-perfect + use TransitionBundle#adios-legend-everest + use Transition#reform-sofia-point + use Genesis#element-gondola-buffalo + use XChainTerminalSeal#canada-nova-barcode + use Metadata#member-nobody-imitate + use FungibleType#matrix-optimal-sinatra + use ConcealedAttach#meter-arizona-albino + use RevealedData#olivia-copper-stamp + use AssignRevealedValueBlindSealTxid#photo-jump-silicon + +import Std#ralph-blue-lucky + use AlphaCaps#picnic-soprano-aurora + use AsciiPrintable#ultra-sunset-format + use Bool#oxygen-complex-duet + use AlphaNumDash#sponsor-snake-nice + use AlphaCapsNum#aladdin-zebra-marble + use AlphaNumLodash#percent-bingo-caesar + use AlphaCapsLodash#duet-hammer-labor + use AlphaSmallLodash#pioneer-eagle-spell + +import CommitVerify#tennis-peace-olympic + use MerkleHash#horse-popcorn-bundle + use MerkleProof#price-aloha-grid + use ReservedBytes1#origin-roger-relax + use ReservedBytes2#florida-libra-circus + use ReservedBytes4#young-goblin-academy + use ReservedBytes8#rudolf-tape-adrian + +import Bitcoin#signal-color-cipher + use SeqNo#copper-verbal-ingrid + use TxIn#slang-cherry-gizmo + use Vout#brush-gloria-heroic + use ScriptBytes#equator-cockpit-gong + use TapNodeHash#paprika-amanda-hunter + use LockTime#lobster-liberal-jump + use SigScript#neptune-spiral-sample + use LeafScript#bison-doctor-oscar + use TxOut#aspect-eddie-message + use Sats#metro-picasso-roger + use Witness#engine-daniel-magnum + use Txid#shallow-light-reverse + use TxVer#nepal-symbol-uniform + use InternalPk#habitat-paprika-oliver + use LeafVer#benefit-carbon-africa + use ScriptPubkey#second-lobster-philips + use ByteStr#royal-anatomy-june + use Tx#radar-salon-page + use Outpoint#logo-alamo-madam + use XOnlyPk#clever-swim-carpet + + +@mnemonic(demo-nobel-joshua) data AnchoredBundles : tapret#1 (BPCore.AnchorMerkleProofTapretProof, RGB.TransitionBundle) | opret (BPCore.AnchorMerkleProofOpretProof, RGB.TransitionBundle) | double (tapretAnchor BPCore.AnchorMerkleProofTapretProof @@ -166,22 +169,22 @@ data AnchoredBundles : tapret#1 (BPCore.AnchorMerkleProofTapretProof, RGB.Tran , opretAnchor BPCore.AnchorMerkleProofOpretProof , opretBundle RGB.TransitionBundle) -@mnemonic(pandora-film-society) -data AnnotationName : [Std.AlphaCaps ^ ..0xff] +@mnemonic(domino-waiter-orlando) +data AnnotationName : Std.AlphaCaps, [Std.AlphaNumDash ^ ..0xfe] -@mnemonic(algebra-bikini-tunnel) +@mnemonic(phantom-habitat-pegasus) data Annotations : {AnnotationName -> ^ ..0xff [Byte]} -@mnemonic(galileo-stuart-night) +@mnemonic(baby-infant-cake) data AssignIface : ownedState OwnedIface , public Std.Bool , required Std.Bool , multiple Std.Bool -@mnemonic(tommy-picasso-spell) +@mnemonic(explore-spiral-darwin) data BundledWitness : pubWitness RGB.XChainPubWitness, anchoredBundles AnchoredBundles -@mnemonic(bonus-opinion-mary) +@mnemonic(tripod-tribune-farmer) data Consignmentfalse : version ContainerVer , transfer Std.Bool , terminals {RGB.BundleId -> Terminal} @@ -196,7 +199,7 @@ data Consignmentfalse : version ContainerVer , attachments {RGB.AttachId -> [Byte ^ ..0xffffff]} , signatures {ContentId -> ^ ..0xff ContentSigs} -@mnemonic(declare-austin-enjoy) +@mnemonic(rainbow-button-bernard) data Consignmenttrue : version ContainerVer , transfer Std.Bool , terminals {RGB.BundleId -> Terminal} @@ -211,27 +214,27 @@ data Consignmenttrue : version ContainerVer , attachments {RGB.AttachId -> [Byte ^ ..0xffffff]} , signatures {ContentId -> ^ ..0xff ContentSigs} -@mnemonic(felix-burger-matrix) +@mnemonic(giant-bravo-jacket) data ContainerVer : v2#2 -@mnemonic(jargon-brown-family) +@mnemonic(dispute-senator-parody) data ContentId : schema RGB.SchemaId | genesis RGB.ContractId | iface IfaceId | ifaceImpl ImplId | suppl SupplId -@mnemonic(fish-voodoo-teacher) +@mnemonic(reward-sharp-orca) data ContentRef : schema RGB.SchemaId | genesis RGB.ContractId | iface IfaceId | ifaceImpl ImplId -@mnemonic(adios-import-collect) +@mnemonic(apropos-horizon-couple) data ContentSigs : {RGB.Identity -> ^ 1..0xa SigBlob} -@mnemonic(austria-rudolf-command) +@mnemonic(corner-reptile-pagoda) data ExtensionIface : modifier Modifier , optional Std.Bool , metadata {StrictTypes.FieldName ^ ..0xff} @@ -242,7 +245,7 @@ data ExtensionIface : modifier Modifier , errors {StrictTypes.VariantName ^ ..0xff} , defaultAssignment StrictTypes.FieldName? -@mnemonic(ballad-bicycle-iris) +@mnemonic(oregano-virus-ringo) data GenesisIface : modifier Modifier , metadata {StrictTypes.FieldName ^ ..0xff} , globals {StrictTypes.FieldName -> ^ ..0xff RGB.Occurrences} @@ -250,12 +253,12 @@ data GenesisIface : modifier Modifier , valencies {StrictTypes.FieldName ^ ..0xff} , errors {StrictTypes.VariantName ^ ..0xff} -@mnemonic(garbo-justice-atomic) +@mnemonic(concert-combat-charm) data GlobalIface : semId StrictTypes.SemId? , required Std.Bool , multiple Std.Bool -@mnemonic(magenta-juliet-greek) +@mnemonic(exodus-rider-garcia) data Iface : version VerNo , name StrictTypes.TypeName , inherits [IfaceId ^ ..0xff] @@ -271,10 +274,10 @@ data Iface : version VerNo , errors {StrictTypes.VariantName -> ^ ..0xff [Unicode ^ ..0xff]} , developer RGB.Identity -@mnemonic(vendor-polite-gong) +@mnemonic(nova-cola-carbon) data IfaceId : [Byte ^ 32] -@mnemonic(snow-habitat-collect) +@mnemonic(chris-earth-pony) data IfaceImpl : version VerNo , schemaId RGB.SchemaId , ifaceId IfaceId @@ -288,10 +291,10 @@ data IfaceImpl : version VerNo , errors {NamedVariantu8 ^ ..0xff} , developer RGB.Identity -@mnemonic(monday-igloo-jupiter) +@mnemonic(seminar-data-table) data ImplId : [Byte ^ 32] -@mnemonic(street-sample-collect) +@mnemonic(rodent-maximum-bravo) data Kit : version ContainerVer , ifaces {Iface ^ ..0xff} , schemata {RGB.Schema ^ ..0xff} @@ -301,46 +304,46 @@ data Kit : version ContainerVer , scripts {AluVM.Lib} , signatures {ContentId -> ^ ..0xff ContentSigs} -@mnemonic(recycle-field-hope) +@mnemonic(saturn-escort-jordan) data Modifier : abstract | override | final#255 -@mnemonic(claudia-roof-village) +@mnemonic(origin-caramel-flipper) data NamedFieldAssignmentType : id RGB.AssignmentType , name StrictTypes.FieldName , reserved CommitVerify.ReservedBytes4 -@mnemonic(exact-ruby-soda) +@mnemonic(tuna-archer-melon) data NamedFieldExtensionType : id RGB.ExtensionType , name StrictTypes.FieldName , reserved CommitVerify.ReservedBytes4 -@mnemonic(owner-fiesta-boston) +@mnemonic(museum-ohio-arizona) data NamedFieldGlobalStateType : id RGB.GlobalStateType , name StrictTypes.FieldName , reserved CommitVerify.ReservedBytes4 -@mnemonic(mambo-bermuda-farmer) +@mnemonic(prefix-carmen-artist) data NamedFieldMetaType : id RGB.MetaType , name StrictTypes.FieldName , reserved CommitVerify.ReservedBytes4 -@mnemonic(absent-stick-nova) +@mnemonic(express-brush-desire) data NamedFieldTransitionType : id RGB.TransitionType , name StrictTypes.FieldName , reserved CommitVerify.ReservedBytes4 -@mnemonic(candle-mirror-alcohol) +@mnemonic(invest-apollo-inca) data NamedFieldValencyType : id RGB.ValencyType , name StrictTypes.FieldName , reserved CommitVerify.ReservedBytes4 -@mnemonic(pedro-george-connect) +@mnemonic(star-pilgrim-pilgrim) data NamedVariantu8 : id U8 , name StrictTypes.VariantName , reserved CommitVerify.ReservedBytes4 -@mnemonic(contact-remote-popular) +@mnemonic(delphi-athlete-fresh) data OwnedIface : any () | rights () | amount () @@ -348,46 +351,47 @@ data OwnedIface : any () | anyAttach () | data StrictTypes.SemId -@mnemonic(pixel-bravo-tactic) +@mnemonic(novel-camilla-tokyo) data PubWitness : txid Bitcoin.Txid , tx Bitcoin.Tx? , spv CommitVerify.ReservedBytes1 -@mnemonic(chris-update-father) +@mnemonic(insect-cello-avalon) data SigBlob : [Byte ^ 1..0x1000] -@mnemonic(partner-austin-dinner) +@mnemonic(pilot-claudia-minute) data SupplId : [Byte ^ 32] -@mnemonic(ivan-adios-aspirin) +@mnemonic(jargon-orchid-forget) data SupplItem : default () | typeNo U16 | typeName#17 StrictTypes.TypeName | fieldName StrictTypes.FieldName | variantName StrictTypes.VariantName -@mnemonic(martin-belgium-between) +@mnemonic(phone-claudia-kiwi) data SupplMap : {SupplItem -> ^ ..0xff Annotations} -@mnemonic(lazarus-shallow-amigo) +@mnemonic(canoe-denmark-short) data SupplSub : itself | meta | global | owned | valency | assignment | genesis | transition | extension | exception -@mnemonic(depend-lola-money) +@mnemonic(lobster-traffic-flame) data Supplement : contentId ContentRef , timestamp I64 , creator RGB.Identity , annotations {SupplSub -> ^ ..0xff SupplMap} -@mnemonic(permit-crimson-parole) +@mnemonic(lithium-torso-parent) data Terminal : seals {RGB.XChainTerminalSeal} -@mnemonic(battery-cecilia-politic) -data TerminalSeal : VoutSeal? +@mnemonic(amadeus-athena-lagoon) +data TerminalSeal : concealedUtxo BPCore.SecretSeal + | witnessVout VoutSeal -@mnemonic(radius-weather-analyze) +@mnemonic(sigma-rose-cubic) data TransitionIface : modifier Modifier , optional Std.Bool , metadata {StrictTypes.FieldName ^ ..0xff} @@ -398,14 +402,14 @@ data TransitionIface : modifier Modifier , errors {StrictTypes.VariantName ^ ..0xff} , defaultAssignment StrictTypes.FieldName? -@mnemonic(input-tripod-oscar) +@mnemonic(buzzer-holiday-fiber) data ValencyIface : required Std.Bool -@mnemonic(sabine-harlem-absorb) +@mnemonic(textile-next-stretch) data VerNo : v0 | v1 -@mnemonic(concert-venice-jacket) +@mnemonic(pixel-arctic-flame) data VoutSeal : method BPCore.Method , vout Bitcoin.Vout , blinding U64 diff --git a/stl/Transfer.vesper b/stl/Transfer.vesper index 0abcf348..916e4fa0 100644 --- a/stl/Transfer.vesper +++ b/stl/Transfer.vesper @@ -42,6 +42,7 @@ Consignmenttrue rec schemaId bytes len=32 aka=SchemaId flags bytes len=1 aka=ReservedBytes1 timestamp is I64 + issuer ascii aka=Identity first=AsciiPrintable rest=AsciiPrintable len=1..4096 testnet enum Bool false=0 true=1 altLayers1 set len=0..MAX8 aka=AltLayer1Set AltLayer1 enum liquid=1 @@ -61,24 +62,40 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -87,14 +104,22 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -103,7 +128,9 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 @@ -111,8 +138,14 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -125,26 +158,42 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -155,27 +204,43 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -186,7 +251,6 @@ Consignmenttrue rec lock bytes len=2 aka=ReservedBytes2 valencies set len=0..MAX8 aka=Valencies element is U16 aka=ValencyType - issuer ascii len=0..4096 aka=Identity charset=AsciiPrintable validator bytes len=1 aka=ReservedBytes1 extensions set len=0..MAX32 Extension rec @@ -206,24 +270,40 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state is Unit aka=VoidState lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -232,14 +312,22 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -248,7 +336,9 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 @@ -256,8 +346,14 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -270,26 +366,42 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedData lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -300,27 +412,43 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxid union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 state bytes len=32 aka=ConcealedAttach lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxid option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 + seal union XChainBlindSealTxid + bitcoin rec BlindSealTxid wrapped tag=0 + method enum Method opretFirst=0 tapretFirst=1 + txid bytes len=32 aka=Txid + vout is U32 aka=Vout + blinding is U64 + liquid rec BlindSealTxid wrapped tag=1 + method enum Method opretFirst=0 tapretFirst=1 txid bytes len=32 aka=Txid vout is U32 aka=Vout blinding is U64 @@ -383,25 +511,49 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -409,15 +561,27 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -425,7 +589,9 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 @@ -433,9 +599,19 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedFungible @@ -447,27 +623,51 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedData @@ -477,28 +677,52 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedAttach @@ -550,25 +774,49 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -576,15 +824,27 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -592,7 +852,9 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 @@ -600,9 +862,19 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedFungible @@ -614,27 +886,51 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedData @@ -644,28 +940,52 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedAttach @@ -721,25 +1041,49 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -747,15 +1091,27 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -763,7 +1119,9 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 @@ -771,9 +1129,19 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedFungible @@ -785,27 +1153,51 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedData @@ -815,28 +1207,52 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedAttach @@ -887,25 +1303,49 @@ Consignmenttrue rec declarative list len=0..MAX16 wrapped tag=0 AssignVoidStateBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -913,15 +1353,27 @@ Consignmenttrue rec fungible list len=0..MAX16 wrapped tag=1 AssignRevealedValueBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 @@ -929,7 +1381,9 @@ Consignmenttrue rec rangeProof bytes len=33 aka=PedersenCommitment lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 @@ -937,9 +1391,19 @@ Consignmenttrue rec tag bytes len=32 aka=AssetTag lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedFungible @@ -951,27 +1415,51 @@ Consignmenttrue rec structured list len=0..MAX16 wrapped tag=2 AssignRevealedDataBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedData @@ -981,28 +1469,52 @@ Consignmenttrue rec attachment list len=0..MAX16 wrapped tag=3 AssignRevealedAttachBlindSealTxPtr union confidential rec tag=0 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 confidentialState rec tag=1 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 lock bytes len=2 aka=ReservedBytes2 confidentialSeal rec tag=2 - liquid bytes len=32 option wrapped aka=SecretSeal tag=1 + 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 lock bytes len=2 aka=ReservedBytes2 revealed rec tag=3 - liquid rec BlindSealTxPtr option wrapped tag=1 - method enum Method opretFirst=0 tapretFirst=1 - txid bytes len=32 option wrapped aka=Txid 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 RevealedAttach @@ -1017,9 +1529,9 @@ Consignmenttrue rec schema rec Schema ffv is U16 aka=Ffv flags bytes len=1 aka=ReservedBytes1 - name ascii len=1..100 aka=TypeName charset=AlphaCapsLodash + name ascii aka=TypeName first=AlphaCapsLodash rest=AlphaNumLodash len=1..100 timestamp is I64 - developer ascii len=0..4096 aka=Identity charset=AsciiPrintable + developer ascii aka=Identity first=AsciiPrintable rest=AsciiPrintable len=1..4096 metaTypes map len=0..MAX8 key is U16 aka=MetaType value bytes len=32 aka=SemId @@ -1106,21 +1618,21 @@ Consignmenttrue rec ifaces map len=0..MAX8 key rec Iface version enum VerNo v0=0 v1=1 - name ascii len=1..100 aka=TypeName charset=AlphaCapsLodash + name ascii aka=TypeName first=AlphaCapsLodash rest=AlphaNumLodash len=1..100 inherits list len=0..MAX8 element bytes len=32 aka=IfaceId timestamp is I64 metadata map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value bytes len=32 aka=SemId globalState map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec GlobalIface some bytes len=32 option wrapped aka=SemId tag=1 required enum Bool false=0 true=1 multiple enum Bool false=0 true=1 assignments map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec AssignIface ownedState union OwnedIface any is Unit tag=0 @@ -1133,83 +1645,83 @@ Consignmenttrue rec required enum Bool false=0 true=1 multiple enum Bool false=0 true=1 valencies map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec ValencyIface required enum Bool false=0 true=1 genesis rec GenesisIface modifier enum Modifier abstract=0 override=1 final=255 metadata set len=0..MAX8 - element ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + element ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 globals map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec Occurrences min is U16 max is U16 assignments map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec Occurrences min is U16 max is U16 valencies set len=0..MAX8 - element ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + element ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 errors set len=0..MAX8 - element ascii len=1..100 aka=VariantName charset=AlphaSmallLodash + element ascii aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 transitions map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec TransitionIface modifier enum Modifier abstract=0 override=1 final=255 optional enum Bool false=0 true=1 metadata set len=0..MAX8 - element ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + element ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 globals map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec Occurrences min is U16 max is U16 inputs map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec Occurrences min is U16 max is U16 assignments map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec Occurrences min is U16 max is U16 valencies set len=0..MAX8 - element ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + element ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 errors set len=0..MAX8 - element ascii len=1..100 aka=VariantName charset=AlphaSmallLodash - some ascii len=1..100 option wrapped aka=FieldName charset=AlphaSmallLodash tag=1 + element ascii aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 + some ascii option wrapped aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 tag=1 extensions map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec ExtensionIface modifier enum Modifier abstract=0 override=1 final=255 optional enum Bool false=0 true=1 metadata set len=0..MAX8 - element ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + element ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 globals map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec Occurrences min is U16 max is U16 assignments map len=0..MAX8 - key ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + key ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value rec Occurrences min is U16 max is U16 redeems set len=0..MAX8 - element ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + element ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 valencies set len=0..MAX8 - element ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + element ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 errors set len=0..MAX8 - element ascii len=1..100 aka=VariantName charset=AlphaSmallLodash - some ascii len=1..100 option wrapped aka=FieldName charset=AlphaSmallLodash tag=1 - some ascii len=1..100 option wrapped aka=FieldName charset=AlphaSmallLodash tag=1 + element ascii aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 + some ascii option wrapped aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 tag=1 + some ascii option wrapped aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 tag=1 errors map len=0..MAX8 - key ascii len=1..100 aka=VariantName charset=AlphaSmallLodash + key ascii aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 value str len=0..MAX8 - developer ascii len=0..4096 aka=Identity charset=AsciiPrintable + developer ascii aka=Identity first=AsciiPrintable rest=AsciiPrintable len=1..4096 value rec IfaceImpl version enum VerNo v0=0 v1=1 schemaId bytes len=32 aka=SchemaId @@ -1218,39 +1730,39 @@ Consignmenttrue rec metadata set len=0..MAX8 NamedFieldMetaType rec id is U16 aka=MetaType - name ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + name ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 reserved bytes len=4 aka=ReservedBytes4 globalState set len=0..MAX8 NamedFieldGlobalStateType rec id is U16 aka=GlobalStateType - name ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + name ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 reserved bytes len=4 aka=ReservedBytes4 assignments set len=0..MAX8 NamedFieldAssignmentType rec id is U16 aka=AssignmentType - name ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + name ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 reserved bytes len=4 aka=ReservedBytes4 valencies set len=0..MAX8 NamedFieldValencyType rec id is U16 aka=ValencyType - name ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + name ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 reserved bytes len=4 aka=ReservedBytes4 transitions set len=0..MAX8 NamedFieldTransitionType rec id is U16 aka=TransitionType - name ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + name ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 reserved bytes len=4 aka=ReservedBytes4 extensions set len=0..MAX8 NamedFieldExtensionType rec id is U16 aka=ExtensionType - name ascii len=1..100 aka=FieldName charset=AlphaSmallLodash + name ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 reserved bytes len=4 aka=ReservedBytes4 errors set len=0..MAX8 NamedVariantu8 rec id is U8 - name ascii len=1..100 aka=VariantName charset=AlphaSmallLodash + name ascii aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 reserved bytes len=4 aka=ReservedBytes4 - developer ascii len=0..4096 aka=Identity charset=AsciiPrintable + developer ascii aka=Identity first=AsciiPrintable rest=AsciiPrintable len=1..4096 supplements set len=0..MAX8 Supplement rec contentId union ContentRef @@ -1259,7 +1771,7 @@ Consignmenttrue rec iface bytes len=32 wrapped aka=IfaceId tag=2 ifaceImpl bytes len=32 wrapped aka=ImplId tag=3 timestamp is I64 - creator ascii len=0..4096 aka=Identity charset=AsciiPrintable + creator ascii aka=Identity first=AsciiPrintable rest=AsciiPrintable len=1..4096 annotations map len=0..MAX8 key enum { SupplSub itself=0 meta=1 global=2 owned=3 valency=4 assignment=5 genesis=6 transition=7 @@ -1269,11 +1781,11 @@ Consignmenttrue rec key union SupplItem default is Unit tag=0 typeNo is U16 wrapped tag=1 - typeName ascii len=1..100 wrapped aka=TypeName charset=AlphaCapsLodash tag=2 - fieldName ascii len=1..100 wrapped aka=FieldName charset=AlphaSmallLodash tag=3 - variantName ascii len=1..100 wrapped aka=VariantName charset=AlphaSmallLodash tag=4 + typeName ascii wrapped aka=TypeName first=AlphaCapsLodash rest=AlphaNumLodash len=1..100 tag=2 + fieldName ascii wrapped aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 tag=3 + variantName ascii wrapped aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 tag=4 value map len=0..MAX8 aka=Annotations - key ascii len=0..MAX8 aka=AnnotationName charset=AlphaCaps + key ascii aka=AnnotationName first=AlphaCaps rest=AlphaNumDash len=1..MAX8 value bytes len=0..MAX16 types map len=0..MAX24 aka=TypeSystem key bytes len=32 aka=SemId @@ -1282,18 +1794,18 @@ Consignmenttrue rec unicode is Unit tag=1 enum set len=1..MAX8 wrapped aka=EnumVariants tag=2 Variant rec - name ascii len=1..100 aka=VariantName charset=AlphaSmallLodash + name ascii aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 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 charset=AlphaSmallLodash + name ascii aka=VariantName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 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 charset=AlphaSmallLodash + name ascii aka=FieldName first=AlphaSmallLodash rest=AlphaNumLodash len=1..100 ty bytes len=32 aka=SemId array tuple tag=6 _ bytes len=32 aka=SemId @@ -1317,7 +1829,7 @@ Consignmenttrue rec scripts set len=0..1024 Lib rec isae set len=0..64 aka=IsaSeg - element ascii len=2..8 aka=IsaName charset=AlphaCaps + element ascii aka=IsaName first=AlphaCaps rest=AlphaCapsNum len=2..8 code bytes len=0..MAX16 data bytes len=0..MAX16 libs set len=0..MAX8 aka=LibSeg @@ -1333,6 +1845,6 @@ Consignmenttrue rec ifaceImpl bytes len=32 wrapped aka=ImplId tag=3 suppl bytes len=32 wrapped aka=SupplId tag=4 value map len=1..10 aka=ContentSigs - key ascii len=0..4096 aka=Identity charset=AsciiPrintable + key ascii aka=Identity first=AsciiPrintable rest=AsciiPrintable len=1..4096 value bytes len=1..4096 aka=SigBlob From 018457abd4ca7d8805221de23d19993be293db26 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 14:56:41 +0200 Subject: [PATCH 38/52] chore: rename rgb to rgbcore and invoice to rgbinvoice --- Cargo.lock | 2 +- invoice/Cargo.toml | 2 +- invoice/src/lib.rs | 1 + src/containers/kit.rs | 2 +- src/containers/suppl.rs | 2 +- src/interface/iface.rs | 2 +- src/lib.rs | 4 +++- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 42c5d792..1dfcdc3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -645,7 +645,7 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#afc19b96340336ef82266b0372a1365de72b104d" +source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#26a349112f479072f9cc8dee06ffdde0b78e1f5b" dependencies = [ "aluvm", "amplify", diff --git a/invoice/Cargo.toml b/invoice/Cargo.toml index 830ccce2..999969f5 100644 --- a/invoice/Cargo.toml +++ b/invoice/Cargo.toml @@ -13,7 +13,7 @@ edition = { workspace = true } license = { workspace = true } [lib] -name = "invoice" +name = "rgbinvoice" [dependencies] amplify = { workspace = true } diff --git a/invoice/src/lib.rs b/invoice/src/lib.rs index 097d023d..905989dc 100644 --- a/invoice/src/lib.rs +++ b/invoice/src/lib.rs @@ -23,6 +23,7 @@ extern crate amplify; #[macro_use] extern crate strict_encoding; +extern crate rgbcore as rgb; #[cfg(feature = "serde")] extern crate serde_crate as serde; diff --git a/src/containers/kit.rs b/src/containers/kit.rs index 946b3d6b..84878cb0 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -30,7 +30,7 @@ use amplify::{ByteArray, Bytes32}; use armor::{ArmorHeader, AsciiArmor, StrictArmor}; use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use commit_verify::{CommitEncode, CommitEngine, CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{impl_serde_baid64, validation, Schema}; +use rgb::{validation, Schema}; use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::TypeSystem; diff --git a/src/containers/suppl.rs b/src/containers/suppl.rs index 1815bcc4..f1be17d0 100644 --- a/src/containers/suppl.rs +++ b/src/containers/suppl.rs @@ -27,7 +27,7 @@ use amplify::confinement::{SmallBlob, TinyOrdMap}; use amplify::{ByteArray, Bytes32}; use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{impl_serde_baid64, AssignmentType, ContractId, GlobalStateType, Identity, SchemaId}; +use rgb::{AssignmentType, ContractId, GlobalStateType, Identity, SchemaId}; use strict_encoding::stl::{AlphaCaps, AlphaNumDash}; use strict_encoding::{ DeserializeError, FieldName, RString, StrictDeserialize, StrictSerialize, TypeName, VariantName, diff --git a/src/interface/iface.rs b/src/interface/iface.rs index 437944dd..d8e6cee0 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -30,7 +30,7 @@ use amplify::{ByteArray, Bytes32}; use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; use chrono::{DateTime, TimeZone, Utc}; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; -use rgb::{impl_serde_baid64, Identity, Occurrences}; +use rgb::{Identity, Occurrences}; use strict_encoding::{ FieldName, StrictDecode, StrictDeserialize, StrictDumb, StrictEncode, StrictSerialize, StrictType, TypeName, VariantName, diff --git a/src/lib.rs b/src/lib.rs index 296e9c40..290f5bec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,12 +74,14 @@ extern crate amplify; extern crate strict_encoding; #[macro_use] extern crate commit_verify; +#[macro_use] +extern crate rgbcore as rgb; #[cfg(feature = "serde")] #[macro_use] extern crate serde_crate as serde; /// Re-exporting all invoice data types (RGB and BP). -pub extern crate invoice; +pub extern crate rgbinvoice as invoice; pub mod stl; pub mod interface; From 34990268a5cfaa1f2a1daa9f886f367506b6b338 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 16:06:58 +0200 Subject: [PATCH 39/52] iface: improve identity display in Contractum --- Cargo.lock | 2 +- src/interface/contractum.rs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1dfcdc3a..a38fb939 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -645,7 +645,7 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#26a349112f479072f9cc8dee06ffdde0b78e1f5b" +source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#0d7bbcc45d448b71d6c93beb804a3c7062e6891c" dependencies = [ "aluvm", "amplify", diff --git a/src/interface/contractum.rs b/src/interface/contractum.rs index 15e0bd6d..01cbdbe6 100644 --- a/src/interface/contractum.rs +++ b/src/interface/contractum.rs @@ -213,8 +213,9 @@ impl<'a> Display for IfaceDisplay<'a> { } writeln!(f, "@version({:#})", self.iface.version)?; - if !self.iface.developer.is_empty() { - writeln!(f, "@developer({})", self.iface.developer)?; + writeln!(f, "@id({})", self.iface.iface_id())?; + if !self.iface.developer.is_anonymous() { + writeln!(f, "@developer(\"{}\")", self.iface.developer)?; } writeln!(f, "@timestamp({})", self.iface.timestamp)?; write!(f, "interface {}", self.iface.name)?; @@ -235,8 +236,8 @@ impl<'a> Display for IfaceDisplay<'a> { for (fname, semid) in &self.iface.metadata { write!(f, "\tmeta {fname}: ")?; match self.types.lookup(*semid) { - Some(fqn) => writeln!(f, "{fqn}"), - None => writeln!(f, "{semid} -- type name is unknown"), + Some(fqn) => write!(f, "{fqn}"), + None => write!(f, "{semid} -- type name is unknown"), }?; writeln!(f)?; } From c37e2e55275cd5fdc3f2a5659a08d208c0ec4289 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 16:37:18 +0200 Subject: [PATCH 40/52] iface: fix inheritance id accounting --- src/interface/inheritance.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interface/inheritance.rs b/src/interface/inheritance.rs index a8c1247e..af17ec52 100644 --- a/src/interface/inheritance.rs +++ b/src/interface/inheritance.rs @@ -354,6 +354,8 @@ impl Iface { name: impl Into, ) -> Result> { let orig_id = self.iface_id(); + let ext_id = ext.iface_id(); + let name = name.into(); let mut errors = vec![]; @@ -501,10 +503,11 @@ impl Iface { } } - self.name = name.into(); + self.name = name; self.inherits .push(orig_id) .and_then(|_| self.inherits.extend(ext.inherits)) + .and_then(|_| self.inherits.push(ext_id)) .map_err(|_| errors.push(ExtensionError::InheritanceOverflow)) .ok(); From c232cbea40dcd3f2aebaf91e63006108abf64f91 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 18:13:53 +0200 Subject: [PATCH 41/52] containers: impl Display for ContentRef --- src/containers/suppl.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/suppl.rs b/src/containers/suppl.rs index f1be17d0..c162a161 100644 --- a/src/containers/suppl.rs +++ b/src/containers/suppl.rs @@ -99,7 +99,8 @@ impl From<&'static str> for AnnotationName { fn from(s: &'static str) -> Self { Self(RString::from(s)) } } -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Display)] +#[display(inner)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD, tags = order, dumb = ContentRef::Schema(strict_dumb!()))] #[cfg_attr( From 53590d49f1ebd50ec3ed130ea3b31e3c4f008e8f Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 19:08:30 +0200 Subject: [PATCH 42/52] iface: improve IfaceInfo printout --- src/info.rs | 33 +++++++++++++++++---------------- src/interface/iface.rs | 18 ++++++++++++++++-- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/src/info.rs b/src/info.rs index 72bbca12..d06b7345 100644 --- a/src/info.rs +++ b/src/info.rs @@ -74,26 +74,27 @@ impl IfaceInfo { impl Display for IfaceInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{: <18}", self.developer.to_string())?; - f.write_char(f.fill())?; - write!(f, "{}", self.version)?; - f.write_char(f.fill())?; - write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; - f.write_char(f.fill())?; - write!(f, "{:24}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; - f.write_char(f.fill())?; - write!( + write!(f, "{: <40}\t", self.name)?; + write!(f, "{}\t", self.created_at.format("%Y-%m-%d"))?; + write!(f, "{}\t", self.version)?; + writeln!(f, "{}", self.id)?; + + writeln!(f, "\tDeveloper: {}", self.developer.to_string())?; + + writeln!(f, "\tDefaults to: {}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; + + writeln!( f, - "{:32}", + "\tInherits: {}", self.inherits .iter() - .map(|f| f.to_string()) + .map(|f| format!("{:#}", f)) .collect::>() - .join(", ") - )?; - writeln!(f, "{}", self.name)?; - f.write_char(f.fill())?; - writeln!(f, "\t{}", self.id) + .chunks(5) + .map(|chunk| chunk.join(", ")) + .collect::>() + .join("\n\t ") + ) } } diff --git a/src/interface/iface.rs b/src/interface/iface.rs index d8e6cee0..1c103e88 100644 --- a/src/interface/iface.rs +++ b/src/interface/iface.rs @@ -85,8 +85,7 @@ impl IfaceId { pub const fn from_array(id: [u8; 32]) -> Self { IfaceId(Bytes32::from_array(id)) } } -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Display, From)] -#[display(inner)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, From)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -100,6 +99,21 @@ pub enum IfaceRef { Id(IfaceId), } +impl Display for IfaceRef { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + match self { + IfaceRef::Name(name) => f.write_str(name.as_str()), + IfaceRef::Id(id) => { + if f.alternate() { + write!(f, "{}", id.to_baid64_mnemonic()) + } else { + write!(f, "{}", id) + } + } + } + } +} + #[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug)] pub enum Req { Optional, From 05f1e0c0f44e5927e49a7966f946db95b372050c Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 23 Apr 2024 17:53:41 +0200 Subject: [PATCH 43/52] iface: add standard and features to the info object --- src/info.rs | 37 ++++++++++++++++++++++++++++++++++++- src/persistence/stock.rs | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/info.rs b/src/info.rs index d06b7345..f3447fbe 100644 --- a/src/info.rs +++ b/src/info.rs @@ -39,6 +39,8 @@ pub struct IfaceInfo { pub id: IfaceId, pub version: VerNo, pub name: TypeName, + pub standard: Option, + pub features: Vec, pub developer: Identity, pub created_at: DateTime, pub inherits: Vec, @@ -46,11 +48,36 @@ pub struct IfaceInfo { } impl IfaceInfo { - pub fn with(iface: &Iface, names: &HashMap) -> Self { + pub fn new(iface: &Iface, names: &HashMap) -> Self { + Self::with(iface, None, vec![], names) + } + + pub fn standard<'f, F: Display + 'f>( + iface: &Iface, + standard: TypeName, + features: impl IntoIterator, + names: &HashMap, + ) -> Self { + Self::with( + iface, + Some(standard), + features.into_iter().map(F::to_string).collect(), + names, + ) + } + + pub fn with( + iface: &Iface, + standard: Option, + features: Vec, + names: &HashMap, + ) -> Self { IfaceInfo { id: iface.iface_id(), version: iface.version, name: iface.name.clone(), + standard, + features, developer: iface.developer.clone(), created_at: Utc .timestamp_opt(iface.timestamp, 0) @@ -74,6 +101,14 @@ impl IfaceInfo { impl Display for IfaceInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!( + f, + "{}", + self.standard + .as_ref() + .map(TypeName::to_string) + .unwrap_or_else(|| s!("~")) + )?; write!(f, "{: <40}\t", self.name)?; write!(f, "{}\t", self.created_at.format("%Y-%m-%d"))?; write!(f, "{}\t", self.version)?; diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 92b7f1b1..0b59b063 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -385,7 +385,7 @@ impl Stock { Ok(self .stash .ifaces()? - .map(move |iface| IfaceInfo::with(iface, &names))) + .map(move |iface| IfaceInfo::new(iface, &names))) } pub fn iface(&self, iface: impl Into) -> Result<&Iface, StockError> { Ok(self.stash.iface(iface)?) From 664738bc59934fea4c25fe62ee44717431585789 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 23 Apr 2024 22:15:30 +0200 Subject: [PATCH 44/52] iface: use supplements to provide interface standard and features info --- src/containers/mod.rs | 7 ++-- src/containers/suppl.rs | 10 ++++++ src/containers/util.rs | 24 ++++++++----- src/info.rs | 73 ++++++++++++++++++++++++++++----------- src/persistence/memory.rs | 48 ++++++++++++++++++------- src/persistence/stash.rs | 23 ++++++++++-- src/persistence/stock.rs | 12 ++++--- 7 files changed, 147 insertions(+), 50 deletions(-) diff --git a/src/containers/mod.rs b/src/containers/mod.rs index e8888dd8..f4b3c759 100644 --- a/src/containers/mod.rs +++ b/src/containers/mod.rs @@ -55,11 +55,12 @@ pub use partials::{ pub use seal::{BuilderSeal, TerminalSeal, VoutSeal}; pub use suppl::{ AnnotationName, Annotations, ContentRef, SupplId, SupplItem, SupplMap, SupplSub, Supplement, - TickerSuppl, VelocityHint, SUPPL_ANNOT_VELOCITY, + TickerSuppl, VelocityHint, SUPPL_ANNOT_IFACE_CLASS, SUPPL_ANNOT_IFACE_FEATURES, + SUPPL_ANNOT_VELOCITY, }; pub use util::{ - ContainerVer, ContentId, ContentSigs, DumbValidator, SigBlob, SigValidator, SigValidity, - Terminal, TerminalDisclose, + ContainerVer, ContentId, ContentSigs, DumbValidator, SigBlob, SigValidator, Terminal, + TerminalDisclose, TrustLevel, }; pub const ASCII_ARMOR_NAME: &str = "Name"; diff --git a/src/containers/suppl.rs b/src/containers/suppl.rs index c162a161..437c9006 100644 --- a/src/containers/suppl.rs +++ b/src/containers/suppl.rs @@ -38,6 +38,8 @@ use crate::interface::{IfaceId, ImplId}; use crate::LIB_NAME_RGB_STD; pub const SUPPL_ANNOT_VELOCITY: &str = "Velocity"; +pub const SUPPL_ANNOT_IFACE_CLASS: &str = "Standard"; +pub const SUPPL_ANNOT_IFACE_FEATURES: &str = "Features"; /// Contract supplement identifier. /// @@ -204,6 +206,14 @@ impl StrictDeserialize for Supplement {} impl Supplement { pub fn suppl_id(&self) -> SupplId { self.commit_id() } + pub fn get_default_opt( + &self, + sub: SupplSub, + name: impl Into, + ) -> Option { + self.get_default(sub, name).transpose().ok().flatten() + } + pub fn get_default( &self, sub: SupplSub, diff --git a/src/containers/util.rs b/src/containers/util.rs index 22136bd7..b53b217c 100644 --- a/src/containers/util.rs +++ b/src/containers/util.rs @@ -88,33 +88,41 @@ pub enum ContainerVer { } pub trait SigValidator { - fn validate_sig(&self, identity: &Identity, sig: SigBlob) -> SigValidity; + fn validate_sig(&self, identity: &Identity, sig: SigBlob) -> bool; } pub struct DumbValidator; impl SigValidator for DumbValidator { - fn validate_sig(&self, _: &Identity, _: SigBlob) -> SigValidity { SigValidity::Untrusted } + fn validate_sig(&self, _: &Identity, _: SigBlob) -> bool { false } } -#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display)] +#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, Default)] #[display(lowercase)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD, tags = repr, into_u8, try_from_u8)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", rename_all = "camelCase") +)] #[repr(u8)] -pub enum SigValidity { - Invalid = 0, - Unknown = 0x10, +pub enum TrustLevel { + Malicious = 0x10, + #[default] + Unknown = 0x20, Untrusted = 0x40, Trusted = 0x80, Ultimate = 0xC0, } -impl SigValidity { +impl TrustLevel { pub fn should_accept(self) -> bool { self >= Self::Unknown } pub fn should_use(self) -> bool { self >= Self::Trusted } pub fn must_use(self) -> bool { self >= Self::Ultimate } } #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] -#[derive(StrictType, strict_encoding::StrictDumb, StrictEncode, StrictDecode)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD, tags = order, dumb = ContentId::Schema(strict_dumb!()))] #[cfg_attr( feature = "serde", diff --git a/src/info.rs b/src/info.rs index f3447fbe..c83a9642 100644 --- a/src/info.rs +++ b/src/info.rs @@ -20,14 +20,48 @@ // limitations under the License. use std::collections::HashMap; -use std::fmt::{self, Display, Formatter, Write}; +use std::fmt::{self, Debug, Display, Formatter, Write}; +use std::str::FromStr; +use amplify::confinement::TinyVec; use chrono::{DateTime, TimeZone, Utc}; use rgb::{AltLayer1Set, ContractId, Genesis, Identity, Operation, SchemaId}; -use strict_encoding::{FieldName, TypeName}; +use strict_encoding::stl::{AlphaCapsLodash, AlphaNumLodash}; +use strict_encoding::{FieldName, RString, StrictDeserialize, StrictSerialize, TypeName}; +use crate::containers::{ + SupplSub, Supplement, SUPPL_ANNOT_IFACE_CLASS, SUPPL_ANNOT_IFACE_FEATURES, +}; use crate::interface::{Iface, IfaceId, IfaceImpl, IfaceRef, ImplId, VerNo}; use crate::persistence::SchemaIfaces; +use crate::LIB_NAME_RGB_STD; + +#[derive(Wrapper, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, From)] +#[wrapper(Deref, Display, FromStr)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_crate", transparent) +)] +pub struct IfaceClassName(RString); + +impl_ident_type!(IfaceClassName); +impl_ident_subtype!(IfaceClassName); +impl_strict_newtype!(IfaceClassName, LIB_NAME_RGB_STD); + +impl StrictSerialize for IfaceClassName {} +impl StrictDeserialize for IfaceClassName {} + +#[derive(Wrapper, WrapperMut, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default, From)] +#[wrapper(Deref)] +#[wrapper_mut(DerefMut)] +#[derive(StrictType, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_RGB_STD)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] +pub struct FeatureList(TinyVec); + +impl StrictSerialize for FeatureList {} +impl StrictDeserialize for FeatureList {} #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] #[cfg_attr( @@ -39,8 +73,8 @@ pub struct IfaceInfo { pub id: IfaceId, pub version: VerNo, pub name: TypeName, - pub standard: Option, - pub features: Vec, + pub standard: Option, + pub features: FeatureList, pub developer: Identity, pub created_at: DateTime, pub inherits: Vec, @@ -48,28 +82,27 @@ pub struct IfaceInfo { } impl IfaceInfo { - pub fn new(iface: &Iface, names: &HashMap) -> Self { - Self::with(iface, None, vec![], names) - } - - pub fn standard<'f, F: Display + 'f>( + pub fn new( iface: &Iface, - standard: TypeName, - features: impl IntoIterator, names: &HashMap, + suppl: Option<&Supplement>, ) -> Self { - Self::with( - iface, - Some(standard), - features.into_iter().map(F::to_string).collect(), - names, - ) + let mut standard = None; + let mut features = none!(); + if let Some(suppl) = suppl { + standard = + suppl.get_default_opt::(SupplSub::Itself, SUPPL_ANNOT_IFACE_CLASS); + suppl + .get_default_opt::(SupplSub::Itself, SUPPL_ANNOT_IFACE_FEATURES) + .map(|list| features = list); + } + Self::with(iface, standard, features, names) } pub fn with( iface: &Iface, - standard: Option, - features: Vec, + standard: Option, + features: FeatureList, names: &HashMap, ) -> Self { IfaceInfo { @@ -106,7 +139,7 @@ impl Display for IfaceInfo { "{}", self.standard .as_ref() - .map(TypeName::to_string) + .map(IfaceClassName::to_string) .unwrap_or_else(|| s!("~")) )?; write!(f, "{: <40}\t", self.name)?; diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index 6ac55f0d..d18f41ba 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -44,7 +44,7 @@ use super::{ StateUpdateError, StateWriteProvider, }; use crate::containers::{ - AnchorSet, ContentId, ContentRef, ContentSigs, SealWitness, SigBlob, Supplement, + AnchorSet, ContentId, ContentRef, ContentSigs, SealWitness, SigBlob, Supplement, TrustLevel, }; use crate::interface::{Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef}; use crate::resolvers::ResolveHeight; @@ -70,6 +70,7 @@ pub struct MemStash { attachments: SmallOrdMap, secret_seals: MediumOrdSet>, type_system: TypeSystem, + identities: SmallOrdMap, libs: SmallOrdMap, sigs: SmallOrdMap, } @@ -152,6 +153,14 @@ impl StashReadProvider for MemStash { .ok_or_else(|| StashInconsistency::SchemaAbsent(schema_id).into()) } + fn get_trust(&self, identity: &Identity) -> Result { + Ok(self.identities.get(identity).copied().unwrap_or_default()) + } + + fn supplement(&self, content_ref: ContentRef) -> Result, Self::Error> { + Ok(self.suppl.get(&content_ref).and_then(|s| s.first())) + } + fn supplements( &self, content_ref: ContentRef, @@ -287,6 +296,15 @@ impl StashWriteProvider for MemStash { Ok(!present) } + fn set_trust( + &mut self, + identity: Identity, + trust: TrustLevel, + ) -> Result<(), confinement::Error> { + self.identities.insert(identity, trust)?; + Ok(()) + } + fn add_suppl(&mut self, suppl: Supplement) -> Result<(), confinement::Error> { match self.suppl.get_mut(&suppl.content_id) { None => { @@ -340,18 +358,24 @@ impl StashWriteProvider for MemStash { } fn import_sigs(&mut self, content_id: ContentId, sigs: I) -> Result<(), confinement::Error> - where - I: IntoIterator, - I::IntoIter: ExactSizeIterator, - { - let sigs = sigs.into_iter(); - if sigs.len() > 0 { - if let Some(prev_sigs) = self.sigs.get_mut(&content_id) { - prev_sigs.extend(sigs)?; - } else { - let sigs = Confined::try_from_iter(sigs)?; - self.sigs.insert(content_id, ContentSigs::from(sigs)).ok(); + where I: IntoIterator { + let sigs = sigs.into_iter().filter(|(id, _)| { + match self.identities.get(id) { + Some(level) => *level, + None => { + let level = TrustLevel::default(); + // We ignore if the identities are full + self.identities.insert(id.clone(), level).ok(); + level + } } + .should_accept() + }); + if let Some(prev_sigs) = self.sigs.get_mut(&content_id) { + prev_sigs.extend(sigs)?; + } else { + let sigs = Confined::try_from_iter(sigs)?; + self.sigs.insert(content_id, ContentSigs::from(sigs)).ok(); } Ok(()) } diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index f2d160c8..7eff416a 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -24,6 +24,7 @@ use std::error::Error; use std::fmt::Debug; use aluvm::library::{Lib, LibId}; +use amplify::confinement; use amplify::confinement::{Confined, MediumBlob, TinyOrdMap}; use bp::dbc::anchor::MergeError; use bp::dbc::tapret::TapretCommitment; @@ -39,6 +40,7 @@ use strict_types::TypeSystem; use crate::containers::{ BundledWitness, Consignment, ContentId, ContentRef, Kit, SealWitness, SigBlob, Supplement, + TrustLevel, }; use crate::interface::{ ContractBuilder, Iface, IfaceClass, IfaceId, IfaceImpl, IfaceRef, TransitionBuilder, @@ -253,6 +255,15 @@ impl Stash

{ .map_err(StashError::ReadProvider) } + pub(super) fn supplement( + &self, + content_ref: ContentRef, + ) -> Result, StashError

> { + self.provider + .supplement(content_ref) + .map_err(StashError::ReadProvider) + } + pub(super) fn extract<'a>( &self, schema: &Schema, @@ -606,6 +617,9 @@ pub trait StashReadProvider { let genesis = self.genesis(contract_id)?; self.schema(genesis.schema_id) } + + fn get_trust(&self, identity: &Identity) -> Result; + fn supplement(&self, content_ref: ContentRef) -> Result, Self::Error>; fn supplements( &self, content_ref: ContentRef, @@ -641,11 +655,14 @@ pub trait StashWriteProvider { fn replace_lib(&mut self, lib: Lib) -> Result; fn consume_types(&mut self, types: TypeSystem) -> Result<(), Self::Error>; + fn set_trust( + &mut self, + identity: Identity, + trust: TrustLevel, + ) -> Result<(), confinement::Error>; fn add_suppl(&mut self, suppl: Supplement) -> Result<(), Self::Error>; fn import_sigs(&mut self, content_id: ContentId, sigs: I) -> Result<(), Self::Error> - where - I: IntoIterator, - I::IntoIter: ExactSizeIterator; + where I: IntoIterator; fn add_secret_seal(&mut self, seal: XChain) -> Result; } diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 0b59b063..c5836229 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -382,10 +382,14 @@ impl Stock { .ifaces()? .map(|iface| (iface.iface_id(), iface.name.clone())) .collect::>(); - Ok(self - .stash - .ifaces()? - .map(move |iface| IfaceInfo::new(iface, &names))) + Ok(self.stash.ifaces()?.map(move |iface| { + let suppl = self + .stash + .supplement(ContentRef::Iface(iface.iface_id())) + .ok() + .flatten(); + IfaceInfo::new(iface, &names, suppl) + })) } pub fn iface(&self, iface: impl Into) -> Result<&Iface, StockError> { Ok(self.stash.iface(iface)?) From 824a90ef5b897533563bc119d14796ab2bacd5e1 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 25 Apr 2024 20:44:01 +0200 Subject: [PATCH 45/52] display debugging --- src/containers/kit.rs | 50 +++++++++++++++++++++++------ src/containers/suppl.rs | 58 +++++++++++++++++++++++++++++++-- src/info.rs | 67 +++++++++++++++++++-------------------- src/persistence/memory.rs | 2 +- src/persistence/stash.rs | 4 +-- 5 files changed, 132 insertions(+), 49 deletions(-) diff --git a/src/containers/kit.rs b/src/containers/kit.rs index 84878cb0..6457123c 100644 --- a/src/containers/kit.rs +++ b/src/containers/kit.rs @@ -35,8 +35,8 @@ use strict_encoding::{StrictDeserialize, StrictSerialize}; use strict_types::TypeSystem; use super::{ - Supplement, ASCII_ARMOR_IFACE, ASCII_ARMOR_IIMPL, ASCII_ARMOR_SCHEMA, ASCII_ARMOR_SCRIPT, - ASCII_ARMOR_SUPPL, ASCII_ARMOR_TYPE_SYSTEM, ASCII_ARMOR_VERSION, + ContentRef, Supplement, ASCII_ARMOR_IFACE, ASCII_ARMOR_IIMPL, ASCII_ARMOR_SCHEMA, + ASCII_ARMOR_SCRIPT, ASCII_ARMOR_TYPE_SYSTEM, ASCII_ARMOR_VERSION, }; use crate::containers::{ContainerVer, ContentId, ContentSigs}; use crate::interface::{Iface, IfaceImpl}; @@ -203,33 +203,63 @@ impl StrictArmor for Kit { vec![ArmorHeader::new(ASCII_ARMOR_VERSION, format!("{:#}", self.version))]; for schema in &self.schemata { let mut header = ArmorHeader::new(ASCII_ARMOR_SCHEMA, schema.name.to_string()); + let id = schema.schema_id(); + header.params.push((s!("id"), format!("{id:-}"))); header .params - .push((s!("id"), schema.schema_id().to_string())); + .push((s!("dev"), schema.developer.to_string())); + if let Some(suppl) = self + .supplements + .iter() + .find(|s| s.content_id == ContentRef::Schema(id)) + { + header + .params + .push((s!("suppl"), format!("{:-}", suppl.suppl_id()))); + } headers.push(header); } for iface in &self.ifaces { let mut header = ArmorHeader::new(ASCII_ARMOR_IFACE, iface.name.to_string()); - header.params.push((s!("id"), iface.iface_id().to_string())); + let id = iface.iface_id(); + header.params.push((s!("id"), format!("{id:-}"))); + header.params.push((s!("dev"), iface.developer.to_string())); + if let Some(suppl) = self + .supplements + .iter() + .find(|s| s.content_id == ContentRef::Iface(id)) + { + header + .params + .push((s!("suppl"), format!("{:-}", suppl.suppl_id()))); + } headers.push(header); } for iimpl in &self.iimpls { - let mut header = ArmorHeader::new(ASCII_ARMOR_IIMPL, iimpl.impl_id().to_string()); + let id = iimpl.impl_id(); + let mut header = ArmorHeader::new(ASCII_ARMOR_IIMPL, format!("{id:-}")); header .params - .push((s!("interface"), iimpl.iface_id.to_string())); + .push((s!("interface"), format!("{:-}", iimpl.iface_id))); header .params - .push((s!("schema"), iimpl.schema_id.to_string())); + .push((s!("schema"), format!("{:-}", iimpl.schema_id))); + header.params.push((s!("dev"), iimpl.developer.to_string())); + if let Some(suppl) = self + .supplements + .iter() + .find(|s| s.content_id == ContentRef::IfaceImpl(id)) + { + header + .params + .push((s!("suppl"), format!("{:-}", suppl.suppl_id()))); + } headers.push(header); } headers.push(ArmorHeader::new(ASCII_ARMOR_TYPE_SYSTEM, self.types.id().to_string())); for lib in &self.scripts { headers.push(ArmorHeader::new(ASCII_ARMOR_SCRIPT, lib.id().to_string())); } - for suppl in &self.supplements { - headers.push(ArmorHeader::new(ASCII_ARMOR_SUPPL, suppl.suppl_id().to_string())); - } headers } } diff --git a/src/containers/suppl.rs b/src/containers/suppl.rs index 437c9006..5da0ea8b 100644 --- a/src/containers/suppl.rs +++ b/src/containers/suppl.rs @@ -26,11 +26,13 @@ use std::str::FromStr; use amplify::confinement::{SmallBlob, TinyOrdMap}; use amplify::{ByteArray, Bytes32}; use baid64::{Baid64ParseError, DisplayBaid64, FromBaid64Str}; +use chrono::Utc; use commit_verify::{CommitId, CommitmentId, DigestExt, Sha256}; use rgb::{AssignmentType, ContractId, GlobalStateType, Identity, SchemaId}; use strict_encoding::stl::{AlphaCaps, AlphaNumDash}; use strict_encoding::{ - DeserializeError, FieldName, RString, StrictDeserialize, StrictSerialize, TypeName, VariantName, + DeserializeError, FieldName, RString, SerializeError, StrictDeserialize, StrictSerialize, + TypeName, VariantName, }; use strict_types::value; @@ -101,7 +103,7 @@ impl From<&'static str> for AnnotationName { fn from(s: &'static str) -> Self { Self(RString::from(s)) } } -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Display)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Display, From)] #[display(inner)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD, tags = order, dumb = ContentRef::Schema(strict_dumb!()))] @@ -111,9 +113,13 @@ impl From<&'static str> for AnnotationName { serde(crate = "serde_crate", rename_all = "camelCase") )] pub enum ContentRef { + #[from] Schema(SchemaId), + #[from] Genesis(ContractId), + #[from] Iface(IfaceId), + #[from] IfaceImpl(ImplId), } @@ -206,6 +212,15 @@ impl StrictDeserialize for Supplement {} impl Supplement { pub fn suppl_id(&self) -> SupplId { self.commit_id() } + pub fn new(content: impl Into, creator: impl Into) -> Self { + Supplement { + content_id: content.into(), + timestamp: Utc::now().timestamp(), + creator: creator.into(), + annotations: none!(), + } + } + pub fn get_default_opt( &self, sub: SupplSub, @@ -236,6 +251,45 @@ impl Supplement { let annotation = self.annotations.get(&sub)?.get(&item)?.get(&name.into())?; Some(T::from_strict_serialized(annotation.clone())) } + + pub fn annotate_itself( + &mut self, + name: impl Into, + data: &impl StrictSerialize, + ) -> Result { + self.annotate_default(SupplSub::Itself, name, data) + } + + pub fn annotate_default( + &mut self, + sub: SupplSub, + name: impl Into, + data: &impl StrictSerialize, + ) -> Result { + self.annotate(sub, SupplItem::Default, name, data) + } + + pub fn annotate( + &mut self, + sub: SupplSub, + item: SupplItem, + name: impl Into, + data: &impl StrictSerialize, + ) -> Result { + let mut a = self + .annotations + .remove(&sub) + .expect("zero items allowed") + .unwrap_or_default(); + let mut b = a + .remove(&item) + .expect("zero items allowed") + .unwrap_or_default(); + let prev = b.insert(name.into(), data.to_strict_serialized()?)?; + a.insert(item, b)?; + self.annotations.insert(sub, a)?; + Ok(prev.is_some()) + } } #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] diff --git a/src/info.rs b/src/info.rs index c83a9642..5dd17681 100644 --- a/src/info.rs +++ b/src/info.rs @@ -20,10 +20,10 @@ // limitations under the License. use std::collections::HashMap; -use std::fmt::{self, Debug, Display, Formatter, Write}; +use std::fmt::{self, Debug, Display, Formatter}; use std::str::FromStr; -use amplify::confinement::TinyVec; +use amplify::confinement::TinyOrdSet; use chrono::{DateTime, TimeZone, Utc}; use rgb::{AltLayer1Set, ContractId, Genesis, Identity, Operation, SchemaId}; use strict_encoding::stl::{AlphaCapsLodash, AlphaNumLodash}; @@ -58,7 +58,7 @@ impl StrictDeserialize for IfaceClassName {} #[derive(StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_STD)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] -pub struct FeatureList(TinyVec); +pub struct FeatureList(TinyOrdSet); impl StrictSerialize for FeatureList {} impl StrictDeserialize for FeatureList {} @@ -136,24 +136,34 @@ impl Display for IfaceInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { write!( f, - "{}", + "{}\t", self.standard .as_ref() .map(IfaceClassName::to_string) .unwrap_or_else(|| s!("~")) )?; - write!(f, "{: <40}\t", self.name)?; + write!(f, "{: <40}\t", self.name.to_string())?; write!(f, "{}\t", self.created_at.format("%Y-%m-%d"))?; write!(f, "{}\t", self.version)?; writeln!(f, "{}", self.id)?; - writeln!(f, "\tDeveloper: {}", self.developer.to_string())?; + writeln!( + f, + " Features: {}", + self.features + .iter() + .map(FieldName::to_string) + .collect::>() + .join(", ") + )?; + + writeln!(f, " Defaults to: {}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; - writeln!(f, "\tDefaults to: {}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; + writeln!(f, " Developer: {}", self.developer.to_string())?; writeln!( f, - "\tInherits: {}", + " Inherits: {}", self.inherits .iter() .map(|f| format!("{:#}", f)) @@ -161,7 +171,7 @@ impl Display for IfaceInfo { .chunks(5) .map(|chunk| chunk.join(", ")) .collect::>() - .join("\n\t ") + .join("\n ") ) } } @@ -202,16 +212,12 @@ impl SchemaInfo { impl Display for SchemaInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{: <18}", self.developer.to_string())?; - f.write_char(f.fill())?; - write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; - f.write_char(f.fill())?; - write!(f, "{: <80}", self.id.to_string())?; - f.write_char(f.fill())?; - writeln!(f, "{: <24}", self.name)?; - f.write_char(f.fill())?; + write!(f, "{: <24}", self.name.to_string())?; + write!(f, "\t{: <80}", self.id.to_string())?; + write!(f, "\t{}", self.created_at.format("%Y-%m-%d"))?; + writeln!(f, "\t{}", self.developer)?; for info in &self.implements { - writeln!(f, "\t{info}")?; + write!(f, " {info}")?; } Ok(()) } @@ -248,13 +254,10 @@ impl ImplInfo { impl Display for ImplInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{: <24}", self.iface_name)?; - f.write_char(f.fill())?; - write!(f, "{: <18}", self.developer.to_string())?; - f.write_char(f.fill())?; - write!(f, "{}", self.created_at.format("%Y-%m-%d"))?; - f.write_char(f.fill())?; - write!(f, "{: <80}", self.id.to_string()) + write!(f, "{: <24}", self.iface_name.to_string())?; + write!(f, "\t{: <80}", self.id.to_string())?; + write!(f, "\t{}", self.created_at.format("%Y-%m-%d"))?; + writeln!(f, "\t{}", self.developer) } } @@ -291,21 +294,17 @@ impl ContractInfo { impl Display for ContractInfo { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{: <18}", self.issuer.to_string())?; - f.write_char(f.fill())?; - write!(f, "{: <80}", self.id.to_string())?; - f.write_char(f.fill())?; + write!(f, "{}", self.id)?; write!( f, - "bitcoin{: <8}", + "\tbitcoin{: <12}", self.alt_layers1 .iter() .map(|layer| format!(", {layer}")) .collect::() )?; - f.write_char(f.fill())?; - write!(f, "{}", self.issued_at.format("%Y-%m-%d"))?; - f.write_char(f.fill())?; - writeln!(f, "{}", self.schema_id) + write!(f, "\t{}", self.issued_at.format("%Y-%m-%d"))?; + writeln!(f, "\t{: <80}", self.schema_id.to_string())?; + writeln!(f, " Developer: {}", self.issuer) } } diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index d18f41ba..33d73bd7 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -305,7 +305,7 @@ impl StashWriteProvider for MemStash { Ok(()) } - fn add_suppl(&mut self, suppl: Supplement) -> Result<(), confinement::Error> { + fn add_supplement(&mut self, suppl: Supplement) -> Result<(), confinement::Error> { match self.suppl.get_mut(&suppl.content_id) { None => { self.suppl.insert(suppl.content_id, confined_bset![suppl])?; diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index 7eff416a..93975fd4 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -435,7 +435,7 @@ impl Stash

{ // TODO: filter out non-trusted signers for suppl in kit.supplements { self.provider - .add_suppl(suppl) + .add_supplement(suppl) .map_err(StashError::WriteProvider)?; } @@ -660,7 +660,7 @@ pub trait StashWriteProvider { identity: Identity, trust: TrustLevel, ) -> Result<(), confinement::Error>; - fn add_suppl(&mut self, suppl: Supplement) -> Result<(), Self::Error>; + fn add_supplement(&mut self, suppl: Supplement) -> Result<(), Self::Error>; fn import_sigs(&mut self, content_id: ContentId, sigs: I) -> Result<(), Self::Error> where I: IntoIterator; From 482ae9a7adbf4a2d945289ed598a8e8a3d77067f Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 26 Apr 2024 22:14:11 +0200 Subject: [PATCH 46/52] api improvements --- Cargo.lock | 4 ++-- src/info.rs | 20 +++++++++++--------- src/persistence/index.rs | 2 +- src/persistence/stash.rs | 2 +- src/persistence/stock.rs | 2 +- src/stl/mime.rs | 2 +- src/stl/specs.rs | 15 ++++++++++++++- 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a38fb939..9178597d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -885,7 +885,7 @@ dependencies = [ [[package]] name = "strict_encoding" version = "2.7.0-beta.3" -source = "git+https://github.com/strict-types/strict-encoding?branch=develop#7fbf31b2bc0f117cba5ae676e46e4ef3656616f5" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#901e26ee8b01b3bcff4d7ac76acff2fcc633634b" dependencies = [ "amplify", "half", @@ -896,7 +896,7 @@ dependencies = [ [[package]] name = "strict_encoding_derive" version = "2.7.0-beta.3" -source = "git+https://github.com/strict-types/strict-encoding?branch=develop#7fbf31b2bc0f117cba5ae676e46e4ef3656616f5" +source = "git+https://github.com/strict-types/strict-encoding?branch=develop#901e26ee8b01b3bcff4d7ac76acff2fcc633634b" dependencies = [ "amplify_syn", "heck", diff --git a/src/info.rs b/src/info.rs index 5dd17681..d769b948 100644 --- a/src/info.rs +++ b/src/info.rs @@ -20,7 +20,7 @@ // limitations under the License. use std::collections::HashMap; -use std::fmt::{self, Debug, Display, Formatter}; +use std::fmt::{self, Debug, Display, Formatter, Write}; use std::str::FromStr; use amplify::confinement::TinyOrdSet; @@ -92,9 +92,11 @@ impl IfaceInfo { if let Some(suppl) = suppl { standard = suppl.get_default_opt::(SupplSub::Itself, SUPPL_ANNOT_IFACE_CLASS); - suppl - .get_default_opt::(SupplSub::Itself, SUPPL_ANNOT_IFACE_FEATURES) - .map(|list| features = list); + if let Some(list) = + suppl.get_default_opt::(SupplSub::Itself, SUPPL_ANNOT_IFACE_FEATURES) + { + features = list + }; } Self::with(iface, standard, features, names) } @@ -159,7 +161,7 @@ impl Display for IfaceInfo { writeln!(f, " Defaults to: {}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; - writeln!(f, " Developer: {}", self.developer.to_string())?; + writeln!(f, " Developer: {}", self.developer)?; writeln!( f, @@ -298,10 +300,10 @@ impl Display for ContractInfo { write!( f, "\tbitcoin{: <12}", - self.alt_layers1 - .iter() - .map(|layer| format!(", {layer}")) - .collect::() + self.alt_layers1.iter().fold(s!(""), |mut acc, layer| { + write!(acc, ", {layer}").ok(); + acc + }) )?; write!(f, "\t{}", self.issued_at.format("%Y-%m-%d"))?; writeln!(f, "\t{: <80}", self.schema_id.to_string())?; diff --git a/src/persistence/index.rs b/src/persistence/index.rs index a061dc5f..187cb10b 100644 --- a/src/persistence/index.rs +++ b/src/persistence/index.rs @@ -125,7 +125,7 @@ pub enum IndexInconsistency { BundleWitnessUnknown(BundleId), } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Index { provider: P, } diff --git a/src/persistence/stash.rs b/src/persistence/stash.rs index 93975fd4..ae3ef435 100644 --- a/src/persistence/stash.rs +++ b/src/persistence/stash.rs @@ -184,7 +184,7 @@ impl SchemaIfaces { } } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Stash { provider: P, } diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index c5836229..bf7c4781 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -334,7 +334,7 @@ stock_err_conv!(ContractIfaceError, InputError); pub type StockErrorMem = StockError; pub type StockErrorAll = StockError; -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Stock< S: StashProvider = MemStash, H: StateProvider = MemState, diff --git a/src/stl/mime.rs b/src/stl/mime.rs index 4ee27356..1e58f3fd 100644 --- a/src/stl/mime.rs +++ b/src/stl/mime.rs @@ -21,7 +21,7 @@ #![allow(unused_braces)] -use std::fmt::{self, Debug, Formatter}; +use std::fmt::{self, Debug}; use std::str::FromStr; use strict_encoding::stl::AlphaSmall; diff --git a/src/stl/specs.rs b/src/stl/specs.rs index ff916371..b30863db 100644 --- a/src/stl/specs.rs +++ b/src/stl/specs.rs @@ -22,6 +22,7 @@ #![allow(unused_braces)] // caused by rustc unable to understand strict_dumb use std::fmt::{self, Debug, Formatter}; +use std::hash::{Hash, Hasher}; use std::str::FromStr; use amplify::confinement::{Confined, NonEmptyString, SmallOrdSet, SmallString, U8}; @@ -78,7 +79,7 @@ pub struct Article(RString); impl_ident_type!(Article); impl_ident_subtype!(Article); -#[derive(Wrapper, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, From)] +#[derive(Wrapper, Clone, Ord, PartialOrd, Eq, From)] #[wrapper(Deref, Display, FromStr)] #[derive(StrictDumb, StrictType, StrictEncode, StrictDecode)] #[strict_type(lib = LIB_NAME_RGB_CONTRACT, dumb = { Ticker::from("DUMB") })] @@ -89,6 +90,18 @@ impl_ident_subtype!(Article); )] pub struct Ticker(RString); +impl PartialEq for Ticker { + fn eq(&self, other: &Self) -> bool { + self.as_str() + .to_uppercase() + .eq(&other.as_str().to_uppercase()) + } +} + +impl Hash for Ticker { + fn hash(&self, state: &mut H) { self.as_str().to_uppercase().hash(state) } +} + impl_ident_type!(Ticker); impl_ident_subtype!(Ticker); From cef39a08e3586b59973c1eae038e15f898814be4 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Fri, 26 Apr 2024 22:14:11 +0200 Subject: [PATCH 47/52] info: fix panic --- src/info.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/info.rs b/src/info.rs index d769b948..261d890d 100644 --- a/src/info.rs +++ b/src/info.rs @@ -159,7 +159,14 @@ impl Display for IfaceInfo { .join(", ") )?; - writeln!(f, " Defaults to: {}", self.default_op.clone().unwrap_or_else(|| fname!("~")))?; + writeln!( + f, + " Defaults to: {}", + self.default_op + .as_ref() + .map(FieldName::to_string) + .unwrap_or_else(|| s!("~")) + )?; writeln!(f, " Developer: {}", self.developer)?; From 8ee3144315390b12dad6912b957e8e5e49378762 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 28 Apr 2024 21:41:05 +0200 Subject: [PATCH 48/52] chore: update ASCII armoring --- Cargo.lock | 28 +- Cargo.toml | 3 +- stl/RGBContract@0.11.0.sta | 95 +++--- stl/RGBStd@0.11.0.sta | 684 +++++++++++++++++-------------------- 4 files changed, 361 insertions(+), 449 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9178597d..2b7b6cb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ version = 3 [[package]] name = "aluvm" version = "0.11.0-beta.5" -source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#d8efe3007a5680a99cf86159b8dcc81cf1ed7278" +source = "git+https://github.com/AluVM/rust-aluvm?branch=develop#25be42a16519383daaa6ba50e65654ff0a1721aa" dependencies = [ "amplify", "ascii-armor", @@ -121,8 +121,9 @@ dependencies = [ [[package]] name = "ascii-armor" -version = "0.4.0" -source = "git+https://github.com/UBIDECO/ascii-armor#38dc9767f36db3957ac3dade280a04d9a72b6be4" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673486110323d50d9f33d99f0f526726b4721b1b596284351e75d3692225abe8" dependencies = [ "amplify", "baid64", @@ -467,9 +468,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -645,11 +646,10 @@ dependencies = [ [[package]] name = "rgb-core" version = "0.11.0-beta.5" -source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#0d7bbcc45d448b71d6c93beb804a3c7062e6891c" +source = "git+https://github.com/RGB-WG/rgb-core?branch=develop#3fa35c1428796cb607c8a627765aabb2e8329b62" dependencies = [ "aluvm", "amplify", - "ascii-armor", "baid64", "bp-core", "chrono", @@ -802,18 +802,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" dependencies = [ "proc-macro2", "quote", @@ -908,7 +908,7 @@ dependencies = [ [[package]] name = "strict_types" version = "2.7.0-beta.3" -source = "git+https://github.com/strict-types/strict-types?branch=develop#a2e860f36f24b477712551a6db349edcf08efb3e" +source = "git+https://github.com/strict-types/strict-types?branch=develop#4effa0b28804f7798a17f5dc6b4411ce6515f2f5" dependencies = [ "amplify", "ascii-armor", @@ -1226,9 +1226,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" +checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index c2355a3e..9cc2ab46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ license = "Apache-2.0" [workspace.dependencies] amplify = "4.6.0" -ascii-armor = "0.4.0" +ascii-armor = "0.6.0" baid64 = "0.1.0" strict_encoding = "2.7.0-beta.3" strict_types = "2.7.0-beta.3" @@ -97,7 +97,6 @@ wasm-bindgen-test = "0.3" features = ["all"] [patch.crates-io] -ascii-armor = { git = "https://github.com/UBIDECO/ascii-armor" } strict_encoding = { git = "https://github.com/strict-types/strict-encoding", branch = "develop" } strict_types = { git = "https://github.com/strict-types/strict-types", branch = "develop" } commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "develop" } diff --git a/stl/RGBContract@0.11.0.sta b/stl/RGBContract@0.11.0.sta index cc68c674..74620130 100644 --- a/stl/RGBContract@0.11.0.sta +++ b/stl/RGBContract@0.11.0.sta @@ -4,60 +4,49 @@ Name: RGBContract Dependencies: Std#ralph-blue-lucky, Bitcoin#signal-color-cipher -Checksum-SHA256: 6347d5f0a4c36a074fd3b6abb98041f64798a4a233e1742a352edc330dddbf3d +Check-SHA256: 6347d5f0a4c36a074fd3b6abb98041f64798a4a233e1742a352edc330dddbf3d -3sOfyLvL<$a$#e10?I5NZ-bfLFbqC#o>4E?M+l67UG^w8*<_XZ#%uyqCj(P-Wc6$ -lVk7oBr%DNv+($;q`HHK!gIHa)*%m(-e#9sm3I{@IbYpL6ZUP5FX>?<6X>J1mA>% -$n#j0HLDJN5-IKgM_J7b(p+0MPGk2Gl)y2(Rz1Xgc#bfbbo^UK%K(4i9Ajp1M~R@ -C@!4#dQE#lUD;OiKi1Rs>XdX=LbXK+Rkw`Mu(V|7oQWGN(Z+AyvH&RuaL#N1_Q*>km07$+g7b@t4MVjY>G@u4Q3HlB(d+LiLJm-R=h;`?dxDG*c -V`*tna%paKVPb4$UtT8V#RWVYMMP0s#-L?ApehHE`!Nx1aisd$7U5G>2tjOcXkku -uZGt0!^mXvL0b>G|!UaKWaA;xq7YGF1t^|4b)vt -7`JJJH?>OpeZskt`?6&l-r#0;SdL2PhnVN-2kY-|(&3PEgaZ)0I}X>V=?0s&*k#ka7f`4E? -M+l67UG^w8*<_XZ#%uyqCxRn@^mXvL0b>G|!T<; -Y$}AplgPGkh3_fq3Q7_j=2#kPT_9!;lWR>~GYywm#UtT8V#RWVYMMP0s#-L?Apeh -HE`!Nx1aisd$7U5G>00000000009{>OV000002|;snWpq<;Wn%^e26Sm-Yh`i)TX -!suv0v9m0LPL+_79KRH|I99{YEOV7tT#ZPWpkW1a4t%WdVR*#k^Az$U%@qU7>2Bz -={du0O&G0&#r1CLJBFZ06hm}W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Ft3ZOHs70;T-agdg$OP=xIp;K4#IcLF!~asU7T +000000RI300000000w1pa&K~T00{y`>Z4!V_T!KNI`QJ|h6;Zj^jB$MPK+?7Lu3>C`4HI&hQW&>`ZdvN +B=ndTz*X~v;Uq>`<)y^XImOPdju4Lk0000000030000000000HWMyVyb!>D&b8~5DZf#|5bN~bb00eGt +Ze;)f009JZZ*64&1pxv@>Z4!V_T!KNI`QJ|h6;Zj^jB$MPK+?7Lu3>C`4HI~v{(W1V6JV*{3!yZ{M3XW +@z+p~GYywm#VTK~nd#>$v +Yz6}cZDn+5Z)5^*9+vrsy<5&Clo)5)@&l6UwYFh+Ofu5^ik9drt)+7=w-6<{Ze +NoKcy!1~?PoRaGVc5iib0`+VYVk7oBr%DNv+($;q`HHK!gIHa)*%m(-e#9sm3L)b@L&d6G@+l`%qd385 +?K@+fP1(-9sgE>i7rMzqbqHc?X>Md`Zf5`h2m -----END STRICT TYPE LIB----- From 6d5502b89940a6b9d98c30e6c156501223a7ec2b Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 1 May 2024 09:55:08 +0200 Subject: [PATCH 49/52] containers: fix Fascia to include the whole witness tx --- src/containers/anchors.rs | 4 ++-- src/containers/partials.rs | 8 +++++--- src/persistence/stock.rs | 5 ++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/containers/anchors.rs b/src/containers/anchors.rs index 2d41df24..421151ec 100644 --- a/src/containers/anchors.rs +++ b/src/containers/anchors.rs @@ -50,9 +50,9 @@ pub struct SealWitness { } impl SealWitness { - pub fn new(witness_id: XWitnessId, anchors: AnchorSet) -> Self { + pub fn new(witness: XPubWitness, anchors: AnchorSet) -> Self { SealWitness { - public: witness_id.map(PubWitness::new), + public: witness, anchors, } } diff --git a/src/containers/partials.rs b/src/containers/partials.rs index 7979ba71..a45cf9ec 100644 --- a/src/containers/partials.rs +++ b/src/containers/partials.rs @@ -33,7 +33,7 @@ use rgb::{ }; use strict_encoding::{StrictDeserialize, StrictDumb, StrictSerialize}; -use crate::containers::AnchorSet; +use crate::containers::{AnchorSet, XPubWitness}; use crate::LIB_NAME_RGB_STD; #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] @@ -274,7 +274,7 @@ impl BundleDichotomy { serde(crate = "serde_crate", rename_all = "camelCase") )] pub struct Fascia { - pub witness_id: XWitnessId, + pub witness: XPubWitness, pub anchor: AnchorSet, pub bundles: Confined, 1, U24>, } @@ -282,7 +282,7 @@ pub struct Fascia { impl StrictDumb for Fascia { fn strict_dumb() -> Self { Fascia { - witness_id: strict_dumb!(), + witness: strict_dumb!(), anchor: strict_dumb!(), bundles: confined_bmap![strict_dumb!() => strict_dumb!()], } @@ -292,6 +292,8 @@ impl StrictSerialize for Fascia {} impl StrictDeserialize for Fascia {} impl Fascia { + pub fn witness_id(&self) -> XWitnessId { self.witness.map_ref(|w| w.txid) } + pub fn into_bundles(self) -> impl IntoIterator { self.bundles .into_iter() diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index bf7c4781..c91313de 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -1041,10 +1041,9 @@ impl Stock { &mut self, fascia: Fascia, ) -> Result<(), StockError> { - let witness_id = fascia.witness_id; - + let witness_id = fascia.witness_id(); self.stash - .consume_witness(SealWitness::new(fascia.witness_id, fascia.anchor.clone()))?; + .consume_witness(SealWitness::new(fascia.witness.clone(), fascia.anchor.clone()))?; for (contract_id, bundle) in fascia.into_bundles() { let ids1 = bundle From 5d170662ecdb4fffd7f9d7f5fa8c5ce3ac98bbe9 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 1 May 2024 10:03:57 +0200 Subject: [PATCH 50/52] persistence: include full public witness --- src/containers/anchors.rs | 8 ++++++++ src/persistence/stock.rs | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/containers/anchors.rs b/src/containers/anchors.rs index 421151ec..3ffa671c 100644 --- a/src/containers/anchors.rs +++ b/src/containers/anchors.rs @@ -123,6 +123,14 @@ impl PubWitness { spv: none!(), } } + + pub fn with(tx: Tx) -> Self { + PubWitness { + txid: tx.txid(), + tx: Some(tx), + spv: none!(), + } + } } impl PubWitness { diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index c91313de..eee2de9a 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -48,9 +48,9 @@ use super::{ }; use crate::containers::{ AnchorSet, AnchoredBundles, Batch, BuilderSeal, BundledWitness, Consignment, ContainerVer, - ContentRef, Contract, Fascia, Kit, PubWitness, SealWitness, SupplItem, SupplSub, Terminal, - TerminalSeal, Transfer, TransitionInfo, TransitionInfoError, ValidConsignment, ValidContract, - ValidKit, ValidTransfer, VelocityHint, SUPPL_ANNOT_VELOCITY, + ContentRef, Contract, Fascia, Kit, SealWitness, SupplItem, SupplSub, Terminal, TerminalSeal, + Transfer, TransitionInfo, TransitionInfoError, ValidConsignment, ValidContract, ValidKit, + ValidTransfer, VelocityHint, SUPPL_ANNOT_VELOCITY, }; use crate::info::{ContractInfo, IfaceInfo, SchemaInfo}; use crate::interface::resolver::DumbResolver; @@ -1085,7 +1085,8 @@ impl Stock { let (witness_id, contract_id) = self.index.bundle_info(bundle_id)?; let bundle = self.stash.bundle(bundle_id)?.clone(); - let anchor = self.stash.witness(witness_id)?.anchors.clone(); + let witness = self.stash.witness(witness_id)?; + let anchor = witness.anchors.clone(); let (tapret, opret) = match anchor { AnchorSet::Tapret(tapret) => (Some(tapret), None), AnchorSet::Opret(opret) => (None, Some(opret)), @@ -1111,9 +1112,8 @@ impl Stock { let anchored_bundles = AnchoredBundles::with(anchor, bundle); // TODO: Conceal all transitions except the one we need - // TODO: recover Tx and SPV Ok(BundledWitness { - pub_witness: witness_id.map(PubWitness::new), + pub_witness: witness.public.clone(), anchored_bundles, }) } From 75fb0dd098574957478bf6d4bf3533abc325efb5 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 1 May 2024 14:08:29 +0200 Subject: [PATCH 51/52] simplify resolver errors --- src/containers/consignment.rs | 2 +- src/interface/resolver.rs | 5 +---- src/persistence/memory.rs | 4 ++-- src/persistence/state.rs | 4 ++-- src/resolvers.rs | 4 +--- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index 0064ccff..47d21ed3 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -258,7 +258,7 @@ impl Consignment { &self, history: Option, resolver: &mut R, - ) -> Result { + ) -> Result { let mut history = history.unwrap_or_else(|| { ContractHistory::with(self.schema_id(), self.contract_id(), &self.genesis) }); diff --git a/src/interface/resolver.rs b/src/interface/resolver.rs index 2e3e25d4..f5cf783e 100644 --- a/src/interface/resolver.rs +++ b/src/interface/resolver.rs @@ -19,8 +19,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::convert::Infallible; - use rgb::validation::{ResolveWitness, WitnessResolverError}; use rgb::XWitnessTx; use strict_encoding::StrictDumb; @@ -37,8 +35,7 @@ impl ResolveWitness for DumbResolver { } impl ResolveHeight for DumbResolver { - type Error = Infallible; - fn resolve_height(&mut self, _: XWitnessId) -> Result { + fn resolve_height(&mut self, _: XWitnessId) -> Result { Ok(WitnessAnchor::strict_dumb()) } } diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index 33d73bd7..49fe8ecc 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -429,7 +429,7 @@ impl StateWriteProvider for MemState { fn create_or_update_state( &mut self, contract_id: ContractId, - updater: impl FnOnce(Option) -> Result, + updater: impl FnOnce(Option) -> Result, ) -> Result<(), StateUpdateError> { let state = self.history.get(&contract_id); let updated = @@ -441,7 +441,7 @@ impl StateWriteProvider for MemState { fn update_state( &mut self, contract_id: ContractId, - mut updater: impl FnMut(&mut ContractHistory) -> Result<(), R::Error>, + mut updater: impl FnMut(&mut ContractHistory) -> Result<(), String>, ) -> Result<(), StateUpdateError> { let state = self .history diff --git a/src/persistence/state.rs b/src/persistence/state.rs index ac9ea6df..f791ab02 100644 --- a/src/persistence/state.rs +++ b/src/persistence/state.rs @@ -79,12 +79,12 @@ pub trait StateWriteProvider { fn create_or_update_state( &mut self, contract_id: ContractId, - updater: impl FnOnce(Option) -> Result, + updater: impl FnOnce(Option) -> Result, ) -> Result<(), StateUpdateError>; fn update_state( &mut self, contract_id: ContractId, - updater: impl FnMut(&mut ContractHistory) -> Result<(), R::Error>, + updater: impl FnMut(&mut ContractHistory) -> Result<(), String>, ) -> Result<(), StateUpdateError>; } diff --git a/src/resolvers.rs b/src/resolvers.rs index 85f970c4..14fa0b9e 100644 --- a/src/resolvers.rs +++ b/src/resolvers.rs @@ -22,7 +22,5 @@ use rgb::{WitnessAnchor, XWitnessId}; pub trait ResolveHeight { - type Error: std::error::Error; - - fn resolve_height(&mut self, witness_id: XWitnessId) -> Result; + fn resolve_height(&mut self, witness_id: XWitnessId) -> Result; } From 47413dfdda70dcf7963a9b4b03f406e374e15fae Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 2 May 2024 15:28:43 +0200 Subject: [PATCH 52/52] iface: fix impl error checks --- src/interface/iimpl.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interface/iimpl.rs b/src/interface/iimpl.rs index 955a048d..2f728a77 100644 --- a/src/interface/iimpl.rs +++ b/src/interface/iimpl.rs @@ -365,7 +365,7 @@ pub enum ImplInconsistency { /// state extension type {1}. SchemaExtensionAbsent(FieldName, ExtensionType), - /// interface error field '{0}' is not resolved by the implementation. + /// implementation references unknown interface error '{0}'. IfaceErrorAbsent(VariantName), } @@ -448,9 +448,9 @@ impl IfaceImpl { } } - for name in iface.errors.keys() { - if self.errors.iter().all(|variant| &variant.name != name) { - errors.push(ImplInconsistency::IfaceErrorAbsent(name.clone())); + for var in &self.errors { + if iface.errors.keys().all(|name| name != &var.name) { + errors.push(ImplInconsistency::IfaceErrorAbsent(var.name.clone())); } }