From db9914854e18fa424824bec0c7626e2251be02d2 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Tue, 16 Dec 2025 21:26:21 +1100
Subject: [PATCH 1/8] Define "Present credential requests" algorithm.
---
index.html | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 106 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 6452e5c9..a3228267 100644
--- a/index.html
+++ b/index.html
@@ -661,11 +661,115 @@
To be written.
- Abort the credential request
+ Present the credential request
- To be written.
+ To present the
+ credential request given a [=Document=] |document|, a [=sequence=]
+ of validated credential requests |validatedRequests|, and an optional
+ {{AbortSignal}} |signal|:
+
+ - Let |requestData| be [=struct=] consisting of |validatedRequests|,
+ |document|'s [=relevant settings object=]'s [=environment settings
+ object/origin=], and |document|'s [=Document/origin=].
+
+ - Present a [=credential chooser=] with |requestData| and wait for the
+ user to either:
+
+ - Select a [=digital credential=] and [=holder=] that can fulfill
+ the request, or
+
+ - Cancel the operation.
+
+
+
+ - If |signal| was passed and |signal| is [=AbortSignal/aborted=]:
+
+ - Return.
+
+ The [=abort steps=] added to |signal| handle tearing down the
+ [=credential chooser=].
+
+
+
+
+ - If the user cancels the operation or no credential was selected:
+
+ - [=credential request coordinator/Complete credential request with
+ error=] with |document| and {{"AbortError"}} {{DOMException}}.
+
+ - Return.
+
+
+
+ - If the platform returns a platform-specific |error|:
+
+ - Let |exception| be the appropriate {{DOMException}} for that
+ |error|.
+
+ - [=credential request coordinator/Complete credential request with
+ error=] with |document| and |exception|.
+
+ - Return.
+
+
+
+ - If a [=digital credential=] was selected by the user:
+
+ - Let |responseData| be a [=string=] [=digital
+ credential/presentation response=] or [=string=] [=digital
+ credential/issuance response=] returned by the [=holder=].
+
+ - Let |protocol| be the [=digital credential/exchange protocol=] or
+ [=digital credential/issuance protocol=] identifier used in the
+ exchange.
+
+ - Let |parsedData| be the result of [=parse a JSON string to a
+ JavaScript value=] passing |responseData|.
+
+ - If |parsedData| is an [=exception=]:
+
+ - [=credential request coordinator/Complete credential request
+ with error=] with |document| and |parsedData|.
+
+ - Return.
+
+
+
+ - If |parsedData| is not an [=object=]:
+
+ - [=credential request coordinator/Complete credential request
+ with error=] with |document| and {{TypeError}}.
+
+ - Return.
+
+
+
+ - Let |credential| be a new {{DigitalCredential}} object with its
+ {{DigitalCredential/data}} set to |parsedData| and its
+ {{DigitalCredential/protocol}} set to |protocol|.
+
+ - [=Queue a global task=] on the [=DOM manipulation task source=]
+ given |document|'s [=relevant global object=] to perform the
+ following steps:
+
+ - Set the [=credential request coordinator=] [=credential
+ request coordinator/interaction state=] to "[=credential request
+ coordinator/idle=]".
+
+ - [=Resolve=] the [=credential request coordinator=]'s
+ [=credential request coordinator/active promise=] with
+ |credential|.
+
+ - Set the [=credential request coordinator=]'s [=credential
+ request coordinator/active promise=] to `null`.
+
+
+
+
+
+
Complete credential request with error
From 6f2ab6e8872a70a53730a8c7c02a35a793135e32 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Thu, 8 Jan 2026 14:19:57 +1100
Subject: [PATCH 2/8] Don't pass document and cleanup
---
index.html | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/index.html b/index.html
index a3228267..eb6ccc9c 100644
--- a/index.html
+++ b/index.html
@@ -696,20 +696,21 @@
If the user cancels the operation or no credential was selected:
+ - Let |error| be a newly created {{"AbortError"}} {{DOMException}}.
+
- [=credential request coordinator/Complete credential request with
- error=] with |document| and {{"AbortError"}} {{DOMException}}.
+ error=] |error|.
- Return.
- If the platform returns a platform-specific |error|:
+ If the platform returns a platform-specific error:
- - Let |exception| be the appropriate {{DOMException}} for that
- |error|.
+
- Let |error| be the appropriate {{DOMException}} for that error.
- [=credential request coordinator/Complete credential request with
- error=] with |document| and |exception|.
+ error=] |error|.
- Return.
@@ -731,7 +732,7 @@
- If |parsedData| is an [=exception=]:
- [=credential request coordinator/Complete credential request
- with error=] with |document| and |parsedData|.
+ with error=] with |parsedData|.
- Return.
@@ -739,8 +740,10 @@
- If |parsedData| is not an [=object=]:
+ - Let |error| be a newly created {{TypeError}}.
+
- [=credential request coordinator/Complete credential request
- with error=] with |document| and {{TypeError}}.
+ with error=] |error|.
- Return.
From 4a2fb73771fd0327f34241504e5bd07fe0c96e9a Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Fri, 9 Jan 2026 15:48:08 +1100
Subject: [PATCH 3/8] use new aliases and cleanup
---
index.html | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/index.html b/index.html
index eb6ccc9c..03db9d5b 100644
--- a/index.html
+++ b/index.html
@@ -688,8 +688,9 @@
- Return.
- The [=abort steps=] added to |signal| handle tearing down the
- [=credential chooser=].
+ The algorithm [=AbortSignal/add|added=] to |signal| by the
+ [=credential request coordinator/prepare credential requests=]
+ steps handle tearing down the [=credential chooser=].
@@ -698,8 +699,8 @@
- Let |error| be a newly created {{"AbortError"}} {{DOMException}}.
- - [=credential request coordinator/Complete credential request with
- error=] |error|.
+
- [=credential request coordinator/Complete credential request
+ with=] |error|.
- Return.
@@ -709,8 +710,8 @@
- Let |error| be the appropriate {{DOMException}} for that error.
- - [=credential request coordinator/Complete credential request with
- error=] |error|.
+
- [=credential request coordinator/Complete credential request
+ with=] |error|.
- Return.
@@ -726,24 +727,24 @@
[=digital credential/issuance protocol=] identifier used in the
exchange.
- - Let |parsedData| be the result of [=parse a JSON string to a
- JavaScript value=] passing |responseData|.
+
- Let |parsedDataOrError| be the result of [=parse a JSON string to
+ a JavaScript value=] passing |responseData|.
- - If |parsedData| is an [=exception=]:
+
- If |parsedDataOrError| is an [=exception=]:
- [=credential request coordinator/Complete credential request
- with error=] with |parsedData|.
+ with=] |parsedDataOrError|.
- Return.
- - If |parsedData| is not an [=object=]:
+
- If |parsedDataOrError| is not an [=object=]:
- Let |error| be a newly created {{TypeError}}.
- [=credential request coordinator/Complete credential request
- with error=] |error|.
+ with=] |error|.
- Return.
From fd2b4791478fb0ab77b59a839b3dae77b8495cc2 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Fri, 9 Jan 2026 16:01:18 +1100
Subject: [PATCH 4/8] Relocate protocol variable
---
index.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/index.html b/index.html
index 03db9d5b..2c3b1338 100644
--- a/index.html
+++ b/index.html
@@ -723,10 +723,6 @@
credential/presentation response=] or [=string=] [=digital
credential/issuance response=] returned by the [=holder=].
- - Let |protocol| be the [=digital credential/exchange protocol=] or
- [=digital credential/issuance protocol=] identifier used in the
- exchange.
-
- Let |parsedDataOrError| be the result of [=parse a JSON string to
a JavaScript value=] passing |responseData|.
@@ -750,8 +746,12 @@
+ Let |protocol| be the [=digital credential/exchange protocol=] or
+ [=digital credential/issuance protocol=] identifier used in the
+ exchange.
+
Let |credential| be a new {{DigitalCredential}} object with its
- {{DigitalCredential/data}} set to |parsedData| and its
+ {{DigitalCredential/data}} set to |parsedDataOrError| and its
{{DigitalCredential/protocol}} set to |protocol|.
[=Queue a global task=] on the [=DOM manipulation task source=]
From a98d21501d633c88c9a3185fca21b6f10742fbaa Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Fri, 9 Jan 2026 16:02:54 +1100
Subject: [PATCH 5/8] Add back the Abort the credential request section
---
index.html | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/index.html b/index.html
index 2c3b1338..3eeecd24 100644
--- a/index.html
+++ b/index.html
@@ -660,6 +660,12 @@
To be written.
+
+ Abort the credential request
+
+
+ To be written.
+
Present the credential request
From 81b1aea8a249b4b7de517e411285198670550381 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Wed, 28 Jan 2026 20:01:46 +1100
Subject: [PATCH 6/8] Make use of DigitalCredentialProtocol
---
index.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/index.html b/index.html
index 3a6cc1ca..1e8f2208 100644
--- a/index.html
+++ b/index.html
@@ -752,13 +752,13 @@
- Let |protocol| be the [=digital credential/exchange protocol=] or
- [=digital credential/issuance protocol=] identifier used in the
- exchange.
+ Let |protocol:DigitalCredentialProtocol| be the
+ {{DigitalCredentialProtocol}} [=enumeration value=] that matches the
+ [=digital credential/protocol identifier=] used in the exchange.
- Let |credential| be a new {{DigitalCredential}} object with its
- {{DigitalCredential/data}} set to |parsedDataOrError| and its
- {{DigitalCredential/protocol}} set to |protocol|.
+ Let |credential| be a newly created {{DigitalCredential}} instance with its
+ {{DigitalCredential/data}} initialized to |parsedDataOrError| and its
+ {{DigitalCredential/protocol}} initialized to |protocol|.
[=Queue a global task=] on the [=DOM manipulation task source=]
given |document|'s [=relevant global object=] to perform the
@@ -1033,7 +1033,7 @@
[Exposed=Window, SecureContext]
interface DigitalCredential : Credential {
[Default] object toJSON();
- readonly attribute DOMString protocol;
+ readonly attribute DigitalCredentialProtocol protocol;
[SameObject] readonly attribute object data;
static boolean userAgentAllowsProtocol(DOMString protocol);
};
From 53206fd6bd2ec6c8defc589e818114452d0bf902 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Tue, 3 Feb 2026 15:22:51 +1100
Subject: [PATCH 7/8] tidy
---
index.html | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index 1e8f2208..25394e14 100644
--- a/index.html
+++ b/index.html
@@ -756,9 +756,10 @@
{{DigitalCredentialProtocol}} [=enumeration value=] that matches the
[=digital credential/protocol identifier=] used in the exchange.
- Let |credential| be a newly created {{DigitalCredential}} instance with its
- {{DigitalCredential/data}} initialized to |parsedDataOrError| and its
- {{DigitalCredential/protocol}} initialized to |protocol|.
+ Let |credential| be a newly created {{DigitalCredential}}
+ instance with its {{DigitalCredential/data}} initialized to
+ |parsedDataOrError| and its {{DigitalCredential/protocol}}
+ initialized to |protocol|.
[=Queue a global task=] on the [=DOM manipulation task source=]
given |document|'s [=relevant global object=] to perform the
From 684b38bdbdc46c6ee541cabec3abe4e4566f16cd Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Mon, 16 Feb 2026 14:41:53 +1100
Subject: [PATCH 8/8] Remove redudant heading
---
index.html | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/index.html b/index.html
index f810351f..31491f84 100644
--- a/index.html
+++ b/index.html
@@ -747,7 +747,9 @@
To be written.
-
+
Present the credential request
@@ -893,13 +895,7 @@
-
-
- Present the credential request
-
-
- To be written.
-