@swapkit/helpers 2.4.3 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/api/index.cjs +3 -0
  2. package/dist/api/index.cjs.map +16 -0
  3. package/dist/api/index.js +3 -0
  4. package/dist/api/index.js.map +16 -0
  5. package/dist/chunk-fazw0jvt.js +3 -0
  6. package/dist/chunk-fazw0jvt.js.map +9 -0
  7. package/dist/chunk-nm00d52v.js +4 -0
  8. package/dist/chunk-nm00d52v.js.map +9 -0
  9. package/dist/contracts/index.cjs +3 -0
  10. package/dist/contracts/index.cjs.map +38 -0
  11. package/dist/contracts/index.js +3 -0
  12. package/dist/contracts/index.js.map +38 -0
  13. package/dist/index.cjs +6 -0
  14. package/dist/index.cjs.map +29 -0
  15. package/dist/index.js +3 -3
  16. package/dist/index.js.map +19 -20
  17. package/dist/tokens/index.cjs +3 -0
  18. package/dist/tokens/index.cjs.map +23 -0
  19. package/dist/tokens/index.js +3 -0
  20. package/dist/tokens/index.js.map +23 -0
  21. package/package.json +31 -15
  22. package/src/api/index.ts +19 -0
  23. package/src/api/microgard/endpoints.ts +83 -0
  24. package/src/api/microgard/types.ts +60 -0
  25. package/src/api/midgard/endpoints.ts +166 -0
  26. package/src/api/midgard/types.ts +155 -0
  27. package/src/api/swapkitApi/endpoints.ts +266 -0
  28. package/src/api/swapkitApi/types.ts +772 -0
  29. package/src/api/thornode/endpoints.ts +78 -0
  30. package/src/api/thornode/types.ts +241 -0
  31. package/src/api/thorswapStatic/endpoints.ts +30 -0
  32. package/src/api/thorswapStatic/types.ts +18 -0
  33. package/src/contracts/abis/avaxGeneric.ts +92 -0
  34. package/src/contracts/abis/avaxWoofi.ts +145 -0
  35. package/src/contracts/abis/bscGeneric.ts +106 -0
  36. package/src/contracts/abis/chainflipGateway.ts +330 -0
  37. package/src/contracts/abis/erc20.ts +99 -0
  38. package/src/contracts/abis/ethGeneric.ts +92 -0
  39. package/src/contracts/abis/mayaEvmVaults.ts +331 -0
  40. package/src/contracts/abis/pancakeV2.ts +145 -0
  41. package/src/contracts/abis/pangolin.ts +120 -0
  42. package/src/contracts/abis/sushiswap.ts +120 -0
  43. package/src/contracts/abis/tcEthVault.ts +650 -0
  44. package/src/contracts/abis/traderJoe.ts +120 -0
  45. package/src/contracts/abis/uniswapV2.ts +120 -0
  46. package/src/contracts/abis/uniswapV2Leg.ts +128 -0
  47. package/src/contracts/abis/uniswapV3_100.ts +128 -0
  48. package/src/contracts/abis/uniswapV3_10000.ts +128 -0
  49. package/src/contracts/abis/uniswapV3_3000.ts +128 -0
  50. package/src/contracts/abis/uniswapV3_500.ts +128 -0
  51. package/src/contracts/index.ts +95 -0
  52. package/src/contracts/routers/index.ts +58 -0
  53. package/src/contracts/routers/kyber.ts +402 -0
  54. package/src/contracts/routers/oneinch.ts +2188 -0
  55. package/src/contracts/routers/pancakeswap.ts +340 -0
  56. package/src/contracts/routers/pangolin.ts +340 -0
  57. package/src/contracts/routers/sushiswap.ts +340 -0
  58. package/src/contracts/routers/traderJoe.ts +340 -0
  59. package/src/contracts/routers/uniswapv2.ts +340 -0
  60. package/src/contracts/routers/uniswapv3.ts +254 -0
  61. package/src/contracts/routers/woofi.ts +171 -0
  62. package/src/index.ts +11 -12
  63. package/src/modules/__tests__/assetValue.test.ts +0 -2
  64. package/src/modules/__tests__/swapKitConfig.test.ts +37 -0
  65. package/src/modules/assetValue.ts +26 -92
  66. package/src/modules/bigIntArithmetics.ts +6 -2
  67. package/src/modules/requestClient.ts +26 -35
  68. package/src/modules/swapKitConfig.ts +131 -0
  69. package/src/modules/swapKitError.ts +6 -6
  70. package/src/tokens/index.ts +15 -0
  71. package/src/tokens/lists/camelot_v3.ts +15920 -0
  72. package/src/tokens/lists/caviar_v1.ts +1694 -0
  73. package/src/tokens/lists/chainflip.ts +104 -0
  74. package/src/tokens/lists/index.ts +13 -0
  75. package/src/tokens/lists/jupiter.ts +29606 -0
  76. package/src/tokens/lists/mayachain.ts +513 -0
  77. package/src/tokens/lists/oneinch.ts +14238 -0
  78. package/src/tokens/lists/openocean_v2.ts +11514 -0
  79. package/src/tokens/lists/pancakeswap.ts +4296 -0
  80. package/src/tokens/lists/pangolin_v1.ts +175 -0
  81. package/src/tokens/lists/sushiswap_v2.ts +965 -0
  82. package/src/tokens/lists/thorchain.ts +669 -0
  83. package/src/tokens/lists/traderjoe_v2.ts +1384 -0
  84. package/src/tokens/lists/uniswap_v2.ts +5596 -0
  85. package/src/tokens/lists/uniswap_v3.ts +5946 -0
  86. package/src/types/chains.ts +26 -46
  87. package/src/types/commonTypes.ts +3 -90
  88. package/src/types/index.ts +3 -4
  89. package/src/types/sdk.ts +0 -24
  90. package/src/types/tokens.ts +1 -1
  91. package/src/types/wallet.ts +37 -21
  92. package/src/{helpers → utils}/asset.ts +49 -19
  93. package/src/{helpers → utils}/derivationPath.ts +7 -2
  94. package/src/{helpers → utils}/memo.ts +0 -65
  95. package/src/{helpers → utils}/others.ts +12 -5
  96. package/src/utils/plugin.ts +13 -0
  97. package/src/{helpers/web3wallets.ts → utils/wallets.ts} +175 -148
  98. package/src/modules/walletUtils.ts +0 -30
  99. package/src/types/network.ts +0 -49
  100. /package/src/{helpers → utils}/__tests__/asset.test.ts +0 -0
  101. /package/src/{helpers/__tests__/derivationPath.ts → utils/__tests__/derivationPath.test.ts} +0 -0
  102. /package/src/{helpers → utils}/__tests__/memo.test.ts +0 -0
  103. /package/src/{helpers → utils}/__tests__/others.test.ts +0 -0
  104. /package/src/{helpers → utils}/__tests__/validators.test.ts +0 -0
  105. /package/src/{helpers → utils}/liquidity.ts +0 -0
  106. /package/src/{helpers → utils}/validators.ts +0 -0
@@ -0,0 +1,104 @@
1
+ export const list = {
2
+ provider: "CHAINFLIP",
3
+ name: "CHAINFLIP",
4
+ timestamp: "2025-01-22T13:30:48.543Z",
5
+ version: {
6
+ major: 1,
7
+ minor: 0,
8
+ patch: 0,
9
+ },
10
+ keywords: [],
11
+ count: 10,
12
+ tokens: [
13
+ {
14
+ chain: "ARB",
15
+ chainId: "42161",
16
+ decimals: 18,
17
+ identifier: "ARB.ETH",
18
+ logoURI: "https://storage.googleapis.com/token-list-swapkit/images/arb.eth.png",
19
+ ticker: "ETH",
20
+ },
21
+ {
22
+ address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
23
+ chain: "ARB",
24
+ chainId: "42161",
25
+ decimals: 6,
26
+ identifier: "ARB.USDC-0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
27
+ logoURI:
28
+ "https://storage.googleapis.com/token-list-swapkit/images/arb.usdc-0xaf88d065e77c8cc2239327c5edb3a432268e5831.png",
29
+ ticker: "USDC",
30
+ },
31
+ {
32
+ chain: "BTC",
33
+ chainId: "bitcoin",
34
+ decimals: 8,
35
+ identifier: "BTC.BTC",
36
+ logoURI: "https://storage.googleapis.com/token-list-swapkit/images/btc.btc.png",
37
+ ticker: "BTC",
38
+ },
39
+ {
40
+ chain: "DOT",
41
+ chainId: "polkadot",
42
+ decimals: 10,
43
+ identifier: "DOT.DOT",
44
+ logoURI: "https://storage.googleapis.com/token-list-swapkit/images/dot.dot.png",
45
+ ticker: "DOT",
46
+ },
47
+ {
48
+ chain: "ETH",
49
+ chainId: "1",
50
+ decimals: 18,
51
+ identifier: "ETH.ETH",
52
+ logoURI: "https://storage.googleapis.com/token-list-swapkit/images/eth.eth.png",
53
+ ticker: "ETH",
54
+ },
55
+ {
56
+ address: "0x826180541412D574cf1336d22c0C0a287822678A",
57
+ chain: "ETH",
58
+ chainId: "1",
59
+ decimals: 18,
60
+ identifier: "ETH.FLIP-0x826180541412D574cf1336d22c0C0a287822678A",
61
+ logoURI:
62
+ "https://storage.googleapis.com/token-list-swapkit/images/eth.flip-0x826180541412d574cf1336d22c0c0a287822678a.png",
63
+ ticker: "FLIP",
64
+ },
65
+ {
66
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
67
+ chain: "ETH",
68
+ chainId: "1",
69
+ decimals: 6,
70
+ identifier: "ETH.USDC-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
71
+ logoURI:
72
+ "https://storage.googleapis.com/token-list-swapkit/images/eth.usdc-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
73
+ ticker: "USDC",
74
+ },
75
+ {
76
+ address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
77
+ chain: "ETH",
78
+ chainId: "1",
79
+ decimals: 6,
80
+ identifier: "ETH.USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7",
81
+ logoURI:
82
+ "https://storage.googleapis.com/token-list-swapkit/images/eth.usdt-0xdac17f958d2ee523a2206206994597c13d831ec7.png",
83
+ ticker: "USDT",
84
+ },
85
+ {
86
+ chain: "SOL",
87
+ chainId: "solana",
88
+ decimals: 9,
89
+ identifier: "SOL.SOL",
90
+ logoURI: "https://storage.googleapis.com/token-list-swapkit/images/sol.sol.png",
91
+ ticker: "SOL",
92
+ },
93
+ {
94
+ address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
95
+ chain: "SOL",
96
+ chainId: "solana",
97
+ decimals: 6,
98
+ identifier: "SOL.USDC-EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
99
+ logoURI:
100
+ "https://storage.googleapis.com/token-list-swapkit/images/sol.usdc-epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v.png",
101
+ ticker: "USDC",
102
+ },
103
+ ],
104
+ } as const;
@@ -0,0 +1,13 @@
1
+ export { list as CaviarV1List } from "./caviar_v1";
2
+ export { list as ChainflipList } from "./chainflip";
3
+ export { list as JupiterList } from "./jupiter";
4
+ export { list as MayaList } from "./mayachain";
5
+ export { list as OneInchList } from "./oneinch";
6
+ export { list as OpenOceanV2List } from "./openocean_v2";
7
+ export { list as PancakeswapList } from "./pancakeswap";
8
+ export { list as PangolinList } from "./pangolin_v1";
9
+ export { list as SushiswapList } from "./sushiswap_v2";
10
+ export { list as ThorchainList } from "./thorchain";
11
+ export { list as TraderjoeV2List } from "./traderjoe_v2";
12
+ export { list as UniswapV2List } from "./uniswap_v2";
13
+ export { list as UniswapV3List } from "./uniswap_v3";