Skip to content

Address Scheme

Soqucoin uses Bech32m addresses at witness version 1. Every address encodes a SHA-256 hash of a Dilithium (ML-DSA-44) public key, making all Soqucoin addresses quantum-resistant from genesis.

Address format

The witness program is the 32-byte SHA-256 of the public key, encoded as Bech32m at witness version 1. The version-1 witness encodes to the character p immediately after the 1 separator, so mainnet addresses look like:

sq1p[bech32m data]

Prefix convention

The human-readable part (HRP) is the only per-network difference; the witness version (p) is the same everywhere.

Network HRP Example prefix Status
Mainnet sq sq1p... live since 13 October 2026
Stagenet ssq ssq1p... test network; coins have no value
Testnet sq sq1p... retired
Regtest sq sq1p... local only

Note

Mainnet, testnet, and regtest all share the HRP sq; only stagenet uses ssq. Networks are distinguished by their magic bytes and ports, not by the address HRP.

Why Bech32m?

Bech32m (BIP-350) provides strong error detection and is the standard encoding for witness version 1 and above.

How addresses are generated

flowchart LR
    A[Dilithium keypair] --> B["Public key (1,312 bytes)"]
    B --> C["SHA-256 (32-byte digest)"]
    C --> D["Bech32m encode, witness v1"]
    D --> E["sq1p... (mainnet)"]
  1. Generate a Dilithium ML-DSA-44 keypair
  2. Take the 1,312-byte public key
  3. Hash it with SHA-256 to produce a 32-byte digest (the witness program)
  4. Encode with Bech32m at witness version 1 using the network HRP

Validation rules

  • Addresses MUST use lowercase encoding (Bech32m spec)
  • Only witness version 1 is accepted for Dilithium outputs
  • The witness program must be exactly 32 bytes
  • Invalid checksums are rejected at the RPC and wallet level
  • Sending to an invalid address returns error -5 (invalid address or key) from the RPC