-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add solana address creation via WASM #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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-2927
OttoAllmendinger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
OttoAllmendinger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually you need to include the package in the github action test matrix
| "name": "@bitgo/wasm-solana", | ||
| "description": "WebAssembly wrapper for Solana cryptographic operations", | ||
| "version": "0.0.1", | ||
| "type": "module", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have to set this to private: true for now, otherwise we'll break the publish action
Implement the initial wasm-solana package to support Solana address generation using Rust compiled to WebAssembly. This is the first phase of replacing JavaScript Solana dependencies (@solana/web3.js, tweetnacl) with secure Rust implementations to mitigate npm supply chain attack risks.
Architecture follows wasm-utxo patterns:
Components added:
Build tooling:
Verified compatibility with BitGoJS sdk-coin-sol test vectors to ensure byte-identical address derivation from the same secret keys.
Ticket: BTC-2927