UNPKG

functionalscript

Version:

FunctionalScript is a purely functional subset of JavaScript

19 lines (18 loc) 810 B
import type { Array2 } from '../../types/array/module.f.ts'; import { type Vec } from '../../types/bit_vec/module.f.ts'; import type { Curve } from '../secp/module.f.ts'; import { type Sha2 } from '../sha2/module.f.ts'; export type All = { readonly q: bigint; readonly qlen: bigint; readonly bits2int: (b: Vec) => bigint; readonly int2octets: (x: bigint) => Vec; readonly bits2octets: (b: Vec) => Vec; }; export declare const all: (q: bigint) => All; export declare const fromCurve: (c: Curve) => All; export declare const concat: (...x: readonly Vec[]) => Vec; export declare const computeK: (_: All) => (_: Sha2) => (x: bigint) => (m: Vec) => bigint; type Signature = Array2<bigint>; export declare const sign: (c: Curve) => (hf: Sha2) => (x: bigint) => (m: Vec) => Signature; export {};