@swapkit/core 1.0.0-rc.110 → 1.0.0-rc.112

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,15 +1,15 @@
1
- var ct = Object.defineProperty;
2
- var bt = (e, t, n) => t in e ? ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var T = (e, t, n) => (bt(e, typeof t != "symbol" ? t + "" : t, n), n), ft = (e, t, n) => {
1
+ var bt = Object.defineProperty;
2
+ var ft = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var m = (e, t, n) => (ft(e, typeof t != "symbol" ? t + "" : t, n), n), ht = (e, t, n) => {
4
4
  if (!t.has(e))
5
5
  throw TypeError("Cannot " + n);
6
6
  };
7
- var g = (e, t, n) => (ft(e, t, "read from private field"), n ? n.call(e) : t.get(e)), q = (e, t, n) => {
7
+ var A = (e, t, n) => (ht(e, t, "read from private field"), n ? n.call(e) : t.get(e)), V = (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
- const Qn = [
12
+ const Jn = [
13
13
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
14
14
  {
15
15
  anonymous: !1,
@@ -107,7 +107,7 @@ const Qn = [
107
107
  stateMutability: "nonpayable",
108
108
  type: "function"
109
109
  }
110
- ], ht = [
110
+ ], wt = [
111
111
  {
112
112
  inputs: [{ internalType: "address", name: "rune", type: "address" }],
113
113
  stateMutability: "nonpayable",
@@ -282,7 +282,7 @@ const Qn = [
282
282
  stateMutability: "view",
283
283
  type: "function"
284
284
  }
285
- ], wt = [
285
+ ], At = [
286
286
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
287
287
  {
288
288
  anonymous: !1,
@@ -446,7 +446,7 @@ const Qn = [
446
446
  stateMutability: "view",
447
447
  type: "function"
448
448
  }
449
- ], At = [
449
+ ], gt = [
450
450
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
451
451
  {
452
452
  anonymous: !1,
@@ -599,13 +599,13 @@ const Qn = [
599
599
  type: "function"
600
600
  }
601
601
  ];
602
- var gt = /* @__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))(gt || {});
603
- const _t = [
602
+ var _t = /* @__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))(_t || {});
603
+ const Mt = [
604
604
  "ERC20-ERC20",
605
605
  "ARC20-ARC20",
606
606
  "BEP20-BEP20"
607
607
  /* BSC_TO_BSC */
608
- ], Mt = [
608
+ ], vt = [
609
609
  "ERC20-TC",
610
610
  "ERC20-ARC20",
611
611
  "ERC20-BEP20",
@@ -616,15 +616,15 @@ const _t = [
616
616
  "BEP20-ERC20",
617
617
  "BEP20-ARC20"
618
618
  /* BSC_TO_AVAX */
619
- ], vt = [
619
+ ], Ct = [
620
620
  "TC-TC",
621
621
  "TC-ERC20",
622
622
  "TC-ARC20",
623
623
  "TC-BEP20"
624
624
  /* TC_SUPPORTED_TO_BSC */
625
625
  ];
626
- var r = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polkadot = "DOT", e.Chainflip = "FLIP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(r || {}), Et = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(Et || {}), Ct = /* @__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.DASH = "m/44'/5'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.DOT = "////", e.ETH = "m/44'/60'/0'/0", e.FLIP = "////", 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))(Ct || {});
627
- const Yn = {
626
+ var r = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polkadot = "DOT", e.Chainflip = "FLIP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(r || {}), Et = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(Et || {}), Ot = /* @__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.DASH = "m/44'/5'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.DOT = "////", e.ETH = "m/44'/60'/0'/0", e.FLIP = "////", 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))(Ot || {});
627
+ const Zn = {
628
628
  ARB: [44, 60, 0, 0, 0],
629
629
  AVAX: [44, 60, 0, 0, 0],
630
630
  BCH: [44, 145, 0, 0, 0],
@@ -645,8 +645,8 @@ const Yn = {
645
645
  DOT: [0, 0, 0, 0, 0],
646
646
  FLIP: [0, 0, 0, 0, 0]
647
647
  };
648
- 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.DOT = 10] = "DOT", e[e.ETH = 18] = "ETH", e[e.FLIP = 18] = "FLIP", 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[e.ZEC = 8] = "ZEC", e))(A || {});
649
- const Jn = [
648
+ var g = /* @__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.DOT = 10] = "DOT", e[e.ETH = 18] = "ETH", e[e.FLIP = 18] = "FLIP", 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[e.ZEC = 8] = "ZEC", e))(g || {});
649
+ const zn = [
650
650
  "DOT",
651
651
  "FLIP"
652
652
  /* Chainflip */
@@ -658,19 +658,21 @@ const Jn = [
658
658
  "OP",
659
659
  "MATIC"
660
660
  /* Polygon */
661
- ], Zn = je, Ot = [
661
+ ], ea = je, xt = [
662
662
  "BTC",
663
663
  "BCH",
664
664
  "DASH",
665
665
  "DOGE",
666
666
  "LTC"
667
667
  /* Litecoin */
668
- ], zn = Ot, xt = [
668
+ ], ta = xt, kt = [
669
669
  "GAIA",
670
670
  "THOR",
671
- "BNB"
672
- /* Binance */
673
- ], ea = xt, kt = [
671
+ "BNB",
672
+ "MAYA",
673
+ "KUJI"
674
+ /* Kujira */
675
+ ], na = kt, St = [
674
676
  "AVAX",
675
677
  "BNB",
676
678
  "BSC",
@@ -682,27 +684,27 @@ const Jn = [
682
684
  "LTC",
683
685
  "THOR"
684
686
  /* THORChain */
685
- ], ta = kt;
686
- var Se = /* @__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.Chainflip = "chainflip", e.Cosmos = "cosmoshub-4", e.Dash = "dash", 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.Polkadot = "polkadot", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(Se || {}), Ge = /* @__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.Chainflip = "wss://mainnet-archive.chainflip.io", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dash = "https://node-router.thorswap.net/dash", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Kujira = "https://rpc-kujira.synergynodes.com/", 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.Polkadot = "wss://rpc.polkadot.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(Ge || {}), te = /* @__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.net", e.ThorswapStatic = "https://static.thorswap.net", e))(te || {});
687
- const Te = Object.values(r), St = Object.keys(r), Re = Te.reduce(
687
+ ], aa = St;
688
+ var Re = /* @__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.Chainflip = "chainflip", e.Cosmos = "cosmoshub-4", e.Dash = "dash", 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.Polkadot = "polkadot", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(Re || {}), Ke = /* @__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.Chainflip = "wss://mainnet-archive.chainflip.io", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dash = "https://node-router.thorswap.net/dash", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Kujira = "https://rpc-kujira.synergynodes.com/", 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.Polkadot = "wss://rpc.polkadot.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(Ke || {}), U = /* @__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.net", e.ThorswapStatic = "https://static.thorswap.net", e))(U || {});
689
+ const ce = Object.values(r), Rt = Object.keys(r), Ie = ce.reduce(
688
690
  (e, t) => {
689
- const n = St.find((a) => r[a] === t);
691
+ const n = Rt.find((a) => r[a] === t);
690
692
  return n && (e[t] = n), e;
691
693
  },
692
694
  {}
693
- ), Ke = Te.reduce(
694
- (e, t) => (e[t] = Se[Re[t]], e),
695
+ ), Qe = ce.reduce(
696
+ (e, t) => (e[t] = Re[Ie[t]], e),
695
697
  {}
696
- ), Rt = Te.reduce(
697
- (e, t) => (e[t] = Ge[Re[t]], e),
698
+ ), It = ce.reduce(
699
+ (e, t) => (e[t] = Ke[Ie[t]], e),
698
700
  {}
699
- ), na = Te.reduce(
701
+ ), ia = ce.reduce(
700
702
  (e, t) => {
701
- const n = `${Re[t]}Hex`;
702
- return e[t] = Se[n], e;
703
+ const n = `${Ie[t]}Hex`;
704
+ return e[t] = Re[n], e;
703
705
  },
704
706
  {}
705
- ), aa = {
707
+ ), sa = {
706
708
  "0xa4b1": "ARB",
707
709
  42161: "ARB",
708
710
  "0xa86a": "AVAX",
@@ -730,7 +732,7 @@ const Te = Object.values(r), St = Object.keys(r), Re = Te.reduce(
730
732
  "thorchain-stagenet-v2": "THOR",
731
733
  "thorchain-mainnet-v1": "THOR"
732
734
  /* THORChain */
733
- }, Qe = {
735
+ }, Ye = {
734
736
  ARB: "https://arbiscan.io",
735
737
  AVAX: "https://snowtrace.io",
736
738
  BSC: "https://bscscan.com",
@@ -750,37 +752,37 @@ const Te = Object.values(r), St = Object.keys(r), Re = Te.reduce(
750
752
  MATIC: "https://polygonscan.com",
751
753
  THOR: "https://runescan.io"
752
754
  };
753
- var w = /* @__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))(w || {}), Q = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(Q || {}), Bt = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", 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.OKX_MOBILE = "OKX_MOBILE", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(Bt || {}), It = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e[e.LockedDevice = 21781] = "LockedDevice", e[e.TC_NotFound = 65535] = "TC_NotFound", e))(It || {}), Pt = Object.defineProperty, Ht = (e, t, n) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, I = (e, t, n) => (Ht(e, typeof t != "symbol" ? t + "" : t, n), n), Ft = (e, t, n) => {
755
+ var w = /* @__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))(w || {}), Y = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(Y || {}), Bt = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", 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.OKX_MOBILE = "OKX_MOBILE", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(Bt || {}), Pt = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e[e.LockedDevice = 21781] = "LockedDevice", e[e.TC_NotFound = 65535] = "TC_NotFound", e))(Pt || {}), Ht = Object.defineProperty, Dt = (e, t, n) => t in e ? Ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, P = (e, t, n) => (Dt(e, typeof t != "symbol" ? t + "" : t, n), n), Ft = (e, t, n) => {
754
756
  if (!t.has(e))
755
757
  throw TypeError("Cannot " + n);
756
- }, J = (e, t, n) => {
758
+ }, Z = (e, t, n) => {
757
759
  if (t.has(e))
758
760
  throw TypeError("Cannot add the same private member more than once");
759
761
  t instanceof WeakSet ? t.add(e) : t.set(e, n);
760
- }, C = (e, t, n) => (Ft(e, t, "access private method"), n), ce = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polkadot = "DOT", e.Chainflip = "FLIP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(ce || {}), Be = /* @__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.Chainflip = "chainflip", e.Cosmos = "cosmoshub-4", e.Dash = "dash", 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.Polkadot = "polkadot", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(Be || {}), Ye = /* @__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.Chainflip = "wss://mainnet-archive.chainflip.io", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dash = "https://node-router.thorswap.net/dash", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Kujira = "https://rpc-kujira.synergynodes.com/", 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.Polkadot = "wss://rpc.polkadot.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(Ye || {}), V = /* @__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.net", e.ThorswapStatic = "https://static.thorswap.net", e))(V || {});
761
- const be = Object.values(ce), Dt = Object.keys(ce), Ie = be.reduce(
762
+ }, E = (e, t, n) => (Ft(e, t, "access private method"), n), be = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polkadot = "DOT", e.Chainflip = "FLIP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(be || {}), Be = /* @__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.Chainflip = "chainflip", e.Cosmos = "cosmoshub-4", e.Dash = "dash", 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.Polkadot = "polkadot", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(Be || {}), Je = /* @__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.Chainflip = "wss://mainnet-archive.chainflip.io", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dash = "https://node-router.thorswap.net/dash", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Kujira = "https://rpc-kujira.synergynodes.com/", 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.Polkadot = "wss://rpc.polkadot.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(Je || {}), N = /* @__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.net", e.ThorswapStatic = "https://static.thorswap.net", e))(N || {});
763
+ const fe = Object.values(be), Lt = Object.keys(be), Pe = fe.reduce(
762
764
  (e, t) => {
763
- const n = Dt.find((a) => ce[a] === t);
765
+ const n = Lt.find((a) => be[a] === t);
764
766
  return n && (e[t] = n), e;
765
767
  },
766
768
  {}
767
769
  );
768
- be.reduce(
769
- (e, t) => (e[t] = Be[Ie[t]], e),
770
+ fe.reduce(
771
+ (e, t) => (e[t] = Be[Pe[t]], e),
770
772
  {}
771
773
  );
772
- be.reduce(
773
- (e, t) => (e[t] = Ye[Ie[t]], e),
774
+ fe.reduce(
775
+ (e, t) => (e[t] = Je[Pe[t]], e),
774
776
  {}
775
777
  );
776
- be.reduce(
778
+ fe.reduce(
777
779
  (e, t) => {
778
- const n = `${Ie[t]}Hex`;
780
+ const n = `${Pe[t]}Hex`;
779
781
  return e[t] = Be[n], e;
780
782
  },
781
783
  {}
782
784
  );
783
- class Le extends Error {
785
+ class Ve extends Error {
784
786
  constructor(t, n, a) {
785
787
  const i = t.status || t.status === 0 ? t.status : "", s = t.statusText || "", p = `${i} ${s}`.trim(), u = p ? `status code ${p}` : "an unknown error";
786
788
  super(`Request failed with ${u}`), Object.defineProperty(this, "response", {
@@ -801,7 +803,7 @@ class Le extends Error {
801
803
  }), this.name = "HTTPError", this.response = t, this.request = n, this.options = a;
802
804
  }
803
805
  }
804
- class Je extends Error {
806
+ class Ze extends Error {
805
807
  constructor(t) {
806
808
  super("Request timed out"), Object.defineProperty(this, "request", {
807
809
  enumerable: !0,
@@ -815,24 +817,24 @@ const pe = (e) => e !== null && typeof e == "object", re = (...e) => {
815
817
  for (const t of e)
816
818
  if ((!pe(t) || Array.isArray(t)) && t !== void 0)
817
819
  throw new TypeError("The `options` argument must be an object");
818
- return Pe({}, ...e);
819
- }, Ze = (e = {}, t = {}) => {
820
+ return He({}, ...e);
821
+ }, ze = (e = {}, t = {}) => {
820
822
  const n = new globalThis.Headers(e), a = t instanceof globalThis.Headers, i = new globalThis.Headers(t);
821
823
  for (const [s, p] of i.entries())
822
824
  a && p === "undefined" || p === void 0 ? n.delete(s) : n.set(s, p);
823
825
  return n;
824
- }, Pe = (...e) => {
826
+ }, He = (...e) => {
825
827
  let t = {}, n = {};
826
828
  for (const a of e)
827
829
  if (Array.isArray(a))
828
830
  Array.isArray(t) || (t = []), t = [...t, ...a];
829
831
  else if (pe(a)) {
830
832
  for (let [i, s] of Object.entries(a))
831
- pe(s) && i in t && (s = Pe(t[i], s)), t = { ...t, [i]: s };
832
- pe(a.headers) && (n = Ze(n, a.headers), t.headers = n);
833
+ pe(s) && i in t && (s = He(t[i], s)), t = { ...t, [i]: s };
834
+ pe(a.headers) && (n = ze(n, a.headers), t.headers = n);
833
835
  }
834
836
  return t;
835
- }, Lt = (() => {
837
+ }, Vt = (() => {
836
838
  let e = !1, t = !1;
837
839
  const n = typeof globalThis.ReadableStream == "function", a = typeof globalThis.Request == "function";
838
840
  return n && a && (t = new globalThis.Request("https://empty.invalid", {
@@ -843,13 +845,13 @@ const pe = (e) => e !== null && typeof e == "object", re = (...e) => {
843
845
  return e = !0, "half";
844
846
  }
845
847
  }).headers.has("Content-Type")), e && !t;
846
- })(), Vt = typeof globalThis.AbortController == "function", qt = typeof globalThis.ReadableStream == "function", Wt = typeof globalThis.FormData == "function", ze = ["get", "post", "put", "patch", "head", "delete"], Nt = {
848
+ })(), Nt = typeof globalThis.AbortController == "function", qt = typeof globalThis.ReadableStream == "function", Wt = typeof globalThis.FormData == "function", et = ["get", "post", "put", "patch", "head", "delete"], $t = {
847
849
  json: "application/json",
848
850
  text: "text/*",
849
851
  formData: "multipart/form-data",
850
852
  arrayBuffer: "*/*",
851
853
  blob: "*/*"
852
- }, we = 2147483647, et = Symbol("stop"), $t = {
854
+ }, Ae = 2147483647, tt = Symbol("stop"), Ut = {
853
855
  json: !0,
854
856
  parseJson: !0,
855
857
  searchParams: !0,
@@ -860,7 +862,7 @@ const pe = (e) => e !== null && typeof e == "object", re = (...e) => {
860
862
  throwHttpErrors: !0,
861
863
  onDownloadProgress: !0,
862
864
  fetch: !0
863
- }, Ut = {
865
+ }, Xt = {
864
866
  method: !0,
865
867
  headers: !0,
866
868
  body: !0,
@@ -876,18 +878,18 @@ const pe = (e) => e !== null && typeof e == "object", re = (...e) => {
876
878
  window: !0,
877
879
  dispatcher: !0,
878
880
  duplex: !0
879
- }, Xt = (e) => ze.includes(e) ? e.toUpperCase() : e, jt = ["get", "put", "head", "delete", "options", "trace"], Gt = [408, 413, 429, 500, 502, 503, 504], tt = [413, 429, 503], Ve = {
881
+ }, Gt = (e) => et.includes(e) ? e.toUpperCase() : e, jt = ["get", "put", "head", "delete", "options", "trace"], Kt = [408, 413, 429, 500, 502, 503, 504], nt = [413, 429, 503], Ne = {
880
882
  limit: 2,
881
883
  methods: jt,
882
- statusCodes: Gt,
883
- afterStatusCodes: tt,
884
+ statusCodes: Kt,
885
+ afterStatusCodes: nt,
884
886
  maxRetryAfter: Number.POSITIVE_INFINITY,
885
887
  backoffLimit: Number.POSITIVE_INFINITY,
886
888
  delay: (e) => 0.3 * 2 ** (e - 1) * 1e3
887
- }, Kt = (e = {}) => {
889
+ }, Qt = (e = {}) => {
888
890
  if (typeof e == "number")
889
891
  return {
890
- ...Ve,
892
+ ...Ne,
891
893
  limit: e
892
894
  };
893
895
  if (e.methods && !Array.isArray(e.methods))
@@ -895,22 +897,22 @@ const pe = (e) => e !== null && typeof e == "object", re = (...e) => {
895
897
  if (e.statusCodes && !Array.isArray(e.statusCodes))
896
898
  throw new Error("retry.statusCodes must be an array");
897
899
  return {
898
- ...Ve,
900
+ ...Ne,
899
901
  ...e,
900
- afterStatusCodes: tt
902
+ afterStatusCodes: nt
901
903
  };
902
904
  };
903
- async function Qt(e, t, n, a) {
905
+ async function Yt(e, t, n, a) {
904
906
  return new Promise((i, s) => {
905
907
  const p = setTimeout(() => {
906
- n && n.abort(), s(new Je(e));
908
+ n && n.abort(), s(new Ze(e));
907
909
  }, a.timeout);
908
910
  a.fetch(e, t).then(i).catch(s).then(() => {
909
911
  clearTimeout(p);
910
912
  });
911
913
  });
912
914
  }
913
- async function Yt(e, { signal: t }) {
915
+ async function Jt(e, { signal: t }) {
914
916
  return new Promise((n, a) => {
915
917
  t && (t.throwIfAborted(), t.addEventListener("abort", i, { once: !0 }));
916
918
  function i() {
@@ -921,17 +923,17 @@ async function Yt(e, { signal: t }) {
921
923
  }, e);
922
924
  });
923
925
  }
924
- const Jt = (e, t) => {
926
+ const Zt = (e, t) => {
925
927
  const n = {};
926
928
  for (const a in t)
927
- !(a in Ut) && !(a in $t) && !(a in e) && (n[a] = t[a]);
929
+ !(a in Xt) && !(a in Ut) && !(a in e) && (n[a] = t[a]);
928
930
  return n;
929
931
  };
930
932
  class oe {
931
933
  static create(t, n) {
932
934
  const a = new oe(t, n), i = async () => {
933
- if (typeof a._options.timeout == "number" && a._options.timeout > we)
934
- throw new RangeError(`The \`timeout\` option cannot be greater than ${we}`);
935
+ if (typeof a._options.timeout == "number" && a._options.timeout > Ae)
936
+ throw new RangeError(`The \`timeout\` option cannot be greater than ${Ae}`);
935
937
  await Promise.resolve();
936
938
  let p = await a._fetch();
937
939
  for (const u of a._options.hooks.afterResponse) {
@@ -939,7 +941,7 @@ class oe {
939
941
  y instanceof globalThis.Response && (p = y);
940
942
  }
941
943
  if (a._decorateResponse(p), !p.ok && a._options.throwHttpErrors) {
942
- let u = new Le(p, a.request, a._options);
944
+ let u = new Ve(p, a.request, a._options);
943
945
  for (const y of a._options.hooks.beforeError)
944
946
  u = await y(u);
945
947
  throw u;
@@ -953,7 +955,7 @@ class oe {
953
955
  }
954
956
  return p;
955
957
  }, s = a._options.retry.methods.includes(a.request.method.toLowerCase()) ? a._retry(i) : i();
956
- for (const [p, u] of Object.entries(Nt))
958
+ for (const [p, u] of Object.entries($t))
957
959
  s[p] = async () => {
958
960
  a.request.headers.set("accept", a.request.headers.get("accept") || u);
959
961
  const y = (await s).clone();
@@ -969,7 +971,7 @@ class oe {
969
971
  }
970
972
  // eslint-disable-next-line complexity
971
973
  constructor(t, n = {}) {
972
- if (Object.defineProperty(this, "request", {
974
+ Object.defineProperty(this, "request", {
973
975
  enumerable: !0,
974
976
  configurable: !0,
975
977
  writable: !0,
@@ -994,21 +996,22 @@ class oe {
994
996
  configurable: !0,
995
997
  writable: !0,
996
998
  value: void 0
997
- }), this._input = t, this._options = {
998
- // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208
999
- credentials: this._input.credentials || "same-origin",
999
+ }), this._input = t;
1000
+ const a = "credentials" in Request.prototype;
1001
+ if (this._options = {
1002
+ credentials: a ? this._input.credentials : void 0,
1000
1003
  ...n,
1001
- headers: Ze(this._input.headers, n.headers),
1002
- hooks: Pe({
1004
+ headers: ze(this._input.headers, n.headers),
1005
+ hooks: He({
1003
1006
  beforeRequest: [],
1004
1007
  beforeRetry: [],
1005
1008
  beforeError: [],
1006
1009
  afterResponse: []
1007
1010
  }, n.hooks),
1008
- method: Xt(n.method ?? this._input.method),
1011
+ method: Gt(n.method ?? this._input.method),
1009
1012
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1010
1013
  prefixUrl: String(n.prefixUrl || ""),
1011
- retry: Kt(n.retry),
1014
+ retry: Qt(n.retry),
1012
1015
  throwHttpErrors: n.throwHttpErrors !== !1,
1013
1016
  timeout: n.timeout ?? 1e4,
1014
1017
  fetch: n.fetch ?? globalThis.fetch.bind(globalThis)
@@ -1019,24 +1022,24 @@ class oe {
1019
1022
  throw new Error("`input` must not begin with a slash when using `prefixUrl`");
1020
1023
  this._options.prefixUrl.endsWith("/") || (this._options.prefixUrl += "/"), this._input = this._options.prefixUrl + this._input;
1021
1024
  }
1022
- if (Vt) {
1025
+ if (Nt) {
1023
1026
  if (this.abortController = new globalThis.AbortController(), this._options.signal) {
1024
- const a = this._options.signal;
1027
+ const i = this._options.signal;
1025
1028
  this._options.signal.addEventListener("abort", () => {
1026
- this.abortController.abort(a.reason);
1029
+ this.abortController.abort(i.reason);
1027
1030
  });
1028
1031
  }
1029
1032
  this._options.signal = this.abortController.signal;
1030
1033
  }
1031
- if (Lt && (this._options.duplex = "half"), this.request = new globalThis.Request(this._input, this._options), this._options.searchParams) {
1032
- const a = "?" + (typeof this._options.searchParams == "string" ? this._options.searchParams.replace(/^\?/, "") : new URLSearchParams(this._options.searchParams).toString()), i = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, a);
1033
- (Wt && 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(i, { ...this.request }), this._options);
1034
+ if (Vt && (this._options.duplex = "half"), this.request = new globalThis.Request(this._input, this._options), this._options.searchParams) {
1035
+ const i = "?" + (typeof this._options.searchParams == "string" ? this._options.searchParams.replace(/^\?/, "") : new URLSearchParams(this._options.searchParams).toString()), s = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, i);
1036
+ (Wt && 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);
1034
1037
  }
1035
1038
  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 }));
1036
1039
  }
1037
1040
  _calculateRetryDelay(t) {
1038
- if (this._retryCount++, this._retryCount <= this._options.retry.limit && !(t instanceof Je)) {
1039
- if (t instanceof Le) {
1041
+ if (this._retryCount++, this._retryCount <= this._options.retry.limit && !(t instanceof Ze)) {
1042
+ if (t instanceof Ve) {
1040
1043
  if (!this._options.retry.statusCodes.includes(t.response.status))
1041
1044
  return 0;
1042
1045
  const a = t.response.headers.get("Retry-After");
@@ -1059,16 +1062,16 @@ class oe {
1059
1062
  try {
1060
1063
  return await t();
1061
1064
  } catch (n) {
1062
- const a = Math.min(this._calculateRetryDelay(n), we);
1065
+ const a = Math.min(this._calculateRetryDelay(n), Ae);
1063
1066
  if (a !== 0 && this._retryCount > 0) {
1064
- await Yt(a, { signal: this._options.signal });
1067
+ await Jt(a, { signal: this._options.signal });
1065
1068
  for (const i of this._options.hooks.beforeRetry)
1066
1069
  if (await i({
1067
1070
  request: this.request,
1068
1071
  options: this._options,
1069
1072
  error: n,
1070
1073
  retryCount: this._retryCount
1071
- }) === et)
1074
+ }) === tt)
1072
1075
  return;
1073
1076
  return this._retry(t);
1074
1077
  }
@@ -1085,8 +1088,8 @@ class oe {
1085
1088
  if (a instanceof Response)
1086
1089
  return a;
1087
1090
  }
1088
- const t = Jt(this.request, this._options);
1089
- return this._options.timeout === !1 ? this._options.fetch(this.request.clone(), t) : Qt(this.request.clone(), t, this.abortController, this._options);
1091
+ const t = Zt(this.request, this._options);
1092
+ return this._options.timeout === !1 ? this._options.fetch(this.request.clone(), t) : Yt(this.request.clone(), t, this.abortController, this._options);
1090
1093
  }
1091
1094
  /* istanbul ignore next */
1092
1095
  _stream(t, n) {
@@ -1123,54 +1126,54 @@ class oe {
1123
1126
  }
1124
1127
  }
1125
1128
  /*! MIT License © Sindre Sorhus */
1126
- const ve = (e) => {
1129
+ const Ce = (e) => {
1127
1130
  const t = (n, a) => oe.create(n, re(e, a));
1128
- for (const n of ze)
1131
+ for (const n of et)
1129
1132
  t[n] = (a, i) => oe.create(a, re(e, i, { method: n }));
1130
- return t.create = (n) => ve(re(n)), t.extend = (n) => ve(re(e, n)), t.stop = et, t;
1131
- }, nt = ve();
1133
+ return t.create = (n) => Ce(re(n)), t.extend = (n) => Ce(re(e, n)), t.stop = tt, t;
1134
+ }, at = Ce();
1132
1135
  let ue;
1133
1136
  const L = {
1134
- CachedPrices: `${V.ThorswapApi}/tokenlist/cached-price`,
1135
- GasRates: `${V.ThorswapApi}/resource-worker/gasPrice/getAll`,
1136
- Quote: `${V.ThorswapApi}/aggregator/tokens/quote`,
1137
- Txn: `${V.ThorswapApi}/apiusage/v2/txn`,
1138
- TokenlistProviders: `${V.ThorswapApi}/tokenlist/providers`,
1139
- TokenList: `${V.ThorswapStatic}/token-list`,
1140
- Thorname: `${V.ThorswapApi}/thorname`
1141
- }, at = typeof window < "u" ? {} : { referrer: "https://sk.thorswap.net", referer: "https://sk.thorswap.net" }, qe = () => ue || (ue = nt.create({ headers: at }), ue), ia = ({ apiKey: e, ...t }) => {
1142
- ue = nt.create({
1137
+ CachedPrices: `${N.ThorswapApi}/tokenlist/cached-price`,
1138
+ GasRates: `${N.ThorswapApi}/resource-worker/gasPrice/getAll`,
1139
+ Quote: `${N.ThorswapApi}/aggregator/tokens/quote`,
1140
+ Txn: `${N.ThorswapApi}/apiusage/v2/txn`,
1141
+ TokenlistProviders: `${N.ThorswapApi}/tokenlist/providers`,
1142
+ TokenList: `${N.ThorswapStatic}/token-list`,
1143
+ Thorname: `${N.ThorswapApi}/thorname`
1144
+ }, it = typeof window < "u" ? {} : { referrer: "https://sk.thorswap.net", referer: "https://sk.thorswap.net" }, qe = () => ue || (ue = at.create({ headers: it }), ue), ra = ({ apiKey: e, ...t }) => {
1145
+ ue = at.create({
1143
1146
  ...t,
1144
- headers: { ...at, ...t.headers, "x-api-key": e }
1147
+ headers: { ...it, ...t.headers, "x-api-key": e }
1145
1148
  });
1146
- }, R = {
1149
+ }, x = {
1147
1150
  get: (e, t) => qe().get(e, t).json(),
1148
1151
  post: (e, t) => qe().post(e, t).json()
1149
- }, Zt = ({ tokens: e, ...t }) => {
1152
+ }, zt = ({ tokens: e, ...t }) => {
1150
1153
  const n = new URLSearchParams(), a = e.filter(
1151
1154
  (i, s, p) => p.findIndex((u) => u === i) === s
1152
1155
  );
1153
1156
  for (const i of a)
1154
1157
  n.append("tokens", JSON.stringify(i));
1155
- return t.metadata && n.append("metadata", "true"), t.lookup && n.append("lookup", "true"), t.sparkline && n.append("sparkline", "true"), R.post(L.CachedPrices, {
1158
+ return t.metadata && n.append("metadata", "true"), t.lookup && n.append("lookup", "true"), t.sparkline && n.append("sparkline", "true"), x.post(L.CachedPrices, {
1156
1159
  body: n.toString(),
1157
1160
  headers: { "Content-Type": "application/x-www-form-urlencoded" }
1158
1161
  });
1159
- }, sa = {
1160
- getCachedPrices: Zt,
1161
- getQuote: (e) => R.get(L.Quote, { searchParams: e }),
1162
- getGasRates: () => R.get(L.GasRates),
1163
- getTxnDetails: (e) => R.get(L.Txn, { searchParams: e }),
1164
- getTokenlistProviders: () => R.get(L.TokenlistProviders),
1165
- getTokenList: (e) => R.get(`${L.TokenList}/${e}.json`),
1166
- getThornameAddresses: (e) => R.get(`${L.Thorname}/${e}`),
1167
- getThornameRegisteredChains: (e) => R.get(`${L.Thorname}/chains/${e}`),
1168
- getThornameRlookup: (e, t) => R.get(`${L.Thorname}/rlookup`, { searchParams: { address: e, chain: t } })
1162
+ }, pa = {
1163
+ getCachedPrices: zt,
1164
+ getQuote: (e) => x.get(L.Quote, { searchParams: e }),
1165
+ getGasRates: () => x.get(L.GasRates),
1166
+ getTxnDetails: (e) => x.get(L.Txn, { searchParams: e }),
1167
+ getTokenlistProviders: () => x.get(L.TokenlistProviders),
1168
+ getTokenList: (e) => x.get(`${L.TokenList}/${e}.json`),
1169
+ getThornameAddresses: (e) => x.get(`${L.Thorname}/${e}`),
1170
+ getThornameRegisteredChains: (e) => x.get(`${L.Thorname}/chains/${e}`),
1171
+ getThornameRlookup: (e, t) => x.get(`${L.Thorname}/rlookup`, { searchParams: { address: e, chain: t } })
1169
1172
  };
1170
- var zt = /* @__PURE__ */ ((e) => (e.SWAP_TC_TO_TC = "SWAP:TC-TC", e.SWAP_ETH_TO_TC = "SWAP:ERC20-TC", e.SWAP_TC_TO_ETH = "SWAP:TC-ERC20", e.SWAP_ETH_TO_ETH = "SWAP:ERC20-ERC20", e.SWAP_AVAX_TO_TC = "SWAP:AVAX-TC", e.SWAP_TC_TO_AVAX = "SWAP:TC-AVAX", e.SWAP_AVAX_TO_AVAX = "SWAP:AVAX-AVAX", e.SWAP_ETH_TO_AVAX = "SWAP:ETH-AVAX", e.SWAP_AVAX_TO_ETH = "SWAP:AVAX-ETH", e.SWAP_TC_TO_GAIA = "SWAP:TC-GAIA", e.SWAP_GAIA_TO_TC = "SWAP:GAIA-TC", e.SWAP_TC_TO_BNB = "SWAP:TC-BNB", e.SWAP_BNB_TO_TC = "SWAP:BNB-TC", e.SWAP_TC_TO_BTC = "SWAP:TC-BTC", e.SWAP_BTC_TO_TC = "SWAP:BTC-TC", e.SWAP_TC_TO_BCH = "SWAP:TC-BCH", e.SWAP_BCH_TO_TC = "SWAP:BCH-TC", e.SWAP_TC_TO_LTC = "SWAP:TC-LTC", e.SWAP_LTC_TO_TC = "SWAP:LTC-TC", e.SWAP_TC_TO_DOGE = "SWAP:TC-DOGE", e.SWAP_DOGE_TO_TC = "SWAP:DOGE-TC", e.TC_STATUS = "TC:STATUS", e.TC_TRANSFER = "TC:TRANSFER", e.TC_DEPOSIT = "TC:DEPOSIT", e.TC_SEND = "TC:SEND", e.TC_SWITCH = "TC:SWITCH", e.TC_LP_ADD = "TC:ADDLIQUIDITY", e.TC_LP_WITHDRAW = "TC:WITHDRAW", e.TC_TNS_CREATE = "TC:TNS-CREATE", e.TC_TNS_EXTEND = "TC:TNS-EXTEND", e.TC_TNS_UPDATE = "TC:TNS-UPDATE", e.TC_SAVINGS_ADD = "TC:ADDSAVINGS", e.TC_SAVINGS_WITHDRAW = "TC:WITHDRAWSAVINGS", e.TC_LENDING_OPEN = "TC:LENDINGOPEN", e.TC_LENDING_CLOSE = "TC:LENDINGCLOSE", e.ETH_APPROVAL = "ETH:APPROVAL", e.ETH_STATUS = "ETH:STATUS", e.ETH_TRANSFER_TO_TC = "ETH:TRANSFER:IN", e.ETH_TRANSFER_FROM_TC = "ETH:TRANSFER:OUT", e.AVAX_APPROVAL = "AVAX:APPROVAL", e.AVAX_STATUS = "AVAX:STATUS", e.AVAX_TRANSFER_TO_TC = "AVAX:TRANSFER:IN", e.AVAX_TRANSFER_FROM_TC = "AVAX:TRANSFER:OUT", e.BSC_APPROVAL = "BSC:APPROVAL", e.BSC_STATUS = "BSC:STATUS", e.BSC_TRANSFER_TO_TC = "BSC:TRANSFER:IN", e.BSC_TRANSFER_FROM_TC = "BSC:TRANSFER:OUT", e.APPROVAL = "APPROVAL", e.STATUS = "STATUS", e.TRANSFER_TO_TC = "TRANSFER:IN", e.TRANSFER_FROM_TC = "TRANSFER:OUT", e.UNSUPPORTED = "UNSUPPORTED", e.TC_LENDING = "TC:LENDING", e))(zt || {}), en = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.SUCCESS = "success", e.CANCELLED = "cancelled", e.REFUNDED = "refunded", e.REPLACED = "replaced", e.ERROR = "error", e.UNKNOWN = "unknown", e.NOT_STARTED = "not_started", e.NOT_FOUND = "not_found", e.RETRIES_EXCEEDED = "retries_exceeded", e.STREAMING = "streaming", e))(en || {}), tn = /* @__PURE__ */ ((e) => (e[e.NOT_STARTED = 0] = "NOT_STARTED", e[e.SUCCESS = 1] = "SUCCESS", e[e.REFUNDED = 2] = "REFUNDED", e))(tn || {});
1171
- const nn = "0x313ce567", it = async ({ chain: e, to: t }) => {
1173
+ var en = /* @__PURE__ */ ((e) => (e.SWAP_TC_TO_TC = "SWAP:TC-TC", e.SWAP_ETH_TO_TC = "SWAP:ERC20-TC", e.SWAP_TC_TO_ETH = "SWAP:TC-ERC20", e.SWAP_ETH_TO_ETH = "SWAP:ERC20-ERC20", e.SWAP_AVAX_TO_TC = "SWAP:AVAX-TC", e.SWAP_TC_TO_AVAX = "SWAP:TC-AVAX", e.SWAP_AVAX_TO_AVAX = "SWAP:AVAX-AVAX", e.SWAP_ETH_TO_AVAX = "SWAP:ETH-AVAX", e.SWAP_AVAX_TO_ETH = "SWAP:AVAX-ETH", e.SWAP_TC_TO_GAIA = "SWAP:TC-GAIA", e.SWAP_GAIA_TO_TC = "SWAP:GAIA-TC", e.SWAP_TC_TO_BNB = "SWAP:TC-BNB", e.SWAP_BNB_TO_TC = "SWAP:BNB-TC", e.SWAP_TC_TO_BTC = "SWAP:TC-BTC", e.SWAP_BTC_TO_TC = "SWAP:BTC-TC", e.SWAP_TC_TO_BCH = "SWAP:TC-BCH", e.SWAP_BCH_TO_TC = "SWAP:BCH-TC", e.SWAP_TC_TO_LTC = "SWAP:TC-LTC", e.SWAP_LTC_TO_TC = "SWAP:LTC-TC", e.SWAP_TC_TO_DOGE = "SWAP:TC-DOGE", e.SWAP_DOGE_TO_TC = "SWAP:DOGE-TC", e.TC_STATUS = "TC:STATUS", e.TC_TRANSFER = "TC:TRANSFER", e.TC_DEPOSIT = "TC:DEPOSIT", e.TC_SEND = "TC:SEND", e.TC_SWITCH = "TC:SWITCH", e.TC_LP_ADD = "TC:ADDLIQUIDITY", e.TC_LP_WITHDRAW = "TC:WITHDRAW", e.TC_TNS_CREATE = "TC:TNS-CREATE", e.TC_TNS_EXTEND = "TC:TNS-EXTEND", e.TC_TNS_UPDATE = "TC:TNS-UPDATE", e.TC_SAVINGS_ADD = "TC:ADDSAVINGS", e.TC_SAVINGS_WITHDRAW = "TC:WITHDRAWSAVINGS", e.TC_LENDING_OPEN = "TC:LENDINGOPEN", e.TC_LENDING_CLOSE = "TC:LENDINGCLOSE", e.ETH_APPROVAL = "ETH:APPROVAL", e.ETH_STATUS = "ETH:STATUS", e.ETH_TRANSFER_TO_TC = "ETH:TRANSFER:IN", e.ETH_TRANSFER_FROM_TC = "ETH:TRANSFER:OUT", e.AVAX_APPROVAL = "AVAX:APPROVAL", e.AVAX_STATUS = "AVAX:STATUS", e.AVAX_TRANSFER_TO_TC = "AVAX:TRANSFER:IN", e.AVAX_TRANSFER_FROM_TC = "AVAX:TRANSFER:OUT", e.BSC_APPROVAL = "BSC:APPROVAL", e.BSC_STATUS = "BSC:STATUS", e.BSC_TRANSFER_TO_TC = "BSC:TRANSFER:IN", e.BSC_TRANSFER_FROM_TC = "BSC:TRANSFER:OUT", e.APPROVAL = "APPROVAL", e.STATUS = "STATUS", e.TRANSFER_TO_TC = "TRANSFER:IN", e.TRANSFER_FROM_TC = "TRANSFER:OUT", e.UNSUPPORTED = "UNSUPPORTED", e.TC_LENDING = "TC:LENDING", e))(en || {}), tn = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.SUCCESS = "success", e.CANCELLED = "cancelled", e.REFUNDED = "refunded", e.REPLACED = "replaced", e.ERROR = "error", e.UNKNOWN = "unknown", e.NOT_STARTED = "not_started", e.NOT_FOUND = "not_found", e.RETRIES_EXCEEDED = "retries_exceeded", e.STREAMING = "streaming", e))(tn || {}), nn = /* @__PURE__ */ ((e) => (e[e.NOT_STARTED = 0] = "NOT_STARTED", e[e.SUCCESS = 1] = "SUCCESS", e[e.REFUNDED = 2] = "REFUNDED", e))(nn || {});
1174
+ const an = "0x313ce567", st = async ({ chain: e, to: t }) => {
1172
1175
  try {
1173
- const { result: n } = await R.post(Rt[e], {
1176
+ const { result: n } = await x.post(It[e], {
1174
1177
  headers: {
1175
1178
  accept: "*/*",
1176
1179
  "content-type": "application/json",
@@ -1180,37 +1183,37 @@ const nn = "0x313ce567", it = async ({ chain: e, to: t }) => {
1180
1183
  id: 44,
1181
1184
  jsonrpc: "2.0",
1182
1185
  method: "eth_call",
1183
- params: [{ to: t.toLowerCase(), data: nn }, "latest"]
1186
+ params: [{ to: t.toLowerCase(), data: an }, "latest"]
1184
1187
  })
1185
1188
  });
1186
- return parseInt(BigInt(n).toString());
1189
+ return Number.parseInt(BigInt(n).toString());
1187
1190
  } catch (n) {
1188
- return console.error(n), A[e];
1191
+ return console.error(n), g[e];
1189
1192
  }
1190
- }, an = (e) => {
1193
+ }, sn = (e) => {
1191
1194
  if (e === r.Ethereum)
1192
- return A.ETH;
1195
+ return g.ETH;
1193
1196
  const [, t] = e.split("-");
1194
- return t != null && t.startsWith("0x") ? it({ chain: r.Ethereum, to: t }) : A.ETH;
1195
- }, sn = (e) => {
1197
+ return t != null && t.startsWith("0x") ? st({ chain: r.Ethereum, to: t }) : g.ETH;
1198
+ }, rn = (e) => {
1196
1199
  const [, t] = e.split("-");
1197
- return t != null && t.startsWith("0x") ? it({ chain: r.Avalanche, to: t.toLowerCase() }) : A.AVAX;
1198
- }, rn = (e) => (e === r.BinanceSmartChain, A.BSC), pn = ({ chain: e, symbol: t }) => {
1200
+ return t != null && t.startsWith("0x") ? st({ chain: r.Avalanche, to: t.toLowerCase() }) : g.AVAX;
1201
+ }, pn = (e) => (e === r.BinanceSmartChain, g.BSC), un = ({ chain: e, symbol: t }) => {
1199
1202
  switch (e) {
1200
1203
  case r.Ethereum:
1201
- return an(t);
1202
- case r.Avalanche:
1203
1204
  return sn(t);
1204
- case r.BinanceSmartChain:
1205
+ case r.Avalanche:
1205
1206
  return rn(t);
1207
+ case r.BinanceSmartChain:
1208
+ return pn(t);
1206
1209
  default:
1207
- return A[e];
1210
+ return g[e];
1208
1211
  }
1209
- }, un = {
1210
- [Q.Average]: 1.2,
1211
- [Q.Fast]: 1.5,
1212
- [Q.Fastest]: 2
1213
- }, st = ({ chain: e, symbol: t }) => {
1212
+ }, yn = {
1213
+ [Y.Average]: 1.2,
1214
+ [Y.Fast]: 1.5,
1215
+ [Y.Fastest]: 2
1216
+ }, rt = ({ chain: e, symbol: t }) => {
1214
1217
  switch (e) {
1215
1218
  case r.Arbitrum:
1216
1219
  case r.Optimism:
@@ -1230,28 +1233,28 @@ const nn = "0x313ce567", it = async ({ chain: e, to: t }) => {
1230
1233
  default:
1231
1234
  return t === e;
1232
1235
  }
1233
- }, yn = (e) => {
1236
+ }, on = (e) => {
1234
1237
  switch (e) {
1235
1238
  case `${r.Ethereum}.THOR`:
1236
1239
  return { identifier: "ETH.THOR-0xa5f2211b9b8170f694421f2046281775e8468044", decimal: 18 };
1237
1240
  case `${r.Ethereum}.vTHOR`:
1238
1241
  return { identifier: "ETH.vTHOR-0x815c23eca83261b6ec689b60cc4a58b54bc24d8d", decimal: 18 };
1239
1242
  case r.Cosmos:
1240
- return { identifier: "GAIA.ATOM", decimal: A[e] };
1243
+ return { identifier: "GAIA.ATOM", decimal: g[e] };
1241
1244
  case r.THORChain:
1242
- return { identifier: "THOR.RUNE", decimal: A[e] };
1245
+ return { identifier: "THOR.RUNE", decimal: g[e] };
1243
1246
  case r.BinanceSmartChain:
1244
- return { identifier: "BSC.BNB", decimal: A[e] };
1247
+ return { identifier: "BSC.BNB", decimal: g[e] };
1245
1248
  case r.Maya:
1246
- return { identifier: "MAYA.CACAO", decimal: A.MAYA };
1249
+ return { identifier: "MAYA.CACAO", decimal: g.MAYA };
1247
1250
  case `${r.Maya}.MAYA`:
1248
1251
  return { identifier: "MAYA.MAYA", decimal: 4 };
1249
1252
  case `${r.Kujira}.USK`:
1250
1253
  return { identifier: `${r.Kujira}.USK`, decimal: 6 };
1251
1254
  default:
1252
- return { identifier: `${e}.${e}`, decimal: A[e] };
1255
+ return { identifier: `${e}.${e}`, decimal: g[e] };
1253
1256
  }
1254
- }, on = ({ chain: e, symbol: t }) => {
1257
+ }, dn = ({ chain: e, symbol: t }) => {
1255
1258
  if (t.includes("/"))
1256
1259
  return "Synth";
1257
1260
  switch (e) {
@@ -1276,70 +1279,70 @@ const nn = "0x313ce567", it = async ({ chain: e, to: t }) => {
1276
1279
  default:
1277
1280
  return "Native";
1278
1281
  }
1279
- }, ra = (e) => {
1282
+ }, ua = (e) => {
1280
1283
  var t;
1281
1284
  const [n, ...a] = e.split("."), i = e.includes("/"), s = a.join("."), p = (t = s == null ? void 0 : s.split("-")) == null ? void 0 : t[0];
1282
1285
  return { chain: n, symbol: s, ticker: p, synth: i };
1283
- }, dn = new RegExp(
1286
+ }, ln = new RegExp(
1284
1287
  /(.)\1{6}|\.ORG|\.NET|\.FINANCE|\.COM|WWW|HTTP|\\\\|\/\/|[\s$%:[\]]/,
1285
1288
  "gmi"
1286
- ), ln = (e) => {
1289
+ ), mn = (e) => {
1287
1290
  const [t, n] = e.split(".");
1288
1291
  if (!je.includes(t))
1289
1292
  return !0;
1290
1293
  const [, a] = n.split("-");
1291
- return st({ chain: t, symbol: n }) || !!a;
1292
- }, pa = (e) => e.filter(({ chain: t, value: n, symbol: a }) => {
1294
+ return rt({ chain: t, symbol: n }) || !!a;
1295
+ }, ya = (e) => e.filter(({ chain: t, value: n, symbol: a }) => {
1293
1296
  const i = `${t}.${a}`;
1294
- return !dn.test(i) && ln(i) && n !== "0";
1297
+ return !ln.test(i) && mn(i) && n !== "0";
1295
1298
  });
1296
- function mn({
1299
+ function Tn({
1297
1300
  liquidityUnits: e,
1298
1301
  poolUnits: t,
1299
1302
  runeDepth: n
1300
1303
  }) {
1301
- const a = k(e), i = k(t), s = k(n), p = a.mul(s), u = i.mul(i).mul(2), y = i.mul(a).mul(2), o = a.mul(a), l = i.mul(i).mul(i);
1304
+ const a = S(e), i = S(t), s = S(n), p = a.mul(s), u = i.mul(i).mul(2), y = i.mul(a).mul(2), o = a.mul(a), l = i.mul(i).mul(i);
1302
1305
  return p.mul(u.sub(y).add(o)).div(l);
1303
1306
  }
1304
- function Tn({
1307
+ function cn({
1305
1308
  liquidityUnits: e,
1306
1309
  poolUnits: t,
1307
1310
  assetDepth: n
1308
1311
  }) {
1309
- const a = k(e), i = k(t), s = k(n), p = a.mul(s), u = i.mul(i).mul(2), y = i.mul(a).mul(2), o = a.mul(a), l = p.mul(u.sub(y).add(o)), b = i.mul(i).mul(i);
1312
+ const a = S(e), i = S(t), s = S(n), p = a.mul(s), u = i.mul(i).mul(2), y = i.mul(a).mul(2), o = a.mul(a), l = p.mul(u.sub(y).add(o)), b = i.mul(i).mul(i);
1310
1313
  return l.div(b);
1311
1314
  }
1312
- function ua({
1315
+ function oa({
1313
1316
  percent: e,
1314
1317
  runeDepth: t,
1315
1318
  liquidityUnits: n,
1316
1319
  poolUnits: a
1317
1320
  }) {
1318
- return mn({ runeDepth: t, liquidityUnits: n, poolUnits: a }).mul(e);
1321
+ return Tn({ runeDepth: t, liquidityUnits: n, poolUnits: a }).mul(e);
1319
1322
  }
1320
- function ya({
1323
+ function da({
1321
1324
  percent: e,
1322
1325
  assetDepth: t,
1323
1326
  liquidityUnits: n,
1324
1327
  poolUnits: a
1325
1328
  }) {
1326
- return Tn({ assetDepth: t, liquidityUnits: n, poolUnits: a }).mul(e);
1329
+ return cn({ assetDepth: t, liquidityUnits: n, poolUnits: a }).mul(e);
1327
1330
  }
1328
- function k(e) {
1329
- return D.fromBigInt(BigInt(e), A.THOR);
1331
+ function S(e) {
1332
+ return F.fromBigInt(BigInt(e), g.THOR);
1330
1333
  }
1331
- function cn({
1334
+ function bn({
1332
1335
  liquidityUnits: e,
1333
1336
  poolUnits: t,
1334
1337
  runeDepth: n,
1335
1338
  assetDepth: a
1336
1339
  }) {
1337
1340
  return {
1338
- assetAmount: k(a).mul(e).div(t),
1339
- runeAmount: k(n).mul(e).div(t)
1341
+ assetAmount: S(a).mul(e).div(t),
1342
+ runeAmount: S(n).mul(e).div(t)
1340
1343
  };
1341
1344
  }
1342
- function oa({
1345
+ function la({
1343
1346
  liquidityUnits: e,
1344
1347
  poolUnits: t,
1345
1348
  runeDepth: n,
@@ -1347,12 +1350,12 @@ function oa({
1347
1350
  percent: i
1348
1351
  }) {
1349
1352
  return Object.fromEntries(
1350
- Object.entries(cn({ liquidityUnits: e, poolUnits: t, runeDepth: n, assetDepth: a })).map(
1353
+ Object.entries(bn({ liquidityUnits: e, poolUnits: t, runeDepth: n, assetDepth: a })).map(
1351
1354
  ([s, p]) => [s, p.mul(i)]
1352
1355
  )
1353
1356
  );
1354
1357
  }
1355
- function da({
1358
+ function ma({
1356
1359
  runeDepth: e,
1357
1360
  poolUnits: t,
1358
1361
  assetDepth: n,
@@ -1360,13 +1363,13 @@ function da({
1360
1363
  runeAmount: i,
1361
1364
  assetAmount: s
1362
1365
  }) {
1363
- const p = new D({ value: e, decimal: 8 }), u = new D({ value: n, decimal: 8 }), y = new D({ value: t, decimal: 8 }), o = new D({ value: i, decimal: 8 }), l = new D({ value: s, decimal: 8 }), b = o.mul(u), c = l.mul(p), f = o.mul(l), _ = p.mul(u), M = y.mul(b.add(c.add(f.mul(2)))), v = b.add(c.add(_.mul(2))), E = M.div(v), S = k(a).add(E);
1364
- if (E.getBaseValue("number") === 0)
1365
- return S.div(y).getBaseValue("number");
1366
- const Y = y.add(S);
1367
- return S.div(Y).getBaseValue("number");
1366
+ const p = new F({ value: e, decimal: 8 }), u = new F({ value: n, decimal: 8 }), y = new F({ value: t, decimal: 8 }), o = new F({ value: i, decimal: 8 }), l = new F({ value: s, decimal: 8 }), b = o.mul(u), T = l.mul(p), f = o.mul(l), _ = p.mul(u), M = y.mul(b.add(T.add(f.mul(2)))), v = b.add(T.add(_.mul(2))), C = M.div(v), R = S(a).add(C);
1367
+ if (C.getBaseValue("number") === 0)
1368
+ return R.div(y).getBaseValue("number");
1369
+ const J = y.add(R);
1370
+ return R.div(J).getBaseValue("number");
1368
1371
  }
1369
- function la({
1372
+ function Ta({
1370
1373
  runeAmount: e,
1371
1374
  assetAmount: t,
1372
1375
  runeDepth: n,
@@ -1374,10 +1377,10 @@ function la({
1374
1377
  }) {
1375
1378
  if (e === "0" || t === "0" || n === "0" || a === "0")
1376
1379
  return 0;
1377
- const i = k(n), s = k(a), p = k(t), u = k(e), y = p.mul(i).sub(s.mul(u)), o = s.mul(u).add(i.mul(s));
1380
+ const i = S(n), s = S(a), p = S(t), u = S(e), y = p.mul(i).sub(s.mul(u)), o = s.mul(u).add(i.mul(s));
1378
1381
  return Math.abs(y.div(o).getBaseValue("number"));
1379
1382
  }
1380
- const F = (e, t) => {
1383
+ const B = (e, t) => {
1381
1384
  switch (e) {
1382
1385
  case w.LEAVE:
1383
1386
  case w.BOND: {
@@ -1420,22 +1423,33 @@ const F = (e, t) => {
1420
1423
  return "";
1421
1424
  }
1422
1425
  };
1423
- function ma(e) {
1426
+ function ca(e) {
1424
1427
  if (e < 0)
1425
1428
  throw new Error("Invalid number of year");
1426
1429
  return 10 + e;
1427
1430
  }
1428
- function Ta(e) {
1431
+ function ba(e) {
1432
+ if (e < 0)
1433
+ throw new Error("Invalid number of year");
1434
+ return Math.round((10 + e * 1.0512) * 1e10) / 1e10;
1435
+ }
1436
+ function fa(e) {
1429
1437
  if (e.length > 30)
1430
1438
  return !1;
1431
1439
  const t = /^[a-zA-Z0-9+_-]+$/g;
1432
1440
  return !!e.match(t);
1433
1441
  }
1434
- function ca([e, t, n, a, i]) {
1442
+ function ha(e) {
1443
+ if (e.length > 30)
1444
+ return !1;
1445
+ const t = /^[a-zA-Z0-9+_-]+$/g;
1446
+ return !!e.match(t);
1447
+ }
1448
+ function wa([e, t, n, a, i]) {
1435
1449
  return `${e}'/${t}'/${n}'/${a}${typeof i != "number" ? "" : `/${i}`}`;
1436
1450
  }
1437
1451
  const We = [...Object.values(r), "TERRA"];
1438
- function bn(e = "") {
1452
+ function fn(e = "") {
1439
1453
  const t = e.toUpperCase(), [n] = t.split(".");
1440
1454
  if (We.includes(n))
1441
1455
  return !0;
@@ -1446,8 +1460,8 @@ function bn(e = "") {
1446
1460
  `Invalid identifier: ${e}. Expected format: <Chain>.<Ticker> or <Chain>.<Ticker>-<ContractAddress>`
1447
1461
  );
1448
1462
  }
1449
- const ne = 8, N = (e) => 10n ** BigInt(e), ee = (e) => Math.log10(parseFloat(e.toString()));
1450
- function fe({
1463
+ const ne = 8, W = (e) => 10n ** BigInt(e), te = (e) => Math.log10(Number.parseFloat(e.toString()));
1464
+ function he({
1451
1465
  value: e,
1452
1466
  bigIntDecimal: t = ne,
1453
1467
  decimal: n = ne
@@ -1460,22 +1474,22 @@ function fe({
1460
1474
  s > 0 && (i = "0".repeat(s) + i);
1461
1475
  const p = i.length - n;
1462
1476
  let u = i.slice(-n);
1463
- return parseInt(u[t]) >= 5 ? u = `${u.substring(0, t - 1)}${(parseInt(u[t - 1]) + 1).toString()}` : u = u.substring(0, t), `${a ? "-" : ""}${i.slice(0, p)}.${u}`.replace(
1477
+ return Number.parseInt(u[t]) >= 5 ? u = `${u.substring(0, t - 1)}${(Number.parseInt(u[t - 1]) + 1).toString()}` : u = u.substring(0, t), `${a ? "-" : ""}${i.slice(0, p)}.${u}`.replace(
1464
1478
  /\.?0*$/,
1465
1479
  ""
1466
1480
  );
1467
1481
  }
1468
- var X, Z, W, j, Ee, rt, ye, Ae, de, Ce;
1469
- const fn = class Oe {
1482
+ var G, z, q, j, Ee, pt, ye, ge, de, Oe;
1483
+ const hn = class xe {
1470
1484
  constructor(t) {
1471
- J(this, X), J(this, W), J(this, Ee), J(this, ye), J(this, de), I(this, "decimalMultiplier", 10n ** 8n), I(this, "bigIntValue", 0n), I(this, "decimal");
1472
- const n = ke(t), a = typeof t == "object";
1473
- this.decimal = a ? t.decimal : void 0, this.decimalMultiplier = a && "decimalMultiplier" in t ? t.decimalMultiplier : N(Math.max(pt(le(n)), this.decimal || 0)), C(this, Ee, rt).call(this, n);
1485
+ Z(this, G), Z(this, q), Z(this, Ee), Z(this, ye), Z(this, de), P(this, "decimalMultiplier", 10n ** 8n), P(this, "bigIntValue", 0n), P(this, "decimal");
1486
+ const n = Se(t), a = typeof t == "object";
1487
+ this.decimal = a ? t.decimal : void 0, this.decimalMultiplier = a && "decimalMultiplier" in t ? t.decimalMultiplier : W(Math.max(ut(le(n)), this.decimal || 0)), E(this, Ee, pt).call(this, n);
1474
1488
  }
1475
1489
  static fromBigInt(t, n) {
1476
- return new Oe({
1490
+ return new xe({
1477
1491
  decimal: n,
1478
- value: fe({ value: t, bigIntDecimal: n, decimal: n })
1492
+ value: he({ value: t, bigIntDecimal: n, decimal: n })
1479
1493
  });
1480
1494
  }
1481
1495
  static shiftDecimals({
@@ -1483,8 +1497,8 @@ const fn = class Oe {
1483
1497
  from: n,
1484
1498
  to: a
1485
1499
  }) {
1486
- return Oe.fromBigInt(
1487
- t.getBaseValue("bigint") * N(a) / N(n),
1500
+ return xe.fromBigInt(
1501
+ t.getBaseValue("bigint") * W(a) / W(n),
1488
1502
  a
1489
1503
  );
1490
1504
  }
@@ -1492,37 +1506,37 @@ const fn = class Oe {
1492
1506
  return new this.constructor({ decimal: this.decimal, value: t, identifier: this.toString() });
1493
1507
  }
1494
1508
  add(...t) {
1495
- return C(this, X, Z).call(this, "add", ...t);
1509
+ return E(this, G, z).call(this, "add", ...t);
1496
1510
  }
1497
1511
  sub(...t) {
1498
- return C(this, X, Z).call(this, "sub", ...t);
1512
+ return E(this, G, z).call(this, "sub", ...t);
1499
1513
  }
1500
1514
  mul(...t) {
1501
- return C(this, X, Z).call(this, "mul", ...t);
1515
+ return E(this, G, z).call(this, "mul", ...t);
1502
1516
  }
1503
1517
  div(...t) {
1504
- return C(this, X, Z).call(this, "div", ...t);
1518
+ return E(this, G, z).call(this, "div", ...t);
1505
1519
  }
1506
1520
  gt(t) {
1507
- return C(this, W, j).call(this, "gt", t);
1521
+ return E(this, q, j).call(this, "gt", t);
1508
1522
  }
1509
1523
  gte(t) {
1510
- return C(this, W, j).call(this, "gte", t);
1524
+ return E(this, q, j).call(this, "gte", t);
1511
1525
  }
1512
1526
  lt(t) {
1513
- return C(this, W, j).call(this, "lt", t);
1527
+ return E(this, q, j).call(this, "lt", t);
1514
1528
  }
1515
1529
  lte(t) {
1516
- return C(this, W, j).call(this, "lte", t);
1530
+ return E(this, q, j).call(this, "lte", t);
1517
1531
  }
1518
1532
  eqValue(t) {
1519
- return C(this, W, j).call(this, "eqValue", t);
1533
+ return E(this, q, j).call(this, "eqValue", t);
1520
1534
  }
1521
1535
  // @ts-expect-error False positive
1522
1536
  getValue(t) {
1523
1537
  const n = this.formatBigIntToSafeValue(
1524
1538
  this.bigIntValue,
1525
- this.decimal || ee(this.decimalMultiplier)
1539
+ this.decimal || te(this.decimalMultiplier)
1526
1540
  );
1527
1541
  switch (t) {
1528
1542
  case "number":
@@ -1535,7 +1549,7 @@ const fn = class Oe {
1535
1549
  }
1536
1550
  // @ts-expect-error
1537
1551
  getBaseValue(t) {
1538
- const n = this.decimalMultiplier / N(this.decimal || A.THOR), a = this.bigIntValue / n;
1552
+ const n = this.decimalMultiplier / W(this.decimal || g.THOR), a = this.bigIntValue / n;
1539
1553
  switch (t) {
1540
1554
  case "number":
1541
1555
  return Number(a);
@@ -1548,21 +1562,21 @@ const fn = class Oe {
1548
1562
  getBigIntValue(t, n) {
1549
1563
  if (!n && typeof t == "object")
1550
1564
  return t.bigIntValue;
1551
- const a = ke(t), i = le(a);
1552
- return i === "0" || i === "undefined" ? 0n : C(this, de, Ce).call(this, i, n);
1565
+ const a = Se(t), i = le(a);
1566
+ return i === "0" || i === "undefined" ? 0n : E(this, de, Oe).call(this, i, n);
1553
1567
  }
1554
1568
  toSignificant(t = 6) {
1555
1569
  const [n, a] = this.getValue("string").split("."), i = n || "", s = a || "";
1556
- if ((parseInt(i) ? i.length + s.length : s.length) <= t)
1570
+ if ((Number.parseInt(i) ? i.length + s.length : s.length) <= t)
1557
1571
  return this.getValue("string");
1558
1572
  if (i.length >= t)
1559
1573
  return i.slice(0, t).padEnd(i.length, "0");
1560
- if (parseInt(i))
1574
+ if (Number.parseInt(i))
1561
1575
  return `${i}.${s.slice(0, t - i.length)}`.padEnd(
1562
1576
  t - i.length,
1563
1577
  "0"
1564
1578
  );
1565
- const p = parseInt(s), u = `${p}`.slice(0, t);
1579
+ const p = Number.parseInt(s), u = `${p}`.slice(0, t);
1566
1580
  return `0.${u.padStart(
1567
1581
  s.length - `${p}`.length + u.length,
1568
1582
  "0"
@@ -1570,9 +1584,9 @@ const fn = class Oe {
1570
1584
  }
1571
1585
  toFixed(t = 6) {
1572
1586
  const [n, a] = this.getValue("string").split("."), i = n || "", s = a || "";
1573
- if (parseInt(i))
1587
+ if (Number.parseInt(i))
1574
1588
  return `${i}.${s.slice(0, t)}`.padEnd(t, "0");
1575
- const p = parseInt(s), u = `${p}`.slice(0, t);
1589
+ const p = Number.parseInt(s), u = `${p}`.slice(0, t);
1576
1590
  return `0.${u.padStart(
1577
1591
  s.length - `${p}`.length + u.length,
1578
1592
  "0"
@@ -1591,23 +1605,23 @@ const fn = class Oe {
1591
1605
  decimalSeparator: i = ".",
1592
1606
  thousandSeparator: s = ","
1593
1607
  } = {}) {
1594
- const p = this.getValue("number"), [u, y = ""] = p.toFixed(6).split("."), o = u.replace(/\B(?=(\d{3})+(?!\d))/g, s), l = u || y ? u === "0" ? `${parseFloat(`0.${y}`)}`.replace(".", i) : `${o}${parseInt(y) ? `${i}${y.slice(0, a)}` : ""}` : "0.00";
1608
+ const p = this.getValue("number"), [u, y = ""] = p.toFixed(6).split("."), o = u.replace(/\B(?=(\d{3})+(?!\d))/g, s), l = u || y ? u === "0" ? `${Number.parseFloat(`0.${y}`)}`.replace(".", i) : `${o}${Number.parseInt(y) ? `${i}${y.slice(0, a)}` : ""}` : "0.00";
1595
1609
  return `${n === "start" ? t : ""}${l}${n === "end" ? t : ""}`;
1596
1610
  }
1597
1611
  formatBigIntToSafeValue(t, n) {
1598
1612
  const a = n || this.decimal || ne, i = Math.max(
1599
1613
  a,
1600
- ee(this.decimalMultiplier)
1614
+ te(this.decimalMultiplier)
1601
1615
  ), s = t < 0n, p = t.toString().substring(s ? 1 : 0), u = i - (p.length - 1), y = u > 0 ? "0".repeat(u) + p : p, o = y.length - i;
1602
1616
  let l = y.slice(-i);
1603
- return parseInt(l[a]) >= 5 ? l = `${l.substring(0, a - 1)}${(parseInt(l[a - 1]) + 1).toString()}` : l = l.substring(0, a), `${s ? "-" : ""}${y.slice(
1617
+ return Number.parseInt(l[a]) >= 5 ? l = `${l.substring(0, a - 1)}${(Number.parseInt(l[a - 1]) + 1).toString()}` : l = l.substring(0, a), `${s ? "-" : ""}${y.slice(
1604
1618
  0,
1605
1619
  o
1606
1620
  )}.${l}`.replace(/\.?0*$/, "");
1607
1621
  }
1608
1622
  };
1609
- X = /* @__PURE__ */ new WeakSet(), Z = function(e, ...t) {
1610
- const n = C(this, ye, Ae).call(this, this, ...t), a = Math.max(n, ee(this.decimalMultiplier)), i = N(a), s = t.reduce(
1623
+ G = /* @__PURE__ */ new WeakSet(), z = function(e, ...t) {
1624
+ const n = E(this, ye, ge).call(this, this, ...t), a = Math.max(n, te(this.decimalMultiplier)), i = W(a), s = t.reduce(
1611
1625
  (u, y) => {
1612
1626
  const o = this.getBigIntValue(y, a);
1613
1627
  switch (e) {
@@ -1628,19 +1642,19 @@ X = /* @__PURE__ */ new WeakSet(), Z = function(e, ...t) {
1628
1642
  },
1629
1643
  //normalize is to precision multiplier base
1630
1644
  this.bigIntValue * i / this.decimalMultiplier
1631
- ), p = fe({
1645
+ ), p = he({
1632
1646
  bigIntDecimal: a,
1633
1647
  decimal: a,
1634
1648
  value: s
1635
1649
  });
1636
1650
  return new this.constructor({
1637
- decimalMultiplier: N(a),
1651
+ decimalMultiplier: W(a),
1638
1652
  decimal: this.decimal,
1639
1653
  value: p,
1640
1654
  identifier: this.toString()
1641
1655
  });
1642
- }, W = /* @__PURE__ */ new WeakSet(), j = function(e, ...t) {
1643
- const n = C(this, ye, Ae).call(this, this, ...t), a = this.getBigIntValue(t[0], n), i = this.getBigIntValue(this, n);
1656
+ }, q = /* @__PURE__ */ new WeakSet(), j = function(e, ...t) {
1657
+ const n = E(this, ye, ge).call(this, this, ...t), a = this.getBigIntValue(t[0], n), i = this.getBigIntValue(this, n);
1644
1658
  switch (e) {
1645
1659
  case "gt":
1646
1660
  return i > a;
@@ -1653,46 +1667,46 @@ X = /* @__PURE__ */ new WeakSet(), Z = function(e, ...t) {
1653
1667
  case "eqValue":
1654
1668
  return i === a;
1655
1669
  }
1656
- }, Ee = /* @__PURE__ */ new WeakSet(), rt = function(e) {
1670
+ }, Ee = /* @__PURE__ */ new WeakSet(), pt = function(e) {
1657
1671
  const t = le(e) || "0";
1658
- this.bigIntValue = C(this, de, Ce).call(this, t);
1659
- }, ye = /* @__PURE__ */ new WeakSet(), Ae = function(...e) {
1660
- const t = e.map((n) => typeof n == "object" ? n.decimal || ee(n.decimalMultiplier) : pt(le(n))).filter(Boolean);
1672
+ this.bigIntValue = E(this, de, Oe).call(this, t);
1673
+ }, ye = /* @__PURE__ */ new WeakSet(), ge = function(...e) {
1674
+ const t = e.map((n) => typeof n == "object" ? n.decimal || te(n.decimalMultiplier) : ut(le(n))).filter(Boolean);
1661
1675
  return Math.max(...t, ne);
1662
- }, de = /* @__PURE__ */ new WeakSet(), Ce = function(e, t) {
1663
- const n = t ? N(t) : this.decimalMultiplier, a = ee(n), [i = "", s = ""] = e.split(".");
1676
+ }, de = /* @__PURE__ */ new WeakSet(), Oe = function(e, t) {
1677
+ const n = t ? W(t) : this.decimalMultiplier, a = te(n), [i = "", s = ""] = e.split(".");
1664
1678
  return BigInt(`${i}${s.padEnd(a, "0")}`);
1665
1679
  };
1666
- let xe = fn;
1667
- const hn = Intl.NumberFormat("fullwide", {
1680
+ let ke = hn;
1681
+ const wn = Intl.NumberFormat("fullwide", {
1668
1682
  useGrouping: !1,
1669
1683
  maximumFractionDigits: 20
1670
1684
  });
1671
1685
  function le(e) {
1672
- const t = `${typeof e == "number" ? hn.format(e) : ke(e)}`.replaceAll(",", ".").split(".");
1686
+ const t = `${typeof e == "number" ? wn.format(e) : Se(e)}`.replaceAll(",", ".").split(".");
1673
1687
  return t.length > 1 ? `${t.slice(0, -1).join("")}.${t.at(-1)}` : t[0];
1674
1688
  }
1675
- function pt(e) {
1689
+ function ut(e) {
1676
1690
  var t;
1677
1691
  const n = ((t = e.split(".")[1]) == null ? void 0 : t.length) || 0;
1678
1692
  return Math.max(n, ne);
1679
1693
  }
1680
- function ke(e) {
1694
+ function Se(e) {
1681
1695
  return typeof e == "object" ? "getValue" in e ? e.getValue("string") : e.value : e;
1682
1696
  }
1683
- class D extends xe {
1697
+ class F extends ke {
1684
1698
  eq(t) {
1685
1699
  return this.eqValue(t);
1686
1700
  }
1687
1701
  static fromBigInt(t, n) {
1688
- return new D({
1702
+ return new F({
1689
1703
  decimal: n,
1690
- value: fe({ value: t, bigIntDecimal: n, decimal: n })
1704
+ value: he({ value: t, bigIntDecimal: n, decimal: n })
1691
1705
  });
1692
1706
  }
1693
1707
  }
1694
- const G = /* @__PURE__ */ new Map();
1695
- class x extends xe {
1708
+ const K = /* @__PURE__ */ new Map();
1709
+ class k extends ke {
1696
1710
  constructor({
1697
1711
  value: t,
1698
1712
  decimal: n,
@@ -1701,9 +1715,9 @@ class x extends xe {
1701
1715
  symbol: s,
1702
1716
  identifier: p
1703
1717
  }) {
1704
- super(typeof t == "object" ? t : { decimal: n, value: t }), I(this, "address"), I(this, "chain"), I(this, "isGasAsset", !1), I(this, "isSynthetic", !1), I(this, "symbol"), I(this, "tax"), I(this, "ticker"), I(this, "type");
1705
- const u = z(p || `${i}.${s}`);
1706
- this.type = on(u), this.tax = a, this.chain = u.chain, this.ticker = u.ticker, this.symbol = u.symbol, this.address = u.address, this.isSynthetic = u.isSynthetic, this.isGasAsset = u.isGasAsset;
1718
+ super(typeof t == "object" ? t : { decimal: n, value: t }), P(this, "address"), P(this, "chain"), P(this, "isGasAsset", !1), P(this, "isSynthetic", !1), P(this, "symbol"), P(this, "tax"), P(this, "ticker"), P(this, "type");
1719
+ const u = ee(p || `${i}.${s}`);
1720
+ this.type = dn(u), this.tax = a, this.chain = u.chain, this.ticker = u.ticker, this.symbol = u.symbol, this.address = u.address, this.isSynthetic = u.isSynthetic, this.isGasAsset = u.isGasAsset;
1707
1721
  }
1708
1722
  toString() {
1709
1723
  return this.isSynthetic ? this.symbol : `${this.chain}.${this.symbol}`;
@@ -1715,7 +1729,7 @@ class x extends xe {
1715
1729
  return this.chain === t && this.symbol === n;
1716
1730
  }
1717
1731
  chainId() {
1718
- return Ke[this.chain];
1732
+ return Qe[this.chain];
1719
1733
  }
1720
1734
  // THOR.RUNE
1721
1735
  // THOR.ETH.ETH
@@ -1725,65 +1739,65 @@ class x extends xe {
1725
1739
  if (!(a && i))
1726
1740
  throw new Error("Invalid asset url");
1727
1741
  const p = a === r.THORChain && s ? `${a}.${i}/${s}` : t;
1728
- return _e(p, n);
1742
+ return Me(p, n);
1729
1743
  }
1730
1744
  static fromString(t, n = 0) {
1731
- return _e(t, n);
1745
+ return Me(t, n);
1732
1746
  }
1733
1747
  static fromIdentifier(t, n = 0) {
1734
- return _e(t, n);
1748
+ return Me(t, n);
1735
1749
  }
1736
1750
  static fromStringSync(t, n = 0) {
1737
- const { chain: a, isSynthetic: i } = z(t), s = G.get(t.toUpperCase());
1751
+ const { chain: a, isSynthetic: i } = ee(t), s = K.get(t.toUpperCase());
1738
1752
  if (i)
1739
- return Me(t, n);
1753
+ return ve(t, n);
1740
1754
  const { tax: p, decimal: u, identifier: y } = s || {
1741
- decimal: A[a],
1755
+ decimal: g[a],
1742
1756
  identifier: t
1743
1757
  };
1744
- return new x({
1758
+ return new k({
1745
1759
  tax: p,
1746
- value: K(n, u),
1760
+ value: Q(n, u),
1747
1761
  identifier: i ? t : y,
1748
1762
  decimal: i ? 8 : u
1749
1763
  });
1750
1764
  }
1751
- static async fromStringWithBase(t, n = 0, a = A.THOR) {
1752
- const i = xe.shiftDecimals({
1753
- value: D.fromBigInt(BigInt(n)),
1765
+ static async fromStringWithBase(t, n = 0, a = g.THOR) {
1766
+ const i = ke.shiftDecimals({
1767
+ value: F.fromBigInt(BigInt(n)),
1754
1768
  from: 0,
1755
1769
  to: a
1756
1770
  }).getBaseValue("string");
1757
- return (await x.fromString(t, n)).set(i);
1771
+ return (await k.fromString(t, n)).set(i);
1758
1772
  }
1759
- static fromStringWithBaseSync(t, n = 0, a = A.THOR) {
1760
- const { chain: i, isSynthetic: s } = z(t), p = G.get(t.toUpperCase());
1773
+ static fromStringWithBaseSync(t, n = 0, a = g.THOR) {
1774
+ const { chain: i, isSynthetic: s } = ee(t), p = K.get(t.toUpperCase());
1761
1775
  if (s)
1762
- return Me(t, n);
1776
+ return ve(t, n);
1763
1777
  const { tax: u, decimal: y, identifier: o } = p || {
1764
- decimal: A[i],
1778
+ decimal: g[i],
1765
1779
  identifier: t
1766
1780
  };
1767
- return new x({
1781
+ return new k({
1768
1782
  tax: u,
1769
- value: K(BigInt(n), a),
1783
+ value: Q(BigInt(n), a),
1770
1784
  identifier: o,
1771
1785
  decimal: y
1772
1786
  });
1773
1787
  }
1774
1788
  static fromIdentifierSync(t, n = 0) {
1775
- const { chain: a, isSynthetic: i } = z(t), s = G.get(t);
1789
+ const { chain: a, isSynthetic: i } = ee(t), s = K.get(t);
1776
1790
  if (i)
1777
- return Me(t, n);
1791
+ return ve(t, n);
1778
1792
  const { tax: p, decimal: u, identifier: y } = s || {
1779
- decimal: A[a],
1793
+ decimal: g[a],
1780
1794
  identifier: t
1781
1795
  };
1782
- return new x({ tax: p, decimal: u, identifier: y, value: K(n, u) });
1796
+ return new k({ tax: p, decimal: u, identifier: y, value: Q(n, u) });
1783
1797
  }
1784
1798
  static fromChainOrSignature(t, n = 0) {
1785
- const { decimal: a, identifier: i } = yn(t);
1786
- return new x({ value: K(n, a), decimal: a, identifier: i });
1799
+ const { decimal: a, identifier: i } = on(t);
1800
+ return new k({ value: Q(n, a), decimal: a, identifier: i });
1787
1801
  }
1788
1802
  static loadStaticAssets() {
1789
1803
  return new Promise(
@@ -1792,9 +1806,9 @@ class x extends xe {
1792
1806
  import("@swapkit/tokens").then((a) => {
1793
1807
  for (const i of Object.values(a))
1794
1808
  for (const { identifier: s, chain: p, ...u } of i.tokens)
1795
- G.set(s.toUpperCase(), {
1809
+ K.set(s.toUpperCase(), {
1796
1810
  identifier: s,
1797
- decimal: "decimals" in u ? u.decimals : A[p]
1811
+ decimal: "decimals" in u ? u.decimals : g[p]
1798
1812
  });
1799
1813
  t({ ok: !0 });
1800
1814
  });
@@ -1809,8 +1823,8 @@ class x extends xe {
1809
1823
  );
1810
1824
  }
1811
1825
  }
1812
- function ge(e) {
1813
- const t = x.fromChainOrSignature(e);
1826
+ function _e(e) {
1827
+ const t = k.fromChainOrSignature(e);
1814
1828
  switch (e) {
1815
1829
  case r.Bitcoin:
1816
1830
  case r.Litecoin:
@@ -1830,25 +1844,25 @@ function ge(e) {
1830
1844
  return t.set(1e-8);
1831
1845
  }
1832
1846
  }
1833
- async function _e(e, t = 0) {
1834
- bn(e);
1835
- const n = G.get(e.toUpperCase()), a = (n == null ? void 0 : n.decimal) || await pn(z(e));
1836
- return n || G.set(e.toUpperCase(), { identifier: e, decimal: a }), new x({ decimal: a, value: K(t, a), identifier: e });
1847
+ async function Me(e, t = 0) {
1848
+ fn(e);
1849
+ const n = K.get(e.toUpperCase()), a = (n == null ? void 0 : n.decimal) || await un(ee(e));
1850
+ return n || K.set(e.toUpperCase(), { identifier: e, decimal: a }), new k({ decimal: a, value: Q(t, a), identifier: e });
1837
1851
  }
1838
- function Me(e, t = 0) {
1852
+ function ve(e, t = 0) {
1839
1853
  const [n, a] = e.split(".")[0].toUpperCase() === r.THORChain ? e.split(".").slice(1).join().split("/") : e.split("/");
1840
1854
  if (!(n && a))
1841
1855
  throw new Error("Invalid asset identifier");
1842
- return new x({
1856
+ return new k({
1843
1857
  decimal: 8,
1844
- value: K(t, 8),
1858
+ value: Q(t, 8),
1845
1859
  identifier: `${r.THORChain}.${n}/${a}`
1846
1860
  });
1847
1861
  }
1848
- function K(e, t) {
1849
- return typeof e == "bigint" ? fe({ value: e, bigIntDecimal: t, decimal: t }) : e;
1862
+ function Q(e, t) {
1863
+ return typeof e == "bigint" ? he({ value: e, bigIntDecimal: t, decimal: t }) : e;
1850
1864
  }
1851
- function z(e) {
1865
+ function ee(e) {
1852
1866
  const t = e.slice(0, 14).includes("/"), [n, a] = e.split(".")[0].toUpperCase() === r.THORChain ? e.split(".").slice(1).join().split("/") : e.split("/");
1853
1867
  if (t && !(n && a))
1854
1868
  throw new Error("Invalid asset identifier");
@@ -1856,13 +1870,13 @@ function z(e) {
1856
1870
  return {
1857
1871
  address: y == null ? void 0 : y.toLowerCase(),
1858
1872
  chain: s,
1859
- isGasAsset: st({ chain: s, symbol: o }),
1873
+ isGasAsset: rt({ chain: s, symbol: o }),
1860
1874
  isSynthetic: t,
1861
1875
  symbol: (t ? `${n}/` : "") + (y ? `${u}-${(y == null ? void 0 : y.toLowerCase()) ?? ""}` : o),
1862
1876
  ticker: u
1863
1877
  };
1864
1878
  }
1865
- const wn = {
1879
+ const An = {
1866
1880
  /**
1867
1881
  * Core
1868
1882
  */
@@ -1871,6 +1885,7 @@ const wn = {
1871
1885
  core_extend_error: 10003,
1872
1886
  core_inbound_data_not_found: 10004,
1873
1887
  core_approve_asset_address_or_from_not_found: 10005,
1888
+ core_plugin_not_found: 10006,
1874
1889
  core_chain_halted: 10099,
1875
1890
  /**
1876
1891
  * Core - Wallet Connection
@@ -1895,7 +1910,6 @@ const wn = {
1895
1910
  core_swap_contract_not_supported: 10205,
1896
1911
  core_swap_transaction_error: 10206,
1897
1912
  core_swap_quote_mode_not_supported: 10207,
1898
- core_swap_provider_not_found: 10208,
1899
1913
  /**
1900
1914
  * Core - Transaction
1901
1915
  */
@@ -1941,12 +1955,12 @@ class d extends Error {
1941
1955
  stack: n == null ? void 0 : n.stack,
1942
1956
  message: n == null ? void 0 : n.message
1943
1957
  }), super(t, {
1944
- cause: { code: wn[t], message: t }
1958
+ cause: { code: An[t], message: t }
1945
1959
  }), Object.setPrototypeOf(this, d.prototype);
1946
1960
  }
1947
1961
  }
1948
- const ut = ({ chain: e, txHash: t }) => {
1949
- const n = Qe[e];
1962
+ const yt = ({ chain: e, txHash: t }) => {
1963
+ const n = Ye[e];
1950
1964
  switch (e) {
1951
1965
  case r.Binance:
1952
1966
  case r.Maya:
@@ -1971,8 +1985,8 @@ const ut = ({ chain: e, txHash: t }) => {
1971
1985
  default:
1972
1986
  throw new Error(`Unsupported chain: ${e}`);
1973
1987
  }
1974
- }, yt = ({ chain: e, address: t }) => {
1975
- const n = Qe[e];
1988
+ }, ot = ({ chain: e, address: t }) => {
1989
+ const n = Ye[e];
1976
1990
  switch (e) {
1977
1991
  case r.Arbitrum:
1978
1992
  case r.Avalanche:
@@ -1996,127 +2010,124 @@ const ut = ({ chain: e, txHash: t }) => {
1996
2010
  throw new Error(`Unsupported chain: ${e}`);
1997
2011
  }
1998
2012
  };
1999
- var An = /* @__PURE__ */ ((e) => (e.Approve = "approve", e.CheckOnly = "checkOnly", e))(An || {});
2000
- function ba({
2013
+ var gn = /* @__PURE__ */ ((e) => (e.Approve = "approve", e.CheckOnly = "checkOnly", e))(gn || {});
2014
+ function Aa({
2001
2015
  stagenet: e,
2002
2016
  wallets: t,
2003
- providers: n,
2017
+ plugins: n,
2004
2018
  config: a = {},
2005
2019
  apis: i,
2006
2020
  rpcUrls: s
2007
2021
  }) {
2008
2022
  const p = {}, u = {};
2009
- for (const m of n) {
2010
- const { name: h, methods: B } = m({ wallets: p, stagenet: e });
2011
- u[h] = B;
2023
+ for (const c of n) {
2024
+ const { name: h, methods: I } = c({ wallets: p, stagenet: e });
2025
+ u[h] = I;
2012
2026
  }
2013
- const y = t.reduce((m, h) => (m[h.connectMethodName] = h.connect({
2027
+ const y = t.reduce((c, h) => (c[h.connectMethodName] = h.connect({
2014
2028
  addChain: l,
2015
2029
  config: a,
2016
2030
  apis: i,
2017
2031
  rpcUrls: s
2018
- }), m), {});
2019
- function o(m) {
2020
- const h = u[m] || Object.values(u)[0];
2032
+ }), c), {});
2033
+ function o(c) {
2034
+ const h = u[c] || Object.values(u)[0];
2021
2035
  if (!h)
2022
- throw new d(
2023
- "core_swap_provider_not_found",
2024
- "Could not find the requested provider"
2025
- );
2036
+ throw new d("core_plugin_not_found", "Could not find the requested plugin");
2026
2037
  return h;
2027
2038
  }
2028
- function l(m) {
2029
- p[m.chain] = m;
2039
+ function l(c) {
2040
+ p[c.chain] = c;
2030
2041
  }
2031
2042
  function b({
2032
- assetValue: m,
2043
+ assetValue: c,
2033
2044
  type: h = "checkOnly",
2034
- contractAddress: B
2045
+ contractAddress: I
2035
2046
  }) {
2036
- const { address: O, chain: H, isGasAsset: lt, isSynthetic: mt } = m, He = [r.Ethereum, r.Avalanche, r.BinanceSmartChain].includes(H);
2037
- if (He && lt || !He || mt)
2047
+ const { address: O, chain: D, isGasAsset: mt, isSynthetic: Tt } = c, De = [r.Ethereum, r.Avalanche, r.BinanceSmartChain].includes(D);
2048
+ if (De && mt || !De || Tt)
2038
2049
  return Promise.resolve(h === "checkOnly" ? !0 : "approved");
2039
- const U = p[H], Fe = h === "checkOnly" ? U == null ? void 0 : U.isApproved : U == null ? void 0 : U.approve;
2050
+ const X = p[D], Fe = h === "checkOnly" ? X == null ? void 0 : X.isApproved : X == null ? void 0 : X.approve;
2040
2051
  if (!Fe)
2041
2052
  throw new d("core_wallet_connection_not_found");
2042
- const De = f(H);
2043
- if (!(O && De))
2053
+ const Le = f(D);
2054
+ if (!(O && Le))
2044
2055
  throw new d("core_approve_asset_address_or_from_not_found");
2045
- const Tt = B;
2056
+ const ct = I;
2046
2057
  return Fe({
2047
- amount: m.getBaseValue("bigint"),
2058
+ amount: c.getBaseValue("bigint"),
2048
2059
  assetAddress: O,
2049
- from: De,
2050
- spenderAddress: Tt
2060
+ from: Le,
2061
+ spenderAddress: ct
2051
2062
  });
2052
2063
  }
2053
- function c(m) {
2054
- return p[m];
2064
+ function T(c) {
2065
+ return p[c];
2055
2066
  }
2056
- function f(m) {
2067
+ function f(c) {
2057
2068
  var h;
2058
- return ((h = c(m)) == null ? void 0 : h.address) || "";
2069
+ return ((h = T(c)) == null ? void 0 : h.address) || "";
2059
2070
  }
2060
- function _(m) {
2071
+ function _(c) {
2061
2072
  var h;
2062
- return ((h = c(m)) == null ? void 0 : h.balance) || [];
2073
+ return ((h = T(c)) == null ? void 0 : h.balance) || [];
2063
2074
  }
2064
- function M(m, h) {
2065
- return ut({ chain: m, txHash: h });
2075
+ function M(c, h) {
2076
+ return yt({ chain: c, txHash: h });
2066
2077
  }
2067
- function v(m, h) {
2068
- return yt({ chain: m, address: h });
2078
+ function v(c, h) {
2079
+ return ot({ chain: c, address: h });
2069
2080
  }
2070
- function E({ address: m, chain: h }) {
2071
- var B, O;
2072
- return (O = (B = c(h)) == null ? void 0 : B.validateAddress) == null ? void 0 : O.call(B, m);
2081
+ function C({ address: c, chain: h }) {
2082
+ var I, O;
2083
+ return (O = (I = T(h)) == null ? void 0 : I.validateAddress) == null ? void 0 : O.call(I, c);
2073
2084
  }
2074
- async function S(m, h) {
2075
- const B = [x.fromChainOrSignature(m)], O = c(m);
2085
+ async function R(c, h) {
2086
+ const I = [k.fromChainOrSignature(c)], O = T(c);
2076
2087
  try {
2077
2088
  if (!O)
2078
2089
  throw new d("core_wallet_connection_not_found");
2079
- const H = await (O == null ? void 0 : O.getBalance(O.address, h));
2080
- return O.balance = H != null && H.length ? H : B, O;
2081
- } catch (H) {
2082
- throw new d("core_wallet_connection_not_found", H);
2090
+ const D = await (O == null ? void 0 : O.getBalance(O.address, h));
2091
+ return O.balance = D != null && D.length ? D : I, O;
2092
+ } catch (D) {
2093
+ throw new d("core_wallet_connection_not_found", D);
2083
2094
  }
2084
2095
  }
2085
- function Y(m, h) {
2096
+ function J(c, h) {
2086
2097
  return b({
2087
- assetValue: m,
2098
+ assetValue: c,
2088
2099
  contractAddress: h,
2089
2100
  type: "approve"
2090
2101
  /* Approve */
2091
2102
  });
2092
2103
  }
2093
- function he(m, h) {
2104
+ function we(c, h) {
2094
2105
  return b({
2095
- assetValue: m,
2106
+ assetValue: c,
2096
2107
  contractAddress: h,
2097
2108
  type: "checkOnly"
2098
2109
  /* CheckOnly */
2099
2110
  });
2100
2111
  }
2101
- function dt({ provider: m, ...h }) {
2102
- return o(m == null ? void 0 : m.name).swap({ provider: m, ...h });
2112
+ function lt({ provider: c, ...h }) {
2113
+ return o(c == null ? void 0 : c.name).swap({ provider: c, ...h });
2103
2114
  }
2104
2115
  return {
2105
2116
  ...u,
2106
2117
  ...y,
2107
- approveAssetValue: Y,
2118
+ approveAssetValue: J,
2108
2119
  getAddress: f,
2109
2120
  getBalance: _,
2110
2121
  getExplorerAddressUrl: v,
2111
2122
  getExplorerTxUrl: M,
2112
- getWallet: c,
2113
- getWalletWithBalance: S,
2114
- isAssetValueApproved: he,
2115
- swap: dt,
2116
- validateAddress: E
2123
+ getWallet: T,
2124
+ getWalletWithBalance: R,
2125
+ isAssetValueApproved: we,
2126
+ swap: lt,
2127
+ validateAddress: C
2117
2128
  };
2118
2129
  }
2119
- const gn = [
2130
+ const _n = [
2120
2131
  {
2121
2132
  inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
2122
2133
  stateMutability: "nonpayable",
@@ -2207,7 +2218,7 @@ const gn = [
2207
2218
  type: "function"
2208
2219
  },
2209
2220
  { stateMutability: "payable", type: "receive" }
2210
- ], _n = [
2221
+ ], Mn = [
2211
2222
  {
2212
2223
  inputs: [
2213
2224
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2351,7 +2362,7 @@ const gn = [
2351
2362
  type: "function"
2352
2363
  },
2353
2364
  { stateMutability: "payable", type: "receive" }
2354
- ], Mn = [
2365
+ ], vn = [
2355
2366
  {
2356
2367
  inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
2357
2368
  stateMutability: "nonpayable",
@@ -2456,7 +2467,7 @@ const gn = [
2456
2467
  type: "function"
2457
2468
  },
2458
2469
  { stateMutability: "payable", type: "receive" }
2459
- ], vn = [
2470
+ ], Cn = [
2460
2471
  {
2461
2472
  inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
2462
2473
  stateMutability: "nonpayable",
@@ -2691,7 +2702,7 @@ const gn = [
2691
2702
  type: "function"
2692
2703
  },
2693
2704
  { stateMutability: "payable", type: "receive" }
2694
- ], Cn = [
2705
+ ], On = [
2695
2706
  {
2696
2707
  inputs: [
2697
2708
  { internalType: "address", name: "_ttp", type: "address" },
@@ -2810,7 +2821,7 @@ const gn = [
2810
2821
  type: "function"
2811
2822
  },
2812
2823
  { stateMutability: "payable", type: "receive" }
2813
- ], Ne = [
2824
+ ], $e = [
2814
2825
  {
2815
2826
  inputs: [{ internalType: "address", name: "_WETH", type: "address" }],
2816
2827
  stateMutability: "nonpayable",
@@ -3211,7 +3222,7 @@ const gn = [
3211
3222
  type: "function"
3212
3223
  },
3213
3224
  { stateMutability: "payable", type: "receive" }
3214
- ], $e = [
3225
+ ], Ue = [
3215
3226
  {
3216
3227
  inputs: [
3217
3228
  {
@@ -5398,7 +5409,7 @@ const gn = [
5398
5409
  stateMutability: "payable",
5399
5410
  type: "receive"
5400
5411
  }
5401
- ], Ue = [
5412
+ ], Xe = [
5402
5413
  {
5403
5414
  inputs: [
5404
5415
  { internalType: "address", name: "_factory", type: "address" },
@@ -5737,7 +5748,7 @@ const gn = [
5737
5748
  type: "function"
5738
5749
  },
5739
5750
  { stateMutability: "payable", type: "receive" }
5740
- ], On = [
5751
+ ], xn = [
5741
5752
  {
5742
5753
  inputs: [
5743
5754
  { internalType: "address", name: "_factory", type: "address" },
@@ -6076,7 +6087,7 @@ const gn = [
6076
6087
  type: "function"
6077
6088
  },
6078
6089
  { stateMutability: "payable", type: "receive" }
6079
- ], xn = [
6090
+ ], kn = [
6080
6091
  {
6081
6092
  inputs: [
6082
6093
  { internalType: "address", name: "_factory", type: "address" },
@@ -6415,7 +6426,7 @@ const gn = [
6415
6426
  type: "function"
6416
6427
  },
6417
6428
  { stateMutability: "payable", type: "receive" }
6418
- ], kn = [
6429
+ ], Sn = [
6419
6430
  {
6420
6431
  inputs: [
6421
6432
  { internalType: "address", name: "_factory", type: "address" },
@@ -6754,7 +6765,7 @@ const gn = [
6754
6765
  type: "function"
6755
6766
  },
6756
6767
  { stateMutability: "payable", type: "receive" }
6757
- ], Sn = [
6768
+ ], Rn = [
6758
6769
  {
6759
6770
  inputs: [
6760
6771
  { internalType: "address", name: "_factory", type: "address" },
@@ -7093,7 +7104,7 @@ const gn = [
7093
7104
  type: "function"
7094
7105
  },
7095
7106
  { stateMutability: "payable", type: "receive" }
7096
- ], Rn = [
7107
+ ], In = [
7097
7108
  {
7098
7109
  inputs: [
7099
7110
  { internalType: "address", name: "_factory", type: "address" },
@@ -7516,23 +7527,23 @@ const gn = [
7516
7527
  type: "function"
7517
7528
  },
7518
7529
  { stateMutability: "payable", type: "receive" }
7519
- ], In = {
7530
+ ], Pn = {
7520
7531
  // AVAX
7521
- ["0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106".toLowerCase()]: On,
7532
+ ["0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106".toLowerCase()]: xn,
7522
7533
  ["0xC22FBb3133dF781E6C25ea6acebe2D2Bb8CeA2f9".toLowerCase()]: Bn,
7523
- ["0x60aE616a2155Ee3d9A68541Ba4544862310933d4".toLowerCase()]: kn,
7524
- ["0x1111111254fb6c44bAC0beD2854e76F90643097d".toLowerCase()]: $e,
7525
- ["0x6131B5fae19EA4f9D964eAc0408E4408b66337b5".toLowerCase()]: Ne,
7534
+ ["0x60aE616a2155Ee3d9A68541Ba4544862310933d4".toLowerCase()]: Sn,
7535
+ ["0x1111111254fb6c44bAC0beD2854e76F90643097d".toLowerCase()]: Ue,
7536
+ ["0x6131B5fae19EA4f9D964eAc0408E4408b66337b5".toLowerCase()]: $e,
7526
7537
  // BSC
7527
- ["0x10ED43C718714eb63d5aA57B78B54704E256024E".toLowerCase()]: Ue,
7538
+ ["0x10ED43C718714eb63d5aA57B78B54704E256024E".toLowerCase()]: Xe,
7528
7539
  // ETH
7529
- ["0x6131B5fae19EA4f9D964eAc0408E4408b66337b5".toLowerCase()]: Ne,
7530
- ["0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f".toLowerCase()]: xn,
7531
- ["0xEfF92A263d31888d860bD50809A8D171709b7b1c".toLowerCase()]: Ue,
7532
- ["0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D".toLowerCase()]: Sn,
7533
- ["0xE592427A0AEce92De3Edee1F18E0157C05861564".toLowerCase()]: Rn,
7534
- ["0x1111111254fb6c44bac0bed2854e76f90643097d".toLowerCase()]: $e
7535
- }, Pn = [
7540
+ ["0x6131B5fae19EA4f9D964eAc0408E4408b66337b5".toLowerCase()]: $e,
7541
+ ["0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f".toLowerCase()]: kn,
7542
+ ["0xEfF92A263d31888d860bD50809A8D171709b7b1c".toLowerCase()]: Xe,
7543
+ ["0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D".toLowerCase()]: Rn,
7544
+ ["0xE592427A0AEce92De3Edee1F18E0157C05861564".toLowerCase()]: In,
7545
+ ["0x1111111254fb6c44bac0bed2854e76f90643097d".toLowerCase()]: Ue
7546
+ }, Hn = [
7536
7547
  {
7537
7548
  inputs: [
7538
7549
  { internalType: "address", name: "_ttp", type: "address" },
@@ -7651,7 +7662,7 @@ const gn = [
7651
7662
  type: "function"
7652
7663
  },
7653
7664
  { stateMutability: "payable", type: "receive" }
7654
- ], Hn = [
7665
+ ], Dn = [
7655
7666
  {
7656
7667
  inputs: [
7657
7668
  { internalType: "address", name: "_ttp", type: "address" },
@@ -7889,7 +7900,7 @@ const gn = [
7889
7900
  type: "function"
7890
7901
  },
7891
7902
  { stateMutability: "payable", type: "receive" }
7892
- ], Dn = [
7903
+ ], Ln = [
7893
7904
  {
7894
7905
  inputs: [
7895
7906
  { internalType: "address", name: "_ttp", type: "address" },
@@ -8016,7 +8027,7 @@ const gn = [
8016
8027
  type: "function"
8017
8028
  },
8018
8029
  { stateMutability: "payable", type: "receive" }
8019
- ], Ln = [
8030
+ ], Vn = [
8020
8031
  {
8021
8032
  inputs: [
8022
8033
  { internalType: "address", name: "_ttp", type: "address" },
@@ -8143,7 +8154,7 @@ const gn = [
8143
8154
  type: "function"
8144
8155
  },
8145
8156
  { stateMutability: "payable", type: "receive" }
8146
- ], Vn = [
8157
+ ], Nn = [
8147
8158
  {
8148
8159
  inputs: [
8149
8160
  { internalType: "address", name: "_ttp", type: "address" },
@@ -8524,28 +8535,28 @@ const gn = [
8524
8535
  type: "function"
8525
8536
  },
8526
8537
  { stateMutability: "payable", type: "receive" }
8527
- ], ot = {
8528
- ["0x7C38b8B2efF28511ECc14a621e263857Fb5771d3".toLowerCase()]: gn,
8529
- ["0xB6fA6f1DcD686F4A573Fd243a6FABb4ba36Ba98c".toLowerCase()]: Mn,
8530
- ["0xd31f7e39afECEc4855fecc51b693F9A0Cec49fd2".toLowerCase()]: vn
8531
- }, Nn = {
8532
- ...In,
8533
- ...ot,
8538
+ ], dt = {
8539
+ ["0x7C38b8B2efF28511ECc14a621e263857Fb5771d3".toLowerCase()]: _n,
8540
+ ["0xB6fA6f1DcD686F4A573Fd243a6FABb4ba36Ba98c".toLowerCase()]: vn,
8541
+ ["0xd31f7e39afECEc4855fecc51b693F9A0Cec49fd2".toLowerCase()]: Cn
8542
+ }, $n = {
8543
+ ...Pn,
8544
+ ...dt,
8534
8545
  // AVAX
8535
- ["0x942c6dA485FD6cEf255853ef83a149d43A73F18a".toLowerCase()]: Cn,
8536
- ["0x5505BE604dFA8A1ad402A71f8A357fba47F9bf5a".toLowerCase()]: _n,
8537
- ["0x3b7DbdD635B99cEa39D3d95Dbd0217F05e55B212".toLowerCase()]: Hn,
8546
+ ["0x942c6dA485FD6cEf255853ef83a149d43A73F18a".toLowerCase()]: On,
8547
+ ["0x5505BE604dFA8A1ad402A71f8A357fba47F9bf5a".toLowerCase()]: Mn,
8548
+ ["0x3b7DbdD635B99cEa39D3d95Dbd0217F05e55B212".toLowerCase()]: Dn,
8538
8549
  // BSC
8539
8550
  ["0x30912B38618D3D37De3191A4FFE982C65a9aEC2E".toLowerCase()]: En,
8540
8551
  // ETH
8541
- ["0xbf365e79aA44A2164DA135100C57FDB6635ae870".toLowerCase()]: Pn,
8552
+ ["0xbf365e79aA44A2164DA135100C57FDB6635ae870".toLowerCase()]: Hn,
8542
8553
  ["0x86904Eb2b3c743400D03f929F2246EfA80B91215".toLowerCase()]: Fn,
8543
- ["0x3660dE6C56cFD31998397652941ECe42118375DA".toLowerCase()]: Dn,
8544
- ["0xBd68cBe6c247e2c3a0e36B8F0e24964914f26Ee8".toLowerCase()]: Ln,
8545
- ["0xe4ddca21881bac219af7f217703db0475d2a9f02".toLowerCase()]: Vn,
8554
+ ["0x3660dE6C56cFD31998397652941ECe42118375DA".toLowerCase()]: Ln,
8555
+ ["0xBd68cBe6c247e2c3a0e36B8F0e24964914f26Ee8".toLowerCase()]: Vn,
8556
+ ["0xe4ddca21881bac219af7f217703db0475d2a9f02".toLowerCase()]: Nn,
8546
8557
  ["0x11733abf0cdb43298f7e949c930188451a9a9ef2".toLowerCase()]: qn,
8547
8558
  ["0xb33874810e5395eb49d8bd7e912631db115d5a03".toLowerCase()]: Wn
8548
- }, $n = ({
8559
+ }, Un = ({
8549
8560
  streamSwap: e,
8550
8561
  contractAddress: t,
8551
8562
  recipient: n,
@@ -8559,43 +8570,46 @@ const gn = [
8559
8570
  router: o,
8560
8571
  memoStreamingSwap: l,
8561
8572
  tcMemo: b,
8562
- tcRouter: c,
8573
+ tcRouter: T,
8563
8574
  tcVault: f,
8564
8575
  vault: _,
8565
8576
  token: M
8566
8577
  }
8567
8578
  }) => {
8568
- const v = !!ot[t.toLowerCase()];
8579
+ const v = !!dt[t.toLowerCase()];
8569
8580
  if (v && !o)
8570
8581
  throw new Error("Router is required on calldata for swapIn with GenericContract");
8571
- const E = b || y, S = e && l || E;
8582
+ const C = b || y, R = e && l || C;
8572
8583
  if (!(f || _))
8573
8584
  throw new Error("TC Vault is required on calldata");
8574
- if (!(c || o))
8585
+ if (!(T || o))
8575
8586
  throw new Error("TC Router is required on calldata");
8576
- if (!S)
8587
+ if (!R)
8577
8588
  throw new Error("TC Memo is required on calldata");
8578
8589
  if (!M)
8579
8590
  throw new Error("Token is required on calldata");
8580
- const Y = [
8591
+ const J = [
8581
8592
  // v2 contracts don't have tcVault, tcRouter, tcMemo but vault, router, memo
8582
- a(c || o),
8593
+ a(T || o),
8583
8594
  a(f || _),
8584
- S.replace("{recipientAddress}", n),
8595
+ R.replace("{recipientAddress}", n),
8585
8596
  a(M),
8586
8597
  i
8587
- ], he = v ? [a(o), p, u] : [s, u];
8588
- return [...Y, ...he];
8589
- }, Un = (e) => {
8590
- const t = e ? te.ThornodeStagenet : te.ThornodeMainnet;
8591
- return R.get(`${t}/thorchain/inbound_addresses`);
8598
+ ], we = v ? [a(o), p, u] : [s, u];
8599
+ return [...J, ...we];
8592
8600
  }, Xn = (e) => {
8593
- const t = e ? te.ThornodeStagenet : te.ThornodeMainnet;
8594
- return R.get(`${t}/thorchain/mimir`);
8595
- }, Xe = () => Object.values(r).reduce(
8601
+ const t = e ? U.MayanodeStagenet : U.MayanodeMainnet;
8602
+ return x.get(`${t}/mayachain/mimir`);
8603
+ }, Gn = (e) => {
8604
+ const t = e ? U.ThornodeStagenet : U.ThornodeMainnet;
8605
+ return x.get(`${t}/thorchain/inbound_addresses`);
8606
+ }, jn = (e) => {
8607
+ const t = e ? U.ThornodeStagenet : U.ThornodeMainnet;
8608
+ return x.get(`${t}/thorchain/mimir`);
8609
+ }, Ge = () => Object.values(r).reduce(
8596
8610
  (e, t) => (e[t] = null, e),
8597
8611
  {}
8598
- ), jn = ({
8612
+ ), Kn = ({
8599
8613
  chain: e,
8600
8614
  address: t
8601
8615
  }) => {
@@ -8608,28 +8622,28 @@ const gn = [
8608
8622
  return !0;
8609
8623
  }
8610
8624
  };
8611
- var $, me, ae, P, ie, se;
8612
- class fa {
8625
+ var $, me, ae, H, ie, Te, se;
8626
+ class ga {
8613
8627
  constructor({ stagenet: t } = {}) {
8614
- T(this, "connectedChains", Xe());
8615
- T(this, "connectedWallets", Xe());
8616
- T(this, "stagenet", !1);
8617
- T(this, "getAddress", (t) => {
8628
+ m(this, "connectedChains", Ge());
8629
+ m(this, "connectedWallets", Ge());
8630
+ m(this, "stagenet", !1);
8631
+ m(this, "getAddress", (t) => {
8618
8632
  var n;
8619
8633
  return ((n = this.connectedChains[t]) == null ? void 0 : n.address) || "";
8620
8634
  });
8621
- T(this, "getExplorerTxUrl", (t, n) => ut({ chain: t, txHash: n }));
8622
- T(this, "getWallet", (t) => this.connectedWallets[t]);
8623
- T(this, "getExplorerAddressUrl", (t, n) => yt({ chain: t, address: n }));
8624
- T(this, "getBalance", async (t, n) => {
8635
+ m(this, "getExplorerTxUrl", (t, n) => yt({ chain: t, txHash: n }));
8636
+ m(this, "getWallet", (t) => this.connectedWallets[t]);
8637
+ m(this, "getExplorerAddressUrl", (t, n) => ot({ chain: t, address: n }));
8638
+ m(this, "getBalance", async (t, n) => {
8625
8639
  const a = await this.getWalletByChain(t, n);
8626
8640
  return (a == null ? void 0 : a.balance) || [];
8627
8641
  });
8628
- T(this, "swap", async ({
8642
+ m(this, "swap", async ({
8629
8643
  streamSwap: t,
8630
8644
  recipient: n,
8631
8645
  route: a,
8632
- feeOptionKey: i = Q.Average
8646
+ feeOptionKey: i = Y.Average
8633
8647
  // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <explanation>
8634
8648
  }) => {
8635
8649
  var u, y;
@@ -8639,72 +8653,72 @@ class fa {
8639
8653
  } = a, p = s.startsWith("ERC20-") ? r.Ethereum : s.startsWith("ARC20-") ? r.Avalanche : s.startsWith("BEP20-") ? r.BinanceSmartChain : void 0;
8640
8654
  if (!a.complete)
8641
8655
  throw new d("core_swap_route_not_complete");
8642
- if (_t.includes(s) && p) {
8656
+ if (Mt.includes(s) && p) {
8643
8657
  const o = this.connectedWallets[p];
8644
8658
  if (!(o != null && o.sendTransaction))
8645
8659
  throw new d("core_wallet_connection_not_found");
8646
8660
  if (!(t ? (u = a == null ? void 0 : a.streamingSwap) == null ? void 0 : u.transaction : a == null ? void 0 : a.transaction))
8647
8661
  throw new d("core_swap_route_transaction_not_found");
8648
- const { data: b, from: c, to: f, value: _ } = a.transaction, M = {
8662
+ const { data: b, from: T, to: f, value: _ } = a.transaction, M = {
8649
8663
  data: b,
8650
- from: c,
8664
+ from: T,
8651
8665
  to: f.toLowerCase(),
8652
- chainId: BigInt(Ke[p]),
8666
+ chainId: BigInt(Qe[p]),
8653
8667
  value: _ ? BigInt(_) : 0n
8654
8668
  };
8655
8669
  return o.sendTransaction(M, i);
8656
8670
  }
8657
- if (vt.includes(s)) {
8671
+ if (Ct.includes(s)) {
8658
8672
  if (!a.calldata.fromAsset)
8659
8673
  throw new d("core_swap_asset_not_recognized");
8660
- const o = await x.fromString(a.calldata.fromAsset);
8674
+ const o = await k.fromString(a.calldata.fromAsset);
8661
8675
  if (!o)
8662
8676
  throw new d("core_swap_asset_not_recognized");
8663
- const { address: l } = await g(this, $).call(this, o.chain), {
8677
+ const { address: l } = await A(this, $).call(this, o.chain), {
8664
8678
  contract: b,
8665
- calldata: { expiration: c, amountIn: f, memo: _, memoStreamingSwap: M }
8666
- } = a, v = o.add(D.fromBigInt(BigInt(f), o.decimal)), E = t && M || _;
8679
+ calldata: { expiration: T, amountIn: f, memo: _, memoStreamingSwap: M }
8680
+ } = a, v = o.add(F.fromBigInt(BigInt(f), o.decimal)), C = t && M || _;
8667
8681
  return this.deposit({
8668
- expiration: c,
8682
+ expiration: T,
8669
8683
  assetValue: v,
8670
- memo: E,
8684
+ memo: C,
8671
8685
  feeOptionKey: i,
8672
8686
  router: b,
8673
8687
  recipient: l
8674
8688
  });
8675
8689
  }
8676
- if (Mt.includes(s) && p) {
8690
+ if (vt.includes(s) && p) {
8677
8691
  const { calldata: o, contract: l } = a;
8678
8692
  if (!l)
8679
8693
  throw new d("core_swap_contract_not_found");
8680
- const b = this.connectedWallets[p], c = this.getAddress(p);
8681
- if (!(b != null && b.sendTransaction && c))
8694
+ const b = this.connectedWallets[p], T = this.getAddress(p);
8695
+ if (!(b != null && b.sendTransaction && T))
8682
8696
  throw new d("core_wallet_connection_not_found");
8683
- const { getProvider: f, toChecksumAddress: _ } = await import("@swapkit/toolbox-evm"), M = f(p), v = Nn[l.toLowerCase()];
8697
+ const { getProvider: f, toChecksumAddress: _ } = await import("@swapkit/toolbox-evm"), M = f(p), v = $n[l.toLowerCase()];
8684
8698
  if (!v)
8685
8699
  throw new d("core_swap_contract_not_supported", {
8686
8700
  contractAddress: l
8687
8701
  });
8688
- const S = await (await ((y = b.createContract) == null ? void 0 : y.call(b, l, v, M))).getFunction("swapIn").populateTransaction(
8689
- ...$n({
8702
+ const R = await (await ((y = b.createContract) == null ? void 0 : y.call(b, l, v, M))).getFunction("swapIn").populateTransaction(
8703
+ ...Un({
8690
8704
  streamSwap: t,
8691
8705
  toChecksumAddress: _,
8692
8706
  contractAddress: l,
8693
8707
  recipient: n,
8694
8708
  calldata: o
8695
8709
  }),
8696
- { from: c }
8710
+ { from: T }
8697
8711
  );
8698
- return b.sendTransaction(S, i);
8712
+ return b.sendTransaction(R, i);
8699
8713
  }
8700
8714
  throw new d("core_swap_quote_mode_not_supported", { quoteMode: s });
8701
8715
  });
8702
- T(this, "getWalletByChain", async (t, n) => {
8716
+ m(this, "getWalletByChain", async (t, n) => {
8703
8717
  var p, u;
8704
8718
  const a = this.getAddress(t);
8705
8719
  if (!a)
8706
8720
  return null;
8707
- const i = [x.fromChainOrSignature(t)], s = (p = this.connectedChains[t]) == null ? void 0 : p.walletType;
8721
+ const i = [k.fromChainOrSignature(t)], s = (p = this.connectedChains[t]) == null ? void 0 : p.walletType;
8708
8722
  try {
8709
8723
  const y = await ((u = this.getWallet(t)) == null ? void 0 : u.getBalance(a, n));
8710
8724
  return this.connectedChains[t] = {
@@ -8716,37 +8730,37 @@ class fa {
8716
8730
  return console.error(y), { address: a, balance: i, walletType: s };
8717
8731
  }
8718
8732
  });
8719
- T(this, "approveAssetValue", (t, n) => g(this, ae).call(this, { assetValue: t, type: "approve", contractAddress: n }));
8720
- T(this, "isAssetValueApproved", (t, n) => g(this, ae).call(this, { assetValue: t, contractAddress: n, type: "checkOnly" }));
8721
- T(this, "validateAddress", ({ address: t, chain: n }) => {
8733
+ m(this, "approveAssetValue", (t, n) => A(this, ae).call(this, { assetValue: t, type: "approve", contractAddress: n }));
8734
+ m(this, "isAssetValueApproved", (t, n) => A(this, ae).call(this, { assetValue: t, contractAddress: n, type: "checkOnly" }));
8735
+ m(this, "validateAddress", ({ address: t, chain: n }) => {
8722
8736
  var a, i;
8723
8737
  return (i = (a = this.getWallet(n)) == null ? void 0 : a.validateAddress) == null ? void 0 : i.call(a, t);
8724
8738
  });
8725
- T(this, "transfer", async (t) => {
8739
+ m(this, "transfer", async (t) => {
8726
8740
  const n = this.connectedWallets[t.assetValue.chain];
8727
8741
  if (!n)
8728
8742
  throw new d("core_wallet_connection_not_found");
8729
8743
  try {
8730
- return await n.transfer(g(this, se).call(this, t));
8744
+ return await n.transfer(A(this, se).call(this, t));
8731
8745
  } catch (a) {
8732
8746
  throw new d("core_swap_transaction_error", a);
8733
8747
  }
8734
8748
  });
8735
- T(this, "deposit", async ({
8749
+ m(this, "deposit", async ({
8736
8750
  assetValue: t,
8737
8751
  recipient: n,
8738
8752
  router: a,
8739
8753
  ...i
8740
8754
  }) => {
8741
8755
  const { chain: s, symbol: p, ticker: u } = t, y = this.connectedWallets[s], o = this.connectedChains[s];
8742
- if (!await jn({
8756
+ if (!await Kn({
8743
8757
  address: o == null ? void 0 : o.address,
8744
8758
  chain: s
8745
8759
  }))
8746
8760
  throw new d("core_transaction_invalid_sender_address");
8747
8761
  if (!y)
8748
8762
  throw new d("core_wallet_connection_not_found");
8749
- const b = g(this, se).call(this, {
8763
+ const b = A(this, se).call(this, {
8750
8764
  assetValue: t,
8751
8765
  recipient: n,
8752
8766
  router: a,
@@ -8756,23 +8770,23 @@ class fa {
8756
8770
  switch (s) {
8757
8771
  case r.THORChain:
8758
8772
  case r.Maya: {
8759
- const c = y;
8760
- return await (n === "" ? c.deposit(b) : c.transfer(b));
8773
+ const T = y;
8774
+ return await (n === "" ? T.deposit(b) : T.transfer(b));
8761
8775
  }
8762
8776
  case r.Ethereum:
8763
8777
  case r.BinanceSmartChain:
8764
8778
  case r.Avalanche: {
8765
- const { getChecksumAddressFromAsset: c } = await import("@swapkit/toolbox-evm"), f = s === r.Avalanche ? wt : s === r.BinanceSmartChain ? At : ht;
8779
+ const { getChecksumAddressFromAsset: T } = await import("@swapkit/toolbox-evm"), f = s === r.Avalanche ? At : s === r.BinanceSmartChain ? gt : wt;
8766
8780
  return await y.call({
8767
8781
  abi: f,
8768
- contractAddress: a || (await g(this, $).call(this, s)).router,
8782
+ contractAddress: a || (await A(this, $).call(this, s)).router,
8769
8783
  funcName: "depositWithExpiry",
8770
8784
  funcParams: [
8771
8785
  n,
8772
- c({ chain: s, symbol: p, ticker: u }, s),
8786
+ T({ chain: s, symbol: p, ticker: u }, s),
8773
8787
  t.getBaseValue("string"),
8774
8788
  b.memo,
8775
- i.expiration || parseInt(`${((/* @__PURE__ */ new Date()).getTime() + 15 * 60 * 1e3) / 1e3}`)
8789
+ i.expiration || Number.parseInt(`${((/* @__PURE__ */ new Date()).getTime() + 15 * 60 * 1e3) / 1e3}`)
8776
8790
  ],
8777
8791
  txOverrides: {
8778
8792
  from: b.from,
@@ -8783,15 +8797,15 @@ class fa {
8783
8797
  default:
8784
8798
  return await y.transfer(b);
8785
8799
  }
8786
- } catch (c) {
8787
- const f = c == null ? void 0 : c.message.toLowerCase(), _ = f == null ? void 0 : f.includes("insufficient funds"), M = f == null ? void 0 : f.includes("gas"), v = f == null ? void 0 : f.includes("server"), E = f == null ? void 0 : f.includes("user rejected"), S = _ ? "core_transaction_deposit_insufficient_funds_error" : M ? "core_transaction_deposit_gas_error" : v ? "core_transaction_deposit_server_error" : E ? "core_transaction_user_rejected" : "core_transaction_deposit_error";
8788
- throw new d(S, c);
8800
+ } catch (T) {
8801
+ const f = typeof T == "string" ? T.toLowerCase() : T == null ? void 0 : T.message.toLowerCase(), _ = f == null ? void 0 : f.includes("insufficient funds"), M = f == null ? void 0 : f.includes("gas"), v = f == null ? void 0 : f.includes("server"), C = f == null ? void 0 : f.includes("user rejected"), R = _ ? "core_transaction_deposit_insufficient_funds_error" : M ? "core_transaction_deposit_gas_error" : v ? "core_transaction_deposit_server_error" : C ? "core_transaction_user_rejected" : "core_transaction_deposit_error";
8802
+ throw new d(R, T);
8789
8803
  }
8790
8804
  });
8791
8805
  /**
8792
8806
  * TC related Methods
8793
8807
  */
8794
- T(this, "createLiquidity", async ({
8808
+ m(this, "createLiquidity", async ({
8795
8809
  runeAssetValue: t,
8796
8810
  assetValue: n
8797
8811
  }) => {
@@ -8799,9 +8813,9 @@ class fa {
8799
8813
  throw new d("core_transaction_create_liquidity_invalid_params");
8800
8814
  let a = "", i = "";
8801
8815
  try {
8802
- a = await g(this, P).call(this, {
8816
+ a = await A(this, H).call(this, {
8803
8817
  assetValue: t,
8804
- memo: F(w.DEPOSIT, {
8818
+ memo: B(w.DEPOSIT, {
8805
8819
  ...n,
8806
8820
  address: this.getAddress(n.chain)
8807
8821
  })
@@ -8810,9 +8824,9 @@ class fa {
8810
8824
  throw new d("core_transaction_create_liquidity_rune_error", s);
8811
8825
  }
8812
8826
  try {
8813
- i = await g(this, P).call(this, {
8827
+ i = await A(this, H).call(this, {
8814
8828
  assetValue: n,
8815
- memo: F(w.DEPOSIT, {
8829
+ memo: B(w.DEPOSIT, {
8816
8830
  ...n,
8817
8831
  address: this.getAddress(r.THORChain)
8818
8832
  })
@@ -8822,7 +8836,7 @@ class fa {
8822
8836
  }
8823
8837
  return { runeTx: a, assetTx: i };
8824
8838
  });
8825
- T(this, "addLiquidity", async ({
8839
+ m(this, "addLiquidity", async ({
8826
8840
  runeAssetValue: t,
8827
8841
  assetValue: n,
8828
8842
  runeAddr: a,
@@ -8830,41 +8844,41 @@ class fa {
8830
8844
  isPendingSymmAsset: s,
8831
8845
  mode: p = "sym"
8832
8846
  }) => {
8833
- const { chain: u, symbol: y } = n, o = p === "sym", l = (t == null ? void 0 : t.gt(0)) && (o || p === "rune"), b = (n == null ? void 0 : n.gt(0)) && (o || p === "asset"), c = s || l, f = c ? a || this.getAddress(r.THORChain) : "", _ = o || p === "asset" ? i || this.getAddress(u) : "";
8847
+ const { chain: u, symbol: y } = n, o = p === "sym", l = (t == null ? void 0 : t.gt(0)) && (o || p === "rune"), b = (n == null ? void 0 : n.gt(0)) && (o || p === "asset"), T = s || l, f = T ? a || this.getAddress(r.THORChain) : "", _ = o || p === "asset" ? i || this.getAddress(u) : "";
8834
8848
  if (!(l || b))
8835
8849
  throw new d("core_transaction_add_liquidity_invalid_params");
8836
- if (c && !f)
8850
+ if (T && !f)
8837
8851
  throw new d("core_transaction_add_liquidity_no_rune_address");
8838
8852
  let M, v;
8839
8853
  if (l && t)
8840
8854
  try {
8841
- M = await g(this, P).call(this, {
8855
+ M = await A(this, H).call(this, {
8842
8856
  assetValue: t,
8843
- memo: F(w.DEPOSIT, {
8857
+ memo: B(w.DEPOSIT, {
8844
8858
  chain: u,
8845
8859
  symbol: y,
8846
8860
  address: _
8847
8861
  })
8848
8862
  });
8849
- } catch (E) {
8850
- throw new d("core_transaction_add_liquidity_rune_error", E);
8863
+ } catch (C) {
8864
+ throw new d("core_transaction_add_liquidity_rune_error", C);
8851
8865
  }
8852
8866
  if (b && n)
8853
8867
  try {
8854
- v = await g(this, P).call(this, {
8868
+ v = await A(this, H).call(this, {
8855
8869
  assetValue: n,
8856
- memo: F(w.DEPOSIT, {
8870
+ memo: B(w.DEPOSIT, {
8857
8871
  chain: u,
8858
8872
  symbol: y,
8859
8873
  address: f
8860
8874
  })
8861
8875
  });
8862
- } catch (E) {
8863
- throw new d("core_transaction_add_liquidity_asset_error", E);
8876
+ } catch (C) {
8877
+ throw new d("core_transaction_add_liquidity_asset_error", C);
8864
8878
  }
8865
8879
  return { runeTx: M, assetTx: v };
8866
8880
  });
8867
- T(this, "addLiquidityPart", ({
8881
+ m(this, "addLiquidityPart", ({
8868
8882
  assetValue: t,
8869
8883
  poolAddress: n,
8870
8884
  address: a,
@@ -8872,21 +8886,21 @@ class fa {
8872
8886
  }) => {
8873
8887
  if (i && !a)
8874
8888
  throw new d("core_transaction_add_liquidity_invalid_params");
8875
- const s = F(w.DEPOSIT, {
8889
+ const s = B(w.DEPOSIT, {
8876
8890
  chain: n.split(".")[0],
8877
8891
  symbol: n.split(".")[1],
8878
8892
  address: i ? a : ""
8879
8893
  });
8880
- return g(this, P).call(this, { assetValue: t, memo: s });
8894
+ return A(this, H).call(this, { assetValue: t, memo: s });
8881
8895
  });
8882
- T(this, "withdraw", ({
8896
+ m(this, "withdraw", ({
8883
8897
  memo: t,
8884
8898
  assetValue: n,
8885
8899
  percent: a,
8886
8900
  from: i,
8887
8901
  to: s
8888
8902
  }) => {
8889
- const p = s === "rune" && i !== "rune" ? x.fromChainOrSignature(r.THORChain) : i === "sym" && s === "sym" || i === "rune" || i === "asset" ? void 0 : n, u = ge(i === "asset" ? n.chain : r.THORChain), y = t || F(w.WITHDRAW, {
8903
+ const p = s === "rune" && i !== "rune" ? k.fromChainOrSignature(r.THORChain) : i === "sym" && s === "sym" || i === "rune" || i === "asset" ? void 0 : n, u = _e(i === "asset" ? n.chain : r.THORChain), y = t || B(w.WITHDRAW, {
8890
8904
  symbol: n.symbol,
8891
8905
  chain: n.chain,
8892
8906
  ticker: n.ticker,
@@ -8894,62 +8908,69 @@ class fa {
8894
8908
  targetAssetString: p == null ? void 0 : p.toString(),
8895
8909
  singleSide: !1
8896
8910
  });
8897
- return g(this, P).call(this, { assetValue: u, memo: y });
8911
+ return A(this, H).call(this, { assetValue: u, memo: y });
8898
8912
  });
8899
- T(this, "savings", ({
8913
+ m(this, "savings", ({
8900
8914
  assetValue: t,
8901
8915
  memo: n,
8902
8916
  percent: a,
8903
8917
  type: i
8904
8918
  }) => {
8905
- const s = i === "add" ? w.DEPOSIT : w.WITHDRAW, p = n || F(s, {
8919
+ const s = i === "add" ? w.DEPOSIT : w.WITHDRAW, p = n || B(s, {
8906
8920
  ticker: t.ticker,
8907
8921
  symbol: t.symbol,
8908
8922
  chain: t.chain,
8909
8923
  singleSide: !0,
8910
8924
  basisPoints: a ? Math.min(1e4, Math.round(a * 100)) : void 0
8911
- }), u = s === w.DEPOSIT ? t : ge(t.chain);
8912
- return g(this, P).call(this, { memo: p, assetValue: u });
8925
+ }), u = s === w.DEPOSIT ? t : _e(t.chain);
8926
+ return A(this, H).call(this, { memo: p, assetValue: u });
8913
8927
  });
8914
- T(this, "loan", ({
8928
+ m(this, "loan", ({
8915
8929
  assetValue: t,
8916
8930
  memo: n,
8917
8931
  minAmount: a,
8918
8932
  type: i
8919
- }) => g(this, P).call(this, {
8933
+ }) => A(this, H).call(this, {
8920
8934
  assetValue: t,
8921
- memo: n || F(i === "open" ? w.OPEN_LOAN : w.CLOSE_LOAN, {
8935
+ memo: n || B(i === "open" ? w.OPEN_LOAN : w.CLOSE_LOAN, {
8922
8936
  asset: t.toString(),
8923
8937
  minAmount: a.toString(),
8924
8938
  address: this.getAddress(t.chain)
8925
8939
  })
8926
8940
  }));
8927
- T(this, "nodeAction", ({
8941
+ m(this, "nodeAction", ({
8928
8942
  type: t,
8929
8943
  assetValue: n,
8930
8944
  address: a
8931
8945
  }) => {
8932
- const i = t === "bond" ? w.BOND : t === "unbond" ? w.UNBOND : w.LEAVE, s = F(i, {
8946
+ const i = t === "bond" ? w.BOND : t === "unbond" ? w.UNBOND : w.LEAVE, s = B(i, {
8933
8947
  address: a,
8934
8948
  unbondAmount: t === "unbond" ? n.getBaseValue("number") : void 0
8935
8949
  });
8936
- return g(this, ie).call(this, {
8950
+ return A(this, ie).call(this, {
8937
8951
  memo: s,
8938
- assetValue: t === "bond" ? n : ge(r.THORChain)
8952
+ assetValue: t === "bond" ? n : _e(r.THORChain)
8939
8953
  });
8940
8954
  });
8941
- T(this, "registerThorname", ({
8955
+ m(this, "registerThorname", ({
8956
+ assetValue: t,
8957
+ ...n
8958
+ }) => A(this, ie).call(this, {
8959
+ assetValue: t,
8960
+ memo: B(w.THORNAME_REGISTER, n)
8961
+ }));
8962
+ m(this, "registerMayaname", ({
8942
8963
  assetValue: t,
8943
8964
  ...n
8944
- }) => g(this, ie).call(this, {
8965
+ }) => A(this, Te).call(this, {
8945
8966
  assetValue: t,
8946
- memo: F(w.THORNAME_REGISTER, n)
8967
+ memo: B(w.THORNAME_REGISTER, n)
8947
8968
  }));
8948
- T(this, "extend", ({ wallets: t, config: n, apis: a = {}, rpcUrls: i = {} }) => {
8969
+ m(this, "extend", ({ wallets: t, config: n, apis: a = {}, rpcUrls: i = {} }) => {
8949
8970
  try {
8950
8971
  for (const s of t)
8951
8972
  this[s.connectMethodName] = s.connect({
8952
- addChain: g(this, me),
8973
+ addChain: A(this, me),
8953
8974
  config: n || {},
8954
8975
  apis: a,
8955
8976
  rpcUrls: i
@@ -8958,7 +8979,7 @@ class fa {
8958
8979
  throw new d("core_extend_error", s);
8959
8980
  }
8960
8981
  });
8961
- T(this, "estimateMaxSendableAmount", async ({
8982
+ m(this, "estimateMaxSendableAmount", async ({
8962
8983
  chain: t,
8963
8984
  params: n
8964
8985
  }) => {
@@ -8997,52 +9018,52 @@ class fa {
8997
9018
  /**
8998
9019
  * Wallet connection methods
8999
9020
  */
9000
- // biome-ignore lint/nursery/useAwait: Extended methods
9001
- T(this, "connectXDEFI", async (t) => {
9021
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9022
+ m(this, "connectXDEFI", async (t) => {
9002
9023
  throw new d("core_wallet_xdefi_not_installed");
9003
9024
  });
9004
- // biome-ignore lint/nursery/useAwait: Extended methods
9005
- T(this, "connectEVMWallet", async (t, n) => {
9025
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9026
+ m(this, "connectEVMWallet", async (t, n) => {
9006
9027
  throw new d("core_wallet_evmwallet_not_installed");
9007
9028
  });
9008
- // biome-ignore lint/nursery/useAwait: Extended methods
9009
- T(this, "connectWalletconnect", async (t, n) => {
9029
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9030
+ m(this, "connectWalletconnect", async (t, n) => {
9010
9031
  throw new d("core_wallet_walletconnect_not_installed");
9011
9032
  });
9012
- // biome-ignore lint/nursery/useAwait: Extended methods
9013
- T(this, "connectKeepkey", async (t, n) => {
9033
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9034
+ m(this, "connectKeepkey", async (t, n) => {
9014
9035
  throw new d("core_wallet_keepkey_not_installed");
9015
9036
  });
9016
- // biome-ignore lint/nursery/useAwait: Extended methods
9017
- T(this, "connectKeystore", async (t, n) => {
9037
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9038
+ m(this, "connectKeystore", async (t, n) => {
9018
9039
  throw new d("core_wallet_keystore_not_installed");
9019
9040
  });
9020
- // biome-ignore lint/nursery/useAwait: Extended methods
9021
- T(this, "connectLedger", async (t, n) => {
9041
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9042
+ m(this, "connectLedger", async (t, n) => {
9022
9043
  throw new d("core_wallet_ledger_not_installed");
9023
9044
  });
9024
- // biome-ignore lint/nursery/useAwait: Extended methods
9025
- T(this, "connectTrezor", async (t, n) => {
9045
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9046
+ m(this, "connectTrezor", async (t, n) => {
9026
9047
  throw new d("core_wallet_trezor_not_installed");
9027
9048
  });
9028
- // biome-ignore lint/nursery/useAwait: Extended methods
9029
- T(this, "connectKeplr", async (t) => {
9049
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9050
+ m(this, "connectKeplr", async (t) => {
9030
9051
  throw new d("core_wallet_keplr_not_installed");
9031
9052
  });
9032
- // biome-ignore lint/nursery/useAwait: Extended methods
9033
- T(this, "connectOkx", async (t) => {
9053
+ // biome-ignore lint/suspicious/useAwait: Extended methods
9054
+ m(this, "connectOkx", async (t) => {
9034
9055
  throw new d("core_wallet_okx_not_installed");
9035
9056
  });
9036
- T(this, "disconnectChain", (t) => {
9057
+ m(this, "disconnectChain", (t) => {
9037
9058
  this.connectedChains[t] = null, this.connectedWallets[t] = null;
9038
9059
  });
9039
- q(this, $, async (t) => {
9060
+ V(this, $, async (t) => {
9040
9061
  switch (t) {
9041
9062
  case r.Maya:
9042
9063
  case r.THORChain:
9043
9064
  return { gas_rate: "0", router: "", address: "", halted: !1, chain: t };
9044
9065
  default: {
9045
- const a = (await Un(this.stagenet)).find((i) => i.chain === t);
9066
+ const a = (await Gn(this.stagenet)).find((i) => i.chain === t);
9046
9067
  if (!a)
9047
9068
  throw new d("core_inbound_data_not_found");
9048
9069
  if (a != null && a.halted)
@@ -9051,7 +9072,7 @@ class fa {
9051
9072
  }
9052
9073
  }
9053
9074
  });
9054
- q(this, me, ({
9075
+ V(this, me, ({
9055
9076
  chain: t,
9056
9077
  address: n,
9057
9078
  balance: a,
@@ -9064,7 +9085,7 @@ class fa {
9064
9085
  walletType: i || "unknown"
9065
9086
  }, this.connectedWallets[t] = { ...s };
9066
9087
  });
9067
- q(this, ae, async ({
9088
+ V(this, ae, async ({
9068
9089
  assetValue: t,
9069
9090
  type: n = "checkOnly",
9070
9091
  contractAddress: a
@@ -9075,27 +9096,27 @@ class fa {
9075
9096
  const l = this.connectedWallets[s], b = n === "checkOnly" ? l == null ? void 0 : l.isApproved : l == null ? void 0 : l.approve;
9076
9097
  if (!b)
9077
9098
  throw new d("core_wallet_connection_not_found");
9078
- const c = this.getAddress(s);
9079
- if (!(i && c))
9099
+ const T = this.getAddress(s);
9100
+ if (!(i && T))
9080
9101
  throw new d("core_approve_asset_address_or_from_not_found");
9081
- const f = a || (await g(this, $).call(this, s)).router;
9102
+ const f = a || (await A(this, $).call(this, s)).router;
9082
9103
  return b({
9083
9104
  amount: t.getBaseValue("bigint"),
9084
9105
  assetAddress: i,
9085
- from: c,
9106
+ from: T,
9086
9107
  spenderAddress: f
9087
9108
  });
9088
9109
  });
9089
- q(this, P, async ({
9110
+ V(this, H, async ({
9090
9111
  assetValue: t,
9091
9112
  memo: n,
9092
- feeOptionKey: a = Q.Fast
9113
+ feeOptionKey: a = Y.Fast
9093
9114
  }) => {
9094
9115
  const {
9095
9116
  gas_rate: i,
9096
9117
  router: s,
9097
9118
  address: p
9098
- } = await g(this, $).call(this, t.chain), u = (parseInt(i) || 0) * un[a];
9119
+ } = await A(this, $).call(this, t.chain), u = (Number.parseInt(i) || 0) * yn[a];
9099
9120
  return this.deposit({
9100
9121
  assetValue: t,
9101
9122
  recipient: p,
@@ -9104,7 +9125,16 @@ class fa {
9104
9125
  feeRate: u
9105
9126
  });
9106
9127
  });
9107
- q(this, ie, async ({
9128
+ V(this, ie, async ({
9129
+ memo: t,
9130
+ assetValue: n
9131
+ }) => {
9132
+ const a = await jn(this.stagenet);
9133
+ if (a.HALTCHAINGLOBAL >= 1 || a.HALTTHORCHAIN >= 1)
9134
+ throw new d("core_chain_halted");
9135
+ return this.deposit({ assetValue: n, recipient: "", memo: t });
9136
+ });
9137
+ V(this, Te, async ({
9108
9138
  memo: t,
9109
9139
  assetValue: n
9110
9140
  }) => {
@@ -9113,7 +9143,7 @@ class fa {
9113
9143
  throw new d("core_chain_halted");
9114
9144
  return this.deposit({ assetValue: n, recipient: "", memo: t });
9115
9145
  });
9116
- q(this, se, ({ assetValue: t, ...n }) => ({
9146
+ V(this, se, ({ assetValue: t, ...n }) => ({
9117
9147
  ...n,
9118
9148
  memo: n.memo || "",
9119
9149
  from: this.getAddress(t.chain),
@@ -9122,77 +9152,79 @@ class fa {
9122
9152
  this.stagenet = !!t;
9123
9153
  }
9124
9154
  }
9125
- $ = new WeakMap(), me = new WeakMap(), ae = new WeakMap(), P = new WeakMap(), ie = new WeakMap(), se = new WeakMap();
9155
+ $ = new WeakMap(), me = new WeakMap(), ae = new WeakMap(), H = new WeakMap(), ie = new WeakMap(), Te = new WeakMap(), se = new WeakMap();
9126
9156
  export {
9127
- _t as AGG_SWAP,
9157
+ Mt as AGG_SWAP,
9128
9158
  L as ApiEndpoints,
9129
- te as ApiUrl,
9130
- An as ApproveMode,
9131
- x as AssetValue,
9132
- A as BaseDecimal,
9133
- xe as BigIntArithmetics,
9159
+ U as ApiUrl,
9160
+ gn as ApproveMode,
9161
+ k as AssetValue,
9162
+ g as BaseDecimal,
9163
+ ke as BigIntArithmetics,
9134
9164
  r as Chain,
9135
- Se as ChainId,
9136
- aa as ChainIdToChain,
9137
- Ke as ChainToChainId,
9138
- Qe as ChainToExplorerUrl,
9139
- na as ChainToHexChainId,
9140
- Rt as ChainToRPC,
9165
+ Re as ChainId,
9166
+ sa as ChainIdToChain,
9167
+ Qe as ChainToChainId,
9168
+ Ye as ChainToExplorerUrl,
9169
+ ia as ChainToHexChainId,
9170
+ It as ChainToRPC,
9141
9171
  Et as ContractAddress,
9142
- ea as CosmosChainList,
9143
- xt as CosmosChains,
9144
- Ct as DerivationPath,
9145
- Zn as EVMChainList,
9172
+ na as CosmosChainList,
9173
+ kt as CosmosChains,
9174
+ Ot as DerivationPath,
9175
+ ea as EVMChainList,
9146
9176
  je as EVMChains,
9147
- Q as FeeOption,
9148
- It as LedgerErrorCode,
9177
+ Y as FeeOption,
9178
+ Pt as LedgerErrorCode,
9149
9179
  w as MemoType,
9150
- Yn as NetworkDerivationPath,
9151
- gt as QuoteMode,
9152
- Ge as RPCUrl,
9153
- R as RequestClient,
9154
- Mt as SWAP_IN,
9155
- vt as SWAP_OUT,
9156
- tn as StreamingSwapProgressStatus,
9157
- Jn as SubstrateChains,
9158
- ba as SwapKit,
9159
- sa as SwapKitApi,
9160
- fa as SwapKitCore,
9180
+ Zn as NetworkDerivationPath,
9181
+ _t as QuoteMode,
9182
+ Ke as RPCUrl,
9183
+ x as RequestClient,
9184
+ vt as SWAP_IN,
9185
+ Ct as SWAP_OUT,
9186
+ nn as StreamingSwapProgressStatus,
9187
+ zn as SubstrateChains,
9188
+ Aa as SwapKit,
9189
+ pa as SwapKitApi,
9190
+ ga as SwapKitCore,
9161
9191
  d as SwapKitError,
9162
- D as SwapKitNumber,
9163
- wt as TCAvalancheDepositABI,
9164
- At as TCBscDepositABI,
9165
- ht as TCEthereumVaultAbi,
9166
- ta as TCSupportedChainList,
9167
- kt as TCSupportedChains,
9168
- zt as TransactionType,
9169
- en as TxStatus,
9170
- zn as UTXOChainList,
9171
- Ot as UTXOChains,
9192
+ F as SwapKitNumber,
9193
+ At as TCAvalancheDepositABI,
9194
+ gt as TCBscDepositABI,
9195
+ wt as TCEthereumVaultAbi,
9196
+ aa as TCSupportedChainList,
9197
+ St as TCSupportedChains,
9198
+ en as TransactionType,
9199
+ tn as TxStatus,
9200
+ ta as UTXOChainList,
9201
+ xt as UTXOChains,
9172
9202
  Bt as WalletOption,
9173
- ra as assetFromString,
9174
- at as defaultRequestHeaders,
9175
- ca as derivationPathToString,
9176
- Qn as erc20ABI,
9177
- pa as filterAssets,
9178
- fe as formatBigIntToSafeValue,
9179
- un as gasFeeMultiplier,
9180
- on as getAssetType,
9181
- Tn as getAsymmetricAssetShare,
9182
- ya as getAsymmetricAssetWithdrawAmount,
9183
- mn as getAsymmetricRuneShare,
9184
- ua as getAsymmetricRuneWithdrawAmount,
9185
- yn as getCommonAssetInfo,
9186
- pn as getDecimal,
9187
- da as getEstimatedPoolShare,
9188
- la as getLiquiditySlippage,
9189
- F as getMemoFor,
9190
- ge as getMinAmountByChain,
9191
- cn as getSymmetricPoolShare,
9192
- oa as getSymmetricWithdraw,
9193
- ma as getTHORNameCost,
9194
- st as isGasAsset,
9195
- ia as setRequestClientConfig,
9196
- Ta as validateTHORName
9203
+ ua as assetFromString,
9204
+ it as defaultRequestHeaders,
9205
+ wa as derivationPathToString,
9206
+ Jn as erc20ABI,
9207
+ ya as filterAssets,
9208
+ he as formatBigIntToSafeValue,
9209
+ yn as gasFeeMultiplier,
9210
+ dn as getAssetType,
9211
+ cn as getAsymmetricAssetShare,
9212
+ da as getAsymmetricAssetWithdrawAmount,
9213
+ Tn as getAsymmetricRuneShare,
9214
+ oa as getAsymmetricRuneWithdrawAmount,
9215
+ on as getCommonAssetInfo,
9216
+ un as getDecimal,
9217
+ ma as getEstimatedPoolShare,
9218
+ Ta as getLiquiditySlippage,
9219
+ ba as getMAYANameCost,
9220
+ B as getMemoFor,
9221
+ _e as getMinAmountByChain,
9222
+ bn as getSymmetricPoolShare,
9223
+ la as getSymmetricWithdraw,
9224
+ ca as getTHORNameCost,
9225
+ rt as isGasAsset,
9226
+ ra as setRequestClientConfig,
9227
+ ha as validateMAYAName,
9228
+ fa as validateTHORName
9197
9229
  };
9198
9230
  //# sourceMappingURL=index.es.js.map