@taquito/signer
Version:
Software signer implementations and signing utilities for Taquito.
43 lines (42 loc) • 1.14 kB
TypeScript
import { SigningKey, PublicKey } from './key-interface';
import { RawSignResult } from '@taquito/core';
type Curve = 'p256' | 'secp256k1';
/**
* Provide signing logic for elliptic curve based key (tz2, tz3)
*/
export declare class ECKey implements SigningKey {
#private;
/**
*
* @param key Encoded private key
* @param decrypt Decrypt function
* @throws InvalidKeyError
*/
constructor(key: string, decrypt?: (k: Uint8Array) => Uint8Array);
/**
*
* @param bytes Bytes to sign
* @param bytesHash Blake2b hash of the bytes to sign
*/
sign(bytes: Uint8Array): RawSignResult;
/**
* @returns Encoded public key
*/
publicKey(): PublicKey;
/**
* @returns Encoded private key
*/
secretKey(): string;
}
export declare class ECPublicKey implements PublicKey {
#private;
readonly curve: Curve;
constructor(src: string);
constructor(src: Uint8Array, curve: Curve);
compare(other: PublicKey): number;
hash(): string;
bytes(compress?: boolean): Uint8Array;
toProtocol(): Uint8Array;
toString(): string;
}
export {};