Feat/test vectors package#98
Conversation
…raith-protocol#45) * perf(stellar): prefilter scans with public view tags * test(stellar): cover legacy view-tag scanner
- New packages/test-vectors workspace package - 5 JSON vector files per chain (EVM, Stellar, Solana, CKB) - 100+ vectors per chain covering key derivation, stealth generation, scan match, signing, and encoding - Deterministic generation script from seed 'wraith-test-vectors-v1' - checksum.json with SHA-256 hashes for integrity verification - Comprehensive README with cross-language examples (Rust, Go, Python, Swift) - SDK tests updated to consume vectors - Published as v1.0.0 Closes wraith-protocol#51
|
@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! 🚀 |
|
Test-vectors package structure looks great: README, checksum, generate/verify scripts. But the wave-6 scope is Stellar-only — the git rm packages/test-vectors/scripts/generators/ckb.ts
git rm packages/test-vectors/scripts/generators/evm.ts
git rm packages/test-vectors/scripts/generators/solana.ts
# remove ckb/evm/solana entries from generate.ts and any verify.ts mapping
# remove their checksums from checksum.json
git commit --amend --no-edit
git push --force-with-leaseThe Stellar generator + scaffolding lands clean. Other chains can be added in a future wave. (Also closing #94 since this PR supersedes it.) |
|
this pr close number has been corrected maintainer |
|
@maztah1 — the multi-chain generators ( git rm packages/test-vectors/scripts/generators/ckb.ts
git rm packages/test-vectors/scripts/generators/evm.ts
git rm packages/test-vectors/scripts/generators/solana.ts
# Edit generate.ts to remove the ckb/evm/solana mappings
# Edit checksum.json to remove their entries
git commit --amend --no-edit
git push --force-with-leaseStellar generator + scaffolding lands clean once those are gone. Other chains can come in a future wave. |
closes #51
This PR implements 51 by creating a new
@wraith-protocol/test-vectorspackage that provides deterministic test vectors for cross-language verification of Wraith stealth address cryptography.What's Included
Package Structure
packages/test-vectors/wraith-test-vectors-v1Vector Types (per chain)
Features
pnpm generate)pnpm verify)Chain Coverage
Files Added/Modified
New Files
packages/test-vectors/package.jsonpackages/test-vectors/README.mdpackages/test-vectors/tsconfig.jsonpackages/test-vectors/tsup.config.tspackages/test-vectors/src/types.tspackages/test-vectors/src/index.tspackages/test-vectors/scripts/generate.tspackages/test-vectors/scripts/verify.tspackages/test-vectors/scripts/generators/evm.tspackages/test-vectors/scripts/generators/stellar.tspackages/test-vectors/scripts/generators/solana.tspackages/test-vectors/scripts/generators/ckb.tspackages/test-vectors/vectors/evm.json(293KB)packages/test-vectors/vectors/stellar.json(277KB)packages/test-vectors/vectors/solana.json(273KB)packages/test-vectors/vectors/ckb.json(286KB)packages/test-vectors/checksum.jsontest/vectors/evm.test.tstest/vectors/stellar.test.tsModified Files
pnpm-workspace.yaml- Added workspace configurationpackage.json- Added test-vectors as dev dependencyUsage Examples
TypeScript
```typescript
import { evmVectors } from '@wraith-protocol/test-vectors';
for (const vector of evmVectors.keyDerivation) {
const keys = deriveStealthKeys(vector.signature);
assert(keys.spendingKey === vector.spendingKey);
}
```
Rust
```rust
let data = fs::read_to_string("vectors/evm.json")?;
let vectors: VectorSet = serde_json::from_str(&data)?;
```
Go
```go
data, _ := os.ReadFile("vectors/evm.json")
var vectors VectorSet
json.Unmarshal(data, &vectors)
```
See the README for complete examples in Rust, Go, Python, and Swift.
Testing
All existing tests pass plus 8 new vector validation tests:
```
✓ Test Files 29 passed (29)
Tests 144 passed (144)