UNPKG

1.58 kBTypeScriptView Raw
1import { Bytes, Hexable } from "@ethersproject/bytes";
2export declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
3export declare function isBigNumberish(value: any): value is BigNumberish;
4export declare class BigNumber implements Hexable {
5 readonly _hex: string;
6 readonly _isBigNumber: boolean;
7 constructor(constructorGuard: any, hex: string);
8 fromTwos(value: number): BigNumber;
9 toTwos(value: number): BigNumber;
10 abs(): BigNumber;
11 add(other: BigNumberish): BigNumber;
12 sub(other: BigNumberish): BigNumber;
13 div(other: BigNumberish): BigNumber;
14 mul(other: BigNumberish): BigNumber;
15 mod(other: BigNumberish): BigNumber;
16 pow(other: BigNumberish): BigNumber;
17 and(other: BigNumberish): BigNumber;
18 or(other: BigNumberish): BigNumber;
19 xor(other: BigNumberish): BigNumber;
20 mask(value: number): BigNumber;
21 shl(value: number): BigNumber;
22 shr(value: number): BigNumber;
23 eq(other: BigNumberish): boolean;
24 lt(other: BigNumberish): boolean;
25 lte(other: BigNumberish): boolean;
26 gt(other: BigNumberish): boolean;
27 gte(other: BigNumberish): boolean;
28 isNegative(): boolean;
29 isZero(): boolean;
30 toNumber(): number;
31 toBigInt(): bigint;
32 toString(): string;
33 toHexString(): string;
34 toJSON(key?: string): any;
35 static from(value: any): BigNumber;
36 static isBigNumber(value: any): value is BigNumber;
37}
38export declare function _base36To16(value: string): string;
39export declare function _base16To36(value: string): string;
40//# sourceMappingURL=bignumber.d.ts.map
\No newline at end of file