Wallet Setup Guide
This guide walks you through setting up a quantum-insured Bitcoin wallet
using the Quantroot soft-fork implementation. All commands use
bitcoin-cli on regtest.
1. Create a Wallet
2. Create a SPHINCS+ Key
Derives a SPHINCS+ keypair from the wallet's master key and registers a quantum-insured descriptor. The key is deterministic — recoverable from the wallet seed.
3. Generate a Quantum-Insured Address
Addresses use a hybrid tapleaf: both Schnorr and SPHINCS+ signatures are required in the emergency spending path. Normal spending uses efficient key-path (~64 bytes).
The address is a standard Taproot (bech32m) address — indistinguishable from any other Taproot output on-chain.
4. Export the Quantum-Insured Extended Key
Export a qpub for watch-only
wallets, or qprv for full
backup. Both encode the BIP 32 key hierarchy plus the SPHINCS+ key.
5. Import into a Watch-Only Wallet
A watch-only wallet tracks incoming payments to all QI addresses derived from the qpub, without access to private keys.
Hybrid Script Anatomy
Each quantum-insured address contains a single hybrid tapleaf:
Key-path spend with Schnorr signature (~64 bytes). The hybrid leaf is never revealed.
Script-path spend requiring both SPHINCS+ and Schnorr signatures. An attacker must break both.
Available RPCs
| Command | Description |
|---|---|
| createsphincskey | Derive SPHINCS+ key and register QI descriptor |
| getquantumaddress | Derive a quantum-insured Taproot address |
| listsphincskeys | List all SPHINCS+ keys in the wallet |
| exportqpub | Export quantum-insured extended public key (Q1...) |
| importqpub | Import qpub as watch-only QI descriptor |
| exportqprv | Export quantum-insured extended private key |
| importqprv | Import qprv with full signing capability |
6. Quantum-Insured Extended Keys
The qpub and qprv
formats extend BIP 32 extended keys with SPHINCS+ key material, enabling
watch-only wallets and full backups.
| Format | Size | Prefix | Contains |
|---|---|---|---|
| qpub | 110 bytes | Q1... / T4... | BIP 32 xpub + 32B SPHINCS+ pubkey |
| qprv | 142 bytes | Q1... / T5... | BIP 32 xprv + 64B SPHINCS+ secret |
A watch-only wallet holding a qpub can
derive all quantum-insured addresses without private key access.
7. Seed-Derived SPHINCS+ Keys
The SPHINCS+ key is derived deterministically from the wallet's master extended key, so your mnemonic phrase is the only backup you need.
Account path: m/395'/coin_type'/account'.
One SPHINCS+ key per account. Stateless — key reuse does not weaken security.
8. Encrypted Wallet Support
| Operation | Locked | Unlocked |
|---|---|---|
| createsphincskey | Fails | Works |
| listsphincskeys | Works | Works |
| getquantumaddress | Works | Works |
| exportqpub | Works | Works |
| exportqprv | Fails | Works |
| Spending | Fails | Works |
9. Descriptor Syntax
The qr() descriptor is a drop-in replacement
for tr() that auto-constructs the hybrid
SPHINCS+ tapleaf from a qpub.
For advanced use with custom Taproot trees, the qis()
fragment is also available:
Both expand to the same hybrid script:
When registered as the active BECH32M descriptor,
getnewaddress bech32m automatically
produces quantum-insured addresses.