Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asset tag and fungible blinding factors in the APIs #109

Merged
merged 12 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading