Struct ockam::CredentialHolder[][src]

pub struct CredentialHolder { /* fields omitted */ }

Represents a holder of a credential

Implementations

impl CredentialHolder[src]

pub fn new() -> Self[src]

Create a new CredentialHolder with a new unique id

pub fn accept_credential_offer(
    &self,
    offer: &CredentialOffer,
    issuer_pk: [u8; 96]
) -> Result<(CredentialRequest, CredentialFragment1), CredentialError>
[src]

Accepts a credential offer from an issuer

pub fn combine_credential_fragments(
    &self,
    credential_fragment1: CredentialFragment1,
    credential_fragment2: CredentialFragment2
) -> Credential
[src]

Combine credential fragments to yield a completed credential

pub fn is_valid_credential(
    &self,
    credential: &Credential,
    verkey: [u8; 96]
) -> bool
[src]

Check a credential to make sure its valid

pub fn present_credentials(
    &self,
    credential: &[Credential],
    presentation_manifests: &[PresentationManifest],
    proof_request_id: [u8; 32]
) -> Result<Vec<CredentialPresentation>, CredentialError>
[src]

Given a list of credentials, and a list of manifests generates a zero-knowledge presentation.

Each credential maps to a presentation manifest

Trait Implementations

impl Debug for CredentialHolder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,