From e5a740f891206dafe6c1682748bf38a847a7e4d2 Mon Sep 17 00:00:00 2001 From: Mike Angelo Date: Sun, 16 Feb 2025 17:57:54 -0500 Subject: [PATCH] Commit Commit --- _shortw_utils.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 _shortw_utils.d.ts diff --git a/_shortw_utils.d.ts b/_shortw_utils.d.ts new file mode 100644 index 00000000..2d8acd30 --- /dev/null +++ b/_shortw_utils.d.ts @@ -0,0 +1,16 @@ +import { randomBytes } from '@noble/hashes/utils'; +import { CHash } from './abstract/utils.js'; +import { CurveType, CurveFn } from './abstract/weierstrass.js'; +/** connects noble-curves to noble-hashes */ +export declare function getHash(hash: CHash): { + hash: CHash; + hmac: (key: Uint8Array, ...msgs: Uint8Array[]) => Uint8Array; + randomBytes: typeof randomBytes; +}; +/** Same API as @noble/hashes, with ability to create curve with custom hash */ +export type CurveDef = Readonly>; +export type CurveFnWithCreate = CurveFn & { + create: (hash: CHash) => CurveFn; +}; +export declare function createCurve(curveDef: CurveDef, defHash: CHash): CurveFnWithCreate; +//# sourceMappingURL=_shortw_utils.d.ts.map \ No newline at end of file