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
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: @types/bigi, @types/node
Credits
These definitions were written by Mohamed Hegazy.