@pagopa/io-react-native-wallet 3.4.4 → 3.5.1
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/lib/commonjs/credential/issuance/README.md +10 -5
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +2 -3
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +7 -8
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/presentation/api/types.js.map +1 -1
- package/lib/commonjs/credential/status/README.md +15 -13
- package/lib/commonjs/credential/status/api/index.js.map +1 -1
- package/lib/commonjs/credential/status/api/types.js +27 -0
- package/lib/commonjs/credential/status/api/types.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +26 -22
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js +4 -25
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js +34 -0
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/index.js +4 -1
- package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js +1 -1
- package/lib/module/credential/issuance/README.md +10 -5
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +2 -3
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +7 -8
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/presentation/api/types.js.map +1 -1
- package/lib/module/credential/status/README.md +15 -13
- package/lib/module/credential/status/api/index.js +3 -1
- package/lib/module/credential/status/api/index.js.map +1 -1
- package/lib/module/credential/status/api/types.js +20 -0
- package/lib/module/credential/status/api/types.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/01-status-list.js +24 -21
- package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js +5 -26
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/03-get-status.js +27 -0
- package/lib/module/credential/status/v1.3.3/03-get-status.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/index.js +5 -2
- package/lib/module/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js +1 -1
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +9 -6
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/index.d.ts +1 -0
- package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts +2 -3
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/types.d.ts +2 -0
- package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/index.d.ts +3 -1
- package/lib/typescript/credential/status/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/status-assertion.d.ts +1 -1
- package/lib/typescript/credential/status/api/status-list.d.ts +27 -9
- package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/types.d.ts +20 -0
- package/lib/typescript/credential/status/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts +1 -0
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/03-get-status.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/03-get-status.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/index.d.ts +1 -1
- package/lib/typescript/credentials-catalogue/common/get-status-l10n-ids.d.ts +1 -1
- package/package.json +6 -6
- package/src/credential/issuance/README.md +10 -5
- package/src/credential/issuance/api/03-complete-user-authorization.ts +10 -6
- package/src/credential/issuance/api/index.ts +1 -0
- package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +2 -8
- package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +21 -19
- package/src/credential/presentation/api/06-evaluate-dcql-query.ts +2 -2
- package/src/credential/presentation/api/types.ts +3 -0
- package/src/credential/status/README.md +15 -13
- package/src/credential/status/api/index.ts +3 -1
- package/src/credential/status/api/status-assertion.ts +1 -1
- package/src/credential/status/api/status-list.ts +35 -12
- package/src/credential/status/api/types.ts +27 -0
- package/src/credential/status/v1.3.3/01-status-list.ts +30 -18
- package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +5 -27
- package/src/credential/status/v1.3.3/03-get-status.ts +40 -0
- package/src/credential/status/v1.3.3/index.ts +4 -1
- package/src/credentials-catalogue/api/index.ts +1 -1
- package/src/credentials-catalogue/common/get-status-l10n-ids.ts +1 -1
|
@@ -31,8 +31,10 @@ graph TD;
|
|
|
31
31
|
1[verifyAndParseStatusAssertion]
|
|
32
32
|
2[getStatusList]
|
|
33
33
|
3[verifyAndParseStatusList]
|
|
34
|
+
4[getStatus]
|
|
34
35
|
0 --> 1
|
|
35
36
|
2 --> 3
|
|
37
|
+
3 --> 4
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
## Mapped results
|
|
@@ -104,24 +106,24 @@ const credentialIssuerUrl = "https://issuer.example.com";
|
|
|
104
106
|
|
|
105
107
|
const { issuerConf } = await wallet.CredentialIssuance.evaluateIssuerTrust(credentialIssuerUrl);
|
|
106
108
|
|
|
107
|
-
// Get the status list
|
|
108
|
-
const
|
|
109
|
-
credential,
|
|
110
|
-
|
|
109
|
+
// Get the status list token and credential reference index
|
|
110
|
+
const { statusList: statusListJwt, idx } =
|
|
111
|
+
await wallet.CredentialStatus.statusList.get(credential, format);
|
|
112
|
+
|
|
113
|
+
// Verify and parse the status list token
|
|
114
|
+
const statusList = await wallet.CredentialStatus.statusList.verifyAndParse(
|
|
115
|
+
issuerConf.keys,
|
|
116
|
+
statusListJwt,
|
|
111
117
|
);
|
|
112
118
|
|
|
113
|
-
//
|
|
114
|
-
const { status,
|
|
115
|
-
await wallet.CredentialStatus.statusList.verifyAndParse(
|
|
116
|
-
issuerConf.keys,
|
|
117
|
-
res
|
|
118
|
-
);
|
|
119
|
+
// Read the credential status from the decoded status list
|
|
120
|
+
const { status, rawStatus } = wallet.CredentialStatus.statusList.getStatus(statusList, idx);
|
|
119
121
|
|
|
120
122
|
return {
|
|
121
|
-
statusList
|
|
123
|
+
statusList,
|
|
122
124
|
status,
|
|
123
|
-
|
|
125
|
+
rawStatus,
|
|
124
126
|
};
|
|
125
127
|
```
|
|
126
128
|
|
|
127
|
-
</details>
|
|
129
|
+
</details>
|
|
@@ -12,7 +12,9 @@ interface UnsupportedApi {
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* if (CredentialStatus.statusList.isSupported) {
|
|
15
|
-
* const statusList = await CredentialStatus.statusList.get(credential, format)
|
|
15
|
+
* const { statusList: statusListJwt, idx } = await CredentialStatus.statusList.get(credential, format)
|
|
16
|
+
* const statusList = await CredentialStatus.statusList.verifyAndParse(keys, statusListJwt)
|
|
17
|
+
* const status = CredentialStatus.statusList.getStatus(statusList, idx)
|
|
16
18
|
* }
|
|
17
19
|
*/
|
|
18
20
|
export interface CredentialStatusApi {
|
|
@@ -38,7 +38,7 @@ export interface StatusAssertionApi {
|
|
|
38
38
|
* - The assertion is correctly signed;
|
|
39
39
|
* - It's bound to the given key.
|
|
40
40
|
* @since 1.0.0
|
|
41
|
-
* @deprecated since 1.3.3 - Use `statusList.verifyAndParse`
|
|
41
|
+
* @deprecated since 1.3.3 - Use `statusList.get`, `statusList.verifyAndParse` and `statusList.getStatus`
|
|
42
42
|
*
|
|
43
43
|
* @param issuerConf The Issuer configuration returned by `evaluateIssuerTrust`
|
|
44
44
|
* @param statusAssertion The encoded status assertion returned by `statusAssertion.get`
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Out } from "../../../utils/misc";
|
|
2
1
|
import type { CredentialFormat } from "../../../credential/issuance/api";
|
|
3
2
|
import type { JWK } from "../../../utils/jwk";
|
|
3
|
+
import type { StatusList } from "./types";
|
|
4
4
|
|
|
5
5
|
export interface StatusListApi {
|
|
6
6
|
isSupported: true;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Get the status list
|
|
9
|
+
* Get the status list token referenced by a credential. This function fetches the list
|
|
10
10
|
* from the uri found in the credential's `status` claim.
|
|
11
11
|
* @example
|
|
12
12
|
* {
|
|
@@ -21,7 +21,7 @@ export interface StatusListApi {
|
|
|
21
21
|
* @param credential The credential to get the status list for
|
|
22
22
|
* @param format The credential format
|
|
23
23
|
* @param context.appFetch Optional fetch function to use for the network request
|
|
24
|
-
* @returns The
|
|
24
|
+
* @returns The encoded status list token with its credential reference metadata
|
|
25
25
|
*/
|
|
26
26
|
get(
|
|
27
27
|
credential: string,
|
|
@@ -37,17 +37,40 @@ export interface StatusListApi {
|
|
|
37
37
|
}>;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Get a status list token from its uri.
|
|
41
|
+
* @since 1.3.3
|
|
42
|
+
* @param uri The status list uri
|
|
43
|
+
* @param context.appFetch Optional fetch function to use for the network request
|
|
44
|
+
* @returns The encoded status list token
|
|
45
|
+
*/
|
|
46
|
+
getByUri(
|
|
47
|
+
uri: string,
|
|
48
|
+
context?: {
|
|
49
|
+
appFetch?: GlobalFetch["fetch"];
|
|
50
|
+
}
|
|
51
|
+
): Promise<string>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Verifies the signature of a status list token and parses its payload.
|
|
41
55
|
* @since 1.3.3
|
|
42
56
|
* @param keys The JSON Web Key Set to verify the status list signature
|
|
43
|
-
* @param
|
|
44
|
-
* @
|
|
57
|
+
* @param statusList The encoded status list token
|
|
58
|
+
* @returns The decoded status list payload
|
|
45
59
|
*/
|
|
46
|
-
verifyAndParse(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
verifyAndParse(keys: JWK[], statusList: string): Promise<StatusList>;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Extracts the status at the specified index from a decoded status list.
|
|
64
|
+
* @since 1.3.3
|
|
65
|
+
* @param statusList The decoded status list
|
|
66
|
+
* @param idx The index to read
|
|
67
|
+
* @return The status of the credential and the raw status in hexadecimal format (e.g. "0x01")
|
|
68
|
+
*/
|
|
69
|
+
getStatus(
|
|
70
|
+
statusList: StatusList["status_list"],
|
|
71
|
+
idx: number
|
|
72
|
+
): {
|
|
73
|
+
rawStatus: string;
|
|
51
74
|
status: string;
|
|
52
|
-
}
|
|
75
|
+
};
|
|
53
76
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { UnixTime } from "../../../utils/zod";
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Common type for a parsed Status Assertion
|
|
3
6
|
*/
|
|
@@ -13,3 +16,27 @@ export type ParsedStatusAssertion = {
|
|
|
13
16
|
description: string;
|
|
14
17
|
};
|
|
15
18
|
};
|
|
19
|
+
|
|
20
|
+
const StatusListBits = z.union([
|
|
21
|
+
z.literal(1),
|
|
22
|
+
z.literal(2),
|
|
23
|
+
z.literal(4),
|
|
24
|
+
z.literal(8),
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
export type StatusListContent = z.infer<typeof StatusListContent>;
|
|
28
|
+
export const StatusListContent = z.object({
|
|
29
|
+
bits: StatusListBits,
|
|
30
|
+
lst: z.string().min(1),
|
|
31
|
+
aggregation_uri: z.url().optional(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export type StatusList = z.infer<typeof StatusList>;
|
|
35
|
+
export const StatusList = z.object({
|
|
36
|
+
sub: z.url(),
|
|
37
|
+
iat: UnixTime,
|
|
38
|
+
iss: z.url().optional(),
|
|
39
|
+
exp: UnixTime.optional(),
|
|
40
|
+
ttl: z.number().positive().optional(),
|
|
41
|
+
status_list: StatusListContent,
|
|
42
|
+
});
|
|
@@ -32,25 +32,26 @@ const getStatusListEntry = async (
|
|
|
32
32
|
return statusListEntry;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const fetchStatusList = (
|
|
36
|
+
uri: string,
|
|
37
|
+
appFetch: GlobalFetch["fetch"],
|
|
38
|
+
options: { cacheDisabled?: boolean } = {}
|
|
39
|
+
) =>
|
|
40
|
+
appFetch(uri, {
|
|
41
|
+
headers: {
|
|
42
|
+
Accept: "application/statuslist+jwt",
|
|
43
|
+
...(options.cacheDisabled && { "Cache-Control": "no-cache" }),
|
|
44
|
+
},
|
|
45
|
+
})
|
|
46
|
+
.then(hasStatusOrThrow(200))
|
|
47
|
+
.then((response) => response.text());
|
|
48
|
+
|
|
49
|
+
export const getStatusListByUri: StatusListApi["getByUri"] = async (
|
|
50
|
+
uri,
|
|
38
51
|
{ appFetch = fetch } = {}
|
|
39
52
|
) => {
|
|
40
|
-
const { uri, idx } = await getStatusListEntry(credential, format);
|
|
41
|
-
|
|
42
|
-
const fetchStatusList = (options: { cacheDisabled?: boolean } = {}) =>
|
|
43
|
-
appFetch(uri, {
|
|
44
|
-
headers: {
|
|
45
|
-
Accept: "application/statuslist+jwt",
|
|
46
|
-
...(options.cacheDisabled && { "Cache-Control": "no-cache" }),
|
|
47
|
-
},
|
|
48
|
-
})
|
|
49
|
-
.then(hasStatusOrThrow(200))
|
|
50
|
-
.then((response) => response.text());
|
|
51
|
-
|
|
52
53
|
// When the HTTP response includes cache headers, fetch will return a cached response and the JWT might be expired
|
|
53
|
-
let statusList = await fetchStatusList();
|
|
54
|
+
let statusList = await fetchStatusList(uri, appFetch);
|
|
54
55
|
const decoded = decodeJwt(statusList);
|
|
55
56
|
|
|
56
57
|
const { exp } = decoded.payload;
|
|
@@ -58,7 +59,18 @@ export const getStatusList: StatusListApi["get"] = async (
|
|
|
58
59
|
// If the status list JWT is expired, try to fetch it again bypassing the HTTP cache.
|
|
59
60
|
// If it is still expired after the refetch, `verifyAndParseStatusList` will throw.
|
|
60
61
|
if (exp && exp < Math.floor(Date.now() / 1000)) {
|
|
61
|
-
statusList = await fetchStatusList({ cacheDisabled: true });
|
|
62
|
+
statusList = await fetchStatusList(uri, appFetch, { cacheDisabled: true });
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
|
|
65
|
+
return statusList;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const getStatusList: StatusListApi["get"] = async (
|
|
69
|
+
credential,
|
|
70
|
+
format,
|
|
71
|
+
context
|
|
72
|
+
) => {
|
|
73
|
+
const { uri, idx } = await getStatusListEntry(credential, format);
|
|
74
|
+
const statusList = await getStatusListByUri(uri, context);
|
|
75
|
+
return { uri, idx, statusList, format: "jwt" };
|
|
64
76
|
};
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
import { verify } from "@pagopa/io-react-native-jwt";
|
|
2
|
-
import { getListFromStatusListJWT } from "@sd-jwt/jwt-status-list";
|
|
1
|
+
import { decode as decodeJwt, verify } from "@pagopa/io-react-native-jwt";
|
|
3
2
|
import type { StatusListApi } from "../api/status-list";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Mapping of status bits to their corresponding meaning as defined in the specification.
|
|
7
|
-
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/credential-revocation.html#token-status-lists
|
|
8
|
-
*/
|
|
9
|
-
const CredentialStatusMap = {
|
|
10
|
-
0x00: "VALID",
|
|
11
|
-
0x01: "INVALID",
|
|
12
|
-
0x02: "SUSPENDED",
|
|
13
|
-
0x03: "UPDATE",
|
|
14
|
-
0x0b: "ATTRIBUTE_UPDATE",
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
type CredentialStatusBit = keyof typeof CredentialStatusMap;
|
|
3
|
+
import { StatusList } from "../api/types";
|
|
18
4
|
|
|
19
5
|
export const verifyAndParseStatusList: StatusListApi["verifyAndParse"] = async (
|
|
20
6
|
keys,
|
|
21
|
-
|
|
7
|
+
statusList
|
|
22
8
|
) => {
|
|
23
|
-
await verify(
|
|
24
|
-
|
|
25
|
-
const statusList = getListFromStatusListJWT(rawStatusList);
|
|
26
|
-
const statusBit = statusList.getStatus(idx) as CredentialStatusBit;
|
|
27
|
-
const status = CredentialStatusMap[statusBit];
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
status,
|
|
31
|
-
statusBit: `0x${statusBit.toString(16).padStart(2, "0").toUpperCase()}`,
|
|
32
|
-
};
|
|
9
|
+
await verify(statusList, keys);
|
|
10
|
+
return StatusList.parse(decodeJwt(statusList).payload);
|
|
33
11
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StatusList as JwtStatusList } from "@sd-jwt/jwt-status-list";
|
|
2
|
+
import { IoWalletError } from "../../../utils/errors";
|
|
3
|
+
import type { StatusListApi } from "../api/status-list";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Mapping of status bits to their corresponding meaning as defined in the specification.
|
|
7
|
+
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/credential-revocation.html#token-status-lists
|
|
8
|
+
*/
|
|
9
|
+
const CredentialStatusMap = {
|
|
10
|
+
0x00: "VALID",
|
|
11
|
+
0x01: "INVALID",
|
|
12
|
+
0x02: "SUSPENDED",
|
|
13
|
+
0x03: "UPDATE",
|
|
14
|
+
0x0b: "ATTRIBUTE_UPDATE",
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
type CredentialStatusBit = keyof typeof CredentialStatusMap;
|
|
18
|
+
|
|
19
|
+
const formatStatusBit = (statusBit: number) =>
|
|
20
|
+
`0x${statusBit.toString(16).padStart(2, "0").toUpperCase()}`;
|
|
21
|
+
|
|
22
|
+
export const getStatus: StatusListApi["getStatus"] = (statusList, idx) => {
|
|
23
|
+
const decodedStatusList = JwtStatusList.decompressStatusList(
|
|
24
|
+
statusList.lst,
|
|
25
|
+
statusList.bits
|
|
26
|
+
);
|
|
27
|
+
const statusBit = decodedStatusList.getStatus(idx) as CredentialStatusBit;
|
|
28
|
+
const status = CredentialStatusMap[statusBit];
|
|
29
|
+
|
|
30
|
+
if (!status) {
|
|
31
|
+
throw new IoWalletError(
|
|
32
|
+
`Unsupported credential status bit: ${formatStatusBit(statusBit)}`
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
status,
|
|
38
|
+
rawStatus: formatStatusBit(statusBit),
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CredentialStatusApi } from "../api";
|
|
2
|
-
import { getStatusList } from "./01-status-list";
|
|
2
|
+
import { getStatusList, getStatusListByUri } from "./01-status-list";
|
|
3
3
|
import { verifyAndParseStatusList } from "./02-verify-and-parse-status-list";
|
|
4
|
+
import { getStatus } from "./03-get-status";
|
|
4
5
|
|
|
5
6
|
export const CredentialStatus: CredentialStatusApi = {
|
|
6
7
|
statusAssertion: {
|
|
@@ -9,6 +10,8 @@ export const CredentialStatus: CredentialStatusApi = {
|
|
|
9
10
|
statusList: {
|
|
10
11
|
isSupported: true,
|
|
11
12
|
get: getStatusList,
|
|
13
|
+
getByUri: getStatusListByUri,
|
|
12
14
|
verifyAndParse: verifyAndParseStatusList,
|
|
15
|
+
getStatus,
|
|
13
16
|
},
|
|
14
17
|
};
|
|
@@ -54,7 +54,7 @@ export interface CredentialsCatalogueApi {
|
|
|
54
54
|
* Given a statusBit (e.g. "0x00", "0x0B") and a DigitalCredential from the
|
|
55
55
|
* catalogue, returns the matching l10n IDs or undefined if not found.
|
|
56
56
|
* The comparison is case-insensitive to handle uppercase statusBit values
|
|
57
|
-
* returned by
|
|
57
|
+
* returned by getStatus against lowercase keys in the catalogue.
|
|
58
58
|
*
|
|
59
59
|
* @since 1.0.0
|
|
60
60
|
*/
|
|
@@ -5,7 +5,7 @@ import { type CredentialsCatalogueApi } from "../api";
|
|
|
5
5
|
* Given a statusBit (e.g. "0x00", "0x0B") and a DigitalCredential from the
|
|
6
6
|
* catalogue, returns the matching l10n IDs or undefined if not found.
|
|
7
7
|
* The comparison is case-insensitive to handle uppercase statusBit values
|
|
8
|
-
* returned by
|
|
8
|
+
* returned by getStatus against lowercase keys in the catalogue.
|
|
9
9
|
*/
|
|
10
10
|
export const getStatusL10nIds: CredentialsCatalogueApi["getStatusL10nIds"] = (
|
|
11
11
|
statusBit,
|