@tdxvolt/volt-client-grpc 0.18.6 → 0.18.7
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/lib/index.cjs +5 -2
- package/package.json +1 -1
- package/src/utils.js +4 -1
- package/src/volt-client-internal.js +1 -1
package/lib/index.cjs
CHANGED
|
@@ -96,7 +96,10 @@ const getDIDResolutionURL = (didIn, registryUrl = "") => {
|
|
|
96
96
|
return "";
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
let lookupUrl = registryUrl || `https://${constants.defaultDIDHostName}`;
|
|
100
|
+
if (!lookupUrl.startsWith("http")) {
|
|
101
|
+
lookupUrl = `https://${lookupUrl}`;
|
|
102
|
+
}
|
|
100
103
|
return `${lookupUrl}/did/${didIn}`;
|
|
101
104
|
};
|
|
102
105
|
|
|
@@ -5329,7 +5332,7 @@ async function fetchVoltConfigFromDID(
|
|
|
5329
5332
|
}
|
|
5330
5333
|
}
|
|
5331
5334
|
|
|
5332
|
-
throw new Error(
|
|
5335
|
+
throw new Error(`Failed to fetch Volt config from any of these registries: ${registryList.join(", ")}`);
|
|
5333
5336
|
}
|
|
5334
5337
|
|
|
5335
5338
|
const { readFile } = fs__default["default"].promises;
|
package/package.json
CHANGED
package/src/utils.js
CHANGED
|
@@ -47,6 +47,9 @@ export const getDIDResolutionURL = (didIn, registryUrl = "") => {
|
|
|
47
47
|
return "";
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
let lookupUrl = registryUrl || `https://${constants.defaultDIDHostName}`;
|
|
51
|
+
if (!lookupUrl.startsWith("http")) {
|
|
52
|
+
lookupUrl = `https://${lookupUrl}`;
|
|
53
|
+
}
|
|
51
54
|
return `${lookupUrl}/did/${didIn}`;
|
|
52
55
|
};
|