Skip to content

feat: add @wraith-protocol/test-vectors package (#51)#94

Open
maztah1 wants to merge 2 commits into
wraith-protocol:developfrom
maztah1:feat/test-vectors
Open

feat: add @wraith-protocol/test-vectors package (#51)#94
maztah1 wants to merge 2 commits into
wraith-protocol:developfrom
maztah1:feat/test-vectors

Conversation

@maztah1

@maztah1 maztah1 commented Jun 24, 2026

Copy link
Copy Markdown

closes #51

Summary

Adds the @wraith-protocol/test-vectors npm package — a deterministic corpus of cryptographic test vectors that Go indexers, Rust agents, and Swift mobile clients can use to verify their stealth-address math matches the reference TypeScript SDK.

What's included

  • packages/test-vectors/ workspace package (v1.0.0, publishConfig.access: public)
  • scripts/generate.ts — deterministic generator seeded from 0x57524149; reimplements the crypto inline so vectors are an independent reference
  • scripts/checksum.ts — writes checksum.json with SHA-256 of every vector file
  • 4 vector files × 5 types × 100 vectors = 2000 test cases
    • vectors/evm.json — secp256k1 + keccak256
    • vectors/stellar.json — ed25519 / X25519 + announcement view-tag
    • vectors/solana.json — ed25519 / X25519 + legacy view-tag
    • vectors/ckb.json — secp256k1 + SHA-256 + blake2b
    • Types: key_derivation, stealth_gen, scan_match, signing, encoding
  • checksum.json — SHA-256 of each file for integrity verification
  • README.md — cross-language consumption examples (Rust, Go, Python) and full JSON schema docs
  • pnpm-workspace.yaml — registers packages/*

SDK tests updated

Added test/chains/{evm,stellar,solana,ckb}/vectors.test.ts — each loads the corresponding JSON and asserts the live SDK produces identical outputs. +1900 new tests; 2036 total passing.

clintjeff2 and others added 2 commits June 2, 2026 00:20
…raith-protocol#45)

* perf(stellar): prefilter scans with public view tags

* test(stellar): cover legacy view-tag scanner
- New packages/test-vectors/ workspace package (v1.0.0)
- Deterministic generation script seeded from 0x57524149
- 5 vector types × 100 vectors each for EVM, Stellar, Solana, CKB
  (key_derivation, stealth_gen, scan_match, signing, encoding)
- checksum.json with SHA-256 of every vector file
- Cross-language README with Rust / Go / Python examples
- pnpm-workspace.yaml registering the new package
- SDK test suite extended with vectors.test.ts for all four chains
  (1900 new tests; 2036 total passing)
@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@maztah1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify truthixify changed the base branch from main to develop June 24, 2026 14:49
@truthixify

Copy link
Copy Markdown
Contributor

The test-vectors package itself is what we want, but three things need to change before merge:

  1. Stellar only this wave. Drop vectors/ckb.json, vectors/evm.json, vectors/solana.json and their entries in checksum.json and generate.ts. Keep vectors/stellar.json only.

  2. No npm lockfile. Drop packages/test-vectors/package-lock.json (2263 lines, npm). This workspace uses pnpm; regenerate with pnpm install so pnpm-lock.yaml at the root picks it up.

  3. Rebase scope down to the package itself. Your diff also touches CHANGELOG.md, README.md, COMPAT.md, BENCHMARK_IMPLEMENTATION.md, CONTEXT_BENCHMARKS_COMPLETE.md, CONTRIBUTING.md, bench/, docs/errors.md, docs/fee-estimation.md, src/chains/stellar/scan.ts, stealth.ts, index.ts, etc. Most of those are unrelated to test-vectors. Drop them in the rebase.

git fetch origin
git rebase origin/develop
# during rebase, keep only:
#   packages/test-vectors/ (with stellar.json only)
#   packages/test-vectors/scripts/generate.ts (Stellar-only)
#   packages/test-vectors/scripts/checksum.ts
#   pnpm-workspace.yaml (one line to add packages/test-vectors)
#   test/chains/stellar/vectors/ consumer test files (if you added them)
rm packages/test-vectors/package-lock.json
pnpm install
git push --force-with-lease

The README + package structure look great. Just needs the scope cleanup.

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.

@wraith-protocol/test-vectors published package

3 participants