@sd-jwt/crypto-browser 0.15.2-next.8 → 0.16.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/CHANGELOG.md +17 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/src/test/crypto.spec.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.16.0](https://github.com/openwallet-foundation/sd-jwt-js/compare/v0.15.1...v0.16.0) (2025-10-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* change repo url from labs to other one ([#323](https://github.com/openwallet-foundation/sd-jwt-js/issues/323)) ([f68c847](https://github.com/openwallet-foundation/sd-jwt-js/commit/f68c8476c2f04bb9d53acd4059b59caf271df015))
|
|
12
|
+
* set correct url in package json ([#321](https://github.com/openwallet-foundation/sd-jwt-js/issues/321)) ([554152c](https://github.com/openwallet-foundation/sd-jwt-js/commit/554152cc819bbc3afb504b25f4a2018a92fb72f1))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* updates all dependencies to latest versions + biome updates ([#324](https://github.com/openwallet-foundation/sd-jwt-js/issues/324)) ([75d5780](https://github.com/openwallet-foundation/sd-jwt-js/commit/75d5780fb53c5e2c886537b283503fc6fb088a4a))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
# [0.15.0](https://github.com/openwallet-foundation/sd-jwt-js/compare/v0.14.1...v0.15.0) (2025-08-20)
|
|
7
24
|
|
|
8
25
|
**Note:** Version bump only for package @sd-jwt/crypto-browser
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const generateSalt: (length: number) => string;
|
|
2
2
|
declare function digest(data: string | ArrayBuffer, algorithm?: string): Promise<Uint8Array>;
|
|
3
|
-
declare const getHasher: (algorithm?: string) => (data: string) => Promise<Uint8Array
|
|
3
|
+
declare const getHasher: (algorithm?: string) => (data: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
4
4
|
declare const ES256: {
|
|
5
5
|
alg: string;
|
|
6
6
|
generateKeyPair(): Promise<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const generateSalt: (length: number) => string;
|
|
2
2
|
declare function digest(data: string | ArrayBuffer, algorithm?: string): Promise<Uint8Array>;
|
|
3
|
-
declare const getHasher: (algorithm?: string) => (data: string) => Promise<Uint8Array
|
|
3
|
+
declare const getHasher: (algorithm?: string) => (data: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
4
4
|
declare const ES256: {
|
|
5
5
|
alg: string;
|
|
6
6
|
generateKeyPair(): Promise<{
|
package/dist/index.js
CHANGED
|
@@ -113,7 +113,7 @@ var ES256 = {
|
|
|
113
113
|
// whether the key is extractable (i.e., can be used in exportKey)
|
|
114
114
|
["sign"]
|
|
115
115
|
);
|
|
116
|
-
return (data) => __async(
|
|
116
|
+
return (data) => __async(null, null, function* () {
|
|
117
117
|
const encoder = new TextEncoder();
|
|
118
118
|
const signature = yield window.crypto.subtle.sign(
|
|
119
119
|
{
|
|
@@ -142,7 +142,7 @@ var ES256 = {
|
|
|
142
142
|
// whether the key is extractable (i.e., can be used in exportKey)
|
|
143
143
|
["verify"]
|
|
144
144
|
);
|
|
145
|
-
return (data, signatureBase64url) => __async(
|
|
145
|
+
return (data, signatureBase64url) => __async(null, null, function* () {
|
|
146
146
|
const encoder = new TextEncoder();
|
|
147
147
|
const signature = Uint8Array.from(
|
|
148
148
|
atob(signatureBase64url.replace(/-/g, "+").replace(/_/g, "/")),
|
package/dist/index.mjs
CHANGED
|
@@ -85,7 +85,7 @@ var ES256 = {
|
|
|
85
85
|
// whether the key is extractable (i.e., can be used in exportKey)
|
|
86
86
|
["sign"]
|
|
87
87
|
);
|
|
88
|
-
return (data) => __async(
|
|
88
|
+
return (data) => __async(null, null, function* () {
|
|
89
89
|
const encoder = new TextEncoder();
|
|
90
90
|
const signature = yield window.crypto.subtle.sign(
|
|
91
91
|
{
|
|
@@ -114,7 +114,7 @@ var ES256 = {
|
|
|
114
114
|
// whether the key is extractable (i.e., can be used in exportKey)
|
|
115
115
|
["verify"]
|
|
116
116
|
);
|
|
117
|
-
return (data, signatureBase64url) => __async(
|
|
117
|
+
return (data, signatureBase64url) => __async(null, null, function* () {
|
|
118
118
|
const encoder = new TextEncoder();
|
|
119
119
|
const signature = Uint8Array.from(
|
|
120
120
|
atob(signatureBase64url.replace(/-/g, "+").replace(/_/g, "/")),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-jwt/crypto-browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "sd-jwt draft 7 implementation in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"esm"
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "910c79c1607e91ae61e048a0c1b81c9ba0886684"
|
|
52
52
|
}
|
package/src/test/crypto.spec.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { digest, ES256, generateSalt, getHasher } from '../index';
|
|
3
3
|
|
|
4
4
|
// Extract the major version as a number
|
|
5
5
|
const nodeVersionMajor = Number.parseInt(
|