@cowprotocol/cow-sdk 6.0.0-RC.40 → 6.0.0-RC.43

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 (33) hide show
  1. package/dist/common/utils/math.d.ts +19 -0
  2. package/dist/index-5e9d8735.js +29 -0
  3. package/dist/index-5e9d8735.js.map +1 -0
  4. package/dist/index.js +4 -4
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.modern.mjs +1 -1
  7. package/dist/index.module.js +4 -4
  8. package/dist/index.module.js.map +1 -1
  9. package/dist/order-book/quoteAmountsAndCostsUtils.d.ts +13 -0
  10. package/dist/package.json +3 -3
  11. package/dist/schemas/trading/LimitOrderAdvancedSettings.ts +135 -14
  12. package/dist/schemas/trading/LimitTradeParameters.ts +136 -15
  13. package/dist/schemas/trading/QuoteResultsSerialized.ts +276 -29
  14. package/dist/schemas/trading/SwapAdvancedSettings.ts +135 -14
  15. package/dist/schemas/trading/TradeParameters.ts +136 -15
  16. package/dist/trading/getQuote.d.ts +13 -2
  17. package/dist/trading/index.d.ts +2 -1
  18. package/dist/trading/suggestSlippageBps.d.ts +12 -0
  19. package/dist/trading/suggestSlippageFromFee.d.ts +19 -0
  20. package/dist/trading/suggestSlippageFromVolume.d.ts +10 -0
  21. package/dist/trading/types.d.ts +9 -0
  22. package/dist/trading/utils/getPartnerFeeBps.d.ts +2 -0
  23. package/dist/trading/{utils.d.ts → utils/misc.d.ts} +3 -3
  24. package/dist/trading/utils/slippage.d.ts +14 -0
  25. package/dist/{utils-2f4e5a62.js → utils-15555881.js} +2 -2
  26. package/dist/{utils-2f4e5a62.js.map → utils-15555881.js.map} +1 -1
  27. package/dist/{utils-bc6e3111.js → utils-52573c3a.js} +2 -2
  28. package/dist/{utils-bc6e3111.js.map → utils-52573c3a.js.map} +1 -1
  29. package/dist/{utils-0f19bb97.js → utils-d6eb13c5.js} +2 -2
  30. package/dist/{utils-0f19bb97.js.map → utils-d6eb13c5.js.map} +1 -1
  31. package/package.json +3 -3
  32. package/dist/index-b5deeac3.js +0 -29
  33. package/dist/index-b5deeac3.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Convert a percentage to a bps value.
3
+ *
4
+ * It rounds to the nearest integer.
5
+ *
6
+ * @param percentage - The percentage to convert
7
+ * @returns The bps value
8
+ */
9
+ export declare function percentageToBps(percentage: number | bigint): number;
10
+ /**
11
+ * Apply a percentage to a bigint value
12
+ *
13
+ * Rounds to the nearest integer.
14
+ *
15
+ * @param value - The value to apply the percentage to
16
+ * @param percentage - The percentage to apply
17
+ * @returns The value after applying the percentage
18
+ */
19
+ export declare function applyPercentage(value: bigint, percentage: number): bigint;