UNPKG

@chainsafe/bls

Version:

Implementation of bls signature verification for ethereum 2.0

19 lines (18 loc) 821 B
import blst from "@chainsafe/blst"; import { CoordType, PointFormat, PublicKey as IPublicKey, PublicKeyArg } from "../types.js"; export declare class PublicKey implements IPublicKey { private readonly value; private constructor(); /** @param type Defaults to `CoordType.jacobian` */ static fromBytes(bytes: Uint8Array, type?: CoordType, validate?: boolean): PublicKey; static fromHex(hex: string): PublicKey; static aggregate(publicKeys: PublicKeyArg[]): PublicKey; static convertToBlstPublicKeyArg(publicKey: PublicKeyArg): blst.PublicKey; /** * Implemented for SecretKey to be able to call .toPublicKey() */ private static friendBuild; toBytes(format?: PointFormat): Uint8Array; toHex(format?: PointFormat): string; multiplyBy(_bytes: Uint8Array): PublicKey; }