n3-sdk 0.1.16 → 0.1.18

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 CHANGED
@@ -2766,13 +2766,6 @@ var Receiver = class {
2766
2766
  if (maxBlock > 0) await this.store.setLastProcessedBlock(maxBlock);
2767
2767
  }
2768
2768
  };
2769
- var RAW_PK = process.env.RELAYER_KEY;
2770
- var PK = RAW_PK;
2771
- if (PK.length !== 66) {
2772
- throw new Error(
2773
- `RELAYER_KEY must be 32-byte hex (0x + 64 hex chars). Got length=${PK.length}.`
2774
- );
2775
- }
2776
2769
  function toViemFromBlock(fb) {
2777
2770
  if (fb === void 0) return void 0;
2778
2771
  return typeof fb === "number" ? BigInt(fb) : fb;
@@ -2977,9 +2970,6 @@ function readEnv(name) {
2977
2970
  return void 0;
2978
2971
  }
2979
2972
  }
2980
- function trimTrailingSlashes(u) {
2981
- return u.replace(/\/+$/, "");
2982
- }
2983
2973
  function getDomainEnvClient(overrides = {}) {
2984
2974
  const chainIdDec = overrides.chainIdDec ?? Number(readEnv("NEXT_PUBLIC_CHAIN_ID_DEC") ?? 0);
2985
2975
  const domainDec = overrides.domainDec ?? Number(readEnv("NEXT_PUBLIC_DOMAIN_DEC") ?? 0);
@@ -2987,11 +2977,8 @@ function getDomainEnvClient(overrides = {}) {
2987
2977
  if (!pool || !pool.startsWith("0x")) {
2988
2978
  pool = "0x0000000000000000000000000000000000000000";
2989
2979
  }
2990
- const rawIndexer = overrides.indexerUrl ?? readEnv("NEXT_PUBLIC_INDEXER_URL") ?? "";
2991
- const indexerUrl = trimTrailingSlashes(rawIndexer.trim());
2992
- const proofFromEnv = overrides.proofUrl ?? readEnv("NEXT_PUBLIC_PROOF_URL") ?? "";
2993
- const derivedProof = indexerUrl.length === 0 ? "" : indexerUrl.endsWith("/graphql") ? indexerUrl.replace(/\/graphql$/, "/proof") : `${indexerUrl}/proof`;
2994
- 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;
2995
2982
  const treeDepth = overrides.treeDepth ?? Number(readEnv("NEXT_PUBLIC_TREE_DEPTH") ?? 20);
2996
2983
  if (!indexerUrl) {
2997
2984
  console.warn(