export declare const webcrypto: Crypto; export declare const sha256: (data: BufferSource) => Promise; export declare const sha512: (data: BufferSource) => Promise; export declare function shasum(algo: `SHA-${'256' | '384' | '512'}`): (data: BufferSource) => Promise; export declare function hmac(hash: `SHA-${'256' | '384' | '512'}`, key: string): (data: string) => Promise; export declare function encode_hex(data: Uint8Array | ArrayBuffer): string; export declare function decode_base64(data: string): Uint8Array; export declare function decode_hex(data: string): Uint8Array; export declare function hex_to_bigint(hex: string): bigint; export declare function buf_to_bigint(source: Uint8Array | ArrayBuffer): bigint; export declare function json(task: Promise): Promise; export declare function text(task: Promise): Promise; export declare function http_get(url: string, agent?: string, signal?: AbortSignal): Promise; export declare function use_signal_abort_controller(): readonly [AbortSignal, (reason?: any) => void, AbortController]; export type TrimmedNonEmptyString = string & { readonly brand: unique symbol; }; export declare function is_TrimmedNonEmptyString(str: unknown): str is TrimmedNonEmptyString; export declare function assert_TrimmedNonEmptyString(str: unknown, cause?: unknown): asserts str is TrimmedNonEmptyString; export declare function mk_TrimmedNonEmptyString(str: unknown): TrimmedNonEmptyString | undefined; export declare function nmap(f: (a: A) => B, a: A | undefined | null): B | undefined; export declare function unwrap(line: string): string; export declare function safe_int({ min, max, }: { min?: number | undefined; max?: number | undefined; }): (n: unknown) => number | undefined;