@noble/post-quantum 0.5.4 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/utils.d.ts CHANGED
@@ -3,65 +3,298 @@
3
3
  * @module
4
4
  */
5
5
  /*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
6
- import { type CHash, type TypedArray, concatBytes, randomBytes as randb } from '@noble/hashes/utils.js';
7
- export { abytes } from '@noble/hashes/utils.js';
8
- export { concatBytes };
6
+ import { type CHash, type TypedArray, abytes, concatBytes, randomBytes as randb } from '@noble/hashes/utils.js';
7
+ /**
8
+ * Bytes API type helpers for old + new TypeScript.
9
+ *
10
+ * TS 5.6 has `Uint8Array`, while TS 5.9+ made it generic `Uint8Array<ArrayBuffer>`.
11
+ * We can't use specific return type, because TS 5.6 will error.
12
+ * We can't use generic return type, because most TS 5.9 software will expect specific type.
13
+ *
14
+ * Maps typed-array input leaves to broad forms.
15
+ * These are compatibility adapters, not ownership guarantees.
16
+ *
17
+ * - `TArg` keeps byte inputs broad.
18
+ * - `TRet` marks byte outputs for TS 5.6 and TS 5.9+ compatibility.
19
+ */
20
+ export type TypedArg<T> = T extends BigInt64Array ? BigInt64Array : T extends BigUint64Array ? BigUint64Array : T extends Float32Array ? Float32Array : T extends Float64Array ? Float64Array : T extends Int16Array ? Int16Array : T extends Int32Array ? Int32Array : T extends Int8Array ? Int8Array : T extends Uint16Array ? Uint16Array : T extends Uint32Array ? Uint32Array : T extends Uint8ClampedArray ? Uint8ClampedArray : T extends Uint8Array ? Uint8Array : never;
21
+ /** Maps typed-array output leaves to narrow TS-compatible forms. */
22
+ export type TypedRet<T> = T extends BigInt64Array ? ReturnType<typeof BigInt64Array.of> : T extends BigUint64Array ? ReturnType<typeof BigUint64Array.of> : T extends Float32Array ? ReturnType<typeof Float32Array.of> : T extends Float64Array ? ReturnType<typeof Float64Array.of> : T extends Int16Array ? ReturnType<typeof Int16Array.of> : T extends Int32Array ? ReturnType<typeof Int32Array.of> : T extends Int8Array ? ReturnType<typeof Int8Array.of> : T extends Uint16Array ? ReturnType<typeof Uint16Array.of> : T extends Uint32Array ? ReturnType<typeof Uint32Array.of> : T extends Uint8ClampedArray ? ReturnType<typeof Uint8ClampedArray.of> : T extends Uint8Array ? ReturnType<typeof Uint8Array.of> : never;
23
+ /** Recursively adapts byte-carrying API input types. See {@link TypedArg}. */
24
+ export type TArg<T> = T | ([TypedArg<T>] extends [never] ? T extends (...args: infer A) => infer R ? ((...args: {
25
+ [K in keyof A]: TRet<A[K]>;
26
+ }) => TArg<R>) & {
27
+ [K in keyof T]: T[K] extends (...args: any) => any ? T[K] : TArg<T[K]>;
28
+ } : T extends [infer A, ...infer R] ? [TArg<A>, ...{
29
+ [K in keyof R]: TArg<R[K]>;
30
+ }] : T extends readonly [infer A, ...infer R] ? readonly [TArg<A>, ...{
31
+ [K in keyof R]: TArg<R[K]>;
32
+ }] : T extends (infer A)[] ? TArg<A>[] : T extends readonly (infer A)[] ? readonly TArg<A>[] : T extends Promise<infer A> ? Promise<TArg<A>> : T extends object ? {
33
+ [K in keyof T]: TArg<T[K]>;
34
+ } : T : TypedArg<T>);
35
+ /** Recursively adapts byte-carrying API output types. See {@link TypedArg}. */
36
+ export type TRet<T> = T extends unknown ? T & ([TypedRet<T>] extends [never] ? T extends (...args: infer A) => infer R ? ((...args: {
37
+ [K in keyof A]: TArg<A[K]>;
38
+ }) => TRet<R>) & {
39
+ [K in keyof T]: T[K] extends (...args: any) => any ? T[K] : TRet<T[K]>;
40
+ } : T extends [infer A, ...infer R] ? [TRet<A>, ...{
41
+ [K in keyof R]: TRet<R[K]>;
42
+ }] : T extends readonly [infer A, ...infer R] ? readonly [TRet<A>, ...{
43
+ [K in keyof R]: TRet<R[K]>;
44
+ }] : T extends (infer A)[] ? TRet<A>[] : T extends readonly (infer A)[] ? readonly TRet<A>[] : T extends Promise<infer A> ? Promise<TRet<A>> : T extends object ? {
45
+ [K in keyof T]: TRet<T[K]>;
46
+ } : T : TypedRet<T>) : never;
47
+ /**
48
+ * Asserts that a value is a byte array and optionally checks its length.
49
+ * Returns the original reference unchanged on success, and currently also accepts Node `Buffer`
50
+ * values through the upstream validator.
51
+ * This helper throws on malformed input, so APIs that must return `false` need to guard lengths
52
+ * before decoding or before calling it.
53
+ * @example
54
+ * Validate that a value is a byte array with the expected length.
55
+ * ```ts
56
+ * abytes(new Uint8Array([1]), 1);
57
+ * ```
58
+ */
59
+ declare const abytesDoc: typeof abytes;
60
+ export { abytesDoc as abytes };
61
+ /**
62
+ * Concatenates byte arrays into a new `Uint8Array`.
63
+ * Zero arguments return an empty `Uint8Array`.
64
+ * Invalid segments throw before allocation because each argument is validated first.
65
+ * @example
66
+ * Concatenate two byte arrays into one result.
67
+ * ```ts
68
+ * concatBytes(new Uint8Array([1]), new Uint8Array([2]));
69
+ * ```
70
+ */
71
+ declare const concatBytesDoc: typeof concatBytes;
72
+ export { concatBytesDoc as concatBytes };
73
+ /**
74
+ * Returns cryptographically secure random bytes.
75
+ * Requires `globalThis.crypto.getRandomValues` and throws if that API is unavailable.
76
+ * `bytesLength` is validated by the upstream helper as a non-negative integer before allocation,
77
+ * so negative and fractional values both throw instead of truncating through JS `ToIndex`.
78
+ * @param bytesLength - Number of random bytes to generate.
79
+ * @returns Fresh random bytes.
80
+ * @example
81
+ * Generate a fresh random seed.
82
+ * ```ts
83
+ * const seed = randomBytes(4);
84
+ * ```
85
+ */
9
86
  export declare const randomBytes: typeof randb;
10
- export declare function equalBytes(a: Uint8Array, b: Uint8Array): boolean;
11
- export declare function copyBytes(bytes: Uint8Array): Uint8Array;
87
+ /**
88
+ * Compares two byte arrays in a length-constant way for equal lengths.
89
+ * Unequal lengths return `false` immediately, and there is no runtime type validation.
90
+ * @param a - First byte array.
91
+ * @param b - Second byte array.
92
+ * @returns Whether both arrays contain the same bytes.
93
+ * @example
94
+ * Compare two byte arrays for equality.
95
+ * ```ts
96
+ * equalBytes(new Uint8Array([1]), new Uint8Array([1]));
97
+ * ```
98
+ */
99
+ export declare function equalBytes(a: TArg<Uint8Array>, b: TArg<Uint8Array>): boolean;
100
+ /**
101
+ * Copies bytes into a fresh `Uint8Array`.
102
+ * Returns a detached plain `Uint8Array` after validating that the input is real bytes.
103
+ * @param bytes - Source bytes.
104
+ * @returns Copy of the input bytes.
105
+ * @example
106
+ * Copy bytes into a fresh array.
107
+ * ```ts
108
+ * copyBytes(new Uint8Array([1, 2]));
109
+ * ```
110
+ */
111
+ export declare function copyBytes(bytes: TArg<Uint8Array>): TRet<Uint8Array>;
112
+ /**
113
+ * Byte-swaps each 64-bit lane in place.
114
+ * Falcon's exact binary64 tables are stored as little-endian byte payloads, so BE runtimes need
115
+ * this boundary helper before aliasing them as host `Float64Array` lanes.
116
+ * @param arr - Byte buffer whose length is a multiple of 8.
117
+ * @returns The same buffer after in-place 64-bit lane byte swaps.
118
+ * @example
119
+ * Byte-swap one 64-bit lane in place.
120
+ * ```ts
121
+ * byteSwap64(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]));
122
+ * ```
123
+ */
124
+ export declare function byteSwap64<T extends ArrayBufferView>(arr: T): T;
125
+ /**
126
+ * Byte-swaps 64-bit lanes on big-endian runtimes and returns the input unchanged on little-endian.
127
+ * This keeps Falcon's binary64 tables in canonical little-endian order before aliasing them as
128
+ * `Float64Array` lanes on the current host.
129
+ * @param arr - Buffer to pass through or swap in place.
130
+ * @returns The same buffer, normalized for Falcon's little-endian table layout.
131
+ * @example
132
+ * Normalize one host-endian buffer for Falcon's float tables.
133
+ * ```ts
134
+ * baswap64If(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]));
135
+ * ```
136
+ */
137
+ export declare const baswap64If: <T extends ArrayBufferView>(arr: T) => T;
138
+ /** Shared key-generation surface for signers and KEMs. */
12
139
  export type CryptoKeys = {
140
+ /** Optional metadata about the algorithm family or variant. */
13
141
  info?: {
14
142
  type?: string;
15
143
  };
144
+ /** Public byte lengths for the exported key material. */
16
145
  lengths: {
17
146
  seed?: number;
18
147
  publicKey?: number;
19
148
  secretKey?: number;
20
149
  };
21
- keygen: (seed?: Uint8Array) => {
22
- secretKey: Uint8Array;
23
- publicKey: Uint8Array;
150
+ /**
151
+ * Generate one secret/public keypair.
152
+ * @param seed - Optional seed bytes for deterministic key generation.
153
+ * @returns Fresh secret/public keypair.
154
+ */
155
+ keygen: (seed?: TArg<Uint8Array>) => {
156
+ secretKey: TRet<Uint8Array>;
157
+ publicKey: TRet<Uint8Array>;
24
158
  };
25
- getPublicKey: (secretKey: Uint8Array) => Uint8Array;
159
+ /**
160
+ * Derive one public key from a secret key.
161
+ * @param secretKey - Secret key bytes.
162
+ * @returns Public key bytes.
163
+ */
164
+ getPublicKey: (secretKey: TArg<Uint8Array>) => TRet<Uint8Array>;
26
165
  };
166
+ /** Verification options shared by the signature APIs. */
27
167
  export type VerOpts = {
168
+ /** Optional application-defined context string. */
28
169
  context?: Uint8Array;
29
170
  };
171
+ /** Signing options shared by the signature APIs. */
30
172
  export type SigOpts = VerOpts & {
173
+ /** Optional extra entropy or `false` to disable randomized signing. */
31
174
  extraEntropy?: Uint8Array | false;
32
175
  };
176
+ /**
177
+ * Validates that an options bag is a plain object.
178
+ * @param opts - Options object to validate.
179
+ * @throws On wrong argument types. {@link TypeError}
180
+ * @example
181
+ * Validate that an options bag is a plain object.
182
+ * ```ts
183
+ * validateOpts({});
184
+ * ```
185
+ */
33
186
  export declare function validateOpts(opts: object): void;
34
- export declare function validateVerOpts(opts: VerOpts): void;
35
- export declare function validateSigOpts(opts: SigOpts): void;
36
- /** Generic interface for signatures. Has keygen, sign and verify. */
187
+ /**
188
+ * Validates common verification options.
189
+ * `context` itself is validated with `abytes(...)`, and individual algorithms may narrow support
190
+ * further after this shared plain-object gate.
191
+ * @param opts - Verification options. See {@link VerOpts}.
192
+ * @throws On wrong argument types. {@link TypeError}
193
+ * @example
194
+ * Validate common verification options.
195
+ * ```ts
196
+ * validateVerOpts({ context: new Uint8Array([1]) });
197
+ * ```
198
+ */
199
+ export declare function validateVerOpts(opts: TArg<VerOpts>): void;
200
+ /**
201
+ * Validates common signing options.
202
+ * `extraEntropy` is validated with `abytes(...)`; exact lengths and extra algorithm-specific
203
+ * restrictions are enforced later by callers.
204
+ * @param opts - Signing options. See {@link SigOpts}.
205
+ * @throws On wrong argument types. {@link TypeError}
206
+ * @example
207
+ * Validate common signing options.
208
+ * ```ts
209
+ * validateSigOpts({ extraEntropy: new Uint8Array([1]) });
210
+ * ```
211
+ */
212
+ export declare function validateSigOpts(opts: TArg<SigOpts>): void;
213
+ /** Generic signature interface with key generation, signing, and verification. */
37
214
  export type Signer = CryptoKeys & {
215
+ /** Public byte lengths for signatures and signing randomness. */
38
216
  lengths: {
39
217
  signRand?: number;
40
218
  signature?: number;
41
219
  };
42
- sign: (msg: Uint8Array, secretKey: Uint8Array, opts?: SigOpts) => Uint8Array;
43
- verify: (sig: Uint8Array, msg: Uint8Array, publicKey: Uint8Array, opts?: VerOpts) => boolean;
220
+ /**
221
+ * Sign one message.
222
+ * @param msg - Message bytes to sign.
223
+ * @param secretKey - Secret key bytes.
224
+ * @param opts - Optional signing options.
225
+ * @returns Signature bytes.
226
+ */
227
+ sign: (msg: TArg<Uint8Array>, secretKey: TArg<Uint8Array>, opts?: TArg<SigOpts>) => TRet<Uint8Array>;
228
+ /**
229
+ * Verify one signature.
230
+ * @param sig - Signature bytes.
231
+ * @param msg - Signed message bytes.
232
+ * @param publicKey - Public key bytes.
233
+ * @param opts - Optional verification options.
234
+ * @returns `true` when the signature is valid, `false` when all inputs are well-formed but the
235
+ * signature check does not pass. Some implementations also treat malformed signature encodings as
236
+ * a verification failure and return `false`.
237
+ * @throws On malformed API arguments or unsupported verification options.
238
+ */
239
+ verify: (sig: TArg<Uint8Array>, msg: TArg<Uint8Array>, publicKey: TArg<Uint8Array>, opts?: TArg<VerOpts>) => boolean;
44
240
  };
241
+ /** Generic key encapsulation mechanism interface. */
45
242
  export type KEM = CryptoKeys & {
243
+ /** Public byte lengths for ciphertexts and optional message randomness. */
46
244
  lengths: {
47
245
  cipherText?: number;
48
246
  msg?: number;
49
247
  msgRand?: number;
50
248
  };
51
- encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
52
- cipherText: Uint8Array;
53
- sharedSecret: Uint8Array;
249
+ /**
250
+ * Encapsulate one shared secret to a recipient public key.
251
+ * @param publicKey - Recipient public key bytes.
252
+ * @param msg - Optional caller-provided randomness/message seed.
253
+ * @returns Ciphertext plus shared secret.
254
+ */
255
+ encapsulate: (publicKey: TArg<Uint8Array>, msg?: TArg<Uint8Array>) => {
256
+ cipherText: TRet<Uint8Array>;
257
+ sharedSecret: TRet<Uint8Array>;
54
258
  };
55
- decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
259
+ /**
260
+ * Recover the shared secret from a ciphertext and recipient secret key.
261
+ * @param cipherText - Ciphertext bytes.
262
+ * @param secretKey - Recipient secret key bytes.
263
+ * @returns Decapsulated shared secret.
264
+ */
265
+ decapsulate: (cipherText: TArg<Uint8Array>, secretKey: TArg<Uint8Array>) => TRet<Uint8Array>;
56
266
  };
267
+ /** Bidirectional encoder/decoder interface. */
57
268
  export interface Coder<F, T> {
269
+ /**
270
+ * Serialize one value.
271
+ * @param from - Value to encode.
272
+ * @returns Encoded representation.
273
+ */
58
274
  encode(from: F): T;
275
+ /**
276
+ * Parse one serialized value.
277
+ * @param to - Encoded representation.
278
+ * @returns Decoded value.
279
+ */
59
280
  decode(to: T): F;
60
281
  }
282
+ /** Encoder/decoder interface specialized for byte arrays. */
61
283
  export interface BytesCoder<T> extends Coder<T, Uint8Array> {
284
+ /**
285
+ * Serialize one value into bytes.
286
+ * @param data - Value to encode.
287
+ * @returns Encoded bytes.
288
+ */
62
289
  encode: (data: T) => Uint8Array;
290
+ /**
291
+ * Parse one byte array into a value.
292
+ * @param bytes - Encoded bytes.
293
+ * @returns Decoded value.
294
+ */
63
295
  decode: (bytes: Uint8Array) => T;
64
296
  }
297
+ /** Fixed-length byte encoder/decoder. */
65
298
  export type BytesCoderLen<T> = BytesCoder<T> & {
66
299
  bytesLen: number;
67
300
  };
@@ -69,14 +302,119 @@ type UnCoder<T> = T extends BytesCoder<infer U> ? U : never;
69
302
  type SplitOut<T extends (number | BytesCoderLen<any>)[]> = {
70
303
  [K in keyof T]: T[K] extends number ? Uint8Array : UnCoder<T[K]>;
71
304
  };
72
- export declare function splitCoder<T extends (number | BytesCoderLen<any>)[]>(label: string, ...lengths: T): BytesCoder<SplitOut<T>> & {
305
+ /**
306
+ * Builds a fixed-layout coder from byte lengths and nested coders.
307
+ * Raw-length fields decode as zero-copy `subarray(...)` views, and nested coders may preserve that
308
+ * aliasing too. Nested coder `encode(...)` results are treated as owned scratch: `splitCoder`
309
+ * copies them into the output and then zeroizes them with `fill(0)`. If a nested encoder forwards
310
+ * caller-owned bytes, it must do so only after detaching them into a disposable copy.
311
+ * @param label - Label used in validation errors.
312
+ * @param lengths - Field lengths or nested coders.
313
+ * @returns Composite fixed-length coder.
314
+ * @example
315
+ * Build a fixed-layout coder from byte lengths and nested coders.
316
+ * ```ts
317
+ * splitCoder('demo', 1, 2).encode([new Uint8Array([1]), new Uint8Array([2, 3])]);
318
+ * ```
319
+ */
320
+ export declare function splitCoder<T extends (number | BytesCoderLen<any>)[]>(label: string, ...lengths: T): TRet<BytesCoder<SplitOut<T>> & {
73
321
  bytesLen: number;
74
- };
75
- export declare function vecCoder<T>(c: BytesCoderLen<T>, vecLen: number): BytesCoderLen<T[]>;
322
+ }>;
323
+ /**
324
+ * Builds a fixed-length vector coder from another fixed-length coder.
325
+ * Element decoding receives `subarray(...)` views, so aliasing depends on the element coder.
326
+ * Element coder `encode(...)` results are treated as owned scratch: `vecCoder` copies them into
327
+ * the output and then zeroizes them with `fill(0)`. If an element encoder forwards caller-owned
328
+ * bytes, it must do so only after detaching them into a disposable copy. `vecCoder` also trusts
329
+ * the `BytesCoderLen` contract: each encoded element must already be exactly `c.bytesLen` bytes.
330
+ * @param c - Element coder.
331
+ * @param vecLen - Number of elements in the vector.
332
+ * @returns Fixed-length vector coder.
333
+ * @example
334
+ * Build a fixed-length vector coder from another fixed-length coder.
335
+ * ```ts
336
+ * vecCoder(
337
+ * { bytesLen: 1, encode: (n: number) => Uint8Array.of(n), decode: (b: Uint8Array) => b[0] || 0 },
338
+ * 2
339
+ * ).encode([1, 2]);
340
+ * ```
341
+ */
342
+ export declare function vecCoder<T>(c: TArg<BytesCoderLen<T>>, vecLen: number): TRet<BytesCoderLen<T[]>>;
343
+ /**
344
+ * Overwrites supported typed-array inputs with zeroes in place.
345
+ * Accepts direct typed arrays and one-level arrays of them.
346
+ * @param list - Typed arrays or one-level lists of typed arrays to clear.
347
+ * @example
348
+ * Overwrite typed arrays with zeroes.
349
+ * ```ts
350
+ * const buf = Uint8Array.of(1, 2, 3);
351
+ * cleanBytes(buf);
352
+ * ```
353
+ */
76
354
  export declare function cleanBytes(...list: (TypedArray | TypedArray[])[]): void;
355
+ /**
356
+ * Creates a 32-bit mask with the lowest `bits` bits set.
357
+ * @param bits - Number of low bits to keep.
358
+ * @returns Bit mask with `bits` ones.
359
+ * @throws On wrong argument ranges or values. {@link RangeError}
360
+ * @example
361
+ * Create a low-bit mask for packed-field operations.
362
+ * ```ts
363
+ * const mask = getMask(4);
364
+ * ```
365
+ */
77
366
  export declare function getMask(bits: number): number;
78
- export declare const EMPTY: Uint8Array;
79
- export declare function getMessage(msg: Uint8Array, ctx?: Uint8Array): Uint8Array;
367
+ /** Shared empty byte array used as the default context. */
368
+ export declare const EMPTY: TRet<Uint8Array>;
369
+ /**
370
+ * Builds the domain-separated message payload for the pure sign/verify paths.
371
+ * Context length `255` is valid; only `ctx.length > 255` is rejected.
372
+ * @param msg - Message bytes.
373
+ * @param ctx - Optional context bytes.
374
+ * @returns Domain-separated message payload.
375
+ * @throws On wrong argument ranges or values. {@link RangeError}
376
+ * @example
377
+ * Build the domain-separated payload before direct signing.
378
+ * ```ts
379
+ * const payload = getMessage(new Uint8Array([1, 2]));
380
+ * ```
381
+ */
382
+ export declare function getMessage(msg: TArg<Uint8Array>, ctx?: TArg<Uint8Array>): TRet<Uint8Array>;
383
+ /**
384
+ * Validates that a hash exposes a NIST hash OID and enough collision resistance.
385
+ * Current accepted surface is broader than the FIPS algorithm tables: any hash/XOF under the NIST
386
+ * `2.16.840.1.101.3.4.2.*` subtree is accepted if its effective `outputLen` is strong enough.
387
+ * XOF callers must pass a callable whose `outputLen` matches the digest length they actually intend
388
+ * to sign; bare `shake128` / `shake256` defaults are too short for the stronger prehash modes.
389
+ * @param hash - Hash function to validate.
390
+ * @param requiredStrength - Minimum required collision-resistance strength in bits.
391
+ * @throws If the hash metadata or collision resistance is insufficient. {@link Error}
392
+ * @example
393
+ * Validate that a hash exposes a NIST hash OID and enough collision resistance.
394
+ * ```ts
395
+ * import { sha256 } from '@noble/hashes/sha2.js';
396
+ * import { checkHash } from '@noble/post-quantum/utils.js';
397
+ * checkHash(sha256, 128);
398
+ * ```
399
+ */
80
400
  export declare function checkHash(hash: CHash, requiredStrength?: number): void;
81
- export declare function getMessagePrehash(hash: CHash, msg: Uint8Array, ctx?: Uint8Array): Uint8Array;
401
+ /**
402
+ * Builds the domain-separated prehash payload for the prehash sign/verify paths.
403
+ * Callers are expected to vet `hash.oid` first, e.g. via `checkHash(...)`; calling this helper
404
+ * directly with a hash object that lacks `oid` currently throws later inside `concatBytes(...)`.
405
+ * Context length `255` is valid; only `ctx.length > 255` is rejected.
406
+ * @param hash - Prehash function.
407
+ * @param msg - Message bytes.
408
+ * @param ctx - Optional context bytes.
409
+ * @returns Domain-separated prehash payload.
410
+ * @throws On wrong argument ranges or values. {@link RangeError}
411
+ * @example
412
+ * Build the domain-separated prehash payload for external hashing.
413
+ * ```ts
414
+ * import { sha256 } from '@noble/hashes/sha2.js';
415
+ * import { getMessagePrehash } from '@noble/post-quantum/utils.js';
416
+ * getMessagePrehash(sha256, new Uint8Array([1, 2]));
417
+ * ```
418
+ */
419
+ export declare function getMessagePrehash(hash: CHash, msg: TArg<Uint8Array>, ctx?: TArg<Uint8Array>): TRet<Uint8Array>;
82
420
  //# sourceMappingURL=utils.d.ts.map
package/utils.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,4EAA4E;AAC5E,OAAO,EACL,KAAK,KAAK,EACV,KAAK,UAAU,EAGf,WAAW,EAEX,WAAW,IAAI,KAAK,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,eAAO,MAAM,WAAW,EAAE,OAAO,KAAa,CAAC;AAG/C,wBAAgB,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAKhE;AAGD,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAEvD;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,OAAO,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,KAAK;QAAE,SAAS,EAAE,UAAU,CAAC;QAAC,SAAS,EAAE,UAAU,CAAA;KAAE,CAAC;IAChF,YAAY,EAAE,CAAC,SAAS,EAAE,UAAU,KAAK,UAAU,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG;IAE9B,YAAY,CAAC,EAAE,UAAU,GAAG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