Auro Wallet Docs
  • Getting Started
  • How to integrate
    • Connect Wallet
    • Add or Switch Chain
    • Create Nullifier
    • Send Transaction
    • Send zk Transaction
    • Sign Message
    • VerifyMessage in server-side
    • Anonymous Credentials
    • Building zkApp on Android
  • Wallet Basics
    • Submit token info
    • ​Pull Up Auro Wallet with DeepLink
    • Mina Providers
  • Reference
    • API Reference
      • Methods
        • mina_accounts
        • mina_requestAccounts
        • mina_requestNetwork
        • mina_sendPayment
        • mina_sendStakeDelegation
        • mina_sendTransaction
        • mina_addChain
        • mina_switchChain
        • mina_createNullifier
        • mina_signMessage
        • mina_sign_JsonMessage
        • mina_verifyMessage
        • mina_signFields
        • mina_verifyFields
        • mina_storePrivateCredential
        • mina_requestPresentation
      • Events
      • Error
      • Source
Powered by GitBook
On this page
  • Store Credentials
  • Verifying Presentations
Edit on GitHub
  1. How to integrate

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.

type PresentationRequestType = 'no-context' | 'zk-app' | 'https';
type PresentationRequest<
  RequestType extends PresentationRequestType = PresentationRequestType,
  InputContext = any,
> = {
    type: RequestType;
    spec: any;
    claims: any;
    inputContext: InputContext;
    program?: unknown;
    verificationKey?: unknown;
};

type IPresentationRequest = {
    presentationRequest:PresentationRequest
    zkAppAccount?:any // used for type zk-app
}

type PresentationArgs = {
    presentation:IPresentationRequest
}


const verifyResult: IRequestPresentation = await window.mina
    .requestPresentation({
      presentation: {
        presentationRequest: presentationRequest,
      },
    })
    .catch((err: any) => err);
PreviousVerifyMessage in server-sideNextBuilding zkApp on Android

Last updated 13 days ago

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

mina-attensions