ethers.js/packages/bignumber/lib.esm/bignumber.d.ts

40 lines
1.5 KiB
TypeScript
Raw Normal View History

2019-05-15 01:48:48 +03:00
import { Bytes, Hexable } from "@ethersproject/bytes";
export declare type BigNumberish = BigNumber | Bytes | string | number;
2019-06-12 00:57:04 +03:00
export declare function isBigNumberish(value: any): value is BigNumberish;
2019-05-15 01:48:48 +03:00
export declare class BigNumber implements Hexable {
readonly _hex: string;
2019-06-12 00:57:04 +03:00
readonly _isBigNumber: boolean;
2019-05-15 01:48:48 +03: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-16 01:28:04 +03: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-15 01:48:48 +03:00
eq(other: BigNumberish): boolean;
lt(other: BigNumberish): boolean;
lte(other: BigNumberish): boolean;
gt(other: BigNumberish): boolean;
gte(other: BigNumberish): boolean;
2020-04-16 01:28:04 +03:00
isNegative(): boolean;
2019-05-15 01:48:48 +03:00
isZero(): boolean;
toNumber(): number;
2021-03-30 22:22:45 +03:00
toBigInt(): BigInt;
2019-05-15 01:48:48 +03:00
toString(): string;
toHexString(): string;
2020-08-25 08:53:48 +03:00
toJSON(key?: string): any;
2019-05-15 01:48:48 +03:00
static from(value: any): BigNumber;
static isBigNumber(value: any): value is BigNumber;
}
2020-11-17 07:07:24 +03:00
export declare function _base36To16(value: string): string;
export declare function _base16To36(value: string): string;
//# sourceMappingURL=bignumber.d.ts.map