Given the evolution of CHAPI and the credential space, we could probably offer a drastically simplified API for issuer/verifier coordinator websites (relying parties) to call now. For example:
// this can either resolve (to an empty object or undefined at the moment)
// or it can reject with an `AbortError` because the user canceled from the UI
// or the caller (coordinator) aborted via `signal`
await navigator.chapi.interact({interactionUrl, signal});
Optional suggestions for credential handlers (e.g., digital wallets) could still be provided:
await navigator.chapi.interact({
interactionUrl, signal,
recommendedHandlerOrigins: [...]
});
The above entry point would then, for now, translate into a credentialrequest event to keep compatibility with existing use of the older API. If we need to translate into credentialstore as well, we can add another parameter for the caller to signal whether they are offering any credentials or just requesting them, e.g.:
// `type: 'store'` | `type: 'request'` to be bikeshed
await navigator.chapi.interact({
interactionUrl, signal,
recommendedHandlerOrigins: [...], type: 'store'
});
Given the evolution of CHAPI and the credential space, we could probably offer a drastically simplified API for issuer/verifier coordinator websites (relying parties) to call now. For example:
Optional suggestions for credential handlers (e.g., digital wallets) could still be provided:
The above entry point would then, for now, translate into a
credentialrequestevent to keep compatibility with existing use of the older API. If we need to translate intocredentialstoreas well, we can add another parameter for the caller to signal whether they are offering any credentials or just requesting them, e.g.: