Commit 859b256
committed
feat: add Solana address creation via WASM
Implement wasm-solana package for Solana address generation using official
Solana SDK crates (solana-pubkey, solana-keypair) compiled to WebAssembly.
This is Phase 1 of replacing JavaScript Solana dependencies to mitigate
npm supply chain attack risks.
Architecture follows wasm-utxo patterns:
- Core types wrap official Solana SDK with extension traits (PubkeyExt, KeypairExt)
- Thin WASM bindings (src/wasm/*.rs) expose types to JavaScript
- TypeScript wrappers (js/*.ts) provide idiomatic camelCase APIs
Components:
- Pubkey: base58 encoding/decoding, is_on_curve() for PDA detection
- Keypair: creation from 32-byte seed or 64-byte Solana secret key format
Build tooling:
- Makefile matching wasm-utxo's wasm-pack workflow
- TypeScript configs for ESM and CJS output
Verified compatibility with BitGoJS sdk-coin-sol test vectors.
Ticket: BTC-29271 parent de6894d commit 859b256
26 files changed
Lines changed: 2312 additions & 9 deletions
File tree
- packages/wasm-solana
- js
- src
- wasm
- test
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments