@swapkit/core 1.0.0-rc.31 → 1.0.0-rc.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,16 +1,16 @@
1
- var We = Object.defineProperty;
2
- var je = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var T = (e, t, n) => (je(e, typeof t != "symbol" ? t + "" : t, n), n), Ke = (e, t, n) => {
1
+ var Ge = Object.defineProperty;
2
+ var qe = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var T = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n), We = (e, t, n) => {
4
4
  if (!t.has(e))
5
5
  throw TypeError("Cannot " + n);
6
6
  };
7
- var f = (e, t, n) => (Ke(e, t, "read from private field"), n ? n.call(e) : t.get(e)), B = (e, t, n) => {
7
+ var f = (e, t, n) => (We(e, t, "read from private field"), n ? n.call(e) : t.get(e)), B = (e, t, n) => {
8
8
  if (t.has(e))
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  t instanceof WeakSet ? t.add(e) : t.set(e, n);
11
11
  };
12
- var Ye = Object.defineProperty, Xe = (e, t, n) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, v = (e, t, n) => (Xe(e, typeof t != "symbol" ? t + "" : t, n), n);
13
- const fn = [
12
+ var je = Object.defineProperty, Ke = (e, t, n) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, S = (e, t, n) => (Ke(e, typeof t != "symbol" ? t + "" : t, n), n);
13
+ const _n = [
14
14
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
15
15
  {
16
16
  anonymous: !1,
@@ -108,7 +108,7 @@ const fn = [
108
108
  stateMutability: "nonpayable",
109
109
  type: "function"
110
110
  }
111
- ], Je = [
111
+ ], Ye = [
112
112
  {
113
113
  inputs: [{ internalType: "address", name: "rune", type: "address" }],
114
114
  stateMutability: "nonpayable",
@@ -283,7 +283,7 @@ const fn = [
283
283
  stateMutability: "view",
284
284
  type: "function"
285
285
  }
286
- ], Qe = [
286
+ ], Xe = [
287
287
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
288
288
  {
289
289
  anonymous: !1,
@@ -447,7 +447,7 @@ const fn = [
447
447
  stateMutability: "view",
448
448
  type: "function"
449
449
  }
450
- ], ze = [
450
+ ], Je = [
451
451
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
452
452
  {
453
453
  anonymous: !1,
@@ -600,13 +600,13 @@ const fn = [
600
600
  type: "function"
601
601
  }
602
602
  ];
603
- var Ze = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e))(Ze || {});
604
- const et = [
603
+ var Qe = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e))(Qe || {});
604
+ const ze = [
605
605
  "ERC20-ERC20",
606
606
  "ARC20-ARC20",
607
607
  "BEP20-BEP20"
608
608
  /* BSC_TO_BSC */
609
- ], tt = [
609
+ ], Ze = [
610
610
  "ERC20-TC",
611
611
  "ERC20-ARC20",
612
612
  "ERC20-BEP20",
@@ -617,15 +617,15 @@ const et = [
617
617
  "BEP20-ERC20",
618
618
  "BEP20-ARC20"
619
619
  /* BSC_TO_AVAX */
620
- ], nt = [
620
+ ], et = [
621
621
  "TC-TC",
622
622
  "TC-ERC20",
623
623
  "TC-ARC20",
624
624
  "TC-BEP20"
625
625
  /* TC_SUPPORTED_TO_BSC */
626
626
  ];
627
- var Ne = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(Ne || {}), at = /* @__PURE__ */ ((e) => (e.HEALTH_CONTROLLER = "1000", e.LIQUIDITY_CONTROLLER = "1001", e.PROVIDER_CONTROLLER = "1002", e.QUOTE_CONTROLLER = "1003", e.SWAP_CONTROLLER = "1004", e.UTIL_CONTROLLER = "1005", e.AIRDROP_CONTROLLER = "1006", e.PROVIDER = "2000", e.ASSET = "2001", e.TOKEN_LIST = "2002", e.QUOTE = "2100", e.QUOTE_TXN_DETAILS = "2101", e.THORCHAIN_PROVIDER = "3000", e.UNISWAPV2_ETH_PROVIDER = "3001", e.UNISWAPV3_ETH_PROVIDER = "3002", e.SUSHISWAP_ETH_PROVIDER = "3003", e.PANCAKESWAP_BSC_PROVIDER = "3004", e.PANCAKESWAP_ETH_PROVIDER = "3005", e.ONEINCH_ETH_PROVIDER = "3006", e.ONEINCH_BSC_PROVIDER = "3007", e.ONEINCH_AVAX_PROVIDER = "3008", e.ZEROX_ETH_PROVIDER = "3009", e.WOOFI_AVAX_PROVIDER = "3010", e.PANGOLIN_AVAX_PROVIDER = "3011", e.TRADERJOE_AVAX_PROVIDER = "3012", e.KYBER_ETH_PROVIDER = "3013", e.KYBER_AVAX_PROVIDER = "3014", e.WOOFI_BSC_PROVIDER = "3015", e.STARGATE_PROVIDER = "3016", e.PROVIDER_UTIL = "4000", e.TXN_DETAILS = "5000", e.AIRDROP_UTIL = "6000", e))(at || {}), l = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(l || {});
628
- const st = {
627
+ var ve = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(ve || {}), tt = /* @__PURE__ */ ((e) => (e.HEALTH_CONTROLLER = "1000", e.LIQUIDITY_CONTROLLER = "1001", e.PROVIDER_CONTROLLER = "1002", e.QUOTE_CONTROLLER = "1003", e.SWAP_CONTROLLER = "1004", e.UTIL_CONTROLLER = "1005", e.AIRDROP_CONTROLLER = "1006", e.PROVIDER = "2000", e.ASSET = "2001", e.TOKEN_LIST = "2002", e.QUOTE = "2100", e.QUOTE_TXN_DETAILS = "2101", e.THORCHAIN_PROVIDER = "3000", e.UNISWAPV2_ETH_PROVIDER = "3001", e.UNISWAPV3_ETH_PROVIDER = "3002", e.SUSHISWAP_ETH_PROVIDER = "3003", e.PANCAKESWAP_BSC_PROVIDER = "3004", e.PANCAKESWAP_ETH_PROVIDER = "3005", e.ONEINCH_ETH_PROVIDER = "3006", e.ONEINCH_BSC_PROVIDER = "3007", e.ONEINCH_AVAX_PROVIDER = "3008", e.ZEROX_ETH_PROVIDER = "3009", e.WOOFI_AVAX_PROVIDER = "3010", e.PANGOLIN_AVAX_PROVIDER = "3011", e.TRADERJOE_AVAX_PROVIDER = "3012", e.KYBER_ETH_PROVIDER = "3013", e.KYBER_AVAX_PROVIDER = "3014", e.WOOFI_BSC_PROVIDER = "3015", e.STARGATE_PROVIDER = "3016", e.PROVIDER_UTIL = "4000", e.TXN_DETAILS = "5000", e.AIRDROP_UTIL = "6000", e))(tt || {}), l = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(l || {});
628
+ const nt = {
629
629
  [l.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",
630
630
  [l.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",
631
631
  [l.CANNOT_FIND_INBOUND_ADDRESS]: "Cannot find inbound address.",
@@ -676,13 +676,13 @@ const st = {
676
676
  [l.PRICE_IS_STALE]: "Price is stale for asset {0}.",
677
677
  [l.ADDRESS_NOT_WHITELISTED]: "Address {0} not whitelisted for airdrop.",
678
678
  [l.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
679
- }, oe = (e, t) => {
680
- let n = st[e];
679
+ }, ie = (e, t) => {
680
+ let n = nt[e];
681
681
  for (let a = 0; a < t.length; a++)
682
682
  n = n.replace(`{${a}}`, t[a]);
683
683
  return t.length === 0 ? n.replace("{0}", "") : n;
684
684
  };
685
- let bn = class xe extends Error {
685
+ class Ce extends Error {
686
686
  constructor({
687
687
  status: t,
688
688
  revision: n,
@@ -697,15 +697,15 @@ let bn = class xe extends Error {
697
697
  },
698
698
  displayMessageParams: u
699
699
  }) {
700
- const c = r || oe(s, u || []) || "";
701
- super(c), v(this, "status"), v(this, "revision"), v(this, "type"), v(this, "module"), v(this, "code"), v(this, "message"), v(this, "display"), v(this, "stack"), v(this, "options"), v(this, "displayMessageParams"), this.status = t, this.revision = n || "NO_REVISION", this.module = a, this.message = c, this.display = oe(s, u || []), this.code = s, this.type = o || Ne.UNHANDLED_ERROR, this.options = {
700
+ const c = r || ie(s, u || []) || "";
701
+ super(c), S(this, "status"), S(this, "revision"), S(this, "type"), S(this, "module"), S(this, "code"), S(this, "message"), S(this, "display"), S(this, "stack"), S(this, "options"), S(this, "displayMessageParams"), this.status = t, this.revision = n || "NO_REVISION", this.module = a, this.message = c, this.display = ie(s, u || []), this.code = s, this.type = o || ve.UNHANDLED_ERROR, this.options = {
702
702
  shouldLog: p || !0,
703
703
  shouldTrace: y || !0,
704
704
  shouldThrow: d || !1
705
705
  }, this.displayMessageParams = u || [], this.options.shouldTrace && Error.captureStackTrace(this);
706
706
  }
707
707
  static fromErrorInfo(t) {
708
- return new xe(t);
708
+ return new Ce(t);
709
709
  }
710
710
  toErrorInfo() {
711
711
  return { ...this, identifier: this.identifier };
@@ -714,7 +714,7 @@ let bn = class xe extends Error {
714
714
  return `${this.revision}-${this.type || "NO_TYPE"}-${this.module}-${this.code}`;
715
715
  }
716
716
  get displayMessage() {
717
- return oe(this.code, this.displayMessageParams || []);
717
+ return ie(this.code, this.displayMessageParams || []);
718
718
  }
719
719
  handle() {
720
720
  const t = `[${this.identifier}]: ${this.message}`;
@@ -723,9 +723,9 @@ let bn = class xe extends Error {
723
723
  throw Error(t, { cause: this.stack });
724
724
  return this.toErrorInfo();
725
725
  }
726
- };
727
- var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), it = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(it || {}), rt = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.KUJI = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(rt || {});
728
- const wn = {
726
+ }
727
+ var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), at = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(at || {}), st = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.KUJI = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(st || {});
728
+ const fn = {
729
729
  ARB: [44, 60, 0, 0, 0],
730
730
  AVAX: [44, 60, 0, 0, 0],
731
731
  BCH: [44, 145, 0, 0, 0],
@@ -743,7 +743,7 @@ const wn = {
743
743
  THOR: [44, 931, 0, 0, 0]
744
744
  };
745
745
  var A = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(A || {});
746
- const ot = [
746
+ const it = [
747
747
  "ETH",
748
748
  "AVAX",
749
749
  "BSC",
@@ -751,18 +751,18 @@ const ot = [
751
751
  "OP",
752
752
  "MATIC"
753
753
  /* Polygon */
754
- ], An = [
754
+ ], bn = [
755
755
  "BTC",
756
756
  "BCH",
757
757
  "DOGE",
758
758
  "LTC"
759
759
  /* Litecoin */
760
- ], En = [
760
+ ], wn = [
761
761
  "GAIA",
762
762
  "THOR",
763
763
  "BNB"
764
764
  /* Binance */
765
- ], Rn = [
765
+ ], An = [
766
766
  "AVAX",
767
767
  "BNB",
768
768
  "BSC",
@@ -775,26 +775,26 @@ const ot = [
775
775
  "THOR"
776
776
  /* THORChain */
777
777
  ];
778
- var fe = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Cosmos = "cosmoshub-4", e.Dogecoin = "dogecoin", e.Kujira = "kaiyo-1", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.Maya = "mayachain-mainnet-v1", e.MayaStagenet = "mayachain-stagenet-v1", e.Optimism = "10", e.OptimismHex = "0xa", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(fe || {}), De = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(De || {}), W = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(W || {});
779
- const ie = Object.values(i), pt = Object.keys(i), be = ie.reduce(
778
+ var Te = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Cosmos = "cosmoshub-4", e.Dogecoin = "dogecoin", e.Kujira = "kaiyo-1", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.Maya = "mayachain-mainnet-v1", e.MayaStagenet = "mayachain-stagenet-v1", e.Optimism = "10", e.OptimismHex = "0xa", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(Te || {}), Me = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(Me || {}), F = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(F || {});
779
+ const ae = Object.values(i), rt = Object.keys(i), he = ae.reduce(
780
780
  (e, t) => {
781
- const n = pt.find((a) => i[a] === t);
781
+ const n = rt.find((a) => i[a] === t);
782
782
  return n && (e[t] = n), e;
783
783
  },
784
784
  {}
785
- ), dt = ie.reduce(
786
- (e, t) => (e[t] = fe[be[t]], e),
785
+ ), ot = ae.reduce(
786
+ (e, t) => (e[t] = Te[he[t]], e),
787
787
  {}
788
- ), ut = ie.reduce(
789
- (e, t) => (e[t] = De[be[t]], e),
788
+ ), pt = ae.reduce(
789
+ (e, t) => (e[t] = Me[he[t]], e),
790
790
  {}
791
- ), gn = ie.reduce(
791
+ ), En = ae.reduce(
792
792
  (e, t) => {
793
- const n = `${be[t]}Hex`;
794
- return e[t] = fe[n], e;
793
+ const n = `${he[t]}Hex`;
794
+ return e[t] = Te[n], e;
795
795
  },
796
796
  {}
797
- ), On = {
797
+ ), Rn = {
798
798
  "0xa4b1": "ARB",
799
799
  42161: "ARB",
800
800
  "0xa86a": "AVAX",
@@ -819,7 +819,7 @@ const ie = Object.values(i), pt = Object.keys(i), be = ie.reduce(
819
819
  "thorchain-stagenet-v2": "THOR",
820
820
  "thorchain-mainnet-v1": "THOR"
821
821
  /* THORChain */
822
- }, Pe = {
822
+ }, Ne = {
823
823
  ARB: "https://arbiscan.io",
824
824
  AVAX: "https://snowtrace.io",
825
825
  BSC: "https://bscscan.com",
@@ -836,17 +836,17 @@ const ie = Object.values(i), pt = Object.keys(i), be = ie.reduce(
836
836
  MATIC: "https://polygonscan.com",
837
837
  THOR: "https://viewblock.io/thorchain"
838
838
  };
839
- var lt = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(lt || {}), h = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(h || {}), F = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(F || {}), yt = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(yt || {}), ct = Object.defineProperty, mt = (e, t, n) => t in e ? ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, C = (e, t, n) => (mt(e, typeof t != "symbol" ? t + "" : t, n), n), Tt = (e, t, n) => {
839
+ var dt = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(dt || {}), h = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(h || {}), $ = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))($ || {}), ut = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(ut || {}), lt = Object.defineProperty, yt = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, v = (e, t, n) => (yt(e, typeof t != "symbol" ? t + "" : t, n), n), ct = (e, t, n) => {
840
840
  if (!t.has(e))
841
841
  throw TypeError("Cannot " + n);
842
- }, V = (e, t, n) => {
842
+ }, K = (e, t, n) => {
843
843
  if (t.has(e))
844
844
  throw TypeError("Cannot add the same private member more than once");
845
845
  t instanceof WeakSet ? t.add(e) : t.set(e, n);
846
- }, E = (e, t, n) => (Tt(e, t, "access private method"), n);
847
- const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
846
+ }, x = (e, t, n) => (ct(e, t, "access private method"), n);
847
+ const mt = "0x313ce567", xe = async ({ chain: e, to: t }) => {
848
848
  try {
849
- const { result: n } = await Ae.post(ut[e], {
849
+ const { result: n } = await fe.post(pt[e], {
850
850
  headers: {
851
851
  accept: "*/*",
852
852
  "content-type": "application/json",
@@ -856,37 +856,37 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
856
856
  id: 44,
857
857
  jsonrpc: "2.0",
858
858
  method: "eth_call",
859
- params: [{ to: t.toLowerCase(), data: ht }, "latest"]
859
+ params: [{ to: t.toLowerCase(), data: mt }, "latest"]
860
860
  })
861
861
  });
862
862
  return parseInt(BigInt(n).toString());
863
863
  } catch (n) {
864
864
  return console.error(n), A[e];
865
865
  }
866
- }, _t = async (e) => {
866
+ }, Tt = async (e) => {
867
867
  if (e === i.Ethereum)
868
868
  return A.ETH;
869
869
  const [, t] = e.split("-");
870
- return t != null && t.startsWith("0x") ? Be({ chain: i.Ethereum, to: t }) : A.ETH;
871
- }, ft = async (e) => {
870
+ return t != null && t.startsWith("0x") ? xe({ chain: i.Ethereum, to: t }) : A.ETH;
871
+ }, ht = async (e) => {
872
872
  const [, t] = e.split("-");
873
- return t != null && t.startsWith("0x") ? Be({ chain: i.Avalanche, to: t.toLowerCase() }) : A.AVAX;
874
- }, bt = async (e) => (e === i.BinanceSmartChain, A.BSC), wt = async ({ chain: e, symbol: t }) => {
873
+ return t != null && t.startsWith("0x") ? xe({ chain: i.Avalanche, to: t.toLowerCase() }) : A.AVAX;
874
+ }, _t = async (e) => (e === i.BinanceSmartChain, A.BSC), ft = async ({ chain: e, symbol: t }) => {
875
875
  switch (e) {
876
876
  case i.Ethereum:
877
- return _t(t);
877
+ return Tt(t);
878
878
  case i.Avalanche:
879
- return ft(t);
879
+ return ht(t);
880
880
  case i.BinanceSmartChain:
881
- return bt(t);
881
+ return _t(t);
882
882
  default:
883
883
  return A[e];
884
884
  }
885
- }, At = {
886
- [F.Average]: 1.2,
887
- [F.Fast]: 1.5,
888
- [F.Fastest]: 2
889
- }, Le = ({ chain: e, symbol: t }) => {
885
+ }, bt = {
886
+ [$.Average]: 1.2,
887
+ [$.Fast]: 1.5,
888
+ [$.Fastest]: 2
889
+ }, De = ({ chain: e, symbol: t }) => {
890
890
  switch (e) {
891
891
  case i.Bitcoin:
892
892
  case i.BitcoinCash:
@@ -912,7 +912,7 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
912
912
  case i.THORChain:
913
913
  return t === "RUNE";
914
914
  }
915
- }, Et = (e) => {
915
+ }, wt = (e) => {
916
916
  switch (e) {
917
917
  case "ETH.THOR":
918
918
  return { identifier: "ETH.THOR-0xa5f2211b9b8170f694421f2046281775e8468044", decimal: 18 };
@@ -941,7 +941,7 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
941
941
  case i.Ethereum:
942
942
  return { identifier: `${e}.${e}`, decimal: A[e] };
943
943
  }
944
- }, Rt = ({ chain: e, symbol: t }) => {
944
+ }, At = ({ chain: e, symbol: t }) => {
945
945
  if (t.includes("/"))
946
946
  return "Synth";
947
947
  switch (e) {
@@ -971,65 +971,65 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
971
971
  case i.Optimism:
972
972
  return [i.Ethereum, i.Optimism].includes(t) ? "Native" : "OPTIMISM";
973
973
  }
974
- }, In = (e) => {
974
+ }, gn = (e) => {
975
975
  var t;
976
976
  const [n, ...a] = e.split("."), s = e.includes("/"), r = a.join("."), o = (t = r == null ? void 0 : r.split("-")) == null ? void 0 : t[0];
977
977
  return { chain: n, symbol: r, ticker: o, synth: s };
978
- }, gt = new RegExp(
978
+ }, Et = new RegExp(
979
979
  /(.)\1{6}|\.ORG|\.NET|\.FINANCE|\.COM|WWW|HTTP|\\\\|\/\/|[\s$%:[\]]/,
980
980
  "gmi"
981
- ), Ot = (e) => {
981
+ ), Rt = (e) => {
982
982
  const [t, n] = e.split(".");
983
- if (!ot.includes(t))
983
+ if (!it.includes(t))
984
984
  return !0;
985
985
  const [, a] = n.split("-");
986
- return Le({ chain: t, symbol: n }) || !!a;
987
- }, Sn = (e) => e.filter((t) => {
986
+ return De({ chain: t, symbol: n }) || !!a;
987
+ }, On = (e) => e.filter((t) => {
988
988
  const n = `${t.chain}.${t.symbol}`;
989
- return !gt.test(n) && Ot(n) && t.value !== "0";
990
- }), It = ({
989
+ return !Et.test(n) && Rt(n) && t.value !== "0";
990
+ }), gt = ({
991
991
  liquidityUnits: e,
992
992
  poolUnits: t,
993
993
  runeDepth: n
994
994
  }) => {
995
- const a = g(e), s = g(t), r = g(n), o = a.mul(r), p = s.mul(s).mul(2), d = s.mul(a).mul(2), y = a.mul(a), u = s.mul(s).mul(s);
995
+ const a = R(e), s = R(t), r = R(n), o = a.mul(r), p = s.mul(s).mul(2), d = s.mul(a).mul(2), y = a.mul(a), u = s.mul(s).mul(s);
996
996
  return o.mul(p.sub(d).add(y)).div(u);
997
- }, St = ({
997
+ }, Ot = ({
998
998
  liquidityUnits: e,
999
999
  poolUnits: t,
1000
1000
  assetDepth: n
1001
1001
  }) => {
1002
- const a = g(e), s = g(t), r = g(n), o = a.mul(r), p = s.mul(s).mul(2), d = s.mul(a).mul(2), y = a.mul(a), u = o.mul(p.sub(d).add(y)), c = s.mul(s).mul(s);
1002
+ const a = R(e), s = R(t), r = R(n), o = a.mul(r), p = s.mul(s).mul(2), d = s.mul(a).mul(2), y = a.mul(a), u = o.mul(p.sub(d).add(y)), c = s.mul(s).mul(s);
1003
1003
  return u.div(c);
1004
- }, vn = ({
1004
+ }, In = ({
1005
1005
  percent: e,
1006
1006
  runeDepth: t,
1007
1007
  liquidityUnits: n,
1008
1008
  poolUnits: a
1009
- }) => It({ runeDepth: t, liquidityUnits: n, poolUnits: a }).mul(e), Cn = ({
1009
+ }) => gt({ runeDepth: t, liquidityUnits: n, poolUnits: a }).mul(e), Sn = ({
1010
1010
  percent: e,
1011
1011
  assetDepth: t,
1012
1012
  liquidityUnits: n,
1013
1013
  poolUnits: a
1014
- }) => St({ assetDepth: t, liquidityUnits: n, poolUnits: a }).mul(e), g = (e) => D.fromBigInt(BigInt(e), A.THOR), vt = ({
1014
+ }) => Ot({ assetDepth: t, liquidityUnits: n, poolUnits: a }).mul(e), R = (e) => D.fromBigInt(BigInt(e), A.THOR), It = ({
1015
1015
  liquidityUnits: e,
1016
1016
  poolUnits: t,
1017
1017
  runeDepth: n,
1018
1018
  assetDepth: a
1019
1019
  }) => ({
1020
- assetAmount: g(a).mul(e).div(t),
1021
- runeAmount: g(n).mul(e).div(t)
1022
- }), Mn = ({
1020
+ assetAmount: R(a).mul(e).div(t),
1021
+ runeAmount: R(n).mul(e).div(t)
1022
+ }), vn = ({
1023
1023
  liquidityUnits: e,
1024
1024
  poolUnits: t,
1025
1025
  runeDepth: n,
1026
1026
  assetDepth: a,
1027
1027
  percent: s
1028
1028
  }) => Object.fromEntries(
1029
- Object.entries(vt({ liquidityUnits: e, poolUnits: t, runeDepth: n, assetDepth: a })).map(
1029
+ Object.entries(It({ liquidityUnits: e, poolUnits: t, runeDepth: n, assetDepth: a })).map(
1030
1030
  ([r, o]) => [r, o.mul(s)]
1031
1031
  )
1032
- ), Nn = ({
1032
+ ), Cn = ({
1033
1033
  runeDepth: e,
1034
1034
  poolUnits: t,
1035
1035
  assetDepth: n,
@@ -1037,12 +1037,12 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
1037
1037
  runeAmount: s,
1038
1038
  assetAmount: r
1039
1039
  }) => {
1040
- const o = new D({ value: e, decimal: 8 }), p = new D({ value: n, decimal: 8 }), d = new D({ value: t, decimal: 8 }), y = new D({ value: s, decimal: 8 }), u = new D({ value: r, decimal: 8 }), c = y.mul(p), _ = u.mul(o), b = y.mul(u), w = o.mul(p), R = d.mul(c.add(_.add(b.mul(2)))), O = c.add(_.add(w.mul(2))), I = R.div(O), S = g(a).add(I);
1041
- if (I.getBaseValue("number") === 0)
1042
- return S.div(d).getBaseValue("number");
1043
- const P = d.add(S);
1044
- return S.div(P).getBaseValue("number");
1045
- }, xn = ({
1040
+ const o = new D({ value: e, decimal: 8 }), p = new D({ value: n, decimal: 8 }), d = new D({ value: t, decimal: 8 }), y = new D({ value: s, decimal: 8 }), u = new D({ value: r, decimal: 8 }), c = y.mul(p), _ = u.mul(o), b = y.mul(u), w = o.mul(p), E = d.mul(c.add(_.add(b.mul(2)))), g = c.add(_.add(w.mul(2))), O = E.div(g), I = R(a).add(O);
1041
+ if (O.getBaseValue("number") === 0)
1042
+ return I.div(d).getBaseValue("number");
1043
+ const P = d.add(I);
1044
+ return I.div(P).getBaseValue("number");
1045
+ }, Mn = ({
1046
1046
  runeAmount: e,
1047
1047
  assetAmount: t,
1048
1048
  runeDepth: n,
@@ -1050,13 +1050,13 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
1050
1050
  }) => {
1051
1051
  if (e === "0" || t === "0" || n === "0" || a === "0")
1052
1052
  return 0;
1053
- const s = g(n), r = g(a), o = g(t), p = g(e), d = o.mul(s).sub(r.mul(p)), y = r.mul(p).add(s.mul(r));
1053
+ const s = R(n), r = R(a), o = R(t), p = R(e), d = o.mul(s).sub(r.mul(p)), y = r.mul(p).add(s.mul(r));
1054
1054
  return Math.abs(d.div(y).getBaseValue("number"));
1055
- }, Ct = ({
1055
+ }, St = ({
1056
1056
  symbol: e,
1057
1057
  ticker: t,
1058
1058
  chain: n
1059
- }) => n === "ETH" && t !== "ETH" ? `${t}-${e.slice(-3)}` : e, x = (e, t) => {
1059
+ }) => n === "ETH" && t !== "ETH" ? `${t}-${e.slice(-3)}` : e, N = (e, t) => {
1060
1060
  switch (e) {
1061
1061
  case h.LEAVE:
1062
1062
  case h.BOND: {
@@ -1076,7 +1076,7 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
1076
1076
  return r ? `${e}:${n}/${a}::t:0` : `${e}:${n}.${a}:${s || ""}:t:0`;
1077
1077
  }
1078
1078
  case h.WITHDRAW: {
1079
- const { chain: n, ticker: a, symbol: s, basisPoints: r, targetAssetString: o, singleSide: p } = t, d = !p && o ? `:${o}` : "", y = Ct({ chain: n, symbol: s, ticker: a });
1079
+ const { chain: n, ticker: a, symbol: s, basisPoints: r, targetAssetString: o, singleSide: p } = t, d = !p && o ? `:${o}` : "", y = St({ chain: n, symbol: s, ticker: a });
1080
1080
  return `${e}:${n}${p ? "/" : "."}${y}:${r}${d}`;
1081
1081
  }
1082
1082
  case h.OPEN_LOAN:
@@ -1087,17 +1087,17 @@ const ht = "0x313ce567", Be = async ({ chain: e, to: t }) => {
1087
1087
  default:
1088
1088
  return "";
1089
1089
  }
1090
- }, Dn = (e) => {
1090
+ }, Nn = (e) => {
1091
1091
  if (e < 0)
1092
1092
  throw new Error("Invalid number of year");
1093
1093
  return 10 + e;
1094
- }, Pn = (e) => {
1094
+ }, xn = (e) => {
1095
1095
  if (e.length > 30)
1096
1096
  return !1;
1097
1097
  const t = /^[a-zA-Z0-9+_-]+$/g;
1098
1098
  return !!e.match(t);
1099
- }, Bn = ([e, t, n, a, s]) => `${e}'/${t}'/${n}'/${a}${typeof s != "number" ? "" : `/${s}`}`;
1100
- class Ee extends Error {
1099
+ }, Dn = ([e, t, n, a, s]) => `${e}'/${t}'/${n}'/${a}${typeof s != "number" ? "" : `/${s}`}`;
1100
+ class be extends Error {
1101
1101
  constructor(t, n, a) {
1102
1102
  const s = t.status || t.status === 0 ? t.status : "", r = t.statusText || "", o = `${s} ${r}`.trim(), p = o ? `status code ${o}` : "an unknown error";
1103
1103
  super(`Request failed with ${p}`), Object.defineProperty(this, "response", {
@@ -1118,7 +1118,7 @@ class Ee extends Error {
1118
1118
  }), this.name = "HTTPError", this.response = t, this.request = n, this.options = a;
1119
1119
  }
1120
1120
  }
1121
- class Ve extends Error {
1121
+ class Pe extends Error {
1122
1122
  constructor(t) {
1123
1123
  super("Request timed out"), Object.defineProperty(this, "request", {
1124
1124
  enumerable: !0,
@@ -1128,28 +1128,28 @@ class Ve extends Error {
1128
1128
  }), this.name = "TimeoutError", this.request = t;
1129
1129
  }
1130
1130
  }
1131
- const Q = (e) => e !== null && typeof e == "object", J = (...e) => {
1131
+ const X = (e) => e !== null && typeof e == "object", Y = (...e) => {
1132
1132
  for (const t of e)
1133
- if ((!Q(t) || Array.isArray(t)) && t !== void 0)
1133
+ if ((!X(t) || Array.isArray(t)) && t !== void 0)
1134
1134
  throw new TypeError("The `options` argument must be an object");
1135
- return we({}, ...e);
1136
- }, Ue = (e = {}, t = {}) => {
1135
+ return _e({}, ...e);
1136
+ }, Be = (e = {}, t = {}) => {
1137
1137
  const n = new globalThis.Headers(e), a = t instanceof globalThis.Headers, s = new globalThis.Headers(t);
1138
1138
  for (const [r, o] of s.entries())
1139
1139
  a && o === "undefined" || o === void 0 ? n.delete(r) : n.set(r, o);
1140
1140
  return n;
1141
- }, we = (...e) => {
1141
+ }, _e = (...e) => {
1142
1142
  let t = {}, n = {};
1143
1143
  for (const a of e)
1144
1144
  if (Array.isArray(a))
1145
1145
  Array.isArray(t) || (t = []), t = [...t, ...a];
1146
- else if (Q(a)) {
1146
+ else if (X(a)) {
1147
1147
  for (let [s, r] of Object.entries(a))
1148
- Q(r) && s in t && (r = we(t[s], r)), t = { ...t, [s]: r };
1149
- Q(a.headers) && (n = Ue(n, a.headers), t.headers = n);
1148
+ X(r) && s in t && (r = _e(t[s], r)), t = { ...t, [s]: r };
1149
+ X(a.headers) && (n = Be(n, a.headers), t.headers = n);
1150
1150
  }
1151
1151
  return t;
1152
- }, Mt = (() => {
1152
+ }, vt = (() => {
1153
1153
  let e = !1, t = !1;
1154
1154
  const n = typeof globalThis.ReadableStream == "function", a = typeof globalThis.Request == "function";
1155
1155
  return n && a && (t = new globalThis.Request("https://empty.invalid", {
@@ -1160,13 +1160,13 @@ const Q = (e) => e !== null && typeof e == "object", J = (...e) => {
1160
1160
  return e = !0, "half";
1161
1161
  }
1162
1162
  }).headers.has("Content-Type")), e && !t;
1163
- })(), Nt = typeof globalThis.AbortController == "function", xt = typeof globalThis.ReadableStream == "function", Dt = typeof globalThis.FormData == "function", He = ["get", "post", "put", "patch", "head", "delete"], Pt = {
1163
+ })(), Ct = typeof globalThis.AbortController == "function", Mt = typeof globalThis.ReadableStream == "function", Nt = typeof globalThis.FormData == "function", Le = ["get", "post", "put", "patch", "head", "delete"], xt = {
1164
1164
  json: "application/json",
1165
1165
  text: "text/*",
1166
1166
  formData: "multipart/form-data",
1167
1167
  arrayBuffer: "*/*",
1168
1168
  blob: "*/*"
1169
- }, pe = 2147483647, $e = Symbol("stop"), Bt = {
1169
+ }, re = 2147483647, Ve = Symbol("stop"), Dt = {
1170
1170
  json: !0,
1171
1171
  parseJson: !0,
1172
1172
  searchParams: !0,
@@ -1177,7 +1177,7 @@ const Q = (e) => e !== null && typeof e == "object", J = (...e) => {
1177
1177
  throwHttpErrors: !0,
1178
1178
  onDownloadProgress: !0,
1179
1179
  fetch: !0
1180
- }, Lt = {
1180
+ }, Pt = {
1181
1181
  method: !0,
1182
1182
  headers: !0,
1183
1183
  body: !0,
@@ -1193,18 +1193,18 @@ const Q = (e) => e !== null && typeof e == "object", J = (...e) => {
1193
1193
  window: !0,
1194
1194
  dispatcher: !0,
1195
1195
  duplex: !0
1196
- }, Vt = (e) => He.includes(e) ? e.toUpperCase() : e, Ut = ["get", "put", "head", "delete", "options", "trace"], Ht = [408, 413, 429, 500, 502, 503, 504], ke = [413, 429, 503], Re = {
1196
+ }, Bt = (e) => Le.includes(e) ? e.toUpperCase() : e, Lt = ["get", "put", "head", "delete", "options", "trace"], Vt = [408, 413, 429, 500, 502, 503, 504], Ue = [413, 429, 503], we = {
1197
1197
  limit: 2,
1198
- methods: Ut,
1199
- statusCodes: Ht,
1200
- afterStatusCodes: ke,
1198
+ methods: Lt,
1199
+ statusCodes: Vt,
1200
+ afterStatusCodes: Ue,
1201
1201
  maxRetryAfter: Number.POSITIVE_INFINITY,
1202
1202
  backoffLimit: Number.POSITIVE_INFINITY,
1203
1203
  delay: (e) => 0.3 * 2 ** (e - 1) * 1e3
1204
- }, $t = (e = {}) => {
1204
+ }, Ut = (e = {}) => {
1205
1205
  if (typeof e == "number")
1206
1206
  return {
1207
- ...Re,
1207
+ ...we,
1208
1208
  limit: e
1209
1209
  };
1210
1210
  if (e.methods && !Array.isArray(e.methods))
@@ -1212,22 +1212,22 @@ const Q = (e) => e !== null && typeof e == "object", J = (...e) => {
1212
1212
  if (e.statusCodes && !Array.isArray(e.statusCodes))
1213
1213
  throw new Error("retry.statusCodes must be an array");
1214
1214
  return {
1215
- ...Re,
1215
+ ...we,
1216
1216
  ...e,
1217
- afterStatusCodes: ke
1217
+ afterStatusCodes: Ue
1218
1218
  };
1219
1219
  };
1220
- async function kt(e, t, n, a) {
1220
+ async function Ht(e, t, n, a) {
1221
1221
  return new Promise((s, r) => {
1222
1222
  const o = setTimeout(() => {
1223
- n && n.abort(), r(new Ve(e));
1223
+ n && n.abort(), r(new Pe(e));
1224
1224
  }, a.timeout);
1225
1225
  a.fetch(e, t).then(s).catch(r).then(() => {
1226
1226
  clearTimeout(o);
1227
1227
  });
1228
1228
  });
1229
1229
  }
1230
- async function Ft(e, { signal: t }) {
1230
+ async function $t(e, { signal: t }) {
1231
1231
  return new Promise((n, a) => {
1232
1232
  t && (t.throwIfAborted(), t.addEventListener("abort", s, { once: !0 }));
1233
1233
  function s() {
@@ -1238,17 +1238,17 @@ async function Ft(e, { signal: t }) {
1238
1238
  }, e);
1239
1239
  });
1240
1240
  }
1241
- const Gt = (e, t) => {
1241
+ const kt = (e, t) => {
1242
1242
  const n = {};
1243
1243
  for (const a in t)
1244
- !(a in Lt) && !(a in Bt) && !(a in e) && (n[a] = t[a]);
1244
+ !(a in Pt) && !(a in Dt) && !(a in e) && (n[a] = t[a]);
1245
1245
  return n;
1246
1246
  };
1247
- class te {
1247
+ class Z {
1248
1248
  static create(t, n) {
1249
- const a = new te(t, n), s = async () => {
1250
- if (typeof a._options.timeout == "number" && a._options.timeout > pe)
1251
- throw new RangeError(`The \`timeout\` option cannot be greater than ${pe}`);
1249
+ const a = new Z(t, n), s = async () => {
1250
+ if (typeof a._options.timeout == "number" && a._options.timeout > re)
1251
+ throw new RangeError(`The \`timeout\` option cannot be greater than ${re}`);
1252
1252
  await Promise.resolve();
1253
1253
  let o = await a._fetch();
1254
1254
  for (const p of a._options.hooks.afterResponse) {
@@ -1256,7 +1256,7 @@ class te {
1256
1256
  d instanceof globalThis.Response && (o = d);
1257
1257
  }
1258
1258
  if (a._decorateResponse(o), !o.ok && a._options.throwHttpErrors) {
1259
- let p = new Ee(o, a.request, a._options);
1259
+ let p = new be(o, a.request, a._options);
1260
1260
  for (const d of a._options.hooks.beforeError)
1261
1261
  p = await d(p);
1262
1262
  throw p;
@@ -1264,13 +1264,13 @@ class te {
1264
1264
  if (a._options.onDownloadProgress) {
1265
1265
  if (typeof a._options.onDownloadProgress != "function")
1266
1266
  throw new TypeError("The `onDownloadProgress` option must be a function");
1267
- if (!xt)
1267
+ if (!Mt)
1268
1268
  throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
1269
1269
  return a._stream(o.clone(), a._options.onDownloadProgress);
1270
1270
  }
1271
1271
  return o;
1272
1272
  }, r = a._options.retry.methods.includes(a.request.method.toLowerCase()) ? a._retry(s) : s();
1273
- for (const [o, p] of Object.entries(Pt))
1273
+ for (const [o, p] of Object.entries(xt))
1274
1274
  r[o] = async () => {
1275
1275
  a.request.headers.set("accept", a.request.headers.get("accept") || p);
1276
1276
  const d = (await r).clone();
@@ -1315,17 +1315,17 @@ class te {
1315
1315
  // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208
1316
1316
  credentials: this._input.credentials || "same-origin",
1317
1317
  ...n,
1318
- headers: Ue(this._input.headers, n.headers),
1319
- hooks: we({
1318
+ headers: Be(this._input.headers, n.headers),
1319
+ hooks: _e({
1320
1320
  beforeRequest: [],
1321
1321
  beforeRetry: [],
1322
1322
  beforeError: [],
1323
1323
  afterResponse: []
1324
1324
  }, n.hooks),
1325
- method: Vt(n.method ?? this._input.method),
1325
+ method: Bt(n.method ?? this._input.method),
1326
1326
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1327
1327
  prefixUrl: String(n.prefixUrl || ""),
1328
- retry: $t(n.retry),
1328
+ retry: Ut(n.retry),
1329
1329
  throwHttpErrors: n.throwHttpErrors !== !1,
1330
1330
  timeout: n.timeout ?? 1e4,
1331
1331
  fetch: n.fetch ?? globalThis.fetch.bind(globalThis)
@@ -1336,7 +1336,7 @@ class te {
1336
1336
  throw new Error("`input` must not begin with a slash when using `prefixUrl`");
1337
1337
  this._options.prefixUrl.endsWith("/") || (this._options.prefixUrl += "/"), this._input = this._options.prefixUrl + this._input;
1338
1338
  }
1339
- if (Nt) {
1339
+ if (Ct) {
1340
1340
  if (this.abortController = new globalThis.AbortController(), this._options.signal) {
1341
1341
  const a = this._options.signal;
1342
1342
  this._options.signal.addEventListener("abort", () => {
@@ -1345,15 +1345,15 @@ class te {
1345
1345
  }
1346
1346
  this._options.signal = this.abortController.signal;
1347
1347
  }
1348
- if (Mt && (this._options.duplex = "half"), this.request = new globalThis.Request(this._input, this._options), this._options.searchParams) {
1348
+ if (vt && (this._options.duplex = "half"), this.request = new globalThis.Request(this._input, this._options), this._options.searchParams) {
1349
1349
  const a = "?" + (typeof this._options.searchParams == "string" ? this._options.searchParams.replace(/^\?/, "") : new URLSearchParams(this._options.searchParams).toString()), s = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, a);
1350
- (Dt && this._options.body instanceof globalThis.FormData || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers["content-type"]) && this.request.headers.delete("content-type"), this.request = new globalThis.Request(new globalThis.Request(s, { ...this.request }), this._options);
1350
+ (Nt && this._options.body instanceof globalThis.FormData || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers["content-type"]) && this.request.headers.delete("content-type"), this.request = new globalThis.Request(new globalThis.Request(s, { ...this.request }), this._options);
1351
1351
  }
1352
1352
  this._options.json !== void 0 && (this._options.body = JSON.stringify(this._options.json), this.request.headers.set("content-type", this._options.headers.get("content-type") ?? "application/json"), this.request = new globalThis.Request(this.request, { body: this._options.body }));
1353
1353
  }
1354
1354
  _calculateRetryDelay(t) {
1355
- if (this._retryCount++, this._retryCount < this._options.retry.limit && !(t instanceof Ve)) {
1356
- if (t instanceof Ee) {
1355
+ if (this._retryCount++, this._retryCount < this._options.retry.limit && !(t instanceof Pe)) {
1356
+ if (t instanceof be) {
1357
1357
  if (!this._options.retry.statusCodes.includes(t.response.status))
1358
1358
  return 0;
1359
1359
  const a = t.response.headers.get("Retry-After");
@@ -1376,16 +1376,16 @@ class te {
1376
1376
  try {
1377
1377
  return await t();
1378
1378
  } catch (n) {
1379
- const a = Math.min(this._calculateRetryDelay(n), pe);
1379
+ const a = Math.min(this._calculateRetryDelay(n), re);
1380
1380
  if (a !== 0 && this._retryCount > 0) {
1381
- await Ft(a, { signal: this._options.signal });
1381
+ await $t(a, { signal: this._options.signal });
1382
1382
  for (const s of this._options.hooks.beforeRetry)
1383
1383
  if (await s({
1384
1384
  request: this.request,
1385
1385
  options: this._options,
1386
1386
  error: n,
1387
1387
  retryCount: this._retryCount
1388
- }) === $e)
1388
+ }) === Ve)
1389
1389
  return;
1390
1390
  return this._retry(t);
1391
1391
  }
@@ -1402,8 +1402,8 @@ class te {
1402
1402
  if (a instanceof Response)
1403
1403
  return a;
1404
1404
  }
1405
- const t = Gt(this.request, this._options);
1406
- return this._options.timeout === !1 ? this._options.fetch(this.request.clone(), t) : kt(this.request.clone(), t, this.abortController, this._options);
1405
+ const t = kt(this.request, this._options);
1406
+ return this._options.timeout === !1 ? this._options.fetch(this.request.clone(), t) : Ht(this.request.clone(), t, this.abortController, this._options);
1407
1407
  }
1408
1408
  /* istanbul ignore next */
1409
1409
  _stream(t, n) {
@@ -1440,29 +1440,29 @@ class te {
1440
1440
  }
1441
1441
  }
1442
1442
  /*! MIT License © Sindre Sorhus */
1443
- const ue = (e) => {
1444
- const t = (n, a) => te.create(n, J(e, a));
1445
- for (const n of He)
1446
- t[n] = (a, s) => te.create(a, J(e, s, { method: n }));
1447
- return t.create = (n) => ue(J(n)), t.extend = (n) => ue(J(e, n)), t.stop = $e, t;
1448
- }, qt = ue(), Wt = qt, jt = typeof window < "u" ? {} : { referrer: "https://sk.thorswap.net", referer: "https://sk.thorswap.net" }, ge = Wt.create({ headers: jt }), Ae = {
1449
- get: (e, t) => ge.get(e, t).json(),
1450
- post: (e, t) => ge.post(e, t).json()
1451
- }, Oe = Object.values(i), Kt = (e = "") => {
1443
+ const pe = (e) => {
1444
+ const t = (n, a) => Z.create(n, Y(e, a));
1445
+ for (const n of Le)
1446
+ t[n] = (a, s) => Z.create(a, Y(e, s, { method: n }));
1447
+ return t.create = (n) => pe(Y(n)), t.extend = (n) => pe(Y(e, n)), t.stop = Ve, t;
1448
+ }, Ft = pe(), Gt = Ft, qt = typeof window < "u" ? {} : { referrer: "https://sk.thorswap.net", referer: "https://sk.thorswap.net" }, Ae = Gt.create({ headers: qt }), fe = {
1449
+ get: (e, t) => Ae.get(e, t).json(),
1450
+ post: (e, t) => Ae.post(e, t).json()
1451
+ }, Ee = Object.values(i), Wt = (e = "") => {
1452
1452
  const t = e.toUpperCase(), [n] = t.split(".");
1453
- if (Oe.includes(n))
1453
+ if (Ee.includes(n))
1454
1454
  return !0;
1455
1455
  const [a] = t.split("/");
1456
- if (Oe.includes(a))
1456
+ if (Ee.includes(a))
1457
1457
  return !0;
1458
1458
  throw new Error(
1459
1459
  `Invalid identifier: ${e}. Expected format: <Chain>.<Ticker> or <Chain>.<Ticker>-<ContractAddress>`
1460
1460
  );
1461
- }, j = 8, H = (e) => 10n ** BigInt(e), G = (e) => Math.log10(parseFloat(e.toString()));
1462
- function re({
1461
+ }, G = 8, U = (e) => 10n ** BigInt(e), k = (e) => Math.log10(parseFloat(e.toString()));
1462
+ function se({
1463
1463
  value: e,
1464
- bigIntDecimal: t = j,
1465
- decimal: n = j
1464
+ bigIntDecimal: t = G,
1465
+ decimal: n = G
1466
1466
  }) {
1467
1467
  const a = e < 0n;
1468
1468
  let s = e.toString().substring(a ? 1 : 0);
@@ -1475,19 +1475,19 @@ function re({
1475
1475
  ""
1476
1476
  );
1477
1477
  }
1478
- var U, k, z, le, ye, Ie, ne, ce, $, q, ae, me;
1479
- const Yt = class Fe {
1478
+ var V, H, J, de, ue, Re, ee, le;
1479
+ const jt = class He {
1480
1480
  constructor(t) {
1481
- V(this, U), V(this, z), V(this, ye), V(this, ne), V(this, $), V(this, ae), C(this, "decimalMultiplier", 10n ** 8n), C(this, "bigIntValue", 0n), C(this, "decimal");
1482
- const n = Z(t);
1483
- this.decimal = typeof t == "object" ? t.decimal : void 0, this.decimalMultiplier = H(
1484
- Math.max(E(this, ae, me).call(this, E(this, $, q).call(this, n)), this.decimal || 0)
1485
- ), E(this, z, le).call(this, n);
1481
+ K(this, V), K(this, J), K(this, ue), K(this, ee), v(this, "decimalMultiplier", 10n ** 8n), v(this, "bigIntValue", 0n), v(this, "decimal");
1482
+ const n = Q(t);
1483
+ this.decimal = typeof t == "object" ? t.decimal : void 0, this.decimalMultiplier = U(
1484
+ Math.max($e(te(n)), this.decimal || 0)
1485
+ ), x(this, J, de).call(this, n);
1486
1486
  }
1487
1487
  static fromBigInt(t, n) {
1488
- return new Fe({
1488
+ return new He({
1489
1489
  decimal: n,
1490
- value: re({ value: t, bigIntDecimal: n, decimal: n })
1490
+ value: se({ value: t, bigIntDecimal: n, decimal: n })
1491
1491
  });
1492
1492
  }
1493
1493
  static shiftDecimals({
@@ -1496,24 +1496,24 @@ const Yt = class Fe {
1496
1496
  to: a
1497
1497
  }) {
1498
1498
  return this.fromBigInt(
1499
- t.getBaseValue("bigint") * H(a) / H(n),
1499
+ t.getBaseValue("bigint") * U(a) / U(n),
1500
1500
  a
1501
1501
  );
1502
1502
  }
1503
1503
  set(t) {
1504
- return E(this, z, le).call(this, Z(t)), this;
1504
+ return x(this, J, de).call(this, Q(t)), this;
1505
1505
  }
1506
1506
  add(...t) {
1507
- return E(this, U, k).call(this, "add", ...t);
1507
+ return x(this, V, H).call(this, "add", ...t);
1508
1508
  }
1509
1509
  sub(...t) {
1510
- return E(this, U, k).call(this, "sub", ...t);
1510
+ return x(this, V, H).call(this, "sub", ...t);
1511
1511
  }
1512
1512
  mul(...t) {
1513
- return E(this, U, k).call(this, "mul", ...t);
1513
+ return x(this, V, H).call(this, "mul", ...t);
1514
1514
  }
1515
1515
  div(...t) {
1516
- return E(this, U, k).call(this, "div", ...t);
1516
+ return x(this, V, H).call(this, "div", ...t);
1517
1517
  }
1518
1518
  gt(t) {
1519
1519
  return this.bigIntValue > this.getBigIntValue(t);
@@ -1533,7 +1533,7 @@ const Yt = class Fe {
1533
1533
  getValue(t) {
1534
1534
  const n = this.formatBigIntToSafeValue(
1535
1535
  this.bigIntValue,
1536
- this.decimal || G(this.decimalMultiplier)
1536
+ this.decimal || k(this.decimalMultiplier)
1537
1537
  );
1538
1538
  switch (t) {
1539
1539
  case "number":
@@ -1545,7 +1545,7 @@ const Yt = class Fe {
1545
1545
  }
1546
1546
  }
1547
1547
  getBaseValue(t) {
1548
- const n = this.decimalMultiplier / H(this.decimal || A.THOR), a = this.bigIntValue / n;
1548
+ const n = this.decimalMultiplier / U(this.decimal || A.THOR), a = this.bigIntValue / n;
1549
1549
  switch (t) {
1550
1550
  case "number":
1551
1551
  return Number(a);
@@ -1558,13 +1558,13 @@ const Yt = class Fe {
1558
1558
  getBigIntValue(t, n) {
1559
1559
  if (!n && typeof t == "object")
1560
1560
  return t.bigIntValue;
1561
- const a = Z(t), s = E(this, $, q).call(this, a);
1562
- return s === "0" || s === "undefined" ? 0n : E(this, ne, ce).call(this, s, n);
1561
+ const a = Q(t), s = te(a);
1562
+ return s === "0" || s === "undefined" ? 0n : x(this, ee, le).call(this, s, n);
1563
1563
  }
1564
1564
  formatBigIntToSafeValue(t, n) {
1565
- const a = n || this.decimal || j, s = Math.max(
1565
+ const a = n || this.decimal || G, s = Math.max(
1566
1566
  a,
1567
- G(this.decimalMultiplier)
1567
+ k(this.decimalMultiplier)
1568
1568
  ), r = t < 0n, o = t.toString().substring(r ? 1 : 0), p = s - (o.length - 1), d = p > 0 ? "0".repeat(p) + o : o, y = d.length - s;
1569
1569
  let u = d.slice(-s);
1570
1570
  return parseInt(u[a]) >= 5 ? u = `${u.substring(0, a - 1)}${(parseInt(u[a - 1]) + 1).toString()}` : u = u.substring(0, a), `${r ? "-" : ""}${d.slice(
@@ -1616,8 +1616,8 @@ const Yt = class Fe {
1616
1616
  return `${n === "start" ? t : ""}${u}${n === "end" ? t : ""}`;
1617
1617
  }
1618
1618
  };
1619
- U = /* @__PURE__ */ new WeakSet(), k = function(e, ...t) {
1620
- const n = E(this, ye, Ie).call(this, this, ...t), a = H(n), s = t.reduce(
1619
+ V = /* @__PURE__ */ new WeakSet(), H = function(e, ...t) {
1620
+ const n = x(this, ue, Re).call(this, this, ...t), a = U(n), s = t.reduce(
1621
1621
  (o, p) => {
1622
1622
  const d = this.getBigIntValue(p, n);
1623
1623
  switch (e) {
@@ -1638,59 +1638,62 @@ U = /* @__PURE__ */ new WeakSet(), k = function(e, ...t) {
1638
1638
  },
1639
1639
  //normalize is to precision multiplier base
1640
1640
  this.bigIntValue * a / this.decimalMultiplier
1641
- ), r = re({
1641
+ ), r = se({
1642
1642
  bigIntDecimal: n,
1643
- decimal: Math.max(n, G(this.decimalMultiplier)),
1643
+ decimal: Math.max(n, k(this.decimalMultiplier)),
1644
1644
  value: s
1645
1645
  });
1646
1646
  return new this.constructor({ decimal: this.decimal, value: r, identifier: this.toString() });
1647
- }, z = /* @__PURE__ */ new WeakSet(), le = function(e) {
1648
- const t = E(this, $, q).call(this, e) || "0";
1649
- this.bigIntValue = E(this, ne, ce).call(this, t);
1650
- }, ye = /* @__PURE__ */ new WeakSet(), Ie = function(...e) {
1647
+ }, J = /* @__PURE__ */ new WeakSet(), de = function(e) {
1648
+ const t = te(e) || "0";
1649
+ this.bigIntValue = x(this, ee, le).call(this, t);
1650
+ }, ue = /* @__PURE__ */ new WeakSet(), Re = function(...e) {
1651
1651
  const t = e.map(
1652
- (n) => typeof n == "object" ? n.decimal || G(n.decimalMultiplier) : E(this, ae, me).call(this, E(this, $, q).call(this, n))
1652
+ (n) => typeof n == "object" ? n.decimal || k(n.decimalMultiplier) : $e(te(n))
1653
1653
  ).filter(Boolean);
1654
- return Math.max(...t, j);
1655
- }, ne = /* @__PURE__ */ new WeakSet(), ce = function(e, t) {
1656
- const n = t ? H(t) : this.decimalMultiplier, a = G(n), [s = "", r = ""] = e.split(".");
1654
+ return Math.max(...t, G);
1655
+ }, ee = /* @__PURE__ */ new WeakSet(), le = function(e, t) {
1656
+ const n = t ? U(t) : this.decimalMultiplier, a = k(n), [s = "", r = ""] = e.split(".");
1657
1657
  return BigInt(`${s}${r.padEnd(a, "0")}`);
1658
- }, $ = /* @__PURE__ */ new WeakSet(), q = function(e) {
1659
- const t = `${typeof e == "number" ? Number(e).toLocaleString("fullwide", {
1660
- useGrouping: !1,
1661
- maximumFractionDigits: 20
1662
- }) : Z(e)}`.replaceAll(",", ".").split(".");
1658
+ };
1659
+ let ye = jt;
1660
+ const Kt = Intl.NumberFormat("fullwide", {
1661
+ useGrouping: !1,
1662
+ maximumFractionDigits: 20
1663
+ });
1664
+ function te(e) {
1665
+ const t = `${typeof e == "number" ? Kt.format(e) : Q(e)}`.replaceAll(",", ".").split(".");
1663
1666
  return t.length > 1 ? `${t.slice(0, -1).join("")}.${t.at(-1)}` : t[0];
1664
- }, ae = /* @__PURE__ */ new WeakSet(), me = function(e) {
1667
+ }
1668
+ function $e(e) {
1665
1669
  var t;
1666
1670
  const n = ((t = e.split(".")[1]) == null ? void 0 : t.length) || 0;
1667
- return Math.max(n, j);
1668
- };
1669
- let Te = Yt;
1670
- function Z(e) {
1671
+ return Math.max(n, G);
1672
+ }
1673
+ function Q(e) {
1671
1674
  return typeof e == "object" ? "getValue" in e ? e.getValue("string") : e.value : e;
1672
1675
  }
1673
- const ee = (e, t) => typeof e == "bigint" ? re({ value: e, bigIntDecimal: t, decimal: t }) : e;
1674
- let he;
1675
- const Se = (e) => {
1676
- if (!he)
1676
+ const z = (e, t) => typeof e == "bigint" ? se({ value: e, bigIntDecimal: t, decimal: t }) : e;
1677
+ let ce;
1678
+ const ge = (e) => {
1679
+ if (!ce)
1677
1680
  throw new Error("Static assets not loaded, call await AssetValue.loadStaticAssets() first");
1678
- return he.get(e.toUpperCase()) || { decimal: A.THOR, identifier: "" };
1679
- }, ve = async (e, t = 0) => {
1680
- Kt(e);
1681
- const n = await wt(_e(e)), a = ee(t, n);
1682
- return new N({ decimal: n, value: a, identifier: e });
1683
- }, Ce = /* @__PURE__ */ new Map();
1684
- class N extends Te {
1681
+ return ce.get(e.toUpperCase()) || { decimal: A.THOR, identifier: "" };
1682
+ }, Oe = async (e, t = 0) => {
1683
+ Wt(e);
1684
+ const n = await ft(me(e)), a = z(t, n);
1685
+ return new M({ decimal: n, value: a, identifier: e });
1686
+ }, Ie = /* @__PURE__ */ new Map();
1687
+ class M extends ye {
1685
1688
  constructor(t) {
1686
- const n = "identifier" in t ? t.identifier : `${t.chain}.${t.symbol}`, a = Ce.get(n);
1689
+ const n = "identifier" in t ? t.identifier : `${t.chain}.${t.symbol}`, a = Ie.get(n);
1687
1690
  if (a)
1688
1691
  return a.set(t.value);
1689
1692
  super(
1690
- t.value instanceof Te ? t.value : { decimal: t.decimal, value: t.value }
1691
- ), C(this, "address"), C(this, "isSynthetic", !1), C(this, "isGasAsset", !1), C(this, "chain"), C(this, "symbol"), C(this, "ticker"), C(this, "type");
1692
- const s = _e(n);
1693
- this.type = Rt(s), this.chain = s.chain, this.ticker = s.ticker, this.symbol = s.symbol, this.address = s.address, this.isSynthetic = s.isSynthetic, this.isGasAsset = s.isGasAsset, Ce.set(n, this);
1693
+ t.value instanceof ye ? t.value : { decimal: t.decimal, value: t.value }
1694
+ ), v(this, "address"), v(this, "isSynthetic", !1), v(this, "isGasAsset", !1), v(this, "chain"), v(this, "symbol"), v(this, "ticker"), v(this, "type");
1695
+ const s = me(n);
1696
+ this.type = At(s), this.chain = s.chain, this.ticker = s.ticker, this.symbol = s.symbol, this.address = s.address, this.isSynthetic = s.isSynthetic, this.isGasAsset = s.isGasAsset, Ie.set(n, this);
1694
1697
  }
1695
1698
  toString(t = !1) {
1696
1699
  const n = this.isSynthetic ? this.symbol.split("-")[0] : this.ticker;
@@ -1703,24 +1706,24 @@ class N extends Te {
1703
1706
  return this.chain === t && this.symbol === n;
1704
1707
  }
1705
1708
  static async fromString(t, n = 0) {
1706
- return ve(t, n);
1709
+ return Oe(t, n);
1707
1710
  }
1708
1711
  static fromStringSync(t, n = 0) {
1709
- const { isSynthetic: a } = _e(t), { decimal: s, identifier: r } = Se(
1712
+ const { isSynthetic: a } = me(t), { decimal: s, identifier: r } = ge(
1710
1713
  t
1711
- ), o = ee(n, s);
1712
- return r ? new N({ decimal: s, identifier: r, value: o }) : a ? new N({ decimal: 8, identifier: t, value: o }) : void 0;
1714
+ ), o = z(n, s);
1715
+ return r ? new M({ decimal: s, identifier: r, value: o }) : a ? new M({ decimal: 8, identifier: t, value: o }) : void 0;
1713
1716
  }
1714
1717
  static async fromIdentifier(t, n = 0) {
1715
- return ve(t, n);
1718
+ return Oe(t, n);
1716
1719
  }
1717
1720
  static fromIdentifierSync(t, n = 0) {
1718
- const { decimal: a, identifier: s } = Se(t), r = ee(n, a);
1719
- return new N({ decimal: a, identifier: s, value: r });
1721
+ const { decimal: a, identifier: s } = ge(t), r = z(n, a);
1722
+ return new M({ decimal: a, identifier: s, value: r });
1720
1723
  }
1721
1724
  static fromChainOrSignature(t, n = 0) {
1722
- const { decimal: a, identifier: s } = Et(t), r = ee(n, a);
1723
- return new N({ value: r, decimal: a, identifier: s });
1725
+ const { decimal: a, identifier: s } = wt(t), r = z(n, a);
1726
+ return new M({ value: r, decimal: a, identifier: s });
1724
1727
  }
1725
1728
  static async loadStaticAssets() {
1726
1729
  return new Promise(
@@ -1733,7 +1736,7 @@ class N extends Te {
1733
1736
  NativeList: s,
1734
1737
  ...r
1735
1738
  } = await import("@swapkit/tokens");
1736
- he = [s, ...Object.values(r)].reduce(
1739
+ ce = [s, ...Object.values(r)].reduce(
1737
1740
  (o, { tokens: p }) => (p.forEach(({ identifier: d, chain: y, ...u }) => {
1738
1741
  const c = "decimals" in u ? u.decimals : A[y];
1739
1742
  o.set(d, { identifier: d, decimal: c });
@@ -1751,8 +1754,8 @@ class N extends Te {
1751
1754
  );
1752
1755
  }
1753
1756
  }
1754
- const de = (e) => {
1755
- const t = N.fromChainOrSignature(e);
1757
+ const oe = (e) => {
1758
+ const t = M.fromChainOrSignature(e);
1756
1759
  switch (e) {
1757
1760
  case i.Bitcoin:
1758
1761
  case i.Litecoin:
@@ -1769,17 +1772,17 @@ const de = (e) => {
1769
1772
  default:
1770
1773
  return t.set(1e-8);
1771
1774
  }
1772
- }, _e = (e) => {
1775
+ }, me = (e) => {
1773
1776
  const t = e.slice(0, 14).includes("/"), [n, a] = e.split(".").pop().split("/"), s = e.includes(".") && !t ? e : `${i.THORChain}.${a}`, [r, o] = s.split("."), [p, d] = (t ? a : o).split("-");
1774
1777
  return {
1775
1778
  address: d == null ? void 0 : d.toLowerCase(),
1776
1779
  chain: r,
1777
- isGasAsset: Le({ chain: r, symbol: o }),
1780
+ isGasAsset: De({ chain: r, symbol: o }),
1778
1781
  isSynthetic: t,
1779
1782
  symbol: (t ? `${n}/` : "") + (d ? `${p}-${(d == null ? void 0 : d.toLowerCase()) ?? ""}` : o),
1780
1783
  ticker: p
1781
1784
  };
1782
- }, Xt = {
1785
+ }, Yt = {
1783
1786
  /**
1784
1787
  * Core
1785
1788
  */
@@ -1838,21 +1841,21 @@ const de = (e) => {
1838
1841
  };
1839
1842
  class m extends Error {
1840
1843
  constructor(t, n) {
1841
- console.error(n), super(t, { cause: { code: Xt[t], message: t } }), Object.setPrototypeOf(this, m.prototype);
1844
+ console.error(n), super(t, { cause: { code: Yt[t], message: t } }), Object.setPrototypeOf(this, m.prototype);
1842
1845
  }
1843
1846
  }
1844
- class D extends Te {
1847
+ class D extends ye {
1845
1848
  eq(t) {
1846
1849
  return this.eqValue(t);
1847
1850
  }
1848
1851
  static fromBigInt(t, n) {
1849
1852
  return new D({
1850
1853
  decimal: n,
1851
- value: re({ value: t, bigIntDecimal: n, decimal: n })
1854
+ value: se({ value: t, bigIntDecimal: n, decimal: n })
1852
1855
  });
1853
1856
  }
1854
1857
  }
1855
- const Jt = [
1858
+ const Xt = [
1856
1859
  {
1857
1860
  inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
1858
1861
  stateMutability: "nonpayable",
@@ -1943,7 +1946,7 @@ const Jt = [
1943
1946
  type: "function"
1944
1947
  },
1945
1948
  { stateMutability: "payable", type: "receive" }
1946
- ], Qt = [
1949
+ ], Jt = [
1947
1950
  {
1948
1951
  inputs: [
1949
1952
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2087,7 +2090,7 @@ const Jt = [
2087
2090
  type: "function"
2088
2091
  },
2089
2092
  { stateMutability: "payable", type: "receive" }
2090
- ], zt = [
2093
+ ], Qt = [
2091
2094
  {
2092
2095
  inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
2093
2096
  stateMutability: "nonpayable",
@@ -2192,7 +2195,7 @@ const Jt = [
2192
2195
  type: "function"
2193
2196
  },
2194
2197
  { stateMutability: "payable", type: "receive" }
2195
- ], Zt = [
2198
+ ], zt = [
2196
2199
  {
2197
2200
  inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
2198
2201
  stateMutability: "nonpayable",
@@ -2283,7 +2286,7 @@ const Jt = [
2283
2286
  type: "function"
2284
2287
  },
2285
2288
  { stateMutability: "payable", type: "receive" }
2286
- ], en = [
2289
+ ], Zt = [
2287
2290
  {
2288
2291
  inputs: [
2289
2292
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2427,7 +2430,7 @@ const Jt = [
2427
2430
  type: "function"
2428
2431
  },
2429
2432
  { stateMutability: "payable", type: "receive" }
2430
- ], tn = [
2433
+ ], en = [
2431
2434
  {
2432
2435
  inputs: [
2433
2436
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2546,7 +2549,7 @@ const Jt = [
2546
2549
  type: "function"
2547
2550
  },
2548
2551
  { stateMutability: "payable", type: "receive" }
2549
- ], nn = [
2552
+ ], tn = [
2550
2553
  {
2551
2554
  inputs: [
2552
2555
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2665,7 +2668,7 @@ const Jt = [
2665
2668
  type: "function"
2666
2669
  },
2667
2670
  { stateMutability: "payable", type: "receive" }
2668
- ], an = [
2671
+ ], nn = [
2669
2672
  {
2670
2673
  inputs: [
2671
2674
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2784,7 +2787,7 @@ const Jt = [
2784
2787
  type: "function"
2785
2788
  },
2786
2789
  { stateMutability: "payable", type: "receive" }
2787
- ], sn = [
2790
+ ], an = [
2788
2791
  {
2789
2792
  inputs: [
2790
2793
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2903,7 +2906,7 @@ const Jt = [
2903
2906
  type: "function"
2904
2907
  },
2905
2908
  { stateMutability: "payable", type: "receive" }
2906
- ], rn = [
2909
+ ], sn = [
2907
2910
  {
2908
2911
  inputs: [
2909
2912
  { internalType: "address", name: "_ttp", type: "address" },
@@ -3030,7 +3033,7 @@ const Jt = [
3030
3033
  type: "function"
3031
3034
  },
3032
3035
  { stateMutability: "payable", type: "receive" }
3033
- ], on = [
3036
+ ], rn = [
3034
3037
  {
3035
3038
  inputs: [
3036
3039
  { internalType: "address", name: "_ttp", type: "address" },
@@ -3157,7 +3160,7 @@ const Jt = [
3157
3160
  type: "function"
3158
3161
  },
3159
3162
  { stateMutability: "payable", type: "receive" }
3160
- ], pn = [
3163
+ ], on = [
3161
3164
  {
3162
3165
  inputs: [
3163
3166
  { internalType: "address", name: "_ttp", type: "address" },
@@ -3284,7 +3287,7 @@ const Jt = [
3284
3287
  type: "function"
3285
3288
  },
3286
3289
  { stateMutability: "payable", type: "receive" }
3287
- ], dn = [
3290
+ ], pn = [
3288
3291
  {
3289
3292
  inputs: [
3290
3293
  { internalType: "address", name: "_ttp", type: "address" },
@@ -3411,7 +3414,7 @@ const Jt = [
3411
3414
  type: "function"
3412
3415
  },
3413
3416
  { stateMutability: "payable", type: "receive" }
3414
- ], un = [
3417
+ ], dn = [
3415
3418
  {
3416
3419
  inputs: [
3417
3420
  { internalType: "address", name: "_ttp", type: "address" },
@@ -3538,27 +3541,27 @@ const Jt = [
3538
3541
  type: "function"
3539
3542
  },
3540
3543
  { stateMutability: "payable", type: "receive" }
3541
- ], Ge = {
3542
- ["0x7C38b8B2efF28511ECc14a621e263857Fb5771d3".toLowerCase()]: Jt,
3543
- ["0xB6fA6f1DcD686F4A573Fd243a6FABb4ba36Ba98c".toLowerCase()]: zt,
3544
- ["0xd31f7e39afECEc4855fecc51b693F9A0Cec49fd2".toLowerCase()]: Zt
3545
- }, ln = {
3546
- ...Ge,
3544
+ ], ke = {
3545
+ ["0x7C38b8B2efF28511ECc14a621e263857Fb5771d3".toLowerCase()]: Xt,
3546
+ ["0xB6fA6f1DcD686F4A573Fd243a6FABb4ba36Ba98c".toLowerCase()]: Qt,
3547
+ ["0xd31f7e39afECEc4855fecc51b693F9A0Cec49fd2".toLowerCase()]: zt
3548
+ }, un = {
3549
+ ...ke,
3547
3550
  // AVAX
3548
- ["0x942c6dA485FD6cEf255853ef83a149d43A73F18a".toLowerCase()]: tn,
3549
- ["0x5505BE604dFA8A1ad402A71f8A357fba47F9bf5a".toLowerCase()]: Qt,
3550
- ["0x3b7DbdD635B99cEa39D3d95Dbd0217F05e55B212".toLowerCase()]: an,
3551
+ ["0x942c6dA485FD6cEf255853ef83a149d43A73F18a".toLowerCase()]: en,
3552
+ ["0x5505BE604dFA8A1ad402A71f8A357fba47F9bf5a".toLowerCase()]: Jt,
3553
+ ["0x3b7DbdD635B99cEa39D3d95Dbd0217F05e55B212".toLowerCase()]: nn,
3551
3554
  // BSC
3552
- ["0x30912B38618D3D37De3191A4FFE982C65a9aEC2E".toLowerCase()]: en,
3555
+ ["0x30912B38618D3D37De3191A4FFE982C65a9aEC2E".toLowerCase()]: Zt,
3553
3556
  // ETH
3554
- ["0xbf365e79aA44A2164DA135100C57FDB6635ae870".toLowerCase()]: nn,
3555
- ["0x86904Eb2b3c743400D03f929F2246EfA80B91215".toLowerCase()]: sn,
3556
- ["0x3660dE6C56cFD31998397652941ECe42118375DA".toLowerCase()]: rn,
3557
- ["0xBd68cBe6c247e2c3a0e36B8F0e24964914f26Ee8".toLowerCase()]: on,
3558
- ["0xe4ddca21881bac219af7f217703db0475d2a9f02".toLowerCase()]: pn,
3559
- ["0x11733abf0cdb43298f7e949c930188451a9a9ef2".toLowerCase()]: dn,
3560
- ["0xb33874810e5395eb49d8bd7e912631db115d5a03".toLowerCase()]: un
3561
- }, yn = ({
3557
+ ["0xbf365e79aA44A2164DA135100C57FDB6635ae870".toLowerCase()]: tn,
3558
+ ["0x86904Eb2b3c743400D03f929F2246EfA80B91215".toLowerCase()]: an,
3559
+ ["0x3660dE6C56cFD31998397652941ECe42118375DA".toLowerCase()]: sn,
3560
+ ["0xBd68cBe6c247e2c3a0e36B8F0e24964914f26Ee8".toLowerCase()]: rn,
3561
+ ["0xe4ddca21881bac219af7f217703db0475d2a9f02".toLowerCase()]: on,
3562
+ ["0x11733abf0cdb43298f7e949c930188451a9a9ef2".toLowerCase()]: pn,
3563
+ ["0xb33874810e5395eb49d8bd7e912631db115d5a03".toLowerCase()]: dn
3564
+ }, ln = ({
3562
3565
  streamSwap: e,
3563
3566
  contractAddress: t,
3564
3567
  recipient: n,
@@ -3575,32 +3578,32 @@ const Jt = [
3575
3578
  tcRouter: _,
3576
3579
  tcVault: b,
3577
3580
  vault: w,
3578
- token: R
3581
+ token: E
3579
3582
  }
3580
3583
  }) => {
3581
- const O = !!Ge[t.toLowerCase()];
3582
- if (O && !y)
3584
+ const g = !!ke[t.toLowerCase()];
3585
+ if (g && !y)
3583
3586
  throw new Error("Router is required on calldata for swapIn with GenericContract");
3584
- const I = c || d, S = e && u || I;
3587
+ const O = c || d, I = e && u || O;
3585
3588
  if (!b && !w)
3586
3589
  throw new Error("TC Vault is required on calldata");
3587
3590
  if (!_ && !y)
3588
3591
  throw new Error("TC Router is required on calldata");
3589
- if (!S)
3592
+ if (!I)
3590
3593
  throw new Error("TC Memo is required on calldata");
3591
- if (!R)
3594
+ if (!E)
3592
3595
  throw new Error("Token is required on calldata");
3593
3596
  const P = [
3594
3597
  // v2 contracts don't have tcVault, tcRouter, tcMemo but vault, router, memo
3595
3598
  a(_ || y),
3596
3599
  a(b || w),
3597
- S.replace("{recipientAddress}", n),
3598
- a(R),
3600
+ I.replace("{recipientAddress}", n),
3601
+ a(E),
3599
3602
  s
3600
- ], qe = O ? [a(y), o, p] : [r, p];
3601
- return [...P, ...qe];
3602
- }, cn = ({ chain: e, txHash: t }) => {
3603
- const n = Pe[e];
3603
+ ], Fe = g ? [a(y), o, p] : [r, p];
3604
+ return [...P, ...Fe];
3605
+ }, yn = ({ chain: e, txHash: t }) => {
3606
+ const n = Ne[e];
3604
3607
  switch (e) {
3605
3608
  case i.Binance:
3606
3609
  case i.Bitcoin:
@@ -3625,8 +3628,8 @@ const Jt = [
3625
3628
  default:
3626
3629
  throw new Error(`Unsupported chain: ${e}`);
3627
3630
  }
3628
- }, mn = ({ chain: e, address: t }) => {
3629
- const n = Pe[e];
3631
+ }, cn = ({ chain: e, address: t }) => {
3632
+ const n = Ne[e];
3630
3633
  switch (e) {
3631
3634
  case i.Arbitrum:
3632
3635
  case i.Avalanche:
@@ -3649,29 +3652,29 @@ const Jt = [
3649
3652
  default:
3650
3653
  throw new Error(`Unsupported chain: ${e}`);
3651
3654
  }
3655
+ }, mn = (e) => {
3656
+ const t = e ? F.ThornodeStagenet : F.ThornodeMainnet;
3657
+ return fe.get(`${t}/thorchain/inbound_addresses`);
3652
3658
  }, Tn = (e) => {
3653
- const t = e ? W.ThornodeStagenet : W.ThornodeMainnet;
3654
- return Ae.get(`${t}/thorchain/inbound_addresses`);
3655
- }, hn = (e) => {
3656
- const t = e ? W.ThornodeStagenet : W.ThornodeMainnet;
3657
- return Ae.get(`${t}/thorchain/mimir`);
3658
- }, Me = () => Object.values(i).reduce(
3659
+ const t = e ? F.ThornodeStagenet : F.ThornodeMainnet;
3660
+ return fe.get(`${t}/thorchain/mimir`);
3661
+ }, Se = () => Object.values(i).reduce(
3659
3662
  (e, t) => (e[t] = null, e),
3660
3663
  {}
3661
3664
  );
3662
- var L, se, K, M, Y, X;
3663
- class Ln {
3665
+ var L, ne, q, C, W, j;
3666
+ class Pn {
3664
3667
  constructor({ stagenet: t } = {}) {
3665
- T(this, "connectedChains", Me());
3666
- T(this, "connectedWallets", Me());
3668
+ T(this, "connectedChains", Se());
3669
+ T(this, "connectedWallets", Se());
3667
3670
  T(this, "stagenet", !1);
3668
3671
  T(this, "getAddress", (t) => {
3669
3672
  var n;
3670
3673
  return ((n = this.connectedChains[t]) == null ? void 0 : n.address) || "";
3671
3674
  });
3672
- T(this, "getExplorerTxUrl", (t, n) => cn({ chain: t, txHash: n }));
3675
+ T(this, "getExplorerTxUrl", (t, n) => yn({ chain: t, txHash: n }));
3673
3676
  T(this, "getWallet", (t) => this.connectedWallets[t]);
3674
- T(this, "getExplorerAddressUrl", (t, n) => mn({ chain: t, address: n }));
3677
+ T(this, "getExplorerAddressUrl", (t, n) => cn({ chain: t, address: n }));
3675
3678
  T(this, "getBalance", async (t, n) => {
3676
3679
  const a = await this.getWalletByChain(t, n);
3677
3680
  return (a == null ? void 0 : a.balance) || [];
@@ -3682,52 +3685,52 @@ class Ln {
3682
3685
  if (!a.complete)
3683
3686
  throw new m("core_swap_route_not_complete");
3684
3687
  try {
3685
- if (et.includes(r)) {
3688
+ if (ze.includes(r)) {
3686
3689
  const y = this.connectedWallets[o];
3687
3690
  if (!(y != null && y.sendTransaction))
3688
3691
  throw new m("core_wallet_connection_not_found");
3689
3692
  if (!(t ? (p = a == null ? void 0 : a.streamingSwap) == null ? void 0 : p.transaction : a == null ? void 0 : a.transaction))
3690
3693
  throw new m("core_swap_route_transaction_not_found");
3691
- const { data: c, from: _, to: b, value: w } = a.transaction, R = {
3694
+ const { data: c, from: _, to: b, value: w } = a.transaction, E = {
3692
3695
  data: c,
3693
3696
  from: _,
3694
3697
  to: b.toLowerCase(),
3695
- chainId: BigInt(dt[o]),
3698
+ chainId: BigInt(ot[o]),
3696
3699
  value: w ? BigInt(w) : 0n
3697
3700
  };
3698
- return y.sendTransaction(R, s);
3701
+ return y.sendTransaction(E, s);
3699
3702
  }
3700
- if (nt.includes(r)) {
3703
+ if (et.includes(r)) {
3701
3704
  if (!a.calldata.fromAsset)
3702
3705
  throw new m("core_swap_asset_not_recognized");
3703
- const y = await N.fromString(a.calldata.fromAsset);
3706
+ const y = await M.fromString(a.calldata.fromAsset);
3704
3707
  if (!y)
3705
3708
  throw new m("core_swap_asset_not_recognized");
3706
3709
  const { address: u } = await f(this, L).call(this, y.chain), {
3707
3710
  contract: c,
3708
- calldata: { expiration: _, amountIn: b, memo: w, memoStreamingSwap: R }
3709
- } = a, O = y.add(D.fromBigInt(BigInt(b), y.decimal)), I = t && R || w;
3711
+ calldata: { expiration: _, amountIn: b, memo: w, memoStreamingSwap: E }
3712
+ } = a, g = y.add(D.fromBigInt(BigInt(b), y.decimal)), O = t && E || w;
3710
3713
  return this.deposit({
3711
3714
  expiration: _,
3712
- assetValue: O,
3713
- memo: I,
3715
+ assetValue: g,
3716
+ memo: O,
3714
3717
  feeOptionKey: s,
3715
3718
  router: c,
3716
3719
  recipient: u
3717
3720
  });
3718
3721
  }
3719
- if (tt.includes(r)) {
3722
+ if (Ze.includes(r)) {
3720
3723
  const { calldata: y, contract: u } = a;
3721
3724
  if (!u)
3722
3725
  throw new m("core_swap_contract_not_found");
3723
3726
  const c = this.connectedWallets[o], _ = this.getAddress(o);
3724
3727
  if (!(c != null && c.sendTransaction) || !_)
3725
3728
  throw new m("core_wallet_connection_not_found");
3726
- const { getProvider: b, toChecksumAddress: w } = await import("@swapkit/toolbox-evm"), R = b(o), O = ln[u.toLowerCase()];
3727
- if (!O)
3729
+ const { getProvider: b, toChecksumAddress: w } = await import("@swapkit/toolbox-evm"), E = b(o), g = un[u.toLowerCase()];
3730
+ if (!g)
3728
3731
  throw new m("core_swap_contract_not_supported", { contractAddress: u });
3729
- const S = await (await ((d = c.createContract) == null ? void 0 : d.call(c, u, O, R))).getFunction("swapIn").populateTransaction(
3730
- ...yn({
3732
+ const I = await (await ((d = c.createContract) == null ? void 0 : d.call(c, u, g, E))).getFunction("swapIn").populateTransaction(
3733
+ ...ln({
3731
3734
  streamSwap: t,
3732
3735
  toChecksumAddress: w,
3733
3736
  contractAddress: u,
@@ -3736,7 +3739,7 @@ class Ln {
3736
3739
  }),
3737
3740
  { from: _ }
3738
3741
  );
3739
- return c.sendTransaction(S, s);
3742
+ return c.sendTransaction(I, s);
3740
3743
  }
3741
3744
  throw new m("core_swap_quote_mode_not_supported", { quoteMode: r });
3742
3745
  } catch (y) {
@@ -3748,7 +3751,7 @@ class Ln {
3748
3751
  const a = this.getAddress(t);
3749
3752
  if (!a)
3750
3753
  return null;
3751
- const s = [N.fromChainOrSignature(t)], r = (o = this.connectedChains[t]) == null ? void 0 : o.walletType;
3754
+ const s = [M.fromChainOrSignature(t)], r = (o = this.connectedChains[t]) == null ? void 0 : o.walletType;
3752
3755
  try {
3753
3756
  const d = await ((p = this.getWallet(t)) == null ? void 0 : p.getBalance(a, n));
3754
3757
  return this.connectedChains[t] = {
@@ -3760,8 +3763,8 @@ class Ln {
3760
3763
  return console.error(d), { address: a, balance: s, walletType: r };
3761
3764
  }
3762
3765
  });
3763
- T(this, "approveAssetValue", (t, n) => f(this, K).call(this, { assetValue: t, type: "approve", contractAddress: n }));
3764
- T(this, "isAssetValueApproved", (t, n) => f(this, K).call(this, { assetValue: t, contractAddress: n, type: "checkOnly" }));
3766
+ T(this, "approveAssetValue", (t, n) => f(this, q).call(this, { assetValue: t, type: "approve", contractAddress: n }));
3767
+ T(this, "isAssetValueApproved", (t, n) => f(this, q).call(this, { assetValue: t, contractAddress: n, type: "checkOnly" }));
3765
3768
  T(this, "validateAddress", ({ address: t, chain: n }) => {
3766
3769
  var a, s;
3767
3770
  return (s = (a = this.getWallet(n)) == null ? void 0 : a.validateAddress) == null ? void 0 : s.call(a, t);
@@ -3771,7 +3774,7 @@ class Ln {
3771
3774
  if (!n)
3772
3775
  throw new m("core_wallet_connection_not_found");
3773
3776
  try {
3774
- return await n.transfer(f(this, X).call(this, t));
3777
+ return await n.transfer(f(this, j).call(this, t));
3775
3778
  } catch (a) {
3776
3779
  throw new m("core_swap_transaction_error", a);
3777
3780
  }
@@ -3785,7 +3788,7 @@ class Ln {
3785
3788
  const { chain: r, symbol: o, ticker: p } = t, d = this.connectedWallets[r];
3786
3789
  if (!d)
3787
3790
  throw new m("core_wallet_connection_not_found");
3788
- const y = f(this, X).call(this, { assetValue: t, recipient: n, router: a, ...s });
3791
+ const y = f(this, j).call(this, { assetValue: t, recipient: n, router: a, ...s });
3789
3792
  try {
3790
3793
  switch (r) {
3791
3794
  case i.THORChain: {
@@ -3795,7 +3798,7 @@ class Ln {
3795
3798
  case i.Ethereum:
3796
3799
  case i.BinanceSmartChain:
3797
3800
  case i.Avalanche: {
3798
- const { getChecksumAddressFromAsset: u } = await import("@swapkit/toolbox-evm"), c = r === i.Avalanche ? Qe : r === i.BinanceSmartChain ? ze : Je;
3801
+ const { getChecksumAddressFromAsset: u } = await import("@swapkit/toolbox-evm"), c = r === i.Avalanche ? Xe : r === i.BinanceSmartChain ? Je : Ye;
3799
3802
  return await d.call({
3800
3803
  abi: c,
3801
3804
  contractAddress: a || (await f(this, L).call(this, r)).router,
@@ -3817,8 +3820,8 @@ class Ln {
3817
3820
  return await d.transfer(y);
3818
3821
  }
3819
3822
  } catch (u) {
3820
- const c = ((u == null ? void 0 : u.message) || (u == null ? void 0 : u.toString())).toLowerCase(), _ = c == null ? void 0 : c.includes("insufficient funds"), b = c == null ? void 0 : c.includes("gas"), w = c == null ? void 0 : c.includes("server"), R = _ ? "core_transaction_deposit_insufficient_funds_error" : b ? "core_transaction_deposit_gas_error" : w ? "core_transaction_deposit_server_error" : "core_transaction_deposit_error";
3821
- throw new m(R, u);
3823
+ const c = ((u == null ? void 0 : u.message) || (u == null ? void 0 : u.toString())).toLowerCase(), _ = c == null ? void 0 : c.includes("insufficient funds"), b = c == null ? void 0 : c.includes("gas"), w = c == null ? void 0 : c.includes("server"), E = _ ? "core_transaction_deposit_insufficient_funds_error" : b ? "core_transaction_deposit_gas_error" : w ? "core_transaction_deposit_server_error" : "core_transaction_deposit_error";
3824
+ throw new m(E, u);
3822
3825
  }
3823
3826
  });
3824
3827
  /**
@@ -3832,9 +3835,9 @@ class Ln {
3832
3835
  throw new m("core_transaction_create_liquidity_invalid_params");
3833
3836
  let a = "", s = "";
3834
3837
  try {
3835
- a = await f(this, M).call(this, {
3838
+ a = await f(this, C).call(this, {
3836
3839
  assetValue: t,
3837
- memo: x(h.DEPOSIT, {
3840
+ memo: N(h.DEPOSIT, {
3838
3841
  ...n,
3839
3842
  address: this.getAddress(n.chain)
3840
3843
  })
@@ -3843,9 +3846,9 @@ class Ln {
3843
3846
  throw new m("core_transaction_create_liquidity_rune_error", r);
3844
3847
  }
3845
3848
  try {
3846
- s = await f(this, M).call(this, {
3849
+ s = await f(this, C).call(this, {
3847
3850
  assetValue: n,
3848
- memo: x(h.DEPOSIT, {
3851
+ memo: N(h.DEPOSIT, {
3849
3852
  ...n,
3850
3853
  address: this.getAddress(i.THORChain)
3851
3854
  })
@@ -3864,32 +3867,32 @@ class Ln {
3864
3867
  isPendingSymmAsset: o,
3865
3868
  mode: p = "sym"
3866
3869
  }) => {
3867
- const [d, ...y] = t.split("."), u = p === "sym", c = (n == null ? void 0 : n.gt(0)) && (u || p === "rune"), _ = (a == null ? void 0 : a.gt(0)) && (u || p === "asset"), b = o || c, w = b ? s || this.getAddress(i.THORChain) : "", R = u || p === "asset" ? r || this.getAddress(d) : "";
3870
+ const [d, ...y] = t.split("."), u = p === "sym", c = (n == null ? void 0 : n.gt(0)) && (u || p === "rune"), _ = (a == null ? void 0 : a.gt(0)) && (u || p === "asset"), b = o || c, w = b ? s || this.getAddress(i.THORChain) : "", E = u || p === "asset" ? r || this.getAddress(d) : "";
3868
3871
  if (!c && !_)
3869
3872
  throw new m("core_transaction_add_liquidity_invalid_params");
3870
3873
  if (b && !w)
3871
3874
  throw new m("core_transaction_add_liquidity_no_rune_address");
3872
- let O, I;
3873
- const S = { chain: d, symbol: y.join(".") };
3875
+ let g, O;
3876
+ const I = { chain: d, symbol: y.join(".") };
3874
3877
  if (c && n)
3875
3878
  try {
3876
- O = await f(this, M).call(this, {
3879
+ g = await f(this, C).call(this, {
3877
3880
  assetValue: n,
3878
- memo: x(h.DEPOSIT, { ...S, address: R })
3881
+ memo: N(h.DEPOSIT, { ...I, address: E })
3879
3882
  });
3880
3883
  } catch (P) {
3881
3884
  throw new m("core_transaction_add_liquidity_rune_error", P);
3882
3885
  }
3883
3886
  if (_ && a)
3884
3887
  try {
3885
- I = await f(this, M).call(this, {
3888
+ O = await f(this, C).call(this, {
3886
3889
  assetValue: a,
3887
- memo: x(h.DEPOSIT, { ...S, address: w })
3890
+ memo: N(h.DEPOSIT, { ...I, address: w })
3888
3891
  });
3889
3892
  } catch (P) {
3890
3893
  throw new m("core_transaction_add_liquidity_asset_error", P);
3891
3894
  }
3892
- return { runeTx: O, assetTx: I };
3895
+ return { runeTx: g, assetTx: O };
3893
3896
  });
3894
3897
  T(this, "withdraw", async ({
3895
3898
  memo: t,
@@ -3898,7 +3901,7 @@ class Ln {
3898
3901
  from: s,
3899
3902
  to: r
3900
3903
  }) => {
3901
- const o = r === "rune" ? N.fromChainOrSignature(i.THORChain) : s === "sym" && r === "sym" || s === "rune" || s === "asset" ? void 0 : n, p = de(s === "asset" ? n.chain : i.THORChain), d = t || x(h.WITHDRAW, {
3904
+ const o = r === "rune" ? M.fromChainOrSignature(i.THORChain) : s === "sym" && r === "sym" || s === "rune" || s === "asset" ? void 0 : n, p = oe(s === "asset" ? n.chain : i.THORChain), d = t || N(h.WITHDRAW, {
3902
3905
  symbol: n.symbol,
3903
3906
  chain: n.chain,
3904
3907
  ticker: n.ticker,
@@ -3906,7 +3909,7 @@ class Ln {
3906
3909
  targetAssetString: o == null ? void 0 : o.toString(),
3907
3910
  singleSide: !1
3908
3911
  });
3909
- return f(this, M).call(this, { assetValue: p, memo: d });
3912
+ return f(this, C).call(this, { assetValue: p, memo: d });
3910
3913
  });
3911
3914
  T(this, "savings", async ({
3912
3915
  assetValue: t,
@@ -3914,23 +3917,23 @@ class Ln {
3914
3917
  percent: a,
3915
3918
  type: s
3916
3919
  }) => {
3917
- const r = s === "add" ? h.DEPOSIT : h.WITHDRAW, o = n || x(r, {
3920
+ const r = s === "add" ? h.DEPOSIT : h.WITHDRAW, o = n || N(r, {
3918
3921
  ticker: t.ticker,
3919
3922
  symbol: t.symbol,
3920
3923
  chain: t.chain,
3921
3924
  singleSide: !0,
3922
3925
  basisPoints: a ? Math.min(1e4, Math.round(a * 100)) : void 0
3923
- }), p = r === h.DEPOSIT ? t : de(t.chain);
3924
- return f(this, M).call(this, { memo: o, assetValue: p });
3926
+ }), p = r === h.DEPOSIT ? t : oe(t.chain);
3927
+ return f(this, C).call(this, { memo: o, assetValue: p });
3925
3928
  });
3926
3929
  T(this, "loan", ({
3927
3930
  assetValue: t,
3928
3931
  memo: n,
3929
3932
  minAmount: a,
3930
3933
  type: s
3931
- }) => f(this, M).call(this, {
3934
+ }) => f(this, C).call(this, {
3932
3935
  assetValue: t,
3933
- memo: n || x(s === "open" ? h.OPEN_LOAN : h.CLOSE_LOAN, {
3936
+ memo: n || N(s === "open" ? h.OPEN_LOAN : h.CLOSE_LOAN, {
3934
3937
  asset: t.toString(),
3935
3938
  minAmount: a.toString(),
3936
3939
  address: this.getAddress(t.chain)
@@ -3941,24 +3944,24 @@ class Ln {
3941
3944
  assetValue: n,
3942
3945
  address: a
3943
3946
  }) => {
3944
- const s = t === "bond" ? h.BOND : t === "unbond" ? h.UNBOND : h.LEAVE, r = x(s, {
3947
+ const s = t === "bond" ? h.BOND : t === "unbond" ? h.UNBOND : h.LEAVE, r = N(s, {
3945
3948
  address: a,
3946
3949
  unbondAmount: t === "unbond" ? n.getBaseValue("number") : void 0
3947
3950
  });
3948
- return f(this, Y).call(this, {
3951
+ return f(this, W).call(this, {
3949
3952
  memo: r,
3950
- assetValue: t === "bond" ? n : de(i.THORChain)
3953
+ assetValue: t === "bond" ? n : oe(i.THORChain)
3951
3954
  });
3952
3955
  });
3953
3956
  T(this, "registerThorname", ({
3954
3957
  assetValue: t,
3955
3958
  ...n
3956
- }) => f(this, Y).call(this, { assetValue: t, memo: x(h.THORNAME_REGISTER, n) }));
3959
+ }) => f(this, W).call(this, { assetValue: t, memo: N(h.THORNAME_REGISTER, n) }));
3957
3960
  T(this, "extend", ({ wallets: t, config: n, apis: a = {}, rpcUrls: s = {} }) => {
3958
3961
  try {
3959
3962
  t.forEach((r) => {
3960
3963
  this[r.connectMethodName] = r.connect({
3961
- addChain: f(this, se),
3964
+ addChain: f(this, ne),
3962
3965
  config: n || {},
3963
3966
  apis: a,
3964
3967
  rpcUrls: s
@@ -4043,17 +4046,17 @@ class Ln {
4043
4046
  halted: !1,
4044
4047
  chain: i.THORChain
4045
4048
  };
4046
- const a = (await Tn(this.stagenet)).find((s) => s.chain === t);
4049
+ const a = (await mn(this.stagenet)).find((s) => s.chain === t);
4047
4050
  if (!a)
4048
4051
  throw new m("core_inbound_data_not_found");
4049
4052
  if (a != null && a.halted)
4050
4053
  throw new m("core_chain_halted");
4051
4054
  return a;
4052
4055
  });
4053
- B(this, se, ({ chain: t, wallet: n, walletMethods: a }) => {
4056
+ B(this, ne, ({ chain: t, wallet: n, walletMethods: a }) => {
4054
4057
  this.connectedChains[t] = n, this.connectedWallets[t] = a;
4055
4058
  });
4056
- B(this, K, async ({
4059
+ B(this, q, async ({
4057
4060
  assetValue: t,
4058
4061
  type: n = "checkOnly",
4059
4062
  contractAddress: a
@@ -4075,16 +4078,16 @@ class Ln {
4075
4078
  spenderAddress: b
4076
4079
  });
4077
4080
  });
4078
- B(this, M, async ({
4081
+ B(this, C, async ({
4079
4082
  assetValue: t,
4080
4083
  memo: n,
4081
- feeOptionKey: a = F.Fast
4084
+ feeOptionKey: a = $.Fast
4082
4085
  }) => {
4083
4086
  const {
4084
4087
  gas_rate: s,
4085
4088
  router: r,
4086
4089
  address: o
4087
- } = await f(this, L).call(this, t.chain), p = (parseInt(s) || 0) * At[a];
4090
+ } = await f(this, L).call(this, t.chain), p = (parseInt(s) || 0) * bt[a];
4088
4091
  return this.deposit({
4089
4092
  assetValue: t,
4090
4093
  recipient: o,
@@ -4093,13 +4096,13 @@ class Ln {
4093
4096
  feeRate: p
4094
4097
  });
4095
4098
  });
4096
- B(this, Y, async ({ memo: t, assetValue: n }) => {
4097
- const a = await hn(this.stagenet);
4099
+ B(this, W, async ({ memo: t, assetValue: n }) => {
4100
+ const a = await Tn(this.stagenet);
4098
4101
  if (a.HALTCHAINGLOBAL >= 1 || a.HALTTHORCHAIN >= 1)
4099
4102
  throw new m("core_chain_halted");
4100
4103
  return this.deposit({ assetValue: n, recipient: "", memo: t });
4101
4104
  });
4102
- B(this, X, ({ assetValue: t, ...n }) => ({
4105
+ B(this, j, ({ assetValue: t, ...n }) => ({
4103
4106
  ...n,
4104
4107
  memo: n.memo || "",
4105
4108
  from: this.getAddress(t.chain),
@@ -4108,66 +4111,66 @@ class Ln {
4108
4111
  this.stagenet = !!t;
4109
4112
  }
4110
4113
  }
4111
- L = new WeakMap(), se = new WeakMap(), K = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), X = new WeakMap();
4114
+ L = new WeakMap(), ne = new WeakMap(), q = new WeakMap(), C = new WeakMap(), W = new WeakMap(), j = new WeakMap();
4112
4115
  export {
4113
- et as AGG_SWAP,
4114
- bn as ApiError,
4115
- W as ApiUrl,
4116
- N as AssetValue,
4116
+ ze as AGG_SWAP,
4117
+ Ce as ApiError,
4118
+ F as ApiUrl,
4119
+ M as AssetValue,
4117
4120
  A as BaseDecimal,
4118
- Te as BigIntArithmetics,
4121
+ ye as BigIntArithmetics,
4119
4122
  i as Chain,
4120
- fe as ChainId,
4121
- On as ChainIdToChain,
4122
- dt as ChainToChainId,
4123
- Pe as ChainToExplorerUrl,
4124
- gn as ChainToHexChainId,
4125
- ut as ChainToRPC,
4126
- it as ContractAddress,
4127
- En as CosmosChainList,
4128
- rt as DerivationPath,
4123
+ Te as ChainId,
4124
+ Rn as ChainIdToChain,
4125
+ ot as ChainToChainId,
4126
+ Ne as ChainToExplorerUrl,
4127
+ En as ChainToHexChainId,
4128
+ pt as ChainToRPC,
4129
+ at as ContractAddress,
4130
+ wn as CosmosChainList,
4131
+ st as DerivationPath,
4129
4132
  l as ERROR_CODE,
4130
- at as ERROR_MODULE,
4131
- Ne as ERROR_TYPE,
4132
- ot as EVMChainList,
4133
- lt as ErrorCode,
4134
- F as FeeOption,
4133
+ tt as ERROR_MODULE,
4134
+ ve as ERROR_TYPE,
4135
+ it as EVMChainList,
4136
+ dt as ErrorCode,
4137
+ $ as FeeOption,
4135
4138
  h as MemoType,
4136
- wn as NetworkDerivationPath,
4137
- Ze as QuoteMode,
4138
- De as RPCUrl,
4139
- Ae as RequestClient,
4140
- tt as SWAP_IN,
4141
- nt as SWAP_OUT,
4142
- Ln as SwapKitCore,
4139
+ fn as NetworkDerivationPath,
4140
+ Qe as QuoteMode,
4141
+ Me as RPCUrl,
4142
+ fe as RequestClient,
4143
+ Ze as SWAP_IN,
4144
+ et as SWAP_OUT,
4145
+ Pn as SwapKitCore,
4143
4146
  m as SwapKitError,
4144
4147
  D as SwapKitNumber,
4145
- Qe as TCAvalancheDepositABI,
4146
- ze as TCBscDepositABI,
4147
- Je as TCEthereumVaultAbi,
4148
- Rn as TCSupportedChainList,
4149
- An as UTXOChainList,
4150
- yt as WalletOption,
4151
- In as assetFromString,
4152
- Bn as derivationPathToString,
4153
- fn as erc20ABI,
4154
- Sn as filterAssets,
4155
- re as formatBigIntToSafeValue,
4156
- At as gasFeeMultiplier,
4157
- Rt as getAssetType,
4158
- St as getAsymmetricAssetShare,
4159
- Cn as getAsymmetricAssetWithdrawAmount,
4160
- It as getAsymmetricRuneShare,
4161
- vn as getAsymmetricRuneWithdrawAmount,
4162
- Et as getCommonAssetInfo,
4163
- wt as getDecimal,
4164
- Nn as getEstimatedPoolShare,
4165
- xn as getLiquiditySlippage,
4166
- x as getMemoFor,
4167
- de as getMinAmountByChain,
4168
- vt as getSymmetricPoolShare,
4169
- Mn as getSymmetricWithdraw,
4170
- Dn as getTHORNameCost,
4171
- Le as isGasAsset,
4172
- Pn as validateTHORName
4148
+ Xe as TCAvalancheDepositABI,
4149
+ Je as TCBscDepositABI,
4150
+ Ye as TCEthereumVaultAbi,
4151
+ An as TCSupportedChainList,
4152
+ bn as UTXOChainList,
4153
+ ut as WalletOption,
4154
+ gn as assetFromString,
4155
+ Dn as derivationPathToString,
4156
+ _n as erc20ABI,
4157
+ On as filterAssets,
4158
+ se as formatBigIntToSafeValue,
4159
+ bt as gasFeeMultiplier,
4160
+ At as getAssetType,
4161
+ Ot as getAsymmetricAssetShare,
4162
+ Sn as getAsymmetricAssetWithdrawAmount,
4163
+ gt as getAsymmetricRuneShare,
4164
+ In as getAsymmetricRuneWithdrawAmount,
4165
+ wt as getCommonAssetInfo,
4166
+ ft as getDecimal,
4167
+ Cn as getEstimatedPoolShare,
4168
+ Mn as getLiquiditySlippage,
4169
+ N as getMemoFor,
4170
+ oe as getMinAmountByChain,
4171
+ It as getSymmetricPoolShare,
4172
+ vn as getSymmetricWithdraw,
4173
+ Nn as getTHORNameCost,
4174
+ De as isGasAsset,
4175
+ xn as validateTHORName
4173
4176
  };