@cowprotocol/cow-sdk 6.0.0-RC.35 → 6.0.0-RC.37
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.
- package/dist/common/utils/math.d.ts +16 -0
- package/dist/index-3180a6f9.js +29 -0
- package/dist/index-3180a6f9.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.module.js +4 -4
- package/dist/index.module.js.map +1 -1
- package/dist/order-book/quoteAmountsAndCostsUtils.d.ts +13 -0
- package/dist/package.json +3 -3
- package/dist/schemas/trading/LimitTradeParameters.ts +1 -1
- package/dist/schemas/trading/QuoteResultsSerialized.ts +6 -1
- package/dist/schemas/trading/TradeParameters.ts +1 -1
- package/dist/trading/getQuote.d.ts +13 -2
- package/dist/trading/index.d.ts +1 -0
- package/dist/trading/suggestSlippageBps.d.ts +12 -0
- package/dist/trading/suggestSlippageBpsFromFee.d.ts +29 -0
- package/dist/trading/types.d.ts +9 -0
- package/dist/{utils-32e82ded.js → utils-4518ff69.js} +2 -2
- package/dist/{utils-32e82ded.js.map → utils-4518ff69.js.map} +1 -1
- package/dist/{utils-7a8f2bb6.js → utils-98a7ed9a.js} +1 -1
- package/dist/{utils-7a8f2bb6.js.map → utils-98a7ed9a.js.map} +1 -1
- package/dist/{utils-7a8959f4.js → utils-fd07898a.js} +1 -1
- package/dist/{utils-7a8959f4.js.map → utils-fd07898a.js.map} +1 -1
- package/package.json +3 -3
- package/dist/index-4bfba66e.js +0 -29
- package/dist/index-4bfba66e.js.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a percentage to a bps value.
|
|
3
|
+
*
|
|
4
|
+
* It rounds up.
|
|
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
|
+
* @param value - The value to apply the percentage to
|
|
13
|
+
* @param percentage - The percentage to apply
|
|
14
|
+
* @returns The value after applying the percentage
|
|
15
|
+
*/
|
|
16
|
+
export declare function applyPercentage(value: bigint, percentage: number): bigint;
|