export interface PublicKey { readonly bytes: Uint8Array; verify: (data: Uint8Array, sig: Uint8Array) => Promise; marshal: () => Uint8Array; equals: (key: PublicKey) => boolean; hash: () => Promise; } /** * Generic private key interface */ export interface PrivateKey { readonly public: PublicKey; readonly bytes: Uint8Array; sign: (data: Uint8Array) => Promise; marshal: () => Uint8Array; equals: (key: PrivateKey) => boolean; hash: () => Promise; /** * Gets the ID of the key. * * The key id is the base58 encoding of the SHA-256 multihash of its public key. * The public key is a protobuf encoding containing a type and the DER encoding * of the PKCS SubjectPublicKeyInfo. */ id: () => Promise; /** * Exports the password protected key in the format specified. */ export: (password: string, format?: 'pkcs-8' | string) => Promise; } export declare const Ed25519 = "Ed25519"; export declare const RSA = "RSA"; export declare const secp256k1 = "secp256k1"; export type KeyType = typeof Ed25519 | typeof RSA | typeof secp256k1; //# sourceMappingURL=index.d.ts.map