@calimero-network/mero-react 9.7.0 → 9.7.1
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 +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -162,10 +162,18 @@ function isLoopback(relayUrl) {
|
|
|
162
162
|
var TRUSTED_RELAY_PROFILE = "locked-read-only";
|
|
163
163
|
var MIN_RELAY_RELEASE = "2.3.99";
|
|
164
164
|
var loadedDcap;
|
|
165
|
+
function dcapVerifyFrom(mod) {
|
|
166
|
+
const ns = mod;
|
|
167
|
+
const verify = typeof ns.verify === "function" ? ns.verify : ns.default?.verify;
|
|
168
|
+
if (typeof verify !== "function") {
|
|
169
|
+
throw new TypeError("@phala/dcap-qvl loaded without a verify function");
|
|
170
|
+
}
|
|
171
|
+
return verify;
|
|
172
|
+
}
|
|
165
173
|
function relayQuoteVerifier(relayUrl) {
|
|
166
174
|
const verify = async (attestation) => {
|
|
167
175
|
loadedDcap ?? (loadedDcap = import('@phala/dcap-qvl').then(
|
|
168
|
-
(
|
|
176
|
+
(mod) => dcapVerifyFrom(mod),
|
|
169
177
|
(error) => {
|
|
170
178
|
loadedDcap = void 0;
|
|
171
179
|
throw error;
|