@gvnrdao/dh-sdk 0.0.284 → 0.0.285
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/browser/dist/browser.js +1 -1
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -118078,7 +118078,11 @@ var DiamondHandsSDK = class _DiamondHandsSDK {
|
|
|
118078
118078
|
}
|
|
118079
118079
|
this.pkpManager = pkpManagerResult.value;
|
|
118080
118080
|
const serviceMode = isServiceModeConfig(config);
|
|
118081
|
-
|
|
118081
|
+
let graphEndpoint = serviceMode ? `${config.serviceEndpoint}/api/lit/graph/query` : config.subgraphs?.diamondHandsUrl;
|
|
118082
|
+
const ETHEREUM_MAINNET_CHAIN_ID = 1;
|
|
118083
|
+
if (serviceMode && graphEndpoint && typeof config.chainId === "number" && config.chainId !== ETHEREUM_MAINNET_CHAIN_ID) {
|
|
118084
|
+
graphEndpoint += `?chainId=${config.chainId}`;
|
|
118085
|
+
}
|
|
118082
118086
|
if (!graphEndpoint) {
|
|
118083
118087
|
throw new Error(
|
|
118084
118088
|
"Diamond Hands subgraph URL is required. Please provide config.subgraphs.diamondHandsUrl"
|
package/dist/index.mjs
CHANGED
|
@@ -118000,7 +118000,11 @@ var DiamondHandsSDK = class _DiamondHandsSDK {
|
|
|
118000
118000
|
}
|
|
118001
118001
|
this.pkpManager = pkpManagerResult.value;
|
|
118002
118002
|
const serviceMode = isServiceModeConfig(config);
|
|
118003
|
-
|
|
118003
|
+
let graphEndpoint = serviceMode ? `${config.serviceEndpoint}/api/lit/graph/query` : config.subgraphs?.diamondHandsUrl;
|
|
118004
|
+
const ETHEREUM_MAINNET_CHAIN_ID = 1;
|
|
118005
|
+
if (serviceMode && graphEndpoint && typeof config.chainId === "number" && config.chainId !== ETHEREUM_MAINNET_CHAIN_ID) {
|
|
118006
|
+
graphEndpoint += `?chainId=${config.chainId}`;
|
|
118007
|
+
}
|
|
118004
118008
|
if (!graphEndpoint) {
|
|
118005
118009
|
throw new Error(
|
|
118006
118010
|
"Diamond Hands subgraph URL is required. Please provide config.subgraphs.diamondHandsUrl"
|
package/package.json
CHANGED