Skip to content

Add native TypeScript wallet and transaction library - #1

Merged
yapishu merged 1 commit into
mainfrom
reid/initial-port
Oct 10, 2026
Merged

yapishu merged 1 commit into
mainfrom
reid/initial-port

Conversation

@yapishu

@yapishu yapishu commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Provide a native TypeScript Nockchain V1 library as @swpsco/nockchain, with ESM and bundled declarations for Node and browsers. Protocol amounts, heights, digest limbs and atoms use bigint; private keys use private fields and explicit exports.

Includes wallets and BIP39 recovery; public derivation; Cheetah Schnorr and TIP5; bounded immutable nouns and jam/cue; transaction inspection; complete input-note commitments; coin selection, fees and change; multisig, inclusive timelocks, partial signing and merging. Signature and authenticated input/height validation are explicit separate operations.

The noun design references urbit/nockjs: frozen cells share immutable children, JavaScript GC owns lifetime, equality memoizes pairs, and iterative traversal limits logical expansion. No Go, WASM or Nock VM runtime is required.

The source of truth is Nockchain's Hoon engine at 1eac02083a053c104b6a1299e80a8a51447017dc; the port follows nockchain-go v0.1.0. Public Rust/BIP39 fixtures check 35 wallets, 105 signatures, hashes, nouns and six transactions with exact partial/signed bytes. The separate Hoon corpus checks IDs, complete input commitments and fees.

Validation: all 15 test groups pass; strict TypeScript and formatting checks pass. Includes malformed keys with valid checksums, backreference expansion bounds, immutable reviews, timelock boundaries and wallet/fee cases. A browser bundle executes derivation, transaction verification and random recovery generation without Node globals. The npm tarball installs and derives the expected address in a fresh project. CI covers Node 22 and 24, packing and installation.

Private-key arithmetic is variable-time. The package performs no chain access or broadcasting. Includes documentation, source/declaration maps, security scope and wordlist attribution.

@yapishu
yapishu merged commit a5d8a63 into main Oct 10, 2026
4 checks passed
@yapishu
yapishu deleted the reid/initial-port branch October 10, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant