@bsv/sdk
Version:
BSV Blockchain Software Development Kit
32 lines • 1.05 kB
TypeScript
import PrivateKey from './PrivateKey.js';
import BigNumber from './BigNumber.js';
export declare class PointInFiniteField {
x: BigNumber;
y: BigNumber;
constructor(x: BigNumber, y: BigNumber);
toString(): string;
static fromString(str: string): PointInFiniteField;
}
/**
* Polynomial class
*
* This class is used to create a polynomial with a given threshold and a private key.
* The polynomial is used to create shares of the private key.
*
* @param key - The private key to split
* @param threshold - The number of shares required to recombine the private key
*
* @example
* const key = new PrivateKey()
* const threshold = 2
* const polynomial = new Polynomial(key, threshold)
*
*/
export default class Polynomial {
readonly points: PointInFiniteField[];
readonly threshold: number;
constructor(points: PointInFiniteField[], threshold?: number);
static fromPrivateKey(key: PrivateKey, threshold: number): Polynomial;
valueAt(x: BigNumber): BigNumber;
}
//# sourceMappingURL=Polynomial.d.ts.map