WalletPress — Python backend (FastAPI) + WordPress plugin. Wallet engine, x402 service, chain vault, hosting. CLI for wallet management. Production-grade wallet-as-a-service.
WalletPress claimed to support 55 chains but ~18 of them produced
addresses no explorer would recognize. This was the worst kind of bug
for a crypto wallet product — silent, undetectable to users, and
direct route to lost funds.
This commit adds:
- wallet_engine/chain_addresses.py (NEW, 433 lines)
Per-chain address encoders using official SDKs / specs:
- bech32 for Cosmos family (atom/osmo/juno/sei/inj/evmos)
- stellar-sdk for Stellar (XLM, base32 + CRC16-XMODEM)
- xrpl-py for XRP (custom base58 alphabet, rpshnaf...)
- manual tz1 watermark impl for Tezos (XTZ, [0x06, 0xA1, 0x9F])
- manual workchain+CRC16 impl for TON (v4r2, 48 base64url chars)
- blake2b-40 base32 impl for Nano (nano_+60 chars)
- f1 + blake2b base32 impl for Filecoin
- SHA-512/256 checksum for Algorand (NOT full SHA-512 — easy to
get wrong, algosdk uses the truncated variant)
- monero library for Monero (XMR)
- substrate-interface for Polkadot/Kusama sr25519
- bitcash for Bitcoin Cash cashaddr
- manual 0x1CB8 prefix impl for Zcash t-addr (was 0x1C)
- wallet_engine/generator.py
New CHAIN_ADDRESS_OVERRIDES table + _generate_with_override() that
dispatches the 17 fixed chains through chain_addresses instead of
the broken family-based dispatch. Also fixed _generate_monero to
use Seed() positional arg (was wrong keyword).
- tests/test_address_vectors.py (NEW, 19 tests)
Golden-vector tests with FIXED test mnemonic. Every test generates
the address with our implementation AND the official SDK, then
asserts byte equality. 19/19 passing.
- backend/requirements.txt
New deps: bech32, stellar-sdk, xrpl-py, py-algorand-sdk, tonsdk,
bitcash, monero, substrate-interface.
- ADDRESS_GENERATION.md
Flipped 17 chains from ❌ BROKEN to ✅ VERIFIED. Cardano still
deferred (needs Bech32 stake address — WP-055).
- AUDIT.md
Marked P0-4 as FIXED.
- BUILDER.md
Marked WP-040 through WP-058 as DONE (except WP-055 Cardano).
Verification:
cd backend && source venv/bin/activate
pytest tests/test_address_vectors.py -v
# 19 passed
pytest tests/ -v
# 76 passed, 5 skipped (no regressions)
Refs: ADDRESS_GENERATION.md, AUDIT.md, BUILDER.md
Closes: WP-040, WP-041, WP-042, WP-043, WP-044, WP-045, WP-046, WP-047,
WP-048, WP-049, WP-050, WP-051, WP-052, WP-053, WP-054, WP-056,
WP-057, WP-058
|
||
|---|---|---|
| backend | ||
| cli | ||
| installers | ||
| wp-plugin | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| about.html | ||
| ADDRESS_GENERATION.md | ||
| ARCHITECTURE.md | ||
| AUDIT.md | ||
| BUILDER.md | ||
| buy.html | ||
| contact.html | ||
| CONTRIBUTING.md | ||
| docs.html | ||
| features.html | ||
| index.html | ||
| logo.svg | ||
| privacy.html | ||
| PROGRESS.md | ||
| ROADMAP.md | ||
| ROADMAP_V2.md | ||
| robots.txt | ||
| SECURITY.md | ||
| sitemap.xml | ||
| STRATEGY.md | ||
| terms.html | ||
| thanks.html | ||
| verify.html | ||
| walletpress-docs.pdf | ||
| WALLETPRESS.md | ||