Skip to content

Add more details on wallet structure to README#43

Open
cy245 wants to merge 3 commits into
digitalcredentialsdev:mainfrom
cy245:update-readme
Open

Add more details on wallet structure to README#43
cy245 wants to merge 3 commits into
digitalcredentialsdev:mainfrom
cy245:update-readme

Conversation

@cy245

@cy245 cy245 commented Jun 5, 2026

Copy link
Copy Markdown

No description provided.

@cy245

cy245 commented Jun 5, 2026

Copy link
Copy Markdown
Author

@leecam @QZHelen please TAL - updated the readme to provide more insight into CMWallet. Let me know of any areas you'd like to update or add.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
* **Presentation Assembly**: The wallet extracts the requested claims, builds a cryptographically secure **Session Transcript** to bind the response to the specific connection, signs the response using the private key stored in secure hardware, packages the payload, and returns it to the calling verifier.

### 2. Credential Issuance
Handles credential issuance requests from issuers. When a user initiates getting a credential from an issuer by scanning a QR code or opening a link, the issuer can trigger a system intent that launches the credential creation and storage process:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly right - issuer calls the Android Credential Manager API to initiate the issuance call.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still seems a bit off.. How about something like this:

Normally a user can trigger credential issuance in two ways:

  1. Issuer initiated flow: the user triggers a request to issue a VDC from an issuer application or website. For example, an issuer.gov website may offer its users an option to "Add your passport to your wallet". The issuer calls the Credential Manager issuance API to make an OpenID4VCI Credential Offer request. To handle such requests a wallet must first integrate with Credential Manager to register its metadata. Credential Manager will display relevant options for a user to select. After the user selects a wallet option, the wallet application will be invoked and then the wallet can proceed with the steps needed to complete the issuance.
  2. Wallet initiated flow: the user requests to add a VDC from their wallet application. For example, a wallet may offer a button to "Add your passport". In this case, the wallet maintains its supported issuer list and metadata. It does not need to integrate with the Android Credential Manager to complete this function.

CMWallet supports the issuer initiated flow, allowing arbitrary type of credentials in the SD-JWT VC or mdoc format.

Comment thread README.md Outdated
Comment thread README.md Outdated
[Room DB] ◄── Save issued credential ◄── Hardware-backed attestation process ◄── Request credential from Issuer
```
* **Issuer triggers intent**: The issuer triggers Android's `CREATE_CREDENTIAL` system intent, launching `CreateCredentialActivity`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just link to the Android DAC doc, or copy content over

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the below section or this line in particular? I think it's still useful to have text here - the DAC page can still be the maintained source of truth.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some more detailed suggestion in the comment above. We should update the sections Issuer triggers intent and Progress bottom to correctly reflect the issuance flow

Comment thread README.md
└── matcher-rs/ # Rust implementation of wasm matcher
```

### Detailed Directory Mapping

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this part? Worry that it may become quickly outdated

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended to help users map each of the concepts covered to the directories in which they're implemented. Do we think the core files might change in the future? Even if new features are added the core files should likely remain the same - WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me either way; but I hope the structure above is good enough for most of the time.

Comment thread README.md
```
[Holder(wallet) app] ──► Registers metadata with Credential Manager

[Verifier app] ──► Requests digital credential claim(s) ──► Credential Manager matches claims and displays options to user ──► User selects credential ──► Holder is invoked ──► Holder returns signed presentation to verifier

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

credentials(s)

Comment thread README.md Outdated
* **Presentation Assembly**: The wallet extracts the requested claims, builds a cryptographically secure **Session Transcript** to bind the response to the specific connection, signs the response using the private key stored in secure hardware, packages the payload, and returns it to the calling verifier.

### 2. Credential Issuance
Handles credential issuance requests from issuers. When a user initiates getting a credential from an issuer by scanning a QR code or opening a link, the issuer can trigger a system intent that launches the credential creation and storage process:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still seems a bit off.. How about something like this:

Normally a user can trigger credential issuance in two ways:

  1. Issuer initiated flow: the user triggers a request to issue a VDC from an issuer application or website. For example, an issuer.gov website may offer its users an option to "Add your passport to your wallet". The issuer calls the Credential Manager issuance API to make an OpenID4VCI Credential Offer request. To handle such requests a wallet must first integrate with Credential Manager to register its metadata. Credential Manager will display relevant options for a user to select. After the user selects a wallet option, the wallet application will be invoked and then the wallet can proceed with the steps needed to complete the issuance.
  2. Wallet initiated flow: the user requests to add a VDC from their wallet application. For example, a wallet may offer a button to "Add your passport". In this case, the wallet maintains its supported issuer list and metadata. It does not need to integrate with the Android Credential Manager to complete this function.

CMWallet supports the issuer initiated flow, allowing arbitrary type of credentials in the SD-JWT VC or mdoc format.

Comment thread README.md
### 2. Credential Issuance
Handles credential issuance requests from issuers. When a user initiates getting a credential from an issuer by scanning a QR code or opening a link, the issuer can trigger a system intent that launches the credential creation and storage process:
```
[Issuer app] ──► Triggers system intent: CREATE_CREDENTIAL ──► calls Credential Manater's CreateCredentialActivity

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be updated

Comment thread README.md
* **Matchers (WASM matching)**: In order to match a verifier's requested claims with registered metadata, Credential Manager runs the wallet's compiled WebAssembly (WASM) matching module (e.g., `openid4vp1_0.wasm`) in an offline, secure system sandbox. The matcher evaluates the verifier's query against the stored credentials without revealing any private user details to the calling app. Credential Manager comes with a default matcher if none are specified.
* **Holder invocation**: If a matching credential is found, Android displays the card to the user. Clicking the card invokes the holder and launches `GetCredentialActivity`. CMWallet launches an additional `BiometricPrompt` during invocation for additional user consent.
* **Presentation Assembly**: The wallet extracts the requested claims, builds a cryptographically secure **Session Transcript** to bind the response to the specific connection, signs the response using the private key stored in secure hardware, packages the payload, and returns it to the calling verifier.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two additional notes:

  • Multi-credential presentation: Credential Manager also supports requesting multiple credentials (e.g. age + payment) in a single request.
  • UI Flavors: The credential selector UI automatically adapts to different use cases, such as verification or payment confirmation, displaying the most appropriate layout for the request.

Comment thread README.md Outdated
[Room DB] ◄── Save issued credential ◄── Hardware-backed attestation process ◄── Request credential from Issuer
```
* **Issuer triggers intent**: The issuer triggers Android's `CREATE_CREDENTIAL` system intent, launching `CreateCredentialActivity`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some more detailed suggestion in the comment above. We should update the sections Issuer triggers intent and Progress bottom to correctly reflect the issuance flow

Comment thread README.md Outdated
```
* **Issuer triggers intent**: The issuer triggers Android's `CREATE_CREDENTIAL` system intent, launching `CreateCredentialActivity`.
* **Progress bottom sheet**: The wallet displays a Compose bottom sheet showing a progress bar while it parses the Credential Offer.
* **Key Generation and Attestation**: The wallet generates a secure cryptographic EC P-256 key pair in the phone's hardware-backed **Android KeyStore**. It creates a signed **DPoP Proof** and an **Android Keystore Key Attestation** to prove the key is tied to a genuine physical device.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key attestation

Comment thread README.md Outdated
```
* **Issuer triggers intent**: The issuer triggers Android's `CREATE_CREDENTIAL` system intent, launching `CreateCredentialActivity`.
* **Progress bottom sheet**: The wallet displays a Compose bottom sheet showing a progress bar while it parses the Credential Offer.
* **Key Generation and Attestation**: The wallet generates a secure cryptographic EC P-256 key pair in the phone's hardware-backed **Android KeyStore**. It creates a signed **DPoP Proof** and an **Android Keystore Key Attestation** to prove the key is tied to a genuine physical device.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMWallet supports Android key attestation for credential binding keys. It provides a direct Android hardware backed key attestation and is the recommended key proof approach on Android.

Comment thread README.md
## Directory & Module Guide

```
CMWallet/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also talk about the testdata folder that supports generating SD-JWT VC / mdoc for testing.

Comment thread README.md
└── matcher-rs/ # Rust implementation of wasm matcher
```

### Detailed Directory Mapping

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me either way; but I hope the structure above is good enough for most of the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants