Holding Credentials

View as Markdown

The HomeScreen lists every credential the wallet holds, grouped by issuer. Tapping a credential opens CredentialDetailScreen which shows the issuer’s display name, the schema name, the human-readable claims, the issuance date, and the on-chain anchoring status.

Receiving a credential:

  • Out-of-band link: a deep link ida-wallet://oob?_oob=… triggers OnboardingScreen.handleDeepLink, decodes the invitation, accepts the connection, and listens for the https://didcomm.org/issue-credential/3.0/issue-credential message to land in the inbox.
  • QR scan: ScannerScreen uses expo-camera to read invitation QRs.
  • Manual import: Settings → Import → paste the JWT-encoded VC.

In each case the credential payload is verified end-to-end (signature against the issuer’s DID Document, schema match, status list lookup) before it is shown to the user. Verification failures surface as a red banner (“This credential could not be verified — see details”) and the credential is NOT added to the wallet store.

Presenting a credential:

A verifier shares a Presentation Definition (PEx v2). The wallet’s matcher walks the user’s credential cache, picks the smallest set that satisfies the definition, and shows a consent screen with the exact claims that will be revealed. After the user taps Approve, the wallet calls POST /api/v1/presentations/create with the chosen credential IDs and the verifier’s challenge, then returns the resulting VP via DIDComm.

1// Pseudocode from src/screens/CredentialDetailScreen.tsx
2async function presentCredential(vc, presentationDefinition, verifierConn) {
3 const { id: vp_id } = await api.post('/presentations/create', {
4 holderDid: wallet.activeDid,
5 credentialIds: [vc.id],
6 challenge: presentationDefinition.challenge,
7 domain: presentationDefinition.domain,
8 });
9 await didcomm.send(verifierConn.theirDid, {
10 type: 'https://didcomm.org/present-proof/3.0/presentation',
11 body: { presentation: vp_id },
12 });
13}

Cross-link: §3.2.4 Creating a Verifiable Presentation, §9.4 Credentials & Presentations endpoints.