1 | import { BytesLike } from "@ethersproject/bytes";
|
2 | import { BigNumber, BigNumberish } from "./bignumber";
|
3 | export declare function formatFixed(value: BigNumberish, decimals?: string | BigNumberish): string;
|
4 | export declare function parseFixed(value: string, decimals?: BigNumberish): BigNumber;
|
5 | export declare class FixedFormat {
|
6 | readonly signed: boolean;
|
7 | readonly width: number;
|
8 | readonly decimals: number;
|
9 | readonly name: string;
|
10 | readonly _multiplier: string;
|
11 | constructor(constructorGuard: any, signed: boolean, width: number, decimals: number);
|
12 | static from(value: any): FixedFormat;
|
13 | }
|
14 | export declare class FixedNumber {
|
15 | readonly format: FixedFormat;
|
16 | readonly _hex: string;
|
17 | readonly _value: string;
|
18 | readonly _isFixedNumber: boolean;
|
19 | constructor(constructorGuard: any, hex: string, value: string, format?: FixedFormat);
|
20 | _checkFormat(other: FixedNumber): void;
|
21 | addUnsafe(other: FixedNumber): FixedNumber;
|
22 | subUnsafe(other: FixedNumber): FixedNumber;
|
23 | mulUnsafe(other: FixedNumber): FixedNumber;
|
24 | divUnsafe(other: FixedNumber): FixedNumber;
|
25 | floor(): FixedNumber;
|
26 | ceiling(): FixedNumber;
|
27 | round(decimals?: number): FixedNumber;
|
28 | isZero(): boolean;
|
29 | isNegative(): boolean;
|
30 | toString(): string;
|
31 | toHexString(width?: number): string;
|
32 | toUnsafeFloat(): number;
|
33 | toFormat(format: FixedFormat | string): FixedNumber;
|
34 | static fromValue(value: BigNumber, decimals?: BigNumberish, format?: FixedFormat | string | number): FixedNumber;
|
35 | static fromString(value: string, format?: FixedFormat | string | number): FixedNumber;
|
36 | static fromBytes(value: BytesLike, format?: FixedFormat | string | number): FixedNumber;
|
37 | static from(value: any, format?: FixedFormat | string | number): FixedNumber;
|
38 | static isFixedNumber(value: any): value is FixedNumber;
|
39 | }
|
40 | //# sourceMappingURL=fixednumber.d.ts.map |
\ | No newline at end of file |