@sodax/sdk 0.0.1-rc.4 → 0.0.1-rc.41

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 (304) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +176 -11
  3. package/dist/index.cjs +18618 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +11181 -0
  6. package/dist/index.d.ts +11180 -9
  7. package/dist/index.mjs +18348 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +32 -32
  10. package/dist/abis/asset-manager.abi.d.ts +0 -418
  11. package/dist/abis/asset-manager.abi.d.ts.map +0 -1
  12. package/dist/abis/asset-manager.abi.js +0 -542
  13. package/dist/abis/asset-manager.abi.js.map +0 -1
  14. package/dist/abis/connection.abi.d.ts +0 -72
  15. package/dist/abis/connection.abi.d.ts.map +0 -1
  16. package/dist/abis/connection.abi.js +0 -92
  17. package/dist/abis/connection.abi.js.map +0 -1
  18. package/dist/abis/erc20.abi.d.ts +0 -236
  19. package/dist/abis/erc20.abi.d.ts.map +0 -1
  20. package/dist/abis/erc20.abi.js +0 -311
  21. package/dist/abis/erc20.abi.js.map +0 -1
  22. package/dist/abis/index.d.ts +0 -10
  23. package/dist/abis/index.d.ts.map +0 -1
  24. package/dist/abis/index.js +0 -10
  25. package/dist/abis/index.js.map +0 -1
  26. package/dist/abis/intents.abi.d.ts +0 -901
  27. package/dist/abis/intents.abi.d.ts.map +0 -1
  28. package/dist/abis/intents.abi.js +0 -1158
  29. package/dist/abis/intents.abi.js.map +0 -1
  30. package/dist/abis/pool.abi.d.ts +0 -626
  31. package/dist/abis/pool.abi.d.ts.map +0 -1
  32. package/dist/abis/pool.abi.js +0 -812
  33. package/dist/abis/pool.abi.js.map +0 -1
  34. package/dist/abis/spokeAssetManager.abi.d.ts +0 -169
  35. package/dist/abis/spokeAssetManager.abi.d.ts.map +0 -1
  36. package/dist/abis/spokeAssetManager.abi.js +0 -217
  37. package/dist/abis/spokeAssetManager.abi.js.map +0 -1
  38. package/dist/abis/uiPoolData.abi.d.ts +0 -369
  39. package/dist/abis/uiPoolData.abi.d.ts.map +0 -1
  40. package/dist/abis/uiPoolData.abi.js +0 -476
  41. package/dist/abis/uiPoolData.abi.js.map +0 -1
  42. package/dist/abis/vaultToken.abi.d.ts +0 -816
  43. package/dist/abis/vaultToken.abi.d.ts.map +0 -1
  44. package/dist/abis/vaultToken.abi.js +0 -1062
  45. package/dist/abis/vaultToken.abi.js.map +0 -1
  46. package/dist/abis/walletFactory.abi.d.ts +0 -20
  47. package/dist/abis/walletFactory.abi.d.ts.map +0 -1
  48. package/dist/abis/walletFactory.abi.js +0 -27
  49. package/dist/abis/walletFactory.abi.js.map +0 -1
  50. package/dist/constants.d.ts +0 -550
  51. package/dist/constants.d.ts.map +0 -1
  52. package/dist/constants.js +0 -1196
  53. package/dist/constants.js.map +0 -1
  54. package/dist/constants.test.d.ts +0 -2
  55. package/dist/constants.test.d.ts.map +0 -1
  56. package/dist/constants.test.js +0 -129
  57. package/dist/constants.test.js.map +0 -1
  58. package/dist/entities/Providers.d.ts +0 -54
  59. package/dist/entities/Providers.d.ts.map +0 -1
  60. package/dist/entities/Providers.js +0 -51
  61. package/dist/entities/Providers.js.map +0 -1
  62. package/dist/entities/Sodax.d.ts +0 -23
  63. package/dist/entities/Sodax.d.ts.map +0 -1
  64. package/dist/entities/Sodax.js +0 -29
  65. package/dist/entities/Sodax.js.map +0 -1
  66. package/dist/entities/Sodax.test.d.ts +0 -2
  67. package/dist/entities/Sodax.test.d.ts.map +0 -1
  68. package/dist/entities/Sodax.test.js +0 -392
  69. package/dist/entities/Sodax.test.js.map +0 -1
  70. package/dist/entities/cosmos/CW20Token.d.ts +0 -39
  71. package/dist/entities/cosmos/CW20Token.d.ts.map +0 -1
  72. package/dist/entities/cosmos/CW20Token.js +0 -65
  73. package/dist/entities/cosmos/CW20Token.js.map +0 -1
  74. package/dist/entities/cosmos/CWSpokeProvider.d.ts +0 -92
  75. package/dist/entities/cosmos/CWSpokeProvider.d.ts.map +0 -1
  76. package/dist/entities/cosmos/CWSpokeProvider.js +0 -143
  77. package/dist/entities/cosmos/CWSpokeProvider.js.map +0 -1
  78. package/dist/entities/cosmos/CosmosWalletProvider.d.ts +0 -28
  79. package/dist/entities/cosmos/CosmosWalletProvider.d.ts.map +0 -1
  80. package/dist/entities/cosmos/CosmosWalletProvider.js +0 -102
  81. package/dist/entities/cosmos/CosmosWalletProvider.js.map +0 -1
  82. package/dist/entities/cosmos/InjectiveWalletProvider.d.ts +0 -25
  83. package/dist/entities/cosmos/InjectiveWalletProvider.d.ts.map +0 -1
  84. package/dist/entities/cosmos/InjectiveWalletProvider.js +0 -76
  85. package/dist/entities/cosmos/InjectiveWalletProvider.js.map +0 -1
  86. package/dist/entities/icon/HanaWalletConnector.d.ts +0 -36
  87. package/dist/entities/icon/HanaWalletConnector.d.ts.map +0 -1
  88. package/dist/entities/icon/HanaWalletConnector.js +0 -92
  89. package/dist/entities/icon/HanaWalletConnector.js.map +0 -1
  90. package/dist/entities/icon/IconSpokeProvider.d.ts +0 -10
  91. package/dist/entities/icon/IconSpokeProvider.d.ts.map +0 -1
  92. package/dist/entities/icon/IconSpokeProvider.js +0 -12
  93. package/dist/entities/icon/IconSpokeProvider.js.map +0 -1
  94. package/dist/entities/icon/index.d.ts +0 -4
  95. package/dist/entities/icon/index.d.ts.map +0 -1
  96. package/dist/entities/icon/index.js +0 -4
  97. package/dist/entities/icon/index.js.map +0 -1
  98. package/dist/entities/icon/utils.d.ts +0 -3
  99. package/dist/entities/icon/utils.d.ts.map +0 -1
  100. package/dist/entities/icon/utils.js +0 -4
  101. package/dist/entities/icon/utils.js.map +0 -1
  102. package/dist/entities/index.d.ts +0 -7
  103. package/dist/entities/index.d.ts.map +0 -1
  104. package/dist/entities/index.js +0 -7
  105. package/dist/entities/index.js.map +0 -1
  106. package/dist/entities/solana/Configs.d.ts +0 -10
  107. package/dist/entities/solana/Configs.d.ts.map +0 -1
  108. package/dist/entities/solana/Configs.js +0 -50
  109. package/dist/entities/solana/Configs.js.map +0 -1
  110. package/dist/entities/solana/SolanaSpokeProvider.d.ts +0 -9
  111. package/dist/entities/solana/SolanaSpokeProvider.d.ts.map +0 -1
  112. package/dist/entities/solana/SolanaSpokeProvider.js +0 -9
  113. package/dist/entities/solana/SolanaSpokeProvider.js.map +0 -1
  114. package/dist/entities/solana/SolanaWalletProvider.d.ts +0 -20
  115. package/dist/entities/solana/SolanaWalletProvider.d.ts.map +0 -1
  116. package/dist/entities/solana/SolanaWalletProvider.js +0 -53
  117. package/dist/entities/solana/SolanaWalletProvider.js.map +0 -1
  118. package/dist/entities/solana/index.d.ts +0 -4
  119. package/dist/entities/solana/index.d.ts.map +0 -1
  120. package/dist/entities/solana/index.js +0 -4
  121. package/dist/entities/solana/index.js.map +0 -1
  122. package/dist/entities/solana/pda/pda.d.ts +0 -45
  123. package/dist/entities/solana/pda/pda.d.ts.map +0 -1
  124. package/dist/entities/solana/pda/pda.js +0 -44
  125. package/dist/entities/solana/pda/pda.js.map +0 -1
  126. package/dist/entities/solana/types/asset_manager.d.ts +0 -919
  127. package/dist/entities/solana/types/asset_manager.d.ts.map +0 -1
  128. package/dist/entities/solana/types/asset_manager.js +0 -2
  129. package/dist/entities/solana/types/asset_manager.js.map +0 -1
  130. package/dist/entities/solana/types/connection.d.ts +0 -446
  131. package/dist/entities/solana/types/connection.d.ts.map +0 -1
  132. package/dist/entities/solana/types/connection.js +0 -2
  133. package/dist/entities/solana/types/connection.js.map +0 -1
  134. package/dist/entities/solana/types/rate_limit_contract.d.ts +0 -348
  135. package/dist/entities/solana/types/rate_limit_contract.d.ts.map +0 -1
  136. package/dist/entities/solana/types/rate_limit_contract.js +0 -2
  137. package/dist/entities/solana/types/rate_limit_contract.js.map +0 -1
  138. package/dist/entities/solana/utils/utils.d.ts +0 -6
  139. package/dist/entities/solana/utils/utils.d.ts.map +0 -1
  140. package/dist/entities/solana/utils/utils.js +0 -18
  141. package/dist/entities/solana/utils/utils.js.map +0 -1
  142. package/dist/entities/stellar/StellarSpokeProvider.d.ts +0 -17
  143. package/dist/entities/stellar/StellarSpokeProvider.d.ts.map +0 -1
  144. package/dist/entities/stellar/StellarSpokeProvider.js +0 -125
  145. package/dist/entities/stellar/StellarSpokeProvider.js.map +0 -1
  146. package/dist/entities/sui/SuiSpokeProvider.d.ts +0 -35
  147. package/dist/entities/sui/SuiSpokeProvider.d.ts.map +0 -1
  148. package/dist/entities/sui/SuiSpokeProvider.js +0 -145
  149. package/dist/entities/sui/SuiSpokeProvider.js.map +0 -1
  150. package/dist/errors.d.ts +0 -2
  151. package/dist/errors.d.ts.map +0 -1
  152. package/dist/errors.js +0 -2
  153. package/dist/errors.js.map +0 -1
  154. package/dist/guards.d.ts +0 -25
  155. package/dist/guards.d.ts.map +0 -1
  156. package/dist/guards.js +0 -110
  157. package/dist/guards.js.map +0 -1
  158. package/dist/index.d.ts.map +0 -1
  159. package/dist/index.js +0 -10
  160. package/dist/index.js.map +0 -1
  161. package/dist/services/hub/EvmAssetManagerService.d.ts +0 -61
  162. package/dist/services/hub/EvmAssetManagerService.d.ts.map +0 -1
  163. package/dist/services/hub/EvmAssetManagerService.js +0 -103
  164. package/dist/services/hub/EvmAssetManagerService.js.map +0 -1
  165. package/dist/services/hub/EvmVaultTokenService.d.ts +0 -81
  166. package/dist/services/hub/EvmVaultTokenService.d.ts.map +0 -1
  167. package/dist/services/hub/EvmVaultTokenService.js +0 -161
  168. package/dist/services/hub/EvmVaultTokenService.js.map +0 -1
  169. package/dist/services/hub/EvmWalletAbstraction.d.ts +0 -9
  170. package/dist/services/hub/EvmWalletAbstraction.d.ts.map +0 -1
  171. package/dist/services/hub/EvmWalletAbstraction.js +0 -14
  172. package/dist/services/hub/EvmWalletAbstraction.js.map +0 -1
  173. package/dist/services/hub/index.d.ts +0 -4
  174. package/dist/services/hub/index.d.ts.map +0 -1
  175. package/dist/services/hub/index.js +0 -4
  176. package/dist/services/hub/index.js.map +0 -1
  177. package/dist/services/index.d.ts +0 -7
  178. package/dist/services/index.d.ts.map +0 -1
  179. package/dist/services/index.js +0 -7
  180. package/dist/services/index.js.map +0 -1
  181. package/dist/services/intentRelay/IntentRelayApiService.d.ts +0 -112
  182. package/dist/services/intentRelay/IntentRelayApiService.d.ts.map +0 -1
  183. package/dist/services/intentRelay/IntentRelayApiService.js +0 -160
  184. package/dist/services/intentRelay/IntentRelayApiService.js.map +0 -1
  185. package/dist/services/intentRelay/IntentRelayApiService.test.d.ts +0 -2
  186. package/dist/services/intentRelay/IntentRelayApiService.test.d.ts.map +0 -1
  187. package/dist/services/intentRelay/IntentRelayApiService.test.js +0 -134
  188. package/dist/services/intentRelay/IntentRelayApiService.test.js.map +0 -1
  189. package/dist/services/intentRelay/index.d.ts +0 -2
  190. package/dist/services/intentRelay/index.d.ts.map +0 -1
  191. package/dist/services/intentRelay/index.js +0 -2
  192. package/dist/services/intentRelay/index.js.map +0 -1
  193. package/dist/services/moneyMarket/MoneyMarketService.d.ts +0 -525
  194. package/dist/services/moneyMarket/MoneyMarketService.d.ts.map +0 -1
  195. package/dist/services/moneyMarket/MoneyMarketService.js +0 -814
  196. package/dist/services/moneyMarket/MoneyMarketService.js.map +0 -1
  197. package/dist/services/moneyMarket/MoneyMarketService.test.d.ts +0 -2
  198. package/dist/services/moneyMarket/MoneyMarketService.test.d.ts.map +0 -1
  199. package/dist/services/moneyMarket/MoneyMarketService.test.js +0 -262
  200. package/dist/services/moneyMarket/MoneyMarketService.test.js.map +0 -1
  201. package/dist/services/moneyMarket/index.d.ts +0 -2
  202. package/dist/services/moneyMarket/index.d.ts.map +0 -1
  203. package/dist/services/moneyMarket/index.js +0 -2
  204. package/dist/services/moneyMarket/index.js.map +0 -1
  205. package/dist/services/shared/Erc20Service.d.ts +0 -42
  206. package/dist/services/shared/Erc20Service.d.ts.map +0 -1
  207. package/dist/services/shared/Erc20Service.js +0 -108
  208. package/dist/services/shared/Erc20Service.js.map +0 -1
  209. package/dist/services/shared/index.d.ts +0 -2
  210. package/dist/services/shared/index.d.ts.map +0 -1
  211. package/dist/services/shared/index.js +0 -2
  212. package/dist/services/shared/index.js.map +0 -1
  213. package/dist/services/solver/EvmSolverService.d.ts +0 -125
  214. package/dist/services/solver/EvmSolverService.d.ts.map +0 -1
  215. package/dist/services/solver/EvmSolverService.js +0 -166
  216. package/dist/services/solver/EvmSolverService.js.map +0 -1
  217. package/dist/services/solver/SolverApiService.d.ts +0 -40
  218. package/dist/services/solver/SolverApiService.d.ts.map +0 -1
  219. package/dist/services/solver/SolverApiService.js +0 -157
  220. package/dist/services/solver/SolverApiService.js.map +0 -1
  221. package/dist/services/solver/SolverApiService.test.d.ts +0 -2
  222. package/dist/services/solver/SolverApiService.test.d.ts.map +0 -1
  223. package/dist/services/solver/SolverApiService.test.js +0 -181
  224. package/dist/services/solver/SolverApiService.test.js.map +0 -1
  225. package/dist/services/solver/SolverService.d.ts +0 -295
  226. package/dist/services/solver/SolverService.d.ts.map +0 -1
  227. package/dist/services/solver/SolverService.js +0 -429
  228. package/dist/services/solver/SolverService.js.map +0 -1
  229. package/dist/services/solver/SolverService.test.d.ts +0 -2
  230. package/dist/services/solver/SolverService.test.d.ts.map +0 -1
  231. package/dist/services/solver/SolverService.test.js +0 -439
  232. package/dist/services/solver/SolverService.test.js.map +0 -1
  233. package/dist/services/solver/index.d.ts +0 -3
  234. package/dist/services/solver/index.d.ts.map +0 -1
  235. package/dist/services/solver/index.js +0 -3
  236. package/dist/services/solver/index.js.map +0 -1
  237. package/dist/services/spoke/CWSpokeService.d.ts +0 -67
  238. package/dist/services/spoke/CWSpokeService.d.ts.map +0 -1
  239. package/dist/services/spoke/CWSpokeService.js +0 -75
  240. package/dist/services/spoke/CWSpokeService.js.map +0 -1
  241. package/dist/services/spoke/EvmSpokeService.d.ts +0 -62
  242. package/dist/services/spoke/EvmSpokeService.d.ts.map +0 -1
  243. package/dist/services/spoke/EvmSpokeService.js +0 -120
  244. package/dist/services/spoke/EvmSpokeService.js.map +0 -1
  245. package/dist/services/spoke/IconSpokeService.d.ts +0 -56
  246. package/dist/services/spoke/IconSpokeService.d.ts.map +0 -1
  247. package/dist/services/spoke/IconSpokeService.js +0 -124
  248. package/dist/services/spoke/IconSpokeService.js.map +0 -1
  249. package/dist/services/spoke/SolanaSpokeService.d.ts +0 -46
  250. package/dist/services/spoke/SolanaSpokeService.d.ts.map +0 -1
  251. package/dist/services/spoke/SolanaSpokeService.js +0 -170
  252. package/dist/services/spoke/SolanaSpokeService.js.map +0 -1
  253. package/dist/services/spoke/SpokeService.d.ts +0 -34
  254. package/dist/services/spoke/SpokeService.d.ts.map +0 -1
  255. package/dist/services/spoke/SpokeService.js +0 -102
  256. package/dist/services/spoke/SpokeService.js.map +0 -1
  257. package/dist/services/spoke/StellarSpokeService.d.ts +0 -35
  258. package/dist/services/spoke/StellarSpokeService.d.ts.map +0 -1
  259. package/dist/services/spoke/StellarSpokeService.js +0 -39
  260. package/dist/services/spoke/StellarSpokeService.js.map +0 -1
  261. package/dist/services/spoke/SuiSpokeService.d.ts +0 -69
  262. package/dist/services/spoke/SuiSpokeService.d.ts.map +0 -1
  263. package/dist/services/spoke/SuiSpokeService.js +0 -74
  264. package/dist/services/spoke/SuiSpokeService.js.map +0 -1
  265. package/dist/services/spoke/index.d.ts +0 -3
  266. package/dist/services/spoke/index.d.ts.map +0 -1
  267. package/dist/services/spoke/index.js +0 -3
  268. package/dist/services/spoke/index.js.map +0 -1
  269. package/dist/tests/services/hub/EvmAssetManagerService.test.d.ts +0 -2
  270. package/dist/tests/services/hub/EvmAssetManagerService.test.d.ts.map +0 -1
  271. package/dist/tests/services/hub/EvmAssetManagerService.test.js +0 -138
  272. package/dist/tests/services/hub/EvmAssetManagerService.test.js.map +0 -1
  273. package/dist/tests/services/hub/EvmMoneyMarketService.test.d.ts +0 -2
  274. package/dist/tests/services/hub/EvmMoneyMarketService.test.d.ts.map +0 -1
  275. package/dist/tests/services/hub/EvmMoneyMarketService.test.js +0 -121
  276. package/dist/tests/services/hub/EvmMoneyMarketService.test.js.map +0 -1
  277. package/dist/tests/services/hub/EvmVaultTokenService.test.d.ts +0 -2
  278. package/dist/tests/services/hub/EvmVaultTokenService.test.d.ts.map +0 -1
  279. package/dist/tests/services/hub/EvmVaultTokenService.test.js +0 -98
  280. package/dist/tests/services/hub/EvmVaultTokenService.test.js.map +0 -1
  281. package/dist/tests/services/spoke/EvmSpokeService.test.d.ts +0 -2
  282. package/dist/tests/services/spoke/EvmSpokeService.test.d.ts.map +0 -1
  283. package/dist/tests/services/spoke/EvmSpokeService.test.js +0 -198
  284. package/dist/tests/services/spoke/EvmSpokeService.test.js.map +0 -1
  285. package/dist/types.d.ts +0 -352
  286. package/dist/types.d.ts.map +0 -1
  287. package/dist/types.js +0 -30
  288. package/dist/types.js.map +0 -1
  289. package/dist/utils/evm-utils.d.ts +0 -10
  290. package/dist/utils/evm-utils.d.ts.map +0 -1
  291. package/dist/utils/evm-utils.js +0 -15
  292. package/dist/utils/evm-utils.js.map +0 -1
  293. package/dist/utils/index.d.ts +0 -3
  294. package/dist/utils/index.d.ts.map +0 -1
  295. package/dist/utils/index.js +0 -3
  296. package/dist/utils/index.js.map +0 -1
  297. package/dist/utils/shared-utils.d.ts +0 -20
  298. package/dist/utils/shared-utils.d.ts.map +0 -1
  299. package/dist/utils/shared-utils.js +0 -69
  300. package/dist/utils/shared-utils.js.map +0 -1
  301. package/dist/utils/shared-utils.test.d.ts +0 -2
  302. package/dist/utils/shared-utils.test.d.ts.map +0 -1
  303. package/dist/utils/shared-utils.test.js +0 -63
  304. package/dist/utils/shared-utils.test.js.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) [2024] [Balanced Network]
3
+ Copyright (c) [2025] [Sodax]
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,13 +2,49 @@
2
2
 
3
3
  The Sodax SDK provides a comprehensive interface for interacting with the Sodax protocol, enabling cross-chain swaps and money market operations.
4
4
 
5
- ## Installation
5
+ ## Features
6
+
7
+ ### Swaps (Solver / Intents) [📖](./docs/SOLVER.md)
8
+ - EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM❌, Lightlink) ✅
9
+ - Sui ✅
10
+ - Stellar ✅
11
+ - ICON ✅
12
+ - Solana ✅
13
+ - Injective ✅
14
+
15
+ ### Lend and Borrow (Money Market) [📖](./docs/MONEY_MARKET.md)
16
+ - EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, Lightlink) ✅
17
+ - Sui ✅
18
+ - Stellar ✅
19
+ - ICON ✅
20
+ - Solana ✅
21
+ - Injective ✅
22
+
23
+ ### Cross-chain bridging (Bridge) [📖](./docs/BRIDGE.md)
24
+ - EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, Lightlink) ✅
25
+ - Sui ✅
26
+ - Stellar ✅
27
+ - ICON ✅
28
+ - Solana ✅
29
+ - Injective ✅
30
+
31
+ ### Migration [📖](./docs/MIGRATION.md)
32
+ - Legacy bnUSD <> New bnUSD:
33
+ - ICX <> SODA
34
+ - BALN <> SODA
6
35
 
7
- ### NPM
36
+ ## Installation
37
+
38
+ ```bash
39
+ # Using npm
40
+ npm install @sodax/sdk
8
41
 
9
- Installing through npm:
42
+ # Using yarn
43
+ yarn add @sodax/sdk
10
44
 
11
- `npm i --save @sodax/sdk`
45
+ # Using pnpm
46
+ pnpm add @sodax/sdk
47
+ ```
12
48
 
13
49
  ### Local Installation
14
50
 
@@ -36,8 +72,8 @@ How to setup local development
36
72
  ## Intent Solver Endpoints
37
73
 
38
74
  Current Intent Solver API endpoints:
39
- - **Production (mainnet)**: "TODO"
40
- - **Staging** (mainnet): "https://staging-new-world.iconblockchain.xyz"
75
+ - **Production (mainnet)**: "https://sodax-solver-staging.iconblockchain.xyz"
76
+ - **Staging** (mainnet): "https://sodax-solver-staging.iconblockchain.xyz"
41
77
 
42
78
  **Note** Staging endpoint contains features to be potentially released and is subject to frequent change!
43
79
 
@@ -109,7 +145,7 @@ const partnerFeeAmount = {
109
145
  // example of custom solver config
110
146
  const customSolverConfig = {
111
147
  intentsContract: '0x6382D6ccD780758C5e8A6123c33ee8F4472F96ef',
112
- solverApiEndpoint: 'https://staging-new-world.iconblockchain.xyz',
148
+ solverApiEndpoint: 'https://sodax-solver-staging.iconblockchain.xyz',
113
149
  partnerFee: partnerFeePercentage, // or partnerFeeAmount
114
150
  } satisfies SolverConfigParams;
115
151
 
@@ -149,6 +185,8 @@ SDK includes predefined configurations of supported chains, tokens and other rel
149
185
 
150
186
  **NOTE** you should generally only use `spokeChains` configuration to retrieve all supported chains and then invoke per spoke chain based configurations. If you are using hub configurations you should know what you are doing.
151
187
 
188
+ Please refer to [SDK constants.ts](https://github.com/icon-project/sodax-frontend/blob/main/packages/sdk/src/constants.ts) for more.
189
+
152
190
  ```typescript
153
191
  import {
154
192
  getHubChainConfig,
@@ -190,35 +228,162 @@ const supportedMoneyMarketTokens: readonly Token[] = getSupportedMoneyMarketToke
190
228
 
191
229
  Sodax SDK does not force the usage of a specific wallet or library, but requires client to provide implementation of `IWalletProvider` interfaces (e.g. for EVM chains `IEvmWalletProvider` has to be implemented).
192
230
 
193
- As part of Sodax suite, xWagmi SDK is also going to be provided as one example wallet provider implementation. You are free to choose between using our xWagmi SDK or implementing your own wallet connectivity for each chain.
231
+ As part of Sodax suite, Wallet SDK is also going to be provided as one example wallet provider implementation. You are free to choose between using our Wallet SDK or implementing your own wallet connectivity for each chain.
232
+
233
+ - Supported Wallet Provider Interface (`IWalletProvider`)
234
+ - `IEvmWalletProvider`: EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon) ✅
235
+ - `ISuiWalletProvider`: Sui ✅
236
+ - `IIconWalletProvider`: ICON ✅
237
+ - `IStellarWalletProvider`: Stellar ✅
238
+ - `ISolanaWalletProvider`: Solana ✅
239
+ - `IInjectiveWalletProvider`: Injective ✅
194
240
 
195
241
  ### Initialising Spoke Provider
196
242
 
197
- Spoke provider is a main instance used to interact with Sodax features because it contains all the relevant information we need to successfully execute features. You should generally establish SpokeProvider instances for each chain user connects wallet to.
243
+ Spoke provider is a main instance used to interact with Sodax features because it contains all the relevant information we need to successfully execute features. You should generally establish SpokeProvider instances for each chain (e.g. evm, sui, etc..) user connects wallet to.
198
244
 
199
245
  Spoke is simply a chain you are connecting to and SpokeProvider is a container of relevant wallet provider and chain configuration.
200
246
 
247
+ **IMPORTANT**: Sonic Spoke Provider must be instantiated as `SonicSpokeProvider` instance even though it is of `EVM` chain type. This is due to the fact that Sonic chain is a hub chain of Sodax and needs special handling under the hood.
248
+
201
249
  EVM Provider example:
202
250
 
203
251
  ```typescript
204
252
  import { EvmProvider, EvmHubProvider, EvmSpokeProvider, AVALANCHE_MAINNET_CHAIN_ID, SONIC_MAINNET_CHAIN_ID } from "@sodax/sdk"
205
253
 
206
- const evmWalletProvider: IEvmWalletProvider = // injected by xWagmi SDK or your own implementation
254
+ const evmWalletProvider: IEvmWalletProvider = // injected by Wallet SDK or your own implementation
207
255
 
208
256
  // spoke provider represents connection to a specific chain, should be instantiated for each supported chain when user connects wallet
209
257
  const bscSpokeProvider: EvmSpokeProvider = new EvmSpokeProvider(
210
258
  evmWalletProvider, // user connected wallet
211
- spokeChainConfig[BSC_MAINNET_CHAIN_ID] as EvmSpokeChainConfig, // connected chain config
259
+ spokeChainConfig[BSC_MAINNET_CHAIN_ID], // connected chain config
212
260
  );
213
261
  ```
214
262
 
263
+ ### Estimate Gas for Raw Transactions
264
+
265
+ The `estimateGas` function allows you to estimate the gas cost for raw transactions before executing them. This is particularly useful for all Sodax operations (swaps, money market operations, approvals) to provide users with accurate gas estimates.
266
+
267
+ The function is available on all service classes:
268
+ - `SolverService.estimateGas()` - for solver/intent operations (reachable through `sodax.solver`)
269
+ - `MoneyMarketService.estimateGas()` - for money market operations (reachable through `sodax.moneyMarket`)
270
+ - `SpokeService.estimateGas()` - for general spoke chain operations
271
+
272
+ ```typescript
273
+ import {
274
+ SolverService,
275
+ MoneyMarketService,
276
+ SpokeService,
277
+ MoneyMarketSupplyParams
278
+ } from "@sodax/sdk";
279
+
280
+ // Example: Estimate gas for a solver swap transaction
281
+ const createIntentResult = await sodax.solver.createIntent(
282
+ createIntentParams,
283
+ bscSpokeProvider,
284
+ partnerFeeAmount,
285
+ true, // true = get raw transaction
286
+ );
287
+
288
+ if (createIntentResult.ok) {
289
+ const [rawTx, intent] = createIntentResult.value;
290
+
291
+ // Estimate gas for the raw transaction
292
+ const gasEstimate = await SolverService.estimateGas(rawTx, bscSpokeProvider);
293
+
294
+ if (gasEstimate.ok) {
295
+ console.log('Estimated gas for swap:', gasEstimate.value);
296
+ } else {
297
+ console.error('Failed to estimate gas for swap:', gasEstimate.error);
298
+ }
299
+ }
300
+
301
+ // Example: Estimate gas for a money market supply transaction
302
+ const supplyResult = await sodax.moneyMarket.createSupplyIntent(
303
+ supplyParams,
304
+ bscSpokeProvider,
305
+ true, // true = get raw transaction
306
+ );
307
+
308
+ if (supplyResult.ok) {
309
+ const rawTx = supplyResult.value;
310
+
311
+ // Estimate gas for the raw transaction
312
+ const gasEstimate = await MoneyMarketService.estimateGas(rawTx, bscSpokeProvider);
313
+
314
+ if (gasEstimate.ok) {
315
+ console.log('Estimated gas for supply:', gasEstimate.value);
316
+ } else {
317
+ console.error('Failed to estimate gas for supply:', gasEstimate.error);
318
+ }
319
+ }
320
+
321
+ // Example: Estimate gas for an approval transaction
322
+ const approveResult = await sodax.solver.approve(
323
+ tokenAddress,
324
+ amount,
325
+ bscSpokeProvider,
326
+ true // true = get raw transaction
327
+ );
328
+
329
+ if (approveResult.ok) {
330
+ const rawTx = approveResult.value;
331
+
332
+ // Estimate gas for the approval transaction
333
+ const gasEstimate = await SpokeService.estimateGas(rawTx, bscSpokeProvider);
334
+
335
+ if (gasEstimate.ok) {
336
+ console.log('Estimated gas for approval:', gasEstimate.value);
337
+ } else {
338
+ console.error('Failed to estimate gas for approval:', gasEstimate.error);
339
+ }
340
+ }
341
+ ```
342
+
215
343
  ### Accessing Sodax Features
216
344
 
217
345
  Sodax feature set currently contain:
218
346
  - Solver: used for intent based swaps. Please find documentation for Solver part of the SDK in [SOLVER.md](./docs/SOLVER.md)
219
347
  - Money Market: used for lending and borowing. Please find documentation for Solver part of the SDK in [MONEY_MARKET.md](./docs/MONEY_MARKET.md)
348
+ - Bridge: provides functionality to bridge tokens between different blockchain chains [BRIDGE.md](./docs/BRIDGE.md)
220
349
 
221
350
  ## Intent Relay API
222
351
 
223
352
  Intent relay is internally used to relay transaction information from one chain to another.
224
353
  Sodax SDK abstracts the heavy lifting of using the relay, but you can find documentation for Intent Relay API in [INTENT_RELAY_API.md](./docs/INTENT_RELAY_API.md) in case you want to explore it.
354
+
355
+
356
+ ## Contributing
357
+
358
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
359
+
360
+ ## Development
361
+
362
+ ```bash
363
+ # Install dependencies
364
+ pnpm install
365
+
366
+ # Build the package
367
+ pnpm build
368
+
369
+ # Run in development mode
370
+ pnpm dev
371
+
372
+ # Run type checking
373
+ pnpm checkTs
374
+
375
+ # Format code
376
+ pnpm pretty
377
+
378
+ # Lint code
379
+ pnpm lint
380
+ ```
381
+
382
+ ## License
383
+
384
+ [MIT](LICENSE)
385
+
386
+ ## Support
387
+
388
+ - [GitHub Issues](https://github.com/icon-project/sodax-frontend/issues)
389
+ - [Discord Community](https://discord.gg/xM2Nh4S6vN)