@quip.network/solana-sdk
v0.0.1
Published
A quantum-resistant wallet system on Solana using WOTS+ signatures for post-quantum cryptographic security.
Readme
Quip Network Solana Implementation
A quantum-resistant wallet system on Solana using WOTS+ signatures for post-quantum cryptographic security.
Features
- Quantum-Resistant Security: WOTS+ signatures with Keccak256 hashing
- Factory Pattern: Centralized wallet creation and fee management
- Deterministic Addresses: Program Derived Addresses (PDAs)
- Cross-Program Invocation: Execute arbitrary instructions on behalf of wallets
Quick Start
# Clone and install dependencies
git clone <repository-url>
cd quip-anchor
bun install
# Start local validator (in separate terminal)
solana-test-validator --reset
# Build and deploy
anchor build
anchor deploy
# Run tests
anchor testDevelopment Commands
# Build program
anchor build
# Run tests (includes 1000s timeout for WOTS+ operations)
anchor test
anchor test --skip-deploy # Skip redeployment
# Run specific test file
bun run ts-mocha tests/quip-anchor.ts --timeout 1000000
# Linting and formatting
bun run lint # Check formatting
bun run lint:fix # Auto-fix formatting
cargo fmt --manifest-path programs/quip-anchor/Cargo.toml # Format Rust
# Generate TypeScript types after program changes
anchor idl parse programs/quip-anchor/src/lib.rs > target/idl/quip_program.jsonDeployment
Reproducible Builds
rm -rf target/deploy
cargo clean && anchor clean
unset RUSTFLAGS RUSTC_WRAPPER CARGO_INCREMENTAL
export SOURCE_DATE_EPOCH=0
mkdir -p target/deploy && cp quip-program-keypair.json target/deploy/quip_anchor-keypair.json
anchor build --verifiable
cp target/verifiable/quip_anchor.so target/deploy/quip_anchor.soDevnet
solana config set --url https://api.devnet.solana.com
solana airdrop 5
anchor deploy --provider.cluster devnetMainnet
solana config set --url https://api.mainnet-beta.solana.com
anchor deploy --provider.cluster mainnetVerify step
# Verify on-chain program matches local build for devnet
anchor verify -p quip_anchor Quipr1sgzkAgNKZ58yqiiT6AyGJ8sB2Ua6jUabpapJj --provider.cluster devnet
anchor verify -p quip_anchor [Program ID] --provider.cluster devnetPrerequisites
- Rust 1.75+
- Solana CLI v1.18+
- Anchor CLI v0.30+
- Bun (latest)
Architecture
Core Instructions
initialize_factory- Set up global factory configurationcreate_wallet- Create quantum-resistant wallettransfer_with_wots- Transfer SOL using WOTS+ signatureexecute_with_wots- Execute arbitrary instructions with WOTS+ authupdate_fees/withdraw_fees- Admin fee management
Account Structure
- Factory Account: Global configuration at PDA
[b"factory"] - Wallet Accounts: Individual wallets at PDA
[b"wallet", owner, vault_id]
Important Notes
- WOTS+ Keys are ONE-TIME USE - must rotate after each transaction
- Tests use 1000s timeout for complex WOTS+ signature operations
- Uses Keccak256 (SHA-3) for quantum resistance
- Program ID:
Quipr1sgzkAgNKZ58yqiiT6AyGJ8sB2Ua6jUabpapJj
License
AGPL-3.0
