@sodax/sdk 0.0.1-rc.6 → 0.0.1-rc.8

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 (303) hide show
  1. package/README.md +3 -1
  2. package/dist/index.cjs +11147 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +6831 -0
  5. package/dist/index.d.ts +6830 -9
  6. package/dist/index.mjs +10991 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +20 -6
  9. package/dist/abis/asset-manager.abi.d.ts +0 -418
  10. package/dist/abis/asset-manager.abi.d.ts.map +0 -1
  11. package/dist/abis/asset-manager.abi.js +0 -542
  12. package/dist/abis/asset-manager.abi.js.map +0 -1
  13. package/dist/abis/connection.abi.d.ts +0 -72
  14. package/dist/abis/connection.abi.d.ts.map +0 -1
  15. package/dist/abis/connection.abi.js +0 -92
  16. package/dist/abis/connection.abi.js.map +0 -1
  17. package/dist/abis/erc20.abi.d.ts +0 -236
  18. package/dist/abis/erc20.abi.d.ts.map +0 -1
  19. package/dist/abis/erc20.abi.js +0 -311
  20. package/dist/abis/erc20.abi.js.map +0 -1
  21. package/dist/abis/index.d.ts +0 -10
  22. package/dist/abis/index.d.ts.map +0 -1
  23. package/dist/abis/index.js +0 -10
  24. package/dist/abis/index.js.map +0 -1
  25. package/dist/abis/intents.abi.d.ts +0 -901
  26. package/dist/abis/intents.abi.d.ts.map +0 -1
  27. package/dist/abis/intents.abi.js +0 -1158
  28. package/dist/abis/intents.abi.js.map +0 -1
  29. package/dist/abis/pool.abi.d.ts +0 -626
  30. package/dist/abis/pool.abi.d.ts.map +0 -1
  31. package/dist/abis/pool.abi.js +0 -812
  32. package/dist/abis/pool.abi.js.map +0 -1
  33. package/dist/abis/spokeAssetManager.abi.d.ts +0 -169
  34. package/dist/abis/spokeAssetManager.abi.d.ts.map +0 -1
  35. package/dist/abis/spokeAssetManager.abi.js +0 -217
  36. package/dist/abis/spokeAssetManager.abi.js.map +0 -1
  37. package/dist/abis/uiPoolData.abi.d.ts +0 -369
  38. package/dist/abis/uiPoolData.abi.d.ts.map +0 -1
  39. package/dist/abis/uiPoolData.abi.js +0 -476
  40. package/dist/abis/uiPoolData.abi.js.map +0 -1
  41. package/dist/abis/vaultToken.abi.d.ts +0 -816
  42. package/dist/abis/vaultToken.abi.d.ts.map +0 -1
  43. package/dist/abis/vaultToken.abi.js +0 -1062
  44. package/dist/abis/vaultToken.abi.js.map +0 -1
  45. package/dist/abis/walletFactory.abi.d.ts +0 -20
  46. package/dist/abis/walletFactory.abi.d.ts.map +0 -1
  47. package/dist/abis/walletFactory.abi.js +0 -27
  48. package/dist/abis/walletFactory.abi.js.map +0 -1
  49. package/dist/constants.d.ts +0 -550
  50. package/dist/constants.d.ts.map +0 -1
  51. package/dist/constants.js +0 -1196
  52. package/dist/constants.js.map +0 -1
  53. package/dist/constants.test.d.ts +0 -2
  54. package/dist/constants.test.d.ts.map +0 -1
  55. package/dist/constants.test.js +0 -129
  56. package/dist/constants.test.js.map +0 -1
  57. package/dist/entities/Providers.d.ts +0 -54
  58. package/dist/entities/Providers.d.ts.map +0 -1
  59. package/dist/entities/Providers.js +0 -51
  60. package/dist/entities/Providers.js.map +0 -1
  61. package/dist/entities/Sodax.d.ts +0 -23
  62. package/dist/entities/Sodax.d.ts.map +0 -1
  63. package/dist/entities/Sodax.js +0 -29
  64. package/dist/entities/Sodax.js.map +0 -1
  65. package/dist/entities/Sodax.test.d.ts +0 -2
  66. package/dist/entities/Sodax.test.d.ts.map +0 -1
  67. package/dist/entities/Sodax.test.js +0 -392
  68. package/dist/entities/Sodax.test.js.map +0 -1
  69. package/dist/entities/cosmos/CW20Token.d.ts +0 -39
  70. package/dist/entities/cosmos/CW20Token.d.ts.map +0 -1
  71. package/dist/entities/cosmos/CW20Token.js +0 -65
  72. package/dist/entities/cosmos/CW20Token.js.map +0 -1
  73. package/dist/entities/cosmos/CWSpokeProvider.d.ts +0 -92
  74. package/dist/entities/cosmos/CWSpokeProvider.d.ts.map +0 -1
  75. package/dist/entities/cosmos/CWSpokeProvider.js +0 -143
  76. package/dist/entities/cosmos/CWSpokeProvider.js.map +0 -1
  77. package/dist/entities/cosmos/CosmosWalletProvider.d.ts +0 -28
  78. package/dist/entities/cosmos/CosmosWalletProvider.d.ts.map +0 -1
  79. package/dist/entities/cosmos/CosmosWalletProvider.js +0 -102
  80. package/dist/entities/cosmos/CosmosWalletProvider.js.map +0 -1
  81. package/dist/entities/cosmos/InjectiveWalletProvider.d.ts +0 -25
  82. package/dist/entities/cosmos/InjectiveWalletProvider.d.ts.map +0 -1
  83. package/dist/entities/cosmos/InjectiveWalletProvider.js +0 -76
  84. package/dist/entities/cosmos/InjectiveWalletProvider.js.map +0 -1
  85. package/dist/entities/icon/HanaWalletConnector.d.ts +0 -36
  86. package/dist/entities/icon/HanaWalletConnector.d.ts.map +0 -1
  87. package/dist/entities/icon/HanaWalletConnector.js +0 -92
  88. package/dist/entities/icon/HanaWalletConnector.js.map +0 -1
  89. package/dist/entities/icon/IconSpokeProvider.d.ts +0 -10
  90. package/dist/entities/icon/IconSpokeProvider.d.ts.map +0 -1
  91. package/dist/entities/icon/IconSpokeProvider.js +0 -12
  92. package/dist/entities/icon/IconSpokeProvider.js.map +0 -1
  93. package/dist/entities/icon/index.d.ts +0 -4
  94. package/dist/entities/icon/index.d.ts.map +0 -1
  95. package/dist/entities/icon/index.js +0 -4
  96. package/dist/entities/icon/index.js.map +0 -1
  97. package/dist/entities/icon/utils.d.ts +0 -3
  98. package/dist/entities/icon/utils.d.ts.map +0 -1
  99. package/dist/entities/icon/utils.js +0 -4
  100. package/dist/entities/icon/utils.js.map +0 -1
  101. package/dist/entities/index.d.ts +0 -7
  102. package/dist/entities/index.d.ts.map +0 -1
  103. package/dist/entities/index.js +0 -7
  104. package/dist/entities/index.js.map +0 -1
  105. package/dist/entities/solana/Configs.d.ts +0 -38
  106. package/dist/entities/solana/Configs.d.ts.map +0 -1
  107. package/dist/entities/solana/Configs.js +0 -149
  108. package/dist/entities/solana/Configs.js.map +0 -1
  109. package/dist/entities/solana/SolanaSpokeProvider.d.ts +0 -9
  110. package/dist/entities/solana/SolanaSpokeProvider.d.ts.map +0 -1
  111. package/dist/entities/solana/SolanaSpokeProvider.js +0 -9
  112. package/dist/entities/solana/SolanaSpokeProvider.js.map +0 -1
  113. package/dist/entities/solana/SolanaWalletProvider.d.ts +0 -20
  114. package/dist/entities/solana/SolanaWalletProvider.d.ts.map +0 -1
  115. package/dist/entities/solana/SolanaWalletProvider.js +0 -53
  116. package/dist/entities/solana/SolanaWalletProvider.js.map +0 -1
  117. package/dist/entities/solana/index.d.ts +0 -4
  118. package/dist/entities/solana/index.d.ts.map +0 -1
  119. package/dist/entities/solana/index.js +0 -4
  120. package/dist/entities/solana/index.js.map +0 -1
  121. package/dist/entities/solana/pda/pda.d.ts +0 -45
  122. package/dist/entities/solana/pda/pda.d.ts.map +0 -1
  123. package/dist/entities/solana/pda/pda.js +0 -44
  124. package/dist/entities/solana/pda/pda.js.map +0 -1
  125. package/dist/entities/solana/types/asset_manager.d.ts +0 -919
  126. package/dist/entities/solana/types/asset_manager.d.ts.map +0 -1
  127. package/dist/entities/solana/types/asset_manager.js +0 -2
  128. package/dist/entities/solana/types/asset_manager.js.map +0 -1
  129. package/dist/entities/solana/types/connection.d.ts +0 -446
  130. package/dist/entities/solana/types/connection.d.ts.map +0 -1
  131. package/dist/entities/solana/types/connection.js +0 -2
  132. package/dist/entities/solana/types/connection.js.map +0 -1
  133. package/dist/entities/solana/types/rate_limit_contract.d.ts +0 -348
  134. package/dist/entities/solana/types/rate_limit_contract.d.ts.map +0 -1
  135. package/dist/entities/solana/types/rate_limit_contract.js +0 -2
  136. package/dist/entities/solana/types/rate_limit_contract.js.map +0 -1
  137. package/dist/entities/solana/utils/utils.d.ts +0 -6
  138. package/dist/entities/solana/utils/utils.d.ts.map +0 -1
  139. package/dist/entities/solana/utils/utils.js +0 -18
  140. package/dist/entities/solana/utils/utils.js.map +0 -1
  141. package/dist/entities/stellar/StellarSpokeProvider.d.ts +0 -17
  142. package/dist/entities/stellar/StellarSpokeProvider.d.ts.map +0 -1
  143. package/dist/entities/stellar/StellarSpokeProvider.js +0 -125
  144. package/dist/entities/stellar/StellarSpokeProvider.js.map +0 -1
  145. package/dist/entities/sui/SuiSpokeProvider.d.ts +0 -35
  146. package/dist/entities/sui/SuiSpokeProvider.d.ts.map +0 -1
  147. package/dist/entities/sui/SuiSpokeProvider.js +0 -145
  148. package/dist/entities/sui/SuiSpokeProvider.js.map +0 -1
  149. package/dist/errors.d.ts +0 -2
  150. package/dist/errors.d.ts.map +0 -1
  151. package/dist/errors.js +0 -2
  152. package/dist/errors.js.map +0 -1
  153. package/dist/guards.d.ts +0 -25
  154. package/dist/guards.d.ts.map +0 -1
  155. package/dist/guards.js +0 -110
  156. package/dist/guards.js.map +0 -1
  157. package/dist/index.d.ts.map +0 -1
  158. package/dist/index.js +0 -10
  159. package/dist/index.js.map +0 -1
  160. package/dist/services/hub/EvmAssetManagerService.d.ts +0 -61
  161. package/dist/services/hub/EvmAssetManagerService.d.ts.map +0 -1
  162. package/dist/services/hub/EvmAssetManagerService.js +0 -103
  163. package/dist/services/hub/EvmAssetManagerService.js.map +0 -1
  164. package/dist/services/hub/EvmVaultTokenService.d.ts +0 -81
  165. package/dist/services/hub/EvmVaultTokenService.d.ts.map +0 -1
  166. package/dist/services/hub/EvmVaultTokenService.js +0 -161
  167. package/dist/services/hub/EvmVaultTokenService.js.map +0 -1
  168. package/dist/services/hub/EvmWalletAbstraction.d.ts +0 -9
  169. package/dist/services/hub/EvmWalletAbstraction.d.ts.map +0 -1
  170. package/dist/services/hub/EvmWalletAbstraction.js +0 -14
  171. package/dist/services/hub/EvmWalletAbstraction.js.map +0 -1
  172. package/dist/services/hub/index.d.ts +0 -4
  173. package/dist/services/hub/index.d.ts.map +0 -1
  174. package/dist/services/hub/index.js +0 -4
  175. package/dist/services/hub/index.js.map +0 -1
  176. package/dist/services/index.d.ts +0 -7
  177. package/dist/services/index.d.ts.map +0 -1
  178. package/dist/services/index.js +0 -7
  179. package/dist/services/index.js.map +0 -1
  180. package/dist/services/intentRelay/IntentRelayApiService.d.ts +0 -112
  181. package/dist/services/intentRelay/IntentRelayApiService.d.ts.map +0 -1
  182. package/dist/services/intentRelay/IntentRelayApiService.js +0 -160
  183. package/dist/services/intentRelay/IntentRelayApiService.js.map +0 -1
  184. package/dist/services/intentRelay/IntentRelayApiService.test.d.ts +0 -2
  185. package/dist/services/intentRelay/IntentRelayApiService.test.d.ts.map +0 -1
  186. package/dist/services/intentRelay/IntentRelayApiService.test.js +0 -134
  187. package/dist/services/intentRelay/IntentRelayApiService.test.js.map +0 -1
  188. package/dist/services/intentRelay/index.d.ts +0 -2
  189. package/dist/services/intentRelay/index.d.ts.map +0 -1
  190. package/dist/services/intentRelay/index.js +0 -2
  191. package/dist/services/intentRelay/index.js.map +0 -1
  192. package/dist/services/moneyMarket/MoneyMarketService.d.ts +0 -525
  193. package/dist/services/moneyMarket/MoneyMarketService.d.ts.map +0 -1
  194. package/dist/services/moneyMarket/MoneyMarketService.js +0 -814
  195. package/dist/services/moneyMarket/MoneyMarketService.js.map +0 -1
  196. package/dist/services/moneyMarket/MoneyMarketService.test.d.ts +0 -2
  197. package/dist/services/moneyMarket/MoneyMarketService.test.d.ts.map +0 -1
  198. package/dist/services/moneyMarket/MoneyMarketService.test.js +0 -262
  199. package/dist/services/moneyMarket/MoneyMarketService.test.js.map +0 -1
  200. package/dist/services/moneyMarket/index.d.ts +0 -2
  201. package/dist/services/moneyMarket/index.d.ts.map +0 -1
  202. package/dist/services/moneyMarket/index.js +0 -2
  203. package/dist/services/moneyMarket/index.js.map +0 -1
  204. package/dist/services/shared/Erc20Service.d.ts +0 -42
  205. package/dist/services/shared/Erc20Service.d.ts.map +0 -1
  206. package/dist/services/shared/Erc20Service.js +0 -108
  207. package/dist/services/shared/Erc20Service.js.map +0 -1
  208. package/dist/services/shared/index.d.ts +0 -2
  209. package/dist/services/shared/index.d.ts.map +0 -1
  210. package/dist/services/shared/index.js +0 -2
  211. package/dist/services/shared/index.js.map +0 -1
  212. package/dist/services/solver/EvmSolverService.d.ts +0 -125
  213. package/dist/services/solver/EvmSolverService.d.ts.map +0 -1
  214. package/dist/services/solver/EvmSolverService.js +0 -166
  215. package/dist/services/solver/EvmSolverService.js.map +0 -1
  216. package/dist/services/solver/SolverApiService.d.ts +0 -40
  217. package/dist/services/solver/SolverApiService.d.ts.map +0 -1
  218. package/dist/services/solver/SolverApiService.js +0 -157
  219. package/dist/services/solver/SolverApiService.js.map +0 -1
  220. package/dist/services/solver/SolverApiService.test.d.ts +0 -2
  221. package/dist/services/solver/SolverApiService.test.d.ts.map +0 -1
  222. package/dist/services/solver/SolverApiService.test.js +0 -181
  223. package/dist/services/solver/SolverApiService.test.js.map +0 -1
  224. package/dist/services/solver/SolverService.d.ts +0 -295
  225. package/dist/services/solver/SolverService.d.ts.map +0 -1
  226. package/dist/services/solver/SolverService.js +0 -429
  227. package/dist/services/solver/SolverService.js.map +0 -1
  228. package/dist/services/solver/SolverService.test.d.ts +0 -2
  229. package/dist/services/solver/SolverService.test.d.ts.map +0 -1
  230. package/dist/services/solver/SolverService.test.js +0 -439
  231. package/dist/services/solver/SolverService.test.js.map +0 -1
  232. package/dist/services/solver/index.d.ts +0 -3
  233. package/dist/services/solver/index.d.ts.map +0 -1
  234. package/dist/services/solver/index.js +0 -3
  235. package/dist/services/solver/index.js.map +0 -1
  236. package/dist/services/spoke/CWSpokeService.d.ts +0 -67
  237. package/dist/services/spoke/CWSpokeService.d.ts.map +0 -1
  238. package/dist/services/spoke/CWSpokeService.js +0 -75
  239. package/dist/services/spoke/CWSpokeService.js.map +0 -1
  240. package/dist/services/spoke/EvmSpokeService.d.ts +0 -62
  241. package/dist/services/spoke/EvmSpokeService.d.ts.map +0 -1
  242. package/dist/services/spoke/EvmSpokeService.js +0 -120
  243. package/dist/services/spoke/EvmSpokeService.js.map +0 -1
  244. package/dist/services/spoke/IconSpokeService.d.ts +0 -56
  245. package/dist/services/spoke/IconSpokeService.d.ts.map +0 -1
  246. package/dist/services/spoke/IconSpokeService.js +0 -124
  247. package/dist/services/spoke/IconSpokeService.js.map +0 -1
  248. package/dist/services/spoke/SolanaSpokeService.d.ts +0 -46
  249. package/dist/services/spoke/SolanaSpokeService.d.ts.map +0 -1
  250. package/dist/services/spoke/SolanaSpokeService.js +0 -156
  251. package/dist/services/spoke/SolanaSpokeService.js.map +0 -1
  252. package/dist/services/spoke/SpokeService.d.ts +0 -34
  253. package/dist/services/spoke/SpokeService.d.ts.map +0 -1
  254. package/dist/services/spoke/SpokeService.js +0 -101
  255. package/dist/services/spoke/SpokeService.js.map +0 -1
  256. package/dist/services/spoke/StellarSpokeService.d.ts +0 -35
  257. package/dist/services/spoke/StellarSpokeService.d.ts.map +0 -1
  258. package/dist/services/spoke/StellarSpokeService.js +0 -39
  259. package/dist/services/spoke/StellarSpokeService.js.map +0 -1
  260. package/dist/services/spoke/SuiSpokeService.d.ts +0 -69
  261. package/dist/services/spoke/SuiSpokeService.d.ts.map +0 -1
  262. package/dist/services/spoke/SuiSpokeService.js +0 -73
  263. package/dist/services/spoke/SuiSpokeService.js.map +0 -1
  264. package/dist/services/spoke/index.d.ts +0 -3
  265. package/dist/services/spoke/index.d.ts.map +0 -1
  266. package/dist/services/spoke/index.js +0 -3
  267. package/dist/services/spoke/index.js.map +0 -1
  268. package/dist/tests/services/hub/EvmAssetManagerService.test.d.ts +0 -2
  269. package/dist/tests/services/hub/EvmAssetManagerService.test.d.ts.map +0 -1
  270. package/dist/tests/services/hub/EvmAssetManagerService.test.js +0 -138
  271. package/dist/tests/services/hub/EvmAssetManagerService.test.js.map +0 -1
  272. package/dist/tests/services/hub/EvmMoneyMarketService.test.d.ts +0 -2
  273. package/dist/tests/services/hub/EvmMoneyMarketService.test.d.ts.map +0 -1
  274. package/dist/tests/services/hub/EvmMoneyMarketService.test.js +0 -121
  275. package/dist/tests/services/hub/EvmMoneyMarketService.test.js.map +0 -1
  276. package/dist/tests/services/hub/EvmVaultTokenService.test.d.ts +0 -2
  277. package/dist/tests/services/hub/EvmVaultTokenService.test.d.ts.map +0 -1
  278. package/dist/tests/services/hub/EvmVaultTokenService.test.js +0 -98
  279. package/dist/tests/services/hub/EvmVaultTokenService.test.js.map +0 -1
  280. package/dist/tests/services/spoke/EvmSpokeService.test.d.ts +0 -2
  281. package/dist/tests/services/spoke/EvmSpokeService.test.d.ts.map +0 -1
  282. package/dist/tests/services/spoke/EvmSpokeService.test.js +0 -198
  283. package/dist/tests/services/spoke/EvmSpokeService.test.js.map +0 -1
  284. package/dist/types.d.ts +0 -352
  285. package/dist/types.d.ts.map +0 -1
  286. package/dist/types.js +0 -30
  287. package/dist/types.js.map +0 -1
  288. package/dist/utils/evm-utils.d.ts +0 -10
  289. package/dist/utils/evm-utils.d.ts.map +0 -1
  290. package/dist/utils/evm-utils.js +0 -15
  291. package/dist/utils/evm-utils.js.map +0 -1
  292. package/dist/utils/index.d.ts +0 -3
  293. package/dist/utils/index.d.ts.map +0 -1
  294. package/dist/utils/index.js +0 -3
  295. package/dist/utils/index.js.map +0 -1
  296. package/dist/utils/shared-utils.d.ts +0 -20
  297. package/dist/utils/shared-utils.d.ts.map +0 -1
  298. package/dist/utils/shared-utils.js +0 -69
  299. package/dist/utils/shared-utils.js.map +0 -1
  300. package/dist/utils/shared-utils.test.d.ts +0 -2
  301. package/dist/utils/shared-utils.test.d.ts.map +0 -1
  302. package/dist/utils/shared-utils.test.js +0 -63
  303. package/dist/utils/shared-utils.test.js.map +0 -1
@@ -1,429 +0,0 @@
1
- import invariant from 'tiny-invariant';
2
- import { DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, Erc20Service, EvmSpokeProvider, SpokeService, calculateFeeAmount, encodeContractCalls, getIntentRelayChainId, getSolverConfig, isConfiguredSolverConfig, isValidIntentRelayChainId, isValidOriginalAssetAddress, isValidSpokeChainId, submitTransaction, waitUntilIntentExecuted, } from '../../index.js';
3
- import { EvmWalletAbstraction } from '../hub/EvmWalletAbstraction.js';
4
- import { EvmSolverService } from './EvmSolverService.js';
5
- import { SolverApiService } from './SolverApiService.js';
6
- import { SONIC_MAINNET_CHAIN_ID, } from '@sodax/types';
7
- // Data types for arbitrary data
8
- export var IntentDataType;
9
- (function (IntentDataType) {
10
- IntentDataType[IntentDataType["FEE"] = 1] = "FEE";
11
- })(IntentDataType || (IntentDataType = {}));
12
- export class SolverService {
13
- config;
14
- hubProvider;
15
- constructor(config, hubProvider, relayerApiEndpoint) {
16
- if (!config) {
17
- // default to mainnet config
18
- this.config = {
19
- ...getSolverConfig(SONIC_MAINNET_CHAIN_ID), // default to mainnet config
20
- partnerFee: undefined,
21
- relayerApiEndpoint: relayerApiEndpoint ?? DEFAULT_RELAYER_API_ENDPOINT,
22
- };
23
- }
24
- else if (isConfiguredSolverConfig(config)) {
25
- this.config = {
26
- ...config,
27
- partnerFee: config.partnerFee,
28
- relayerApiEndpoint: relayerApiEndpoint ?? DEFAULT_RELAYER_API_ENDPOINT,
29
- };
30
- }
31
- else {
32
- this.config = {
33
- ...getSolverConfig(hubProvider.chainConfig.chain.id), // default to mainnet config
34
- partnerFee: config.partnerFee,
35
- relayerApiEndpoint: relayerApiEndpoint ?? DEFAULT_RELAYER_API_ENDPOINT,
36
- };
37
- }
38
- this.hubProvider = hubProvider;
39
- }
40
- /**
41
- * Request a quote from the solver API
42
- * @param {IntentQuoteRequest} payload - The intent quote request
43
- * @returns {Promise<Result<IntentQuoteResponse, IntentErrorResponse>>} The intent quote response
44
- *
45
- * @example
46
- * const payload = {
47
- * "token_src":"0x2170Ed0880ac9A755fd29B2688956BD959F933F8", // BSC ETH token address
48
- * "token_dst":"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", // ARB WBTC token address
49
- * "token_src_blockchain_id":"0x38.bsc",
50
- * "token_dst_blockchain_id":"0xa4b1.arbitrum",
51
- * "amount":1000000000000000n,
52
- * "quote_type": "exact_input"
53
- * } satisfies IntentQuoteRequest
54
- *
55
- * const response = await solverService.getQuote(payload);
56
- *
57
- * if (response.ok) {
58
- * const quotedAmount = response.value.quoted_amount;
59
- * console.log('Quoted amount:', quotedAmount);
60
- * } else {
61
- * console.error('Quote failed:', response.error);
62
- * }
63
- */
64
- async getQuote(payload) {
65
- return SolverApiService.getQuote(payload, this.config);
66
- }
67
- /**
68
- * Get the fee for a given input amount
69
- * @param {bigint} inputAmount - The amount of input tokens
70
- * @returns {Promise<bigint>} The fee amount (denominated in input tokens)
71
- *
72
- * @example
73
- * const fee: bigint = await solverService.getFee(1000000000000000n);
74
- * console.log('Fee:', fee);
75
- */
76
- async getFee(inputAmount) {
77
- if (!this.config.partnerFee) {
78
- return 0n;
79
- }
80
- return calculateFeeAmount(inputAmount, this.config.partnerFee);
81
- }
82
- /**
83
- * Get the status of an intent from Solver API
84
- * @param {IntentStatusRequest} intentStatusRequest - The intent status request
85
- * @returns {Promise<Result<IntentStatusResponse, IntentErrorResponse>>} The intent status response
86
- *
87
- * @example
88
- * const intentStatusRequest = {
89
- * "intentHash": "a0dd7652-b360-4123-ab2d-78cfbcd20c6b"
90
- * } satisfies IntentStatusRequest
91
- *
92
- * const response = await solverService.getStatus(intentStatusRequest);
93
- *
94
- * if (response.ok) {
95
- * const { status, intent_hash } = response.value;
96
- * console.log('Status:', status);
97
- * console.log('Intent hash:', intent_hash);
98
- * } else {
99
- * // handle error
100
- * }
101
- */
102
- async getStatus(intentStatusRequest) {
103
- return SolverApiService.getStatus(intentStatusRequest, this.config);
104
- }
105
- /**
106
- * Post execution of intent order transaction executed on hub chain to Solver API
107
- * @param {IntentExecutionRequest} intentExecutionRequest - The intent execution request
108
- * @returns {Promise<Result<IntentExecutionResponse, IntentErrorResponse>>} The intent execution response
109
- *
110
- * @example
111
- * const intentExecutionRequest = {
112
- * "intent_tx_hash": "0xba3dce19347264db32ced212ff1a2036f20d9d2c7493d06af15027970be061af",
113
- * } satisfies IntentExecutionRequest
114
- *
115
- * const response = await solverService.postExecution(intentExecutionRequest);
116
- *
117
- * if (response.ok) {
118
- * const { answer, intent_hash } = response.value;
119
- * console.log('Answer:', answer);
120
- * console.log('Intent hash:', intent_hash);
121
- * } else {
122
- * // handle error
123
- * }
124
- */
125
- async postExecution(intentExecutionRequest) {
126
- return SolverApiService.postExecution(intentExecutionRequest, this.config);
127
- }
128
- /**
129
- * Creates an intent and submits it to the Solver API and Relayer API
130
- * @param {CreateIntentParams} payload - The intent to create
131
- * @param {ISpokeProvider} spokeProvider - The spoke provider
132
- * @param {number} timeout - The timeout in milliseconds for the transaction. Default is 60 seconds.
133
- * @returns {Promise<Result<[IntentExecutionResponse, Intent, PacketData], IntentSubmitError<IntentSubmitErrorCode>>>} The intent execution response, intent, and packet data
134
- *
135
- * @example
136
- * const payload = {
137
- * "inputToken": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", // BSC ETH token address
138
- * "outputToken": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", // ARB WBTC token address
139
- * "inputAmount": 1000000000000000n, // The amount of input tokens
140
- * "minOutputAmount": 900000000000000n, // min amount you are expecting to receive
141
- * "deadline": 0n, // Optional timestamp after which intent expires (0 = no deadline)
142
- * "allowPartialFill": false, // Whether the intent can be partially filled
143
- * "srcChain": "0x38.bsc", // Chain ID where input tokens originate
144
- * "dstChain": "0xa4b1.arbitrum", // Chain ID where output tokens should be delivered
145
- * "srcAddress": "0x..", // Source address in bytes (original address on spoke chain)
146
- * "dstAddress": "0x...", // Destination address in bytes (original address on spoke chain)
147
- * "solver": "0x..", // Optional specific solver address (address(0) = any solver)
148
- * "data": "0x..", // Additional arbitrary data
149
- * } satisfies CreateIntentParams;
150
- *
151
- * const createAndSubmitIntentResult = await solverService.createAndSubmitIntent(payload, spokeProvider);
152
- *
153
- * if (createAndSubmitIntentResult.ok) {
154
- * const [intentExecutionResponse, intent, packetData] = createAndSubmitIntentResult.value;
155
- * console.log('Intent execution response:', intentExecutionResponse);
156
- * console.log('Intent:', intent);
157
- * console.log('Packet data:', packetData);
158
- * } else {
159
- * // handle error
160
- * }
161
- */
162
- async createAndSubmitIntent(payload, spokeProvider, fee, timeout = DEFAULT_RELAY_TX_TIMEOUT) {
163
- try {
164
- const createIntentResult = await this.createIntent(payload, spokeProvider, fee, false);
165
- if (!createIntentResult.ok) {
166
- return {
167
- ok: false,
168
- error: createIntentResult.error,
169
- };
170
- }
171
- const [spokeTxHash, intent] = createIntentResult.value;
172
- const intentRelayChainId = getIntentRelayChainId(payload.srcChain).toString();
173
- const submitPayload = {
174
- action: 'submit',
175
- params: {
176
- chain_id: intentRelayChainId,
177
- tx_hash: spokeTxHash,
178
- },
179
- };
180
- const submitResult = await submitTransaction(submitPayload, this.config.relayerApiEndpoint);
181
- if (!submitResult.success) {
182
- return {
183
- ok: false,
184
- error: {
185
- code: 'SUBMIT_TX_FAILED',
186
- data: {
187
- payload: submitPayload,
188
- apiUrl: this.config.relayerApiEndpoint,
189
- },
190
- },
191
- };
192
- }
193
- const packet = await waitUntilIntentExecuted({
194
- intentRelayChainId,
195
- spokeTxHash,
196
- timeout,
197
- apiUrl: this.config.relayerApiEndpoint,
198
- });
199
- if (!packet.ok) {
200
- return {
201
- ok: false,
202
- error: packet.error,
203
- };
204
- }
205
- const result = await this.postExecution({
206
- intent_tx_hash: packet.value.dst_tx_hash,
207
- });
208
- if (!result.ok) {
209
- return {
210
- ok: false,
211
- error: {
212
- code: 'POST_EXECUTION_FAILED',
213
- data: result.error,
214
- },
215
- };
216
- }
217
- return {
218
- ok: true,
219
- value: [result.value, intent, packet.value],
220
- };
221
- }
222
- catch (error) {
223
- return {
224
- ok: false,
225
- error: {
226
- code: 'UNKNOWN',
227
- data: {
228
- payload: payload,
229
- error: error,
230
- },
231
- },
232
- };
233
- }
234
- }
235
- /**
236
- * Check whether assetManager contract is allowed to move the given payload amount
237
- * @param {CreateIntentParams} params - The intent to create
238
- * @param {SpokeProvider} spokeProvider - The spoke provider
239
- * @return {Promise<Result<boolean>>} - valid = true, invalid = false
240
- *
241
- * @example
242
- * const payload = {
243
- * "inputToken": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", // BSC ETH token address
244
- * "outputToken": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", // ARB WBTC token address
245
- * "inputAmount": 1000000000000000n, // The amount of input tokens
246
- * "minOutputAmount": 900000000000000n, // min amount you are expecting to receive
247
- * "deadline": 0n, // Optional timestamp after which intent expires (0 = no deadline)
248
- * "allowPartialFill": false, // Whether the intent can be partially filled
249
- * "srcChain": "0x38.bsc", // Chain ID where input tokens originate
250
- * "dstChain": "0xa4b1.arbitrum", // Chain ID where output tokens should be delivered
251
- * "srcAddress": "0x..", // Source address in bytes (original address on spoke chain)
252
- * "dstAddress": "0x...", // Destination address in bytes (original address on spoke chain)
253
- * "solver": "0x..", // Optional specific solver address (address(0) = any solver)
254
- * "data": "0x..", // Additional arbitrary data
255
- * } satisfies CreateIntentParams;
256
- *
257
- * const isAllowanceValid = await solverService.isAllowanceValid(payload, spokeProvider);
258
- *
259
- * if (!allowanceValid.ok) {
260
- * // Handle error
261
- * }
262
- *
263
- * if (!allowanceValid.value) {
264
- * // Need to approve
265
- * }
266
- */
267
- async isAllowanceValid(params, spokeProvider) {
268
- try {
269
- if (spokeProvider instanceof EvmSpokeProvider) {
270
- const walletAddress = (await spokeProvider.walletProvider.getWalletAddress());
271
- return Erc20Service.isAllowanceValid(params.inputToken, params.inputAmount, walletAddress, spokeProvider.chainConfig.addresses.assetManager, spokeProvider);
272
- }
273
- return {
274
- ok: true,
275
- value: true,
276
- };
277
- }
278
- catch (error) {
279
- return {
280
- ok: false,
281
- error: error,
282
- };
283
- }
284
- }
285
- /**
286
- * Approve amount spending (currently required for EVM only)
287
- * @param token - ERC20 token address
288
- * @param amount - Amount to approve
289
- * @param spender - Spender address
290
- * @param spokeProvider - Spoke provider
291
- * @returns {Promise<Result<EvmRawTransactionReceipt>>} - Returns the transaction receipt
292
- *
293
- * @example
294
- * const approveResult = await approve(
295
- * '0x...', // ERC20 token address
296
- * 1000n, // Amount to approve (in token decimals)
297
- * '0x...', // Spender address (usually the asset manager contract: spokeProvider.chainConfig.addresses.assetManager)
298
- * spokeProvider
299
- * );
300
- *
301
- * if (!approveResult.ok) {
302
- * // Handle error
303
- * }
304
- *
305
- * const txReceipt = approveResult.value;
306
- */
307
- async approve(token, amount, address, spokeProvider) {
308
- try {
309
- if (spokeProvider instanceof EvmSpokeProvider) {
310
- return Erc20Service.approve(token, amount, address, spokeProvider);
311
- }
312
- return {
313
- ok: false,
314
- error: new Error('Approve only supported for EVM spoke chains'),
315
- };
316
- }
317
- catch (error) {
318
- return {
319
- ok: false,
320
- error: error,
321
- };
322
- }
323
- }
324
- /**
325
- * Creates an intent by handling token approval and intent creation
326
- * NOTE: This method does not submit the intent to the Solver API
327
- * @param {CreateIntentParams} params - The intent to create
328
- * @param {SpokeProvider} spokeProvider - The spoke provider
329
- * @param {boolean} raw - Whether to return the raw transaction
330
- * @param {PartnerFee} fee - The fee to apply to the intent
331
- * @returns {Promise<Result<[TxReturnType<S, R>, Intent & FeeAmount], IntentSubmitError<'CREATION_FAILED'>>>} The encoded contract call
332
- *
333
- * @example
334
- * const payload = {
335
- * "inputToken": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", // BSC ETH token address
336
- * "outputToken": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", // ARB WBTC token address
337
- * "inputAmount": 1000000000000000n, // The amount of input tokens
338
- * "minOutputAmount": 900000000000000n, // min amount you are expecting to receive
339
- * "deadline": 0n, // Optional timestamp after which intent expires (0 = no deadline)
340
- * "allowPartialFill": false, // Whether the intent can be partially filled
341
- * "srcChain": "0x38.bsc", // Chain ID where input tokens originate
342
- * "dstChain": "0xa4b1.arbitrum", // Chain ID where output tokens should be delivered
343
- * "srcAddress": "0x..", // Source address in bytes (original address on spoke chain)
344
- * "dstAddress": "0x...", // Destination address in bytes (original address on spoke chain)
345
- * "solver": "0x..", // Optional specific solver address (address(0) = any solver)
346
- * "data": "0x..", // Additional arbitrary data
347
- * } satisfies CreateIntentParams;
348
- *
349
- * const createIntentResult = await solverService.createIntent(payload, spokeProvider);
350
- *
351
- * if (createIntentResult.ok) {
352
- * const [txResult, intent] = createIntentResult.value;
353
- * console.log('Intent:', intent);
354
- *
355
- */
356
- async createIntent(params, spokeProvider, fee, raw) {
357
- invariant(isValidOriginalAssetAddress(params.srcChain, params.inputToken), `Unsupported spoke chain token (params.srcChain): ${params.srcChain}, params.inputToken): ${params.inputToken}`);
358
- invariant(isValidOriginalAssetAddress(params.dstChain, params.outputToken), `Unsupported spoke chain token (params.dstChain): ${params.dstChain}, params.outputToken): ${params.outputToken}`);
359
- invariant(isValidSpokeChainId(params.srcChain), `Invalid spoke chain (params.srcChain): ${params.srcChain}`);
360
- invariant(isValidSpokeChainId(params.dstChain), `Invalid spoke chain (params.dstChain): ${params.dstChain}`);
361
- try {
362
- const walletAddressBytes = await spokeProvider.walletProvider.getWalletAddressBytes();
363
- // derive users hub wallet address
364
- const creatorHubWalletAddress = await EvmWalletAbstraction.getUserHubWalletAddress(params.srcChain, walletAddressBytes, this.hubProvider);
365
- // construct the intent data
366
- const [data, intent, feeAmount] = EvmSolverService.constructCreateIntentData(params, creatorHubWalletAddress, this.config, fee);
367
- const walletAddress = (await spokeProvider.walletProvider.getWalletAddress());
368
- const txResult = await SpokeService.deposit({
369
- from: walletAddress,
370
- to: creatorHubWalletAddress,
371
- token: params.inputToken,
372
- amount: params.inputAmount + feeAmount,
373
- data: data,
374
- }, spokeProvider, this.hubProvider, raw);
375
- return {
376
- ok: true,
377
- value: [txResult, { ...intent, feeAmount }],
378
- };
379
- }
380
- catch (error) {
381
- return {
382
- ok: false,
383
- error: {
384
- code: 'CREATION_FAILED',
385
- data: {
386
- payload: params,
387
- error: error,
388
- },
389
- },
390
- };
391
- }
392
- }
393
- /**
394
- * Cancels an intent
395
- * @param {Intent} intent - The intent to cancel
396
- * @param {ISpokeProvider} spokeProvider - The spoke provider
397
- * @param {boolean} raw - Whether to return the raw transaction
398
- * @returns {Promise<TxReturnType<T, R>>} The encoded contract call
399
- */
400
- async cancelIntent(intent, spokeProvider, raw) {
401
- invariant(isValidIntentRelayChainId(intent.srcChain), `Invalid intent.srcChain: ${intent.srcChain}`);
402
- invariant(isValidIntentRelayChainId(intent.dstChain), `Invalid intent.dstChain: ${intent.dstChain}`);
403
- const walletAddressBytes = await spokeProvider.walletProvider.getWalletAddressBytes();
404
- // derive users hub wallet address
405
- const creatorHubWalletAddress = await EvmWalletAbstraction.getUserHubWalletAddress(spokeProvider.chainConfig.chain.id, walletAddressBytes, this.hubProvider);
406
- const calls = [];
407
- const intentsContract = this.config.intentsContract;
408
- calls.push(EvmSolverService.encodeCancelIntent(intent, intentsContract));
409
- const data = encodeContractCalls(calls);
410
- return SpokeService.callWallet(creatorHubWalletAddress, data, spokeProvider, this.hubProvider, raw);
411
- }
412
- /**
413
- * Gets an intent from a transaction hash (on Hub chain)
414
- * @param {Hash} txHash - The transaction hash on Hub chain
415
- * @returns {Promise<Intent>} The intent
416
- */
417
- getIntent(txHash) {
418
- return EvmSolverService.getIntent(txHash, this.config, this.hubProvider);
419
- }
420
- /**
421
- * Gets the keccak256 hash of an intent. Hash serves as the intent id on Hub chain.
422
- * @param {Intent} intent - The intent
423
- * @returns {Hex} The keccak256 hash of the intent
424
- */
425
- getIntentHash(intent) {
426
- return EvmSolverService.getIntentHash(intent);
427
- }
428
- }
429
- //# sourceMappingURL=SolverService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolverService.js","sourceRoot":"","sources":["../../../src/services/solver/SolverService.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,YAAY,EAEZ,gBAAgB,EAKhB,YAAY,EAEZ,kBAAkB,EAClB,mBAAmB,EACnB,qB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C,CAAC;QAErG,MAAM,kBAAkB,GAAG,MAAM,aAAa,CAAC,cAAc,CAAC,qBAAqB,EAAE,CAAC;QACtF,kCAAkC;QAClC,MAAM,uBAAuB,GAAG,MAAM,oBAAoB,CAAC,uBAAuB,CAChF,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,EAClC,kBAAkB,EAClB,IAAI,CAAC,WAAW,CACjB,CAAC;QAEF,MAAM,KAAK,GAAsB,EAAE,CAAC;QACpC,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QACpD,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;QACzE,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,YAAY,CAAC,UAAU,CAAC,uBAAuB,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACtG,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,MAAY;QAC3B,OAAO,gBAAgB,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,MAAc;QACjC,OAAO,gBAAgB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;CACF"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=SolverService.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolverService.test.d.ts","sourceRoot":"","sources":["../../../src/services/solver/SolverService.test.ts"],"names":[],"mappings":""}