2019-05-14 18:48:48 -04:00
|
|
|
import { Bytes, Hexable } from "@ethersproject/bytes";
|
2021-05-17 16:19:36 -04:00
|
|
|
export declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
|
2019-06-11 17:57:04 -04:00
|
|
|
export declare function isBigNumberish(value: any): value is BigNumberish;
|
2019-05-14 18:48:48 -04:00
|
|
|
export declare class BigNumber implements Hexable {
|
|
|
|
readonly _hex: string;
|
2019-06-11 17:57:04 -04:00
|
|
|
readonly _isBigNumber: boolean;
|
2019-05-14 18:48:48 -04:00
|
|
|
constructor(constructorGuard: any, hex: string);
|
|
|
|
fromTwos(value: number): BigNumber;
|
|
|
|
toTwos(value: number): BigNumber;
|
|
|
|
abs(): BigNumber;
|
|
|
|
add(other: BigNumberish): BigNumber;
|
|
|
|
sub(other: BigNumberish): BigNumber;
|
|
|
|
div(other: BigNumberish): BigNumber;
|
|
|
|
mul(other: BigNumberish): BigNumber;
|
|
|
|
mod(other: BigNumberish): BigNumber;
|
|
|
|
pow(other: BigNumberish): BigNumber;
|
2020-04-15 18:28:04 -04:00
|
|
|
and(other: BigNumberish): BigNumber;
|
|
|
|
or(other: BigNumberish): BigNumber;
|
|
|
|
xor(other: BigNumberish): BigNumber;
|
|
|
|
mask(value: number): BigNumber;
|
|
|
|
shl(value: number): BigNumber;
|
|
|
|
shr(value: number): BigNumber;
|
2019-05-14 18:48:48 -04:00
|
|
|
eq(other: BigNumberish): boolean;
|
|
|
|
lt(other: BigNumberish): boolean;
|
|
|
|
lte(other: BigNumberish): boolean;
|
|
|
|
gt(other: BigNumberish): boolean;
|
|
|
|
gte(other: BigNumberish): boolean;
|
2020-04-15 18:28:04 -04:00
|
|
|
isNegative(): boolean;
|
2019-05-14 18:48:48 -04:00
|
|
|
isZero(): boolean;
|
|
|
|
toNumber(): number;
|
2021-04-19 21:30:28 -04:00
|
|
|
toBigInt(): bigint;
|
2019-05-14 18:48:48 -04:00
|
|
|
toString(): string;
|
|
|
|
toHexString(): string;
|
2020-08-25 01:53:48 -04:00
|
|
|
toJSON(key?: string): any;
|
2019-05-14 18:48:48 -04:00
|
|
|
static from(value: any): BigNumber;
|
|
|
|
static isBigNumber(value: any): value is BigNumber;
|
|
|
|
}
|
2020-11-16 23:07:24 -05:00
|
|
|
export declare function _base36To16(value: string): string;
|
|
|
|
export declare function _base16To36(value: string): string;
|
2021-01-19 05:22:54 -05:00
|
|
|
//# sourceMappingURL=bignumber.d.ts.map
|