@sodax/sdk 0.0.1-rc.3 → 0.0.1-rc.31

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 +164 -11
  3. package/dist/index.cjs +16936 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +9866 -0
  6. package/dist/index.d.ts +9865 -9
  7. package/dist/index.mjs +16684 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +31 -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 -1154
  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 -323
  194. package/dist/services/moneyMarket/MoneyMarketService.d.ts.map +0 -1
  195. package/dist/services/moneyMarket/MoneyMarketService.js +0 -612
  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 -196
  226. package/dist/services/solver/SolverService.d.ts.map +0 -1
  227. package/dist/services/solver/SolverService.js +0 -329
  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,38 @@
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) ✅
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) ✅
17
+ - Sui ✅
18
+ - Stellar ✅
19
+ - ICON ✅
20
+ - Solana ✅
21
+ - Injective ✅
22
+
23
+ ### Migration [📖](./docs/MIGRATION.md)
6
24
 
7
- ### NPM
25
+ ## Installation
26
+
27
+ ```bash
28
+ # Using npm
29
+ npm install @sodax/sdk
8
30
 
9
- Installing through npm:
31
+ # Using yarn
32
+ yarn add @sodax/sdk
10
33
 
11
- `npm i --save @sodax/sdk`
34
+ # Using pnpm
35
+ pnpm add @sodax/sdk
36
+ ```
12
37
 
13
38
  ### Local Installation
14
39
 
@@ -36,8 +61,8 @@ How to setup local development
36
61
  ## Intent Solver Endpoints
37
62
 
38
63
  Current Intent Solver API endpoints:
39
- - **Production (mainnet)**: "TODO"
40
- - **Staging** (mainnet): "https://staging-new-world.iconblockchain.xyz"
64
+ - **Production (mainnet)**: "https://sodax-solver-staging.iconblockchain.xyz"
65
+ - **Staging** (mainnet): "https://sodax-solver-staging.iconblockchain.xyz"
41
66
 
42
67
  **Note** Staging endpoint contains features to be potentially released and is subject to frequent change!
43
68
 
@@ -109,7 +134,7 @@ const partnerFeeAmount = {
109
134
  // example of custom solver config
110
135
  const customSolverConfig = {
111
136
  intentsContract: '0x6382D6ccD780758C5e8A6123c33ee8F4472F96ef',
112
- solverApiEndpoint: 'https://staging-new-world.iconblockchain.xyz',
137
+ solverApiEndpoint: 'https://sodax-solver-staging.iconblockchain.xyz',
113
138
  partnerFee: partnerFeePercentage, // or partnerFeeAmount
114
139
  } satisfies SolverConfigParams;
115
140
 
@@ -149,6 +174,8 @@ SDK includes predefined configurations of supported chains, tokens and other rel
149
174
 
150
175
  **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
176
 
177
+ Please refer to [SDK constants.ts](https://github.com/icon-project/sodax-frontend/blob/main/packages/sdk/src/constants.ts) for more.
178
+
152
179
  ```typescript
153
180
  import {
154
181
  getHubChainConfig,
@@ -190,28 +217,118 @@ const supportedMoneyMarketTokens: readonly Token[] = getSupportedMoneyMarketToke
190
217
 
191
218
  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
219
 
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.
220
+ 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.
221
+
222
+ - Supported Wallet Provider Interface (`IWalletProvider`)
223
+ - `IEvmWalletProvider`: EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon) ✅
224
+ - `ISuiWalletProvider`: Sui ✅
225
+ - `IIconWalletProvider`: ICON ✅
226
+ - `IStellarWalletProvider`: Stellar ✅
227
+ - `ISolanaWalletProvider`: Solana ✅
228
+ - `IInjectiveWalletProvider`: Injective ✅
194
229
 
195
230
  ### Initialising Spoke Provider
196
231
 
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.
232
+ 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
233
 
199
234
  Spoke is simply a chain you are connecting to and SpokeProvider is a container of relevant wallet provider and chain configuration.
200
235
 
236
+ **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.
237
+
201
238
  EVM Provider example:
202
239
 
203
240
  ```typescript
204
241
  import { EvmProvider, EvmHubProvider, EvmSpokeProvider, AVALANCHE_MAINNET_CHAIN_ID, SONIC_MAINNET_CHAIN_ID } from "@sodax/sdk"
205
242
 
206
- const evmWalletProvider: IEvmWalletProvider = // injected by xWagmi SDK or your own implementation
243
+ const evmWalletProvider: IEvmWalletProvider = // injected by Wallet SDK or your own implementation
207
244
 
208
245
  // spoke provider represents connection to a specific chain, should be instantiated for each supported chain when user connects wallet
209
246
  const bscSpokeProvider: EvmSpokeProvider = new EvmSpokeProvider(
210
247
  evmWalletProvider, // user connected wallet
211
- spokeChainConfig[BSC_MAINNET_CHAIN_ID] as EvmSpokeChainConfig, // connected chain config
248
+ spokeChainConfig[BSC_MAINNET_CHAIN_ID], // connected chain config
212
249
  );
213
250
  ```
214
251
 
252
+ ### Estimate Gas for Raw Transactions
253
+
254
+ 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.
255
+
256
+ The function is available on all service classes:
257
+ - `SolverService.estimateGas()` - for solver/intent operations (reachable through `sodax.solver`)
258
+ - `MoneyMarketService.estimateGas()` - for money market operations (reachable through `sodax.moneyMarket`)
259
+ - `SpokeService.estimateGas()` - for general spoke chain operations
260
+
261
+ ```typescript
262
+ import {
263
+ SolverService,
264
+ MoneyMarketService,
265
+ SpokeService,
266
+ MoneyMarketSupplyParams
267
+ } from "@sodax/sdk";
268
+
269
+ // Example: Estimate gas for a solver swap transaction
270
+ const createIntentResult = await sodax.solver.createIntent(
271
+ createIntentParams,
272
+ bscSpokeProvider,
273
+ partnerFeeAmount,
274
+ true, // true = get raw transaction
275
+ );
276
+
277
+ if (createIntentResult.ok) {
278
+ const [rawTx, intent] = createIntentResult.value;
279
+
280
+ // Estimate gas for the raw transaction
281
+ const gasEstimate = await SolverService.estimateGas(rawTx, bscSpokeProvider);
282
+
283
+ if (gasEstimate.ok) {
284
+ console.log('Estimated gas for swap:', gasEstimate.value);
285
+ } else {
286
+ console.error('Failed to estimate gas for swap:', gasEstimate.error);
287
+ }
288
+ }
289
+
290
+ // Example: Estimate gas for a money market supply transaction
291
+ const supplyResult = await sodax.moneyMarket.createSupplyIntent(
292
+ supplyParams,
293
+ bscSpokeProvider,
294
+ true, // true = get raw transaction
295
+ );
296
+
297
+ if (supplyResult.ok) {
298
+ const rawTx = supplyResult.value;
299
+
300
+ // Estimate gas for the raw transaction
301
+ const gasEstimate = await MoneyMarketService.estimateGas(rawTx, bscSpokeProvider);
302
+
303
+ if (gasEstimate.ok) {
304
+ console.log('Estimated gas for supply:', gasEstimate.value);
305
+ } else {
306
+ console.error('Failed to estimate gas for supply:', gasEstimate.error);
307
+ }
308
+ }
309
+
310
+ // Example: Estimate gas for an approval transaction
311
+ const approveResult = await sodax.solver.approve(
312
+ tokenAddress,
313
+ amount,
314
+ bscSpokeProvider,
315
+ true // true = get raw transaction
316
+ );
317
+
318
+ if (approveResult.ok) {
319
+ const rawTx = approveResult.value;
320
+
321
+ // Estimate gas for the approval transaction
322
+ const gasEstimate = await SpokeService.estimateGas(rawTx, bscSpokeProvider);
323
+
324
+ if (gasEstimate.ok) {
325
+ console.log('Estimated gas for approval:', gasEstimate.value);
326
+ } else {
327
+ console.error('Failed to estimate gas for approval:', gasEstimate.error);
328
+ }
329
+ }
330
+ ```
331
+
215
332
  ### Accessing Sodax Features
216
333
 
217
334
  Sodax feature set currently contain:
@@ -222,3 +339,39 @@ Sodax feature set currently contain:
222
339
 
223
340
  Intent relay is internally used to relay transaction information from one chain to another.
224
341
  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.
342
+
343
+
344
+ ## Contributing
345
+
346
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
347
+
348
+ ## Development
349
+
350
+ ```bash
351
+ # Install dependencies
352
+ pnpm install
353
+
354
+ # Build the package
355
+ pnpm build
356
+
357
+ # Run in development mode
358
+ pnpm dev
359
+
360
+ # Run type checking
361
+ pnpm checkTs
362
+
363
+ # Format code
364
+ pnpm pretty
365
+
366
+ # Lint code
367
+ pnpm lint
368
+ ```
369
+
370
+ ## License
371
+
372
+ [MIT](LICENSE)
373
+
374
+ ## Support
375
+
376
+ - [GitHub Issues](https://github.com/icon-project/sodax-frontend/issues)
377
+ - [Discord Community](https://discord.gg/xM2Nh4S6vN)