@gvnrdao/dh-sdk 0.0.283 → 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 +7 -3
- package/dist/index.mjs +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -108501,14 +108501,14 @@ function buildLoginDomain(chainId) {
|
|
|
108501
108501
|
};
|
|
108502
108502
|
}
|
|
108503
108503
|
var LOGIN_TYPES = {
|
|
108504
|
-
|
|
108504
|
+
DiamondHands: [
|
|
108505
108505
|
{ name: "address", type: "address" },
|
|
108506
108506
|
{ name: "issuedAt", type: "uint256" },
|
|
108507
108507
|
{ name: "nonce", type: "bytes32" }
|
|
108508
108508
|
]
|
|
108509
108509
|
};
|
|
108510
108510
|
var LOGIN_TYPES_WITH_AUDIENCE = {
|
|
108511
|
-
|
|
108511
|
+
DiamondHands: [
|
|
108512
108512
|
{ name: "address", type: "address" },
|
|
108513
108513
|
{ name: "issuedAt", type: "uint256" },
|
|
108514
108514
|
{ name: "nonce", type: "bytes32" },
|
|
@@ -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
|
@@ -108423,14 +108423,14 @@ function buildLoginDomain(chainId) {
|
|
|
108423
108423
|
};
|
|
108424
108424
|
}
|
|
108425
108425
|
var LOGIN_TYPES = {
|
|
108426
|
-
|
|
108426
|
+
DiamondHands: [
|
|
108427
108427
|
{ name: "address", type: "address" },
|
|
108428
108428
|
{ name: "issuedAt", type: "uint256" },
|
|
108429
108429
|
{ name: "nonce", type: "bytes32" }
|
|
108430
108430
|
]
|
|
108431
108431
|
};
|
|
108432
108432
|
var LOGIN_TYPES_WITH_AUDIENCE = {
|
|
108433
|
-
|
|
108433
|
+
DiamondHands: [
|
|
108434
108434
|
{ name: "address", type: "address" },
|
|
108435
108435
|
{ name: "issuedAt", type: "uint256" },
|
|
108436
108436
|
{ name: "nonce", type: "bytes32" },
|
|
@@ -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