Anonymous Credentials

This scenario is mainly used to handle the store credentials and verifying presentations.

Store Credentials

This method is mainly used to save credentials.

type JSONValue =
    | string
    | number
    | boolean
    | null
    | JSONValue[]
    | { [key: string]: JSONValue };


type Credential<Data = unknown> = { owner: string; data: Data };
type StoredCredential<Data = unknown, Witness = unknown> = {
    version: 'v0';
    witness: Witness;
    metadata: JSONValue | undefined;
    credential: Credential<Data>;
};

type StoredCredentialArgs = {
    credential:StoredCredential
}

const storeResult: IStoreCredentialData = await window.mina
    .storePrivateCredential({
        credential: credential,
    })
    .catch((err: any) => err);

Verifying Presentations

This method is mainly used to verify the presentation.

The current implementation of Anonymous Credentials is based on mina-attensions v0.5.0

Last updated