n3-sdk 0.1.17 → 0.1.19
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/client.js +2 -8
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -2970,9 +2970,6 @@ function readEnv(name) {
|
|
|
2970
2970
|
return void 0;
|
|
2971
2971
|
}
|
|
2972
2972
|
}
|
|
2973
|
-
function trimTrailingSlashes(u) {
|
|
2974
|
-
return u.replace(/\/+$/, "");
|
|
2975
|
-
}
|
|
2976
2973
|
function getDomainEnvClient(overrides = {}) {
|
|
2977
2974
|
const chainIdDec = overrides.chainIdDec ?? Number(readEnv("NEXT_PUBLIC_CHAIN_ID_DEC") ?? 0);
|
|
2978
2975
|
const domainDec = overrides.domainDec ?? Number(readEnv("NEXT_PUBLIC_DOMAIN_DEC") ?? 0);
|
|
@@ -2980,11 +2977,8 @@ function getDomainEnvClient(overrides = {}) {
|
|
|
2980
2977
|
if (!pool || !pool.startsWith("0x")) {
|
|
2981
2978
|
pool = "0x0000000000000000000000000000000000000000";
|
|
2982
2979
|
}
|
|
2983
|
-
const
|
|
2984
|
-
const
|
|
2985
|
-
const proofFromEnv = overrides.proofUrl ?? readEnv("NEXT_PUBLIC_PROOF_URL") ?? "";
|
|
2986
|
-
const derivedProof = indexerUrl.length === 0 ? "" : indexerUrl.endsWith("/graphql") ? indexerUrl.replace(/\/graphql$/, "/proof") : `${indexerUrl}/proof`;
|
|
2987
|
-
const proofUrl = proofFromEnv || derivedProof || void 0;
|
|
2980
|
+
const indexerUrl = (overrides.indexerUrl ?? readEnv("NEXT_PUBLIC_INDEXER_URL") ?? "").trim();
|
|
2981
|
+
const proofUrl = (overrides.proofUrl ?? readEnv("NEXT_PUBLIC_PROOF_URL") ?? void 0) || void 0;
|
|
2988
2982
|
const treeDepth = overrides.treeDepth ?? Number(readEnv("NEXT_PUBLIC_TREE_DEPTH") ?? 20);
|
|
2989
2983
|
if (!indexerUrl) {
|
|
2990
2984
|
console.warn(
|