@aboutcircles/sdk-transfers 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/dist/index.js +334 -334
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -7763,7 +7763,7 @@ Context: ${JSON.stringify(this.context, null, 2)}`;
7763
7763
  }
7764
7764
 
7765
7765
  // ../core/dist/index.js
7766
- class CJ {
7766
+ class mJ {
7767
7767
  static ONE_64 = 1n << 64n;
7768
7768
  static GAMMA_64 = 18443079296116538654n;
7769
7769
  static BETA_64 = 18450409579521241655n;
@@ -7863,173 +7863,173 @@ class CJ {
7863
7863
  return this.V1_ACCURACY * this.V1_INFLATION_PCT_NUM ** J / this.V1_INFLATION_PCT_DEN ** J;
7864
7864
  }
7865
7865
  static attoCrcToAttoCircles(J, Q) {
7866
- let Z = Q - this.INFLATION_DAY_ZERO_UNIX, Y = Z / this.PERIOD_SEC, $ = Z % this.PERIOD_SEC, W = this.v1InflateFactor(Y), q = this.v1InflateFactor(Y + 1n);
7867
- return this.v1ToDemurrage(J, W, q, $, this.PERIOD_SEC);
7866
+ let Z = Q - this.INFLATION_DAY_ZERO_UNIX, Y = Z / this.PERIOD_SEC, $ = Z % this.PERIOD_SEC, K = this.v1InflateFactor(Y), q = this.v1InflateFactor(Y + 1n);
7867
+ return this.v1ToDemurrage(J, K, q, $, this.PERIOD_SEC);
7868
7868
  }
7869
7869
  static attoCirclesToAttoCrc(J, Q) {
7870
- let Z = Q - this.INFLATION_DAY_ZERO_UNIX, Y = Z / this.PERIOD_SEC, $ = Z % this.PERIOD_SEC, W = this.v1InflateFactor(Y), q = this.v1InflateFactor(Y + 1n), K = W * (this.PERIOD_SEC - $) + q * $;
7871
- return J * 3n * this.V1_ACCURACY * this.PERIOD_SEC / K;
7870
+ let Z = Q - this.INFLATION_DAY_ZERO_UNIX, Y = Z / this.PERIOD_SEC, $ = Z % this.PERIOD_SEC, K = this.v1InflateFactor(Y), q = this.v1InflateFactor(Y + 1n), W = K * (this.PERIOD_SEC - $) + q * $;
7871
+ return J * 3n * this.V1_ACCURACY * this.PERIOD_SEC / W;
7872
7872
  }
7873
7873
  static v1ToDemurrage(J, Q, Z, Y, $) {
7874
- let W = Q * ($ - Y) + Z * Y;
7875
- return J * 3n * this.V1_ACCURACY * $ / W;
7874
+ let K = Q * ($ - Y) + Z * Y;
7875
+ return J * 3n * this.V1_ACCURACY * $ / K;
7876
7876
  }
7877
7877
  }
7878
- var qJ = [];
7878
+ var WJ = [];
7879
7879
  for (let J = 0;J < 256; J++)
7880
- qJ[J] = J.toString(16).padStart(2, "0");
7881
- function WJ(J) {
7880
+ WJ[J] = J.toString(16).padStart(2, "0");
7881
+ function jJ(J) {
7882
7882
  let Q = "0x";
7883
7883
  for (let Z = 0;Z < J.length; Z++)
7884
- Q += qJ[J[Z]];
7884
+ Q += WJ[J[Z]];
7885
7885
  return Q;
7886
7886
  }
7887
7887
  var y = BigInt(4294967295);
7888
- var t = BigInt(32);
7889
- function gJ(J, Q = false) {
7888
+ var JJ = BigInt(32);
7889
+ function bJ(J, Q = false) {
7890
7890
  if (Q)
7891
- return { h: Number(J & y), l: Number(J >> t & y) };
7892
- return { h: Number(J >> t & y) | 0, l: Number(J & y) | 0 };
7891
+ return { h: Number(J & y), l: Number(J >> JJ & y) };
7892
+ return { h: Number(J >> JJ & y) | 0, l: Number(J & y) | 0 };
7893
7893
  }
7894
- function hJ(J, Q = false) {
7894
+ function fJ(J, Q = false) {
7895
7895
  let Z = J.length, Y = new Uint32Array(Z), $ = new Uint32Array(Z);
7896
- for (let W = 0;W < Z; W++) {
7897
- let { h: q, l: K } = gJ(J[W], Q);
7898
- [Y[W], $[W]] = [q, K];
7896
+ for (let K = 0;K < Z; K++) {
7897
+ let { h: q, l: W } = bJ(J[K], Q);
7898
+ [Y[K], $[K]] = [q, W];
7899
7899
  }
7900
7900
  return [Y, $];
7901
7901
  }
7902
- var yJ = (J, Q, Z) => J << Z | Q >>> 32 - Z;
7903
- var bJ = (J, Q, Z) => Q << Z | J >>> 32 - Z;
7904
- var fJ = (J, Q, Z) => Q << Z - 32 | J >>> 64 - Z;
7905
- var mJ = (J, Q, Z) => J << Z - 32 | Q >>> 64 - Z;
7902
+ var lJ = (J, Q, Z) => J << Z | Q >>> 32 - Z;
7903
+ var pJ = (J, Q, Z) => Q << Z | J >>> 32 - Z;
7904
+ var uJ = (J, Q, Z) => Q << Z - 32 | J >>> 64 - Z;
7905
+ var dJ = (J, Q, Z) => J << Z - 32 | Q >>> 64 - Z;
7906
7906
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
7907
- function lJ(J) {
7907
+ function cJ(J) {
7908
7908
  return J instanceof Uint8Array || ArrayBuffer.isView(J) && J.constructor.name === "Uint8Array";
7909
7909
  }
7910
- function e(J) {
7910
+ function QJ(J) {
7911
7911
  if (!Number.isSafeInteger(J) || J < 0)
7912
7912
  throw Error("positive integer expected, got " + J);
7913
7913
  }
7914
- function f(J, ...Q) {
7915
- if (!lJ(J))
7914
+ function b(J, ...Q) {
7915
+ if (!cJ(J))
7916
7916
  throw Error("Uint8Array expected");
7917
7917
  if (Q.length > 0 && !Q.includes(J.length))
7918
7918
  throw Error("Uint8Array expected of length " + Q + ", got length=" + J.length);
7919
7919
  }
7920
- function JJ(J, Q = true) {
7920
+ function ZJ(J, Q = true) {
7921
7921
  if (J.destroyed)
7922
7922
  throw Error("Hash instance has been destroyed");
7923
7923
  if (Q && J.finished)
7924
7924
  throw Error("Hash#digest() has already been called");
7925
7925
  }
7926
- function pJ(J, Q) {
7927
- f(J);
7926
+ function iJ(J, Q) {
7927
+ b(J);
7928
7928
  let Z = Q.outputLen;
7929
7929
  if (J.length < Z)
7930
7930
  throw Error("digestInto() expects output buffer of length at least " + Z);
7931
7931
  }
7932
- function uJ(J) {
7932
+ function nJ(J) {
7933
7933
  return new Uint32Array(J.buffer, J.byteOffset, Math.floor(J.byteLength / 4));
7934
7934
  }
7935
- function KJ(...J) {
7935
+ function UJ(...J) {
7936
7936
  for (let Q = 0;Q < J.length; Q++)
7937
7937
  J[Q].fill(0);
7938
7938
  }
7939
- var dJ = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
7940
- function cJ(J) {
7939
+ var oJ = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
7940
+ function sJ(J) {
7941
7941
  return J << 24 & 4278190080 | J << 8 & 16711680 | J >>> 8 & 65280 | J >>> 24 & 255;
7942
7942
  }
7943
- function iJ(J) {
7943
+ function rJ(J) {
7944
7944
  for (let Q = 0;Q < J.length; Q++)
7945
- J[Q] = cJ(J[Q]);
7945
+ J[Q] = sJ(J[Q]);
7946
7946
  return J;
7947
7947
  }
7948
- var QJ = dJ ? (J) => J : iJ;
7949
- function nJ(J) {
7948
+ var YJ = oJ ? (J) => J : rJ;
7949
+ function aJ(J) {
7950
7950
  if (typeof J !== "string")
7951
7951
  throw Error("string expected");
7952
7952
  return new Uint8Array(new TextEncoder().encode(J));
7953
7953
  }
7954
- function jJ(J) {
7954
+ function GJ(J) {
7955
7955
  if (typeof J === "string")
7956
- J = nJ(J);
7957
- return f(J), J;
7956
+ J = aJ(J);
7957
+ return b(J), J;
7958
7958
  }
7959
7959
 
7960
- class GJ {
7960
+ class MJ {
7961
7961
  }
7962
- function oJ(J) {
7963
- let Q = (Y) => J().update(jJ(Y)).digest(), Z = J();
7962
+ function tJ(J) {
7963
+ let Q = (Y) => J().update(GJ(Y)).digest(), Z = J();
7964
7964
  return Q.outputLen = Z.outputLen, Q.blockLen = Z.blockLen, Q.create = () => J(), Q;
7965
7965
  }
7966
- var sJ = BigInt(0);
7966
+ var eJ = BigInt(0);
7967
7967
  var E = BigInt(1);
7968
- var rJ = BigInt(2);
7969
- var aJ = BigInt(7);
7970
- var tJ = BigInt(256);
7971
- var eJ = BigInt(113);
7972
- var UJ = [];
7973
- var MJ = [];
7968
+ var JQ = BigInt(2);
7969
+ var QQ = BigInt(7);
7970
+ var ZQ = BigInt(256);
7971
+ var YQ = BigInt(113);
7974
7972
  var FJ = [];
7973
+ var XJ = [];
7974
+ var VJ = [];
7975
7975
  for (let J = 0, Q = E, Z = 1, Y = 0;J < 24; J++) {
7976
- [Z, Y] = [Y, (2 * Z + 3 * Y) % 5], UJ.push(2 * (5 * Y + Z)), MJ.push((J + 1) * (J + 2) / 2 % 64);
7977
- let $ = sJ;
7978
- for (let W = 0;W < 7; W++)
7979
- if (Q = (Q << E ^ (Q >> aJ) * eJ) % tJ, Q & rJ)
7980
- $ ^= E << (E << BigInt(W)) - E;
7981
- FJ.push($);
7982
- }
7983
- var XJ = hJ(FJ, true);
7984
- var JQ = XJ[0];
7985
- var QQ = XJ[1];
7986
- var ZJ = (J, Q, Z) => Z > 32 ? fJ(J, Q, Z) : yJ(J, Q, Z);
7987
- var YJ = (J, Q, Z) => Z > 32 ? mJ(J, Q, Z) : bJ(J, Q, Z);
7988
- function ZQ(J, Q = 24) {
7976
+ [Z, Y] = [Y, (2 * Z + 3 * Y) % 5], FJ.push(2 * (5 * Y + Z)), XJ.push((J + 1) * (J + 2) / 2 % 64);
7977
+ let $ = eJ;
7978
+ for (let K = 0;K < 7; K++)
7979
+ if (Q = (Q << E ^ (Q >> QQ) * YQ) % ZQ, Q & JQ)
7980
+ $ ^= E << (E << BigInt(K)) - E;
7981
+ VJ.push($);
7982
+ }
7983
+ var zJ = fJ(VJ, true);
7984
+ var $Q = zJ[0];
7985
+ var qQ = zJ[1];
7986
+ var $J = (J, Q, Z) => Z > 32 ? uJ(J, Q, Z) : lJ(J, Q, Z);
7987
+ var qJ = (J, Q, Z) => Z > 32 ? dJ(J, Q, Z) : pJ(J, Q, Z);
7988
+ function KQ(J, Q = 24) {
7989
7989
  let Z = new Uint32Array(10);
7990
7990
  for (let Y = 24 - Q;Y < 24; Y++) {
7991
7991
  for (let q = 0;q < 10; q++)
7992
7992
  Z[q] = J[q] ^ J[q + 10] ^ J[q + 20] ^ J[q + 30] ^ J[q + 40];
7993
7993
  for (let q = 0;q < 10; q += 2) {
7994
- let K = (q + 8) % 10, G = (q + 2) % 10, j = Z[G], M = Z[G + 1], z = ZJ(j, M, 1) ^ Z[K], B = YJ(j, M, 1) ^ Z[K + 1];
7994
+ let W = (q + 8) % 10, U = (q + 2) % 10, j = Z[U], M = Z[U + 1], N = $J(j, M, 1) ^ Z[W], B = qJ(j, M, 1) ^ Z[W + 1];
7995
7995
  for (let X = 0;X < 50; X += 10)
7996
- J[q + X] ^= z, J[q + X + 1] ^= B;
7996
+ J[q + X] ^= N, J[q + X + 1] ^= B;
7997
7997
  }
7998
- let $ = J[2], W = J[3];
7998
+ let $ = J[2], K = J[3];
7999
7999
  for (let q = 0;q < 24; q++) {
8000
- let K = MJ[q], G = ZJ($, W, K), j = YJ($, W, K), M = UJ[q];
8001
- $ = J[M], W = J[M + 1], J[M] = G, J[M + 1] = j;
8000
+ let W = XJ[q], U = $J($, K, W), j = qJ($, K, W), M = FJ[q];
8001
+ $ = J[M], K = J[M + 1], J[M] = U, J[M + 1] = j;
8002
8002
  }
8003
8003
  for (let q = 0;q < 50; q += 10) {
8004
- for (let K = 0;K < 10; K++)
8005
- Z[K] = J[q + K];
8006
- for (let K = 0;K < 10; K++)
8007
- J[q + K] ^= ~Z[(K + 2) % 10] & Z[(K + 4) % 10];
8004
+ for (let W = 0;W < 10; W++)
8005
+ Z[W] = J[q + W];
8006
+ for (let W = 0;W < 10; W++)
8007
+ J[q + W] ^= ~Z[(W + 2) % 10] & Z[(W + 4) % 10];
8008
8008
  }
8009
- J[0] ^= JQ[Y], J[1] ^= QQ[Y];
8009
+ J[0] ^= $Q[Y], J[1] ^= qQ[Y];
8010
8010
  }
8011
- KJ(Z);
8011
+ UJ(Z);
8012
8012
  }
8013
8013
 
8014
- class o extends GJ {
8014
+ class r extends MJ {
8015
8015
  constructor(J, Q, Z, Y = false, $ = 24) {
8016
8016
  super();
8017
- if (this.pos = 0, this.posOut = 0, this.finished = false, this.destroyed = false, this.enableXOF = false, this.blockLen = J, this.suffix = Q, this.outputLen = Z, this.enableXOF = Y, this.rounds = $, e(Z), !(0 < J && J < 200))
8017
+ if (this.pos = 0, this.posOut = 0, this.finished = false, this.destroyed = false, this.enableXOF = false, this.blockLen = J, this.suffix = Q, this.outputLen = Z, this.enableXOF = Y, this.rounds = $, QJ(Z), !(0 < J && J < 200))
8018
8018
  throw Error("only keccak-f1600 function is supported");
8019
- this.state = new Uint8Array(200), this.state32 = uJ(this.state);
8019
+ this.state = new Uint8Array(200), this.state32 = nJ(this.state);
8020
8020
  }
8021
8021
  clone() {
8022
8022
  return this._cloneInto();
8023
8023
  }
8024
8024
  keccak() {
8025
- QJ(this.state32), ZQ(this.state32, this.rounds), QJ(this.state32), this.posOut = 0, this.pos = 0;
8025
+ YJ(this.state32), KQ(this.state32, this.rounds), YJ(this.state32), this.posOut = 0, this.pos = 0;
8026
8026
  }
8027
8027
  update(J) {
8028
- JJ(this), J = jJ(J), f(J);
8028
+ ZJ(this), J = GJ(J), b(J);
8029
8029
  let { blockLen: Q, state: Z } = this, Y = J.length;
8030
8030
  for (let $ = 0;$ < Y; ) {
8031
- let W = Math.min(Q - this.pos, Y - $);
8032
- for (let q = 0;q < W; q++)
8031
+ let K = Math.min(Q - this.pos, Y - $);
8032
+ for (let q = 0;q < K; q++)
8033
8033
  Z[this.pos++] ^= J[$++];
8034
8034
  if (this.pos === Q)
8035
8035
  this.keccak();
@@ -8046,13 +8046,13 @@ class o extends GJ {
8046
8046
  J[Y - 1] ^= 128, this.keccak();
8047
8047
  }
8048
8048
  writeInto(J) {
8049
- JJ(this, false), f(J), this.finish();
8049
+ ZJ(this, false), b(J), this.finish();
8050
8050
  let Q = this.state, { blockLen: Z } = this;
8051
8051
  for (let Y = 0, $ = J.length;Y < $; ) {
8052
8052
  if (this.posOut >= Z)
8053
8053
  this.keccak();
8054
- let W = Math.min(Z - this.posOut, $ - Y);
8055
- J.set(Q.subarray(this.posOut, this.posOut + W), Y), this.posOut += W, Y += W;
8054
+ let K = Math.min(Z - this.posOut, $ - Y);
8055
+ J.set(Q.subarray(this.posOut, this.posOut + K), Y), this.posOut += K, Y += K;
8056
8056
  }
8057
8057
  return J;
8058
8058
  }
@@ -8062,10 +8062,10 @@ class o extends GJ {
8062
8062
  return this.writeInto(J);
8063
8063
  }
8064
8064
  xof(J) {
8065
- return e(J), this.xofInto(new Uint8Array(J));
8065
+ return QJ(J), this.xofInto(new Uint8Array(J));
8066
8066
  }
8067
8067
  digestInto(J) {
8068
- if (pJ(J, this), this.finished)
8068
+ if (iJ(J, this), this.finished)
8069
8069
  throw Error("digest() was already called");
8070
8070
  return this.writeInto(J), this.destroy(), J;
8071
8071
  }
@@ -8073,42 +8073,42 @@ class o extends GJ {
8073
8073
  return this.digestInto(new Uint8Array(this.outputLen));
8074
8074
  }
8075
8075
  destroy() {
8076
- this.destroyed = true, KJ(this.state);
8076
+ this.destroyed = true, UJ(this.state);
8077
8077
  }
8078
8078
  _cloneInto(J) {
8079
- let { blockLen: Q, suffix: Z, outputLen: Y, rounds: $, enableXOF: W } = this;
8080
- return J || (J = new o(Q, Z, Y, W, $)), J.state32.set(this.state32), J.pos = this.pos, J.posOut = this.posOut, J.finished = this.finished, J.rounds = $, J.suffix = Z, J.outputLen = Y, J.enableXOF = W, J.destroyed = this.destroyed, J;
8079
+ let { blockLen: Q, suffix: Z, outputLen: Y, rounds: $, enableXOF: K } = this;
8080
+ return J || (J = new r(Q, Z, Y, K, $)), J.state32.set(this.state32), J.pos = this.pos, J.posOut = this.posOut, J.finished = this.finished, J.rounds = $, J.suffix = Z, J.outputLen = Y, J.enableXOF = K, J.destroyed = this.destroyed, J;
8081
8081
  }
8082
8082
  }
8083
- var YQ = (J, Q, Z) => oJ(() => new o(Q, J, Z));
8084
- var VJ = (() => YQ(1, 136, 32))();
8083
+ var WQ = (J, Q, Z) => tJ(() => new r(Q, J, Z));
8084
+ var NJ = (() => WQ(1, 136, 32))();
8085
8085
  var F = 64;
8086
- var s = 32;
8087
- var b = (J) => J.startsWith("0x") ? J.slice(2) : J;
8088
- var S = (J) => J.toString(16).padStart(F, "0");
8089
- function $Q(J) {
8090
- let Q = J.toLowerCase().replace("0x", ""), Z = WJ(VJ(new TextEncoder().encode(Q))).slice(2), Y = "0x";
8086
+ var a = 32;
8087
+ var m = (J) => J.startsWith("0x") ? J.slice(2) : J;
8088
+ var _ = (J) => J.toString(16).padStart(F, "0");
8089
+ function jQ(J) {
8090
+ let Q = J.toLowerCase().replace("0x", ""), Z = jJ(NJ(new TextEncoder().encode(Q))).slice(2), Y = "0x";
8091
8091
  for (let $ = 0;$ < Q.length; $++)
8092
8092
  Y += parseInt(Z[$], 16) >= 8 ? Q[$].toUpperCase() : Q[$];
8093
8093
  return Y;
8094
8094
  }
8095
- function n(J, Q) {
8095
+ function s(J, Q) {
8096
8096
  if (J === "tuple" && Q)
8097
- return `(${Q.map(($) => n($.type, $.components)).join(",")})`;
8097
+ return `(${Q.map(($) => s($.type, $.components)).join(",")})`;
8098
8098
  let Z = J.match(/^tuple(\[\d*\])$/);
8099
8099
  if (Z && Q)
8100
- return `${n("tuple", Q)}${Z[1]}`;
8100
+ return `${s("tuple", Q)}${Z[1]}`;
8101
8101
  return J;
8102
8102
  }
8103
- function qQ(J) {
8104
- let Z = (J.inputs || []).map((Y) => n(Y.type, Y.components));
8103
+ function UQ(J) {
8104
+ let Z = (J.inputs || []).map((Y) => s(Y.type, Y.components));
8105
8105
  return `${J.name}(${Z.join(",")})`;
8106
8106
  }
8107
- function WQ(J) {
8108
- let Q = qQ(J), Z = VJ(new TextEncoder().encode(Q));
8109
- return WJ(Z.slice(0, 4));
8107
+ function GQ(J) {
8108
+ let Q = UQ(J), Z = NJ(new TextEncoder().encode(Q));
8109
+ return jJ(Z.slice(0, 4));
8110
8110
  }
8111
- function v(J, Q) {
8111
+ function C(J, Q) {
8112
8112
  if (J === "string" || J === "bytes")
8113
8113
  return true;
8114
8114
  if (J.includes("[")) {
@@ -8116,63 +8116,63 @@ function v(J, Q) {
8116
8116
  if (J.endsWith("[]"))
8117
8117
  return true;
8118
8118
  if (Z === "tuple")
8119
- return $J(Q);
8120
- return v(Z);
8119
+ return KJ(Q);
8120
+ return C(Z);
8121
8121
  }
8122
8122
  if (J === "tuple")
8123
- return $J(Q);
8123
+ return KJ(Q);
8124
8124
  return false;
8125
8125
  }
8126
- function $J(J) {
8127
- return J?.some((Q) => v(Q.type, Q.components)) ?? false;
8126
+ function KJ(J) {
8127
+ return J?.some((Q) => C(Q.type, Q.components)) ?? false;
8128
8128
  }
8129
8129
  function A(J, Q, Z) {
8130
8130
  if (J === "tuple" && Z)
8131
- return jQ(Z, Q);
8131
+ return FQ(Z, Q);
8132
8132
  if (J.includes("["))
8133
- return KQ(J, Q, Z);
8134
- return GQ(J, Q);
8135
- }
8136
- function KQ(J, Q, Z) {
8137
- let Y = J.slice(0, J.indexOf("[")), $ = J.endsWith("[]"), W = v(Y, Z), q;
8138
- if (W) {
8139
- let K = Q.map((M) => A(Y, M, Z)), G = Q.length * s;
8140
- q = K.map((M) => {
8141
- let z = G;
8142
- return G += M.length / 2, S(z);
8143
- }).join("") + K.join("");
8133
+ return MQ(J, Q, Z);
8134
+ return XQ(J, Q);
8135
+ }
8136
+ function MQ(J, Q, Z) {
8137
+ let Y = J.slice(0, J.indexOf("[")), $ = J.endsWith("[]"), K = C(Y, Z), q;
8138
+ if (K) {
8139
+ let W = Q.map((M) => A(Y, M, Z)), U = Q.length * a;
8140
+ q = W.map((M) => {
8141
+ let N = U;
8142
+ return U += M.length / 2, _(N);
8143
+ }).join("") + W.join("");
8144
8144
  } else
8145
- q = Q.map((K) => A(Y, K, Z)).join("");
8146
- return $ ? S(Q.length) + q : q;
8145
+ q = Q.map((W) => A(Y, W, Z)).join("");
8146
+ return $ ? _(Q.length) + q : q;
8147
8147
  }
8148
- function jQ(J, Q) {
8149
- let Z = Array.isArray(Q), Y = [], $ = [], W = [];
8148
+ function FQ(J, Q) {
8149
+ let Z = Array.isArray(Q), Y = [], $ = [], K = [];
8150
8150
  for (let q = 0;q < J.length; q++) {
8151
- let K = J[q], G = Z ? Q[q] : Q[K.name || ""], j = v(K.type, K.components);
8152
- if (W.push(j), j)
8153
- Y.push(""), $.push(A(K.type, G, K.components));
8151
+ let W = J[q], U = Z ? Q[q] : Q[W.name || ""], j = C(W.type, W.components);
8152
+ if (K.push(j), j)
8153
+ Y.push(""), $.push(A(W.type, U, W.components));
8154
8154
  else
8155
- Y.push(A(K.type, G, K.components));
8155
+ Y.push(A(W.type, U, W.components));
8156
8156
  }
8157
8157
  if ($.length > 0) {
8158
- let q = Y.reduce((j, M, z) => j + (W[z] ? s : M.length / 2), 0), K = "", G = 0;
8158
+ let q = Y.reduce((j, M, N) => j + (K[N] ? a : M.length / 2), 0), W = "", U = 0;
8159
8159
  for (let j = 0;j < J.length; j++)
8160
- if (W[j])
8161
- K += S(q), q += $[G].length / 2, G++;
8160
+ if (K[j])
8161
+ W += _(q), q += $[U].length / 2, U++;
8162
8162
  else
8163
- K += Y[j];
8164
- return K + $.join("");
8163
+ W += Y[j];
8164
+ return W + $.join("");
8165
8165
  }
8166
8166
  return Y.join("");
8167
8167
  }
8168
- function GQ(J, Q) {
8168
+ function XQ(J, Q) {
8169
8169
  if (J === "address")
8170
- return b(Q).toLowerCase().padStart(F, "0");
8170
+ return m(Q).toLowerCase().padStart(F, "0");
8171
8171
  if (J === "bool")
8172
- return S(Q ? 1 : 0);
8172
+ return _(Q ? 1 : 0);
8173
8173
  if (J.startsWith("uint")) {
8174
8174
  let Z = typeof Q === "bigint" ? Q : BigInt(Q);
8175
- return S(Z);
8175
+ return _(Z);
8176
8176
  }
8177
8177
  if (J.startsWith("int")) {
8178
8178
  let Z = typeof Q === "bigint" ? Q : BigInt(Q);
@@ -8180,32 +8180,32 @@ function GQ(J, Q) {
8180
8180
  let Y = J === "int" ? 256 : parseInt(J.slice(3));
8181
8181
  Z = (1n << BigInt(Y)) + Z;
8182
8182
  }
8183
- return S(Z);
8183
+ return _(Z);
8184
8184
  }
8185
8185
  if (J.startsWith("bytes") && J !== "bytes")
8186
- return b(Q).padEnd(F, "0");
8186
+ return m(Q).padEnd(F, "0");
8187
8187
  if (J === "bytes") {
8188
- let Z = b(Q), Y = S(Z.length / 2), $ = Z.padEnd(Math.ceil(Z.length / F) * F, "0");
8188
+ let Z = m(Q), Y = _(Z.length / 2), $ = Z.padEnd(Math.ceil(Z.length / F) * F, "0");
8189
8189
  return Y + $;
8190
8190
  }
8191
8191
  if (J === "string") {
8192
- let Z = Array.from(new TextEncoder().encode(Q)).map((W) => W.toString(16).padStart(2, "0")).join(""), Y = S(Z.length / 2), $ = Z.padEnd(Math.ceil(Z.length / F) * F, "0");
8192
+ let Z = Array.from(new TextEncoder().encode(Q)).map((K) => K.toString(16).padStart(2, "0")).join(""), Y = _(Z.length / 2), $ = Z.padEnd(Math.ceil(Z.length / F) * F, "0");
8193
8193
  return Y + $;
8194
8194
  }
8195
8195
  throw Error(`Unsupported type: ${J}`);
8196
8196
  }
8197
8197
  function x(J, Q, Z = 0, Y) {
8198
8198
  if (J === "tuple" && Y)
8199
- return MQ(Y, Q, Z);
8199
+ return zQ(Y, Q, Z);
8200
8200
  if (J.includes("["))
8201
- return UQ(J, Q, Z, Y);
8202
- return FQ(J, Q, Z);
8201
+ return VQ(J, Q, Z, Y);
8202
+ return NQ(J, Q, Z);
8203
8203
  }
8204
- function UQ(J, Q, Z, Y) {
8205
- let $ = J.slice(0, J.indexOf("[")), W = Q.slice(Z, Z + F);
8204
+ function VQ(J, Q, Z, Y) {
8205
+ let $ = J.slice(0, J.indexOf("[")), K = Q.slice(Z, Z + F);
8206
8206
  if (J.endsWith("[]")) {
8207
- let K = parseInt(W, 16) * 2, G = parseInt(Q.slice(K, K + F), 16), j = [], M = K + F;
8208
- for (let z = 0;z < G; z++) {
8207
+ let W = parseInt(K, 16) * 2, U = parseInt(Q.slice(W, W + F), 16), j = [], M = W + F;
8208
+ for (let N = 0;N < U; N++) {
8209
8209
  let B = x($, Q, M, Y);
8210
8210
  j.push(B.value), M += B.consumed;
8211
8211
  }
@@ -8213,95 +8213,95 @@ function UQ(J, Q, Z, Y) {
8213
8213
  }
8214
8214
  let q = J.match(/\[(\d+)\]$/);
8215
8215
  if (q) {
8216
- let K = parseInt(q[1]), G = [], j = 0;
8217
- for (let M = 0;M < K; M++) {
8218
- let z = x($, Q, Z + j, Y);
8219
- G.push(z.value), j += z.consumed;
8216
+ let W = parseInt(q[1]), U = [], j = 0;
8217
+ for (let M = 0;M < W; M++) {
8218
+ let N = x($, Q, Z + j, Y);
8219
+ U.push(N.value), j += N.consumed;
8220
8220
  }
8221
- return { value: G, consumed: j };
8221
+ return { value: U, consumed: j };
8222
8222
  }
8223
8223
  throw Error(`Invalid array type: ${J}`);
8224
8224
  }
8225
- function MQ(J, Q, Z) {
8225
+ function zQ(J, Q, Z) {
8226
8226
  let Y = [], $ = Z;
8227
- for (let W of J) {
8228
- let q = x(W.type, Q, $, W.components);
8227
+ for (let K of J) {
8228
+ let q = x(K.type, Q, $, K.components);
8229
8229
  Y.push(q.value), $ += q.consumed;
8230
8230
  }
8231
8231
  return { value: Y, consumed: $ - Z };
8232
8232
  }
8233
- function FQ(J, Q, Z) {
8233
+ function NQ(J, Q, Z) {
8234
8234
  let Y = Q.slice(Z, Z + F);
8235
8235
  if (J === "address")
8236
- return { value: $Q("0x" + Y.slice(24)), consumed: F };
8236
+ return { value: jQ("0x" + Y.slice(24)), consumed: F };
8237
8237
  if (J === "bool")
8238
8238
  return { value: parseInt(Y, 16) !== 0, consumed: F };
8239
8239
  if (J.startsWith("uint"))
8240
8240
  return { value: BigInt("0x" + Y), consumed: F };
8241
8241
  if (J.startsWith("int")) {
8242
- let $ = BigInt("0x" + Y), W = J === "int" ? 256 : parseInt(J.slice(3)), q = 1n << BigInt(W - 1);
8243
- return { value: $ >= q ? $ - (1n << BigInt(W)) : $, consumed: F };
8242
+ let $ = BigInt("0x" + Y), K = J === "int" ? 256 : parseInt(J.slice(3)), q = 1n << BigInt(K - 1);
8243
+ return { value: $ >= q ? $ - (1n << BigInt(K)) : $, consumed: F };
8244
8244
  }
8245
8245
  if (J.startsWith("bytes") && J !== "bytes") {
8246
8246
  let $ = parseInt(J.match(/^bytes(\d+)$/)[1]);
8247
8247
  return { value: "0x" + Y.slice(0, $ * 2), consumed: F };
8248
8248
  }
8249
8249
  if (J === "bytes") {
8250
- let $ = parseInt(Y, 16) * 2, W = parseInt(Q.slice($, $ + F), 16) * 2;
8251
- return { value: "0x" + Q.slice($ + F, $ + F + W), consumed: F };
8250
+ let $ = parseInt(Y, 16) * 2, K = parseInt(Q.slice($, $ + F), 16) * 2;
8251
+ return { value: "0x" + Q.slice($ + F, $ + F + K), consumed: F };
8252
8252
  }
8253
8253
  if (J === "string") {
8254
- let $ = parseInt(Y, 16) * 2, W = parseInt(Q.slice($, $ + F), 16) * 2, q = Q.slice($ + F, $ + F + W), K = new Uint8Array(q.match(/.{2}/g)?.map((G) => parseInt(G, 16)) || []);
8255
- return { value: new TextDecoder().decode(K), consumed: F };
8254
+ let $ = parseInt(Y, 16) * 2, K = parseInt(Q.slice($, $ + F), 16) * 2, q = Q.slice($ + F, $ + F + K), W = new Uint8Array(q.match(/.{2}/g)?.map((U) => parseInt(U, 16)) || []);
8255
+ return { value: new TextDecoder().decode(W), consumed: F };
8256
8256
  }
8257
8257
  throw Error(`Unsupported type: ${J}`);
8258
8258
  }
8259
- function r(J) {
8259
+ function t(J) {
8260
8260
  let { abi: Q, functionName: Z, args: Y = [] } = J, $ = Q.find((X) => X.type === "function" && X.name === Z);
8261
8261
  if (!$)
8262
8262
  throw Error(`Function "${Z}" not found in ABI`);
8263
- let W = WQ($), q = $.inputs || [];
8263
+ let K = GQ($), q = $.inputs || [];
8264
8264
  if (q.length === 0)
8265
- return W;
8265
+ return K;
8266
8266
  if (Y.length !== q.length)
8267
8267
  throw Error(`Expected ${q.length} arguments, got ${Y.length}`);
8268
- let K = [], G = [], j = [];
8268
+ let W = [], U = [], j = [];
8269
8269
  for (let X = 0;X < q.length; X++) {
8270
- let U = q[X], V = U.components, k = v(U.type, V);
8271
- if (j.push(k), k)
8272
- K.push(""), G.push(A(U.type, Y[X], V));
8270
+ let G = q[X], V = G.components, P = C(G.type, V);
8271
+ if (j.push(P), P)
8272
+ W.push(""), U.push(A(G.type, Y[X], V));
8273
8273
  else
8274
- K.push(A(U.type, Y[X], V));
8274
+ W.push(A(G.type, Y[X], V));
8275
8275
  }
8276
- if (G.length === 0)
8277
- return W + K.join("");
8278
- let M = K.reduce((X, U, V) => X + (j[V] ? s : U.length / 2), 0), z = "", B = 0;
8276
+ if (U.length === 0)
8277
+ return K + W.join("");
8278
+ let M = W.reduce((X, G, V) => X + (j[V] ? a : G.length / 2), 0), N = "", B = 0;
8279
8279
  for (let X = 0;X < q.length; X++)
8280
8280
  if (j[X])
8281
- z += S(M), M += G[B].length / 2, B++;
8281
+ N += _(M), M += U[B].length / 2, B++;
8282
8282
  else
8283
- z += K[X];
8284
- return W + z + G.join("");
8283
+ N += W[X];
8284
+ return K + N + U.join("");
8285
8285
  }
8286
- function zJ(J) {
8286
+ function LJ(J) {
8287
8287
  let { abi: Q, functionName: Z, data: Y } = J, $ = Q.find((j) => j.type === "function" && j.name === Z);
8288
8288
  if (!$)
8289
8289
  throw Error(`Function "${Z}" not found in ABI`);
8290
- let W = $.outputs || [];
8291
- if (W.length === 0)
8290
+ let K = $.outputs || [];
8291
+ if (K.length === 0)
8292
8292
  return;
8293
- let q = b(Y);
8294
- if (W.length === 1)
8295
- return x(W[0].type, q, 0, W[0].components).value;
8296
- let K = [], G = 0;
8297
- for (let j of W) {
8298
- let M = x(j.type, q, G, j.components);
8299
- K.push(M.value), G += M.consumed;
8293
+ let q = m(Y);
8294
+ if (K.length === 1)
8295
+ return x(K[0].type, q, 0, K[0].components).value;
8296
+ let W = [], U = 0;
8297
+ for (let j of K) {
8298
+ let M = x(j.type, q, U, j.components);
8299
+ W.push(M.value), U += M.consumed;
8300
8300
  }
8301
- return K;
8301
+ return W;
8302
8302
  }
8303
- var HQ = new Uint8Array(0);
8304
- function XQ(J) {
8303
+ var DQ = new Uint8Array(0);
8304
+ function LQ(J) {
8305
8305
  if (J instanceof Uint8Array && J.constructor.name === "Uint8Array")
8306
8306
  return J;
8307
8307
  if (J instanceof ArrayBuffer)
@@ -8310,96 +8310,96 @@ function XQ(J) {
8310
8310
  return new Uint8Array(J.buffer, J.byteOffset, J.byteLength);
8311
8311
  throw Error("Unknown type, must be binary type");
8312
8312
  }
8313
- function VQ(J, Q) {
8313
+ function OQ(J, Q) {
8314
8314
  if (J.length >= 255)
8315
8315
  throw TypeError("Alphabet too long");
8316
8316
  var Z = new Uint8Array(256);
8317
8317
  for (var Y = 0;Y < Z.length; Y++)
8318
8318
  Z[Y] = 255;
8319
8319
  for (var $ = 0;$ < J.length; $++) {
8320
- var W = J.charAt($), q = W.charCodeAt(0);
8320
+ var K = J.charAt($), q = K.charCodeAt(0);
8321
8321
  if (Z[q] !== 255)
8322
- throw TypeError(W + " is ambiguous");
8322
+ throw TypeError(K + " is ambiguous");
8323
8323
  Z[q] = $;
8324
8324
  }
8325
- var K = J.length, G = J.charAt(0), j = Math.log(K) / Math.log(256), M = Math.log(256) / Math.log(K);
8326
- function z(U) {
8327
- if (U instanceof Uint8Array)
8325
+ var W = J.length, U = J.charAt(0), j = Math.log(W) / Math.log(256), M = Math.log(256) / Math.log(W);
8326
+ function N(G) {
8327
+ if (G instanceof Uint8Array)
8328
8328
  ;
8329
- else if (ArrayBuffer.isView(U))
8330
- U = new Uint8Array(U.buffer, U.byteOffset, U.byteLength);
8331
- else if (Array.isArray(U))
8332
- U = Uint8Array.from(U);
8333
- if (!(U instanceof Uint8Array))
8329
+ else if (ArrayBuffer.isView(G))
8330
+ G = new Uint8Array(G.buffer, G.byteOffset, G.byteLength);
8331
+ else if (Array.isArray(G))
8332
+ G = Uint8Array.from(G);
8333
+ if (!(G instanceof Uint8Array))
8334
8334
  throw TypeError("Expected Uint8Array");
8335
- if (U.length === 0)
8335
+ if (G.length === 0)
8336
8336
  return "";
8337
- var V = 0, k = 0, O = 0, P = U.length;
8338
- while (O !== P && U[O] === 0)
8337
+ var V = 0, P = 0, O = 0, k = G.length;
8338
+ while (O !== k && G[O] === 0)
8339
8339
  O++, V++;
8340
- var w = (P - O) * M + 1 >>> 0, L = new Uint8Array(w);
8341
- while (O !== P) {
8342
- var T = U[O], I = 0;
8343
- for (var R = w - 1;(T !== 0 || I < k) && R !== -1; R--, I++)
8344
- T += 256 * L[R] >>> 0, L[R] = T % K >>> 0, T = T / K >>> 0;
8345
- if (T !== 0)
8340
+ var w = (k - O) * M + 1 >>> 0, L = new Uint8Array(w);
8341
+ while (O !== k) {
8342
+ var H = G[O], S = 0;
8343
+ for (var R = w - 1;(H !== 0 || S < P) && R !== -1; R--, S++)
8344
+ H += 256 * L[R] >>> 0, L[R] = H % W >>> 0, H = H / W >>> 0;
8345
+ if (H !== 0)
8346
8346
  throw Error("Non-zero carry");
8347
- k = I, O++;
8348
- }
8349
- var H = w - k;
8350
- while (H !== w && L[H] === 0)
8351
- H++;
8352
- var h = G.repeat(V);
8353
- for (;H < w; ++H)
8354
- h += J.charAt(L[H]);
8355
- return h;
8356
- }
8357
- function B(U) {
8358
- if (typeof U !== "string")
8347
+ P = S, O++;
8348
+ }
8349
+ var T = w - P;
8350
+ while (T !== w && L[T] === 0)
8351
+ T++;
8352
+ var g = U.repeat(V);
8353
+ for (;T < w; ++T)
8354
+ g += J.charAt(L[T]);
8355
+ return g;
8356
+ }
8357
+ function B(G) {
8358
+ if (typeof G !== "string")
8359
8359
  throw TypeError("Expected String");
8360
- if (U.length === 0)
8360
+ if (G.length === 0)
8361
8361
  return new Uint8Array;
8362
8362
  var V = 0;
8363
- if (U[V] === " ")
8363
+ if (G[V] === " ")
8364
8364
  return;
8365
- var k = 0, O = 0;
8366
- while (U[V] === G)
8367
- k++, V++;
8368
- var P = (U.length - V) * j + 1 >>> 0, w = new Uint8Array(P);
8369
- while (U[V]) {
8370
- var L = Z[U.charCodeAt(V)];
8365
+ var P = 0, O = 0;
8366
+ while (G[V] === U)
8367
+ P++, V++;
8368
+ var k = (G.length - V) * j + 1 >>> 0, w = new Uint8Array(k);
8369
+ while (G[V]) {
8370
+ var L = Z[G.charCodeAt(V)];
8371
8371
  if (L === 255)
8372
8372
  return;
8373
- var T = 0;
8374
- for (var I = P - 1;(L !== 0 || T < O) && I !== -1; I--, T++)
8375
- L += K * w[I] >>> 0, w[I] = L % 256 >>> 0, L = L / 256 >>> 0;
8373
+ var H = 0;
8374
+ for (var S = k - 1;(L !== 0 || H < O) && S !== -1; S--, H++)
8375
+ L += W * w[S] >>> 0, w[S] = L % 256 >>> 0, L = L / 256 >>> 0;
8376
8376
  if (L !== 0)
8377
8377
  throw Error("Non-zero carry");
8378
- O = T, V++;
8378
+ O = H, V++;
8379
8379
  }
8380
- if (U[V] === " ")
8380
+ if (G[V] === " ")
8381
8381
  return;
8382
- var R = P - O;
8383
- while (R !== P && w[R] === 0)
8382
+ var R = k - O;
8383
+ while (R !== k && w[R] === 0)
8384
8384
  R++;
8385
- var H = new Uint8Array(k + (P - R)), h = k;
8386
- while (R !== P)
8387
- H[h++] = w[R++];
8388
- return H;
8385
+ var T = new Uint8Array(P + (k - R)), g = P;
8386
+ while (R !== k)
8387
+ T[g++] = w[R++];
8388
+ return T;
8389
8389
  }
8390
- function X(U) {
8391
- var V = B(U);
8390
+ function X(G) {
8391
+ var V = B(G);
8392
8392
  if (V)
8393
8393
  return V;
8394
8394
  throw Error(`Non-${Q} character`);
8395
8395
  }
8396
- return { encode: z, decodeUnsafe: B, decode: X };
8396
+ return { encode: N, decodeUnsafe: B, decode: X };
8397
8397
  }
8398
- var zQ = VQ;
8399
- var NQ = zQ;
8400
- var LQ = NQ;
8398
+ var RQ = OQ;
8399
+ var BQ = RQ;
8400
+ var PQ = BQ;
8401
8401
 
8402
- class NJ {
8402
+ class OJ {
8403
8403
  name;
8404
8404
  prefix;
8405
8405
  baseEncode;
@@ -8414,7 +8414,7 @@ class NJ {
8414
8414
  }
8415
8415
  }
8416
8416
 
8417
- class LJ {
8417
+ class RJ {
8418
8418
  name;
8419
8419
  prefix;
8420
8420
  baseDecode;
@@ -8435,17 +8435,17 @@ class LJ {
8435
8435
  throw Error("Can only multibase decode strings");
8436
8436
  }
8437
8437
  or(J) {
8438
- return RJ(this, J);
8438
+ return PJ(this, J);
8439
8439
  }
8440
8440
  }
8441
8441
 
8442
- class OJ {
8442
+ class BJ {
8443
8443
  decoders;
8444
8444
  constructor(J) {
8445
8445
  this.decoders = J;
8446
8446
  }
8447
8447
  or(J) {
8448
- return RJ(this, J);
8448
+ return PJ(this, J);
8449
8449
  }
8450
8450
  decode(J) {
8451
8451
  let Q = J[0], Z = this.decoders[Q];
@@ -8455,11 +8455,11 @@ class OJ {
8455
8455
  throw RangeError(`Unable to decode multibase string ${JSON.stringify(J)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
8456
8456
  }
8457
8457
  }
8458
- function RJ(J, Q) {
8459
- return new OJ({ ...J.decoders ?? { [J.prefix]: J }, ...Q.decoders ?? { [Q.prefix]: Q } });
8458
+ function PJ(J, Q) {
8459
+ return new BJ({ ...J.decoders ?? { [J.prefix]: J }, ...Q.decoders ?? { [Q.prefix]: Q } });
8460
8460
  }
8461
8461
 
8462
- class BJ {
8462
+ class kJ {
8463
8463
  name;
8464
8464
  prefix;
8465
8465
  baseEncode;
@@ -8467,7 +8467,7 @@ class BJ {
8467
8467
  encoder;
8468
8468
  decoder;
8469
8469
  constructor(J, Q, Z, Y) {
8470
- this.name = J, this.prefix = Q, this.baseEncode = Z, this.baseDecode = Y, this.encoder = new NJ(J, Q, Z), this.decoder = new LJ(J, Q, Y);
8470
+ this.name = J, this.prefix = Q, this.baseEncode = Z, this.baseDecode = Y, this.encoder = new OJ(J, Q, Z), this.decoder = new RJ(J, Q, Y);
8471
8471
  }
8472
8472
  encode(J) {
8473
8473
  return this.encoder.encode(J);
@@ -8476,83 +8476,83 @@ class BJ {
8476
8476
  return this.decoder.decode(J);
8477
8477
  }
8478
8478
  }
8479
- function kJ({ name: J, prefix: Q, encode: Z, decode: Y }) {
8480
- return new BJ(J, Q, Z, Y);
8479
+ function wJ({ name: J, prefix: Q, encode: Z, decode: Y }) {
8480
+ return new kJ(J, Q, Z, Y);
8481
8481
  }
8482
- function m({ name: J, prefix: Q, alphabet: Z }) {
8483
- let { encode: Y, decode: $ } = LQ(Z, J);
8484
- return kJ({ prefix: Q, name: J, encode: Y, decode: (W) => XQ($(W)) });
8482
+ function f({ name: J, prefix: Q, alphabet: Z }) {
8483
+ let { encode: Y, decode: $ } = PQ(Z, J);
8484
+ return wJ({ prefix: Q, name: J, encode: Y, decode: (K) => LQ($(K)) });
8485
8485
  }
8486
- function OQ(J, Q, Z, Y) {
8486
+ function kQ(J, Q, Z, Y) {
8487
8487
  let $ = J.length;
8488
8488
  while (J[$ - 1] === "=")
8489
8489
  --$;
8490
- let W = new Uint8Array($ * Z / 8 | 0), q = 0, K = 0, G = 0;
8490
+ let K = new Uint8Array($ * Z / 8 | 0), q = 0, W = 0, U = 0;
8491
8491
  for (let j = 0;j < $; ++j) {
8492
8492
  let M = Q[J[j]];
8493
8493
  if (M === undefined)
8494
8494
  throw SyntaxError(`Non-${Y} character`);
8495
- if (K = K << Z | M, q += Z, q >= 8)
8496
- q -= 8, W[G++] = 255 & K >> q;
8495
+ if (W = W << Z | M, q += Z, q >= 8)
8496
+ q -= 8, K[U++] = 255 & W >> q;
8497
8497
  }
8498
- if (q >= Z || (255 & K << 8 - q) !== 0)
8498
+ if (q >= Z || (255 & W << 8 - q) !== 0)
8499
8499
  throw SyntaxError("Unexpected end of data");
8500
- return W;
8500
+ return K;
8501
8501
  }
8502
- function RQ(J, Q, Z) {
8503
- let Y = Q[Q.length - 1] === "=", $ = (1 << Z) - 1, W = "", q = 0, K = 0;
8504
- for (let G = 0;G < J.length; ++G) {
8505
- K = K << 8 | J[G], q += 8;
8502
+ function wQ(J, Q, Z) {
8503
+ let Y = Q[Q.length - 1] === "=", $ = (1 << Z) - 1, K = "", q = 0, W = 0;
8504
+ for (let U = 0;U < J.length; ++U) {
8505
+ W = W << 8 | J[U], q += 8;
8506
8506
  while (q > Z)
8507
- q -= Z, W += Q[$ & K >> q];
8507
+ q -= Z, K += Q[$ & W >> q];
8508
8508
  }
8509
8509
  if (q !== 0)
8510
- W += Q[$ & K << Z - q];
8510
+ K += Q[$ & W << Z - q];
8511
8511
  if (Y)
8512
- while ((W.length * Z & 7) !== 0)
8513
- W += "=";
8514
- return W;
8512
+ while ((K.length * Z & 7) !== 0)
8513
+ K += "=";
8514
+ return K;
8515
8515
  }
8516
- function BQ(J) {
8516
+ function HQ(J) {
8517
8517
  let Q = {};
8518
8518
  for (let Z = 0;Z < J.length; ++Z)
8519
8519
  Q[J[Z]] = Z;
8520
8520
  return Q;
8521
8521
  }
8522
- function _({ name: J, prefix: Q, bitsPerChar: Z, alphabet: Y }) {
8523
- let $ = BQ(Y);
8524
- return kJ({ prefix: Q, name: J, encode(W) {
8525
- return RQ(W, Y, Z);
8526
- }, decode(W) {
8527
- return OQ(W, $, Z, J);
8522
+ function I({ name: J, prefix: Q, bitsPerChar: Z, alphabet: Y }) {
8523
+ let $ = HQ(Y);
8524
+ return wJ({ prefix: Q, name: J, encode(K) {
8525
+ return wQ(K, Y, Z);
8526
+ }, decode(K) {
8527
+ return kQ(K, $, Z, J);
8528
8528
  } });
8529
8529
  }
8530
- var SQ = _({ prefix: "b", name: "base32", alphabet: "abcdefghijklmnopqrstuvwxyz234567", bitsPerChar: 5 });
8531
- var _Q = _({ prefix: "B", name: "base32upper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", bitsPerChar: 5 });
8532
- var IQ = _({ prefix: "c", name: "base32pad", alphabet: "abcdefghijklmnopqrstuvwxyz234567=", bitsPerChar: 5 });
8533
- var DQ = _({ prefix: "C", name: "base32padupper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=", bitsPerChar: 5 });
8534
- var AQ = _({ prefix: "v", name: "base32hex", alphabet: "0123456789abcdefghijklmnopqrstuv", bitsPerChar: 5 });
8535
- var EQ = _({ prefix: "V", name: "base32hexupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV", bitsPerChar: 5 });
8536
- var xQ = _({ prefix: "t", name: "base32hexpad", alphabet: "0123456789abcdefghijklmnopqrstuv=", bitsPerChar: 5 });
8537
- var vQ = _({ prefix: "T", name: "base32hexpadupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=", bitsPerChar: 5 });
8538
- var CQ = _({ prefix: "h", name: "base32z", alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769", bitsPerChar: 5 });
8539
- var gQ = m({ prefix: "k", name: "base36", alphabet: "0123456789abcdefghijklmnopqrstuvwxyz" });
8540
- var hQ = m({ prefix: "K", name: "base36upper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" });
8541
- var yQ = m({ name: "base58btc", prefix: "z", alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" });
8542
- var bQ = m({ name: "base58flickr", prefix: "Z", alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" });
8543
- var kQ = 127;
8544
- var fQ = ~kQ;
8545
- var mQ = Math.pow(2, 31);
8546
- var lQ = Math.pow(2, 7);
8547
- var pQ = Math.pow(2, 14);
8548
- var uQ = Math.pow(2, 21);
8549
- var dQ = Math.pow(2, 28);
8550
- var cQ = Math.pow(2, 35);
8551
- var iQ = Math.pow(2, 42);
8552
- var nQ = Math.pow(2, 49);
8553
- var oQ = Math.pow(2, 56);
8554
- var sQ = Math.pow(2, 63);
8555
- class N {
8530
+ var AQ = I({ prefix: "b", name: "base32", alphabet: "abcdefghijklmnopqrstuvwxyz234567", bitsPerChar: 5 });
8531
+ var EQ = I({ prefix: "B", name: "base32upper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", bitsPerChar: 5 });
8532
+ var xQ = I({ prefix: "c", name: "base32pad", alphabet: "abcdefghijklmnopqrstuvwxyz234567=", bitsPerChar: 5 });
8533
+ var CQ = I({ prefix: "C", name: "base32padupper", alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=", bitsPerChar: 5 });
8534
+ var vQ = I({ prefix: "v", name: "base32hex", alphabet: "0123456789abcdefghijklmnopqrstuv", bitsPerChar: 5 });
8535
+ var hQ = I({ prefix: "V", name: "base32hexupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV", bitsPerChar: 5 });
8536
+ var gQ = I({ prefix: "t", name: "base32hexpad", alphabet: "0123456789abcdefghijklmnopqrstuv=", bitsPerChar: 5 });
8537
+ var yQ = I({ prefix: "T", name: "base32hexpadupper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=", bitsPerChar: 5 });
8538
+ var mQ = I({ prefix: "h", name: "base32z", alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769", bitsPerChar: 5 });
8539
+ var bQ = f({ prefix: "k", name: "base36", alphabet: "0123456789abcdefghijklmnopqrstuvwxyz" });
8540
+ var fQ = f({ prefix: "K", name: "base36upper", alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" });
8541
+ var lQ = f({ name: "base58btc", prefix: "z", alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" });
8542
+ var pQ = f({ name: "base58flickr", prefix: "Z", alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" });
8543
+ var TQ = 127;
8544
+ var uQ = ~TQ;
8545
+ var dQ = Math.pow(2, 31);
8546
+ var cQ = Math.pow(2, 7);
8547
+ var iQ = Math.pow(2, 14);
8548
+ var nQ = Math.pow(2, 21);
8549
+ var oQ = Math.pow(2, 28);
8550
+ var sQ = Math.pow(2, 35);
8551
+ var rQ = Math.pow(2, 42);
8552
+ var aQ = Math.pow(2, 49);
8553
+ var tQ = Math.pow(2, 56);
8554
+ var eQ = Math.pow(2, 63);
8555
+ class z {
8556
8556
  address;
8557
8557
  abi;
8558
8558
  rpcUrl;
@@ -8560,24 +8560,24 @@ class N {
8560
8560
  this.address = J.address, this.abi = J.abi, this.rpcUrl = J.rpcUrl;
8561
8561
  }
8562
8562
  async read(J, Q, Z) {
8563
- let Y = r({ abi: this.abi, functionName: J, args: Q }), $ = { to: this.address, data: Y, ...Z?.from && { from: Z.from } }, q = await (await fetch(this.rpcUrl, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "eth_call", params: [$, "latest"] }) })).json();
8563
+ let Y = t({ abi: this.abi, functionName: J, args: Q }), $ = { to: this.address, data: Y, ...Z?.from && { from: Z.from } }, q = await (await fetch(this.rpcUrl, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "eth_call", params: [$, "latest"] }) })).json();
8564
8564
  if (q.error)
8565
8565
  throw Error(`RPC Error: ${q.error.message}`);
8566
8566
  if (!q.result)
8567
8567
  throw Error("No result returned from RPC call");
8568
- return zJ({ abi: this.abi, functionName: J, data: q.result });
8568
+ return LJ({ abi: this.abi, functionName: J, data: q.result });
8569
8569
  }
8570
8570
  encodeWrite(J, Q) {
8571
- return r({ abi: this.abi, functionName: J, args: Q });
8571
+ return t({ abi: this.abi, functionName: J, args: Q });
8572
8572
  }
8573
8573
  }
8574
- function PQ(J) {
8574
+ function _Q(J) {
8575
8575
  return J;
8576
8576
  }
8577
- var wJ = PQ([{ type: "constructor", inputs: [{ name: "_owner", type: "address" }, { name: "_service", type: "address" }, { name: "_feeCollection", type: "address" }, { name: "_initialConditions", type: "address[]" }, { name: "_name", type: "string" }, { name: "_symbol", type: "string" }, { name: "_metadataDigest", type: "bytes32" }], stateMutability: "nonpayable" }, { type: "function", name: "BASE_MINT_HANDLER", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "BASE_MINT_POLICY", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "BASE_TREASURY", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "HUB", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "LIFT_ERC20", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "MAX_CONDITIONS", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "NAME_REGISTRY", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "feeCollection", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "getMembershipConditions", inputs: [], outputs: [{ name: "", type: "address[]" }], stateMutability: "view" }, { type: "function", name: "membershipConditions", inputs: [{ name: "", type: "uint256" }], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "registerShortNameWithNonce", inputs: [{ name: "_nonce", type: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "service", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "setFeeCollection", inputs: [{ name: "_feeCollection", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setMembershipCondition", inputs: [{ name: "_condition", type: "address" }, { name: "_enabled", type: "bool" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setOwner", inputs: [{ name: "_owner", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setService", inputs: [{ name: "_service", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "trust", inputs: [{ name: "_trustReceiver", type: "address" }, { name: "_expiry", type: "uint96" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "trustBatchWithConditions", inputs: [{ name: "_members", type: "address[]" }, { name: "_expiry", type: "uint96" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateMetadataDigest", inputs: [{ name: "_metadataDigest", type: "bytes32" }], outputs: [], stateMutability: "nonpayable" }, { type: "event", name: "FeeCollectionUpdated", inputs: [{ name: "feeCollection", type: "address", indexed: true }], anonymous: false }, { type: "event", name: "MembershipConditionEnabled", inputs: [{ name: "condition", type: "address", indexed: true }, { name: "enabled", type: "bool", indexed: false }], anonymous: false }, { type: "event", name: "OwnerUpdated", inputs: [{ name: "owner", type: "address", indexed: true }], anonymous: false }, { type: "event", name: "ServiceUpdated", inputs: [{ name: "newService", type: "address", indexed: true }], anonymous: false }, { type: "error", name: "InvalidCallingParameters", inputs: [] }, { type: "error", name: "MaxConditionsActive", inputs: [] }, { type: "error", name: "MembershipCheckFailed", inputs: [{ name: "member", type: "address" }, { name: "failedCondition", type: "address" }] }, { type: "error", name: "OnlyHub", inputs: [] }, { type: "error", name: "OnlyOwner", inputs: [] }, { type: "error", name: "OnlyOwnerOrService", inputs: [] }]);
8577
+ var TJ = _Q([{ type: "constructor", inputs: [{ name: "_owner", type: "address" }, { name: "_service", type: "address" }, { name: "_feeCollection", type: "address" }, { name: "_initialConditions", type: "address[]" }, { name: "_name", type: "string" }, { name: "_symbol", type: "string" }, { name: "_metadataDigest", type: "bytes32" }], stateMutability: "nonpayable" }, { type: "function", name: "BASE_MINT_HANDLER", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "BASE_MINT_POLICY", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "BASE_TREASURY", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "HUB", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "LIFT_ERC20", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "MAX_CONDITIONS", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "NAME_REGISTRY", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "feeCollection", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "getMembershipConditions", inputs: [], outputs: [{ name: "", type: "address[]" }], stateMutability: "view" }, { type: "function", name: "membershipConditions", inputs: [{ name: "", type: "uint256" }], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "registerShortNameWithNonce", inputs: [{ name: "_nonce", type: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "service", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "setFeeCollection", inputs: [{ name: "_feeCollection", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setMembershipCondition", inputs: [{ name: "_condition", type: "address" }, { name: "_enabled", type: "bool" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setOwner", inputs: [{ name: "_owner", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setService", inputs: [{ name: "_service", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "trust", inputs: [{ name: "_trustReceiver", type: "address" }, { name: "_expiry", type: "uint96" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "trustBatchWithConditions", inputs: [{ name: "_members", type: "address[]" }, { name: "_expiry", type: "uint96" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateMetadataDigest", inputs: [{ name: "_metadataDigest", type: "bytes32" }], outputs: [], stateMutability: "nonpayable" }, { type: "event", name: "FeeCollectionUpdated", inputs: [{ name: "feeCollection", type: "address", indexed: true }], anonymous: false }, { type: "event", name: "MembershipConditionEnabled", inputs: [{ name: "condition", type: "address", indexed: true }, { name: "enabled", type: "bool", indexed: false }], anonymous: false }, { type: "event", name: "OwnerUpdated", inputs: [{ name: "owner", type: "address", indexed: true }], anonymous: false }, { type: "event", name: "ServiceUpdated", inputs: [{ name: "newService", type: "address", indexed: true }], anonymous: false }, { type: "error", name: "InvalidCallingParameters", inputs: [] }, { type: "error", name: "MaxConditionsActive", inputs: [] }, { type: "error", name: "MembershipCheckFailed", inputs: [{ name: "member", type: "address" }, { name: "failedCondition", type: "address" }] }, { type: "error", name: "OnlyHub", inputs: [] }, { type: "error", name: "OnlyOwner", inputs: [] }, { type: "error", name: "OnlyOwnerOrService", inputs: [] }]);
8578
8578
  var SJ = [{ type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "function", name: "DOMAIN_SEPARATOR", inputs: [], outputs: [{ name: "", type: "bytes32" }], stateMutability: "view" }, { type: "function", name: "allowance", inputs: [{ name: "_owner", type: "address" }, { name: "_spender", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "_spender", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "avatar", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "_account", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "circlesIdentifier", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertBatchDemurrageToInflationaryValues", inputs: [{ name: "_demurrageValues", type: "uint256[]" }, { name: "_dayUpdated", type: "uint64" }], outputs: [{ name: "", type: "uint256[]" }], stateMutability: "pure" }, { type: "function", name: "convertBatchInflationaryToDemurrageValues", inputs: [{ name: "_inflationaryValues", type: "uint256[]" }, { name: "_day", type: "uint64" }], outputs: [{ name: "", type: "uint256[]" }], stateMutability: "pure" }, { type: "function", name: "convertDemurrageToInflationaryValue", inputs: [{ name: "_demurrageValue", type: "uint256" }, { name: "_dayUpdated", type: "uint64" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "convertInflationaryToDemurrageValue", inputs: [{ name: "_inflationaryValue", type: "uint256" }, { name: "_day", type: "uint64" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "day", inputs: [{ name: "_timestamp", type: "uint256" }], outputs: [{ name: "", type: "uint64" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8" }], stateMutability: "pure" }, { type: "function", name: "decreaseAllowance", inputs: [{ name: "_spender", type: "address" }, { name: "_subtractedValue", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "eip712Domain", inputs: [], outputs: [{ name: "fields", type: "bytes1" }, { name: "name", type: "string" }, { name: "version", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, { name: "salt", type: "bytes32" }, { name: "extensions", type: "uint256[]" }], stateMutability: "view" }, { type: "function", name: "hub", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "increaseAllowance", inputs: [{ name: "_spender", type: "address" }, { name: "_addedValue", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "inflationDayZero", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string" }], stateMutability: "view" }, { type: "function", name: "nameRegistry", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "nonces", inputs: [{ name: "_owner", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "onERC1155BatchReceived", inputs: [{ name: "", type: "address" }, { name: "", type: "address" }, { name: "", type: "uint256[]" }, { name: "", type: "uint256[]" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "view" }, { type: "function", name: "onERC1155Received", inputs: [{ name: "", type: "address" }, { name: "_from", type: "address" }, { name: "_id", type: "uint256" }, { name: "_amount", type: "uint256" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" }, { type: "function", name: "permit", inputs: [{ name: "_owner", type: "address" }, { name: "_spender", type: "address" }, { name: "_value", type: "uint256" }, { name: "_deadline", type: "uint256" }, { name: "_v", type: "uint8" }, { name: "_r", type: "bytes32" }, { name: "_s", type: "bytes32" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setup", inputs: [{ name: "_hub", type: "address" }, { name: "_nameRegistry", type: "address" }, { name: "_avatar", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4" }], outputs: [{ name: "", type: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string" }], stateMutability: "view" }, { type: "function", name: "toTokenId", inputs: [{ name: "_avatar", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "_to", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "_from", type: "address" }, { name: "_to", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "unwrap", inputs: [{ name: "_amount", type: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true }, { name: "spender", type: "address", indexed: true }, { name: "value", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "DepositInflationary", inputs: [{ name: "account", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }, { name: "demurragedAmount", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "EIP712DomainChanged", inputs: [], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true }, { name: "to", type: "address", indexed: true }, { name: "value", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "WithdrawInflationary", inputs: [{ name: "account", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }, { name: "demurragedAmount", type: "uint256", indexed: false }], anonymous: false }, { type: "error", name: "CirclesAmountOverflow", inputs: [{ name: "amount", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesERC1155CannotReceiveBatch", inputs: [{ name: "code", type: "uint8" }] }, { type: "error", name: "CirclesErrorAddressUintArgs", inputs: [{ name: "", type: "address" }, { name: "", type: "uint256" }, { name: "", type: "uint8" }] }, { type: "error", name: "CirclesErrorNoArgs", inputs: [{ name: "", type: "uint8" }] }, { type: "error", name: "CirclesErrorOneAddressArg", inputs: [{ name: "", type: "address" }, { name: "", type: "uint8" }] }, { type: "error", name: "CirclesIdMustBeDerivedFromAddress", inputs: [{ name: "providedId", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesInvalidCirclesId", inputs: [{ name: "id", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesInvalidParameter", inputs: [{ name: "parameter", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesProxyAlreadyInitialized", inputs: [] }, { type: "error", name: "CirclesReentrancyGuard", inputs: [{ name: "code", type: "uint8" }] }, { type: "error", name: "ECDSAInvalidSignature", inputs: [] }, { type: "error", name: "ECDSAInvalidSignatureLength", inputs: [{ name: "length", type: "uint256" }] }, { type: "error", name: "ECDSAInvalidSignatureS", inputs: [{ name: "s", type: "bytes32" }] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address" }, { name: "allowance", type: "uint256" }, { name: "needed", type: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address" }, { name: "balance", type: "uint256" }, { name: "needed", type: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address" }] }, { type: "error", name: "ERC2612ExpiredSignature", inputs: [{ name: "deadline", type: "uint256" }] }, { type: "error", name: "ERC2612InvalidSigner", inputs: [{ name: "signer", type: "address" }, { name: "owner", type: "address" }] }, { type: "error", name: "InvalidAccountNonce", inputs: [{ name: "account", type: "address" }, { name: "currentNonce", type: "uint256" }] }, { type: "error", name: "InvalidShortString", inputs: [] }, { type: "error", name: "StringTooLong", inputs: [{ name: "str", type: "string" }] }];
8579
- var _J = [{ type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "function", name: "DOMAIN_SEPARATOR", inputs: [], outputs: [{ name: "", type: "bytes32" }], stateMutability: "view" }, { type: "function", name: "allowance", inputs: [{ name: "_owner", type: "address" }, { name: "_spender", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "_spender", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "avatar", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "_account", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "balanceOfOnDay", inputs: [{ name: "_account", type: "address" }, { name: "_day", type: "uint64" }], outputs: [{ name: "balanceOnDay_", type: "uint256" }, { name: "discountCost_", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "circlesIdentifier", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertBatchDemurrageToInflationaryValues", inputs: [{ name: "_demurrageValues", type: "uint256[]" }, { name: "_dayUpdated", type: "uint64" }], outputs: [{ name: "", type: "uint256[]" }], stateMutability: "pure" }, { type: "function", name: "convertBatchInflationaryToDemurrageValues", inputs: [{ name: "_inflationaryValues", type: "uint256[]" }, { name: "_day", type: "uint64" }], outputs: [{ name: "", type: "uint256[]" }], stateMutability: "pure" }, { type: "function", name: "convertDemurrageToInflationaryValue", inputs: [{ name: "_demurrageValue", type: "uint256" }, { name: "_dayUpdated", type: "uint64" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "convertInflationaryToDemurrageValue", inputs: [{ name: "_inflationaryValue", type: "uint256" }, { name: "_day", type: "uint64" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "day", inputs: [{ name: "_timestamp", type: "uint256" }], outputs: [{ name: "", type: "uint64" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8" }], stateMutability: "pure" }, { type: "function", name: "decreaseAllowance", inputs: [{ name: "_spender", type: "address" }, { name: "_subtractedValue", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "discountedBalances", inputs: [{ name: "", type: "address" }], outputs: [{ name: "balance", type: "uint192" }, { name: "lastUpdatedDay", type: "uint64" }], stateMutability: "view" }, { type: "function", name: "eip712Domain", inputs: [], outputs: [{ name: "fields", type: "bytes1" }, { name: "name", type: "string" }, { name: "version", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, { name: "salt", type: "bytes32" }, { name: "extensions", type: "uint256[]" }], stateMutability: "view" }, { type: "function", name: "hub", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "increaseAllowance", inputs: [{ name: "_spender", type: "address" }, { name: "_addedValue", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "inflationDayZero", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string" }], stateMutability: "view" }, { type: "function", name: "nameRegistry", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "nonces", inputs: [{ name: "_owner", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "onERC1155BatchReceived", inputs: [{ name: "", type: "address" }, { name: "", type: "address" }, { name: "", type: "uint256[]" }, { name: "", type: "uint256[]" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "view" }, { type: "function", name: "onERC1155Received", inputs: [{ name: "", type: "address" }, { name: "_from", type: "address" }, { name: "_id", type: "uint256" }, { name: "_amount", type: "uint256" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" }, { type: "function", name: "permit", inputs: [{ name: "_owner", type: "address" }, { name: "_spender", type: "address" }, { name: "_value", type: "uint256" }, { name: "_deadline", type: "uint256" }, { name: "_v", type: "uint8" }, { name: "_r", type: "bytes32" }, { name: "_s", type: "bytes32" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setup", inputs: [{ name: "_hub", type: "address" }, { name: "_nameRegistry", type: "address" }, { name: "_avatar", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4" }], outputs: [{ name: "", type: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string" }], stateMutability: "view" }, { type: "function", name: "toTokenId", inputs: [{ name: "_avatar", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "_to", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "_from", type: "address" }, { name: "_to", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "unwrap", inputs: [{ name: "_amount", type: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true }, { name: "spender", type: "address", indexed: true }, { name: "value", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "DepositDemurraged", inputs: [{ name: "account", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }, { name: "inflationaryAmount", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "DiscountCost", inputs: [{ name: "account", type: "address", indexed: true }, { name: "discountCost", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "EIP712DomainChanged", inputs: [], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true }, { name: "to", type: "address", indexed: true }, { name: "value", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "WithdrawDemurraged", inputs: [{ name: "account", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }, { name: "inflationaryAmount", type: "uint256", indexed: false }], anonymous: false }, { type: "error", name: "CirclesAmountOverflow", inputs: [{ name: "amount", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesERC1155CannotReceiveBatch", inputs: [{ name: "code", type: "uint8" }] }, { type: "error", name: "CirclesErrorAddressUintArgs", inputs: [{ name: "", type: "address" }, { name: "", type: "uint256" }, { name: "", type: "uint8" }] }, { type: "error", name: "CirclesErrorNoArgs", inputs: [{ name: "", type: "uint8" }] }, { type: "error", name: "CirclesErrorOneAddressArg", inputs: [{ name: "", type: "address" }, { name: "", type: "uint8" }] }, { type: "error", name: "CirclesIdMustBeDerivedFromAddress", inputs: [{ name: "providedId", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesInvalidCirclesId", inputs: [{ name: "id", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesInvalidParameter", inputs: [{ name: "parameter", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesProxyAlreadyInitialized", inputs: [] }, { type: "error", name: "CirclesReentrancyGuard", inputs: [{ name: "code", type: "uint8" }] }, { type: "error", name: "ECDSAInvalidSignature", inputs: [] }, { type: "error", name: "ECDSAInvalidSignatureLength", inputs: [{ name: "length", type: "uint256" }] }, { type: "error", name: "ECDSAInvalidSignatureS", inputs: [{ name: "s", type: "bytes32" }] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address" }, { name: "allowance", type: "uint256" }, { name: "needed", type: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address" }, { name: "balance", type: "uint256" }, { name: "needed", type: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address" }] }, { type: "error", name: "ERC2612ExpiredSignature", inputs: [{ name: "deadline", type: "uint256" }] }, { type: "error", name: "ERC2612InvalidSigner", inputs: [{ name: "signer", type: "address" }, { name: "owner", type: "address" }] }, { type: "error", name: "InvalidAccountNonce", inputs: [{ name: "account", type: "address" }, { name: "currentNonce", type: "uint256" }] }, { type: "error", name: "InvalidShortString", inputs: [] }, { type: "error", name: "StringTooLong", inputs: [{ name: "str", type: "string" }] }];
8580
- class C extends N {
8579
+ var DJ = [{ type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "function", name: "DOMAIN_SEPARATOR", inputs: [], outputs: [{ name: "", type: "bytes32" }], stateMutability: "view" }, { type: "function", name: "allowance", inputs: [{ name: "_owner", type: "address" }, { name: "_spender", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "_spender", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "avatar", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "_account", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "balanceOfOnDay", inputs: [{ name: "_account", type: "address" }, { name: "_day", type: "uint64" }], outputs: [{ name: "balanceOnDay_", type: "uint256" }, { name: "discountCost_", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "circlesIdentifier", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertBatchDemurrageToInflationaryValues", inputs: [{ name: "_demurrageValues", type: "uint256[]" }, { name: "_dayUpdated", type: "uint64" }], outputs: [{ name: "", type: "uint256[]" }], stateMutability: "pure" }, { type: "function", name: "convertBatchInflationaryToDemurrageValues", inputs: [{ name: "_inflationaryValues", type: "uint256[]" }, { name: "_day", type: "uint64" }], outputs: [{ name: "", type: "uint256[]" }], stateMutability: "pure" }, { type: "function", name: "convertDemurrageToInflationaryValue", inputs: [{ name: "_demurrageValue", type: "uint256" }, { name: "_dayUpdated", type: "uint64" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "convertInflationaryToDemurrageValue", inputs: [{ name: "_inflationaryValue", type: "uint256" }, { name: "_day", type: "uint64" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "day", inputs: [{ name: "_timestamp", type: "uint256" }], outputs: [{ name: "", type: "uint64" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8" }], stateMutability: "pure" }, { type: "function", name: "decreaseAllowance", inputs: [{ name: "_spender", type: "address" }, { name: "_subtractedValue", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "discountedBalances", inputs: [{ name: "", type: "address" }], outputs: [{ name: "balance", type: "uint192" }, { name: "lastUpdatedDay", type: "uint64" }], stateMutability: "view" }, { type: "function", name: "eip712Domain", inputs: [], outputs: [{ name: "fields", type: "bytes1" }, { name: "name", type: "string" }, { name: "version", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, { name: "salt", type: "bytes32" }, { name: "extensions", type: "uint256[]" }], stateMutability: "view" }, { type: "function", name: "hub", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "increaseAllowance", inputs: [{ name: "_spender", type: "address" }, { name: "_addedValue", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "inflationDayZero", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string" }], stateMutability: "view" }, { type: "function", name: "nameRegistry", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" }, { type: "function", name: "nonces", inputs: [{ name: "_owner", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "onERC1155BatchReceived", inputs: [{ name: "", type: "address" }, { name: "", type: "address" }, { name: "", type: "uint256[]" }, { name: "", type: "uint256[]" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "view" }, { type: "function", name: "onERC1155Received", inputs: [{ name: "", type: "address" }, { name: "_from", type: "address" }, { name: "_id", type: "uint256" }, { name: "_amount", type: "uint256" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" }, { type: "function", name: "permit", inputs: [{ name: "_owner", type: "address" }, { name: "_spender", type: "address" }, { name: "_value", type: "uint256" }, { name: "_deadline", type: "uint256" }, { name: "_v", type: "uint8" }, { name: "_r", type: "bytes32" }, { name: "_s", type: "bytes32" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setup", inputs: [{ name: "_hub", type: "address" }, { name: "_nameRegistry", type: "address" }, { name: "_avatar", type: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4" }], outputs: [{ name: "", type: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string" }], stateMutability: "view" }, { type: "function", name: "toTokenId", inputs: [{ name: "_avatar", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "pure" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "_to", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "_from", type: "address" }, { name: "_to", type: "address" }, { name: "_amount", type: "uint256" }], outputs: [{ name: "", type: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "unwrap", inputs: [{ name: "_amount", type: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true }, { name: "spender", type: "address", indexed: true }, { name: "value", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "DepositDemurraged", inputs: [{ name: "account", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }, { name: "inflationaryAmount", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "DiscountCost", inputs: [{ name: "account", type: "address", indexed: true }, { name: "discountCost", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "EIP712DomainChanged", inputs: [], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true }, { name: "to", type: "address", indexed: true }, { name: "value", type: "uint256", indexed: false }], anonymous: false }, { type: "event", name: "WithdrawDemurraged", inputs: [{ name: "account", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }, { name: "inflationaryAmount", type: "uint256", indexed: false }], anonymous: false }, { type: "error", name: "CirclesAmountOverflow", inputs: [{ name: "amount", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesERC1155CannotReceiveBatch", inputs: [{ name: "code", type: "uint8" }] }, { type: "error", name: "CirclesErrorAddressUintArgs", inputs: [{ name: "", type: "address" }, { name: "", type: "uint256" }, { name: "", type: "uint8" }] }, { type: "error", name: "CirclesErrorNoArgs", inputs: [{ name: "", type: "uint8" }] }, { type: "error", name: "CirclesErrorOneAddressArg", inputs: [{ name: "", type: "address" }, { name: "", type: "uint8" }] }, { type: "error", name: "CirclesIdMustBeDerivedFromAddress", inputs: [{ name: "providedId", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesInvalidCirclesId", inputs: [{ name: "id", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesInvalidParameter", inputs: [{ name: "parameter", type: "uint256" }, { name: "code", type: "uint8" }] }, { type: "error", name: "CirclesProxyAlreadyInitialized", inputs: [] }, { type: "error", name: "CirclesReentrancyGuard", inputs: [{ name: "code", type: "uint8" }] }, { type: "error", name: "ECDSAInvalidSignature", inputs: [] }, { type: "error", name: "ECDSAInvalidSignatureLength", inputs: [{ name: "length", type: "uint256" }] }, { type: "error", name: "ECDSAInvalidSignatureS", inputs: [{ name: "s", type: "bytes32" }] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address" }, { name: "allowance", type: "uint256" }, { name: "needed", type: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address" }, { name: "balance", type: "uint256" }, { name: "needed", type: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address" }] }, { type: "error", name: "ERC2612ExpiredSignature", inputs: [{ name: "deadline", type: "uint256" }] }, { type: "error", name: "ERC2612InvalidSigner", inputs: [{ name: "signer", type: "address" }, { name: "owner", type: "address" }] }, { type: "error", name: "InvalidAccountNonce", inputs: [{ name: "account", type: "address" }, { name: "currentNonce", type: "uint256" }] }, { type: "error", name: "InvalidShortString", inputs: [] }, { type: "error", name: "StringTooLong", inputs: [{ name: "str", type: "string" }] }];
8580
+ class v extends z {
8581
8581
  async DOMAIN_SEPARATOR() {
8582
8582
  return this.read("DOMAIN_SEPARATOR");
8583
8583
  }
@@ -8659,20 +8659,20 @@ class C extends N {
8659
8659
  unwrap(J) {
8660
8660
  return { to: this.address, data: this.encodeWrite("unwrap", [J]), value: BigInt(0) };
8661
8661
  }
8662
- permit(J, Q, Z, Y, $, W, q) {
8663
- return { to: this.address, data: this.encodeWrite("permit", [J, Q, Z, Y, $, W, q]), value: BigInt(0) };
8662
+ permit(J, Q, Z, Y, $, K, q) {
8663
+ return { to: this.address, data: this.encodeWrite("permit", [J, Q, Z, Y, $, K, q]), value: BigInt(0) };
8664
8664
  }
8665
8665
  }
8666
8666
 
8667
- class EJ extends C {
8667
+ class hJ extends v {
8668
8668
  constructor(J) {
8669
8669
  super({ address: J.address, abi: SJ, rpcUrl: J.rpcUrl });
8670
8670
  }
8671
8671
  }
8672
8672
 
8673
- class xJ extends C {
8673
+ class gJ extends v {
8674
8674
  constructor(J) {
8675
- super({ address: J.address, abi: _J, rpcUrl: J.rpcUrl });
8675
+ super({ address: J.address, abi: DJ, rpcUrl: J.rpcUrl });
8676
8676
  }
8677
8677
  async balanceOfOnDay(J, Q) {
8678
8678
  return this.read("balanceOfOnDay", [J, Q]);
@@ -8681,14 +8681,14 @@ class xJ extends C {
8681
8681
  return this.read("discountedBalances", [J]);
8682
8682
  }
8683
8683
  }
8684
- var vJ;
8684
+ var yJ;
8685
8685
  ((J) => {
8686
8686
  J[J.Demurrage = 0] = "Demurrage", J[J.Inflation = 1] = "Inflation";
8687
- })(vJ ||= {});
8688
- var wQ;
8687
+ })(yJ ||= {});
8688
+ var IQ;
8689
8689
  ((J) => {
8690
8690
  J.Standard = "Standard", J.Custom = "Custom";
8691
- })(wQ ||= {});
8691
+ })(IQ ||= {});
8692
8692
 
8693
8693
  // src/errors.ts
8694
8694
  class TransferError extends CirclesError3 {
@@ -8769,11 +8769,11 @@ class TransferBuilder {
8769
8769
  const fromTokenAddr = options.fromTokens[0];
8770
8770
  const toTokenAddr = options.toTokens[0];
8771
8771
  const [demurragedWrapper, inflationaryWrapper] = await Promise.all([
8772
- this.core.liftERC20.erc20Circles(vJ.Demurrage, toTokenAddr),
8773
- this.core.liftERC20.erc20Circles(vJ.Inflation, toTokenAddr)
8772
+ this.core.liftERC20.erc20Circles(yJ.Demurrage, toTokenAddr),
8773
+ this.core.liftERC20.erc20Circles(yJ.Inflation, toTokenAddr)
8774
8774
  ]);
8775
8775
  if (fromTokenAddr.toLowerCase() === demurragedWrapper.toLowerCase() && demurragedWrapper !== ZERO_ADDRESS) {
8776
- const wrapper = new xJ({
8776
+ const wrapper = new gJ({
8777
8777
  address: fromTokenAddr,
8778
8778
  rpcUrl: this.core.config.circlesRpcUrl
8779
8779
  });
@@ -8785,7 +8785,7 @@ class TransferBuilder {
8785
8785
  }];
8786
8786
  }
8787
8787
  if (fromTokenAddr.toLowerCase() === inflationaryWrapper.toLowerCase() && inflationaryWrapper !== ZERO_ADDRESS) {
8788
- const wrapper = new EJ({
8788
+ const wrapper = new hJ({
8789
8789
  address: fromTokenAddr,
8790
8790
  rpcUrl: this.core.config.circlesRpcUrl
8791
8791
  });
@@ -8923,7 +8923,7 @@ class TransferBuilder {
8923
8923
  const tokenOwner = tokenInfo?.tokenOwner;
8924
8924
  const leftoverAmount = CirclesConverter5.attoStaticCirclesToAttoCircles(currentBalance) - amountUsedInPath;
8925
8925
  if (leftoverAmount > 0n) {
8926
- const wrapTx = this.core.hubV2.wrap(tokenOwner, leftoverAmount, vJ.Inflation);
8926
+ const wrapTx = this.core.hubV2.wrap(tokenOwner, leftoverAmount, yJ.Inflation);
8927
8927
  wrapCalls.push({
8928
8928
  to: wrapTx.to,
8929
8929
  data: wrapTx.data,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aboutcircles/sdk-transfers",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Transfer data construction for Circles SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,11 +28,11 @@
28
28
  ],
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@aboutcircles/sdk-types": "*",
32
- "@aboutcircles/sdk-core": "*",
33
- "@aboutcircles/sdk-rpc": "*",
34
- "@aboutcircles/sdk-utils": "*",
35
- "@aboutcircles/sdk-pathfinder": "*",
31
+ "@aboutcircles/sdk-types": "workspace:*",
32
+ "@aboutcircles/sdk-core": "workspace:*",
33
+ "@aboutcircles/sdk-rpc": "workspace:*",
34
+ "@aboutcircles/sdk-utils": "workspace:*",
35
+ "@aboutcircles/sdk-pathfinder": "workspace:*",
36
36
  "viem": "^2.38.0"
37
37
  },
38
38
  "devDependencies": {