diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-03-28 17:05:36 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-02 17:34:29 +0800 |
commit | 4d9029bb0e3b215efdf165704c80d3bacef0e85a (patch) | |
tree | 8f699dcd0a7b5fba3c31c065a62d640407bba8c3 /packages/typescript-typings/types/bn.js/index.d.ts | |
parent | bc49dde4d5d24b9a8b01459bde061f9b23fb5898 (diff) | |
download | dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.gz dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.bz2 dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.lz dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.xz dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.zst dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.zip |
Add metacoin example project
Diffstat (limited to 'packages/typescript-typings/types/bn.js/index.d.ts')
-rw-r--r-- | packages/typescript-typings/types/bn.js/index.d.ts | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/packages/typescript-typings/types/bn.js/index.d.ts b/packages/typescript-typings/types/bn.js/index.d.ts new file mode 100644 index 000000000..f59b74bad --- /dev/null +++ b/packages/typescript-typings/types/bn.js/index.d.ts @@ -0,0 +1,57 @@ +declare module 'bn.js' { + import { Buffer } from 'buffer'; + + type Endianness = 'le' | 'be'; + + class BN { + constructor(num: number | string | number[] | Buffer, base?: number, endian?: Endianness); + public clone(): BN; + public toString(base?: number, length?: number): string; + public toNumber(): number; + public toJSON(): string; + public toArray(endian?: Endianness, length?: number): number[]; + public toBuffer(endian?: Endianness, length?: number): Buffer; + public bitLength(): number; + public zeroBits(): number; + public byteLength(): number; + public isNeg(): boolean; + public isEven(): boolean; + public isOdd(): boolean; + public isZero(): boolean; + public cmp(b: any): number; + public lt(b: any): boolean; + public lte(b: any): boolean; + public gt(b: any): boolean; + public gte(b: any): boolean; + public eq(b: any): boolean; + public isBN(b: any): boolean; + + public neg(): BN; + public abs(): BN; + public add(b: BN): BN; + public sub(b: BN): BN; + public mul(b: BN): BN; + public sqr(): BN; + public pow(b: BN): BN; + public div(b: BN): BN; + public mod(b: BN): BN; + public divRound(b: BN): BN; + + public or(b: BN): BN; + public and(b: BN): BN; + public xor(b: BN): BN; + public setn(b: number): BN; + public shln(b: number): BN; + public shrn(b: number): BN; + public testn(b: number): boolean; + public maskn(b: number): BN; + public bincn(b: number): BN; + public notn(w: number): BN; + + public gcd(b: BN): BN; + public egcd(b: BN): { a: BN; b: BN; gcd: BN }; + public invm(b: BN): BN; + } + + export = BN; +} |