UNPKG

@mstable/protocol

Version:
14 lines (13 loc) 873 B
import { BigNumber as BN } from "ethers"; export { BN }; export declare const simpleToExactAmount: (amount: number | string | BN, decimals?: number | BN) => BN; export declare const applyDecimals: (inputQuantity: number | string | BN, decimals?: number) => BN; export declare const percentToWeight: (percent: number | string | BN) => BN; export declare const applyRatioMassetToBasset: (input: BN, ratio: BN | string) => BN; export declare const applyRatio: (bAssetQ: BN | string | number, ratio: BN | string) => BN; export declare const applyRatioCeil: (bAssetQ: BN | string, ratio: BN | string) => BN; export declare const createMultiple: (decimals: number) => BN; export declare const minimum: (a: BN, b: BN) => BN; export declare const maximum: (a: BN, b: BN) => BN; export declare const sqrt: (value: BN | number) => BN; export declare const sum: (a: BN, b: BN) => BN;