diff --git a/src/bin/rgbcore-stl.rs b/src/bin/rgbcore-stl.rs index 39402a1c..fd5a8d90 100644 --- a/src/bin/rgbcore-stl.rs +++ b/src/bin/rgbcore-stl.rs @@ -20,23 +20,68 @@ // See the License for the specific language governing permissions and // limitations under the License. +use std::fs; + +use aluvm::stl::aluvm_stl; +use bp::stl::bp_core_stl; +use commit_verify::stl::commit_verify_stl; +use rgb::stl::bp_tx_stl; +use strict_types::stl::{std_stl, strict_types_stl}; use strict_types::typelib::parse_args; +use strict_types::SystemBuilder; fn main() { let (format, dir) = parse_args(); - rgb::stl::rgb_core_stl() - .serialize( - format, - dir, - "0.1.0", - Some( - " + let rgb = rgb::stl::rgb_core_stl(); + + rgb.serialize( + format, + dir.as_ref(), + "0.1.0", + Some( + " Description: Consensus layer for RGB smart contracts Author: Dr Maxim Orlovsky Copyright (C) 2023 LNP/BP Standards Association. All rights reserved. License: Apache-2.0", - ), - ) - .expect("unable to write to the file"); + ), + ) + .expect("unable to write to the file"); + + let std = std_stl(); + let tx = bp_tx_stl(); + let bp = bp_core_stl(); + let cv = commit_verify_stl(); + let st = strict_types_stl(); + let vm = aluvm_stl(); + + let sys = SystemBuilder::new() + .import(rgb) + .unwrap() + .import(vm) + .unwrap() + .import(bp) + .unwrap() + .import(tx) + .unwrap() + .import(cv) + .unwrap() + .import(st) + .unwrap() + .import(std) + .unwrap() + .finalize() + .expect("not all libraries present"); + + let dir = dir.unwrap_or_else(|| ".".to_owned()); + + let tt = sys.type_tree("RGB.Transition").unwrap(); + fs::write(format!("{dir}/Transition.vesper",), format!("{tt}")).unwrap(); + + let tt = sys.type_tree("RGB.Schema").unwrap(); + fs::write(format!("{dir}/Schema.vesper",), format!("{tt}")).unwrap(); + + let tt = sys.type_tree("RGB.AnchoredBundle").unwrap(); + fs::write(format!("{dir}/AnchoredBundle.vesper",), format!("{tt}")).unwrap(); } diff --git a/stl/AnchoredBundle.vesper b/stl/AnchoredBundle.vesper new file mode 100644 index 00000000..f736001b --- /dev/null +++ b/stl/AnchoredBundle.vesper @@ -0,0 +1,323 @@ +AnchoredBundle rec + anchor union -- XChainAnchorSet + bitcoin union wrapped tag=0 -- AnchorSet + tapret rec wrapped tag=0 -- AnchorMerkleProofTapretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec -- TapretProof + pathProof rec -- TapretPathProof + some union option wrapped tag=1 -- TapretNodePartner + rightBranch rec wrapped tag=2 -- TapretRightBranch + nonce is U8 + opret rec wrapped tag=1 -- AnchorMerkleProofOpretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + dual rec tag=2 + tapret rec -- AnchorMerkleProofTapretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec -- TapretProof + pathProof rec -- TapretPathProof + some union option wrapped tag=1 -- TapretNodePartner + rightBranch rec wrapped tag=2 -- TapretRightBranch + nonce is U8 + opret rec -- AnchorMerkleProofOpretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + liquid union wrapped tag=1 -- AnchorSet + tapret rec wrapped tag=0 -- AnchorMerkleProofTapretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec -- TapretProof + pathProof rec -- TapretPathProof + some union option wrapped tag=1 -- TapretNodePartner + rightBranch rec wrapped tag=2 -- TapretRightBranch + nonce is U8 + opret rec wrapped tag=1 -- AnchorMerkleProofOpretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + dual rec tag=2 + tapret rec -- AnchorMerkleProofTapretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof rec -- TapretProof + pathProof rec -- TapretPathProof + some union option wrapped tag=1 -- TapretNodePartner + rightBranch rec wrapped tag=2 -- TapretRightBranch + nonce is U8 + opret rec -- AnchorMerkleProofOpretProof + txid bytes len=32 aka=Txid + mpcProof rec -- MerkleProof + pos is U32 + cofactor is U16 + path list len=0..32 + element bytes len=32 aka=MerkleHash + dbcProof is Unit aka=OpretProof + bundle rec -- TransitionBundle + inputMap map len=1..MAX16 + key is U32 aka=Vout + value bytes len=32 aka=OpId + knownTransitions map len=1..MAX16 + key bytes len=32 aka=OpId + Transition rec -- mapped to + ffv is U16 aka=Ffv + contractId bytes len=32 aka=ContractId + transitionType is U16 aka=TransitionType + metadata bytes len=0..MAX16 + globals map len=0..MAX8 aka=GlobalState + key is U16 aka=GlobalStateType + value list len=1..MAX16 aka=GlobalValues + RevealedData rec + value bytes len=0..MAX16 aka=DataState + salt is U128 + inputs set len=0..MAX8 aka=Inputs + Input rec + prevOut rec -- Opout + op bytes len=32 aka=OpId + ty is U16 aka=AssignmentType + no is U16 + reserved is U8 aka=ReservedByte + assignments map len=0..MAX8 aka=AssignmentsBlindSealTxPtr + key is U16 aka=AssignmentType + TypedAssignsBlindSealTxPtr union -- mapped to + declarative list len=0..MAX16 wrapped tag=0 + AssignVoidStateBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + fungible list len=0..MAX16 wrapped tag=1 + AssignRevealedValueBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union -- RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union -- RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- RevealedFungible + value union -- FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- RevealedFungible + value union -- FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + structured list len=0..MAX16 wrapped tag=2 + AssignRevealedDataBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedData + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedData + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + attachment list len=0..MAX16 wrapped tag=3 + AssignRevealedAttachBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedAttach + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedAttach + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum any=255 -- MediaType + salt is U64 + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum any=255 -- MediaType + salt is U64 + valencies set len=0..MAX8 aka=Valencies + element is U16 aka=ValencyType diff --git a/stl/Schema.vesper b/stl/Schema.vesper new file mode 100644 index 00000000..c5824b93 --- /dev/null +++ b/stl/Schema.vesper @@ -0,0 +1,119 @@ +Schema rec + ffv is U16 aka=Ffv + some is Unit option wrapped tag=1 + globalTypes map len=0..MAX8 + key is U16 aka=GlobalStateType + GlobalStateSchema rec -- mapped to + semId bytes len=32 aka=SemId + maxItems is U16 + ownedTypes map len=0..MAX8 + key is U16 aka=AssignmentType + StateSchema union -- mapped to + declarative is Unit tag=0 + fungible enum wrapped unsigned64Bit=8 tag=1 -- FungibleType + structured bytes len=32 wrapped aka=SemId tag=2 + attachment enum wrapped any=255 tag=3 -- MediaType + valencyTypes set len=0..MAX8 + element is U16 aka=ValencyType + genesis rec -- GenesisSchema + metadata bytes len=32 aka=SemId + globals map len=0..MAX8 + key is U16 aka=GlobalStateType + Occurrences rec -- mapped to + min is U16 + max is U16 + assignments map len=0..MAX8 + key is U16 aka=AssignmentType + Occurrences rec -- mapped to + min is U16 + max is U16 + valencies set len=0..MAX8 + element is U16 aka=ValencyType + extensions map len=0..MAX8 + key is U16 aka=ExtensionType + ExtensionSchema rec -- mapped to + metadata bytes len=32 aka=SemId + globals map len=0..MAX8 + key is U16 aka=GlobalStateType + Occurrences rec -- mapped to + min is U16 + max is U16 + redeems set len=0..MAX8 + element is U16 aka=ValencyType + assignments map len=0..MAX8 + key is U16 aka=AssignmentType + Occurrences rec -- mapped to + min is U16 + max is U16 + valencies set len=0..MAX8 + element is U16 aka=ValencyType + transitions map len=0..MAX8 + key is U16 aka=TransitionType + TransitionSchema rec -- mapped to + metadata bytes len=32 aka=SemId + globals map len=0..MAX8 + key is U16 aka=GlobalStateType + Occurrences rec -- mapped to + min is U16 + max is U16 + inputs map len=0..MAX8 + key is U16 aka=AssignmentType + Occurrences rec -- mapped to + min is U16 + max is U16 + assignments map len=0..MAX8 + key is U16 aka=AssignmentType + Occurrences rec -- mapped to + min is U16 + max is U16 + valencies set len=0..MAX8 + element is U16 aka=ValencyType + typeSystem map len=0..MAX24 aka=TypeSystem + key bytes len=32 aka=SemId + TySemId union -- mapped to + primitive is U8 wrapped aka=Primitive tag=0 + unicode is Unit tag=1 + enum set len=1..MAX8 wrapped aka=EnumVariants tag=2 + Variant rec + name ascii len=1..100 aka=VariantName aka=Ident charset=AlphaNumLodash + tag is U8 + union map len=0..MAX8 wrapped aka=UnionVariantsSemId tag=3 + key is U8 + VariantInfoSemId rec -- mapped to + name ascii len=1..100 aka=VariantName aka=Ident charset=AlphaNumLodash + ty bytes len=32 aka=SemId + tuple list len=1..MAX8 wrapped aka=UnnamedFieldsSemId tag=4 + element bytes len=32 aka=SemId + struct list len=1..MAX8 wrapped aka=NamedFieldsSemId tag=5 + FieldSemId rec + name ascii len=1..100 aka=FieldName aka=Ident charset=AlphaNumLodash + ty bytes len=32 aka=SemId + array tuple tag=6 + _ bytes len=32 aka=SemId + _ is U16 + list tuple tag=7 + _ bytes len=32 aka=SemId + Sizing rec + min is U64 + max is U64 + set tuple tag=8 + _ bytes len=32 aka=SemId + Sizing rec + min is U64 + max is U64 + map tuple tag=9 + _ bytes len=32 aka=SemId + _ bytes len=32 aka=SemId + Sizing rec + min is U64 + max is U64 + script union -- Script + aluVm rec wrapped tag=0 -- AluScript + libs map len=0..MAX8 + key bytes len=32 aka=LibId + value bytes len=0..MAX16 + entryPoints map len=0..MAX16 + key bytes len=3 + LibSite rec -- mapped to + lib bytes len=32 aka=LibId + pos is U16 diff --git a/stl/Transition.vesper b/stl/Transition.vesper new file mode 100644 index 00000000..6b26324c --- /dev/null +++ b/stl/Transition.vesper @@ -0,0 +1,231 @@ +Transition rec + ffv is U16 aka=Ffv + contractId bytes len=32 aka=ContractId + transitionType is U16 aka=TransitionType + metadata bytes len=0..MAX16 + globals map len=0..MAX8 aka=GlobalState + key is U16 aka=GlobalStateType + value list len=1..MAX16 aka=GlobalValues + RevealedData rec + value bytes len=0..MAX16 aka=DataState + salt is U128 + inputs set len=0..MAX8 aka=Inputs + Input rec + prevOut rec -- Opout + op bytes len=32 aka=OpId + ty is U16 aka=AssignmentType + no is U16 + reserved is U8 aka=ReservedByte + assignments map len=0..MAX8 aka=AssignmentsBlindSealTxPtr + key is U16 aka=AssignmentType + TypedAssignsBlindSealTxPtr union -- mapped to + declarative list len=0..MAX16 wrapped tag=0 + AssignVoidStateBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state is Unit aka=VoidState + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state is Unit aka=VoidState + fungible list len=0..MAX16 wrapped tag=1 + AssignRevealedValueBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union -- RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- ConcealedFungible + commitment bytes len=33 aka=PedersenCommitment + rangeProof union -- RangeProof + placeholder bytes len=512 wrapped aka=NoiseDumb tag=0 + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- RevealedFungible + value union -- FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- RevealedFungible + value union -- FungibleState + bits64 is U64 wrapped tag=0 + blinding bytes len=32 aka=BlindingFactor + tag bytes len=32 aka=AssetTag + structured list len=0..MAX16 wrapped tag=2 + AssignRevealedDataBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedData + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedData + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- RevealedData + value bytes len=0..MAX16 aka=DataState + salt is U128 + attachment list len=0..MAX16 wrapped tag=3 + AssignRevealedAttachBlindSealTxPtr union + confidential rec tag=0 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state bytes len=32 aka=ConcealedAttach + confidentialState rec tag=1 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state bytes len=32 aka=ConcealedAttach + confidentialSeal rec tag=2 + seal union -- XChainSecretSeal + bitcoin bytes len=32 wrapped aka=SecretSeal tag=0 + liquid bytes len=32 wrapped aka=SecretSeal tag=1 + state rec -- RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum any=255 -- MediaType + salt is U64 + revealed rec tag=3 + seal union -- XChainBlindSealTxPtr + bitcoin rec wrapped tag=0 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + 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 wrapped tag=1 -- BlindSealTxPtr + method enum opretFirst=0 tapretFirst=1 -- Method + txid union -- TxPtr + witnessTx is Unit tag=0 + txid bytes len=32 wrapped aka=Txid tag=1 + vout is U32 aka=Vout + blinding is U64 + state rec -- RevealedAttach + id bytes len=32 aka=AttachId + mediaType enum any=255 -- MediaType + salt is U64 + valencies set len=0..MAX8 aka=Valencies + element is U16 aka=ValencyType