Post-quantum Web3 client SDK for the Quantova Layer-1 blockchain — Python, synchronous in the style of web3.py and pip-installable. Falcon/Dilithium/SPHINCS+ signing, the q_* JSON-RPC namespace, QVM contracts (Solidity ABI), QNS .q names, fee/gas oracle, batch requests, real-time event hooks, REST client, and a qweb3-cli. Python 3.8+.
Qweb4.py
Quantova Post-Quantum Web4 Client — Python SDK. Connect to a Quantova node, manage post-quantum accounts, sign and broadcast transactions, and interact with QVM smart contracts from Python. The Python counterpart of Qweb4.js and Qweb4.rs.
Quantum security
Quantova is a post-quantum Layer-1. Accounts use NIST post-quantum signatures (Falcon-512, SPHINCS+ SHAKE-128s, CRYSTALS-Dilithium2/ML-DSA-44) with SHA3-256 — no ECDSA/secp256k1 — so they resist quantum attacks. Addresses are Bech32mQ1...; the chain speaks q_* JSON-RPC.
Cross-SDK compatibility (byte-for-byte)
Accounts derive identically to Qweb4.js and Qweb4.rs, so **the same mnemonic yields the sameQ1... address** in all three SDKs:
- mnemonic -> 32-byte seed = substrate mini-secret
PBKDF2-HMAC-SHA512(BIP-39 entropy, "mnemonic", 2048)[:32] — verified equal to
Qweb4.js ("test test ... junk" -> 4ca479f5...3b4709c).
- address =
SHA3-256(public_key)[:20]with byte 0 =0x40, Bech32m-encodedQ1.... - keypairs use the same post-quantum cores as the node and Qweb4.js: Falcon-512
ChaCha20Rng(seed)), Dilithium2/ML-DSA-44 (keygenfromseed), SPHINCS+ SHAKE-128s
(blake2_256-derived components).
Install
pip install qweb4
Post-quantum backend
The pure-Python package ships the full client (accounts, addresses, ABI, QNS, RPC, fees, contracts) and the mnemonic/address derivation above. **Key generation and signing require a post-quantum backend** exposing the falcon-wasm-style interface (<scheme>pairfromseed / sign / _verify). Register it once at startup:
import qweb4.crypto_backend as cb
cb.setbackend(mypq_backend) # adapter over the Quantova PQ cores
Any backend that produces the **same Falcon-512 / ML-DSA-44 / SLH-DSA-SHAKE-128s keys from a seed** as Qweb4.js keeps addresses and signatures cross-compatible. (The recommended adapter wraps the same fn-dsa / fips204 / fips205 cores used by Qweb4.rs, so derivation stays byte-identical.)
Quick start
from qweb4 import QWeb4
q = QWeb4("https://rpc.quantova.org")
acct = q.wallet.import_mnemonic("test test ... junk") # -> same Q1... as Qweb4.js/rs
print(q.rpc.get_balance(acct.address))
Resources
- 🌐 https://quantova.org · 🔎 https://qvmscan.io · 💻 https://github.com/Quantova/Qweb4.py