Skip to content

Commit

Permalink
Merge pull request #109 from RGB-WG/v0.11
Browse files Browse the repository at this point in the history
Support asset tag and fungible blinding factors in the APIs
  • Loading branch information
dr-orlovsky authored Nov 18, 2023
2 parents e57c206 + 982d1be commit afe2b9f
Show file tree
Hide file tree
Showing 15 changed files with 741 additions and 518 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ wasm-bindgen-test = "0.3"

[package.metadata.docs.rs]
features = [ "all" ]

[patch.crates-io]
rgb-core = { git = "https://github.com/RGB-WG/rgb-core", branch = "v0.11" }
10 changes: 7 additions & 3 deletions src/containers/consignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub struct Consignment<const TYPE: bool> {
pub supplements: TinyOrdSet<ContractSuppl>,

/// Confidential asset tags.
pub asset_tags: SmallOrdMap<AssignmentType, AssetTag>,
pub asset_tags: TinyOrdMap<AssignmentType, AssetTag>,

/// Genesis data.
pub genesis: Genesis,
Expand Down Expand Up @@ -119,7 +119,11 @@ impl<const TYPE: bool> Consignment<TYPE> {
/// # Panics
///
/// If the provided schema is not the one which is used by genesis.
pub fn new(schema: SubSchema, genesis: Genesis) -> Self {
pub fn new(
schema: SubSchema,
genesis: Genesis,
asset_tags: TinyOrdMap<AssignmentType, AssetTag>,
) -> Self {
assert_eq!(schema.schema_id(), genesis.schema_id);
Consignment {
validation_status: None,
Expand All @@ -128,7 +132,7 @@ impl<const TYPE: bool> Consignment<TYPE> {
schema,
ifaces: none!(),
supplements: none!(),
asset_tags: none!(),
asset_tags,
genesis,
terminals: none!(),
bundles: none!(),
Expand Down
Loading

0 comments on commit afe2b9f

Please sign in to comment.