qorechain-rdk (Python)
Python Rollup Development Kit for the QoreChain network.
Status: Available. This package mirrors the TypeScript RDK
(@qorechain/rdk) with idiomatic, type-hinted, snake_case Python — typed rollup
configuration with the compatibility matrix enforced, preset profiles, the
rollup and settlement-batch lifecycles, native data availability, transaction
signing and broadcast, and the read clients.
Surface (mirrors the TypeScript RDK modules):
- Typed rollup configuration and builder, with the settlement / sequencer / proof / DA / gas / VM compatibility matrix validated client-side.
- The five preset profiles:
defi,gaming,nft,enterprise,custom. - Exact denom conversion and creation-cost economics (integer math, no float).
- Binary-Merkle withdrawal-proof assembly for the bridge.
- Portable rollup manifests (save / share / reload).
- Account derivation from a BIP-39 mnemonic (BIP-44
m/44'/118'/0'/0/0, secp256k1, bech32qor) and a SIGN_MODE_DIRECT signer. - Hand-encoded protobuf codecs for the eight
rdkmessages, a full transaction builder, and broadcast via the REST/cosmos/tx/v1beta1/txsendpoint. - Read clients: REST (LCD), the
qor_JSON-RPC namespace, typed views, and theRdkClientfacade — plus preflight ("doctor"), rollup health, event decoding, and a faucet helper. Live broadcast requires a reachable node endpoint; the HTTP transport is injectable for testing.
Post-quantum (hybrid) signing. Both QoreChain networks require the hybrid post-quantum signature (ML-DSA-87 + secp256k1) on native-lane transactions. Give the tx client a PQC keypair and every transaction it signs is hybrid, built by the QoreChain Python SDK (
qorechain-sdk,qorsdk). Without one it signs classical-only (SIGN_MODE_DIRECT, secp256k1), and the networks refuse the transaction. Read paths, local transaction building, and settlement-receipt verification (which reads live chain state) need no PQC key.
from qorrdk import create_rdk_client, pqc_keypair_from_env, signer_from_env
client = create_rdk_client(network="testnet")
signer = signer_from_env() # QORE_OPERATOR_PRIVATE_KEY_HEX or QORE_MNEMONIC
# QORE_PQC_SEED_HEX (a 32-byte ML-DSA-87 seed) or QORE_MNEMONIC, checked
# against the key the chain holds for this account.
pqc = pqc_keypair_from_env(client, signer.address)
tx = client.connect_tx(
signer,
pqc_keypair=pqc.keypair,
include_pqc_public_key=pqc.include_pqc_public_key, # True: registers the key first
sign_bytes_version="auto", # or force "v1" / "v2"
)
tx.pause_rollup(rollup_id="my-rollup", reason="maintenance")
pqc_keypair_from_env (and resolve_pqc_keypair(client, address, mnemonic))
pick the key the chain actually has registered for the account: the canonical
address-bound derivation (shake256("qorechain:pqc:v1|" + address + "|" + mnemonic)) or the legacy one. An account with no key yet gets the canonical
key, and the client registers it (MsgRegisterPQCKeyV2 with a proof of
possession, in a transaction of its own) before its first transaction: since
chain v3.2.3 a key carried in the signature extension is not registered on
first use. A key on
chain that neither derivation (nor QORE_PQC_SEED_HEX) produces is an error,
never a guess. With sign_bytes_version="auto" the client asks the network's
REST endpoint which hybrid sign-bytes form it verifies (v1 / v2); a direct
RdkTxClient(...) takes the same pqc_keypair, include_pqc_public_key and
sign_bytes_version keyword arguments.
What's new in 0.4.0
- QCAI Rollup Copilot —
get_rollup_adviceaggregates a live fee estimate, network recommendations, fraud investigations, RL-agent status, and plain-language suggestions for a rollup (best-effort; unreachable advisory services degrade to warnings). - Quantum-safe settlement receipts —
build_settlement_receipt/verify_settlement_receipt: a portable record that a settlement batch was anchored to the Main Chain under an ML-DSA-87 (Dilithium-5, FIPS-204) signature. A receipt is a claim, not evidence — every field in it comes from whoever handed it to you — soverify_settlement_receiptrequires aclientand re-reads the rollup's layer, the batch's state root, the anchor and the creator's registered key from live chain state; only then does it returnvalid=Truewithmode="chain". There is no offline verification: without a client you getmode="signature-only", which proves someone signed those bytes and is nevervalid. The ML-DSA-87 verification uses theqorechain-pqclibrary.
pip install qorechain-rdk
Install as
qorechain-rdk; import asqorrdk.
from qorrdk import presets, create_rdk_client, pqc_keypair_from_env, signer_from_env
# Build and validate a rollup configuration.
config = presets.defi("my-rollup").set(stake_amount_uqor="10000000000").build()
# Connect, sign hybrid, and broadcast (needs a reachable node endpoint).
client = create_rdk_client(network="testnet")
signer = signer_from_env() # QORE_OPERATOR_PRIVATE_KEY_HEX or QORE_MNEMONIC
pqc = pqc_keypair_from_env(client, signer.address) if signer else None
if signer is not None and pqc is not None:
tx = client.connect_tx(signer, pqc_keypair=pqc.keypair,
include_pqc_public_key=pqc.include_pqc_public_key)
tx.create_rollup(rollup_id="my-rollup", profile="defi", vm_type="evm",
stake_amount="10000000000")
Metadata
Release files for qorechain-rdk 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qorechain_rdk-0.9.0.tar.gz | 144.2 kB | Without provenance | Details for qorechain_rdk-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qorechain_rdk-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for qorechain_rdk-0.9.0-py3-none-any.whl |
Total release size: 276.8 kB
Release files / qorechain_rdk-0.9.0.tar.gz
| Download URL | qorechain_rdk-0.9.0.tar.gz |
|---|---|
| Size | 144.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a0f80f2202d9299d086ce7066e3bc00ddfd62baa0227341638aee4738954ef6
|
|
BLAKE2b-256 checksum How to use checksums |
8dc8199ad6578d47c705e83a704a720a7d16383ca8fd2c86f0aa4e4e3e1b34ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / qorechain_rdk-0.9.0-py3-none-any.whl
| Download URL | qorechain_rdk-0.9.0-py3-none-any.whl |
|---|---|
| Size | 132.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2a820a40adb014cb0fcbe608620c00aa88c60cc68b620779453ce95f4d2d5c9
|
|
BLAKE2b-256 checksum How to use checksums |
964c34f9a9e3ddea91ebd5f4fdb96796943a889629b6a78ad7ab0bcd1063492e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Security for qorechain-rdk 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.