@trustvc/trustvc 1.5.1 → 1.5.3
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.
|
@@ -6,7 +6,14 @@ var ethersV6 = require('ethersV6');
|
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
8
|
const isV6EthersProvider = /* @__PURE__ */ __name((provider) => {
|
|
9
|
-
|
|
9
|
+
if (provider?._isProvider === true) {
|
|
10
|
+
return false;
|
|
11
|
+
} else if (provider?.provider && provider?.signTransaction) {
|
|
12
|
+
return isV6EthersProvider(provider.provider);
|
|
13
|
+
} else if (provider?.provider && !provider?.signTransaction) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
throw new Error("Unknown provider type");
|
|
10
17
|
}, "isV6EthersProvider");
|
|
11
18
|
const getEthersContractFromProvider = /* @__PURE__ */ __name((provider) => {
|
|
12
19
|
return isV6EthersProvider(provider) ? ethersV6.ethers.Contract : ethers.ethers.Contract;
|
|
@@ -19,7 +19,7 @@ const w3cSignatureIntegrity = {
|
|
|
19
19
|
}, "skip"),
|
|
20
20
|
test: /* @__PURE__ */ __name((document) => {
|
|
21
21
|
const doc = document;
|
|
22
|
-
return doc.proof?.type === "BbsBlsSignature2020";
|
|
22
|
+
return doc.proof?.type === "BbsBlsSignature2020" || doc.proof?.type === "BbsBlsSignatureProof2020";
|
|
23
23
|
}, "test"),
|
|
24
24
|
verify: /* @__PURE__ */ __name(async (document, verifierOptions) => {
|
|
25
25
|
const doc = document;
|
|
@@ -4,7 +4,14 @@ import { ethers } from 'ethersV6';
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
6
|
const isV6EthersProvider = /* @__PURE__ */ __name((provider) => {
|
|
7
|
-
|
|
7
|
+
if (provider?._isProvider === true) {
|
|
8
|
+
return false;
|
|
9
|
+
} else if (provider?.provider && provider?.signTransaction) {
|
|
10
|
+
return isV6EthersProvider(provider.provider);
|
|
11
|
+
} else if (provider?.provider && !provider?.signTransaction) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
throw new Error("Unknown provider type");
|
|
8
15
|
}, "isV6EthersProvider");
|
|
9
16
|
const getEthersContractFromProvider = /* @__PURE__ */ __name((provider) => {
|
|
10
17
|
return isV6EthersProvider(provider) ? ethers.Contract : ethers$1.Contract;
|
|
@@ -17,7 +17,7 @@ const w3cSignatureIntegrity = {
|
|
|
17
17
|
}, "skip"),
|
|
18
18
|
test: /* @__PURE__ */ __name((document) => {
|
|
19
19
|
const doc = document;
|
|
20
|
-
return doc.proof?.type === "BbsBlsSignature2020";
|
|
20
|
+
return doc.proof?.type === "BbsBlsSignature2020" || doc.proof?.type === "BbsBlsSignatureProof2020";
|
|
21
21
|
}, "test"),
|
|
22
22
|
verify: /* @__PURE__ */ __name(async (document, verifierOptions) => {
|
|
23
23
|
const doc = document;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustvc/trustvc",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "TrustVC library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
"@tradetrust-tt/tradetrust": "^6.10.1",
|
|
118
118
|
"@tradetrust-tt/tradetrust-utils": "^2.3.1",
|
|
119
119
|
"@tradetrust-tt/tt-verify": "^9.4.0",
|
|
120
|
-
"@trustvc/w3c-context": "^1.2.
|
|
120
|
+
"@trustvc/w3c-context": "^1.2.13",
|
|
121
121
|
"@trustvc/w3c-credential-status": "^1.2.12",
|
|
122
122
|
"@trustvc/w3c-issuer": "^1.2.3",
|
|
123
|
-
"@trustvc/w3c-vc": "^1.2.
|
|
123
|
+
"@trustvc/w3c-vc": "^1.2.17",
|
|
124
124
|
"ethers": "^5.8.0",
|
|
125
125
|
"ethersV6": "npm:ethers@^6.14.3",
|
|
126
126
|
"js-sha3": "^0.9.3",
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
"eslint-plugin-node": "^11.1.0",
|
|
148
148
|
"eslint-plugin-prettier": "^5.2.6",
|
|
149
149
|
"eslint-plugin-promise": "^7.2.1",
|
|
150
|
+
"eth-testing": "^1.14.0",
|
|
150
151
|
"execa": "^9.5.2",
|
|
151
152
|
"husky": "^9.1.7",
|
|
152
153
|
"lint-staged": "^15.5.1",
|