@7kprotocol/sdk-ts 3.6.0 → 3.6.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +1 -11
  2. package/lib/cjs/config/fetchClient.js +1 -9
  3. package/lib/cjs/constants/_7k.js +13 -10
  4. package/lib/cjs/constants/apiEndpoints.js +1 -1
  5. package/lib/cjs/features/metaAg/common.js +2 -2
  6. package/lib/cjs/features/metaAg/error.js +0 -4
  7. package/lib/cjs/features/metaAg/index.js +3 -8
  8. package/lib/cjs/features/prices/index.js +51 -20
  9. package/lib/cjs/index.js +1 -35
  10. package/lib/cjs/types/config/fetchClient.d.ts.map +1 -1
  11. package/lib/cjs/types/constants/_7k.d.ts +0 -3
  12. package/lib/cjs/types/constants/_7k.d.ts.map +1 -1
  13. package/lib/cjs/types/features/metaAg/common.d.ts +1 -1
  14. package/lib/cjs/types/features/metaAg/error.d.ts +1 -7
  15. package/lib/cjs/types/features/metaAg/error.d.ts.map +1 -1
  16. package/lib/cjs/types/features/metaAg/index.d.ts +1 -1
  17. package/lib/cjs/types/features/metaAg/index.d.ts.map +1 -1
  18. package/lib/cjs/types/features/prices/index.d.ts +16 -2
  19. package/lib/cjs/types/features/prices/index.d.ts.map +1 -1
  20. package/lib/cjs/types/index.d.ts +1 -32
  21. package/lib/cjs/types/index.d.ts.map +1 -1
  22. package/lib/cjs/types/metaAg.js +1 -3
  23. package/lib/cjs/types/types/metaAg.d.ts +2 -14
  24. package/lib/cjs/types/types/metaAg.d.ts.map +1 -1
  25. package/lib/cjs/types/utils/sui.d.ts +0 -31
  26. package/lib/cjs/types/utils/sui.d.ts.map +1 -1
  27. package/lib/cjs/types/utils/swap.d.ts +15 -0
  28. package/lib/cjs/types/utils/swap.d.ts.map +1 -0
  29. package/lib/cjs/utils/sui.js +3 -146
  30. package/lib/cjs/utils/swap.js +37 -0
  31. package/lib/esm/config/fetchClient.js +1 -9
  32. package/lib/esm/constants/_7k.js +12 -9
  33. package/lib/esm/constants/apiEndpoints.js +1 -1
  34. package/lib/esm/features/metaAg/common.js +1 -1
  35. package/lib/esm/features/metaAg/error.js +0 -4
  36. package/lib/esm/features/metaAg/index.js +2 -7
  37. package/lib/esm/features/prices/index.js +52 -21
  38. package/lib/esm/index.mjs +3 -31
  39. package/lib/esm/types/config/fetchClient.d.ts.map +1 -1
  40. package/lib/esm/types/constants/_7k.d.ts +0 -3
  41. package/lib/esm/types/constants/_7k.d.ts.map +1 -1
  42. package/lib/esm/types/features/metaAg/common.d.ts +1 -1
  43. package/lib/esm/types/features/metaAg/error.d.ts +1 -7
  44. package/lib/esm/types/features/metaAg/error.d.ts.map +1 -1
  45. package/lib/esm/types/features/metaAg/index.d.ts +1 -1
  46. package/lib/esm/types/features/metaAg/index.d.ts.map +1 -1
  47. package/lib/esm/types/features/prices/index.d.ts +16 -2
  48. package/lib/esm/types/features/prices/index.d.ts.map +1 -1
  49. package/lib/esm/types/index.d.ts +1 -32
  50. package/lib/esm/types/index.d.ts.map +1 -1
  51. package/lib/esm/types/metaAg.js +1 -3
  52. package/lib/esm/types/types/metaAg.d.ts +2 -14
  53. package/lib/esm/types/types/metaAg.d.ts.map +1 -1
  54. package/lib/esm/types/utils/sui.d.ts +0 -31
  55. package/lib/esm/types/utils/sui.d.ts.map +1 -1
  56. package/lib/esm/types/utils/swap.d.ts +15 -0
  57. package/lib/esm/types/utils/swap.d.ts.map +1 -0
  58. package/lib/esm/utils/sui.js +4 -147
  59. package/lib/esm/utils/swap.js +33 -0
  60. package/package.json +1 -1
  61. package/lib/cjs/config/index.js +0 -67
  62. package/lib/cjs/features/metaAg/providers/bluefin7kLegacy.js +0 -68
  63. package/lib/cjs/features/swap/buildTx.js +0 -198
  64. package/lib/cjs/features/swap/buildTxV2.js +0 -229
  65. package/lib/cjs/features/swap/config.js +0 -154
  66. package/lib/cjs/features/swap/estimateGasFee.js +0 -44
  67. package/lib/cjs/features/swap/executeTx.js +0 -52
  68. package/lib/cjs/features/swap/getQuote.js +0 -95
  69. package/lib/cjs/features/swap/getSwapHistory.js +0 -21
  70. package/lib/cjs/features/swap/index.js +0 -22
  71. package/lib/cjs/libs/groupSwapRoutes.js +0 -60
  72. package/lib/cjs/libs/protocols/aftermath/index.js +0 -35
  73. package/lib/cjs/libs/protocols/base.js +0 -41
  74. package/lib/cjs/libs/protocols/bluefin/index.js +0 -38
  75. package/lib/cjs/libs/protocols/bluefinx/client.js +0 -41
  76. package/lib/cjs/libs/protocols/bluefinx/index.js +0 -48
  77. package/lib/cjs/libs/protocols/bluefinx/types.js +0 -10
  78. package/lib/cjs/libs/protocols/bluemove/index.js +0 -24
  79. package/lib/cjs/libs/protocols/cetus/index.js +0 -44
  80. package/lib/cjs/libs/protocols/cetus_dlmm.js +0 -48
  81. package/lib/cjs/libs/protocols/constants.js +0 -5
  82. package/lib/cjs/libs/protocols/deepbookV3/sponsored.js +0 -30
  83. package/lib/cjs/libs/protocols/ferra_clmm.js +0 -44
  84. package/lib/cjs/libs/protocols/ferra_dlmm.js +0 -30
  85. package/lib/cjs/libs/protocols/flowx/index.js +0 -18
  86. package/lib/cjs/libs/protocols/flowxV3/index.js +0 -36
  87. package/lib/cjs/libs/protocols/fullsail/index.js +0 -39
  88. package/lib/cjs/libs/protocols/haedal_pmm/index.js +0 -31
  89. package/lib/cjs/libs/protocols/index.js +0 -55
  90. package/lib/cjs/libs/protocols/kriya/index.js +0 -30
  91. package/lib/cjs/libs/protocols/kriyaV3/index.js +0 -65
  92. package/lib/cjs/libs/protocols/magma/index.js +0 -40
  93. package/lib/cjs/libs/protocols/momentum/index.js +0 -49
  94. package/lib/cjs/libs/protocols/obric/index.js +0 -28
  95. package/lib/cjs/libs/protocols/sevenk/index.js +0 -55
  96. package/lib/cjs/libs/protocols/springsui/index.js +0 -24
  97. package/lib/cjs/libs/protocols/steamm/index.js +0 -160
  98. package/lib/cjs/libs/protocols/stsui/index.js +0 -24
  99. package/lib/cjs/libs/protocols/suiswap/index.js +0 -34
  100. package/lib/cjs/libs/protocols/turbos/index.js +0 -36
  101. package/lib/cjs/libs/protocols/utils.js +0 -7
  102. package/lib/cjs/libs/swapWithRoute.js +0 -22
  103. package/lib/cjs/types/aggregator.js +0 -19
  104. package/lib/cjs/types/config/index.d.ts +0 -30
  105. package/lib/cjs/types/config/index.d.ts.map +0 -1
  106. package/lib/cjs/types/features/metaAg/providers/bluefin7kLegacy.d.ts +0 -11
  107. package/lib/cjs/types/features/metaAg/providers/bluefin7kLegacy.d.ts.map +0 -1
  108. package/lib/cjs/types/features/swap/buildTx.d.ts +0 -17
  109. package/lib/cjs/types/features/swap/buildTx.d.ts.map +0 -1
  110. package/lib/cjs/types/features/swap/buildTxV2.d.ts +0 -20
  111. package/lib/cjs/types/features/swap/buildTxV2.d.ts.map +0 -1
  112. package/lib/cjs/types/features/swap/config.d.ts +0 -4
  113. package/lib/cjs/types/features/swap/config.d.ts.map +0 -1
  114. package/lib/cjs/types/features/swap/estimateGasFee.d.ts +0 -3
  115. package/lib/cjs/types/features/swap/estimateGasFee.d.ts.map +0 -1
  116. package/lib/cjs/types/features/swap/executeTx.d.ts +0 -24
  117. package/lib/cjs/types/features/swap/executeTx.d.ts.map +0 -1
  118. package/lib/cjs/types/features/swap/getQuote.d.ts +0 -27
  119. package/lib/cjs/types/features/swap/getQuote.d.ts.map +0 -1
  120. package/lib/cjs/types/features/swap/getSwapHistory.d.ts +0 -22
  121. package/lib/cjs/types/features/swap/getSwapHistory.d.ts.map +0 -1
  122. package/lib/cjs/types/features/swap/index.d.ts +0 -7
  123. package/lib/cjs/types/features/swap/index.d.ts.map +0 -1
  124. package/lib/cjs/types/libs/groupSwapRoutes.d.ts +0 -3
  125. package/lib/cjs/types/libs/groupSwapRoutes.d.ts.map +0 -1
  126. package/lib/cjs/types/libs/protocols/aftermath/index.d.ts +0 -9
  127. package/lib/cjs/types/libs/protocols/aftermath/index.d.ts.map +0 -1
  128. package/lib/cjs/types/libs/protocols/base.d.ts +0 -24
  129. package/lib/cjs/types/libs/protocols/base.d.ts.map +0 -1
  130. package/lib/cjs/types/libs/protocols/bluefin/index.d.ts +0 -9
  131. package/lib/cjs/types/libs/protocols/bluefin/index.d.ts.map +0 -1
  132. package/lib/cjs/types/libs/protocols/bluefinx/client.d.ts +0 -13
  133. package/lib/cjs/types/libs/protocols/bluefinx/client.d.ts.map +0 -1
  134. package/lib/cjs/types/libs/protocols/bluefinx/index.d.ts +0 -17
  135. package/lib/cjs/types/libs/protocols/bluefinx/index.d.ts.map +0 -1
  136. package/lib/cjs/types/libs/protocols/bluefinx/types.d.ts +0 -34
  137. package/lib/cjs/types/libs/protocols/bluefinx/types.d.ts.map +0 -1
  138. package/lib/cjs/types/libs/protocols/bluemove/index.d.ts +0 -9
  139. package/lib/cjs/types/libs/protocols/bluemove/index.d.ts.map +0 -1
  140. package/lib/cjs/types/libs/protocols/cetus/index.d.ts +0 -9
  141. package/lib/cjs/types/libs/protocols/cetus/index.d.ts.map +0 -1
  142. package/lib/cjs/types/libs/protocols/cetus_dlmm.d.ts +0 -9
  143. package/lib/cjs/types/libs/protocols/cetus_dlmm.d.ts.map +0 -1
  144. package/lib/cjs/types/libs/protocols/constants.d.ts +0 -3
  145. package/lib/cjs/types/libs/protocols/constants.d.ts.map +0 -1
  146. package/lib/cjs/types/libs/protocols/deepbookV3/sponsored.d.ts +0 -7
  147. package/lib/cjs/types/libs/protocols/deepbookV3/sponsored.d.ts.map +0 -1
  148. package/lib/cjs/types/libs/protocols/ferra_clmm.d.ts +0 -9
  149. package/lib/cjs/types/libs/protocols/ferra_clmm.d.ts.map +0 -1
  150. package/lib/cjs/types/libs/protocols/ferra_dlmm.d.ts +0 -9
  151. package/lib/cjs/types/libs/protocols/ferra_dlmm.d.ts.map +0 -1
  152. package/lib/cjs/types/libs/protocols/flowx/index.d.ts +0 -9
  153. package/lib/cjs/types/libs/protocols/flowx/index.d.ts.map +0 -1
  154. package/lib/cjs/types/libs/protocols/flowxV3/index.d.ts +0 -9
  155. package/lib/cjs/types/libs/protocols/flowxV3/index.d.ts.map +0 -1
  156. package/lib/cjs/types/libs/protocols/fullsail/index.d.ts +0 -9
  157. package/lib/cjs/types/libs/protocols/fullsail/index.d.ts.map +0 -1
  158. package/lib/cjs/types/libs/protocols/haedal_pmm/index.d.ts +0 -14
  159. package/lib/cjs/types/libs/protocols/haedal_pmm/index.d.ts.map +0 -1
  160. package/lib/cjs/types/libs/protocols/index.d.ts +0 -53
  161. package/lib/cjs/types/libs/protocols/index.d.ts.map +0 -1
  162. package/lib/cjs/types/libs/protocols/kriya/index.d.ts +0 -9
  163. package/lib/cjs/types/libs/protocols/kriya/index.d.ts.map +0 -1
  164. package/lib/cjs/types/libs/protocols/kriyaV3/index.d.ts +0 -9
  165. package/lib/cjs/types/libs/protocols/kriyaV3/index.d.ts.map +0 -1
  166. package/lib/cjs/types/libs/protocols/magma/index.d.ts +0 -9
  167. package/lib/cjs/types/libs/protocols/magma/index.d.ts.map +0 -1
  168. package/lib/cjs/types/libs/protocols/momentum/index.d.ts +0 -9
  169. package/lib/cjs/types/libs/protocols/momentum/index.d.ts.map +0 -1
  170. package/lib/cjs/types/libs/protocols/obric/index.d.ts +0 -14
  171. package/lib/cjs/types/libs/protocols/obric/index.d.ts.map +0 -1
  172. package/lib/cjs/types/libs/protocols/sevenk/index.d.ts +0 -18
  173. package/lib/cjs/types/libs/protocols/sevenk/index.d.ts.map +0 -1
  174. package/lib/cjs/types/libs/protocols/springsui/index.d.ts +0 -9
  175. package/lib/cjs/types/libs/protocols/springsui/index.d.ts.map +0 -1
  176. package/lib/cjs/types/libs/protocols/steamm/index.d.ts +0 -28
  177. package/lib/cjs/types/libs/protocols/steamm/index.d.ts.map +0 -1
  178. package/lib/cjs/types/libs/protocols/stsui/index.d.ts +0 -9
  179. package/lib/cjs/types/libs/protocols/stsui/index.d.ts.map +0 -1
  180. package/lib/cjs/types/libs/protocols/suiswap/index.d.ts +0 -9
  181. package/lib/cjs/types/libs/protocols/suiswap/index.d.ts.map +0 -1
  182. package/lib/cjs/types/libs/protocols/turbos/index.d.ts +0 -9
  183. package/lib/cjs/types/libs/protocols/turbos/index.d.ts.map +0 -1
  184. package/lib/cjs/types/libs/protocols/utils.d.ts +0 -2
  185. package/lib/cjs/types/libs/protocols/utils.d.ts.map +0 -1
  186. package/lib/cjs/types/libs/swapWithRoute.d.ts +0 -12
  187. package/lib/cjs/types/libs/swapWithRoute.d.ts.map +0 -1
  188. package/lib/cjs/types/sui.js +0 -2
  189. package/lib/cjs/types/tx.js +0 -2
  190. package/lib/cjs/types/types/aggregator.d.ts +0 -173
  191. package/lib/cjs/types/types/aggregator.d.ts.map +0 -1
  192. package/lib/cjs/types/types/sui.d.ts +0 -4
  193. package/lib/cjs/types/types/sui.d.ts.map +0 -1
  194. package/lib/cjs/types/types/tx.d.ts +0 -67
  195. package/lib/cjs/types/types/tx.d.ts.map +0 -1
  196. package/lib/cjs/types/types/utilities.d.ts +0 -5
  197. package/lib/cjs/types/types/utilities.d.ts.map +0 -1
  198. package/lib/cjs/types/utilities.js +0 -2
  199. package/lib/cjs/types/utils/number.d.ts +0 -2
  200. package/lib/cjs/types/utils/number.d.ts.map +0 -1
  201. package/lib/cjs/utils/number.js +0 -9
  202. package/lib/esm/config/index.js +0 -64
  203. package/lib/esm/features/metaAg/providers/bluefin7kLegacy.js +0 -66
  204. package/lib/esm/features/swap/buildTx.js +0 -188
  205. package/lib/esm/features/swap/buildTxV2.js +0 -223
  206. package/lib/esm/features/swap/config.js +0 -150
  207. package/lib/esm/features/swap/estimateGasFee.js +0 -41
  208. package/lib/esm/features/swap/executeTx.js +0 -48
  209. package/lib/esm/features/swap/getQuote.js +0 -91
  210. package/lib/esm/features/swap/getSwapHistory.js +0 -18
  211. package/lib/esm/features/swap/index.js +0 -6
  212. package/lib/esm/libs/groupSwapRoutes.js +0 -57
  213. package/lib/esm/libs/protocols/aftermath/index.js +0 -31
  214. package/lib/esm/libs/protocols/base.js +0 -42
  215. package/lib/esm/libs/protocols/bluefin/index.js +0 -34
  216. package/lib/esm/libs/protocols/bluefinx/client.js +0 -36
  217. package/lib/esm/libs/protocols/bluefinx/index.js +0 -44
  218. package/lib/esm/libs/protocols/bluefinx/types.js +0 -8
  219. package/lib/esm/libs/protocols/bluemove/index.js +0 -20
  220. package/lib/esm/libs/protocols/cetus/index.js +0 -40
  221. package/lib/esm/libs/protocols/cetus_dlmm.js +0 -44
  222. package/lib/esm/libs/protocols/constants.js +0 -2
  223. package/lib/esm/libs/protocols/deepbookV3/sponsored.js +0 -26
  224. package/lib/esm/libs/protocols/ferra_clmm.js +0 -40
  225. package/lib/esm/libs/protocols/ferra_dlmm.js +0 -26
  226. package/lib/esm/libs/protocols/flowx/index.js +0 -14
  227. package/lib/esm/libs/protocols/flowxV3/index.js +0 -32
  228. package/lib/esm/libs/protocols/fullsail/index.js +0 -35
  229. package/lib/esm/libs/protocols/haedal_pmm/index.js +0 -27
  230. package/lib/esm/libs/protocols/index.js +0 -52
  231. package/lib/esm/libs/protocols/kriya/index.js +0 -26
  232. package/lib/esm/libs/protocols/kriyaV3/index.js +0 -61
  233. package/lib/esm/libs/protocols/magma/index.js +0 -36
  234. package/lib/esm/libs/protocols/momentum/index.js +0 -45
  235. package/lib/esm/libs/protocols/obric/index.js +0 -24
  236. package/lib/esm/libs/protocols/sevenk/index.js +0 -51
  237. package/lib/esm/libs/protocols/springsui/index.js +0 -20
  238. package/lib/esm/libs/protocols/steamm/index.js +0 -156
  239. package/lib/esm/libs/protocols/stsui/index.js +0 -20
  240. package/lib/esm/libs/protocols/suiswap/index.js +0 -30
  241. package/lib/esm/libs/protocols/turbos/index.js +0 -32
  242. package/lib/esm/libs/protocols/utils.js +0 -4
  243. package/lib/esm/libs/swapWithRoute.js +0 -19
  244. package/lib/esm/types/aggregator.js +0 -14
  245. package/lib/esm/types/config/index.d.ts +0 -30
  246. package/lib/esm/types/config/index.d.ts.map +0 -1
  247. package/lib/esm/types/features/metaAg/providers/bluefin7kLegacy.d.ts +0 -11
  248. package/lib/esm/types/features/metaAg/providers/bluefin7kLegacy.d.ts.map +0 -1
  249. package/lib/esm/types/features/swap/buildTx.d.ts +0 -17
  250. package/lib/esm/types/features/swap/buildTx.d.ts.map +0 -1
  251. package/lib/esm/types/features/swap/buildTxV2.d.ts +0 -20
  252. package/lib/esm/types/features/swap/buildTxV2.d.ts.map +0 -1
  253. package/lib/esm/types/features/swap/config.d.ts +0 -4
  254. package/lib/esm/types/features/swap/config.d.ts.map +0 -1
  255. package/lib/esm/types/features/swap/estimateGasFee.d.ts +0 -3
  256. package/lib/esm/types/features/swap/estimateGasFee.d.ts.map +0 -1
  257. package/lib/esm/types/features/swap/executeTx.d.ts +0 -24
  258. package/lib/esm/types/features/swap/executeTx.d.ts.map +0 -1
  259. package/lib/esm/types/features/swap/getQuote.d.ts +0 -27
  260. package/lib/esm/types/features/swap/getQuote.d.ts.map +0 -1
  261. package/lib/esm/types/features/swap/getSwapHistory.d.ts +0 -22
  262. package/lib/esm/types/features/swap/getSwapHistory.d.ts.map +0 -1
  263. package/lib/esm/types/features/swap/index.d.ts +0 -7
  264. package/lib/esm/types/features/swap/index.d.ts.map +0 -1
  265. package/lib/esm/types/libs/groupSwapRoutes.d.ts +0 -3
  266. package/lib/esm/types/libs/groupSwapRoutes.d.ts.map +0 -1
  267. package/lib/esm/types/libs/protocols/aftermath/index.d.ts +0 -9
  268. package/lib/esm/types/libs/protocols/aftermath/index.d.ts.map +0 -1
  269. package/lib/esm/types/libs/protocols/base.d.ts +0 -24
  270. package/lib/esm/types/libs/protocols/base.d.ts.map +0 -1
  271. package/lib/esm/types/libs/protocols/bluefin/index.d.ts +0 -9
  272. package/lib/esm/types/libs/protocols/bluefin/index.d.ts.map +0 -1
  273. package/lib/esm/types/libs/protocols/bluefinx/client.d.ts +0 -13
  274. package/lib/esm/types/libs/protocols/bluefinx/client.d.ts.map +0 -1
  275. package/lib/esm/types/libs/protocols/bluefinx/index.d.ts +0 -17
  276. package/lib/esm/types/libs/protocols/bluefinx/index.d.ts.map +0 -1
  277. package/lib/esm/types/libs/protocols/bluefinx/types.d.ts +0 -34
  278. package/lib/esm/types/libs/protocols/bluefinx/types.d.ts.map +0 -1
  279. package/lib/esm/types/libs/protocols/bluemove/index.d.ts +0 -9
  280. package/lib/esm/types/libs/protocols/bluemove/index.d.ts.map +0 -1
  281. package/lib/esm/types/libs/protocols/cetus/index.d.ts +0 -9
  282. package/lib/esm/types/libs/protocols/cetus/index.d.ts.map +0 -1
  283. package/lib/esm/types/libs/protocols/cetus_dlmm.d.ts +0 -9
  284. package/lib/esm/types/libs/protocols/cetus_dlmm.d.ts.map +0 -1
  285. package/lib/esm/types/libs/protocols/constants.d.ts +0 -3
  286. package/lib/esm/types/libs/protocols/constants.d.ts.map +0 -1
  287. package/lib/esm/types/libs/protocols/deepbookV3/sponsored.d.ts +0 -7
  288. package/lib/esm/types/libs/protocols/deepbookV3/sponsored.d.ts.map +0 -1
  289. package/lib/esm/types/libs/protocols/ferra_clmm.d.ts +0 -9
  290. package/lib/esm/types/libs/protocols/ferra_clmm.d.ts.map +0 -1
  291. package/lib/esm/types/libs/protocols/ferra_dlmm.d.ts +0 -9
  292. package/lib/esm/types/libs/protocols/ferra_dlmm.d.ts.map +0 -1
  293. package/lib/esm/types/libs/protocols/flowx/index.d.ts +0 -9
  294. package/lib/esm/types/libs/protocols/flowx/index.d.ts.map +0 -1
  295. package/lib/esm/types/libs/protocols/flowxV3/index.d.ts +0 -9
  296. package/lib/esm/types/libs/protocols/flowxV3/index.d.ts.map +0 -1
  297. package/lib/esm/types/libs/protocols/fullsail/index.d.ts +0 -9
  298. package/lib/esm/types/libs/protocols/fullsail/index.d.ts.map +0 -1
  299. package/lib/esm/types/libs/protocols/haedal_pmm/index.d.ts +0 -14
  300. package/lib/esm/types/libs/protocols/haedal_pmm/index.d.ts.map +0 -1
  301. package/lib/esm/types/libs/protocols/index.d.ts +0 -53
  302. package/lib/esm/types/libs/protocols/index.d.ts.map +0 -1
  303. package/lib/esm/types/libs/protocols/kriya/index.d.ts +0 -9
  304. package/lib/esm/types/libs/protocols/kriya/index.d.ts.map +0 -1
  305. package/lib/esm/types/libs/protocols/kriyaV3/index.d.ts +0 -9
  306. package/lib/esm/types/libs/protocols/kriyaV3/index.d.ts.map +0 -1
  307. package/lib/esm/types/libs/protocols/magma/index.d.ts +0 -9
  308. package/lib/esm/types/libs/protocols/magma/index.d.ts.map +0 -1
  309. package/lib/esm/types/libs/protocols/momentum/index.d.ts +0 -9
  310. package/lib/esm/types/libs/protocols/momentum/index.d.ts.map +0 -1
  311. package/lib/esm/types/libs/protocols/obric/index.d.ts +0 -14
  312. package/lib/esm/types/libs/protocols/obric/index.d.ts.map +0 -1
  313. package/lib/esm/types/libs/protocols/sevenk/index.d.ts +0 -18
  314. package/lib/esm/types/libs/protocols/sevenk/index.d.ts.map +0 -1
  315. package/lib/esm/types/libs/protocols/springsui/index.d.ts +0 -9
  316. package/lib/esm/types/libs/protocols/springsui/index.d.ts.map +0 -1
  317. package/lib/esm/types/libs/protocols/steamm/index.d.ts +0 -28
  318. package/lib/esm/types/libs/protocols/steamm/index.d.ts.map +0 -1
  319. package/lib/esm/types/libs/protocols/stsui/index.d.ts +0 -9
  320. package/lib/esm/types/libs/protocols/stsui/index.d.ts.map +0 -1
  321. package/lib/esm/types/libs/protocols/suiswap/index.d.ts +0 -9
  322. package/lib/esm/types/libs/protocols/suiswap/index.d.ts.map +0 -1
  323. package/lib/esm/types/libs/protocols/turbos/index.d.ts +0 -9
  324. package/lib/esm/types/libs/protocols/turbos/index.d.ts.map +0 -1
  325. package/lib/esm/types/libs/protocols/utils.d.ts +0 -2
  326. package/lib/esm/types/libs/protocols/utils.d.ts.map +0 -1
  327. package/lib/esm/types/libs/swapWithRoute.d.ts +0 -12
  328. package/lib/esm/types/libs/swapWithRoute.d.ts.map +0 -1
  329. package/lib/esm/types/sui.js +0 -1
  330. package/lib/esm/types/tx.js +0 -1
  331. package/lib/esm/types/types/aggregator.d.ts +0 -173
  332. package/lib/esm/types/types/aggregator.d.ts.map +0 -1
  333. package/lib/esm/types/types/sui.d.ts +0 -4
  334. package/lib/esm/types/types/sui.d.ts.map +0 -1
  335. package/lib/esm/types/types/tx.d.ts +0 -67
  336. package/lib/esm/types/types/tx.d.ts.map +0 -1
  337. package/lib/esm/types/types/utilities.d.ts +0 -5
  338. package/lib/esm/types/types/utilities.d.ts.map +0 -1
  339. package/lib/esm/types/utilities.js +0 -1
  340. package/lib/esm/types/utils/number.d.ts +0 -2
  341. package/lib/esm/types/utils/number.d.ts.map +0 -1
  342. package/lib/esm/utils/number.js +0 -6
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class FlowxV3Contract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/flowxV3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA+B3B"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class FullsailContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/fullsail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,qBAAa,gBAAiB,SAAQ,YAAY;IAC1C,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAqC3B"}
@@ -1,14 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { ExtraOracle } from "../../../types/aggregator";
3
- import { BaseContract } from "../base";
4
- type HaedalPMMExtra = {
5
- oracles: ExtraOracle[];
6
- };
7
- export declare class HaedalPMMContract extends BaseContract<HaedalPMMExtra> {
8
- swap(tx: Transaction): Promise<{
9
- $kind: "NestedResult";
10
- NestedResult: [number, number];
11
- }>;
12
- }
13
- export {};
14
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/haedal_pmm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AACF,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,cAAc,CAAC;IAC3D,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAyB3B"}
@@ -1,53 +0,0 @@
1
- import { AfterMathContract } from "./aftermath";
2
- import { BluefinContract } from "./bluefin";
3
- import { BluefinXContract } from "./bluefinx";
4
- import { BluemoveContract } from "./bluemove";
5
- import { CetusContract } from "./cetus";
6
- import { CetusDLMMContract } from "./cetus_dlmm";
7
- import { SponsoredDeepBookV3Contract } from "./deepbookV3/sponsored";
8
- import { FerraCLMMContract } from "./ferra_clmm";
9
- import { FerraDLMMContract } from "./ferra_dlmm";
10
- import { FlowXContract } from "./flowx";
11
- import { FlowxV3Contract } from "./flowxV3";
12
- import { FullsailContract } from "./fullsail";
13
- import { HaedalPMMContract } from "./haedal_pmm";
14
- import { KriyaContract } from "./kriya";
15
- import { KriyaV3Contract } from "./kriyaV3";
16
- import { MagmaContract } from "./magma";
17
- import { MomentumContract } from "./momentum";
18
- import { ObricContract } from "./obric";
19
- import { SevenKV1 } from "./sevenk";
20
- import { SpringSuiContract } from "./springsui";
21
- import { SteammContract } from "./steamm";
22
- import { StSuiContract } from "./stsui";
23
- import { SuiswapContract } from "./suiswap";
24
- import { TurbosContract } from "./turbos";
25
- export declare const ProtocolContract: {
26
- cetus: typeof CetusContract;
27
- turbos: typeof TurbosContract;
28
- bluemove: typeof BluemoveContract;
29
- kriya: typeof KriyaContract;
30
- suiswap: typeof SuiswapContract;
31
- aftermath: typeof AfterMathContract;
32
- deepbook_v3: typeof SponsoredDeepBookV3Contract;
33
- flowx: typeof FlowXContract;
34
- flowx_v3: typeof FlowxV3Contract;
35
- kriya_v3: typeof KriyaV3Contract;
36
- bluefin: typeof BluefinContract;
37
- springsui: typeof SpringSuiContract;
38
- obric: typeof ObricContract;
39
- stsui: typeof StSuiContract;
40
- steamm: typeof SteammContract;
41
- steamm_oracle_quoter: typeof SteammContract;
42
- steamm_oracle_quoter_v2: typeof SteammContract;
43
- magma: typeof MagmaContract;
44
- haedal_pmm: typeof HaedalPMMContract;
45
- momentum: typeof MomentumContract;
46
- bluefinx: typeof BluefinXContract;
47
- sevenk_v1: typeof SevenKV1;
48
- fullsail: typeof FullsailContract;
49
- cetus_dlmm: typeof CetusDLMMContract;
50
- ferra_dlmm: typeof FerraDLMMContract;
51
- ferra_clmm: typeof FerraCLMMContract;
52
- };
53
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/libs/protocols/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC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seContract } from "../base";
3
- export declare class KriyaContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/kriya/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,qBAAa,aAAc,SAAQ,YAAY;IACvC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA0B3B"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class KriyaV3Contract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/kriyaV3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAgE3B"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class MagmaContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/magma/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,qBAAa,aAAc,SAAQ,YAAY;IACvC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAuC3B"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class MomentumContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/momentum/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,qBAAa,gBAAiB,SAAQ,YAAY;IAC1C,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA4C3B"}
@@ -1,14 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { ExtraOracle } from "../../../types/aggregator";
3
- import { BaseContract } from "../base";
4
- type ObricExtra = {
5
- oracles: ExtraOracle[];
6
- };
7
- export declare class ObricContract extends BaseContract<ObricExtra> {
8
- swap(tx: Transaction): Promise<{
9
- $kind: "NestedResult";
10
- NestedResult: [number, number];
11
- }>;
12
- }
13
- export {};
14
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/obric/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AACF,qBAAa,aAAc,SAAQ,YAAY,CAAC,UAAU,CAAC;IACnD,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAuB3B"}
@@ -1,18 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { ExtraOracle } from "../../../types/aggregator";
3
- import { TransactionResultItem } from "../../../types/sui";
4
- import { BaseContract } from "../base";
5
- export type SevenKExtra = {
6
- poolStructTag: string;
7
- oracleConfigX: string;
8
- oracleConfigY: string;
9
- oracles: ExtraOracle[];
10
- };
11
- export declare class SevenKV1 extends BaseContract<SevenKExtra> {
12
- swap(tx: Transaction): Promise<TransactionResultItem>;
13
- getOraclePriceUpdate(tx: Transaction): {
14
- $kind: "NestedResult";
15
- NestedResult: [number, number];
16
- };
17
- }
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/sevenk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAOvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AAEF,qBAAa,QAAS,SAAQ,YAAY,CAAC,WAAW,CAAC;IAC/C,IAAI,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAqB3D,oBAAoB,CAAC,EAAE,EAAE,WAAW;;;;CAkCrC"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class SpringSuiContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/springsui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,iBAAkB,SAAQ,YAAY;IAC3C,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAiB3B"}
@@ -1,28 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { ExtraOracle } from "../../../types/aggregator";
3
- import { BaseContract } from "../base";
4
- export type SteamExtra = {
5
- bankAStructTag: string;
6
- bankBStructTag: string;
7
- poolStructTag: string;
8
- bankA: string;
9
- bankB: string;
10
- lendingMarketA: string;
11
- lendingMarketB: string;
12
- oracleRegistry?: string;
13
- oracles: ExtraOracle[];
14
- oracleIndexes?: number[];
15
- };
16
- export declare class SteammContract extends BaseContract<SteamExtra> {
17
- swap(tx: Transaction): Promise<import("@mysten/sui/transactions").TransactionObjectArgument>;
18
- cpmmSwap(tx: Transaction): import("@mysten/sui/transactions").TransactionObjectArgument;
19
- ommSwap(tx: Transaction, version: "v1" | "v2"): import("@mysten/sui/transactions").TransactionObjectArgument;
20
- getOraclePriceUpdate(tx: Transaction): readonly [{
21
- $kind: "NestedResult";
22
- NestedResult: [number, number];
23
- }, {
24
- $kind: "NestedResult";
25
- NestedResult: [number, number];
26
- }];
27
- }
28
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/steamm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,MAAM,UAAU,GAAG;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AACF,qBAAa,cAAe,SAAQ,YAAY,CAAC,UAAU,CAAC;IACpD,IAAI,CAAC,EAAE,EAAE,WAAW;IAW1B,QAAQ,CAAC,EAAE,EAAE,WAAW;IAmExB,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI;IAuE7C,oBAAoB,CAAC,EAAE,EAAE,WAAW;;;;;;;CA8BrC"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class StSuiContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/stsui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,aAAc,SAAQ,YAAY;IACvC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAiB3B"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class SuiswapContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/suiswap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA2B3B"}
@@ -1,9 +0,0 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import { BaseContract } from "../base";
3
- export declare class TurbosContract extends BaseContract {
4
- swap(tx: Transaction): Promise<{
5
- $kind: "NestedResult";
6
- NestedResult: [number, number];
7
- }>;
8
- }
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/turbos/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,qBAAa,cAAe,SAAQ,YAAY;IACxC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA+B3B"}
@@ -1,2 +0,0 @@
1
- export declare function getDefaultSqrtPriceLimit(a2b: boolean): bigint;
2
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/libs/protocols/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE7D"}
@@ -1,12 +0,0 @@
1
- import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
2
- import { Config, TxSorSwap } from "../types/aggregator";
3
- export declare function swapWithRoute({ route, inputCoinObject, currentAccount, config, pythMap, tx, }: {
4
- route: TxSorSwap[];
5
- inputCoinObject: TransactionObjectArgument;
6
- currentAccount: string;
7
- config: Config;
8
- /** map price feed id to onchain priceInfoObject id */
9
- pythMap: Record<string, string>;
10
- tx: Transaction;
11
- }): Promise<TransactionObjectArgument | undefined>;
12
- //# sourceMappingURL=swapWithRoute.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"swapWithRoute.d.ts","sourceRoot":"","sources":["../../../../src/libs/swapWithRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGxD,wBAAsB,aAAa,CAAC,EAClC,KAAK,EACL,eAAe,EACf,cAAc,EACd,MAAM,EACN,OAAO,EACP,EAAE,GACH,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,eAAe,EAAE,yBAAyB,CAAC;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,EAAE,EAAE,WAAW,CAAC;CACjB,GAAG,OAAO,CAAC,yBAAyB,GAAG,SAAS,CAAC,CAmBjD"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,173 +0,0 @@
1
- import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
2
- import { BluefinXTx } from "../libs/protocols/bluefinx/types";
3
- export { BluefinXTx };
4
- export type SourceDex = "suiswap" | "turbos" | "cetus" | "bluemove" | "kriya" | "kriya_v3" | "aftermath" | "deepbook_v3" | "flowx" | "flowx_v3" | "bluefin" | "bluefinx" | "springsui" | "obric" | "stsui" | "steamm" | "steamm_oracle_quoter" | "steamm_oracle_quoter_v2" | "magma" | "haedal_pmm" | "momentum" | "sevenk_v1" | "fullsail" | "cetus_dlmm" | "ferra_dlmm" | "ferra_clmm";
5
- export type SorSwap = {
6
- poolId: string;
7
- assetInIndex: number;
8
- assetOutIndex: number;
9
- amount: string;
10
- returnAmount: string;
11
- assetIn: string;
12
- assetOut: string;
13
- functionName: string;
14
- arguments: string[];
15
- extra?: any;
16
- };
17
- export type SorPool = {
18
- allTokens: Array<{
19
- address: string;
20
- decimal: number;
21
- }>;
22
- type: SourceDex;
23
- };
24
- export type SorHop = {
25
- poolId: string;
26
- tokenInAmount: string;
27
- tokenOutAmount: string;
28
- tokenIn: string;
29
- tokenOut: string;
30
- pool: SorPool;
31
- };
32
- export type SorRoute = {
33
- hops: SorHop[];
34
- share?: number;
35
- tokenIn: string;
36
- tokenInAmount: string;
37
- tokenOut: string;
38
- tokenOutAmount: string;
39
- };
40
- export type QuoteResponse = {
41
- effectivePrice: number | null;
42
- effectivePriceReserved: number | null;
43
- priceImpact: number | null;
44
- swapAmount: string;
45
- returnAmount: string;
46
- returnAmountWithDecimal: string;
47
- returnAmountAfterCommission: string;
48
- returnAmountAfterCommissionWithDecimal: string;
49
- returnAmountConsiderGasFees?: string;
50
- returnAmountWithoutSwapFees?: string;
51
- swapAmountWithDecimal: string;
52
- tokenAddresses: string[];
53
- tokenIn: string;
54
- tokenOut: string;
55
- marketSp: string;
56
- routes?: SorRoute[];
57
- swaps: SorSwap[];
58
- warning: string;
59
- };
60
- export interface Coin {
61
- type: string;
62
- decimals: number;
63
- }
64
- export interface TxSorSwap extends SorSwap {
65
- pool: SorPool;
66
- coinX: Coin;
67
- coinY: Coin;
68
- swapXtoY: boolean;
69
- }
70
- export interface Commission {
71
- partner: string;
72
- commissionBps: number;
73
- }
74
- export interface DexConfig {
75
- package: string;
76
- name: string;
77
- url?: string;
78
- image?: string;
79
- }
80
- export interface Config {
81
- aftermath: DexConfig & {
82
- poolRegistry: string;
83
- protocolFeeVault: string;
84
- treasury: string;
85
- insuranceFund: string;
86
- referralVault: string;
87
- };
88
- bluefin: DexConfig & {
89
- globalConfig: string;
90
- };
91
- bluefinx: DexConfig & {
92
- globalConfig: string;
93
- };
94
- bluemove: DexConfig & {
95
- dexInfo: string;
96
- };
97
- cetus: DexConfig & {
98
- globalConfig: string;
99
- };
100
- deepbook_v3: DexConfig & {
101
- sponsor: string;
102
- sponsorFund: string;
103
- };
104
- flowx: DexConfig & {
105
- container: string;
106
- };
107
- flowx_v3: DexConfig & {
108
- registry: string;
109
- version: string;
110
- };
111
- kriya: DexConfig;
112
- kriya_v3: DexConfig & {
113
- version: string;
114
- };
115
- obric: DexConfig & {
116
- pythState: string;
117
- };
118
- springsui: DexConfig;
119
- stsui: DexConfig;
120
- suiswap: DexConfig;
121
- turbos: DexConfig & {
122
- version: string;
123
- };
124
- steamm: DexConfig & {
125
- script: string;
126
- oracle: string;
127
- };
128
- magma: DexConfig & {
129
- globalConfig: string;
130
- };
131
- haedal_pmm: DexConfig;
132
- momentum: DexConfig & {
133
- version: string;
134
- };
135
- sevenk_v1: DexConfig & {
136
- oracle: string;
137
- };
138
- fullsail: DexConfig & {
139
- globalConfig: string;
140
- rewarderGlobalVault: string;
141
- priceProvider: string;
142
- stats: string;
143
- };
144
- cetus_dlmm: DexConfig & {
145
- globalConfig: string;
146
- version: string;
147
- };
148
- ferra_dlmm: DexConfig & {
149
- globalConfig: string;
150
- };
151
- ferra_clmm: DexConfig & {
152
- integrate: string;
153
- globalConfig: string;
154
- };
155
- }
156
- export type ExtraOracle = {
157
- Pyth?: {
158
- bytes: number[];
159
- };
160
- };
161
- export type AggregatorTx = Transaction | BluefinXTx;
162
- export declare const isSuiTransaction: (tx: AggregatorTx) => tx is Transaction;
163
- /**
164
- * Check if the sor response is a bluefinx routing
165
- * @param sor
166
- * @returns boolean
167
- */
168
- export declare const isBluefinXRouting: (sor: QuoteResponse) => boolean;
169
- export type BuildTxResult = {
170
- tx: AggregatorTx;
171
- coinOut?: TransactionObjectArgument;
172
- };
173
- //# sourceMappingURL=aggregator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aggregator.d.ts","sourceRoot":"","sources":["../../../../src/types/aggregator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,QAAQ,GACR,OAAO,GACP,UAAU,GACV,OAAO,GACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,OAAO,GACP,UAAU,GACV,SAAS,GACT,UAAU,GACV,WAAW,GACX,OAAO,GACP,OAAO,GACP,QAAQ,GACR,sBAAsB,GACtB,yBAAyB,GACzB,OAAO,GACP,YAAY,GACZ,UAAU,GACV,WAAW,GACX,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAA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AAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,UAAU,CAAC;AAEpD,eAAO,MAAM,gBAAgB,GAAI,IAAI,YAAY,KAAG,EAAE,IAAI,WAC/B,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,aAAa,YAMnD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,YAAY,CAAC;IACjB,OAAO,CAAC,EAAE,yBAAyB,CAAC;CACrC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { TransactionResult } from "@mysten/sui/transactions";
2
- import { Unarray } from "./utilities";
3
- export type TransactionResultItem = Unarray<TransactionResult>;
4
- //# sourceMappingURL=sui.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/types/sui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,67 +0,0 @@
1
- import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
2
- import { Commission, QuoteResponse } from "./aggregator";
3
- export interface CommonParams {
4
- /** Quote response from 7k api */
5
- quoteResponse: QuoteResponse;
6
- /** User address */
7
- accountAddress: string;
8
- /** Slippage tolerance, ex: 0.01 (1%) */
9
- slippage: number | string;
10
- /** Commission for partner */
11
- commission: Commission;
12
- /**
13
- * Give Flexibility to insert custom commands before or after swap
14
- * @example
15
- * ```typescript
16
- * const rawTx = new Transaction();
17
- * // Add custom commands to rawTx
18
- * rawTx.moveCall({
19
- * target: "0x2222222::example::claim",
20
- * arguments: [],
21
- * });
22
- * const { tx, coinOut } = await buildTx({
23
- * quoteResponse,
24
- * accountAddress,
25
- * slippage,
26
- * commission,
27
- * extendTx: {
28
- * tx: rawTx,
29
- * coinIn: rawTx.object(coinObjectId),
30
- * },
31
- * });
32
- * // add more commands after the swap if needed, and remember to consume the coinOut object
33
- * tx.transferObjects([coinOut], tx.pure.address(accountAddress));
34
- * ```
35
- */
36
- extendTx?: {
37
- tx: Transaction;
38
- coinIn?: TransactionObjectArgument;
39
- };
40
- /**
41
- * If true, indicates that the transaction is sponsored and its gas object should not be modified.
42
- * In this case, the gas object is expected to be already set up correctly for the sponsored transaction.
43
- */
44
- isSponsored?: boolean;
45
- }
46
- export interface BuildTxParams extends CommonParams {
47
- /** Developer inspection mode */
48
- devInspect?: boolean;
49
- }
50
- export interface EstimateGasFeeParams extends CommonParams {
51
- /** Sui price in usd for gas estimation */
52
- suiPrice?: number;
53
- }
54
- export interface SwapInfo {
55
- quote: QuoteResponse;
56
- /** @warning this `coinIn` will be consumed completely, no `coinIn` left, user must pass the coinIn object with the balance required for the swap - ie in quote */
57
- coinIn: TransactionObjectArgument;
58
- }
59
- export interface MultiSwapParams {
60
- swaps: SwapInfo[];
61
- sender: string;
62
- slippageBps: number;
63
- tx: Transaction;
64
- /** Commission for partner */
65
- commission: Commission;
66
- }
67
- //# sourceMappingURL=tx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,mBAAmB;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,6BAA6B;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,WAAW,CAAC;QAChB,MAAM,CAAC,EAAE,yBAAyB,CAAC;KACpC,CAAC;IACF;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,gCAAgC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,kKAAkK;IAClK,MAAM,EAAE,yBAAyB,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,WAAW,CAAC;IAChB,6BAA6B;IAC7B,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -1,5 +0,0 @@
1
- export type ValueOf<T> = T[keyof T];
2
- export type PropName<T> = keyof T;
3
- export type Unarray<T> = T extends Array<infer U> ? U : T;
4
- export type Modify<T, R extends Partial<T>> = Omit<T, keyof R> & R;
5
- //# sourceMappingURL=utilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../../src/types/utilities.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACpC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAClC,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC1D,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export declare function formatBalance(balance: bigint, decimals: number): number;
2
- //# sourceMappingURL=number.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../../src/utils/number.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAK9D"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatBalance = formatBalance;
4
- function formatBalance(balance, decimals) {
5
- const exp = BigInt(Math.pow(10, decimals));
6
- const whole = balance / exp;
7
- const remain = balance % exp;
8
- return Number(whole) + Number(remain) / Number(exp);
9
- }