UNPKG

@digitalcredentials/ed25519-verification-key-2020

Version:

Javascript library for generating and working with Ed25519VerificationKey2020 key pairs, for use with crypto-ld.

22 lines 820 B
/*! * Copyright (c) 2022 Digital Credentials Consortium. (Conversion to Typescript) * Copyright (c) 2022 Digital Bazaar, Inc. All rights reserved. */ /** * Asserts that key bytes have a type of Uint8Array and a specific length. * * @throws {TypeError|SyntaxError} - Throws a Type or Syntax error. * * @param {object} options - Options to use. * @param {Uint8Array} options.bytes - The bytes being checked. * @param {number} [options.expectedLength=32] - The expected bytes length. * @param {string} [options.code] - An optional code for the error. * * @returns {undefined} Returns on success throws on error. */ export declare function assertKeyBytes({ bytes, expectedLength, code }: { bytes: Uint8Array; expectedLength: number; code?: string; }): void; //# sourceMappingURL=validators.d.ts.map