@7kprotocol/sdk-ts 2.4.0 → 2.4.2-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 (207) hide show
  1. package/README.md +30 -3
  2. package/lib/cjs/config/fetchClient.js +11 -19
  3. package/lib/cjs/config/index.js +22 -0
  4. package/lib/cjs/constants/_7k.js +6 -3
  5. package/lib/cjs/features/limitDca/cancelDcaOrder.js +7 -18
  6. package/lib/cjs/features/limitDca/cancelLimitOrder.js +7 -18
  7. package/lib/cjs/features/limitDca/claimExpiredLimitOrder.js +7 -18
  8. package/lib/cjs/features/limitDca/constants.js +1 -5
  9. package/lib/cjs/features/limitDca/getClosedDcaOrders.js +16 -27
  10. package/lib/cjs/features/limitDca/getClosedLimitOrders.js +15 -26
  11. package/lib/cjs/features/limitDca/getDcaOrderExecutions.js +16 -27
  12. package/lib/cjs/features/limitDca/getOpenDcaOrders.js +15 -26
  13. package/lib/cjs/features/limitDca/getOpenLimitOrders.js +15 -26
  14. package/lib/cjs/features/limitDca/placeDcaOrder.js +25 -36
  15. package/lib/cjs/features/limitDca/placeLimitOrder.js +14 -25
  16. package/lib/cjs/features/prices/index.js +47 -64
  17. package/lib/cjs/features/swap/buildTx.js +88 -39
  18. package/lib/cjs/features/swap/config.js +32 -32
  19. package/lib/cjs/features/swap/estimateGasFee.js +36 -46
  20. package/lib/cjs/features/swap/executeTx.js +52 -0
  21. package/lib/cjs/features/swap/getQuote.js +41 -31
  22. package/lib/cjs/features/swap/getSwapHistory.js +14 -25
  23. package/lib/cjs/features/swap/index.js +1 -0
  24. package/lib/cjs/index.js +16 -9
  25. package/lib/cjs/libs/getCoinOjectIdsByAmount.js +15 -24
  26. package/lib/cjs/libs/getSplitCoinForTx.js +8 -15
  27. package/lib/cjs/libs/groupSwapRoutes.js +10 -12
  28. package/lib/cjs/libs/protocols/aftermath/index.js +25 -36
  29. package/lib/cjs/libs/protocols/base.js +10 -3
  30. package/lib/cjs/libs/protocols/bluefin/index.js +26 -43
  31. package/lib/cjs/libs/protocols/bluefinx/client.js +35 -0
  32. package/lib/cjs/libs/protocols/bluefinx/index.js +48 -0
  33. package/lib/cjs/libs/protocols/bluefinx/types.js +10 -0
  34. package/lib/cjs/libs/protocols/bluemove/index.js +14 -25
  35. package/lib/cjs/libs/protocols/cetus/index.js +32 -43
  36. package/lib/cjs/libs/protocols/deepbookV3/sponsored.js +19 -30
  37. package/lib/cjs/libs/protocols/flowx/index.js +9 -20
  38. package/lib/cjs/libs/protocols/flowxV3/index.js +25 -39
  39. package/lib/cjs/libs/protocols/haedal_pmm/index.js +33 -0
  40. package/lib/cjs/libs/protocols/index.js +7 -2
  41. package/lib/cjs/libs/protocols/kriya/index.js +20 -31
  42. package/lib/cjs/libs/protocols/kriyaV3/index.js +54 -65
  43. package/lib/cjs/libs/protocols/magma/index.js +28 -40
  44. package/lib/cjs/libs/protocols/momentum/index.js +49 -0
  45. package/lib/cjs/libs/protocols/obric/index.js +20 -31
  46. package/lib/cjs/libs/protocols/springsui/index.js +14 -25
  47. package/lib/cjs/libs/protocols/steamm/index.js +57 -58
  48. package/lib/cjs/libs/protocols/stsui/index.js +14 -25
  49. package/lib/cjs/libs/protocols/suiswap/index.js +23 -34
  50. package/lib/cjs/libs/protocols/turbos/index.js +23 -38
  51. package/lib/cjs/libs/protocols/utils.js +1 -5
  52. package/lib/cjs/libs/swapWithRoute.js +17 -27
  53. package/lib/cjs/types/aggregator.js +17 -0
  54. package/lib/cjs/types/config/index.d.ts +9 -0
  55. package/lib/cjs/types/config/index.d.ts.map +1 -1
  56. package/lib/cjs/types/constants/_7k.d.ts +3 -3
  57. package/lib/cjs/types/constants/_7k.d.ts.map +1 -1
  58. package/lib/cjs/types/features/limitDca/constants.d.ts +1 -2
  59. package/lib/cjs/types/features/limitDca/constants.d.ts.map +1 -1
  60. package/lib/cjs/types/features/swap/buildTx.d.ts +2 -5
  61. package/lib/cjs/types/features/swap/buildTx.d.ts.map +1 -1
  62. package/lib/cjs/types/features/swap/config.d.ts.map +1 -1
  63. package/lib/cjs/types/features/swap/estimateGasFee.d.ts.map +1 -1
  64. package/lib/cjs/types/features/swap/executeTx.d.ts +24 -0
  65. package/lib/cjs/types/features/swap/executeTx.d.ts.map +1 -0
  66. package/lib/cjs/types/features/swap/getQuote.d.ts +8 -1
  67. package/lib/cjs/types/features/swap/getQuote.d.ts.map +1 -1
  68. package/lib/cjs/types/features/swap/index.d.ts +1 -0
  69. package/lib/cjs/types/features/swap/index.d.ts.map +1 -1
  70. package/lib/cjs/types/index.d.ts +13 -8
  71. package/lib/cjs/types/index.d.ts.map +1 -1
  72. package/lib/cjs/types/libs/getCoinOjectIdsByAmount.d.ts.map +1 -1
  73. package/lib/cjs/types/libs/getSplitCoinForTx.d.ts +1 -1
  74. package/lib/cjs/types/libs/getSplitCoinForTx.d.ts.map +1 -1
  75. package/lib/cjs/types/libs/groupSwapRoutes.d.ts.map +1 -1
  76. package/lib/cjs/types/libs/protocols/base.d.ts +6 -2
  77. package/lib/cjs/types/libs/protocols/base.d.ts.map +1 -1
  78. package/lib/cjs/types/libs/protocols/bluefin/index.d.ts.map +1 -1
  79. package/lib/cjs/types/libs/protocols/bluefinx/client.d.ts +13 -0
  80. package/lib/cjs/types/libs/protocols/bluefinx/client.d.ts.map +1 -0
  81. package/lib/cjs/types/libs/protocols/bluefinx/index.d.ts +17 -0
  82. package/lib/cjs/types/libs/protocols/bluefinx/index.d.ts.map +1 -0
  83. package/lib/cjs/types/libs/protocols/bluefinx/types.d.ts +34 -0
  84. package/lib/cjs/types/libs/protocols/bluefinx/types.d.ts.map +1 -0
  85. package/lib/cjs/types/libs/protocols/cetus/index.d.ts.map +1 -1
  86. package/lib/cjs/types/libs/protocols/deepbookV3/sponsored.d.ts.map +1 -1
  87. package/lib/cjs/types/libs/protocols/flowxV3/index.d.ts.map +1 -1
  88. package/lib/{esm/types/libs/protocols/deepbook → cjs/types/libs/protocols/haedal_pmm}/index.d.ts +1 -3
  89. package/lib/cjs/types/libs/protocols/haedal_pmm/index.d.ts.map +1 -0
  90. package/lib/cjs/types/libs/protocols/index.d.ts +7 -2
  91. package/lib/cjs/types/libs/protocols/index.d.ts.map +1 -1
  92. package/lib/cjs/types/libs/protocols/magma/index.d.ts.map +1 -1
  93. package/lib/cjs/types/libs/protocols/{deepbook → momentum}/index.d.ts +1 -3
  94. package/lib/cjs/types/libs/protocols/momentum/index.d.ts.map +1 -0
  95. package/lib/cjs/types/libs/protocols/steamm/index.d.ts +13 -2
  96. package/lib/cjs/types/libs/protocols/steamm/index.d.ts.map +1 -1
  97. package/lib/cjs/types/libs/protocols/suiswap/index.d.ts.map +1 -1
  98. package/lib/cjs/types/libs/protocols/turbos/index.d.ts.map +1 -1
  99. package/lib/cjs/types/libs/protocols/utils.d.ts +1 -2
  100. package/lib/cjs/types/libs/protocols/utils.d.ts.map +1 -1
  101. package/lib/cjs/types/libs/swapWithRoute.d.ts +3 -1
  102. package/lib/cjs/types/libs/swapWithRoute.d.ts.map +1 -1
  103. package/lib/cjs/types/types/aggregator.d.ts +36 -2
  104. package/lib/cjs/types/types/aggregator.d.ts.map +1 -1
  105. package/lib/cjs/types/types/tx.d.ts +36 -2
  106. package/lib/cjs/types/types/tx.d.ts.map +1 -1
  107. package/lib/cjs/types/utils/number.d.ts +1 -3
  108. package/lib/cjs/types/utils/number.d.ts.map +1 -1
  109. package/lib/cjs/types/utils/sui.d.ts +1 -1
  110. package/lib/cjs/types/utils/sui.d.ts.map +1 -1
  111. package/lib/cjs/utils/number.js +4 -10
  112. package/lib/cjs/utils/sui.js +71 -80
  113. package/lib/esm/config/index.js +22 -0
  114. package/lib/esm/constants/_7k.js +6 -3
  115. package/lib/esm/features/limitDca/constants.js +1 -2
  116. package/lib/esm/features/swap/buildTx.js +81 -20
  117. package/lib/esm/features/swap/config.js +19 -8
  118. package/lib/esm/features/swap/estimateGasFee.js +13 -9
  119. package/lib/esm/features/swap/executeTx.js +48 -0
  120. package/lib/esm/features/swap/getQuote.js +24 -3
  121. package/lib/esm/features/swap/index.js +1 -0
  122. package/lib/esm/index.mjs +8 -4
  123. package/lib/esm/libs/getCoinOjectIdsByAmount.js +7 -7
  124. package/lib/esm/libs/getSplitCoinForTx.js +5 -3
  125. package/lib/esm/libs/groupSwapRoutes.js +1 -2
  126. package/lib/esm/libs/protocols/base.js +10 -1
  127. package/lib/esm/libs/protocols/bluefin/index.js +2 -5
  128. package/lib/esm/libs/protocols/bluefinx/client.js +30 -0
  129. package/lib/esm/libs/protocols/bluefinx/index.js +44 -0
  130. package/lib/esm/libs/protocols/bluefinx/types.js +8 -0
  131. package/lib/esm/libs/protocols/cetus/index.js +1 -1
  132. package/lib/esm/libs/protocols/deepbookV3/sponsored.js +1 -1
  133. package/lib/esm/libs/protocols/flowxV3/index.js +1 -4
  134. package/lib/esm/libs/protocols/haedal_pmm/index.js +29 -0
  135. package/lib/esm/libs/protocols/index.js +7 -2
  136. package/lib/esm/libs/protocols/magma/index.js +1 -2
  137. package/lib/esm/libs/protocols/momentum/index.js +45 -0
  138. package/lib/esm/libs/protocols/steamm/index.js +58 -48
  139. package/lib/esm/libs/protocols/suiswap/index.js +1 -1
  140. package/lib/esm/libs/protocols/turbos/index.js +2 -6
  141. package/lib/esm/libs/protocols/utils.js +1 -2
  142. package/lib/esm/libs/swapWithRoute.js +2 -1
  143. package/lib/esm/types/aggregator.js +14 -1
  144. package/lib/esm/types/config/index.d.ts +9 -0
  145. package/lib/esm/types/config/index.d.ts.map +1 -1
  146. package/lib/esm/types/constants/_7k.d.ts +3 -3
  147. package/lib/esm/types/constants/_7k.d.ts.map +1 -1
  148. package/lib/esm/types/features/limitDca/constants.d.ts +1 -2
  149. package/lib/esm/types/features/limitDca/constants.d.ts.map +1 -1
  150. package/lib/esm/types/features/swap/buildTx.d.ts +2 -5
  151. package/lib/esm/types/features/swap/buildTx.d.ts.map +1 -1
  152. package/lib/esm/types/features/swap/config.d.ts.map +1 -1
  153. package/lib/esm/types/features/swap/estimateGasFee.d.ts.map +1 -1
  154. package/lib/esm/types/features/swap/executeTx.d.ts +24 -0
  155. package/lib/esm/types/features/swap/executeTx.d.ts.map +1 -0
  156. package/lib/esm/types/features/swap/getQuote.d.ts +8 -1
  157. package/lib/esm/types/features/swap/getQuote.d.ts.map +1 -1
  158. package/lib/esm/types/features/swap/index.d.ts +1 -0
  159. package/lib/esm/types/features/swap/index.d.ts.map +1 -1
  160. package/lib/esm/types/index.d.ts +13 -8
  161. package/lib/esm/types/index.d.ts.map +1 -1
  162. package/lib/esm/types/libs/getCoinOjectIdsByAmount.d.ts.map +1 -1
  163. package/lib/esm/types/libs/getSplitCoinForTx.d.ts +1 -1
  164. package/lib/esm/types/libs/getSplitCoinForTx.d.ts.map +1 -1
  165. package/lib/esm/types/libs/groupSwapRoutes.d.ts.map +1 -1
  166. package/lib/esm/types/libs/protocols/base.d.ts +6 -2
  167. package/lib/esm/types/libs/protocols/base.d.ts.map +1 -1
  168. package/lib/esm/types/libs/protocols/bluefin/index.d.ts.map +1 -1
  169. package/lib/esm/types/libs/protocols/bluefinx/client.d.ts +13 -0
  170. package/lib/esm/types/libs/protocols/bluefinx/client.d.ts.map +1 -0
  171. package/lib/esm/types/libs/protocols/bluefinx/index.d.ts +17 -0
  172. package/lib/esm/types/libs/protocols/bluefinx/index.d.ts.map +1 -0
  173. package/lib/esm/types/libs/protocols/bluefinx/types.d.ts +34 -0
  174. package/lib/esm/types/libs/protocols/bluefinx/types.d.ts.map +1 -0
  175. package/lib/esm/types/libs/protocols/cetus/index.d.ts.map +1 -1
  176. package/lib/esm/types/libs/protocols/deepbookV3/sponsored.d.ts.map +1 -1
  177. package/lib/esm/types/libs/protocols/flowxV3/index.d.ts.map +1 -1
  178. package/lib/esm/types/libs/protocols/haedal_pmm/index.d.ts +9 -0
  179. package/lib/esm/types/libs/protocols/haedal_pmm/index.d.ts.map +1 -0
  180. package/lib/esm/types/libs/protocols/index.d.ts +7 -2
  181. package/lib/esm/types/libs/protocols/index.d.ts.map +1 -1
  182. package/lib/esm/types/libs/protocols/magma/index.d.ts.map +1 -1
  183. package/lib/esm/types/libs/protocols/momentum/index.d.ts +9 -0
  184. package/lib/esm/types/libs/protocols/momentum/index.d.ts.map +1 -0
  185. package/lib/esm/types/libs/protocols/steamm/index.d.ts +13 -2
  186. package/lib/esm/types/libs/protocols/steamm/index.d.ts.map +1 -1
  187. package/lib/esm/types/libs/protocols/suiswap/index.d.ts.map +1 -1
  188. package/lib/esm/types/libs/protocols/turbos/index.d.ts.map +1 -1
  189. package/lib/esm/types/libs/protocols/utils.d.ts +1 -2
  190. package/lib/esm/types/libs/protocols/utils.d.ts.map +1 -1
  191. package/lib/esm/types/libs/swapWithRoute.d.ts +3 -1
  192. package/lib/esm/types/libs/swapWithRoute.d.ts.map +1 -1
  193. package/lib/esm/types/types/aggregator.d.ts +36 -2
  194. package/lib/esm/types/types/aggregator.d.ts.map +1 -1
  195. package/lib/esm/types/types/tx.d.ts +36 -2
  196. package/lib/esm/types/types/tx.d.ts.map +1 -1
  197. package/lib/esm/types/utils/number.d.ts +1 -3
  198. package/lib/esm/types/utils/number.d.ts.map +1 -1
  199. package/lib/esm/types/utils/sui.d.ts +1 -1
  200. package/lib/esm/types/utils/sui.d.ts.map +1 -1
  201. package/lib/esm/utils/number.js +4 -6
  202. package/lib/esm/utils/sui.js +4 -3
  203. package/package.json +14 -15
  204. package/lib/cjs/libs/protocols/deepbook/index.js +0 -96
  205. package/lib/cjs/types/libs/protocols/deepbook/index.d.ts.map +0 -1
  206. package/lib/esm/libs/protocols/deepbook/index.js +0 -80
  207. package/lib/esm/types/libs/protocols/deepbook/index.d.ts.map +0 -1
@@ -1,32 +1,22 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.swapWithRoute = swapWithRoute;
13
4
  const protocols_1 = require("./protocols");
14
- function swapWithRoute(_a) {
15
- return __awaiter(this, arguments, void 0, function* ({ route, inputCoinObject, currentAccount, config, tx, }) {
16
- let inputTokenObject = inputCoinObject;
17
- let txbResultToReturn;
18
- for (const swap of route) {
19
- const ContractClass = protocols_1.ProtocolContract[swap.pool.type];
20
- const contractInstance = new ContractClass({
21
- swapInfo: swap,
22
- inputCoinObject: inputTokenObject,
23
- currentAccount,
24
- config,
25
- });
26
- const tokenOut = yield contractInstance.swap(tx);
27
- inputTokenObject = tokenOut;
28
- txbResultToReturn = tokenOut;
29
- }
30
- return txbResultToReturn;
31
- });
5
+ async function swapWithRoute({ route, inputCoinObject, currentAccount, config, pythMap, tx, }) {
6
+ let inputTokenObject = inputCoinObject;
7
+ let txbResultToReturn;
8
+ for (const swap of route) {
9
+ const ContractClass = protocols_1.ProtocolContract[swap.pool.type];
10
+ const contractInstance = new ContractClass({
11
+ swapInfo: swap,
12
+ inputCoinObject: inputTokenObject,
13
+ currentAccount,
14
+ config,
15
+ pythMap,
16
+ });
17
+ const tokenOut = await contractInstance.swap(tx);
18
+ inputTokenObject = tokenOut;
19
+ txbResultToReturn = tokenOut;
20
+ }
21
+ return txbResultToReturn;
32
22
  }
@@ -1,2 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isBluefinXRouting = exports.isSuiTransaction = exports.BluefinXTx = void 0;
4
+ const transactions_1 = require("@mysten/sui/transactions");
5
+ const types_1 = require("../libs/protocols/bluefinx/types");
6
+ Object.defineProperty(exports, "BluefinXTx", { enumerable: true, get: function () { return types_1.BluefinXTx; } });
7
+ const isSuiTransaction = (tx) => tx instanceof transactions_1.Transaction;
8
+ exports.isSuiTransaction = isSuiTransaction;
9
+ /**
10
+ * Check if the sor response is a bluefinx routing
11
+ * @param sor
12
+ * @returns boolean
13
+ */
14
+ const isBluefinXRouting = (sor) => {
15
+ return (sor.routes?.length === 1 &&
16
+ sor.routes[0].hops.length === 1 &&
17
+ sor.routes[0].hops[0].pool.type === "bluefinx");
18
+ };
19
+ exports.isBluefinXRouting = isBluefinXRouting;
@@ -1,13 +1,22 @@
1
1
  import { SuiClient } from "@mysten/sui/client";
2
+ import { SuiPriceServiceConnection, SuiPythClient } from "@pythnetwork/pyth-sui-js";
2
3
  declare function setApiKey(key: string): void;
3
4
  declare function getApiKey(): string;
4
5
  declare function getSuiClient(): SuiClient;
5
6
  declare function setSuiClient(client: SuiClient): void;
7
+ declare function setPythClient(client: SuiPythClient): void;
8
+ declare function getPythClient(): SuiPythClient;
9
+ declare function setPythConnection(connection: SuiPriceServiceConnection): void;
10
+ declare function getPythConnection(): SuiPriceServiceConnection;
6
11
  declare const Config: {
7
12
  setApiKey: typeof setApiKey;
8
13
  getApiKey: typeof getApiKey;
9
14
  setSuiClient: typeof setSuiClient;
10
15
  getSuiClient: typeof getSuiClient;
16
+ setPythClient: typeof setPythClient;
17
+ getPythClient: typeof getPythClient;
18
+ setPythConnection: typeof setPythConnection;
19
+ getPythConnection: typeof getPythConnection;
11
20
  };
12
21
  export { Config };
13
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAO/D,iBAAS,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEpC;AAED,iBAAS,SAAS,IAAI,MAAM,CAE3B;AAED,iBAAS,YAAY,IAAI,SAAS,CAEjC;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAE7C;AAED,QAAA,MAAM,MAAM;;;;;CAKX,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,yBAAyB,EACzB,aAAa,EACd,MAAM,0BAA0B,CAAC;AAqBlC,iBAAS,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEpC;AAED,iBAAS,SAAS,IAAI,MAAM,CAE3B;AAED,iBAAS,YAAY,IAAI,SAAS,CAEjC;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAE7C;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAElD;AAED,iBAAS,aAAa,IAAI,aAAa,CAEtC;AAED,iBAAS,iBAAiB,CAAC,UAAU,EAAE,yBAAyB,GAAG,IAAI,CAEtE;AAED,iBAAS,iBAAiB,IAAI,yBAAyB,CAEtD;AAED,QAAA,MAAM,MAAM;;;;;;;;;CASX,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- export declare const _7K_PACKAGE_ID = "0x7ea6e27ad7af6f3b8671d59df1aaebd7c03dddab893e52a714227b2f4fe91519";
2
- export declare const _7K_CONFIG = "0x0f8fc23dbcc9362b72c7a4c5aa53fcefa02ebfbb83a812c8c262ccd2c076d9ee";
3
- export declare const _7K_VAULT = "0x39a3c55742c0e011b6f65548e73cf589e1ae5e82dbfab449ca57f24c3bcd9514";
1
+ export declare const _7K_PACKAGE_ID = "0xe8f996ea6ff38c557c253d3b93cfe2ebf393816487266786371aa4532a9229f2";
2
+ export declare const _7K_CONFIG = "0x47442a93f7727d188ba7cb71031170d1786af70013cb7ad5115f3fe877ff0c54";
3
+ export declare const _7K_VAULT = "0x442ad50389ed5cda6f7a6f5a7ae6361a4c05ef1d9fb2e54fbba5a268d690bfe6";
4
4
  //# sourceMappingURL=_7k.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_7k.d.ts","sourceRoot":"","sources":["../../../../src/constants/_7k.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uEAC2C,CAAC;AAGvE,eAAO,MAAM,UAAU,uEAC+C,CAAC;AAEvE,eAAO,MAAM,SAAS,uEACgD,CAAC"}
1
+ {"version":3,"file":"_7k.d.ts","sourceRoot":"","sources":["../../../../src/constants/_7k.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uEAC2C,CAAC;AAIvE,eAAO,MAAM,UAAU,uEAC+C,CAAC;AAGvE,eAAO,MAAM,SAAS,uEACgD,CAAC"}
@@ -1,4 +1,3 @@
1
- import BigNumber from "bignumber.js";
2
1
  export declare const GLOBAL_CONFIG_ID = "0xffc7f420b481ed7a012b42e125fd7e5716b5673759cf4629e5fcfebce970a72d";
3
2
  export declare const RATE_SCALE: bigint;
4
3
  export declare const SLIPPAGE_SCALE: bigint;
@@ -6,6 +5,6 @@ export declare const PACKAGE = "0x0ef0f805710cf53c10f29c4f73e1144a662747e1839689
6
5
  export declare const LIMIT_ORDER_MODULE_ID = "0x0ef0f805710cf53c10f29c4f73e1144a662747e1839689a846e2520cae122adc::limit_order";
7
6
  export declare const DCA_ORDER_MODULE_ID = "0x0ef0f805710cf53c10f29c4f73e1144a662747e1839689a846e2520cae122adc::dca_order";
8
7
  export declare const CONFIG_MODULE_ID = "0x0ef0f805710cf53c10f29c4f73e1144a662747e1839689a846e2520cae122adc::config";
9
- export declare const DCA_MAX_RATE: BigNumber;
8
+ export declare const DCA_MAX_RATE: bigint;
10
9
  export declare const LO_DCA_API: string;
11
10
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/limitDca/constants.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC,eAAO,MAAM,gBAAgB,uEACyC,CAAC;AACvE,eAAO,MAAM,UAAU,QAA0B,CAAC;AAClD,eAAO,MAAM,cAAc,QAAkB,CAAC;AAC9C,eAAO,MAAM,OAAO,uEACkD,CAAC;AACvE,eAAO,MAAM,qBAAqB,oFAA4B,CAAC;AAC/D,eAAO,MAAM,mBAAmB,kFAA0B,CAAC;AAC3D,eAAO,MAAM,gBAAgB,+EAAuB,CAAC;AACrD,eAAO,MAAM,YAAY,WAAwC,CAAC;AAClE,eAAO,MAAM,UAAU,QAAgC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/limitDca/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uEACyC,CAAC;AACvE,eAAO,MAAM,UAAU,QAA0B,CAAC;AAClD,eAAO,MAAM,cAAc,QAAkB,CAAC;AAC9C,eAAO,MAAM,OAAO,uEACkD,CAAC;AACvE,eAAO,MAAM,qBAAqB,oFAA4B,CAAC;AAC/D,eAAO,MAAM,mBAAmB,kFAA0B,CAAC;AAC3D,eAAO,MAAM,gBAAgB,+EAAuB,CAAC;AACrD,eAAO,MAAM,YAAY,QAAiC,CAAC;AAC3D,eAAO,MAAM,UAAU,QAAgC,CAAC"}
@@ -1,7 +1,4 @@
1
- import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
1
+ import { BuildTxResult } from "../../types/aggregator";
2
2
  import { BuildTxParams } from "../../types/tx";
3
- export declare const buildTx: ({ quoteResponse, accountAddress, slippage, commission: _commission, devInspect, extendTx, }: BuildTxParams) => Promise<{
4
- tx: Transaction;
5
- coinOut: TransactionObjectArgument | undefined;
6
- }>;
3
+ export declare const buildTx: ({ quoteResponse, accountAddress, slippage, commission: __commission, devInspect, extendTx, isSponsored, }: BuildTxParams) => Promise<BuildTxResult>;
7
4
  //# sourceMappingURL=buildTx.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildTx.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/buildTx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,yBAAyB,EAE1B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C,eAAO,MAAM,OAAO,gGAOjB,aAAa;;;EAmGf,CAAC"}
1
+ {"version":3,"file":"buildTx.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/buildTx.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,aAAa,EAGd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C,eAAO,MAAM,OAAO,GAAU,2GAQ3B,aAAa,KAAG,OAAO,CAAC,aAAa,CAuIvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAIhD,eAAO,MAAM,cAAc,EAAE,MAwH5B,CAAC;AAEF,wBAAsB,SAAS,oBAe9B"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,eAAO,MAAM,cAAc,EAAE,MAyI5B,CAAC;AAGF,wBAAsB,SAAS,oBAe9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"estimateGasFee.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/estimateGasFee.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAItD,wBAAsB,cAAc,CAAC,EACnC,aAAa,EACb,cAAc,EACd,QAAQ,EACR,QAAQ,EAAE,SAAS,EACnB,QAAQ,EACR,UAAU,GACX,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuCxC"}
1
+ {"version":3,"file":"estimateGasFee.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/estimateGasFee.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD,wBAAsB,cAAc,CAAC,EACnC,aAAa,EACb,cAAc,EACd,QAAQ,EACR,QAAQ,EAAE,SAAS,EACnB,QAAQ,EACR,UAAU,GACX,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwCxC"}
@@ -0,0 +1,24 @@
1
+ import { SuiTransactionBlockResponse, SuiTransactionBlockResponseOptions } from "@mysten/sui/client";
2
+ import { AggregatorTx } from "../../types/aggregator";
3
+ /**
4
+ * Execute a transaction after it is signed
5
+ *
6
+ * Automatically handle BluefinX transaction execution if needed
7
+ * @example
8
+ * ```ts
9
+ * const { mutateAsync: signTransaction } = useSignTransaction();
10
+ * const quoteResponse = await getQuote(...quoteParams);
11
+ * const { tx } = await buildTx(...buildTxParams);
12
+ * const {signature, bytes} = await signTransaction({
13
+ * transaction: tx instanceof BluefinXTx ? tx.txBytes : tx,
14
+ * });
15
+ * const res = await executeTx(tx, signature, bytes);
16
+ * ```
17
+ * @param tx - AggregatorTx - received from `buildTx`
18
+ * @param signature - User signature after signing the transaction
19
+ * @param signedTxBytes - Signed transaction bytes after signing the transaction
20
+ * @param options - Options for the transaction
21
+ * @returns `SuiTransactionBlockResponse`
22
+ */
23
+ export declare const executeTx: (tx: AggregatorTx, signature: string, signedTxBytes: string, options?: SuiTransactionBlockResponseOptions) => Promise<SuiTransactionBlockResponse>;
24
+ //# sourceMappingURL=executeTx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeTx.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/executeTx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,EACnC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,SAAS,GACpB,IAAI,YAAY,EAChB,WAAW,MAAM,EACjB,eAAe,MAAM,EACrB,UAAU,kCAAkC,yCA0B7C,CAAC"}
@@ -3,13 +3,20 @@ interface Params {
3
3
  tokenIn: string;
4
4
  tokenOut: string;
5
5
  amountIn: string;
6
+ /**
7
+ * @default DEFAULT_SOURCES
8
+ * @warning BluefinX must be explicitly specified if needed
9
+ * @example ```sources: [...DEFAULT_SOURCES, "bluefinx"]``` */
6
10
  sources?: SourceDex[];
11
+ commissionBps?: number;
7
12
  /** Limit the route to a specific set of pools */
8
13
  targetPools?: string[];
9
14
  /** Exclude a specific set of pools from the route */
10
15
  excludedPools?: string[];
16
+ /** The taker address, required for bluefinx */
17
+ taker?: string;
11
18
  }
12
19
  export declare const DEFAULT_SOURCES: SourceDex[];
13
- export declare function getQuote({ tokenIn, tokenOut, amountIn, sources, targetPools, excludedPools, }: Params): Promise<QuoteResponse>;
20
+ export declare function getQuote({ tokenIn, tokenOut, amountIn, sources, commissionBps, targetPools, excludedPools, taker, }: Params): Promise<QuoteResponse>;
14
21
  export {};
15
22
  //# sourceMappingURL=getQuote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getQuote.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/getQuote.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIlE,UAAU,MAAM;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,EAkBtC,CAAC;AAEF,wBAAsB,QAAQ,CAAC,EAC7B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAyB,EACzB,WAAW,EACX,aAAa,GACd,EAAE,MAAM,0BA2BR"}
1
+ {"version":3,"file":"getQuote.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/getQuote.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,aAAa,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAErF,UAAU,MAAM;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;kEAG8D;IAC9D,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,EAoBtC,CAAC;AAEF,wBAAsB,QAAQ,CAAC,EAC7B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAyB,EACzB,aAAa,EACb,WAAW,EACX,aAAa,EACb,KAAK,GACN,EAAE,MAAM,0BA+BR"}
@@ -1,5 +1,6 @@
1
1
  export * from "./buildTx";
2
2
  export * from "./estimateGasFee";
3
+ export * from "./executeTx";
3
4
  export * from "./getQuote";
4
5
  export * from "./getSwapHistory";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/swap/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -1,17 +1,22 @@
1
1
  export * from "./types/aggregator";
2
2
  import { Config } from "./config";
3
- import { getTokenPrice, getTokenPrices, getSuiPrice } from "./features/prices";
4
- import { buildTx, getQuote, estimateGasFee, getSwapHistory } from "./features/swap";
5
- import { placeLimitOrder, getOpenLimitOrders, cancelLimitOrder, claimExpiredLimitOrder, getClosedLimitOrders, placeDcaOrder, getOpenDcaOrders, cancelDcaOrder, getClosedDcaOrders, getDcaOrderExecutions } from "./features/limitDca";
3
+ import { getSuiPrice, getTokenPrice, getTokenPrices } from "./features/prices";
4
+ import { executeBluefinTx } from "./libs/protocols/bluefinx/client";
5
+ import { buildTx, estimateGasFee, executeTx, getQuote, getSwapHistory, DEFAULT_SOURCES } from "./features/swap";
6
+ import { cancelDcaOrder, cancelLimitOrder, claimExpiredLimitOrder, getClosedDcaOrders, getClosedLimitOrders, getDcaOrderExecutions, getOpenDcaOrders, getOpenLimitOrders, placeDcaOrder, placeLimitOrder } from "./features/limitDca";
6
7
  declare const getSuiClient: () => import("@mysten/sui/dist/cjs/client").SuiClient;
7
8
  declare const setSuiClient: (client: import("@mysten/sui/dist/cjs/client").SuiClient) => void;
8
- export { Config, getSuiClient, setSuiClient, getTokenPrice, getTokenPrices, getSuiPrice, getQuote, estimateGasFee, buildTx, getSwapHistory, placeLimitOrder, getOpenLimitOrders, cancelLimitOrder, claimExpiredLimitOrder, getClosedLimitOrders, placeDcaOrder, getOpenDcaOrders, cancelDcaOrder, getClosedDcaOrders, getDcaOrderExecutions, };
9
+ export { Config, getSuiClient, setSuiClient, getTokenPrice, getTokenPrices, getSuiPrice, getQuote, estimateGasFee, buildTx, getSwapHistory, executeTx, executeBluefinTx, DEFAULT_SOURCES, placeLimitOrder, getOpenLimitOrders, cancelLimitOrder, claimExpiredLimitOrder, getClosedLimitOrders, placeDcaOrder, getOpenDcaOrders, cancelDcaOrder, getClosedDcaOrders, getDcaOrderExecutions, };
9
10
  declare const _default: {
10
11
  Config: {
11
12
  setApiKey: (key: string) => void;
12
13
  getApiKey: () => string;
13
14
  setSuiClient: (client: import("@mysten/sui/dist/cjs/client").SuiClient) => void;
14
15
  getSuiClient: () => import("@mysten/sui/dist/cjs/client").SuiClient;
16
+ setPythClient: (client: import("@pythnetwork/pyth-sui-js").SuiPythClient) => void;
17
+ getPythClient: () => import("@pythnetwork/pyth-sui-js").SuiPythClient;
18
+ setPythConnection: (connection: import("@pythnetwork/pyth-sui-js").SuiPriceServiceConnection) => void;
19
+ getPythConnection: () => import("@pythnetwork/pyth-sui-js").SuiPriceServiceConnection;
15
20
  };
16
21
  getSuiClient: () => import("@mysten/sui/dist/cjs/client").SuiClient;
17
22
  setSuiClient: (client: import("@mysten/sui/dist/cjs/client").SuiClient) => void;
@@ -20,11 +25,11 @@ declare const _default: {
20
25
  getSuiPrice: typeof getSuiPrice;
21
26
  getQuote: typeof getQuote;
22
27
  estimateGasFee: typeof estimateGasFee;
23
- buildTx: ({ quoteResponse, accountAddress, slippage, commission: _commission, devInspect, extendTx, }: import("./types/tx").BuildTxParams) => Promise<{
24
- tx: import("@mysten/sui/dist/cjs/transactions").Transaction;
25
- coinOut: import("@mysten/sui/dist/cjs/transactions").TransactionObjectArgument | undefined;
26
- }>;
28
+ buildTx: ({ quoteResponse, accountAddress, slippage, commission: __commission, devInspect, extendTx, isSponsored, }: import("./types/tx").BuildTxParams) => Promise<import("./types/aggregator").BuildTxResult>;
27
29
  getSwapHistory: typeof getSwapHistory;
30
+ executeTx: (tx: import("./types/aggregator").AggregatorTx, signature: string, signedTxBytes: string, options?: import("@mysten/sui/dist/cjs/client").SuiTransactionBlockResponseOptions) => Promise<import("@mysten/sui/dist/cjs/client").SuiTransactionBlockResponse>;
31
+ executeBluefinTx: (tx: import("./types/aggregator").BluefinXTx, signature: string) => Promise<import("./libs/protocols/bluefinx/types").SwapResponse>;
32
+ DEFAULT_SOURCES: import("./types/aggregator").SourceDex[];
28
33
  placeLimitOrder: typeof placeLimitOrder;
29
34
  getOpenLimitOrders: typeof getOpenLimitOrders;
30
35
  cancelLimitOrder: typeof cancelLimitOrder;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EACL,OAAO,EACP,QAAQ,EACR,cAAc,EACd,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAG7B,QAAA,MAAM,YAAY,uDAAsB,CAAC;AACzC,QAAA,MAAM,YAAY,mEAAsB,CAAC;AAEzC,OAAO,EAEL,MAAM,EAGN,YAAY,EACZ,YAAY,EAGZ,aAAa,EACb,cAAc,EACd,WAAW,EAGX,QAAQ,EACR,cAAc,EACd,OAAO,EACP,cAAc,EAGd,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EAGpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,GACtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,wBAgCE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EACL,OAAO,EACP,cAAc,EACd,SAAS,EACT,QAAQ,EACR,cAAc,EACd,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAG7B,QAAA,MAAM,YAAY,uDAAsB,CAAC;AACzC,QAAA,MAAM,YAAY,mEAAsB,CAAC;AAEzC,OAAO,EAEL,MAAM,EAGN,YAAY,EACZ,YAAY,EAGZ,aAAa,EACb,cAAc,EACd,WAAW,EAGX,QAAQ,EACR,cAAc,EACd,OAAO,EACP,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,eAAe,EAGf,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EAGpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,GACtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,wBAmCE"}
@@ -1 +1 @@
1
- {"version":3,"file":"getCoinOjectIdsByAmount.d.ts","sourceRoot":"","sources":["../../../../src/libs/getCoinOjectIdsByAmount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AA2BhE,eAAO,MAAM,uBAAuB,YACzB,MAAM,UACP,MAAM,YACJ,MAAM,KACf,OAAO,CAAC;IACT,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CA0CA,CAAC"}
1
+ {"version":3,"file":"getCoinOjectIdsByAmount.d.ts","sourceRoot":"","sources":["../../../../src/libs/getCoinOjectIdsByAmount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AA4BhE,eAAO,MAAM,uBAAuB,GAClC,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,UAAU,MAAM,KACf,OAAO,CAAC;IACT,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CA2CA,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Transaction, TransactionResult } from "@mysten/sui/transactions";
2
- export declare const getSplitCoinForTx: (account: string, amount: string, splits: string[], coinType: string, inheritTx?: Transaction, inspecTransaction?: boolean) => Promise<{
2
+ export declare const getSplitCoinForTx: (account: string, amount: string, splits: string[], coinType: string, inheritTx?: Transaction, inspecTransaction?: boolean, isSponsored?: boolean) => Promise<{
3
3
  tx: Transaction;
4
4
  coinData: TransactionResult;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"getSplitCoinForTx.d.ts","sourceRoot":"","sources":["../../../../src/libs/getSplitCoinForTx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI1E,eAAO,MAAM,iBAAiB,YACnB,MAAM,UACP,MAAM,UACN,MAAM,EAAE,YACN,MAAM,cACJ,WAAW,sBACH,OAAO,KAC1B,OAAO,CAAC;IACT,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAkCA,CAAC"}
1
+ {"version":3,"file":"getSplitCoinForTx.d.ts","sourceRoot":"","sources":["../../../../src/libs/getSplitCoinForTx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK1E,eAAO,MAAM,iBAAiB,GAC5B,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,QAAQ,MAAM,EAAE,EAChB,UAAU,MAAM,EAChB,YAAY,WAAW,EACvB,oBAAoB,OAAO,EAC3B,qBAAmB,KAClB,OAAO,CAAC;IACT,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAqCA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"groupSwapRoutes.d.ts","sourceRoot":"","sources":["../../../../src/libs/groupSwapRoutes.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,aAAa,EACb,SAAS,EACV,MAAM,qBAAqB,CAAC;AAG7B,wBAAgB,eAAe,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS,EAAE,EAAE,CA2B3E"}
1
+ {"version":3,"file":"groupSwapRoutes.d.ts","sourceRoot":"","sources":["../../../../src/libs/groupSwapRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EACb,SAAS,EACV,MAAM,qBAAqB,CAAC;AAG7B,wBAAgB,eAAe,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS,EAAE,EAAE,CA2B3E"}
@@ -6,15 +6,19 @@ export interface BaseContractParams {
6
6
  inputCoinObject: TransactionResultItem;
7
7
  currentAccount: string;
8
8
  config: Config;
9
+ /** map price feed id to onchain priceInfoObject id */
10
+ pythMap: Record<string, string>;
9
11
  }
10
- export declare abstract class BaseContract {
12
+ export declare abstract class BaseContract<T = any> {
11
13
  protected swapInfo: TxSorSwap;
12
14
  protected inputCoinObject: TransactionResultItem;
13
15
  protected currentAccount: string;
14
16
  protected config: Config;
15
- constructor({ swapInfo, inputCoinObject, currentAccount, config, }: BaseContractParams);
17
+ protected pythMap: Record<string, string>;
18
+ constructor({ swapInfo, inputCoinObject, currentAccount, config, pythMap, }: BaseContractParams);
16
19
  abstract swap(tx: Transaction): Promise<TransactionResultItem>;
17
20
  protected getInputCoinValue(tx: Transaction): import("@mysten/sui/transactions").TransactionArgument;
18
21
  protected getTypeParams(): string[];
22
+ protected get extra(): NonNullable<T>;
19
23
  }
20
24
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/libs/protocols/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,qBAAqB,CAAC;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,8BAAsB,YAAY;IAChC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC9B,SAAS,CAAC,eAAe,EAAE,qBAAqB,CAAC;IACjD,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEb,EACV,QAAQ,EACR,eAAe,EACf,cAAc,EACd,MAAM,GACP,EAAE,kBAAkB;IAOrB,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAE9D,SAAS,CAAC,iBAAiB,CAAC,EAAE,EAAE,WAAW;IAQ3C,SAAS,CAAC,aAAa;CAKxB"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/libs/protocols/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,qBAAqB,CAAC;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,8BAAsB,YAAY,CAAC,CAAC,GAAG,GAAG;IACxC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC9B,SAAS,CAAC,eAAe,EAAE,qBAAqB,CAAC;IACjD,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE9B,EACV,QAAQ,EACR,eAAe,EACf,cAAc,EACd,MAAM,EACN,OAAO,GACR,EAAE,kBAAkB;IAQrB,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAE9D,SAAS,CAAC,iBAAiB,CAAC,EAAE,EAAE,WAAW;IAQ3C,SAAS,CAAC,aAAa;IAMvB,SAAS,KAAK,KAAK,mBAMlB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/bluefin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA4C3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/bluefin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAyC3B"}
@@ -0,0 +1,13 @@
1
+ import { BluefinXTx, SponsorRequest, SponsorResponse, SwapResponse } from "./types";
2
+ export declare const sponsorBluefinX: (body: SponsorRequest) => Promise<SponsorResponse>;
3
+ /**
4
+ * Request BluefinX for signing sponsored tx and execute it
5
+ *
6
+ * @Warning
7
+ * User must use this function to execute BluefinX tx, otherwise the tx will be rejected by BluefinX contract
8
+ * @param tx - BluefinX tx which is generated by `buildTx`
9
+ * @param signature - user signature after signing the transaction
10
+ * @returns `SwapResponse`
11
+ */
12
+ export declare const executeBluefinTx: (tx: BluefinXTx, signature: string) => Promise<SwapResponse>;
13
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/bluefinx/client.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,cAAc,EACd,eAAe,EACf,YAAY,EACb,MAAM,SAAS,CAAC;AAYjB,eAAO,MAAM,eAAe,GAAU,MAAM,cAAc,6BAEzD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAU,IAAI,UAAU,EAAE,WAAW,MAAM,0BAMvE,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Transaction } from "@mysten/sui/transactions";
2
+ import { BaseContract } from "../base";
3
+ export type BluefinXExtra = {
4
+ quoteId: string;
5
+ signature: string;
6
+ taker: string;
7
+ vault: string;
8
+ quoteExpiresAtUtcMillis: number;
9
+ createdAtUtcMillis: number;
10
+ };
11
+ export declare class BluefinXContract extends BaseContract {
12
+ swap(tx: Transaction): Promise<{
13
+ $kind: "NestedResult";
14
+ NestedResult: [number, number];
15
+ }>;
16
+ }
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/bluefinx/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAOvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAcvC,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AACF,qBAAa,gBAAiB,SAAQ,YAAY;IAC1C,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA+B3B"}
@@ -0,0 +1,34 @@
1
+ export declare class BluefinXTx {
2
+ quoteId: string;
3
+ txBytes: string;
4
+ constructor(quoteId: string, txBytes: string);
5
+ }
6
+ /**
7
+ * Response from BluefinX swap
8
+ */
9
+ export type SwapResponse = {
10
+ /** Whether the swap is approved */
11
+ approved: boolean;
12
+ /** Whether the swap is executed */
13
+ executed: boolean;
14
+ /** Transaction digest */
15
+ txDigest: string;
16
+ /** Quote ID */
17
+ quoteId: string;
18
+ };
19
+ export type SponsorRequest = {
20
+ quoteId: string;
21
+ txBytes: string;
22
+ sender: string;
23
+ };
24
+ type SponsoredTxData = {
25
+ txBytes: string;
26
+ txDigest: string;
27
+ };
28
+ export type SponsorResponse = {
29
+ success: boolean;
30
+ quoteId: string;
31
+ data: SponsoredTxData;
32
+ };
33
+ export {};
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/bluefinx/types.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;gBACJ,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI7C;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/cetus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,qBAAa,aAAc,SAAQ,YAAY;IACvC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA4C3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/cetus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,qBAAa,aAAc,SAAQ,YAAY;IACvC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA2C3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"sponsored.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/deepbookV3/sponsored.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,qBAAa,2BAA4B,SAAQ,YAAY;IACrD,IAAI,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;CA8B5D"}
1
+ {"version":3,"file":"sponsored.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/deepbookV3/sponsored.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,qBAAa,2BAA4B,SAAQ,YAAY;IACrD,IAAI,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAyB5D"}
@@ -1 +1 @@
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;AAIvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAiC3B"}
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,11 +1,9 @@
1
1
  import { Transaction } from "@mysten/sui/transactions";
2
2
  import { BaseContract } from "../base";
3
- export declare class DeepBookContract extends BaseContract {
3
+ export declare class HaedalPMMContract extends BaseContract {
4
4
  swap(tx: Transaction): Promise<{
5
5
  $kind: "NestedResult";
6
6
  NestedResult: [number, number];
7
7
  }>;
8
- private createAccountCap;
9
- private deleteAccountCap;
10
8
  }
11
9
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,qBAAa,iBAAkB,SAAQ,YAAY;IAC3C,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA4B3B"}
@@ -1,7 +1,6 @@
1
1
  import { FlowXContract } from "./flowx";
2
2
  import { AfterMathContract } from "./aftermath";
3
3
  import { CetusContract } from "./cetus";
4
- import { DeepBookContract } from "./deepbook";
5
4
  import { KriyaContract } from "./kriya";
6
5
  import { TurbosContract } from "./turbos";
7
6
  import { SuiswapContract } from "./suiswap";
@@ -15,6 +14,9 @@ import { StSuiContract } from "./stsui";
15
14
  import { FlowxV3Contract } from "./flowxV3";
16
15
  import { SteammContract } from "./steamm";
17
16
  import { MagmaContract } from "./magma";
17
+ import { HaedalPMMContract } from "./haedal_pmm";
18
+ import { MomentumContract } from "./momentum";
19
+ import { BluefinXContract } from "./bluefinx";
18
20
  export declare const ProtocolContract: {
19
21
  cetus: typeof CetusContract;
20
22
  turbos: typeof TurbosContract;
@@ -22,7 +24,6 @@ export declare const ProtocolContract: {
22
24
  kriya: typeof KriyaContract;
23
25
  suiswap: typeof SuiswapContract;
24
26
  aftermath: typeof AfterMathContract;
25
- deepbook: typeof DeepBookContract;
26
27
  deepbook_v3: typeof SponsoredDeepBookV3Contract;
27
28
  flowx: typeof FlowXContract;
28
29
  flowx_v3: typeof FlowxV3Contract;
@@ -32,6 +33,10 @@ export declare const ProtocolContract: {
32
33
  obric: typeof ObricContract;
33
34
  stsui: typeof StSuiContract;
34
35
  steamm: typeof SteammContract;
36
+ steamm_oracle_quoter: typeof SteammContract;
35
37
  magma: typeof MagmaContract;
38
+ haedal_pmm: typeof HaedalPMMContract;
39
+ momentum: typeof MomentumContract;
40
+ bluefinx: typeof BluefinXContract;
36
41
  };
37
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/libs/protocols/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;CAkB5B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/libs/protocols/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;CAqB5B,CAAC"}
@@ -1 +1 @@
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;;;;CAyC3B"}
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,11 +1,9 @@
1
1
  import { Transaction } from "@mysten/sui/transactions";
2
2
  import { BaseContract } from "../base";
3
- export declare class DeepBookContract extends BaseContract {
3
+ export declare class MomentumContract extends BaseContract {
4
4
  swap(tx: Transaction): Promise<{
5
5
  $kind: "NestedResult";
6
6
  NestedResult: [number, number];
7
7
  }>;
8
- private createAccountCap;
9
- private deleteAccountCap;
10
8
  }
11
9
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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,5 +1,6 @@
1
1
  import { Transaction } from "@mysten/sui/transactions";
2
2
  import { BaseContract } from "../base";
3
+ import { ExtraOracle } from "../../../types/aggregator";
3
4
  export type SteamExtra = {
4
5
  bankAStructTag: string;
5
6
  bankBStructTag: string;
@@ -8,8 +9,11 @@ export type SteamExtra = {
8
9
  bankB: string;
9
10
  lendingMarketA: string;
10
11
  lendingMarketB: string;
12
+ oracleRegistry?: string;
13
+ oracles?: ExtraOracle[];
14
+ oracleIndexes?: number[];
11
15
  };
12
- export declare class SteammContract extends BaseContract {
16
+ export declare class SteammContract extends BaseContract<SteamExtra> {
13
17
  swap(tx: Transaction): Promise<{
14
18
  $kind: "NestedResult";
15
19
  NestedResult: [number, number];
@@ -18,9 +22,16 @@ export declare class SteammContract extends BaseContract {
18
22
  $kind: "NestedResult";
19
23
  NestedResult: [number, number];
20
24
  };
21
- cpmmSwapV2(tx: Transaction): {
25
+ ommSwap(tx: Transaction): {
22
26
  $kind: "NestedResult";
23
27
  NestedResult: [number, number];
24
28
  };
29
+ getOraclePriceUpdate(tx: Transaction): readonly [{
30
+ $kind: "NestedResult";
31
+ NestedResult: [number, number];
32
+ }, {
33
+ $kind: "NestedResult";
34
+ NestedResult: [number, number];
35
+ }];
25
36
  }
26
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQvC,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;CACxB,CAAC;AACF,qBAAa,cAAe,SAAQ,YAAY;IACxC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;IAI1B,QAAQ,CAAC,EAAE,EAAE,WAAW;;;;IAuExB,UAAU,CAAC,EAAE,EAAE,WAAW;;;;CAiI3B"}
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;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQvC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,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,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AACF,qBAAa,cAAe,SAAQ,YAAY,CAAC,UAAU,CAAC;IACpD,IAAI,CAAC,EAAE,EAAE,WAAW;;;;IAS1B,QAAQ,CAAC,EAAE,EAAE,WAAW;;;;IAmExB,OAAO,CAAC,EAAE,EAAE,WAAW;;;;IAqEvB,oBAAoB,CAAC,EAAE,EAAE,WAAW;;;;;;;CA8BrC"}
@@ -1 +1 @@
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;;;;CAgC3B"}
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 +1 @@
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;;;;CAwC3B"}
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,3 +1,2 @@
1
- import BN from "bn.js";
2
- export declare function getDefaultSqrtPriceLimit(a2b: boolean): BN;
1
+ export declare function getDefaultSqrtPriceLimit(a2b: boolean): bigint;
3
2
  //# sourceMappingURL=utils.d.ts.map