UNPKG

@libp2p/crypto

Version:
23 lines 1.04 kB
import { CID } from 'multiformats/cid'; import { type Digest } from 'multiformats/hashes/digest'; import type { Ed25519PublicKey as Ed25519PublicKeyInterface, Ed25519PrivateKey as Ed25519PrivateKeyInterface } from '@libp2p/interface'; import type { Uint8ArrayList } from 'uint8arraylist'; export declare class Ed25519PublicKey implements Ed25519PublicKeyInterface { readonly type = "Ed25519"; readonly raw: Uint8Array; constructor(key: Uint8Array); toMultihash(): Digest<0x0, number>; toCID(): CID<unknown, 114, 0x0, 1>; toString(): string; equals(key?: any): boolean; verify(data: Uint8Array | Uint8ArrayList, sig: Uint8Array): boolean; } export declare class Ed25519PrivateKey implements Ed25519PrivateKeyInterface { readonly type = "Ed25519"; readonly raw: Uint8Array; readonly publicKey: Ed25519PublicKey; constructor(key: Uint8Array, publicKey: Uint8Array); equals(key?: any): boolean; sign(message: Uint8Array | Uint8ArrayList): Uint8Array; } //# sourceMappingURL=ed25519.d.ts.map