@blocklet/util 0.16.2 → 0.16.4

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/index.cjs CHANGED
@@ -87,7 +87,7 @@ async function verifyDownloadToken({
87
87
  if (isEmpty__default(downloadToken)) {
88
88
  throw new Error("downloadToken must be provided");
89
89
  }
90
- if (!jwt.verify(downloadToken, storePublicKey)) {
90
+ if (!await jwt.verify(downloadToken, storePublicKey)) {
91
91
  throw new Error("downloadToken is invalid");
92
92
  }
93
93
  const payloadFromStoreSignature = jwt.decode(downloadToken, true);
@@ -106,7 +106,7 @@ async function verifyDownloadToken({
106
106
  if (isEmpty__default(serverSignature)) {
107
107
  throw new Error("serverSignature must be provided");
108
108
  }
109
- if (!jwt.verify(serverSignature, serverPublicKey)) {
109
+ if (!await jwt.verify(serverSignature, serverPublicKey)) {
110
110
  throw new Error("serverSignature is invalid");
111
111
  }
112
112
  }
package/dist/index.mjs CHANGED
@@ -81,7 +81,7 @@ async function verifyDownloadToken({
81
81
  if (isEmpty(downloadToken)) {
82
82
  throw new Error("downloadToken must be provided");
83
83
  }
84
- if (!verify(downloadToken, storePublicKey)) {
84
+ if (!await verify(downloadToken, storePublicKey)) {
85
85
  throw new Error("downloadToken is invalid");
86
86
  }
87
87
  const payloadFromStoreSignature = decode(downloadToken, true);
@@ -100,7 +100,7 @@ async function verifyDownloadToken({
100
100
  if (isEmpty(serverSignature)) {
101
101
  throw new Error("serverSignature must be provided");
102
102
  }
103
- if (!verify(serverSignature, serverPublicKey)) {
103
+ if (!await verify(serverSignature, serverPublicKey)) {
104
104
  throw new Error("serverSignature is invalid");
105
105
  }
106
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/util",
3
- "version": "0.16.2",
3
+ "version": "0.16.4",
4
4
  "author": "skypesky ye",
5
5
  "license": "ISC",
6
6
  "description": "",
@@ -40,11 +40,11 @@
40
40
  "vitest": "^2.1.4"
41
41
  },
42
42
  "dependencies": {
43
- "@arcblock/did": "^1.18.165",
44
- "@arcblock/jwt": "^1.18.165",
45
- "@ocap/util": "^1.18.165",
46
- "@ocap/wallet": "^1.18.165",
43
+ "@arcblock/did": "^1.19.2",
44
+ "@arcblock/jwt": "^1.19.2",
45
+ "@ocap/util": "^1.19.2",
46
+ "@ocap/wallet": "^1.19.2",
47
47
  "lodash": "^4.17.21"
48
48
  },
49
- "gitHead": "76839d137c0164248452cc09ddbb73f47fbd2065"
49
+ "gitHead": "91fbfb95692e5696dc829e91cfd923a690e26b31"
50
50
  }