@sd-jwt/utils 0.3.2-next.99 → 0.4.1-next.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/CHANGELOG.md +12 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/disclosure.ts +6 -2
- package/src/test/disclosure.spec.ts +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# 0.4.0 (2024-03-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* add publish config ([#93](https://github.com/openwallet-foundation-labs/sd-jwt-js/issues/93)) ([2e4c5c1](https://github.com/openwallet-foundation-labs/sd-jwt-js/commit/2e4c5c176dc88e58e49d06783b7658d8ad872313))
|
|
12
|
+
* convert any usage into or typed version ([#80](https://github.com/openwallet-foundation-labs/sd-jwt-js/issues/80)) ([de4df54](https://github.com/openwallet-foundation-labs/sd-jwt-js/commit/de4df54f2a0a77fdbf97e10abac555a98e70c6e0))
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-jwt/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1-next.12+eb259c7",
|
|
4
4
|
"description": "sd-jwt draft 7 implementation in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@sd-jwt/crypto-nodejs": "0.
|
|
41
|
+
"@sd-jwt/crypto-nodejs": "0.4.1-next.12+eb259c7"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@sd-jwt/types": "0.
|
|
44
|
+
"@sd-jwt/types": "0.4.1-next.12+eb259c7",
|
|
45
45
|
"js-base64": "^3.7.6"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"esm"
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "eb259c74a386b0ca867b373f6ffa08b6b6b78d7b"
|
|
64
64
|
}
|
package/src/disclosure.ts
CHANGED
|
@@ -4,13 +4,17 @@ import {
|
|
|
4
4
|
Base64urlEncode,
|
|
5
5
|
} from './base64url';
|
|
6
6
|
import { SDJWTException } from './error';
|
|
7
|
-
import {
|
|
7
|
+
import type {
|
|
8
|
+
HasherAndAlg,
|
|
9
|
+
DisclosureData,
|
|
10
|
+
HasherAndAlgSync,
|
|
11
|
+
} from '@sd-jwt/types';
|
|
8
12
|
|
|
9
13
|
export class Disclosure<T = unknown> {
|
|
10
14
|
public salt: string;
|
|
11
15
|
public key?: string;
|
|
12
16
|
public value: T;
|
|
13
|
-
|
|
17
|
+
public _digest: string | undefined;
|
|
14
18
|
private _encoded: string | undefined;
|
|
15
19
|
|
|
16
20
|
public constructor(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { generateSalt, digest as hasher } from '@sd-jwt/crypto-nodejs';
|
|
2
2
|
import { Disclosure } from '../disclosure';
|
|
3
3
|
import { describe, expect, test } from 'vitest';
|
|
4
|
-
import { Base64urlEncode, SDJWTException } from '../index';
|
|
4
|
+
import { Base64urlEncode, type SDJWTException } from '../index';
|
|
5
5
|
|
|
6
6
|
const hash = { alg: 'SHA256', hasher };
|
|
7
7
|
|