Type Alias concordium_std::OwnedPolicy

source ·
pub type OwnedPolicy = Policy<Vec<(AttributeTag, AttributeValue)>>;
Expand description

A policy with a vector of attributes, fully allocated and owned. This is in contrast to a policy which is lazily read from a read source. The latter is useful for efficiency, this type is more useful for testing since the values are easier to construct.

Aliased Type§

struct OwnedPolicy {
    pub identity_provider: u32,
    pub created_at: Timestamp,
    pub valid_to: Timestamp,
    pub items: Vec<(AttributeTag, AttributeValue)>,
}

Fields§

§identity_provider: u32

Identity of the identity provider who signed the identity object that this policy is derived from.

§created_at: Timestamp

Timestamp at the beginning of the month when the identity object backing this policy was created. This timestamp has very coarse granularity in order for the identity provider to not be able to link identities they have created with accounts that users created on the chain. as a timestamp (which has millisecond granularity) in order to make it easier to compare with, e.g., slot_time.

§valid_to: Timestamp

Beginning of the month where the identity is no longer valid.

§items: Vec<(AttributeTag, AttributeValue)>

List of attributes, in ascending order of the tag.