@sirosfoundation/dc-api 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dc-api.bundle.js +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/dc-api.bundle.js
CHANGED
|
@@ -18,6 +18,9 @@ const OID4VP_ALL_PROTOCOLS = [
|
|
|
18
18
|
...OID4VP_SPEC_PROTOCOLS,
|
|
19
19
|
OID4VP_PROTOCOLS.LEGACY
|
|
20
20
|
];
|
|
21
|
+
function isOID4VPProtocol(value) {
|
|
22
|
+
return OID4VP_ALL_PROTOCOLS.includes(value);
|
|
23
|
+
}
|
|
21
24
|
|
|
22
25
|
// src/detect.ts
|
|
23
26
|
function isDCAPIAvailable() {
|
|
@@ -95,10 +98,13 @@ function isProtocolUnsupported(error) {
|
|
|
95
98
|
}
|
|
96
99
|
export {
|
|
97
100
|
ERROR_MESSAGES,
|
|
101
|
+
OID4VP_ALL_PROTOCOLS,
|
|
98
102
|
OID4VP_PROTOCOLS,
|
|
103
|
+
OID4VP_SPEC_PROTOCOLS,
|
|
99
104
|
getBestProtocol,
|
|
100
105
|
getUserFriendlyErrorMessage,
|
|
101
106
|
isDCAPIAvailable,
|
|
107
|
+
isOID4VPProtocol,
|
|
102
108
|
isProtocolAllowed,
|
|
103
109
|
isProtocolUnsupported,
|
|
104
110
|
isUserCancel,
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* - W3C Digital Credentials API: https://w3c-fedid.github.io/digital-credentials/
|
|
19
19
|
* - OpenID4VP (DC API profile): https://openid.net/specs/openid-4-verifiable-presentations-1_0.html
|
|
20
20
|
*/
|
|
21
|
-
export { OID4VP_PROTOCOLS, type OID4VPProtocol } from './protocols.js';
|
|
21
|
+
export { OID4VP_PROTOCOLS, OID4VP_ALL_PROTOCOLS, OID4VP_SPEC_PROTOCOLS, isOID4VPProtocol, type OID4VPProtocol, } from './protocols.js';
|
|
22
22
|
export { isDCAPIAvailable, isProtocolAllowed, getBestProtocol, } from './detect.js';
|
|
23
23
|
export { requestCredential, type DigitalCredentialResponse, type RequestCredentialOptions, } from './request.js';
|
|
24
24
|
export { getUserFriendlyErrorMessage, isUserCancel, isProtocolUnsupported, ERROR_MESSAGES, } from './errors.js';
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* - W3C Digital Credentials API: https://w3c-fedid.github.io/digital-credentials/
|
|
19
19
|
* - OpenID4VP (DC API profile): https://openid.net/specs/openid-4-verifiable-presentations-1_0.html
|
|
20
20
|
*/
|
|
21
|
-
export { OID4VP_PROTOCOLS } from './protocols.js';
|
|
21
|
+
export { OID4VP_PROTOCOLS, OID4VP_ALL_PROTOCOLS, OID4VP_SPEC_PROTOCOLS, isOID4VPProtocol, } from './protocols.js';
|
|
22
22
|
export { isDCAPIAvailable, isProtocolAllowed, getBestProtocol, } from './detect.js';
|
|
23
23
|
export { requestCredential, } from './request.js';
|
|
24
24
|
export { getUserFriendlyErrorMessage, isUserCancel, isProtocolUnsupported, ERROR_MESSAGES, } from './errors.js';
|
package/package.json
CHANGED