@digitalcredentials/ed25519-verification-key-2020
Version:
Javascript library for generating and working with Ed25519VerificationKey2020 key pairs, for use with crypto-ld.
27 lines • 1.06 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
interface EdKeyPair {
publicKey: Uint8Array;
secretKey: Uint8Array;
}
/**
* Generates a key using a 32 byte Uint8Array.
*
* @param {Uint8Array} seedBytes - The bytes for the private key.
*
* @returns {object} The object with the public and private key material.
*/
declare function generateKeyPairFromSeed(seedBytes: Uint8Array): Promise<EdKeyPair>;
declare function generateKeyPair(): Promise<EdKeyPair>;
declare function signData(privateKeyBytes: Uint8Array, data: Uint8Array): Promise<Buffer>;
declare function verifyData(publicKeyBytes: Uint8Array, data: Uint8Array, signature: Uint8Array): Promise<boolean>;
declare function sha256digest(data: Uint8Array | string): Promise<Uint8Array>;
declare const _default: {
generateKeyPairFromSeed: typeof generateKeyPairFromSeed;
generateKeyPair: typeof generateKeyPair;
sign: typeof signData;
verify: typeof verifyData;
sha256digest: typeof sha256digest;
};
export default _default;
//# sourceMappingURL=ed25519.d.ts.map