34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import { Hexable } from './bytes';
|
|
import { Arrayish } from './bytes';
|
|
export declare type BigNumberish = BigNumber | string | number | Arrayish;
|
|
export declare class BigNumber implements Hexable {
|
|
private readonly _hex;
|
|
constructor(value: BigNumberish);
|
|
fromTwos(value: number): BigNumber;
|
|
toTwos(value: number): 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;
|
|
maskn(value: number): BigNumber;
|
|
eq(other: BigNumberish): boolean;
|
|
lt(other: BigNumberish): boolean;
|
|
lte(other: BigNumberish): boolean;
|
|
gt(other: BigNumberish): boolean;
|
|
gte(other: BigNumberish): boolean;
|
|
isZero(): boolean;
|
|
toNumber(): number;
|
|
toString(): string;
|
|
toHexString(): string;
|
|
static isBigNumber(value: any): value is BigNumber;
|
|
}
|
|
export declare function bigNumberify(value: BigNumberish): BigNumber;
|
|
export declare const ConstantNegativeOne: BigNumber;
|
|
export declare const ConstantZero: BigNumber;
|
|
export declare const ConstantOne: BigNumber;
|
|
export declare const ConstantTwo: BigNumber;
|
|
export declare const ConstantWeiPerEther: BigNumber;
|
|
export declare const ConstantMaxUint256: BigNumber;
|