UNPKG

@taquito/signer

Version:

Software signer implementations and signing utilities for Taquito.

40 lines (39 loc) 1.06 kB
import { SigningKey, PublicKey } from './key-interface'; import { RawSignResult } from '@taquito/core'; /** * Provide signing logic for ed25519 curve based key (tz1) */ export declare class EdKey implements SigningKey { #private; /** * * @param key Encoded private key * @param encrypted Is the private key encrypted * @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 EdPublicKey implements PublicKey { #private; constructor(src: string | Uint8Array); compare(other: PublicKey): number; hash(): string; bytes(): Uint8Array; toProtocol(): Uint8Array; toString(): string; }