Skip to content

Commit

Permalink
stl: update
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Mar 30, 2024
1 parent bde1287 commit 2639236
Show file tree
Hide file tree
Showing 7 changed files with 716 additions and 745 deletions.
8 changes: 4 additions & 4 deletions src/bin/rgbcore-stl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ Transition vesper lexicon=types+commitments
let tt = sys.type_tree("RGB.Transition").unwrap();
writeln!(file, "{tt}").unwrap();

let mut file = fs::File::create(format!("{dir}/AnchoredBundle.vesper")).unwrap();
let mut file = fs::File::create(format!("{dir}/TransitionBundle.vesper")).unwrap();

Check warning on line 122 in src/bin/rgbcore-stl.rs

View check run for this annotation

Codecov / codecov/patch

src/bin/rgbcore-stl.rs#L122

Added line #L122 was not covered by tests
writeln!(
file,
"{{-
Description: RGB Anchored Bundle
Description: RGB Transition Bundle

Check warning on line 126 in src/bin/rgbcore-stl.rs

View check run for this annotation

Codecov / codecov/patch

src/bin/rgbcore-stl.rs#L126

Added line #L126 was not covered by tests
Author: Dr Maxim Orlovsky <[email protected]>
Copyright (C) 2024 LNP/BP Standards Association. All rights reserved.
License: Apache-2.0
Expand All @@ -135,8 +135,8 @@ Bundles vesper lexicon=types+commitments
.unwrap();
let layout = TransitionBundle::commitment_layout();
writeln!(file, "{layout}").unwrap();
let tt = sys.type_tree("RGB.InputMap").unwrap();
let tt = sys.type_tree("RGB.XChainAnchorSet").unwrap();

Check warning on line 138 in src/bin/rgbcore-stl.rs

View check run for this annotation

Codecov / codecov/patch

src/bin/rgbcore-stl.rs#L138

Added line #L138 was not covered by tests
writeln!(file, "{tt}").unwrap();
let tt = sys.type_tree("RGB.AnchoredBundle").unwrap();
let tt = sys.type_tree("RGB.TransitionBundle").unwrap();

Check warning on line 140 in src/bin/rgbcore-stl.rs

View check run for this annotation

Codecov / codecov/patch

src/bin/rgbcore-stl.rs#L140

Added line #L140 was not covered by tests
writeln!(file, "{tt}").unwrap();
}
8 changes: 6 additions & 2 deletions src/stl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ use strict_types::stl::{std_stl, strict_types_stl};
use strict_types::typelib::LibBuilder;
use strict_types::{CompileError, TypeLib};

use crate::{ContractState, Extension, Genesis, OpCommitment, SubSchema, XAnchor, LIB_NAME_RGB};
use crate::{
ContractState, Extension, Genesis, OpCommitment, SubSchema, TransitionBundle, XAnchor,
LIB_NAME_RGB,
};

/// Strict types id for the library providing data types for RGB consensus.
pub const LIB_ID_RGB: &str =
"urn:ubideco:stl:py61NAh7V4xHa7if2mF88KL3Z11rUruBNQEAsEqaf2Q#stock-sonata-carlo";
"urn:ubideco:stl:9B8mwkJrtk1nkptoEHaXWunxdRdR4S21DKD5F2quGJDG#doctor-society-gabriel";

fn _rgb_core_stl() -> Result<TypeLib, CompileError> {
LibBuilder::new(libname!(LIB_NAME_RGB), tiny_bset! {
Expand All @@ -46,6 +49,7 @@ fn _rgb_core_stl() -> Result<TypeLib, CompileError> {
.transpile::<SubSchema>()
.transpile::<Genesis>()
.transpile::<XAnchor>()
.transpile::<TransitionBundle>()
.transpile::<Extension>()
.transpile::<ContractState>()
.transpile::<OpCommitment>()
Expand Down
Loading

0 comments on commit 2639236

Please sign in to comment.