@learncard/helpers 1.3.10 → 1.3.12
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/helpers.cjs.development.cjs +15 -5
- package/dist/helpers.cjs.development.cjs.map +2 -2
- package/dist/helpers.cjs.production.min.cjs +2 -2
- package/dist/helpers.cjs.production.min.cjs.map +3 -3
- package/dist/helpers.d.cts +12 -9
- package/dist/helpers.d.ts +12 -9
- package/dist/helpers.esm.js +13 -3
- package/dist/helpers.esm.js.map +2 -2
- package/package.json +3 -3
- package/src/bitstring-status-list/index.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@learncard/helpers",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.12",
|
|
4
4
|
"description": "Shared helpers for LearnCard packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@noble/hashes": "^1.8.0",
|
|
61
61
|
"@sd-jwt/decode": "^0.19.0",
|
|
62
|
-
"@learncard/types": "5.18.
|
|
63
|
-
"@trpc/server": "11.
|
|
62
|
+
"@learncard/types": "5.18.1",
|
|
63
|
+
"@trpc/server": "11.8.0",
|
|
64
64
|
"immer": "^10.0.3",
|
|
65
65
|
"use-immer": "^0.9.0",
|
|
66
66
|
"zod": "4.1.13"
|
|
@@ -15,11 +15,15 @@ export const isBitstringStatusListEntry = (status: unknown): status is Bitstring
|
|
|
15
15
|
if (!status || typeof status !== 'object') return false;
|
|
16
16
|
|
|
17
17
|
const record = status as Record<string, unknown>;
|
|
18
|
+
const statusListIndex = record.statusListIndex;
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
21
|
record.type === 'BitstringStatusListEntry' &&
|
|
21
22
|
(record.statusPurpose === 'revocation' || record.statusPurpose === 'suspension') &&
|
|
22
|
-
typeof
|
|
23
|
+
(typeof statusListIndex === 'string' ||
|
|
24
|
+
(typeof statusListIndex === 'number' &&
|
|
25
|
+
Number.isInteger(statusListIndex) &&
|
|
26
|
+
statusListIndex >= 0)) &&
|
|
23
27
|
typeof record.statusListCredential === 'string'
|
|
24
28
|
);
|
|
25
29
|
};
|