2019-05-15 01:25:46 +03:00
|
|
|
declare module "bn.js" {
|
|
|
|
export class BN {
|
|
|
|
constructor(value: string | number, radix?: number);
|
|
|
|
|
|
|
|
add(other: BN): BN;
|
|
|
|
sub(other: BN): BN;
|
|
|
|
div(other: BN): BN;
|
|
|
|
mod(other: BN): BN;
|
|
|
|
mul(other: BN): BN;
|
|
|
|
|
|
|
|
pow(other: BN): BN;
|
2020-04-15 22:39:26 +03:00
|
|
|
umod(other: BN): BN;
|
2019-05-15 01:25:46 +03:00
|
|
|
|
|
|
|
eq(other: BN): boolean;
|
|
|
|
lt(other: BN): boolean;
|
|
|
|
lte(other: BN): boolean;
|
|
|
|
gt(other: BN): boolean;
|
|
|
|
gte(other: BN): boolean;
|
|
|
|
|
2020-04-15 22:39:26 +03:00
|
|
|
isNeg(): boolean;
|
2019-05-15 01:25:46 +03:00
|
|
|
isZero(): boolean;
|
|
|
|
|
|
|
|
toTwos(other: number): BN;
|
|
|
|
fromTwos(other: number): BN;
|
|
|
|
|
2020-04-15 22:39:26 +03:00
|
|
|
or(other: BN): BN;
|
|
|
|
and(other: BN): BN;
|
|
|
|
xor(other: BN): BN;
|
|
|
|
shln(other: number): BN;
|
|
|
|
shrn(other: number): BN;
|
|
|
|
maskn(other: number): BN;
|
|
|
|
|
2019-05-15 01:25:46 +03:00
|
|
|
toString(radix: number): string;
|
|
|
|
toNumber(): number;
|
|
|
|
toArray(endian: string, width: number): Uint8Array;
|
|
|
|
encode(encoding: string, compact: boolean): Uint8Array;
|
|
|
|
}
|
|
|
|
}
|