pub struct CredentialData {
pub use_native: Option<bool>,
pub primary_index: Option<usize>,
pub pre_validate: Option<bool>,
pub override_primary: Option<bool>,
pub credentials: Vec<Credential>,
}Expand description
CredentialData is wrapper for dealing with multiple credentials at the same time.
Implements both Verifiable and CredentialWrapper traits.
Fields§
§use_native: Option<bool>A flag indicating that the environment can derive an additional credential that isn’t included in the list of credentials directly. Most typically it’s the transaction signer that has been verified beforehand but can be any other authorized dicated by the environment / smart contract logic
primary_index: Option<usize>An optional index indicating which credential will be used as the primary. Default to the first one
pre_validate: Option<bool>An optional flag that tell us whether to perform an extensive validation before verifying each one thouroughly
override_primary: Option<bool>An optional flag that indicates whether that
credentials: Vec<Credential>The list of credentials to be verified
Implementations§
Source§impl CredentialData
impl CredentialData
Sourcepub fn with_native<C: Into<Caller>>(&self, cal: C) -> Self
pub fn with_native<C: Into<Caller>>(&self, cal: C) -> Self
Check whether with_caller flag is set and then ether ignore the arguemnt returning self or constucting a new wrapper with the Caller credential being injected @param cal: native caller of the environment @return: checked wrapper
Trait Implementations§
Source§impl Clone for CredentialData
impl Clone for CredentialData
Source§fn clone(&self) -> CredentialData
fn clone(&self) -> CredentialData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more