@swapkit/core 1.0.0-rc.0 → 1.0.0-rc.1
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 +2 -2
- package/dist/index.es.js +6 -6
- package/package.json +11 -5
- package/dist/index.es-320ea117.js +0 -13836
- package/dist/index.es-66e7d15a.js +0 -11436
- package/dist/index.es-8503fb04-8503fb04.js +0 -34669
- package/dist/index.es-8503fb04-903b9173.cjs +0 -1
- package/dist/index.es-c82b553a.cjs +0 -14
- package/dist/index.es-e22f22e9.cjs +0 -1
package/dist/index.es.js
CHANGED
|
@@ -816,7 +816,7 @@ const te = Object.values(s), Xe = Object.keys(s), ce = te.reduce(
|
|
|
816
816
|
DOGE: "https://blockchair.com/dogecoin",
|
|
817
817
|
ETH: "https://etherscan.io",
|
|
818
818
|
LTC: "https://ltc.bitaps.com",
|
|
819
|
-
MAYA: "https://
|
|
819
|
+
MAYA: "https://www.mayascan.org",
|
|
820
820
|
OP: "https://optimistic.etherscan.io",
|
|
821
821
|
MATIC: "https://polygonscan.com",
|
|
822
822
|
THOR: "https://viewblock.io/thorchain"
|
|
@@ -1298,7 +1298,7 @@ class v extends de {
|
|
|
1298
1298
|
ThorchainList: a,
|
|
1299
1299
|
NativeList: i,
|
|
1300
1300
|
...r
|
|
1301
|
-
} = await import("
|
|
1301
|
+
} = await import("@swapkit/tokens");
|
|
1302
1302
|
ue = [i, ...Object.values(r)].reduce(
|
|
1303
1303
|
(p, { tokens: d }) => (d.forEach(({ identifier: l, chain: m, ...y }) => {
|
|
1304
1304
|
const u = "decimals" in y ? y.decimals : E[m];
|
|
@@ -3291,7 +3291,7 @@ class en {
|
|
|
3291
3291
|
const _ = this.connectedWallets[p], O = this.getAddress(p);
|
|
3292
3292
|
if (!(_ != null && _.sendTransaction) || !O)
|
|
3293
3293
|
throw new c("core_wallet_connection_not_found");
|
|
3294
|
-
const { getProvider: I, toChecksumAddress: g } = await import("
|
|
3294
|
+
const { getProvider: I, toChecksumAddress: g } = await import("@swapkit/toolbox-evm"), S = I(p), b = Ct[h.toLowerCase()];
|
|
3295
3295
|
if (!b)
|
|
3296
3296
|
throw new c("core_swap_contract_not_supported", { contractAddress: h });
|
|
3297
3297
|
const ne = await ((y = (m = (await ((l = _.createContract) == null ? void 0 : l.call(_, h, b, S))).populateTransaction).swapIn) == null ? void 0 : y.call(
|
|
@@ -3361,7 +3361,7 @@ class en {
|
|
|
3361
3361
|
case s.Ethereum:
|
|
3362
3362
|
case s.BinanceSmartChain:
|
|
3363
3363
|
case s.Avalanche: {
|
|
3364
|
-
const { getChecksumAddressFromAsset: y } = await import("
|
|
3364
|
+
const { getChecksumAddressFromAsset: y } = await import("@swapkit/toolbox-evm"), u = r === s.Avalanche ? Ve : r === s.BinanceSmartChain ? Le : Be;
|
|
3365
3365
|
return await l.call({
|
|
3366
3366
|
abi: u,
|
|
3367
3367
|
contractAddress: a || (await A(this, V).call(this, r)).router,
|
|
@@ -3551,7 +3551,7 @@ class en {
|
|
|
3551
3551
|
case s.Ethereum:
|
|
3552
3552
|
case s.Optimism:
|
|
3553
3553
|
case s.Polygon: {
|
|
3554
|
-
const { estimateMaxSendableAmount: i } = await import("
|
|
3554
|
+
const { estimateMaxSendableAmount: i } = await import("@swapkit/toolbox-evm");
|
|
3555
3555
|
return i({
|
|
3556
3556
|
...n,
|
|
3557
3557
|
toolbox: a
|
|
@@ -3565,7 +3565,7 @@ class en {
|
|
|
3565
3565
|
case s.Binance:
|
|
3566
3566
|
case s.THORChain:
|
|
3567
3567
|
case s.Cosmos: {
|
|
3568
|
-
const { estimateMaxSendableAmount: i } = await import("
|
|
3568
|
+
const { estimateMaxSendableAmount: i } = await import("@swapkit/toolbox-cosmos");
|
|
3569
3569
|
return i({
|
|
3570
3570
|
...n,
|
|
3571
3571
|
toolbox: a
|
package/package.json
CHANGED
|
@@ -15,10 +15,16 @@
|
|
|
15
15
|
"@internal/config": "0.0.0-internal.0",
|
|
16
16
|
"@swapkit/api": "1.0.0-rc.0",
|
|
17
17
|
"@swapkit/tokens": "1.0.0-rc.0",
|
|
18
|
-
"@swapkit/toolbox-cosmos": "1.0.0-rc.
|
|
19
|
-
"@swapkit/toolbox-evm": "1.0.0-rc.
|
|
20
|
-
"@swapkit/toolbox-utxo": "1.0.0-rc.0"
|
|
21
|
-
|
|
18
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.1",
|
|
19
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.1",
|
|
20
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.0"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@swapkit/api": "1.0.0-rc.0",
|
|
24
|
+
"@swapkit/tokens": "1.0.0-rc.0",
|
|
25
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.1",
|
|
26
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.1",
|
|
27
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.0"
|
|
22
28
|
},
|
|
23
29
|
"eslintConfig": {
|
|
24
30
|
"extends": "../../../internal/eslint-config"
|
|
@@ -46,7 +52,7 @@
|
|
|
46
52
|
"repository": "https://github.com/thorswap/SwapKit.git",
|
|
47
53
|
"type": "module",
|
|
48
54
|
"types": "./dist/index.d.ts",
|
|
49
|
-
"version": "1.0.0-rc.
|
|
55
|
+
"version": "1.0.0-rc.1",
|
|
50
56
|
"scripts": {
|
|
51
57
|
"build": "NODE_OPTIONS=--max_old_space_size=16384 vite build",
|
|
52
58
|
"clean": "rm -rf dist vite.config.ts.* .turbo node_modules",
|