@secondlayer/sdk 10.6.0 → 12.0.0

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.
@@ -201,7 +201,6 @@ function raceAbort(promise, signal) {
201
201
  var LOCAL_API_URL = "http://127.0.0.1:3800";
202
202
  var INSTANCE_TOKEN_ENV = "INSTANCE_TOKEN";
203
203
  var ACCOUNT_KEY_ENV = "SECONDLAYER_API_KEY";
204
- var warnedUrlAlias = false;
205
204
  function resolveBaseUrl(explicit) {
206
205
  if (explicit && explicit.length > 0)
207
206
  return explicit.replace(/\/+$/, "");
@@ -209,14 +208,6 @@ function resolveBaseUrl(explicit) {
209
208
  const primary = process.env?.SECONDLAYER_API_URL || undefined;
210
209
  if (primary)
211
210
  return primary.replace(/\/+$/, "");
212
- const legacy = process.env?.SL_API_URL || undefined;
213
- if (legacy) {
214
- if (!warnedUrlAlias) {
215
- warnedUrlAlias = true;
216
- console.warn("[secondlayer] SL_API_URL is a legacy alias of SECONDLAYER_API_URL; using the alias this once.");
217
- }
218
- return legacy.replace(/\/+$/, "");
219
- }
220
211
  }
221
212
  return LOCAL_API_URL;
222
213
  }
@@ -228,26 +219,12 @@ function resolveApiKey(apiKey) {
228
219
  const token = process.env?.INSTANCE_TOKEN || undefined;
229
220
  return token;
230
221
  }
231
- var warnedArchiveAlias = false;
232
222
  function resolveAccountKey(accountKey) {
233
223
  if (accountKey !== undefined)
234
224
  return accountKey;
235
225
  if (typeof process === "undefined")
236
226
  return;
237
- const primary = process.env?.SECONDLAYER_API_KEY || undefined;
238
- const slAlias = process.env?.SL_API_KEY || undefined;
239
- const archiveAlias = process.env?.SL_ARCHIVE_API_KEY || undefined;
240
- if (primary)
241
- return primary;
242
- const legacy = slAlias ?? archiveAlias;
243
- if (legacy) {
244
- if (!warnedArchiveAlias) {
245
- warnedArchiveAlias = true;
246
- console.warn("[secondlayer] SL_API_KEY / SL_ARCHIVE_API_KEY are legacy aliases of SECONDLAYER_API_KEY; using the alias this once.");
247
- }
248
- return legacy;
249
- }
250
- return;
227
+ return process.env?.SECONDLAYER_API_KEY || undefined;
251
228
  }
252
229
  function seg(value) {
253
230
  return encodeURIComponent(String(value));
@@ -1553,5 +1530,5 @@ export {
1553
1530
  isStxTransfer
1554
1531
  };
1555
1532
 
1556
- //# debugId=DA295DDA55543B7064756E2164756E21
1533
+ //# debugId=F3581FADE7E6305A64756E2164756E21
1557
1534
  //# sourceMappingURL=index.js.map