API — Overview

The public surface is intentionally small:

  • new UldaSign(cfg?) — construct a signer/validator.
  • await New(idx = 0n) — generate the first (or any-index) Origin package.
  • await stepUp(originPkg) — produce the next Origin from an existing one.
  • await sign(originPkg) — compute the Signature package for an Origin.
  • await verify(sigA, sigB)true iff sigB is the direct successor of sigA (S: gap 1…N−1; X: gap = 1).
  • await UldaSign.loadScriptOnce(url) — idempotent helper to preload external hash scripts (for custom digests).

Async everywhere: All heavy work (randomness, hashing, network scripts) is async. Always await.