@swapkit/types 1.0.0-rc.36 → 1.0.0-rc.38
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.cjs +1 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +61 -178
- package/dist/index.es.js +71 -185
- package/dist/index.es.js.map +1 -1
- package/package.json +5 -10
- package/src/abis/erc20.ts +57 -57
- package/src/abis/tcEthVault.ts +284 -284
- package/src/chainflip.ts +8 -8
- package/src/commonTypes.ts +40 -44
- package/src/index.ts +7 -8
- package/src/network.ts +138 -102
- package/src/thorchain.ts +8 -8
- package/src/transactions.ts +3 -3
- package/src/wallet.ts +13 -13
- package/src/errors/apiError.ts +0 -75
- package/src/errors/displayMessages.ts +0 -72
- package/src/errors/index.ts +0 -2
- package/src/errors/types.ts +0 -145
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var h = (e, a, n) => a in e ? O(e, a, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[a] = n;
|
|
3
|
-
var s = (e, a, n) => (h(e, typeof a != "symbol" ? a + "" : a, n), n);
|
|
4
|
-
const G = [
|
|
1
|
+
const O = [
|
|
5
2
|
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
|
|
6
3
|
{
|
|
7
4
|
anonymous: !1,
|
|
@@ -99,7 +96,7 @@ const G = [
|
|
|
99
96
|
stateMutability: "nonpayable",
|
|
100
97
|
type: "function"
|
|
101
98
|
}
|
|
102
|
-
],
|
|
99
|
+
], h = [
|
|
103
100
|
{
|
|
104
101
|
inputs: [{ internalType: "address", name: "rune", type: "address" }],
|
|
105
102
|
stateMutability: "nonpayable",
|
|
@@ -274,7 +271,7 @@ const G = [
|
|
|
274
271
|
stateMutability: "view",
|
|
275
272
|
type: "function"
|
|
276
273
|
}
|
|
277
|
-
],
|
|
274
|
+
], B = [
|
|
278
275
|
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
|
|
279
276
|
{
|
|
280
277
|
anonymous: !1,
|
|
@@ -438,7 +435,7 @@ const G = [
|
|
|
438
435
|
stateMutability: "view",
|
|
439
436
|
type: "function"
|
|
440
437
|
}
|
|
441
|
-
],
|
|
438
|
+
], R = [
|
|
442
439
|
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
|
|
443
440
|
{
|
|
444
441
|
anonymous: !1,
|
|
@@ -591,13 +588,13 @@ const G = [
|
|
|
591
588
|
type: "function"
|
|
592
589
|
}
|
|
593
590
|
];
|
|
594
|
-
var
|
|
595
|
-
const
|
|
591
|
+
var y = /* @__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))(y || {});
|
|
592
|
+
const v = [
|
|
596
593
|
"ERC20-ERC20",
|
|
597
594
|
"ARC20-ARC20",
|
|
598
595
|
"BEP20-BEP20"
|
|
599
596
|
/* BSC_TO_BSC */
|
|
600
|
-
],
|
|
597
|
+
], H = [
|
|
601
598
|
"ERC20-TC",
|
|
602
599
|
"ERC20-ARC20",
|
|
603
600
|
"ERC20-BEP20",
|
|
@@ -608,136 +605,22 @@ const X = [
|
|
|
608
605
|
"BEP20-ERC20",
|
|
609
606
|
"BEP20-ARC20"
|
|
610
607
|
/* BSC_TO_AVAX */
|
|
611
|
-
],
|
|
608
|
+
], S = [
|
|
612
609
|
"TC-TC",
|
|
613
610
|
"TC-ERC20",
|
|
614
611
|
"TC-ARC20",
|
|
615
612
|
"TC-BEP20"
|
|
616
613
|
/* TC_SUPPORTED_TO_BSC */
|
|
617
614
|
];
|
|
618
|
-
var
|
|
619
|
-
const
|
|
620
|
-
[t.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",
|
|
621
|
-
[t.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",
|
|
622
|
-
[t.CANNOT_FIND_INBOUND_ADDRESS]: "Cannot find inbound address.",
|
|
623
|
-
[t.NO_INBOUND_ADDRESSES]: "No inbound addresses.",
|
|
624
|
-
[t.CHAIN_HALTED_OR_UNSUPPORTED]: "Chain {0} halted or unsupported.",
|
|
625
|
-
[t.MISSING_INPUT_PARAMETER]: "Missing input parameter: {0}.",
|
|
626
|
-
[t.INVALID_TYPE_GENERIC]: "Invalid type",
|
|
627
|
-
[t.INVALID_NUMBER_STRING]: "Invalid number string.",
|
|
628
|
-
[t.INVALID_NUMBER]: "Invalid number.",
|
|
629
|
-
[t.INVALID_BOOLEAN]: "Invalid boolean.",
|
|
630
|
-
[t.INVALID_OBJECT]: "Invalid object.",
|
|
631
|
-
[t.INVALID_ARRAY]: "Invalid array.",
|
|
632
|
-
[t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Sell amount must be a positive integer.",
|
|
633
|
-
[t.SELL_BUY_ASSETS_ARE_THE_SAME]: "Sell and buy assets are the same.",
|
|
634
|
-
[t.MISSING_SOURCE_ADDRESS_FOR_SYNTH]: "Source address is required for synth quote.",
|
|
635
|
-
[t.AFF_ADDRESS_AND_BPS_OR_NEITHER]: "Must provide affiliateAddress and affiliateBasisPoints params, or neither.",
|
|
636
|
-
[t.AFF_ADDRESS_TOO_LONG]: "affiliateAddress too long: 4 characters max.",
|
|
637
|
-
[t.AFF_BPS_INTEGER_MAX_500]: "affiliateBasisPoints must be an integer between 0 and 100.",
|
|
638
|
-
[t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]: "Source address {0} invalid for sell chain.",
|
|
639
|
-
[t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]: "Destination address {0} invalid for buy chain.",
|
|
640
|
-
[t.PREFERRED_PROVIDER_NOT_SUPPORTED]: "Preferred provider not supported.",
|
|
641
|
-
[t.SOURCE_ADDRESS_SMART_CONTRACT]: "Source address is a smart contract.",
|
|
642
|
-
[t.SWAP_AMOUNT_TOO_LOW]: "Swap amount too low for this pair.",
|
|
643
|
-
[t.DESTINATION_ADDRESS_SMART_CONTRACT]: "Destination address is a smart contract.",
|
|
644
|
-
[t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Buy amount must be a positive integer.",
|
|
645
|
-
[t.INVALID_PROVIDER]: "Invalid provider {0}.",
|
|
646
|
-
[t.MISSING_CROSS_CHAIN_PROVIDER]: "Missing cross-chain provider.",
|
|
647
|
-
[t.MISSING_AVAX_PROVIDER]: "Missing AVAX provider.",
|
|
648
|
-
[t.MISSING_BSC_PROVIDER]: "Missing BSC provider.",
|
|
649
|
-
[t.MISSING_ETH_PROVIDER]: "Missing ETH provider.",
|
|
650
|
-
[t.MISSING_ARB_PROVIDER]: "Missing ARB provider.",
|
|
651
|
-
[t.INVALID_PROVIDER_FOR_SWAP_OUT]: "Invalid provider for swap out.",
|
|
652
|
-
[t.INVALID_CHAIN]: "Invalid chain {0}.",
|
|
653
|
-
[t.INVALID_ASSET]: "Invalid asset {0}.",
|
|
654
|
-
[t.UNSUPPORTED_CHAIN]: "Unsupported chain {0}.",
|
|
655
|
-
[t.UNSUPPORTED_ASSET]: "Unsupported asset {0}.",
|
|
656
|
-
[t.UNSUPPORTED_ASSET_FOR_SWAPOUT]: "Unsupported asset {0} for swap out.",
|
|
657
|
-
[t.THORNODE_QUOTE_GENERIC_ERROR]: "ThorNode quote generic error.",
|
|
658
|
-
[t.INVALID_SOURCE_ADDRESS]: "Invalid source address {0}",
|
|
659
|
-
[t.INVALID_DESTINATION_ADDRESS]: "Invalid destination address {0}",
|
|
660
|
-
[t.NOT_ENOUGH_SYNTH_BALANCE]: "Source address doesn't have enough synth balance for this quote.",
|
|
661
|
-
[t.SYNTH_MINTING_CAP_REACHED]: "Synth minting cap reached.",
|
|
662
|
-
[t.INVALID_QUOTE_MODE]: "Invalid quote mode.",
|
|
663
|
-
[t.NO_QUOTES]: "No quotes to service this request.",
|
|
664
|
-
[t.SERVICE_UNAVAILABLE_GENERIC]: "Service unavailable.",
|
|
665
|
-
[t.MISSING_GAS_DATA_GENERIC]: "Missing gas data.",
|
|
666
|
-
[t.MISSING_TOKEN_INFO_GENERIC]: "Missing token info.",
|
|
667
|
-
[t.CANT_FIND_TOKEN_LIST]: "Can't find tokenlist {0}.",
|
|
668
|
-
[t.NO_PRICE]: "No price for asset {0}.",
|
|
669
|
-
[t.PRICE_IS_STALE]: "Price is stale for asset {0}.",
|
|
670
|
-
[t.ADDRESS_NOT_WHITELISTED]: "Address {0} not whitelisted for airdrop.",
|
|
671
|
-
[t.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
|
|
672
|
-
}, o = (e, a) => {
|
|
673
|
-
let n = g[e];
|
|
674
|
-
if (!n)
|
|
675
|
-
return "";
|
|
676
|
-
for (let i = 0; i < a.length; i++)
|
|
677
|
-
n = (n == null ? void 0 : n.replace(`{${i}}`, a[i])) ?? "";
|
|
678
|
-
return n;
|
|
679
|
-
};
|
|
680
|
-
class A extends Error {
|
|
681
|
-
constructor({
|
|
682
|
-
status: n,
|
|
683
|
-
revision: i,
|
|
684
|
-
module: S,
|
|
685
|
-
code: d,
|
|
686
|
-
message: _,
|
|
687
|
-
type: N,
|
|
688
|
-
options: { shouldLog: E, shouldThrow: c, shouldTrace: f } = {
|
|
689
|
-
shouldLog: !0,
|
|
690
|
-
shouldThrow: !0,
|
|
691
|
-
shouldTrace: !0
|
|
692
|
-
},
|
|
693
|
-
displayMessageParams: y
|
|
694
|
-
}) {
|
|
695
|
-
const l = _ || o(d, y || []) || "";
|
|
696
|
-
super(l);
|
|
697
|
-
s(this, "status");
|
|
698
|
-
s(this, "revision");
|
|
699
|
-
s(this, "type");
|
|
700
|
-
s(this, "module");
|
|
701
|
-
s(this, "code");
|
|
702
|
-
s(this, "message");
|
|
703
|
-
s(this, "display");
|
|
704
|
-
s(this, "stack");
|
|
705
|
-
s(this, "options");
|
|
706
|
-
s(this, "displayMessageParams");
|
|
707
|
-
this.status = n, this.revision = i || "NO_REVISION", this.module = S, this.message = l, this.display = o(d, y || []), this.code = d, this.type = N || m.UNHANDLED_ERROR, this.options = {
|
|
708
|
-
shouldLog: E || !0,
|
|
709
|
-
shouldTrace: f || !0,
|
|
710
|
-
shouldThrow: c || !1
|
|
711
|
-
}, this.displayMessageParams = y || [], this.options.shouldTrace && Error.captureStackTrace(this);
|
|
712
|
-
}
|
|
713
|
-
static fromErrorInfo(n) {
|
|
714
|
-
return new A(n);
|
|
715
|
-
}
|
|
716
|
-
toErrorInfo() {
|
|
717
|
-
return { ...this, identifier: this.identifier };
|
|
718
|
-
}
|
|
719
|
-
get identifier() {
|
|
720
|
-
return `${this.revision}-${this.type || "NO_TYPE"}-${this.module}-${this.code}`;
|
|
721
|
-
}
|
|
722
|
-
get displayMessage() {
|
|
723
|
-
return o(this.code, this.displayMessageParams || []);
|
|
724
|
-
}
|
|
725
|
-
handle() {
|
|
726
|
-
const n = `[${this.identifier}]: ${this.message}`;
|
|
727
|
-
if (this.options.shouldLog && console.error(n, `
|
|
728
|
-
`, this.stack || ""), this.options.shouldThrow)
|
|
729
|
-
throw Error(n, { cause: this.stack });
|
|
730
|
-
return this.toErrorInfo();
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
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.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 || {}), V = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(V || {}), B = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.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))(B || {});
|
|
734
|
-
const W = {
|
|
615
|
+
var a = /* @__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))(a || {}), u = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(u || {}), o = /* @__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))(o || {});
|
|
616
|
+
const _ = {
|
|
735
617
|
ARB: [44, 60, 0, 0, 0],
|
|
736
618
|
AVAX: [44, 60, 0, 0, 0],
|
|
737
619
|
BCH: [44, 145, 0, 0, 0],
|
|
738
620
|
BNB: [44, 714, 0, 0, 0],
|
|
739
621
|
BSC: [44, 60, 0, 0, 0],
|
|
740
622
|
BTC: [84, 0, 0, 0, 0],
|
|
623
|
+
DASH: [44, 5, 0, 0, 0],
|
|
741
624
|
DOGE: [44, 3, 0, 0, 0],
|
|
742
625
|
ETH: [44, 60, 0, 0, 0],
|
|
743
626
|
GAIA: [44, 118, 0, 0, 0],
|
|
@@ -751,12 +634,12 @@ const W = {
|
|
|
751
634
|
DOT: [0, 0, 0, 0, 0],
|
|
752
635
|
FLIP: [0, 0, 0, 0, 0]
|
|
753
636
|
};
|
|
754
|
-
var
|
|
755
|
-
const
|
|
637
|
+
var m = /* @__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))(m || {});
|
|
638
|
+
const w = [
|
|
756
639
|
"DOT",
|
|
757
640
|
"FLIP"
|
|
758
641
|
/* Chainflip */
|
|
759
|
-
],
|
|
642
|
+
], l = [
|
|
760
643
|
"ETH",
|
|
761
644
|
"AVAX",
|
|
762
645
|
"BSC",
|
|
@@ -764,18 +647,19 @@ const Y = [
|
|
|
764
647
|
"OP",
|
|
765
648
|
"MATIC"
|
|
766
649
|
/* Polygon */
|
|
767
|
-
],
|
|
650
|
+
], M = l, T = [
|
|
768
651
|
"BTC",
|
|
769
652
|
"BCH",
|
|
653
|
+
"DASH",
|
|
770
654
|
"DOGE",
|
|
771
655
|
"LTC"
|
|
772
656
|
/* Litecoin */
|
|
773
|
-
],
|
|
657
|
+
], V = T, c = [
|
|
774
658
|
"GAIA",
|
|
775
659
|
"THOR",
|
|
776
660
|
"BNB"
|
|
777
661
|
/* Binance */
|
|
778
|
-
],
|
|
662
|
+
], L = c, A = [
|
|
779
663
|
"AVAX",
|
|
780
664
|
"BNB",
|
|
781
665
|
"BSC",
|
|
@@ -787,27 +671,27 @@ const Y = [
|
|
|
787
671
|
"LTC",
|
|
788
672
|
"THOR"
|
|
789
673
|
/* THORChain */
|
|
790
|
-
];
|
|
791
|
-
var
|
|
792
|
-
const
|
|
793
|
-
(e,
|
|
794
|
-
const
|
|
795
|
-
return
|
|
674
|
+
], N = A;
|
|
675
|
+
var i = /* @__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))(i || {}), p = /* @__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))(p || {}), f = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.net", e.ThorswapStatic = "https://static.thorswap.net", e))(f || {});
|
|
676
|
+
const s = Object.values(a), E = Object.keys(a), r = s.reduce(
|
|
677
|
+
(e, n) => {
|
|
678
|
+
const t = E.find((d) => a[d] === n);
|
|
679
|
+
return t && (e[n] = t), e;
|
|
796
680
|
},
|
|
797
681
|
{}
|
|
798
|
-
),
|
|
799
|
-
(e,
|
|
682
|
+
), k = s.reduce(
|
|
683
|
+
(e, n) => (e[n] = i[r[n]], e),
|
|
800
684
|
{}
|
|
801
|
-
),
|
|
802
|
-
(e,
|
|
685
|
+
), P = s.reduce(
|
|
686
|
+
(e, n) => (e[n] = p[r[n]], e),
|
|
803
687
|
{}
|
|
804
|
-
),
|
|
805
|
-
(e,
|
|
806
|
-
const
|
|
807
|
-
return e[
|
|
688
|
+
), X = s.reduce(
|
|
689
|
+
(e, n) => {
|
|
690
|
+
const t = `${r[n]}Hex`;
|
|
691
|
+
return e[n] = i[t], e;
|
|
808
692
|
},
|
|
809
693
|
{}
|
|
810
|
-
),
|
|
694
|
+
), I = {
|
|
811
695
|
"0xa4b1": "ARB",
|
|
812
696
|
42161: "ARB",
|
|
813
697
|
"0xa86a": "AVAX",
|
|
@@ -819,6 +703,7 @@ const p = Object.values(r), L = Object.keys(r), T = p.reduce(
|
|
|
819
703
|
bitcoin: "BTC",
|
|
820
704
|
chainflip: "FLIP",
|
|
821
705
|
"cosmoshub-4": "GAIA",
|
|
706
|
+
dash: "DASH",
|
|
822
707
|
dogecoin: "DOGE",
|
|
823
708
|
"0x1": "ETH",
|
|
824
709
|
"kaiyo-1": "KUJI",
|
|
@@ -834,7 +719,7 @@ const p = Object.values(r), L = Object.keys(r), T = p.reduce(
|
|
|
834
719
|
"thorchain-stagenet-v2": "THOR",
|
|
835
720
|
"thorchain-mainnet-v1": "THOR"
|
|
836
721
|
/* THORChain */
|
|
837
|
-
},
|
|
722
|
+
}, K = {
|
|
838
723
|
ARB: "https://arbiscan.io",
|
|
839
724
|
AVAX: "https://snowtrace.io",
|
|
840
725
|
BSC: "https://bscscan.com",
|
|
@@ -843,6 +728,7 @@ const p = Object.values(r), L = Object.keys(r), T = p.reduce(
|
|
|
843
728
|
BTC: "https://blockchair.com/bitcoin",
|
|
844
729
|
FLIP: "https://explorer.polkascan.io/polkadot",
|
|
845
730
|
GAIA: "https://cosmos.bigdipper.live",
|
|
731
|
+
DASH: "https://blockchair.com/dash",
|
|
846
732
|
DOGE: "https://blockchair.com/dogecoin",
|
|
847
733
|
KUJI: "https://finder.kujira.network/kaiyo-1",
|
|
848
734
|
ETH: "https://etherscan.io",
|
|
@@ -853,41 +739,41 @@ const p = Object.values(r), L = Object.keys(r), T = p.reduce(
|
|
|
853
739
|
MATIC: "https://polygonscan.com",
|
|
854
740
|
THOR: "https://runescan.io"
|
|
855
741
|
};
|
|
856
|
-
var
|
|
742
|
+
var x = /* @__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))(x || {}), C = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(C || {}), b = /* @__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))(b || {}), g = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e[e.LockedDevice = 21781] = "LockedDevice", e[e.TC_NotFound = 65535] = "TC_NotFound", e))(g || {});
|
|
857
743
|
export {
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
744
|
+
v as AGG_SWAP,
|
|
745
|
+
f as ApiUrl,
|
|
746
|
+
m as BaseDecimal,
|
|
747
|
+
a as Chain,
|
|
748
|
+
i as ChainId,
|
|
749
|
+
I as ChainIdToChain,
|
|
750
|
+
k as ChainToChainId,
|
|
751
|
+
K as ChainToExplorerUrl,
|
|
752
|
+
X as ChainToHexChainId,
|
|
753
|
+
P as ChainToRPC,
|
|
754
|
+
u as ContractAddress,
|
|
755
|
+
L as CosmosChainList,
|
|
756
|
+
c as CosmosChains,
|
|
757
|
+
o as DerivationPath,
|
|
758
|
+
M as EVMChainList,
|
|
759
|
+
l as EVMChains,
|
|
760
|
+
C as FeeOption,
|
|
761
|
+
g as LedgerErrorCode,
|
|
762
|
+
x as MemoType,
|
|
763
|
+
_ as NetworkDerivationPath,
|
|
764
|
+
y as QuoteMode,
|
|
765
|
+
p as RPCUrl,
|
|
766
|
+
H as SWAP_IN,
|
|
767
|
+
S as SWAP_OUT,
|
|
768
|
+
w as SubstrateChainList,
|
|
769
|
+
B as TCAvalancheDepositABI,
|
|
770
|
+
R as TCBscDepositABI,
|
|
771
|
+
h as TCEthereumVaultAbi,
|
|
772
|
+
N as TCSupportedChainList,
|
|
773
|
+
A as TCSupportedChains,
|
|
774
|
+
V as UTXOChainList,
|
|
775
|
+
T as UTXOChains,
|
|
776
|
+
b as WalletOption,
|
|
777
|
+
O as erc20ABI
|
|
892
778
|
};
|
|
893
779
|
//# sourceMappingURL=index.es.js.map
|