Feat/test vectors package#98
Open
maztah1 wants to merge 4 commits into
Open
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! 🚀 |
Contributor
|
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.) |
Author
|
this pr close number has been corrected maintainer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #63
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)