#[macro_export]
macro_rules! credential_type {
($t:expr; $($x:expr),* $(,)?) => ({
use $crate::CredentialAttributeSchema;
use $crate::CredentialAttributeType::{Number, Utf8String, Blob};
let mut attributes = vec![CredentialAttributeSchema {
label: $crate::SECRET_ID.into(),
description: "".to_string(),
attribute_type: Blob,
unknown: true,
}]; $(attributes.push($x.into());)*
$crate::CredentialSchema {
id: $t.into(),
label: String::new(),
description: String::new(),
attributes,
}
});
}
#[macro_export]
macro_rules! credential_attribute_values {
($($x:expr),* $(,)?) => ({
use $crate::CredentialAttribute;
let mut attribute_values: Vec<CredentialAttribute> = vec![];
$(attribute_values.push($x.into());)*
attribute_values
});
}
#[macro_export]
macro_rules! reveal_attributes {
($($x:expr),* $(,)?) => ({
let mut reveal_attributes: Vec<String> = vec![];
$(reveal_attributes.push($x.into());)*
reveal_attributes
});
}