/** * @pwngh/economy-lab * * Copyright (c) Preston Neal * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ /** * Lowercase hex, hand-written because neither `Buffer` nor `Uint8Array.prototype.toHex` exists on * every target runtime, and the result feeds cross-runtime hashes. * * @see {@link https://economy-lab-docs.pages.dev/economy/concepts/integrity/ Integrity} for the * hash chain these hex helpers feed. */ export declare function toHex(bytes: Uint8Array): string; /** * Decodes a lowercase hex string back into its byte array. * * Throws on an odd length or any non-hex-digit character. Such input is a caller bug to fix at * the source, not a recoverable outcome. */ export declare function fromHex(hex: string): Uint8Array; /** * Encodes a signed bigint as 8 bytes, big-endian two's complement. * * The sum-carrying checkpoint preimages (see chain.ts) hash balance sums, and a hash needs the * same bytes on every runtime: fixed width, fixed byte order, no decimal formatting. Throws when * the value falls outside the signed 64-bit range, the same bound the schema's BIGINT columns * declare — `DataView.setBigInt64` would silently wrap, and a wrapped sum must never reach a hash. */ export declare function toInt64BE(value: bigint): Uint8Array; /** * Orders two strings by raw UTF-16 character codes, returning -1, 0, or 1 like a sort comparator. * * Character-code order through `<` and `>` is identical across runtimes and locales, unlike * `localeCompare`. That keeps any hash or report derived from sorted account ids or keys * matching everywhere. */ export declare function byCodeUnit(a: string, b: string): number;