@strkfarm/sdk 1.1.61 → 1.1.63

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.
@@ -23,11 +23,11 @@ var strkfarm_risk_engine = (() => {
23
23
  for (var name in all3)
24
24
  __defProp(target, name, { get: all3[name], enumerable: true });
25
25
  };
26
- var __copyProps = (to, from, except, desc) => {
27
- if (from && typeof from === "object" || typeof from === "function") {
28
- for (let key of __getOwnPropNames(from))
26
+ var __copyProps = (to, from2, except, desc) => {
27
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
28
+ for (let key of __getOwnPropNames(from2))
29
29
  if (!__hasOwnProp.call(to, key) && key !== except)
30
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
31
31
  }
32
32
  return to;
33
33
  };
@@ -1776,10 +1776,10 @@ var strkfarm_risk_engine = (() => {
1776
1776
  } else if (indexOf(seen, obj) >= 0) {
1777
1777
  return "[Circular]";
1778
1778
  }
1779
- function inspect2(value, from, noIndent) {
1780
- if (from) {
1779
+ function inspect2(value, from2, noIndent) {
1780
+ if (from2) {
1781
1781
  seen = $arrSlice.call(seen);
1782
- seen.push(from);
1782
+ seen.push(from2);
1783
1783
  }
1784
1784
  if (noIndent) {
1785
1785
  var newOpts = {
@@ -5073,13 +5073,13 @@ var strkfarm_risk_engine = (() => {
5073
5073
  if (typeof separator !== "string")
5074
5074
  throw new Error("join separator should be string");
5075
5075
  return {
5076
- encode: (from) => {
5077
- if (!Array.isArray(from) || from.length && typeof from[0] !== "string")
5076
+ encode: (from2) => {
5077
+ if (!Array.isArray(from2) || from2.length && typeof from2[0] !== "string")
5078
5078
  throw new Error("join.encode input should be array of strings");
5079
- for (let i of from)
5079
+ for (let i of from2)
5080
5080
  if (typeof i !== "string")
5081
5081
  throw new Error(`join.encode: non-string input=${i}`);
5082
- return from.join(separator);
5082
+ return from2.join(separator);
5083
5083
  },
5084
5084
  decode: (to) => {
5085
5085
  if (typeof to !== "string")
@@ -5125,12 +5125,12 @@ var strkfarm_risk_engine = (() => {
5125
5125
  function normalize3(fn) {
5126
5126
  if (typeof fn !== "function")
5127
5127
  throw new Error("normalize fn should be function");
5128
- return { encode: (from) => from, decode: (to) => fn(to) };
5128
+ return { encode: (from2) => from2, decode: (to) => fn(to) };
5129
5129
  }
5130
5130
  // @__NO_SIDE_EFFECTS__
5131
- function convertRadix(data, from, to) {
5132
- if (from < 2)
5133
- throw new Error(`convertRadix: wrong from=${from}, base cannot be less than 2`);
5131
+ function convertRadix(data, from2, to) {
5132
+ if (from2 < 2)
5133
+ throw new Error(`convertRadix: wrong from=${from2}, base cannot be less than 2`);
5134
5134
  if (to < 2)
5135
5135
  throw new Error(`convertRadix: wrong to=${to}, base cannot be less than 2`);
5136
5136
  if (!Array.isArray(data))
@@ -5142,7 +5142,7 @@ var strkfarm_risk_engine = (() => {
5142
5142
  const digits = Array.from(data);
5143
5143
  digits.forEach((d) => {
5144
5144
  /* @__PURE__ */ assertNumber(d);
5145
- if (d < 0 || d >= from)
5145
+ if (d < 0 || d >= from2)
5146
5146
  throw new Error(`Wrong integer: ${d}`);
5147
5147
  });
5148
5148
  while (true) {
@@ -5150,8 +5150,8 @@ var strkfarm_risk_engine = (() => {
5150
5150
  let done = true;
5151
5151
  for (let i = pos; i < digits.length; i++) {
5152
5152
  const digit = digits[i];
5153
- const digitBase = from * carry + digit;
5154
- if (!Number.isSafeInteger(digitBase) || from * carry / from !== carry || digitBase - digit !== from * carry) {
5153
+ const digitBase = from2 * carry + digit;
5154
+ if (!Number.isSafeInteger(digitBase) || from2 * carry / from2 !== carry || digitBase - digit !== from2 * carry) {
5155
5155
  throw new Error("convertRadix: carry overflow");
5156
5156
  }
5157
5157
  carry = digitBase % to;
@@ -5175,17 +5175,17 @@ var strkfarm_risk_engine = (() => {
5175
5175
  return res.reverse();
5176
5176
  }
5177
5177
  var gcd2 = /* @__NO_SIDE_EFFECTS__ */ (a, b) => !b ? a : /* @__PURE__ */ gcd2(b, a % b);
5178
- var radix2carry2 = /* @__NO_SIDE_EFFECTS__ */ (from, to) => from + (to - /* @__PURE__ */ gcd2(from, to));
5178
+ var radix2carry2 = /* @__NO_SIDE_EFFECTS__ */ (from2, to) => from2 + (to - /* @__PURE__ */ gcd2(from2, to));
5179
5179
  // @__NO_SIDE_EFFECTS__
5180
- function convertRadix22(data, from, to, padding3) {
5180
+ function convertRadix22(data, from2, to, padding3) {
5181
5181
  if (!Array.isArray(data))
5182
5182
  throw new Error("convertRadix2: data should be array");
5183
- if (from <= 0 || from > 32)
5184
- throw new Error(`convertRadix2: wrong from=${from}`);
5183
+ if (from2 <= 0 || from2 > 32)
5184
+ throw new Error(`convertRadix2: wrong from=${from2}`);
5185
5185
  if (to <= 0 || to > 32)
5186
5186
  throw new Error(`convertRadix2: wrong to=${to}`);
5187
- if (/* @__PURE__ */ radix2carry2(from, to) > 32) {
5188
- throw new Error(`convertRadix2: carry overflow from=${from} to=${to} carryBits=${/* @__PURE__ */ radix2carry2(from, to)}`);
5187
+ if (/* @__PURE__ */ radix2carry2(from2, to) > 32) {
5188
+ throw new Error(`convertRadix2: carry overflow from=${from2} to=${to} carryBits=${/* @__PURE__ */ radix2carry2(from2, to)}`);
5189
5189
  }
5190
5190
  let carry = 0;
5191
5191
  let pos = 0;
@@ -5193,18 +5193,18 @@ var strkfarm_risk_engine = (() => {
5193
5193
  const res = [];
5194
5194
  for (const n of data) {
5195
5195
  /* @__PURE__ */ assertNumber(n);
5196
- if (n >= 2 ** from)
5197
- throw new Error(`convertRadix2: invalid data word=${n} from=${from}`);
5198
- carry = carry << from | n;
5199
- if (pos + from > 32)
5200
- throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from}`);
5201
- pos += from;
5196
+ if (n >= 2 ** from2)
5197
+ throw new Error(`convertRadix2: invalid data word=${n} from=${from2}`);
5198
+ carry = carry << from2 | n;
5199
+ if (pos + from2 > 32)
5200
+ throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from2}`);
5201
+ pos += from2;
5202
5202
  for (; pos >= to; pos -= to)
5203
5203
  res.push((carry >> pos - to & mask2) >>> 0);
5204
5204
  carry &= 2 ** pos - 1;
5205
5205
  }
5206
5206
  carry = carry << to - pos & mask2;
5207
- if (!padding3 && pos >= from)
5207
+ if (!padding3 && pos >= from2)
5208
5208
  throw new Error("Excess padding");
5209
5209
  if (!padding3 && carry)
5210
5210
  throw new Error(`Non-zero padding: ${carry}`);
@@ -8424,7 +8424,7 @@ var strkfarm_risk_engine = (() => {
8424
8424
  function normalizeS(s) {
8425
8425
  return isBiggerThanHalfOrder(s) ? modN(-s) : s;
8426
8426
  }
8427
- const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));
8427
+ const slcNum = (b, from2, to) => ut.bytesToNumberBE(b.slice(from2, to));
8428
8428
  class Signature3 {
8429
8429
  constructor(r, s, recovery) {
8430
8430
  this.r = r;
@@ -10302,7 +10302,7 @@ var strkfarm_risk_engine = (() => {
10302
10302
  function normalizeS(s) {
10303
10303
  return isBiggerThanHalfOrder(s) ? modN(-s) : s;
10304
10304
  }
10305
- const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));
10305
+ const slcNum = (b, from2, to) => ut.bytesToNumberBE(b.slice(from2, to));
10306
10306
  class Signature3 {
10307
10307
  constructor(r, s, recovery) {
10308
10308
  this.r = r;
@@ -13249,7 +13249,7 @@ ${r2}}` : "}", l2;
13249
13249
  let op;
13250
13250
  let len;
13251
13251
  let dist;
13252
- let from;
13252
+ let from2;
13253
13253
  let from_source;
13254
13254
  let input, output;
13255
13255
  const state = strm.state;
@@ -13342,72 +13342,72 @@ ${r2}}` : "}", l2;
13342
13342
  break top;
13343
13343
  }
13344
13344
  }
13345
- from = 0;
13345
+ from2 = 0;
13346
13346
  from_source = s_window;
13347
13347
  if (wnext === 0) {
13348
- from += wsize - op;
13348
+ from2 += wsize - op;
13349
13349
  if (op < len) {
13350
13350
  len -= op;
13351
13351
  do {
13352
- output[_out++] = s_window[from++];
13352
+ output[_out++] = s_window[from2++];
13353
13353
  } while (--op);
13354
- from = _out - dist;
13354
+ from2 = _out - dist;
13355
13355
  from_source = output;
13356
13356
  }
13357
13357
  } else if (wnext < op) {
13358
- from += wsize + wnext - op;
13358
+ from2 += wsize + wnext - op;
13359
13359
  op -= wnext;
13360
13360
  if (op < len) {
13361
13361
  len -= op;
13362
13362
  do {
13363
- output[_out++] = s_window[from++];
13363
+ output[_out++] = s_window[from2++];
13364
13364
  } while (--op);
13365
- from = 0;
13365
+ from2 = 0;
13366
13366
  if (wnext < len) {
13367
13367
  op = wnext;
13368
13368
  len -= op;
13369
13369
  do {
13370
- output[_out++] = s_window[from++];
13370
+ output[_out++] = s_window[from2++];
13371
13371
  } while (--op);
13372
- from = _out - dist;
13372
+ from2 = _out - dist;
13373
13373
  from_source = output;
13374
13374
  }
13375
13375
  }
13376
13376
  } else {
13377
- from += wnext - op;
13377
+ from2 += wnext - op;
13378
13378
  if (op < len) {
13379
13379
  len -= op;
13380
13380
  do {
13381
- output[_out++] = s_window[from++];
13381
+ output[_out++] = s_window[from2++];
13382
13382
  } while (--op);
13383
- from = _out - dist;
13383
+ from2 = _out - dist;
13384
13384
  from_source = output;
13385
13385
  }
13386
13386
  }
13387
13387
  while (len > 2) {
13388
- output[_out++] = from_source[from++];
13389
- output[_out++] = from_source[from++];
13390
- output[_out++] = from_source[from++];
13388
+ output[_out++] = from_source[from2++];
13389
+ output[_out++] = from_source[from2++];
13390
+ output[_out++] = from_source[from2++];
13391
13391
  len -= 3;
13392
13392
  }
13393
13393
  if (len) {
13394
- output[_out++] = from_source[from++];
13394
+ output[_out++] = from_source[from2++];
13395
13395
  if (len > 1) {
13396
- output[_out++] = from_source[from++];
13396
+ output[_out++] = from_source[from2++];
13397
13397
  }
13398
13398
  }
13399
13399
  } else {
13400
- from = _out - dist;
13400
+ from2 = _out - dist;
13401
13401
  do {
13402
- output[_out++] = output[from++];
13403
- output[_out++] = output[from++];
13404
- output[_out++] = output[from++];
13402
+ output[_out++] = output[from2++];
13403
+ output[_out++] = output[from2++];
13404
+ output[_out++] = output[from2++];
13405
13405
  len -= 3;
13406
13406
  } while (len > 2);
13407
13407
  if (len) {
13408
- output[_out++] = output[from++];
13408
+ output[_out++] = output[from2++];
13409
13409
  if (len > 1) {
13410
- output[_out++] = output[from++];
13410
+ output[_out++] = output[from2++];
13411
13411
  }
13412
13412
  }
13413
13413
  }
@@ -14029,7 +14029,7 @@ ${r2}}` : "}", l2;
14029
14029
  let bits;
14030
14030
  let _in, _out;
14031
14031
  let copy;
14032
- let from;
14032
+ let from2;
14033
14033
  let from_source;
14034
14034
  let here = 0;
14035
14035
  let here_bits, here_op, here_val;
@@ -14828,9 +14828,9 @@ ${r2}}` : "}", l2;
14828
14828
  }
14829
14829
  if (copy > state.wnext) {
14830
14830
  copy -= state.wnext;
14831
- from = state.wsize - copy;
14831
+ from2 = state.wsize - copy;
14832
14832
  } else {
14833
- from = state.wnext - copy;
14833
+ from2 = state.wnext - copy;
14834
14834
  }
14835
14835
  if (copy > state.length) {
14836
14836
  copy = state.length;
@@ -14838,7 +14838,7 @@ ${r2}}` : "}", l2;
14838
14838
  from_source = state.window;
14839
14839
  } else {
14840
14840
  from_source = output;
14841
- from = put - state.offset;
14841
+ from2 = put - state.offset;
14842
14842
  copy = state.length;
14843
14843
  }
14844
14844
  if (copy > left) {
@@ -14847,7 +14847,7 @@ ${r2}}` : "}", l2;
14847
14847
  left -= copy;
14848
14848
  state.length -= copy;
14849
14849
  do {
14850
- output[put++] = from_source[from++];
14850
+ output[put++] = from_source[from2++];
14851
14851
  } while (--copy);
14852
14852
  if (state.length === 0) {
14853
14853
  state.mode = LEN2;
@@ -18870,11 +18870,11 @@ ${r2}}` : "}", l2;
18870
18870
  for (var name in all3)
18871
18871
  __defProp3(target, name, { get: all3[name], enumerable: true });
18872
18872
  };
18873
- var __copyProps3 = (to, from, except, desc) => {
18874
- if (from && typeof from === "object" || typeof from === "function") {
18875
- for (let key of __getOwnPropNames3(from))
18873
+ var __copyProps3 = (to, from2, except, desc) => {
18874
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
18875
+ for (let key of __getOwnPropNames3(from2))
18876
18876
  if (!__hasOwnProp3.call(to, key) && key !== except)
18877
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
18877
+ __defProp3(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc3(from2, key)) || desc.enumerable });
18878
18878
  }
18879
18879
  return to;
18880
18880
  };
@@ -19676,11 +19676,11 @@ ${r2}}` : "}", l2;
19676
19676
  for (var name in all3)
19677
19677
  __defProp3(target, name, { get: all3[name], enumerable: true });
19678
19678
  };
19679
- var __copyProps3 = (to, from, except, desc) => {
19680
- if (from && typeof from === "object" || typeof from === "function") {
19681
- for (let key of __getOwnPropNames3(from))
19679
+ var __copyProps3 = (to, from2, except, desc) => {
19680
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
19681
+ for (let key of __getOwnPropNames3(from2))
19682
19682
  if (!__hasOwnProp3.call(to, key) && key !== except)
19683
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
19683
+ __defProp3(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc3(from2, key)) || desc.enumerable });
19684
19684
  }
19685
19685
  return to;
19686
19686
  };
@@ -31849,9 +31849,9 @@ ${r2}}` : "}", l2;
31849
31849
  function join(separator = "") {
31850
31850
  astr("join", separator);
31851
31851
  return {
31852
- encode: (from) => {
31853
- astrArr("join.decode", from);
31854
- return from.join(separator);
31852
+ encode: (from2) => {
31853
+ astrArr("join.decode", from2);
31854
+ return from2.join(separator);
31855
31855
  },
31856
31856
  decode: (to) => {
31857
31857
  astr("join.decode", to);
@@ -31886,35 +31886,35 @@ ${r2}}` : "}", l2;
31886
31886
  };
31887
31887
  }
31888
31888
  var gcd = (a, b) => b === 0 ? a : gcd(b, a % b);
31889
- var radix2carry = /* @__NO_SIDE_EFFECTS__ */ (from, to) => from + (to - gcd(from, to));
31889
+ var radix2carry = /* @__NO_SIDE_EFFECTS__ */ (from2, to) => from2 + (to - gcd(from2, to));
31890
31890
  var powers = /* @__PURE__ */ (() => {
31891
31891
  let res = [];
31892
31892
  for (let i = 0; i < 40; i++)
31893
31893
  res.push(2 ** i);
31894
31894
  return res;
31895
31895
  })();
31896
- function convertRadix2(data, from, to, padding2) {
31896
+ function convertRadix2(data, from2, to, padding2) {
31897
31897
  aArr(data);
31898
- if (from <= 0 || from > 32)
31899
- throw new Error(`convertRadix2: wrong from=${from}`);
31898
+ if (from2 <= 0 || from2 > 32)
31899
+ throw new Error(`convertRadix2: wrong from=${from2}`);
31900
31900
  if (to <= 0 || to > 32)
31901
31901
  throw new Error(`convertRadix2: wrong to=${to}`);
31902
- if (/* @__PURE__ */ radix2carry(from, to) > 32) {
31903
- throw new Error(`convertRadix2: carry overflow from=${from} to=${to} carryBits=${/* @__PURE__ */ radix2carry(from, to)}`);
31902
+ if (/* @__PURE__ */ radix2carry(from2, to) > 32) {
31903
+ throw new Error(`convertRadix2: carry overflow from=${from2} to=${to} carryBits=${/* @__PURE__ */ radix2carry(from2, to)}`);
31904
31904
  }
31905
31905
  let carry = 0;
31906
31906
  let pos = 0;
31907
- const max = powers[from];
31907
+ const max = powers[from2];
31908
31908
  const mask2 = powers[to] - 1;
31909
31909
  const res = [];
31910
31910
  for (const n of data) {
31911
31911
  anumber(n);
31912
31912
  if (n >= max)
31913
- throw new Error(`convertRadix2: invalid data word=${n} from=${from}`);
31914
- carry = carry << from | n;
31915
- if (pos + from > 32)
31916
- throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from}`);
31917
- pos += from;
31913
+ throw new Error(`convertRadix2: invalid data word=${n} from=${from2}`);
31914
+ carry = carry << from2 | n;
31915
+ if (pos + from2 > 32)
31916
+ throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from2}`);
31917
+ pos += from2;
31918
31918
  for (; pos >= to; pos -= to)
31919
31919
  res.push((carry >> pos - to & mask2) >>> 0);
31920
31920
  const pow3 = powers[pos];
@@ -31923,7 +31923,7 @@ ${r2}}` : "}", l2;
31923
31923
  carry &= pow3 - 1;
31924
31924
  }
31925
31925
  carry = carry << to - pos & mask2;
31926
- if (!padding2 && pos >= from)
31926
+ if (!padding2 && pos >= from2)
31927
31927
  throw new Error("Excess padding");
31928
31928
  if (!padding2 && carry > 0)
31929
31929
  throw new Error(`Non-zero padding: ${carry}`);
@@ -34625,7 +34625,7 @@ ${indent2}}` : "}";
34625
34625
  function normalizeS(s) {
34626
34626
  return isBiggerThanHalfOrder(s) ? modN(-s) : s;
34627
34627
  }
34628
- const slcNum = (b, from, to) => bytesToNumberBE(b.slice(from, to));
34628
+ const slcNum = (b, from2, to) => bytesToNumberBE(b.slice(from2, to));
34629
34629
  class Signature3 {
34630
34630
  constructor(r, s, recovery) {
34631
34631
  this.r = r;
@@ -37571,7 +37571,7 @@ ${indent2}}` : "}";
37571
37571
  let op;
37572
37572
  let len;
37573
37573
  let dist;
37574
- let from;
37574
+ let from2;
37575
37575
  let from_source;
37576
37576
  let input, output;
37577
37577
  const state = strm.state;
@@ -37664,72 +37664,72 @@ ${indent2}}` : "}";
37664
37664
  break top;
37665
37665
  }
37666
37666
  }
37667
- from = 0;
37667
+ from2 = 0;
37668
37668
  from_source = s_window;
37669
37669
  if (wnext === 0) {
37670
- from += wsize - op;
37670
+ from2 += wsize - op;
37671
37671
  if (op < len) {
37672
37672
  len -= op;
37673
37673
  do {
37674
- output[_out++] = s_window[from++];
37674
+ output[_out++] = s_window[from2++];
37675
37675
  } while (--op);
37676
- from = _out - dist;
37676
+ from2 = _out - dist;
37677
37677
  from_source = output;
37678
37678
  }
37679
37679
  } else if (wnext < op) {
37680
- from += wsize + wnext - op;
37680
+ from2 += wsize + wnext - op;
37681
37681
  op -= wnext;
37682
37682
  if (op < len) {
37683
37683
  len -= op;
37684
37684
  do {
37685
- output[_out++] = s_window[from++];
37685
+ output[_out++] = s_window[from2++];
37686
37686
  } while (--op);
37687
- from = 0;
37687
+ from2 = 0;
37688
37688
  if (wnext < len) {
37689
37689
  op = wnext;
37690
37690
  len -= op;
37691
37691
  do {
37692
- output[_out++] = s_window[from++];
37692
+ output[_out++] = s_window[from2++];
37693
37693
  } while (--op);
37694
- from = _out - dist;
37694
+ from2 = _out - dist;
37695
37695
  from_source = output;
37696
37696
  }
37697
37697
  }
37698
37698
  } else {
37699
- from += wnext - op;
37699
+ from2 += wnext - op;
37700
37700
  if (op < len) {
37701
37701
  len -= op;
37702
37702
  do {
37703
- output[_out++] = s_window[from++];
37703
+ output[_out++] = s_window[from2++];
37704
37704
  } while (--op);
37705
- from = _out - dist;
37705
+ from2 = _out - dist;
37706
37706
  from_source = output;
37707
37707
  }
37708
37708
  }
37709
37709
  while (len > 2) {
37710
- output[_out++] = from_source[from++];
37711
- output[_out++] = from_source[from++];
37712
- output[_out++] = from_source[from++];
37710
+ output[_out++] = from_source[from2++];
37711
+ output[_out++] = from_source[from2++];
37712
+ output[_out++] = from_source[from2++];
37713
37713
  len -= 3;
37714
37714
  }
37715
37715
  if (len) {
37716
- output[_out++] = from_source[from++];
37716
+ output[_out++] = from_source[from2++];
37717
37717
  if (len > 1) {
37718
- output[_out++] = from_source[from++];
37718
+ output[_out++] = from_source[from2++];
37719
37719
  }
37720
37720
  }
37721
37721
  } else {
37722
- from = _out - dist;
37722
+ from2 = _out - dist;
37723
37723
  do {
37724
- output[_out++] = output[from++];
37725
- output[_out++] = output[from++];
37726
- output[_out++] = output[from++];
37724
+ output[_out++] = output[from2++];
37725
+ output[_out++] = output[from2++];
37726
+ output[_out++] = output[from2++];
37727
37727
  len -= 3;
37728
37728
  } while (len > 2);
37729
37729
  if (len) {
37730
- output[_out++] = output[from++];
37730
+ output[_out++] = output[from2++];
37731
37731
  if (len > 1) {
37732
- output[_out++] = output[from++];
37732
+ output[_out++] = output[from2++];
37733
37733
  }
37734
37734
  }
37735
37735
  }
@@ -38333,7 +38333,7 @@ ${indent2}}` : "}";
38333
38333
  let bits;
38334
38334
  let _in, _out;
38335
38335
  let copy;
38336
- let from;
38336
+ let from2;
38337
38337
  let from_source;
38338
38338
  let here = 0;
38339
38339
  let here_bits, here_op, here_val;
@@ -39132,9 +39132,9 @@ ${indent2}}` : "}";
39132
39132
  }
39133
39133
  if (copy > state.wnext) {
39134
39134
  copy -= state.wnext;
39135
- from = state.wsize - copy;
39135
+ from2 = state.wsize - copy;
39136
39136
  } else {
39137
- from = state.wnext - copy;
39137
+ from2 = state.wnext - copy;
39138
39138
  }
39139
39139
  if (copy > state.length) {
39140
39140
  copy = state.length;
@@ -39142,7 +39142,7 @@ ${indent2}}` : "}";
39142
39142
  from_source = state.window;
39143
39143
  } else {
39144
39144
  from_source = output;
39145
- from = put - state.offset;
39145
+ from2 = put - state.offset;
39146
39146
  copy = state.length;
39147
39147
  }
39148
39148
  if (copy > left) {
@@ -39151,7 +39151,7 @@ ${indent2}}` : "}";
39151
39151
  left -= copy;
39152
39152
  state.length -= copy;
39153
39153
  do {
39154
- output[put++] = from_source[from++];
39154
+ output[put++] = from_source[from2++];
39155
39155
  } while (--copy);
39156
39156
  if (state.length === 0) {
39157
39157
  state.mode = LEN;
@@ -39600,11 +39600,11 @@ ${indent2}}` : "}";
39600
39600
  for (var name in all3)
39601
39601
  __defProp2(target, name, { get: all3[name], enumerable: true });
39602
39602
  };
39603
- var __copyProps2 = (to, from, except, desc) => {
39604
- if (from && typeof from === "object" || typeof from === "function") {
39605
- for (let key of __getOwnPropNames2(from))
39603
+ var __copyProps2 = (to, from2, except, desc) => {
39604
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
39605
+ for (let key of __getOwnPropNames2(from2))
39606
39606
  if (!__hasOwnProp2.call(to, key) && key !== except)
39607
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
39607
+ __defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
39608
39608
  }
39609
39609
  return to;
39610
39610
  };
@@ -49091,11 +49091,20 @@ ${JSON.stringify(data, null, 2)}`;
49091
49091
  coingeckId: void 0,
49092
49092
  priceCheckAmount: 0.1,
49093
49093
  displayDecimals: 6
49094
+ }, {
49095
+ name: "USDC.e",
49096
+ symbol: "USDC.e",
49097
+ logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
49098
+ address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
49099
+ decimals: 6,
49100
+ coingeckId: void 0,
49101
+ displayDecimals: 2,
49102
+ priceCheckAmount: 1e3
49094
49103
  }, {
49095
49104
  name: "USDC",
49096
49105
  symbol: "USDC",
49097
49106
  logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
49098
- address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
49107
+ address: ContractAddr.from("0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb"),
49099
49108
  decimals: 6,
49100
49109
  coingeckId: void 0,
49101
49110
  displayDecimals: 2,
@@ -49313,6 +49322,7 @@ ${JSON.stringify(data, null, 2)}`;
49313
49322
  /**
49314
49323
  * TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
49315
49324
  */
49325
+ // ! switch to USDC (new) later
49316
49326
  this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
49317
49327
  this.EKUBO_API = "https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
49318
49328
  this.refreshInterval = refreshInterval;
@@ -62038,8 +62048,8 @@ ${JSON.stringify(data, null, 2)}`;
62038
62048
  investmentSteps: []
62039
62049
  },
62040
62050
  {
62041
- name: "Vesu Fusion USDC",
62042
- description: _description.replace("{{TOKEN}}", "USDC"),
62051
+ name: "Vesu Fusion USDC.e",
62052
+ description: _description.replace("{{TOKEN}}", "USDC.e"),
62043
62053
  address: ContractAddr.from(
62044
62054
  "0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
62045
62055
  ),
@@ -62047,7 +62057,7 @@ ${JSON.stringify(data, null, 2)}`;
62047
62057
  type: "ERC4626",
62048
62058
  auditUrl: AUDIT_URL,
62049
62059
  depositTokens: [
62050
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")
62060
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
62051
62061
  ],
62052
62062
  protocols: [_protocol],
62053
62063
  maxTVL: Web3Number.fromWei("0", 6),
@@ -67167,14 +67177,14 @@ ${JSON.stringify(data, null, 2)}`;
67167
67177
  return { value: op[0] ? op[1] : void 0, done: true };
67168
67178
  }
67169
67179
  }
67170
- function __spreadArray(to, from, pack) {
67171
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
67172
- if (ar || !(i in from)) {
67173
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
67174
- ar[i] = from[i];
67180
+ function __spreadArray(to, from2, pack) {
67181
+ if (pack || arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++) {
67182
+ if (ar || !(i in from2)) {
67183
+ if (!ar) ar = Array.prototype.slice.call(from2, 0, i);
67184
+ ar[i] = from2[i];
67175
67185
  }
67176
67186
  }
67177
- return to.concat(ar || Array.prototype.slice.call(from));
67187
+ return to.concat(ar || Array.prototype.slice.call(from2));
67178
67188
  }
67179
67189
 
67180
67190
  // node_modules/.pnpm/ts-invariant@0.10.3/node_modules/ts-invariant/lib/invariant.js
@@ -72722,7 +72732,7 @@ spurious results.`);
72722
72732
  _proto3[SymbolObservable] = function() {
72723
72733
  return this;
72724
72734
  };
72725
- Observable2.from = function from(x) {
72735
+ Observable2.from = function from2(x) {
72726
72736
  var C = typeof this === "function" ? this : Observable2;
72727
72737
  if (x == null) throw new TypeError(x + " is not an object");
72728
72738
  var method = getMethod(x, SymbolObservable);
@@ -74288,7 +74298,7 @@ spurious results.`);
74288
74298
  };
74289
74299
  ApolloCache2.prototype.watchFragment = function(options) {
74290
74300
  var _this = this;
74291
- var fragment = options.fragment, fragmentName = options.fragmentName, from = options.from, _a21 = options.optimistic, optimistic = _a21 === void 0 ? true : _a21, otherOptions = __rest(options, ["fragment", "fragmentName", "from", "optimistic"]);
74301
+ var fragment = options.fragment, fragmentName = options.fragmentName, from2 = options.from, _a21 = options.optimistic, optimistic = _a21 === void 0 ? true : _a21, otherOptions = __rest(options, ["fragment", "fragmentName", "from", "optimistic"]);
74292
74302
  var query = this.getFragmentDoc(fragment, fragmentName);
74293
74303
  var diffOptions = __assign(__assign({}, otherOptions), { returnPartialData: true, id: (
74294
74304
  // While our TypeScript types do not allow for `undefined` as a valid
@@ -74297,7 +74307,7 @@ spurious results.`);
74297
74307
  // adding this fix here however to ensure those using plain JavaScript
74298
74308
  // and using `cache.identify` themselves will avoid seeing the obscure
74299
74309
  // warning.
74300
- typeof from === "undefined" || typeof from === "string" ? from : this.identify(from)
74310
+ typeof from2 === "undefined" || typeof from2 === "string" ? from2 : this.identify(from2)
74301
74311
  ), query, optimistic });
74302
74312
  var latestDiff;
74303
74313
  return new Observable(function(observer) {
@@ -74608,10 +74618,10 @@ spurious results.`);
74608
74618
  isReference,
74609
74619
  toReference: this.toReference,
74610
74620
  canRead: this.canRead,
74611
- readField: function(fieldNameOrOptions, from) {
74621
+ readField: function(fieldNameOrOptions, from2) {
74612
74622
  return _this.policies.readField(typeof fieldNameOrOptions === "string" ? {
74613
74623
  fieldName: fieldNameOrOptions,
74614
- from: from || makeReference(dataId)
74624
+ from: from2 || makeReference(dataId)
74615
74625
  } : fieldNameOrOptions, { store: _this });
74616
74626
  }
74617
74627
  };
@@ -75437,8 +75447,8 @@ spurious results.`);
75437
75447
  function keyFieldsFnFromSpecifier(specifier) {
75438
75448
  var info = lookupSpecifierInfo(specifier);
75439
75449
  return info.keyFieldsFn || (info.keyFieldsFn = function(object, context) {
75440
- var extract = function(from, key) {
75441
- return context.readField(key, from);
75450
+ var extract = function(from2, key) {
75451
+ return context.readField(key, from2);
75442
75452
  };
75443
75453
  var keyObject = context.keyObject = collectSpecifierPaths(specifier, function(schemaKeyPath) {
75444
75454
  var extracted = extractKeyPath(
@@ -75944,7 +75954,7 @@ spurious results.`);
75944
75954
  };
75945
75955
  }
75946
75956
  function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables) {
75947
- var fieldNameOrOptions = readFieldArgs[0], from = readFieldArgs[1], argc = readFieldArgs.length;
75957
+ var fieldNameOrOptions = readFieldArgs[0], from2 = readFieldArgs[1], argc = readFieldArgs.length;
75948
75958
  var options;
75949
75959
  if (typeof fieldNameOrOptions === "string") {
75950
75960
  options = {
@@ -75952,7 +75962,7 @@ spurious results.`);
75952
75962
  // Default to objectOrReference only when no second argument was
75953
75963
  // passed for the from parameter, not when undefined is explicitly
75954
75964
  // passed as the second argument.
75955
- from: argc > 1 ? from : objectOrReference
75965
+ from: argc > 1 ? from2 : objectOrReference
75956
75966
  };
75957
75967
  } else {
75958
75968
  options = __assign({}, fieldNameOrOptions);
@@ -76287,8 +76297,8 @@ spurious results.`);
76287
76297
  getStorageArgs = [isReference(e_1) ? e_1.__ref : e_1];
76288
76298
  }
76289
76299
  var changedFields_1;
76290
- var getValue_1 = function(from, name) {
76291
- return isArray2(from) ? typeof name === "number" ? from[name] : void 0 : context.store.getFieldValue(from, String(name));
76300
+ var getValue_1 = function(from2, name) {
76301
+ return isArray2(from2) ? typeof name === "number" ? from2[name] : void 0 : context.store.getFieldValue(from2, String(name));
76292
76302
  };
76293
76303
  mergeTree.map.forEach(function(childTree, storeFieldName) {
76294
76304
  var eVal = getValue_1(e_1, storeFieldName);
@@ -79762,7 +79772,7 @@ spurious results.`);
79762
79772
  * @returns {Promise<number>} The weighted average APY across all pools
79763
79773
  */
79764
79774
  async netAPY(blockIdentifier = "latest", sinceBlocks = 6e5, timeperiod = "24h") {
79765
- const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC";
79775
+ const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC.e";
79766
79776
  if (!isUSDCQouteToken) {
79767
79777
  return this.netSharesBasedTrueAPY(blockIdentifier, sinceBlocks);
79768
79778
  } else {
@@ -80178,6 +80188,12 @@ spurious results.`);
80178
80188
  amount1: availableAmount1.minus(y),
80179
80189
  ratio: 0
80180
80190
  };
80191
+ } else if (ratio.eq(Infinity)) {
80192
+ return {
80193
+ amount0: availableAmount0,
80194
+ amount1: Web3Number.fromWei("0", availableAmount1.decimals),
80195
+ ratio: Infinity
80196
+ };
80181
80197
  }
80182
80198
  return {
80183
80199
  amount0: availableAmount0.plus(x),
@@ -80285,6 +80301,7 @@ spurious results.`);
80285
80301
  // Helper to determine which token to sell, which to buy, and the amounts to use
80286
80302
  getSwapParams(expectedAmounts, poolKey, token0Bal, token1Bal) {
80287
80303
  const tokenToSell = expectedAmounts.amount0.lessThan(token0Bal) ? poolKey.token0 : poolKey.token1;
80304
+ logger2.verbose(`getSwapParams => tokenToSell: ${tokenToSell.address}, expectedAmounts: ${expectedAmounts.amount0.toString()}, bal0: ${token0Bal.toString()}`);
80288
80305
  const tokenToBuy = tokenToSell == poolKey.token0 ? poolKey.token1 : poolKey.token0;
80289
80306
  const amountToSell = tokenToSell == poolKey.token0 ? token0Bal.minus(expectedAmounts.amount0) : token1Bal.minus(expectedAmounts.amount1);
80290
80307
  if (amountToSell.eq(0)) {
@@ -80439,6 +80456,7 @@ spurious results.`);
80439
80456
  throw new Error(`Rebalance failed after ${MAX_SAME_ERROR_COUNT} same errors`);
80440
80457
  }
80441
80458
  const fromAmount = uint256_exports.uint256ToBN(swapInfo.token_from_amount);
80459
+ const fromTokenInfo = await Global.getTokenInfoFromAddr(ContractAddr.from(swapInfo.token_from_address));
80442
80460
  logger2.verbose(
80443
80461
  `Selling ${fromAmount.toString()} of token ${swapInfo.token_from_address}`
80444
80462
  );
@@ -80455,7 +80473,7 @@ spurious results.`);
80455
80473
  `Rebalance attempt ${retry + 1} failed, adjusting swap amount...`
80456
80474
  );
80457
80475
  const newSwapInfo = { ...swapInfo };
80458
- const currentAmount = Web3Number.fromWei(fromAmount.toString(), 18);
80476
+ const currentAmount = Web3Number.fromWei(fromAmount.toString(), fromTokenInfo.decimals);
80459
80477
  logger2.verbose(`Current amount: ${currentAmount.toString()}, lowerLimit: ${lowerLimit.toString()}, upperLimit: ${upperLimit.toString()}`);
80460
80478
  if (err2.message.includes("invalid token0 balance") || err2.message.includes("invalid token0 amount")) {
80461
80479
  if (!isSellTokenToken0) {
@@ -81137,7 +81155,7 @@ spurious results.`);
81137
81155
  ];
81138
81156
  var ETHUSDCRe7Strategy = {
81139
81157
  ...xSTRKSTRK,
81140
- name: "Ekubo ETH/USDC",
81158
+ name: "Ekubo ETH/USDC.e",
81141
81159
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
81142
81160
  address: ContractAddr.from(
81143
81161
  "0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
@@ -81146,7 +81164,7 @@ spurious results.`);
81146
81164
  // must be same order as poolKey token0 and token1
81147
81165
  depositTokens: [
81148
81166
  Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
81149
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")
81167
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
81150
81168
  ],
81151
81169
  apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
81152
81170
  additionalInfo: {
@@ -81158,7 +81176,7 @@ spurious results.`);
81158
81176
  minWaitHours: 6,
81159
81177
  direction: "any"
81160
81178
  },
81161
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
81179
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
81162
81180
  },
81163
81181
  faqs: [
81164
81182
  ...faqs2,
@@ -81183,7 +81201,7 @@ spurious results.`);
81183
81201
  ETHUSDCRe7Strategy,
81184
81202
  {
81185
81203
  ...ETHUSDCRe7Strategy,
81186
- name: "Ekubo USDC/USDT",
81204
+ name: "Ekubo USDC.e/USDT",
81187
81205
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
81188
81206
  address: ContractAddr.from(
81189
81207
  "0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
@@ -81191,7 +81209,7 @@ spurious results.`);
81191
81209
  launchBlock: 1506139,
81192
81210
  // must be same order as poolKey token0 and token1
81193
81211
  depositTokens: [
81194
- Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
81212
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
81195
81213
  Global.getDefaultTokens().find((t) => t.symbol === "USDT")
81196
81214
  ],
81197
81215
  risk: {
@@ -81202,7 +81220,7 @@ spurious results.`);
81202
81220
  },
81203
81221
  {
81204
81222
  ...ETHUSDCRe7Strategy,
81205
- name: "Ekubo STRK/USDC",
81223
+ name: "Ekubo STRK/USDC.e",
81206
81224
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
81207
81225
  address: ContractAddr.from(
81208
81226
  "0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
@@ -81211,7 +81229,7 @@ spurious results.`);
81211
81229
  // must be same order as poolKey token0 and token1
81212
81230
  depositTokens: [
81213
81231
  Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
81214
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")
81232
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
81215
81233
  ],
81216
81234
  risk: highRisk
81217
81235
  },
@@ -81232,7 +81250,7 @@ spurious results.`);
81232
81250
  },
81233
81251
  {
81234
81252
  ...ETHUSDCRe7Strategy,
81235
- name: "Ekubo WBTC/USDC",
81253
+ name: "Ekubo WBTC/USDC.e",
81236
81254
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
81237
81255
  address: ContractAddr.from(
81238
81256
  "0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
@@ -81241,13 +81259,13 @@ spurious results.`);
81241
81259
  // must be same order as poolKey token0 and token1
81242
81260
  depositTokens: [
81243
81261
  Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
81244
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")
81262
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
81245
81263
  ],
81246
81264
  risk: mediumRisk
81247
81265
  },
81248
81266
  {
81249
81267
  ...ETHUSDCRe7Strategy,
81250
- name: "Ekubo tBTC/USDC",
81268
+ name: "Ekubo tBTC/USDC.e",
81251
81269
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
81252
81270
  address: ContractAddr.from(
81253
81271
  "0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
@@ -81256,7 +81274,7 @@ spurious results.`);
81256
81274
  // must be same order as poolKey token0 and token1
81257
81275
  depositTokens: [
81258
81276
  Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
81259
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")
81277
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
81260
81278
  ],
81261
81279
  risk: mediumRisk
81262
81280
  },
@@ -94549,13 +94567,13 @@ spurious results.`);
94549
94567
  var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
94550
94568
  var UniversalStrategies = [
94551
94569
  {
94552
- name: "USDC Evergreen",
94553
- description: getDescription("USDC", ["vesu", "extended"]),
94570
+ name: "USDC.e Evergreen",
94571
+ description: getDescription("USDC.e", ["vesu", "extended"]),
94554
94572
  address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
94555
94573
  launchBlock: 0,
94556
94574
  type: "ERC4626",
94557
- depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
94558
- additionalInfo: getLooperSettings("USDC", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
94575
+ depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC.e")],
94576
+ additionalInfo: getLooperSettings("USDC.e", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
94559
94577
  risk: {
94560
94578
  riskFactor: _riskFactor3,
94561
94579
  netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),