/** * forked from https://github.com/EOSIO/eosjs/blob/master/src/eosjs-key-conversions.ts * * rewrite curves */ import { Key, KeyType } from "./eosjs-numeric"; import { ProjPointType, CurveFn } from "@noble/curves/abstract/weierstrass.js"; /** Represents/stores a public key and provides easy conversion for use with `elliptic` lib */ export declare class PublicKey { private key; private ec; constructor(key: Key, ec: CurveFn); /** Instantiate public key from an EOSIO-format public key */ static fromString(publicKeyStr: string, ec?: CurveFn): PublicKey; /** Instantiate public key from an `elliptic`-format public key */ static fromPoint(publicKey: ProjPointType, keyType: KeyType, ec?: CurveFn): PublicKey; /** Export public key as Legacy EOSIO-format public key */ toLegacyString(): string; /** Export public key as `elliptic`-format public key */ toPoint(): ProjPointType; /** Get key type from key */ getType(): KeyType; /** Validate a public key */ isValid(): boolean; }