@types/ecurve
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Installation

npm install --save @types/ecurve

Summary

This package contains type definitions for ecurve (https://github.com/cryptocoinjs/ecurve#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ecurve.

index.d.ts

/// <reference types= "node" />

import BigInteger = require("bigi");

export class Curve {
    p: BigInteger;
    a: BigInteger;
    b: BigInteger;
    G: Point;
    n: BigInteger;
    h: BigInteger;
    constructor(
        p: BigInteger,
        a: BigInteger,
        b: BigInteger,
        Gx: BigInteger,
        Gy: BigInteger,
        n: BigInteger,
        h: BigInteger,
    );
    isInfinity(Q: any): boolean;
    isOnCurve(Q: any): boolean;
    pointFromX(isOdd: boolean, x: Point): Point;
    validate(Q: any): boolean;
}
export class Point {
    x: BigInteger;
    y: BigInteger;
    z: BigInteger;
    affineX: BigInteger;
    affineY: BigInteger;
    constructor(curve: Curve, x: BigInteger, y: BigInteger, z: BigInteger);
    add(b: Point): Point;
    equals(other: Point): boolean;
    getEncoded(compressed?: boolean): Buffer;
    multiply(k: any): Point;
    multiplyTwo(j: any, x: any, k: any): Point;
    negate(): Point;
    toString(): string;
    twice(): Point;
    static decodeFrom(curve: Curve, buffer: Buffer): any;
    static fromAffine(curve: Curve, x: BigInteger, y: BigInteger): Point;
}
export function getCurveByName(name: string): Curve;

Additional Details

Credits

These definitions were written by Mohamed Hegazy.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ecurve

Weekly Downloads

433

Version

1.0.3

License

MIT

Unpacked Size

5.03 kB

Total Files

5

Last publish

Collaborators

  • types