@cowprotocol/cow-sdk
Version:
## 📚 [Docs website](https://docs.cow.fi/)
20 lines (19 loc) • 570 B
TypeScript
/**
* Convert a percentage to a bps value.
*
* It rounds to the nearest integer.
*
* @param percentage - The percentage to convert
* @returns The bps value
*/
export declare function percentageToBps(percentage: number | bigint): number;
/**
* Apply a percentage to a bigint value
*
* Rounds to the nearest integer.
*
* @param value - The value to apply the percentage to
* @param percentage - The percentage to apply
* @returns The value after applying the percentage
*/
export declare function applyPercentage(value: bigint, percentage: number): bigint;