# PQWERAI Developers — full text export (testnet-rc1+72057fe3ec) # AI Network and MeshLLM # AI Network and MeshLLM !!! warning "Status" Implemented and tested **locally by one operator**. There is no public provider network, no public model gateway, and the multi-operator gates are open. Treat everything here as experimental. | Component | What it is | Status | |---|---|---| | [MeshLLM runtime](meshllm-runtime.md) | Upstream inference runtime run by providers, pinned and supervised | Local tests pass; distributed routing needs an independent cohort | | [ServiceEscrow](service-escrow.md) | Contract for quotes, prepayment, usage, acceptance, disputes, refunds | ✅ Tested on chain 77240 | | [Revenue policy v3](revenue-policy.md) | How a settled charge is split | Contract-enforced; schedule pending economic approval | | Wallet *AI Sharing* page | Opt-in local models, provider policies and P2P overlay | 0.7.3 development branch; complete acceptance not rerun here | | Wallet *Ask* flow | Signed quote, explicit funding confirmation, response and escrow acceptance | Implemented in 0.7.3 development; requires eligible providers and testnet funds | | Training, grants, training rewards | — | Out of scope for testnet-rc1 | ## Principles 1. **Never in consensus.** No LLM inference is part of block validation. A stopped or compromised runtime cannot stop nodes from validating or moving PQAI. 2. **Customer-funded.** Providers are paid from escrowed customer payments. AI work cannot mint block rewards. 3. **Off-chain content.** Prompts, outputs and weights stay off chain; only hashes, quotes and amounts go on chain. 4. **Honest receipts.** A signed usage statement authenticates the provider's report — not that the work happened. Developer journeys: [AI provider quickstart](../getting-started/ai-provider.md) · [Build an AI payment application](../getting-started/ai-payment-app.md). # MeshLLM runtime integration # MeshLLM runtime integration MeshLLM is a separate upstream inference runtime. PQWERAI does not fork it into the node; providers run it as their own service and the project supplies a supervisor and client that enforce pins and boundaries. | Aspect | Implementation | |---|---| | Version | MeshLLM 0.78.x with a pinned CUDA bundle and pinned GGUF model (SHA-256) | | Start mode | `--local-model-only`; analytics, default plugins and prompt disk caching disabled; isolated data dir | | Supply chain | No downloader or auto-updater; publisher/product/native-file hashes verified before execution | | API | OpenAI-compatible HTTP on literal loopback (`127.0.0.1`); remote operators need separately authenticated tunnels | | Usage | Gateway signs usage bound to request/output commitments; duplicates and non-execution are reconciled | | Resources | Per-job token/time/memory limits; GPU/CPU/power/temperature admission checks before work (not hard limits) | | Low-VRAM hosting | Experimental, disabled by default: CPU-only, VRAM-capped partial offload or full-GPU profiles for allowlisted GGUF models | ## Not yet established - Mesh peer discovery and distributed routing across independent providers. - Accountable hardware measurement; receipts remain provider claims. - Canary, upgrade and rollback policy for runtime versions across operators. Keep AI hosting off the CPU cores you use for mining or validation. # AI service revenue policy # AI service revenue policy **Version 3 (current, 2026-11-05):** for each settled charge, each deployment-configured payee receives `floor(charge × bps / 10000)` and the serving provider receives the exact remainder. | Rule | Value | |---|---| | Scope | Inference only | | Founder share | 0 (the founder is paid only from block issuance) | | Training / model fund | 0 (training is out of scope for testnet-rc1) | | Payees | ≤ 4, distinct, non-zero, each bps > 0, total < 10000 | | Testnet default | No payees → the provider receives **100 %** | | Approved production schedule | None yet — pending economic approval | | On-chain commitment | `distributionHash = keccak256(abi.encode(3, payees, bps))`, fixed per deployment | ## History | Version | Split | Status | |---|---|---| | v1 | 80 / 7 / 4 / 4 / 4 / 1 (provider / model-training fund / … / founder) | Superseded; legacy escrows only | | v2 | 81 / 7 / 4 / 4 / 4 / 0 | Superseded; legacy escrows only | | v3 | provider remainder, configurable payees, founder 0, training 0 | **Current** | Historical design documents may still mention the 80/7/4/4/4/1 split; it no longer applies to new deployments. Block issuance (79.2 % PoW / 19.8 % PoS / 1 % founder) is a different mechanism — see [Rewards and issuance](../mining/rewards-and-issuance.md). # ServiceEscrow contract reference # ServiceEscrow reference Solidity 0.8.26, SPDX MIT. Constants: `REVENUE_POLICY_VERSION = 3`, `MAX_PAYEES = 4`, `BPS_DENOMINATOR = 10000`, `DOMAIN = keccak256("PQAI-SERVICE-QUOTE/1")`. ## Constructor ```solidity constructor(address arbiter, address[] payees, uint16[] bps, uint256 challengeBlocks, uint256 disputeBlocks) ``` `arbiter ≠ 0`; windows 1..100000 blocks; up to 4 distinct non-zero payees, each `bps > 0`, total `< 10000` (the provider always keeps a share). `distributionHash = keccak256(abi.encode(3, payees, bps))` commits the schedule for life. ## Quote ```solidity struct Quote { bytes32 job; address payer; address provider; bytes32 model; uint256 maxTokens; uint256 pricePerToken; uint64 expiresAt; uint32 serviceBlocks; } ``` `quoteHash(q) = keccak256(abi.encode(DOMAIN, block.chainid, address(this), q))`, signed by the provider as an EIP-191 personal message over the 32-byte hash (65-byte signature, low-s, v ∈ {27, 28}). ## Functions | Function | Caller | Effect | |---|---|---| | `fund(Quote, bytes sig)` payable | payer | Requires `msg.value == maxTokens × pricePerToken`, unexpired quote (`block.number ≤ expiresAt`), valid provider signature. State → Funded, deadline = now + serviceBlocks | | `propose(bytes32 id, bytes32 receipt, uint256 tokens)` | provider | Before deadline; receipt unused; `0 < tokens ≤ maxTokens`. charge = tokens × price. → Proposed | | `accept(bytes32 id)` | payer | → Accepted; deadline = now + challengeBlocks | | `dispute(bytes32 id)` | payer (Proposed/Accepted) or provider (Proposed) | Before deadline. → Disputed; deadline = now + disputeBlocks | | `resolve(bytes32 id, uint256 approvedCharge)` | arbiter | `approvedCharge ≤ charge`; → Accepted, final | | `finalize(bytes32 id)` | anyone | After the Accepted deadline: credits payer refund, payee shares (floor), provider remainder. → Settled | | `refundExpired(bytes32 id)` | anyone | Funded/Proposed/Disputed after deadline: full budget to payer. → Refunded | | `withdraw()` | any creditor | Pull payment of `credits[msg.sender]` (reentrancy-guarded) | | `distribution()`, `quoteHash()`, `jobs(id)`, `credits(addr)`, `usedReceipts(r)` | view | | States: `0 None, 1 Funded, 2 Proposed, 3 Accepted, 4 Disputed, 5 Settled, 6 Refunded`. ## Events | Event | When | |---|---| | `Funded(bytes32 indexed job, bytes32 quoteHash)` | fund | | `Proposed(bytes32 indexed job, bytes32 receipt, uint256 charge)` | propose | | `Changed(bytes32 indexed job, State state)` | accept, dispute, resolve, finalize, refundExpired | | `Paid(address indexed recipient, uint256 amount)` | withdraw | Revert reasons are listed in the [tutorial](../getting-started/ai-payment-app.md#errors-revert-reasons). ## Integration notes - Jobs funded on older escrows (v1 80/7/4/4/4/1, v2 81/7/4/4/4/0) keep their terms; new markets deploy v3. - A reorganisation can undo allocation and withdrawal; wait for BFT finality before irreversible delivery. - After final allocation, pull credits are not revocable by the contract. # Blockchain and EVM # Blockchain and EVM PQWERAI is an EVM chain whose blocks are produced by **GhostRider proof of work** and finalized by **Smartnode checkpoint votes**. To applications it looks like an Ethereum JSON-RPC node with chain ID **77240**, plus the `g4_*` namespace for finality and issuance. ```mermaid flowchart LR subgraph Production["Block production (3–7 s)"] M[GhostRider miners] --> B[Blocks: EVM state transition] end subgraph Finality["Finality (every 32 blocks)"] V[Smartnode validators] -- signed votes --> C[Checkpoint certificate] end B --> C C --> F[(Finalized: never reorganised)] ``` | Topic | Page | |---|---| | Chain ID, issuance, EVM rules, finality and registry parameters | [Network parameters](network-parameters.md) | | Which EVM opcodes and EIPs are active | [EVM compatibility](evm-compatibility.md) | | Transaction types, gas, base fee burn, priority fee | [Transactions and fees](transactions-and-fees.md) | | When a transaction is irreversible | [Finality for applications](finality.md) | | Every JSON-RPC method | [JSON-RPC reference](../reference/json-rpc/index.md) | | Try read-only requests | [API playground](../playground.md) | ## What differs from Ethereum mainnet - **Consensus:** PoW (GhostRider) + FFG-style checkpoint finality, not proof-of-stake block proposals. `0x44` (`PREVRANDAO`/`DIFFICULTY`) returns the PoW difficulty, not beacon randomness — never use it as randomness. - **No blobs:** EIP-4844 blob transactions and the `BLOBHASH`/`BLOBBASEFEE` opcodes are not available. - **Finality tags:** the `safe`/`finalized` block tags return errors; use `g4_status.finalized_height`. - **RPC surface:** no `personal_*`, `admin_*`, `debug_*`, `miner_*`, tracing or WebSocket subscriptions. - **Issuance:** uncapped, split 79.2 % PoW / 19.8 % PoS / 1 % founder treasury, with EIP-1559 base-fee burn. # EVM compatibility # EVM compatibility The PQWERAI EVM is the unmodified Core-Geth EVM. `network.json` declares the Ethash-family rules through London at genesis plus EIP-3651, EIP-3855, EIP-3860, EIP-5656 and EIP-1153 at block 0. The table below was **measured** on a live node with the opcode probe at the end of this page. | Opcode / feature | Fork | Chain 77240 | |---|---|---| | `BASEFEE` (EIP-3198), EIP-1559 transactions | London | ✅ supported | | `PUSH0` (EIP-3855) | Shanghai | ✅ supported | | Warm `COINBASE` (EIP-3651), initcode limit (EIP-3860) | Shanghai | ✅ active per network.json | | `MCOPY` (EIP-5656) | Cancun | ✅ supported | | `TLOAD` / `TSTORE` (EIP-1153) | Cancun | ✅ supported | | `SELFDESTRUCT` | — | executes (pre-Cancun EIP-6780 semantics are not claimed; do not rely on it) | | `BLOBHASH` (EIP-4844) | Cancun | ❌ `invalid opcode: BLOBHASH` | | `BLOBBASEFEE` (EIP-7516) | Cancun | ❌ `invalid opcode: BLOBBASEFEE` | | `CLZ` (EIP-7939) | Osaka | ❌ `opcode 0x1e not defined` | | `PREVRANDAO` / `DIFFICULTY` (`0x44`) | — | returns the **PoW difficulty** (e.g. `0x200`) | | Blob transactions (type 3) | Cancun | ❌ blob rules not activated | | EIP-7702 set-code transactions (type 4) | Prague | ❌ `transaction type not supported` | ## Compiler targets | Toolchain | Recommended setting | Notes | |---|---|---| | solc 0.8.26 | `evmVersion: cancun` (or `london`) | Fine unless the source calls `blobhash()` or `block.blobbasefee`. The Wallet Studio templates use `london`. | | Vyper 0.4.3 | `--evm-version cancun` | Tested | | Huff Neo (`hnc`) 1.7.1 | `-e cancun` | Default target `osaka` emits nothing chain-incompatible for simple code, but pin it | | Fe 26.5.1 | default | Experimental; tested on a counter only | | Foundry | `evm_version = "cancun"` | Tested with Foundry 1.8.5 | | Hardhat | `evmVersion: "cancun"` | Not executed for this release | !!! note "Correction" Older wallet documentation stated that the chain has no `PUSH0`/`MCOPY`. That is obsolete for testnet-rc1: both execute on chain 77240 (measured). Compiling for `london` remains valid and is what the shipped Studio artifacts use. ## Probe a node yourself Read-only: the code runs through an `eth_call` state override, nothing is deployed. ```python title="python/opcode_probe.py" --8<-- "python/opcode_probe.py" ``` ```text PUSH0 (Shanghai) supported MCOPY (Cancun) supported TLOAD (Cancun) supported TSTORE (Cancun) supported BLOBHASH (Cancun, EIP-4844) NOT supported: invalid opcode: BLOBHASH BLOBBASEFEE (Cancun) NOT supported: invalid opcode: BLOBBASEFEE CLZ (Osaka) NOT supported: invalid opcode: opcode 0x1e not defined ``` ## Limits - Contract code size 24,576 bytes (EIP-170); initcode 49,152 bytes (EIP-3860). - Genesis block gas limit 15,000,000; miners may target another limit with `--miner.gasceil`. - Precompiles are those of the Ethereum fork rules above (no KZG point evaluation, since there are no blobs). # Finality for applications # Finality for applications | Stage | Meaning | How to check | |---|---|---| | Pending | In a node's pool | `eth_getTransactionByHash` returns it with `blockNumber: null` | | Included | In the current canonical chain; can still be reorganised by a heavier PoW branch | Receipt exists | | **BFT-finalized** | At or below a checkpoint signed by > 2/3 of the epoch set's stake; nodes never reorganise below it | `blockNumber ≤ g4_status.finalized_height` **and** block hash unchanged | Checkpoints are every 32 blocks (epochs). Finality normally trails the head by one to two epochs; in the tested run a transaction became final after about 8 minutes. ```bash title="quickstart/wait-finality.sh" --8<-- "quickstart/wait-finality.sh" ``` ## Rules for application developers 1. **Credit irreversible value only after BFT finality** (exchanges, bridges, AI deliverables, off-chain goods). 2. **Re-check the block hash** after finality: if your transaction's block was replaced before finalization, the transaction may be in another block or dropped. 3. **Do not trust a single endpoint for finality.** Compare `g4_status.finalized_hash` across independent operators or run your own node. 4. **Do not use the `safe`/`finalized` block tags.** On PQWERAI Core they return errors (`"safe block not found"`, `"finalized block not found"`, measured); use `g4_status`. Libraries that default to `finalized` (some viem/ethers helpers) must be configured to use `latest` plus the `g4_status` check. 5. **Plan for stalls.** If less than 2/3 of validator stake is online, PoW blocks continue but `finalized_height` stops advancing. Show "awaiting finality" rather than failing. ## `g4_status` fields used for finality | Field | Meaning | |---|---| | `head` | Current head height | | `finalized_height`, `finalized_hash` | Latest BFT-finalized checkpoint | | `justified_height`, `justified_hash` | Latest justified checkpoint (finalization candidate) | | `finality` | `true` when the node runs the registry/finality profile | | `epoch_set_size`, `epoch_set_root` | Validator set of the current epoch | Full method reference: [`g4_status`](../reference/json-rpc/g4.md#g4_status). # Network parameters # Network parameters Generated from `testnet/release/network/network.json`, the single source of truth that nodes, wallets and this documentation read. If a value here disagrees with a node, the node and `network.json` win — please report it. ## Identity | Parameter | Value | |---|---| | Network name | PQWERAI v8 private testnet rc1 | | Status | release-candidate; private testnet only; no real funds; not mainnet | | Protocol version | `pqwerai-v8-testnet/1` | | Chain ID / network ID | `77240` (`0x12db8`) / `77240` | | Native asset | PQAI, 18 decimals | | Genesis | PENDING_OWNER_CEREMONY — The persistent testnet genesis is fixed once by testnet/release/vps/genesis-ceremony.sh from the owner's validator PUBLIC keys and recorded in GENESIS_MANIFEST.json. Local acceptance runs use disposable genesis files with identical parameters but fresh keys. | ## Add the network to a wallet ```json { "chainId": "0x12db8", "chainName": "PQWERAI Testnet", "nativeCurrency": { "name": "PQAI", "symbol": "PQAI", "decimals": 18 }, "rpcUrls": [ "http://127.0.0.1:8545" ] } ``` Pin both the chain ID and the genesis hash published in `GENESIS_MANIFEST.json`; the PQWERAI Windows Wallet does this automatically. ## GhostRider proof of work | Parameter | Value | |---|---| | Helper | pqwerai_hash_worker (native GhostRider stream helper) (`sha256 3a54f0bb461f296b…`, linux-amd64 only (Windows uses WSL2)) | | Base difficulty | 64 (adaptive: True) | | Difficulty rule | next = parent*2 if gap=8s; else parent; clamped to [base, 16*base] | | Target block interval | 3–7 s | | Fork choice | greatest total difficulty; equal TD keeps local head; never reorganises below the BFT finalized checkpoint | ## Issuance | Parameter | Value | |---|---| | Split | 79.2% PoW miners / 19.8% active Smartnode validators / 1% founder treasury of each epoch issuance (owner decision 2026-11-05) | | Cap | none (uncapped, per owner policy) | | Fees | EIP-1559 base fee burned (tracked as fee_burn_wei); priority fee to the miner | | Founder share | the founder 1% is carved out of the same issuance; transfers, gas fees and AI payments are never charged | | Accounting RPC | `g4_status.minted_wei, fee_burn_wei, pow_issued_wei, pos_issued_wei, founder_issued_wei, registry_slash_burned_gwei` | ## EVM | Parameter | Value | |---|---| | Engine | Core-Geth EVM (unmodified opcode semantics) | | Rules | Ethash-family protocol changes through London at genesis, plus EIP-3651, EIP-3855 (PUSH0), EIP-3860, EIP-5656 (MCOPY), EIP-1153 (transient storage) at block 0 | | Genesis gas limit | 15,000,000 | | Genesis base fee | 1,000,000,000 wei | | Transaction types | legacy (EIP-155), EIP-2930, EIP-1559 | ## Finality | Parameter | Value | |---|---| | Kind | FFG-style checkpoint finality over registry-derived Smartnode validator sets | | Epoch length blocks | 32 | | Quorum | strictly more than 2/3 of the epoch set's effective stake | | Minimum genesis validators | 4 | | Max link span blocks | 4096 | | Vote transport | signed votes submitted over authenticated JSON-RPC (g4_submitVote); certificates travel as transactions/blocks over devp2p | | Signer safety | persistent journal with double-vote and surround-vote locks, fsync before release, stale-backup anchoring | ## Smartnode registry | Parameter | Value | |---|---| | Registry account | `keccak256('PQAI/private/G4/registry/v1')[12:]` | | Operations | `register=1, topup=2, delegate=3, undelegate=4, claim=5, rotate=6, exit=7, withdraw=8, slash=9` | | Operation gas | `150000` | | Genesis validator stake gwei | `32000000000` | | Min stake gwei | `1000000000` | | Max effective stake gwei | `2048000000000` | | Min delegation gwei | `1000000` | | Activation delay epochs | `2` | | Unbonding epochs | `4` | | Evidence window epochs | `3` | | Slash fraction | `25/100 of stake, burned` | | Max set size | `64` | | Max registered | `256` | | Withdrawal rule | `only after exit + unbonding AND the withdrawable epoch is BFT-finalized` | ## RPC | Parameter | Value | |---|---| | Default bind | `127.0.0.1` | | Served namespaces | `eth`, `net`, `web3`, `txpool`, `g4` (+ `pqwerai_peerHealth` operator diagnostics) | | Never exposed | `personal`, `admin`, `debug`, `miner`, `clique`, `engine` | | Non-loopback bind | --rpc.token-file (bearer token >= 16 bytes, constant-time compare) | | Max request | 4,194,304 bytes | ## P2P | Parameter | Value | |---|---| | Default port | 30303 | | Discovery | off by default; --discovery with --bootnodes enables discv4 seeded by bootstrap nodes | | Bootstrap privileges | none; bootstrap nodes are ordinary full nodes | | Identity check | devp2p eth handshake rejects peers with a different network ID or genesis hash | # Transactions and fees # Transactions and fees | Type | Supported | Notes | |---|---|---| | Legacy (EIP-155) | ✅ | Must be signed with chain ID 77240; unprotected (pre-155) transactions are not recommended | | EIP-2930 access list (type 1) | ✅ | `eth_createAccessList` helps build the list | | EIP-1559 dynamic fee (type 2) | ✅ | Recommended | | Blob (type 3) | ❌ | Cancun blob rules are not activated on chain 77240 | | Set-code (type 4, EIP-7702) | ❌ | Rejected at decoding: `transaction type not supported` (measured) | ## Fees - **Base fee** per gas is set by the protocol (EIP-1559) and **burned**. Genesis base fee: 1 gwei; with mostly empty blocks it falls to a few wei (the recorded local testnet shows 7 wei). - **Priority fee** (tip) goes to the GhostRider miner of the block. - Burned fees are counted exactly in `g4_status.fee_burn_wei` and the explorer's `/api/v1/supply`. - AI payments and transfers carry no protocol tax; the founder share comes only from block issuance. Fee rule used by the PQWERAI Windows Wallet and `pqwerai-cli` (a safe default for your apps too): ```text maxPriorityFeePerGas = eth_maxPriorityFeePerGas maxFeePerGas = 2 × latest baseFee + maxPriorityFeePerGas ``` ```bash cast base-fee --rpc-url "$RPC" cast rpc eth_maxPriorityFeePerGas --rpc-url "$RPC" cast rpc eth_feeHistory '"0x4"' '"latest"' '[25,75]' --rpc-url "$RPC" cast estimate 0x000000000000000000000000000000000000dEaD --value 0.01ether --from "$ME" --rpc-url "$RPC" ``` ## Nonces, replacement and the pool - Nonces are per account and strictly sequential. Use `eth_getTransactionCount(addr, "pending")` before signing. - To replace a stuck transaction, resend the same nonce with both fees raised by at least 10 %. - `txpool_status`, `txpool_inspect` and `txpool_contentFrom` show this node's view of pending/queued transactions. ## Signing PQWERAI nodes hold no user keys: `eth_sendTransaction` and `eth_sign` return `unknown account`. Sign in the client (wallet, cast, ethers, viem, web3.py) and submit with `eth_sendRawTransaction`. The Windows Wallet decodes each signed transaction and recovers the sender before broadcasting. # Smart Contracts and Tokens # Smart Contracts and Tokens All PQWERAI contract languages compile to the **same EVM** — there is no separate VM. Pick the language for its safety and ergonomics; deployment, ABI encoding and tooling are identical. | Language | Compiler pinned | Status on chain 77240 | Best for | |---|---|---|---| | [Solidity](languages/solidity.md) | solc 0.8.26 | ✅ Tested (Foundry, Wallet Studio) | Most contracts, OpenZeppelin ecosystem | | [Vyper](languages/vyper.md) | 0.4.3 | ✅ Tested (CLI) | Auditable, Pythonic contracts | | [Yul](languages/yul.md) | solc 0.8.26 `--strict-assembly` | ✅ Tested (CLI) | Hand-written low-level code | | [Huff](languages/huff.md) | Huff Neo `hnc` 1.7.1 | 🧪 Compiles and runs; Studio integration unreleased | Opcode-level optimisation | | [Fe](languages/fe.md) | 26.5.1 | 🧪 Experimental | Research; not for value-bearing code | Start with the [language comparison](languages/index.md) (same contract in all five, measured gas), then: - Standards: [ERC-20](guides/erc20.md) · [ERC-721](guides/erc721.md) · [ERC-1155](guides/erc1155.md) - Patterns: [access control and ownership](guides/access-control.md) · [events](guides/events.md) · [payable functions](guides/payable.md) · [Solidity libraries](guides/libraries.md) - [Verification](verification.md) · [Application languages (JS/TS/Python)](application-languages.md) !!! warning "Unaudited examples" Every example on these pages is tutorial code. Compiler success is not a security review. # Application languages (JavaScript, TypeScript, Python) # Application languages **JavaScript, TypeScript and Python do not run on PQWERAI.** On-chain code is EVM bytecode produced by the contract languages in the [language center](languages/index.md). Application languages: - read chain state over [JSON-RPC](../reference/json-rpc/index.md) and the [explorer API](../explorer/index.md); - encode calls with a contract's ABI; - sign transactions locally and submit them with `eth_sendRawTransaction`. | Language | Libraries | Guide | |---|---|---| | TypeScript / JavaScript | ethers.js v6, viem 2 | [ethers.js](../tools/ethers.md) · [viem](../tools/viem.md) | | Python | web3.py 7, or the standard library | [web3.py](../tools/web3py.md) · [opcode probe](../blockchain/evm-compatibility.md#probe-a-node-yourself) | | Shell | Foundry `cast` | [Foundry](../tools/foundry.md) | A separate on-chain execution environment for other languages (e.g. WASM) is a research track, not part of testnet-rc1. It would need its own deterministic metering, sandboxing and security review before any use. # Access control and ownership # Access control and ownership The tested `TipJar` example combines the three common models. ```solidity title="src/TipJar.sol" --8<-- "patterns/src/TipJar.sol" ``` | Model | Use | In the example | |---|---|---| | `Ownable` | One administrator | `setFee` is `onlyOwner` | | `Ownable2Step` | Ownership transfer that the new owner must accept | `transferOwnership(BOB)` sets `pendingOwner`; `owner` unchanged until `acceptOwnership()` | | `AccessControl` | Several roles, each grantable/revocable | `PAUSER_ROLE` guards `setPaused` | ```bash title="patterns/patterns.sh" --8<-- "patterns/patterns.sh" ``` Recorded output: ```text true 990000000000000000 [9.9e17] # BOB credited 0.99 PQAI 10000000000000000 [1e16] # owner fee 1 % 1 # one Tipped event refused with AccessControlUnauthorizedAccount (0xe2517d3f) true refused with IsPaused() true true 0 # owner withdrew the fee true 0x000000000000000000000000000000000000bEEF # pendingOwner 0xaAcAcdD40Bcb3Ce31cDd67f8677C05a7d8A8B81b # owner still the old one ``` **Key custody:** keep owner and admin keys out of servers; for anything valuable use a multisig contract as the owner. Renouncing ownership (`renounceOwnership`) is irreversible. # ERC-1155 multi-tokens # ERC-1155 multi-tokens [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) manages many token IDs (fungible or unique) in one contract. Deployment, minting and transfer are tested in [Create NFTs](../../getting-started/create-nfts.md). ```solidity title="PQItems.sol" --8<-- "nft/src/PQItems.sol" ``` - `uri(id)` returns a template; clients replace `{id}` with the 64-character lower-case hex ID. - `safeBatchTransferFrom` and `balanceOfBatch` move or read many IDs in one call. - Events: `TransferSingle`, `TransferBatch`, `URI`. !!! warning "Tooling limits on PQWERAI today" The explorer does not decode ERC-1155 events yet and the Windows Wallet 0.6.0 does not show ERC-1155 balances. Read balances with `balanceOf(account, id)` until support ships. # ERC-20 tokens # ERC-20 tokens Fungible tokens follow [ERC-20](https://eips.ethereum.org/EIPS/eip-20) unchanged. Tested end to end in [Create a token](../../getting-started/create-token.md). ```solidity title="PQToken.sol" --8<-- "token/src/PQToken.sol" ``` | Function / event | Notes | |---|---| | `balanceOf`, `totalSupply`, `decimals` | `decimals()` is display-only; on-chain amounts are integers | | `transfer`, `transferFrom` | Emit `Transfer(from, to, value)` | | `approve`, `allowance` | Emit `Approval`; prefer exact amounts — the Windows Wallet warns on unlimited approvals | | Mint / burn | `Transfer` from / to the zero address | ## Support on PQWERAI - **Windows Wallet:** discovers balances, transfers, and warns about native-PQAI impostors and hidden characters. - **Explorer:** indexes ERC-20 `Transfer` events (`/api/v1/tokens`, `/api/v1/address/{address}`). - **Native PQAI is not an ERC-20.** A WETH9-style wrapper (WPQAI) exists only on an unreleased wallet branch. - **Permit (EIP-2612)** works (it only needs `ecrecover` and the chain ID); a Studio wizard is unreleased. # ERC-721 NFTs # ERC-721 NFTs Unique tokens follow [ERC-721](https://eips.ethereum.org/EIPS/eip-721). Tested in [Create NFTs](../../getting-started/create-nfts.md). ```solidity title="PQCollection.sol" --8<-- "nft/src/PQCollection.sol" ``` - `tokenURI(id)` returns `baseURI + id`; host JSON metadata on IPFS or HTTPS. The chain stores only the URI. - `_safeMint`/`safeTransferFrom` revert with `ERC721InvalidReceiver` if a receiving contract lacks `onERC721Received`. - `Transfer(from, to, tokenId)` has `tokenId` indexed; the explorer uses this to index NFT transfers. - The Windows Wallet lists ERC-721 tokens it discovers and transfers them; its Studio *NFT collection* template deploys an equivalent OpenZeppelin collection without code. # Contract events # Contract events ```solidity event Tipped(address indexed from, address indexed to, uint256 amount, uint256 fee); emit Tipped(msg.sender, to, msg.value, fee); ``` - Up to three `indexed` parameters become topics (filterable); the rest is ABI-encoded `data`. - `topic0` is `keccak256("Tipped(address,address,uint256,uint256)")` (not for `anonymous` events). - Emit events **before** external calls (checks-effects-interactions). ## Reading events ```bash cast logs --from-block --to-block --address "Tipped(address indexed,address indexed,uint256,uint256)" --rpc-url "$RPC" ``` PQWERAI limits: | Limit | Value | |---|---| | `eth_getLogs` block range | ≤ 5000 blocks per request by default (`--rpc.logs-max-range`) | | `eth_getFilterLogs` | disabled — use `eth_getLogs` or `eth_getFilterChanges` | | WebSocket `eth_subscribe("logs")` | not available (HTTP only) — poll | | Reorganisations | logs above `g4_status.finalized_height` can be removed; `removed: true` appears in filter results | For history beyond a few thousand blocks, page through ranges or use the [explorer API](../../explorer/index.md). # Solidity library compatibility # Solidity library compatibility | Library type | How it works | On PQWERAI | |---|---|---| | `internal` functions (e.g. `Fees.bps`, OpenZeppelin `Math`) | Inlined into the contract; no deployment | ✅ Tested in `TipJar` | | `public`/`external` library functions | Deployed separately; the contract is linked to the library address | ✅ Standard EVM `DELEGATECALL`; link with `forge create --libraries src/L.sol:L:` | | OpenZeppelin Contracts 5.0.2 | Source-level dependency | ✅ ERC-20/721/1155, Ownable, Ownable2Step, AccessControl, Math tested | | OpenZeppelin ≥ 5.1 | Uses `MCOPY`/`PUSH0` depending on target | Compiles for `cancun`; not tested for this release | Compatibility rules: 1. Compile with an EVM target the chain supports (`cancun` or lower) — see [EVM compatibility](../../blockchain/evm-compatibility.md). 2. Avoid libraries that use `blobhash`, `block.blobbasefee` or EIP-7702 delegation — they cannot work here. 3. Libraries that read `block.prevrandao` for randomness are unsafe on PoW chains. 4. Pin library versions (git tag or lockfile); the Wallet Studio uses a bundled OpenZeppelin 5.0.2 so that compilation needs no network and is reproducible. # Payable functions # Payable functions Native PQAI behaves exactly like ether in the EVM: `msg.value` is in wei (1 PQAI = 10^18 wei). ```solidity function tip(address to) external payable { … } // accepts PQAI with a call receive() external payable { … } // plain transfers with empty calldata ``` - A non-payable function reverts if `msg.value > 0`. - **Pull, don't push.** Credit balances and let recipients `withdraw()`; set state to zero before sending (`TipJar.withdraw`, `ServiceEscrow.withdraw`). A recipient that reverts then cannot block others. - Use `call{value: amount}("")` and check the result; `transfer`/`send` forward only 2300 gas. - The tested [`TipJar`](access-control.md) shows a payable function, a basis-point fee via a library and a pull withdrawal. - `SELFDESTRUCT` can force PQAI into a contract without calling it; never rely on `address(this).balance` for accounting. # Language center # Language center Each tab is the same contract — `increment()` (emits `Incremented(uint256)` where the language supports events), `get() returns (uint256)` — so you can compare languages on identical behaviour. Selecting a tab switches every tab group on the site. === "Solidity" ```solidity --8<-- "languages/Counter.sol" ``` === "Vyper" ```python --8<-- "languages/Counter.vy" ``` === "Yul" ```javascript --8<-- "languages/Counter.yul" ``` === "Huff" ```text --8<-- "languages/Counter.huff" ``` === "Fe" ```rust --8<-- "languages/Counter.fe" ``` ## Measured on chain 77240 All five were compiled with the pinned toolchains (target `cancun`), deployed, incremented once and read back by the script below on a disposable local testnet. | Language | Runtime bytes | Deployment gas | `increment()` gas | `get()` after one increment | |---|---:|---:|---:|---:| | Solidity 0.8.26 (optimizer 200, no metadata hash) | 288 | 115,466 | 44,587 | 1 | | Vyper 0.4.3 | 207 | 98,394 | 44,431 | 1 | | Yul (solc 0.8.26 `--strict-assembly --optimize`) | 93 | 73,278 | 44,248 | 1 | | Huff Neo 1.7.1 | 98 | 74,312 | 44,252 | 1 | | Fe 26.5.1 (experimental) | 99 | 77,010 | 43,304 | 1 | `increment()` cost is dominated by the cold `SSTORE` from zero to one (~22,100 gas) plus the 21,000 transaction base; the Solidity and Vyper versions also store an immutable `creator` at deployment. Fe's counter emits no event, which is why its call is cheaper — compare behaviour, not just numbers. ```bash title="languages/build-and-deploy-all.sh" --8<-- "languages/build-and-deploy-all.sh" ``` ## Choosing a language | Need | Choose | |---|---| | OpenZeppelin, audits, largest ecosystem | Solidity | | Fewer footguns, readable code, no inline assembly | Vyper | | Tight control in a few hot paths | Yul (inline in Solidity or standalone) | | Maximal control over every opcode | Huff — only with expert review | | Research on new language designs | Fe — experimental, never value-bearing | JavaScript, TypeScript and Python are **application** languages on PQWERAI: they build transactions and read state, they do not run on chain ([details](../application-languages.md)). # Fe on PQWERAI (experimental) # Fe (experimental) !!! danger "Experimental" Fe is a research language whose syntax and compiler change between releases. PQWERAI treats it as experimental until compiler maturity, stable tooling and a security review gate pass. Do not deploy value-bearing Fe contracts. | | | |---|---| | Compiler | Fe 26.5.1 (`149c758`); Windows exe SHA-256 `7fe5339c…85d5f` | | Output | `out/.bin`, `.runtime.bin`, `.abi.json` | | Status | 🧪 Counter compiles, deploys and runs on chain 77240 (CLI). No events in the example. | ## Example ```rust title="Counter.fe" --8<-- "languages/Counter.fe" ``` ## Build and deploy ```bash fe build --standalone Counter.fe # writes out/Counter.bin, out/Counter.runtime.bin, out/Counter.abi.json TX=$(cast send --async --keystore "$KEYSTORE" --password-file "$PASSWORD_FILE" --rpc-url "$RPC" --create "0x$(cat out/Counter.bin)") cast receipt "$TX" contractAddress --rpc-url "$RPC" ``` Measured: 99 runtime bytes, 77,010 deployment gas, 43,304 gas for `increment()`. ## Caveats - Language semantics may change in the next release; pin the compiler and keep the exact version with your sources. - Few auditors and analysis tools support Fe. - The ABI JSON comes from the compiler's `msg` selectors; check it against the selectors you expect. # Huff on PQWERAI # Huff | | | |---|---| | Compiler | Huff Neo `hnc` 1.7.1 (rev `2fe1d0c9`); Windows zip SHA-256 `d5ae8002…de6f4`, exe `21c50d09…5464` | | EVM target | `-e cancun` (the default `osaka` is newer than the chain) | | ABI | From `#define function` / `#define event` declarations | | Status | 🧪 CLI compile, deploy and call tested on chain 77240. Wallet Studio Huff support exists only on an unreleased branch. | ## Install Download Huff Neo 1.7.1 from its GitHub releases ([cakevm/huff-neo](https://github.com/cakevm/huff-neo)), verify the SHA-256 above, and put `hnc` on your PATH. ## Example ```text title="Counter.huff" --8 Counter.bin # creation bytecode hnc Counter.huff -r -e cancun | tail -n 1 # runtime bytecode (for verification) TX=$(cast send --async --keystore "$KEYSTORE" --password-file "$PASSWORD_FILE" --rpc-url "$RPC" --create "0x$(cat Counter.bin)") cast receipt "$TX" contractAddress --rpc-url "$RPC" ``` Measured: 98 runtime bytes, 74,312 deployment gas, 44,252 gas for `increment()`. ## Caveats - Huff gives you the stack and nothing else: no type checks, no overflow checks, no ABI decoding. - Every macro must leave the stack balanced; one wrong jump label can make funds unreachable. - Treat Huff contracts as requiring expert review and extensive tests (Foundry can test Huff bytecode). # Solidity on PQWERAI # Solidity | | | |---|---| | Pinned compiler | `0.8.26+commit.8a97fa7a` (Linux binary SHA-256 `d5f23436…49ef`; Windows `537fd8d8…eb67`) | | EVM target | `cancun` (or `london`); never `blobhash()` / `block.blobbasefee` | | Libraries | OpenZeppelin Contracts 5.0.2 (MIT) — the version the Wallet Studio templates use | | Status | ✅ Tested: Foundry deploy/verify/call, ERC-20/721/1155, Wallet Studio | ## Install ```bash curl -L https://foundry.paradigm.xyz | bash && foundryup --install 1.8.5 # Foundry # forge fetches solc 0.8.26 automatically when foundry.toml pins solc_version; offline: FOUNDRY_SOLC=/path/to/solc ``` ## Project structure and config ```toml title="foundry.toml" --8 Counter.abi.json forge inspect Counter gasEstimates # compiler estimates; real gas: see the measured table forge create src/Counter.sol:Counter --broadcast --keystore "$KEYSTORE" --password-file "$PASSWORD_FILE" --rpc-url "$RPC" ``` Plain `solc`: `solc --evm-version cancun --optimize --metadata-hash none --bin --abi Counter.sol -o out`. ## Gas and deployment cost Measured: 115,466 gas to deploy the counter, 44,587 for the first `increment()` ([table](index.md#measured-on-chain-77240)). Cost in PQAI = gas × (base fee + tip); with a base fee of a few wei, testnet deployment costs are negligible. ## Verification Byte-for-byte runtime comparison, masking immutables: [Verification](../verification.md). ## Security caveats - 0.8.x checked arithmetic reverts on overflow; `unchecked` blocks remove that protection. - Do not use `block.prevrandao`/`block.difficulty` as randomness: on PQWERAI it is the PoW difficulty. - `tx.origin` authentication, unbounded loops over user-controlled arrays, and reentrancy before state updates are the usual sources of loss — use checks-effects-interactions and pull payments (as `ServiceEscrow` does). - solc is GPL-3.0; your contract's license is your choice. Example repository: `developers/examples/first-contract/`, `token/`, `nft/` in the PQWERAI-testnet repository. # Vyper on PQWERAI # Vyper | | | |---|---| | Pinned compiler | `0.4.3+commit.bff19ea2` (Windows exe SHA-256 `4878e251…7c9a`) | | EVM target | `--evm-version cancun` (or `london`) | | Status | ✅ Tested: compile, deploy, call on chain 77240 (CLI); Wallet Studio Vyper support is on an unreleased branch | ## Install ```bash python3 -m venv .venv && . .venv/bin/activate pip install vyper==0.4.3 vyper --version # 0.4.3+commit.bff19ea2 ``` The pinned Vyper LICENSE contains terms beyond stock Apache-2.0; read it before redistributing the compiler. ## Example ```python title="Counter.vy" --8 Counter.bin vyper -f abi Counter.vy > Counter.abi.json # Vyper generates the ABI TX=$(cast send --async --keystore "$KEYSTORE" --password-file "$PASSWORD_FILE" --rpc-url "$RPC" --create "$(cat Counter.bin)") cast receipt "$TX" contractAddress --rpc-url "$RPC" ``` Measured: 207 runtime bytes, 98,394 deployment gas, 44,431 gas for `increment()`. ## Security caveats - Vyper had compiler bugs in older versions (notably reentrancy-lock miscompilation in 0.2.15–0.3.0); stay on the pinned version and read its advisories. - `@nonreentrant` and bounded loops are language features — use them rather than hand-rolled guards. - Verification works the same way as Solidity (compare runtime bytes; Vyper immutables are appended to runtime code). # Yul on PQWERAI # Yul | | | |---|---| | Compiler | solc 0.8.26 `--strict-assembly` | | EVM target | `--evm-version cancun` | | ABI | **None generated** — you write the dispatcher and declare the ABI yourself | | Status | ✅ Tested: compile, deploy, call | ## Example The `// @abi` comments are the convention the Wallet Studio reads to build a call interface for Yul and Huff. ```javascript title="Counter.yul" --8 Counter.bin TX=$(cast send --async --keystore "$KEYSTORE" --password-file "$PASSWORD_FILE" --rpc-url "$RPC" --create "0x$(cat Counter.bin)") ADDR=$(cast receipt "$TX" contractAddress --rpc-url "$RPC") cast send "$ADDR" "increment()" --keystore "$KEYSTORE" --password-file "$PASSWORD_FILE" --rpc-url "$RPC" cast call "$ADDR" "get()(uint256)" --rpc-url "$RPC" ``` Manual ABI for tools (`Counter.abi.json`): ```json [{"type":"function","name":"increment","inputs":[],"outputs":[],"stateMutability":"nonpayable"}, {"type":"function","name":"get","inputs":[],"outputs":[{"name":"","type":"uint256"}],"stateMutability":"view"}, {"type":"event","name":"Incremented","inputs":[{"name":"value","type":"uint256","indexed":false}],"anonymous":false}] ``` Measured: 93 runtime bytes, 73,278 deployment gas, 44,248 gas for `increment()`. ## Caveats - No overflow checks, no ABI decoding, no reentrancy protection unless you write them. - Selectors and event topics are hard-coded; a typo silently breaks the interface — test every function. - Prefer Yul *inside* Solidity (`assembly { … }`) for a few hot paths over whole-contract Yul. # Contract verification # Contract verification !!! note "No explorer verification service yet" The PQWERAI explorer does not accept or display verified source code. Until it does, verification means anyone can rebuild your published source and get the exact bytes deployed on chain. ## Procedure 1. Publish the source, the exact compiler version (`0.8.26+commit.8a97fa7a`), and all settings (optimizer runs, `evmVersion`, `bytecode_hash`/metadata, remappings, library versions). 2. Rebuild and compare the runtime code with `eth_getCode`, copying only the immutable ranges the compiler reports. ```bash title="verify.sh" --8<-- "first-contract/verify.sh" ``` ```text VERIFIED: 288 runtime bytes match (32 immutable bytes taken from chain) ``` ## Tips - `bytecode_hash = "none"` (or `--metadata-hash none`) removes the CBOR metadata hash, whose value changes with comments and file paths. Without it you must publish the exact metadata JSON as well. - Vyper appends immutables to the end of runtime code; Huff/Yul have no immutables unless you write them. - For libraries, the linked address is part of the bytes; publish it. - The Windows Wallet Studio runs the same byte-for-byte check after every deployment. # Explorer and Analytics APIs # Explorer and Analytics APIs The PQWERAI explorer (`pqwexplorer`) indexes the chain using read-only JSON-RPC, reconciles its totals exactly with Core, and serves HTML pages plus a read-only JSON API. | | | |---|---| | API | `GET /api/v1/…`, JSON, unauthenticated, read-only — [reference](reference.md) | | Schema | [OpenAPI 3.1](../downloads/explorer-openapi.yaml) · [Postman collection](../downloads/pqwerai-postman-collection.json) | | Contract test | `scripts/devhub/explorer_contract_test.py`: 35/35 PASS against a live index of the local testnet | | Storage | SQLite (tested) or PostgreSQL (implemented, not yet executed) | | Public endpoint | **Not available yet** — `explorer.pqwerai.com` is reserved; run the explorer locally | ## Coverage | Data | Endpoint | |---|---| | Blocks, transactions (with receipt status and token transfers), accounts | `/blocks`, `/block/{key}`, `/tx/{hash}`, `/address/{address}` | | ERC-20 / ERC-721 tokens | `/tokens` | | Smartnode validators, finality checkpoints | `/validators`, `/checkpoints` | | Exact supply and per-block issuance (79.2/19.8/1) | `/supply`, `/issuance` | | GhostRider mining statistics | `/mining` | | AI-market events (escrow, registry, jobs) | `/ai/events` | | Indexer health, freshness, chain identity, alarms | `/status` | Semantics (freshness, reorganisations, pagination, errors): [Data semantics](semantics.md). ## Run it locally ```bash pip install -r explorer/requirements.txt cd explorer python -m pqwexplorer all --rpc http://127.0.0.1:8545 --db sqlite:explorer.db \ --genesis /etc/pqwerai/network/genesis.json --bind 127.0.0.1 --port 8089 curl -s http://127.0.0.1:8089/api/v1/status python -m pqwexplorer reconcile --rpc http://127.0.0.1:8545 --db sqlite:explorer.db # exit 0 only if exact ``` The explorer source is in the PQWERAI-testnet repository (`explorer/`); it is not yet published separately. # Explorer REST API reference # Explorer REST reference Served by `explorer/pqwexplorer/web.py` from the indexed, reorganisation-safe database. Every endpoint is `GET`, unauthenticated and read-only. This schema is the contract tested by `scripts/devhub/explorer_contract_test.py`; an endpoint absent from it does not exist. **Canonical chain identity.** `GET /status` returns `chain_id` and `genesis`; clients must pin both. **Freshness.** Data comes from the indexed tip (`indexed_tip`). `lag_blocks = node_head - indexed_tip`. Account balances (`/address/{address}`) are read live from the node at `latest`; everything else is indexed. **Reorganisations.** The indexer replaces non-finalized blocks when a heavier branch wins (records in `reorgs_handled`). A reorganisation below the recorded finalized checkpoint is never applied: the indexer records a `finality_violation` alarm (`/status.alarms`) and stops. Treat data above `finalized_height` as reversible. **Pagination and size limits.** API v1 has no cursor or page parameters. List endpoints return a fixed newest-first window: blocks 25, issuance 50, checkpoints 100, ai/events 500, address transactions and token transfers 50 each, mining statistics over the last 64 blocks. Query strings are ignored. **Amounts.** All wei/gwei amounts that can exceed 2^53 are decimal strings. **Errors.** `400` with `{"error": ""}` for malformed path values, `404` with `{"error": "not found"}` for unknown resources and routes. Base URL: `http://127.0.0.1:8089/api/v1` (local explorer). A public explorer endpoint is not yet authorized. [Download OpenAPI 3.1](../downloads/explorer-openapi.yaml){ .md-button } [Postman collection](../downloads/pqwerai-postman-collection.json){ .md-button } | Endpoint | Summary | |---|---| | [`GET /status`](#get-status) | Chain identity, indexer freshness, finality and alarms | | [`GET /blocks`](#get-blocks) | Latest 25 indexed blocks (newest first) | | [`GET /block/{key}`](#get-block-key) | One block by decimal number, 0x-hex number or 32-byte hash | | [`GET /tx/{hash}`](#get-tx-hash) | One transaction with receipt status and decoded token transfers | | [`GET /address/{address}`](#get-address-address) | Live balance, mined blocks, latest 50 transactions and 50 token transfers | | [`GET /supply`](#get-supply) | Exact issuance counters at the indexed tip (79.2% PoW / 19.8% PoS / 1% founder) | | [`GET /issuance`](#get-issuance) | Per-block issuance for the latest 50 blocks | | [`GET /mining`](#get-mining) | GhostRider mining statistics over the latest 64 blocks | | [`GET /validators`](#get-validators) | Latest Smartnode validator snapshot (as returned by g4_validators) | | [`GET /checkpoints`](#get-checkpoints) | Latest 100 observed finalized/justified checkpoints | | [`GET /tokens`](#get-tokens) | Detected ERC-20 / ERC-721 contracts | | [`GET /ai/events`](#get-ai-events) | Latest 500 AI-market contract events decoded by signature | ## `GET /status` { #get-status } Chain identity, indexer freshness, finality and alarms. | Status | Body | |---|---| | 200 | `Status` | ```bash curl -s http://127.0.0.1:8089/api/v1/status ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `chain_id` * | integer \| null | | | `genesis` * | string \| null | | | `indexed_tip` * | integer | | | `node_head` * | integer \| null | | | `lag_blocks` * | integer \| null | | | `client` * | string \| null | | | `finalized_height` * | integer \| null | | | `finalized_hash` * | string \| null | | | `justified_height` * | integer \| null | | | `reorgs_handled` * | integer | | | `alarms` * | array | | ## `GET /blocks` { #get-blocks } Latest 25 indexed blocks (newest first). | Status | Body | |---|---| | 200 | array of `BlockSummary` (max 25) | ```bash curl -s http://127.0.0.1:8089/api/v1/blocks ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `number` * | integer | | | `hash` * | string | | | `miner` * | string | | | `ts` * | integer | Unix seconds | | `difficulty` * | string | | | `tx_count` * | integer | | | `gas_used` * | integer | | ## `GET /block/{key}` { #get-block-key } One block by decimal number, 0x-hex number or 32-byte hash. - Path parameter `key` — pattern `^([0-9]+|0x[0-9a-fA-F]+)$` | Status | Body | |---|---| | 200 | `Block` | | 400 | `Error` — {"error": "…"} | | 404 | `Error` — {"error": "…"} | ```bash curl -s http://127.0.0.1:8089/api/v1/block/ ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `number` * | integer | | | `hash` * | string | | | `parent` * | string | | | `miner` * | string | | | `ts` * | integer | | | `difficulty` * | string | | | `gas_used` * | integer | | | `gas_limit` * | integer | | | `base_fee` * | string | | | `tx_count` * | integer | | | `state_root` * | string | | | `minted` * | string | Lifetime minted wei at this block | | `pow` * | string | | | `pos` * | string | | | `founder` * | string | | | `fee_burn` * | string | | | `txs` * | array | | | `issued_in_block_wei` | string | Absent for block 0 | | `founder_in_block_wei` | string | Absent for block 0 | ## `GET /tx/{hash}` { #get-tx-hash } One transaction with receipt status and decoded token transfers. - Path parameter `hash` — pattern `^0x[0-9a-fA-F]{64}$` | Status | Body | |---|---| | 200 | `Transaction` | | 400 | `Error` — {"error": "…"} | | 404 | `Error` — {"error": "…"} | ```bash curl -s http://127.0.0.1:8089/api/v1/tx/ ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `hash` * | string | | | `block` * | integer | | | `idx` * | integer | | | `from` * | string | | | `to` * | string \| null | | | `contract` * | string \| null | Created contract address | | `value` * | string | | | `gas_used` * | integer | | | `gas_price` * | string | | | `status` * | integer | | | `input_bytes` * | integer | | | `logs` * | integer | | | `token_transfers` * | array | | ## `GET /address/{address}` { #get-address-address } Live balance, mined blocks, latest 50 transactions and 50 token transfers. - Path parameter `address` — pattern `^0x[0-9a-fA-F]{40}$` | Status | Body | |---|---| | 200 | `Address` | | 400 | `Error` — {"error": "…"} | ```bash curl -s http://127.0.0.1:8089/api/v1/address/ ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `address` * | string | | | `balance_wei` * | string \| null | Live balance at latest; null if the node is unreachable | | `blocks_mined` * | integer | | | `is_founder` * | boolean | | | `txs` * | array | | | `token_transfers` * | array | | ## `GET /supply` { #get-supply } Exact issuance counters at the indexed tip (79.2% PoW / 19.8% PoS / 1% founder). | Status | Body | |---|---| | 200 | `Supply` | ```bash curl -s http://127.0.0.1:8089/api/v1/supply ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `at_block` | integer | | | `minted_wei` | string | | | `genesis_supply_wei` | string | | | `issued_since_genesis_wei` | string | | | `pow_issued_wei` | string | | | `pos_issued_wei` | string | | | `founder_issued_wei` | string | | | `fee_burn_wei` | string | | | `circulating_wei` | string | | | `founder_address` | string \| null | | ## `GET /issuance` { #get-issuance } Per-block issuance for the latest 50 blocks. | Status | Body | |---|---| | 200 | array of `IssuanceRow` (max 50) | ```bash curl -s http://127.0.0.1:8089/api/v1/issuance ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `block` * | integer | | | `issued_wei` * | string | | | `pow_wei` * | string | | | `pos_wei` * | string | | | `founder_wei` * | string | | ## `GET /mining` { #get-mining } GhostRider mining statistics over the latest 64 blocks. | Status | Body | |---|---| | 200 | `Mining` | ```bash curl -s http://127.0.0.1:8089/api/v1/mining ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `window_blocks` | integer | | | `mean_interval_s` | number | | | `hashrate_estimate` | number | difficulty / mean interval; an estimate | | `miners` | object | | ## `GET /validators` { #get-validators } Latest Smartnode validator snapshot (as returned by g4_validators). | Status | Body | |---|---| | 200 | array of `Validator` | ```bash curl -s http://127.0.0.1:8089/api/v1/validators ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `id` * | string | | | `owner` * | string | | | `key` * | string | | | `pending_key` | boolean | | | `stake_gwei` * | integer | | | `delegated_gwei` | integer | | | `activation_epoch` | integer | | | `status` * | string | | ## `GET /checkpoints` { #get-checkpoints } Latest 100 observed finalized/justified checkpoints. | Status | Body | |---|---| | 200 | array of `Checkpoint` (max 100) | ```bash curl -s http://127.0.0.1:8089/api/v1/checkpoints ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `observed_head` * | integer | | | `finalized_height` * | integer | | | `finalized_hash` * | string | | | `justified_height` * | integer | | | `justified_hash` * | string | | ## `GET /tokens` { #get-tokens } Detected ERC-20 / ERC-721 contracts. | Status | Body | |---|---| | 200 | array of `Token` | ```bash curl -s http://127.0.0.1:8089/api/v1/tokens ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `address` * | string | | | `kind` * | string | | | `first_block` * | integer | | ## `GET /ai/events` { #get-ai-events } Latest 500 AI-market contract events decoded by signature. | Status | Body | |---|---| | 200 | array of `AiEvent` (max 500) | ```bash curl -s http://127.0.0.1:8089/api/v1/ai/events ``` ??? info "Response fields" | Field | Type | Notes | |---|---|---| | `block` * | integer | | | `event` * | string | | | `contract` * | string | | | `tx` * | string | | | `topics` * | string | JSON-encoded topic list as stored | | `data` * | string | | # Explorer data semantics # Explorer data semantics ## Canonical chain identity `GET /api/v1/status` returns `chain_id` and `genesis` (hash). Pin both; an explorer for another network will differ. `client` is the node's `web3_clientVersion`. ## Freshness | Field | Meaning | |---|---| | `indexed_tip` | Highest block in the explorer database | | `node_head` | Head reported by the node right now (null if unreachable) | | `lag_blocks` | `node_head − indexed_tip` | Indexed data (blocks, transactions, tokens, issuance, events) is as of `indexed_tip`. `/address/{address}.balance_wei` is read live from the node at `latest`. ## Reorganisations and finality - The indexer follows the heaviest chain; when a heavier branch replaces non-finalized blocks it rewrites them and records the reorganisation (`reorgs_handled`). - A reorganisation **below** the recorded finalized checkpoint is never applied: the indexer raises a `finality_violation` alarm (visible in `/status.alarms`) and stops indexing. That would indicate a consensus fault. - Treat everything above `finalized_height` as reversible. ## Pagination and size limits API v1 has **no cursor or page parameters**; query strings are ignored. Each list is a fixed newest-first window: | Endpoint | Window | |---|---| | `/blocks` | 25 blocks | | `/issuance` | 50 blocks | | `/checkpoints` | 100 observations | | `/ai/events` | 500 events | | `/address/{address}` | 50 transactions + 50 token transfers | | `/mining` | statistics over 64 blocks | For complete history use JSON-RPC (`eth_getLogs` in ≤ 5000-block ranges) or run your own explorer database. ## Amounts and types Wei and gwei values that may exceed 2^53 are **decimal strings**. Block numbers, timestamps (Unix seconds), gas and counts are integers. Addresses in responses are lower-case. ## Errors | HTTP | Body | When | |---|---|---| | 400 | `{"error": ""}` | Path value not decimal or 0x-hex | | 404 | `{"error": "not found"}` | Unknown block/transaction, unknown route | Every response carries `Content-Type: application/json; charset=utf-8`, `X-Content-Type-Options: nosniff` and a restrictive `Content-Security-Policy`. # Getting Started # Getting Started Every journey below is a sequence of shell scripts stored in `developers/examples/`. The pages include those files verbatim, and `scripts/devhub/run_examples.sh` executes the same files against a disposable local PQWERAI testnet (chain 77240) before each documentation release. The latest results are in [Source provenance](../resources/provenance.md). | Journey | You will | Time | Status | |---|---|---|---| | [Blockchain quickstart](blockchain-quickstart.md) | Check the chain ID, read a block, create an account, send PQAI, wait for BFT finality | 10 min | Tested | | [First smart contract](first-smart-contract.md) | Compile, deploy, verify and call a Solidity contract with Foundry | 10 min | Tested | | [Create a token](create-token.md) | Deploy an OpenZeppelin ERC-20 (Wallet Studio or Foundry) | 10 min | Tested | | [Create NFTs](create-nfts.md) | ERC-721 and ERC-1155: metadata, minting, transfers | 15 min | Tested | | [Become a miner](become-a-miner.md) | Run GhostRider mining and read confirmed rewards | 20 min | Rewards check tested; node setup is the operator guide | | [Set up a Smartnode](smartnode.md) | Keys, registration, staking, delegation, voting and custody | 30 min | Key generation and registry reads tested | | [AI provider quickstart](ai-provider.md) | MeshLLM boundary, opt-in policy, usage records, settlement | 30 min | Experimental, not a public service | | [Build an AI payment application](ai-payment-app.md) | Quote, fund, propose, accept, finalize, withdraw and refund on `ServiceEscrow` | 20 min | Tested | ## Before you start !!! warning "Private testnet" PQWERAI is a **private testnet**. There is no public RPC endpoint and no public faucet yet, test PQAI has no value and mainnet does not exist. You need either your own node (see [Install a node](../nodes/install.md) or the Windows Wallet's *Node* page) or an endpoint and test funds from the network operator. Tools used by the journeys: | Tool | Version tested | Notes | |---|---|---| | PQWERAI Core (`pqwerai-core`, `pqwerai-cli`) | testnet-rc1 build | Linux x86-64; Windows through WSL2 | | Foundry (`forge`, `cast`) | 1.8.5 | [foundry.paradigm.xyz](https://getfoundry.sh) | | solc | 0.8.26 | Pinned; forge downloads it when `solc_version = "0.8.26"` is set | | Python | 3.9+ | Standard library only in the examples | | curl, openssl | any | | Every journey starts by loading the same environment file: ```bash title="env.sh" --8<-- "env.sh" ``` # Build an AI payment application # Build an AI payment application This journey drives the real `ServiceEscrow` contract (revenue policy v3) through a complete paid job and a refund, with three separate keys. It is the contract the PQWERAI AI market uses; on the testnet each market deploys its own instance, so your application must be configured with the escrow address it trusts. **Prerequisites:** `env.sh`, Foundry 1.8.5, solc 0.8.26 (`SOLC=solc`), three keystores (payer funded with ≥ 0.002 PQAI plus gas, provider funded for gas, arbiter unfunded), and `ServiceEscrow.sol` (below). ```mermaid stateDiagram-v2 [*] --> Funded: fund(quote, providerSig) Funded --> Proposed: propose(receipt, tokens) [provider] Proposed --> Accepted: accept [payer] Proposed --> Disputed: dispute [payer or provider] Accepted --> Disputed: dispute [payer, within challenge window] Disputed --> Accepted: resolve(approvedCharge) [arbiter] Accepted --> Settled: finalize [anyone, after window] Funded --> Refunded: refundExpired [after service window] Proposed --> Refunded: refundExpired Disputed --> Refunded: refundExpired [arbiter silent] ``` ## The contract ??? example "ServiceEscrow.sol (MIT) — full source" ```solidity --8 640000000000000 [6.4e14] # provider credit = 640 tokens × 1e12 wei 360000000000000 [3.6e14] # payer credit = unused budget true # provider withdraw true # payer withdraw true # refund job funded 10000000000000 [1e13] # payer credit after refundExpired ``` ## Integrating from an application === "Signing the quote (provider side)" ```bash QHASH=$(cast call "$ESCROW" "quoteHash((bytes32,address,address,bytes32,uint256,uint256,uint64,uint32))(bytes32)" "$QUOTE") cast wallet sign "$QHASH" --keystore provider.json --password-file provider.pw # EIP-191 over the 32-byte hash ``` === "ethers.js v6 (not executed for this release)" ```js // provider: sign the quote hash returned by escrow.quoteHash(quote) const sig = await providerWallet.signMessage(ethers.getBytes(quoteHash)); // payer: fund exactly maxTokens * pricePerToken await escrow.connect(payer).fund(quote, sig, { value: quote.maxTokens * quote.pricePerToken }); ``` Wait for BFT finality of the `Settled` transaction before treating a payment as irreversible ([finality](../blockchain/finality.md)). Index `Funded`, `Proposed`, `Changed` and `Paid` events, or read the explorer's [`/api/v1/ai/events`](../explorer/reference.md). ## Errors (revert reasons) | Reason | Meaning | |---|---| | `job reused` | Job id already funded | | `identity` | Sender is not the quote's payer, or provider/model is zero | | `expired` | Quote expired or service window outside 1..100000 blocks | | `budget` | `msg.value` ≠ maxTokens × pricePerToken | | `untrusted quote` / `noncanonical` / `signature` | Signature not by the provider, high-s, or wrong length | | `usage` | Receipt reused, zero, or tokens > maxTokens | | `state` / `late` | Call not allowed in the current state or after the deadline | | `not expired` | `refundExpired` before the deadline | | `empty` | Nothing to withdraw | # AI provider quickstart # AI provider quickstart !!! warning "Experimental — not a public service" AI sharing is implemented and tested **locally** (single operator). There is no public provider network, no independent provider cohort and no public model gateway. Usage receipts are provider-signed claims, not proof of GPU work. Nothing on this page earns block rewards. ## Boundaries ```mermaid flowchart LR U[Application / wallet] -- OpenAI-compatible HTTP on loopback --> M[MeshLLM runtimeseparate process] M -- signed usage record --> P[Provider agent] P -- propose usage --> E[(ServiceEscrowon chain)] U -- fund / accept / dispute --> E N[PQWERAI nodeconsensus + EVM] --- E M -. never inside .- N ``` - **AI never runs inside consensus.** A stopped or compromised MeshLLM cannot stop nodes from validating blocks. - Prompts and responses never go on chain; only quote hashes, receipt commitments and amounts do. - Inference only: paid training, training grants and training rewards are out of scope for testnet-rc1. ## 1. Run MeshLLM locally The project pins upstream MeshLLM (0.78.x) and a GGUF model by SHA-256; the supervisor verifies publisher/product/ native-file hashes before starting it with `--local-model-only`, isolates its data directory and disables analytics, default plugins and prompt disk caching. There is no downloader: install the pinned files yourself. Wallets and clients reach the runtime only on literal loopback: `http://127.0.0.1:/v1` (OpenAI-compatible). ## 2. Opt in with a provider policy The Windows Wallet's **AI Sharing** page (Advanced mode) writes the same policy the runtime client uses: | Setting | Meaning | |---|---| | Inference / hosting consent | Nothing is served until you opt in | | GPU, CPU, power, temperature, bandwidth limits | Admission checks before each job (not physical limits) | | Hours (UTC) | When the node accepts work | | Minimum price | Lowest `pricePerToken` you will quote | | Payout address | Settlement address (separate from mining and validator keys) | "Ask the model" sends a local test request and shows an **unverified, not payable** usage observation. ## 3. Usage records and settlement 1. The provider signs a **quote** (job id, payer, provider, model id, max tokens, price per token, expiry, service window) bound to chain ID 77240 and the escrow address. 2. The payer funds the job in [`ServiceEscrow`](../ai/service-escrow.md) with exactly `maxTokens × pricePerToken`. 3. After serving, the provider proposes usage with a receipt commitment (hash of its signed usage record). 4. The payer accepts or disputes; a trusted arbiter resolves disputes; unaccepted jobs refund after the window. 5. Funds are paid by pull withdrawal. Revenue policy v3: the provider receives the remainder after deployment-configured payees; the testnet default has no payees, so the provider receives 100 %. The full flow is executable in [Build an AI payment application](ai-payment-app.md). ## Limits you must design for - Finality: an escrow allocation in a non-finalized block can be reorganised away. Deliver irreversible goods only after the settlement block is BFT-finalized. - Arbiter and payer acceptance are trust assumptions; signed usage authenticates the provider's report, not its truth. - Multi-operator routing, accountable hardware measurement and model-poisoning evaluation remain open work ([known gaps](../resources/gaps.md)). # Become a miner # Become a miner (GhostRider) PQWERAI blocks are sealed by **GhostRider proof of work** computed by a pinned native helper (`pqwerai_hash_worker`). Mining is CPU-only. Every node verifies the helper's SHA-256 and refuses any other binary. **Prerequisites:** a synced PQWERAI node ([Install a node](../nodes/install.md)), Linux x86-64 (Windows: WSL2), an address for rewards whose key is **not** stored on the mining host. ## 1. Choose how to run the node === "VPS / Linux service" Edit `/etc/pqwerai/core.env` (installed by the release package): ```bash PQWERAI_MINE=true PQWERAI_ETHERBASE=0xYourRewardAddress # key kept elsewhere (hardware wallet, offline machine) ``` ```bash sudo systemctl restart pqwerai-core journalctl -u pqwerai-core -f | grep -i -E "sealed|mined|GhostRider" ``` === "Windows Wallet" *Node* page → **Set up and start my node** (runs the verified Linux Core inside WSL2) → **Mine with this node**. Rewards go to the selected wallet account. === "Direct command" ```bash pqwerai-core --datadir ./data --genesis genesis.json \ --helper ./pqwerai_hash_worker \ --helper-sha256 3a54f0bb461f296b606c9386c68ebf37514a703e5dbff3de4c4a5828637099a8 \ --difficulty 64 --expect-genesis-hash \ --mine --etherbase 0xYourRewardAddress ``` `--difficulty` must equal the network's base difficulty (64 for testnet-rc1, see [network parameters](../blockchain/network-parameters.md)). All flags: [Core CLI](../tools/core-cli.md). ## 2. How difficulty and rewards work - Target block interval 3–7 s. Difficulty doubles after a block ≤ 2 s and halves after a block ≥ 8 s, clamped to [base, 16 × base]. Above roughly 1024 hashes per 3 s of aggregate hash rate, blocks come faster than the band. - Fork choice: greatest total difficulty; the node never reorganises below the BFT-finalized checkpoint. - Each block's new issuance is split **79.2 % to the miner, 19.8 % to active Smartnode validators, 1 % to the founder treasury**. Transfers, gas fees and AI payments are never taxed. The base fee is burned; the priority fee goes to the miner. There is no supply cap. - Rewards are exact integers kept by consensus; `g4_status` exposes the lifetime counters. ## 3. Inspect confirmed rewards ```bash title="mining/check-rewards.sh" --8<-- "mining/check-rewards.sh" ``` Expected output (local testnet, numbers differ): ```text head 4501 finalized 4448 pow_issued_wei 1.475139 PQAI pos_issued_wei 0.368785 PQAI founder_issued_wei 0.018625 PQAI fee_burn_wei 0.001109 PQAI minted_wei 1019143.862550 PQAI 1.512361080541570015 20 ``` `minted_wei` includes the genesis allocations; `pow/pos/founder` are issuance since genesis. Treat rewards in blocks above `finalized_height` as reversible. The explorer shows per-block issuance at [`/api/v1/issuance`](../explorer/reference.md). ## Operational guidance - Do not run AI hosting on the cores you mine with (`cpu_affinity` in the AI configuration). - Keep the reward key off the server; a compromised miner should only lose electricity. - A node with a different genesis, chain ID or helper hash cannot peer or will refuse to start — that is intended. ## Troubleshooting | Symptom | Cause | |---|---| | `--mine requires --etherbase` | Set `PQWERAI_ETHERBASE` / `--etherbase` | | `helper SHA-256 mismatch` | Wrong or modified helper binary — use the release package | | Blocks found but reorganised away | Another miner's heavier branch won before finality; normal below the finalized checkpoint | | `eth_getWork` returns `no mining work available yet` | The legacy external-miner interface is not how GhostRider mining works; mine inside the node | # Blockchain quickstart # Blockchain quickstart **Prerequisites:** a reachable PQWERAI node (local node on `127.0.0.1:8545` or an endpoint from the network operator), [Foundry](../tools/foundry.md) 1.8.5, `curl`, `openssl` and Python 3. **Environment constraints:** private testnet only; amounts are test PQAI. ```bash mkdir pqwerai-quickstart && cd pqwerai-quickstart # save env.sh from the Getting Started page here, then: export PQWERAI_RPC=http://127.0.0.1:8545 # or the endpoint you were given . ./env.sh ``` ## 1. Check the network Never sign anything for an endpoint that reports another chain. The PQWERAI testnet chain ID is **77240** (`0x12db8`). ```bash title="quickstart/check-network.sh" --8 --value 20ether --keystore --rpc-url "$RPC"`. ## 4. Send a test transaction ```bash title="quickstart/send-transaction.sh" --8<-- "quickstart/send-transaction.sh" ``` ```text tx: 0x3d4ab2e584d4b8260dceaff66ff4f3a99b7f310e2764dcf062f0fc7cfe39cf69 true included in block 4389 19.989999999999832000 ``` ## 5. Wait for finality A receipt means the transaction is in the current canonical chain. On PQWERAI a block becomes irreversible when a BFT checkpoint at or above it is finalized by more than 2/3 of the Smartnode stake ([details](../blockchain/finality.md)). ```bash title="quickstart/wait-finality.sh" --8<-- "quickstart/wait-finality.sh" ``` ```text finalized (checkpoint 4416) ``` In the tested run this took about 8 minutes (two 32-block epochs at 3–7 s per block). ## Common errors | Symptom | Cause | Fix | |---|---|---| | `not chain 77240` | Wrong endpoint or a different network | Use a PQWERAI testnet node; never override the chain ID check | | `Connection refused` on `127.0.0.1:8545` | Node not running, or RPC on another port | `pqwerai-health`, or check `PQWERAI_RPC_PORT` in `/etc/pqwerai/core.env` | | HTTP `401 unauthorized` | Remote node uses `--rpc.token-file` | Add `-H "Authorization: Bearer …"` (curl) or use a local node | | `insufficient funds for gas * price + value` | Account not funded | Fund it (step 3) | | `nonce too low` | Another transaction from the same account was mined | Re-run; cast fetches the next nonce | | Finality loop never ends | Less than 2/3 of validator stake online; PoW continues but finality stalls | Check `g4_status`; the network operator must restore validator quorum | | `unknown account` | You called `eth_sendTransaction`; the node holds no keys | Sign locally (cast, wallet) — PQWERAI never unlocks accounts on nodes | # Create NFTs # Create NFTs (ERC-721 and ERC-1155) | Standard | Use it for | Tooling on PQWERAI | |---|---|---| | ERC-721 | Unique items, one owner per token ID | Foundry/Hardhat (tested); Windows Wallet Studio *NFT collection* template; wallet shows and transfers ERC-721 | | ERC-1155 | Many token types in one contract (fungible and unique) | Foundry/Hardhat (tested). The Windows Wallet 0.6.0 does not display ERC-1155 balances; a Studio wizard exists only on an unreleased branch | ## Metadata The chain stores only a URI. Host JSON metadata and images on IPFS (content-addressed, preferred) or HTTPS. ```json title="metadata-1.json" --8/1`). - ERC-1155: `uri(id)` returns a template with `{id}`; clients substitute the 64-character lower-case hex ID (`…/0000…0007.json`). ## Contracts === "ERC-721" ```solidity title="src/PQCollection.sol" --8/1" true 0x000000000000000000000000000000000000bEEF # ownerOf(1) after transfer … true true 60 # ERC-1155 balance of id 7 (me) 40 # ERC-1155 balance of id 7 (recipient) "ipfs:///{id}.json" ``` ## Notes and errors - `_safeMint` / `safeTransferFrom` call `onERC721Received` / `onERC1155Received` when the recipient is a contract; a contract without the hook makes the transfer revert (`ERC721InvalidReceiver`, `ERC1155InvalidReceiver`). - Minting is owner-only in these examples (`OwnableUnauthorizedAccount` otherwise). - The explorer indexes ERC-721 transfers; ERC-1155 `TransferSingle`/`TransferBatch` are not decoded yet ([known gaps](../resources/gaps.md)). # Create a token # Create a token (ERC-20) Two routes produce a standard ERC-20 on chain 77240. Both use **OpenZeppelin Contracts 5.0.2** and **solc 0.8.26**. === "PQWERAI Wallet Studio (no code)" 1. Install the [PQWERAI Windows Wallet](../tools/windows-wallet.md) 0.6.0 and connect it to a node. 2. Open **Studio** → *Contract type: Token (ERC-20)*. 3. Fill *Name and symbol*, *Supply*, optional *Features*, and the *Owner* (defaults to the selected account). 4. **Review** shows every parameter, the fee and the chain ID; confirm with your password. 5. **Verify and track**: the wallet compares the deployed runtime with its shipped artifact byte-for-byte, reads back name, symbol, supply and owner, and adds the token to *Tokens*. The token template is precompiled (deterministic, zero warnings), so no compiler is needed. Studio can also deploy custom Solidity pasted from an editor or AI assistant; that code is labelled *unaudited*. === "Foundry" **Prerequisites:** the quickstart account and `env.sh`; the [first contract](first-smart-contract.md) setup. ```bash title="install-openzeppelin.sh" --8<-- "token/install-openzeppelin.sh" ``` ```solidity title="src/PQToken.sol" --8<-- "token/src/PQToken.sol" ``` ```bash title="deploy-token.sh" --8<-- "token/deploy-token.sh" ``` Expected output: ```text "Tutorial Token" 1000000000000000000000000 [1e24] true 250000000000000000000 [2.5e20] 999750000000000000000000 [9.997e23] true 251000000000000000000 [2.51e20] ``` ## Design notes - **Decimals.** OpenZeppelin defaults to 18. Amounts on chain are integers: `250 TUT = 250 × 10^18`. - **Supply policy.** This example has an owner-only `mint`. Remove it (and `Ownable`) for a fixed supply. - **Ownership.** See [Access control and ownership](../contracts/guides/access-control.md) for two-step transfer and roles. - **Wallet display.** The Windows Wallet discovers ERC-20 balances from `Transfer` events and warns about tokens that impersonate native PQAI or use hidden characters in their names. - **Explorer.** The explorer indexes ERC-20 transfers ([`/api/v1/tokens`](../explorer/reference.md)); it does not read token names or verify source yet. ## Common errors | Error | Cause | |---|---| | `OwnableUnauthorizedAccount(0x…)` | `mint` called by an account that is not the owner | | `ERC20InsufficientBalance` | Transfer larger than the sender's balance | | `Constructor argument count mismatch` | `--constructor-args` placed before other options | | `Source "@openzeppelin/…" not found` | Library not installed, or `remappings` missing in `foundry.toml` | # First smart contract # First smart contract **Prerequisites:** the [quickstart](blockchain-quickstart.md) account (funded) and `env.sh`, Foundry 1.8.5. **Result:** a `Counter` contract deployed, verified byte-for-byte and called. ## 1. Project layout ```text first-contract/ ├── foundry.toml └── src/Counter.sol ``` ```toml title="foundry.toml" --8 24,576 bytes (EIP-170). Split the contract or use libraries | Next: [Create a token](create-token.md) · [Language center](../contracts/languages/index.md) # Set up a Smartnode # Set up a Smartnode Smartnodes are stake-backed validators. They do **not** produce blocks (GhostRider miners do); they sign checkpoint votes every 32-block epoch, and a checkpoint signed by more than 2/3 of the epoch set's effective stake becomes final. Validators earn 19.8 % of block issuance for active duties and lose 25 % of stake (burned) for equivocation. !!! warning "What was tested for this page" Key generation and the registry/finality reads below were executed against the local testnet. Registration, delegation and exit were **not** re-run for this documentation release because a registered validator that does not sign reduces finality participation on the shared test network; those commands come from the operator guide and the Windows Wallet's tested Smartnode page. ## 1. Requirements and custody - A host that runs a synced node and **exactly one** signer per validator key, ever. Two signers with the same key will equivocate and be slashed. - An **owner** account (secp256k1, holds the stake, receives rewards) — keep it in a wallet, not on the validator host. - A **BFT key** (Ed25519) generated on the validator host. Only its `public` field ever leaves the host. - The signer's anti-equivocation journal must never be restored from an old backup (the backup tool skips it on purpose). ## 2. Generate the validator key (on the validator host) ```bash title="smartnode/keygen-and-inspect.sh" --8 -password-file owner.pw \ sn-register -from 0xOwner -keyfile sn-key.json -stake 32 ``` Genesis validators instead send their public key and payout address to the network owner before the genesis ceremony. The Windows Wallet offers the same flow under *Smartnodes → Register* (Advanced mode). ## 4. Run the signer (voting) ```bash sudo systemctl enable --now pqwerai-validator@ # key + password in /etc/pqwerai/validator// (0600) ``` The signer fetches the next checkpoint link (`g4_link`), signs it, and submits it to its own node with `g4_submitVote`. The node verifies the signature against the epoch validator set, rejects replays and stale votes, and relays a certificate once a quorum exists. These are [operator interfaces](../reference/json-rpc/operator.md): never expose them publicly. ## 5. Delegation, rewards, rotation, exit ```bash pqwerai-cli … sn-delegate -from 0xDelegator -id -amount 5 # min 0.001 PQAI pqwerai-cli … sn-undelegate -from 0xDelegator -id -amount 5 pqwerai-cli … sn-claim -from 0xOwner -id pqwerai-cli … sn-rotate -from 0xOwner -id -keyfile new-key.json # then restart the signer pqwerai-cli … sn-exit -from 0xOwner -id pqwerai-cli … sn-withdraw -from 0xOwner -id # only after unbonding + finality pqwerai-cli … sn-slash -from 0xAnyone -vote-a -vote-b # report double/surround votes ``` Registry operations are ordinary transactions to the registry system account (gas 150,000 each); see [Registry operations](../smartnodes/registry-operations.md). ## 6. Finality health - `g4_status.finalized_height` should advance every one or two epochs. - With less than 2/3 of stake signing, PoW blocks continue but finality stalls until quorum returns. - Candidate `liveness/v1` genesis profile (experimental, active on the local testnet): validators that carry no vote for K consecutive checkpoints are force-exited (not slashed); `g4_status.liveness_ejected_validators` counts them. ## Common errors | Error | Cause | |---|---| | `vote does not authenticate against the checkpoint validator set` | Key not in the epoch set yet (activation delay) or wrong key | | `stale vote: target at or below the finalized checkpoint` | Signer behind; harmless | | withdraw refused | Unbonding not complete or withdrawable epoch not yet finalized | | signer refuses to sign | Its journal detected a would-be double or surround vote — do not delete the journal | # GhostRider Mining # GhostRider Mining | | | |---|---| | Algorithm | GhostRider, computed by the pinned native helper `pqwerai_hash_worker` (Linux x86-64; Windows via WSL2) | | Helper pin | SHA-256 `3a54f0bb461f296b606c9386c68ebf37514a703e5dbff3de4c4a5828637099a8`, committed in the genesis | | Block interval | 3–7 s target band | | Difficulty | Base 64, adaptive: ×2 after a block ≤ 2 s, ÷2 after ≥ 8 s, clamped to [base, 16 × base] | | Fork choice | Greatest total difficulty; ties keep the local head; never below the BFT-finalized checkpoint | | Reward share | 79.2 % of each block's issuance + priority fees | Start mining: [Become a miner](../getting-started/become-a-miner.md). Reward accounting: [Rewards and issuance](rewards-and-issuance.md). ## Design boundaries - **Genesis binding:** genesis `extraData` commits to the GhostRider profile (base difficulty, adaptive flag, helper SHA-256, stream mode and the finality profile). A node with another helper or profile cannot follow the chain. - **Mining ≠ AI.** Mining, EVM execution and AI inference are separate processes. AI work never earns block rewards. - **Known limit:** the 16 × base clamp bounds how much aggregate hash rate the difficulty algorithm absorbs; above roughly 1024 hashes per 3 s blocks arrive faster than the band. A revised difficulty rule is a candidate, not active. - **External miners:** the legacy `eth_getWork`/`eth_submitWork` interface is registered but is not how GhostRider mining operates; there is no pool protocol in testnet-rc1. # Rewards and issuance # Rewards and issuance | Rule | Value | |---|---| | Split of each block's new issuance | **79.2 %** GhostRider miner · **19.8 %** active Smartnode validators (for authenticated duties) · **1 %** founder treasury | | Founder share | Carved out of the same issuance — no extra supply, never charged on transfers, gas or AI payments | | Supply cap | None (uncapped by policy) | | Base fee | Burned (`fee_burn_wei`) | | Priority fee | To the block's miner | | AI service revenue | Separate: paid by customers through escrow, never minted ([revenue policy](../ai/revenue-policy.md)) | The issuance *schedule* on the private testnet is an Ethereum-derived local reference; read actual amounts from the counters below instead of assuming a fixed block reward. ## Exact counters Consensus keeps lifetime counters in a system account; `g4_status` returns them as decimal strings of wei: | Field | Meaning | |---|---| | `minted_wei` | Total supply minted including genesis allocations | | `pow_issued_wei` | Issued to miners | | `pos_issued_wei` | Issued to validators | | `founder_issued_wei` | Issued to the founder treasury | | `fee_burn_wei` | Base fees burned | ```bash title="mining/check-rewards.sh" --8<-- "mining/check-rewards.sh" ``` The explorer reads the same counters at every block hash, so per-block issuance and supply are exact: [`/api/v1/supply`](../explorer/reference.md#get-supply), [`/api/v1/issuance`](../explorer/reference.md#get-issuance). Circulating supply as reported by the explorer = `minted − fee_burn`. # Node Operations and Infrastructure # Node Operations and Infrastructure | Task | Page | |---|---| | Requirements, install, configure, firewall, start | [Install a node](install.md) | | Expose JSON-RPC to wallets safely (TLS, token, rate limits) | [RPC exposure and security](rpc-security.md) | | Metrics, alerts, backup/restore, upgrades and rollback | [Monitoring, backup, upgrades](operations.md) | | All `pqwerai-core` flags | [Core CLI and flags](../tools/core-cli.md) | | Mining | [Become a miner](../getting-started/become-a-miner.md) | | Validator signer | [Set up a Smartnode](../getting-started/smartnode.md) | Principles: every host runs the same pinned release; bootstrap nodes have no consensus privileges; RPC stays on loopback; secrets are referenced by path and never placed in config files; validator keys live on exactly one host. # Install a node # Install a node (Ubuntu) | | Minimum | Recommended | |---|---|---| | OS | Ubuntu 22.04 or 24.04 LTS, x86-64 | 24.04 LTS | | CPU | 2 vCPU (AVX2 helps GhostRider) | 4+ vCPU for mining | | RAM | 4 GB | 8 GB | | Disk | 40 GB SSD (archive node) | 100 GB | | Network | public IPv4, TCP 30303 | + UDP 30303 for discovery | ## 1. Download and verify Obtain the release tarball and the network folder (`genesis.json`, `genesis.json.profile.json`, `GENESIS_MANIFEST.json`, `bootnodes.txt`) from the network operator over a trusted channel. ```bash sha256sum pqwerai-v8-testnet-rc1-linux-amd64.tar.gz # must equal the published value tar -xzf pqwerai-v8-testnet-rc1-linux-amd64.tar.gz cd pqwerai-v8-testnet-rc1-linux-amd64 && sha256sum -c SHA256SUMS ``` Builds are reproducible: two independent builds of the same commit produce bit-identical binaries. ## 2. Install ```bash sudo ./share/vps/install.sh ../pqwerai-v8-testnet-rc1-linux-amd64.tar.gz /path/to/network ``` Creates the `pqwerai` and `pqwerai-signer` users, `/opt/pqwerai/releases/` with `/opt/pqwerai/current`, `/var/lib/pqwerai` (0700), `/etc/pqwerai`, systemd units, journald limits and logrotate, and verifies the genesis files against the manifest. ## 3. Configure `/etc/pqwerai/core.env` ```bash PQWERAI_DATADIR=/var/lib/pqwerai/core PQWERAI_P2P_PORT=30303 PQWERAI_NAT=extip:203.0.113.10 # your public IP so peers can dial back PQWERAI_MAXPEERS=25 PQWERAI_DISCOVERY=true # seeded from /etc/pqwerai/network/bootnodes.txt PQWERAI_RPC_ADDR=127.0.0.1 # never bind RPC publicly; use the TLS proxy PQWERAI_RPC_PORT=8545 PQWERAI_PASE_WORKERS=0 # 0 = canonical serial (default); 2..64 = PASE, consensus-neutral PQWERAI_MINE=false #PQWERAI_ETHERBASE=0x… # rewards address; keep its key off the server PQWERAI_VERBOSITY=3 ``` ## 4. Firewall ```bash sudo /opt/pqwerai/current/share/vps/firewall/ufw.sh --discovery [--ssh-from ] [--https] ``` Opens only P2P (and 80/443 with `--https` for the RPC proxy). Ports 8545 (RPC), 9545 (metrics) and signer traffic are never public. ## 5. Start and check ```bash sudo systemctl enable --now pqwerai-core pqwerai-exporter pqwerai-health # chain 77240, manifest genesis, peers > 0, advancing head pqwerai-cli -rpc http://127.0.0.1:8545 status sudo systemctl stop pqwerai-core # graceful: up to 180 s to flush ``` A node refuses to start on a datadir created for another genesis, and cannot peer with nodes of another chain. ## Windows There is no native Windows Core. The Windows Wallet's *Node* page runs the same verified Linux build inside WSL2. # Monitoring, backup and upgrades # Monitoring, backup and upgrades ## Monitoring `pqwerai-exporter` serves Prometheus metrics on `127.0.0.1:9545/metrics`. Scrape over an SSH tunnel or VPN, or allow one monitoring IP (`ufw.sh --metrics-from `). Shipped alert rules (`monitoring/alerts.yml`): | Alert | Meaning | |---|---| | `PqwChainStalled` | Head not advancing | | `PqwFinalityStalled`, `PqwFinalityLagHigh` | Finalized checkpoint not advancing / far behind head | | `PqwPeerIsolation` | Too few peers | | `PqwSignerOffline` | Validator signer not voting | | `PqwPersistentFork`, `PqwReorgDeep`, `PqwWrongChain` | Fork or identity problems | | `PqwIssuanceMismatch` | Issuance counters disagree with expectations | | `PqwDiskNearlyFull`, `PqwMemoryLow`, `PqwRpcErrorSpike` | Host health | | `PqwAIProviderDown` | Optional AI provider service down | ## Backup and restore ```bash sudo /opt/pqwerai/current/share/vps/bin/pqwerai-backup create /srv/backups # stops, archives, restarts sudo /opt/pqwerai/current/share/vps/bin/pqwerai-backup restore /srv/backups/pqwerai-core--.tar.zst ``` Restore verifies the checksum and that the archive belongs to this network's genesis. **Validator signer journals are deliberately excluded** — restoring a stale journal can cause a slashable double vote. ## Upgrade and rollback ```bash sudo pqwerai-release install pqwerai-v8-testnet-rc2-linux-amd64.tar.gz sudo pqwerai-release activate # restarts, health-checks, auto-rolls back on failure sudo pqwerai-release rollback # previous release pqwerai-release list ; pqwerai-release current ``` The datadir is never modified by the release tool. A release that changes `protocol_version` needs a coordinated, announced activation height — read the release notes first. # RPC exposure and security # RPC exposure and security ## Defaults that protect you - The node binds JSON-RPC to `127.0.0.1:8545`. Binding any other address requires `--rpc.token-file` (bearer token ≥ 16 bytes, compared in constant time); otherwise the node refuses to start. - `personal`, `admin`, `debug`, `miner`, `clique` and `engine` are **not compiled into the RPC server** (probed: `-32601`). - The node holds no user keys: signing RPCs return `unknown account`. - Request bodies are capped at 4 MiB; slow clients are bounded by read/write/idle timeouts. ## Offering a public wallet endpoint Use the shipped nginx proxy (`vps/proxy/nginx-pqwerai-rpc.conf`), never the raw port: ```bash sudo apt-get install -y nginx certbot python3-certbot-nginx sudo cp /opt/pqwerai/current/share/vps/proxy/nginx-pqwerai-rpc.conf /etc/nginx/sites-available/pqwerai-rpc # set server_name sudo ln -s /etc/nginx/sites-available/pqwerai-rpc /etc/nginx/sites-enabled/ && sudo certbot --nginx -d ``` | Limit | Value | |---|---| | Transport | HTTPS (TLS 1.2+), `POST /` only | | Body | 256 KiB at the proxy | | Rate | 20 requests/s per IP, burst 40; 20 concurrent connections per IP | | Timeouts | 10 s body, 30 s upstream | | Logging | access log without bodies | ## Methods a public proxy should not forward The [operator interfaces](../reference/json-rpc/operator.md) — `eth_getWork`, `eth_submitWork`, `eth_submitHashrate`, `g4_submitVote`, `g4_link`, `g4_context`, `pqwerai_peerHealth` — are registered on the node. `g4_submitVote` is signature-verified and rate-limited, but a public endpoint has no reason to accept validator traffic; validators submit to their own node. Consider an allowlist of the [public methods](../reference/json-rpc/index.md). ## For endpoint users Pin chain ID 77240 and the manifest genesis hash, never send keys or passwords to an endpoint, and do not trust one endpoint for finality — compare `g4_status.finalized_hash` across operators or run a node. # API playground # API playground **Read-only by design.** Only methods classified *public read-only* in the reviewed [RPC policy](reference/json-rpc/index.md) appear here. The playground never asks for keys, seed phrases or bearer tokens and cannot submit transactions, votes or mining work. There is no public PQWERAI RPC endpoint yet, so the default environment shows **recorded examples**, clearly labelled with their recording time and block height. Loading the method inventory… ## Environments | Environment | What happens | |---|---| | Recorded examples | No network request. Shows the real response recorded from a disposable local testnet, with its timestamp and head. | | My local node | Your browser sends the request to `http://127.0.0.1:8545`. Browsers block this from an https page unless you open a local copy of the docs; PQWERAI Core sends no CORS headers. | | Custom endpoint | Your browser sends the request to the URL you enter, only for read-only methods. Use endpoints you trust; do not paste tokens into URLs. | The generated curl, JavaScript, Python and ethers.js snippets are the reliable way to run a request against any node. # JSON-RPC reference # JSON-RPC reference PQWERAI Core speaks Ethereum JSON-RPC 2.0 over HTTP `POST /`. Every method on these pages was extracted from the Core source and then confirmed registered on a running node; recorded responses are real outputs of a disposable local testnet. Nothing here is a mock. | Inventory | Value | |---|---| | Methods served (source ∩ live) | **72** | | Public methods | 60 | | Operator / unsupported / disabled | 12 | | Core source revision | `bad4a06ea6c334e0b646ff1871b721704157dad9` | | Live client | `CoreGeth/linux-amd64/go1.26.8` | | Inventory generated | 2026-11-07T18:41:02+00:00 | | Namespace | Purpose | |---|---| | [eth](eth.md) | Chain data, accounts, calls, gas and fees, transactions, logs and filters | | [net](net.md) | Network ID and peers | | [web3](web3.md) | Client version, Keccak-256 | | [txpool](txpool.md) | Pending/queued transaction inspection | | [g4](g4.md) | PQWERAI finality, Smartnode registry, issuance counters | | [Operator interfaces](operator.md) | Mining, validator voting, diagnostics, unsupported and disabled methods | | [Errors and limits](errors.md) | Error codes, size and range limits | ## Transport and limits - Default bind `127.0.0.1:8545`; a non-loopback bind requires `--rpc.token-file` (bearer token ≥ 16 bytes, constant-time compare). - Request body limit 4 MiB at the node; public proxies apply 256 KiB, 20 requests/s per IP (burst 40). - HTTP only (no WebSocket): `eth_subscribe` is not available; poll with filters or block numbers. - `eth_getLogs` range ≤ `--rpc.logs-max-range` (default 5000 blocks); `eth_getFilterLogs` is disabled. - Batch requests follow go-ethereum semantics. ## Machine-readable - [rpc-methods.json](../../downloads/rpc-methods.json) — full inventory with classes, sources and recorded examples - [pqwerai-openrpc.json](../../downloads/pqwerai-openrpc.json) — OpenRPC 1.2.6 document of the public methods - [Postman collection](../../downloads/pqwerai-postman-collection.json) # JSON-RPC errors and limits # Errors and limits | Code | Meaning | Typical cause | |---|---|---| | `-32700` | Parse error | Body is not valid JSON | | `-32600` | Invalid request | Missing `jsonrpc`/`method`, wrong shape | | `-32601` | Method not found | Method or namespace not served (e.g. `personal_*`, `admin_*`, `debug_*`) | | `-32602` | Invalid params | Wrong count or type, e.g. `missing value for required argument 0` | | `-32000` | Server error | Execution/validation failure: `unknown account`, `nonce too low`, `insufficient funds`, revert | | `3` | Execution reverted | `eth_call`/`eth_estimateGas` revert with ABI-encoded reason in `data` | | HTTP 401 | Unauthorized | Missing or wrong bearer token on a token-protected node | | HTTP 413 | Payload too large | Body above the node (4 MiB) or proxy (256 KiB) limit | | HTTP 429 | Too many requests | Public proxy rate limit | ## Errors recorded on a live node | Request | Response | |---|---| | `eth_getBlockByNumber` `["latest"]` | `{"code": -32602, "message": "missing value for required argument 1"}` | | `eth_getFilterLogs` `["0x1"]` | `{"code": -32000, "message": "eth_getFilterLogs is disabled; use eth_getLogs (bounded range) or eth_getFilterChanges"}` | | `eth_getWork` `[]` | `{"code": -32000, "message": "no mining work available yet"}` | | `eth_sendRawTransaction` `["0x00"]` | `{"code": -32000, "message": "typed transaction too short"}` | | `eth_sendTransaction` `[{"from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "to": "0xfedcd2b6768f15e` | `{"code": -32000, "message": "unknown account"}` | | `eth_sign` `["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "0x00"]` | `{"code": -32000, "message": "unknown account"}` | | `g4_context` `[0, 1]` | `{"code": -32000, "message": "invalid checkpoint link"}` | # JSON-RPC: eth namespace # eth namespace Ethereum-compatible chain, account, transaction, fee, call and log methods served by PQWERAI Core. 48 public methods. Operator, disabled and unsupported methods of this namespace are listed in [Operator interfaces](operator.md). `$RPC` is your node URL (see [quickstart](../../getting-started/blockchain-quickstart.md)). | Method | Access | Summary | |---|---|---| | [`eth_accounts`](#eth_accounts) | Public · read-only | Returns the collection of accounts this node manages. | | [`eth_blockNumber`](#eth_blocknumber) | Public · read-only | Returns the block number of the chain head. | | [`eth_call`](#eth_call) | Public · read-only | Executes the given transaction on the state for the given block number | | [`eth_chainId`](#eth_chainid) | Public · read-only | Is the EIP-155 replay-protection chain id for the current Ethereum chain config | | [`eth_coinbase`](#eth_coinbase) | Public · read-only | Is the address that mining rewards will be sent to (alias for Etherbase). | | [`eth_createAccessList`](#eth_createaccesslist) | Public · read-only | Creates an EIP-2930 type AccessList for the given transaction | | [`eth_estimateGas`](#eth_estimategas) | Public · read-only | Returns the lowest possible gas limit that allows the transaction to run successfully at block `blockNrOrHash` | | [`eth_etherbase`](#eth_etherbase) | Public · read-only | Is the address that mining rewards will be sent to. | | [`eth_feeHistory`](#eth_feehistory) | Public · read-only | Returns the fee market history. | | [`eth_fillTransaction`](#eth_filltransaction) | Public · read-only | Fills the defaults (nonce, gas, gasPrice or 1559 fields) on a given unsigned transaction, and returns it to th | | [`eth_gasPrice`](#eth_gasprice) | Public · read-only | Returns a suggestion for a gas price for legacy transactions. | | [`eth_getBalance`](#eth_getbalance) | Public · read-only | Returns the amount of wei for the given address in the state of the given block number | | [`eth_getBlockByHash`](#eth_getblockbyhash) | Public · read-only | Returns the requested block | | [`eth_getBlockByNumber`](#eth_getblockbynumber) | Public · read-only | Returns the requested canonical block | | [`eth_getBlockReceipts`](#eth_getblockreceipts) | Public · read-only | Returns the block receipts for the given block hash or number or tag. | | [`eth_getBlockTransactionCountByHash`](#eth_getblocktransactioncountbyhash) | Public · read-only | Returns the number of transactions in the block with the given hash. | | [`eth_getBlockTransactionCountByNumber`](#eth_getblocktransactioncountbynumber) | Public · read-only | Returns the number of transactions in the block with the given block number. | | [`eth_getCode`](#eth_getcode) | Public · read-only | Returns the code stored at the given address in the state for the given block number. | | [`eth_getFilterChanges`](#eth_getfilterchanges) | Public · read-only (stateful filter) | Returns the logs for the filter with the given id since last time it was called | | [`eth_getHashrate`](#eth_gethashrate) | Public · read-only | Returns the current hashrate for local CPU miner and remote miner. | | [`eth_getHeaderByHash`](#eth_getheaderbyhash) | Public · read-only | Returns the requested header by hash. | | [`eth_getHeaderByNumber`](#eth_getheaderbynumber) | Public · read-only | Returns the requested canonical block header | | [`eth_getLogs`](#eth_getlogs) | Public · read-only | Returns logs matching a filter | | [`eth_getProof`](#eth_getproof) | Public · read-only | Returns the Merkle-proof for a given account and optionally some storage keys. | | [`eth_getRawTransactionByBlockHashAndIndex`](#eth_getrawtransactionbyblockhashandindex) | Public · read-only | Returns the bytes of the transaction for the given block hash and index. | | [`eth_getRawTransactionByBlockNumberAndIndex`](#eth_getrawtransactionbyblocknumberandindex) | Public · read-only | Returns the bytes of the transaction for the given block number and index. | | [`eth_getRawTransactionByHash`](#eth_getrawtransactionbyhash) | Public · read-only | Returns the bytes of the transaction for the given hash. | | [`eth_getStorageAt`](#eth_getstorageat) | Public · read-only | Returns the storage from the state at the given address, key and block number | | [`eth_getTransactionByBlockHashAndIndex`](#eth_gettransactionbyblockhashandindex) | Public · read-only | Returns the transaction for the given block hash and index. | | [`eth_getTransactionByBlockNumberAndIndex`](#eth_gettransactionbyblocknumberandindex) | Public · read-only | Returns the transaction for the given block number and index. | | [`eth_getTransactionByHash`](#eth_gettransactionbyhash) | Public · read-only | Returns the transaction for the given hash | | [`eth_getTransactionCount`](#eth_gettransactioncount) | Public · read-only | Returns the number of transactions the given address has sent for the given block number | | [`eth_getTransactionReceipt`](#eth_gettransactionreceipt) | Public · read-only | Returns the transaction receipt for the given transaction hash. | | [`eth_getUncleByBlockHashAndIndex`](#eth_getunclebyblockhashandindex) | Public · read-only | Returns the uncle block for the given block hash and index | | [`eth_getUncleByBlockNumberAndIndex`](#eth_getunclebyblocknumberandindex) | Public · read-only | Returns the uncle block for the given block hash and index | | [`eth_getUncleCountByBlockHash`](#eth_getunclecountbyblockhash) | Public · read-only | Returns number of uncles in the block for the given block hash | | [`eth_getUncleCountByBlockNumber`](#eth_getunclecountbyblocknumber) | Public · read-only | Returns number of uncles in the block for the given block number | | [`eth_hashrate`](#eth_hashrate) | Public · read-only | Returns the POW hashrate. | | [`eth_maxPriorityFeePerGas`](#eth_maxpriorityfeepergas) | Public · read-only | Returns a suggestion for a gas tip cap for dynamic fee transactions. | | [`eth_mining`](#eth_mining) | Public · read-only | Returns an indication if this node is currently mining. | | [`eth_newBlockFilter`](#eth_newblockfilter) | Public · read-only (stateful filter) | Creates a filter that fetches blocks that are imported into the chain | | [`eth_newFilter`](#eth_newfilter) | Public · read-only (stateful filter) | Creates a new filter and returns the filter id | | [`eth_newPendingTransactionFilter`](#eth_newpendingtransactionfilter) | Public · read-only (stateful filter) | Creates a filter that fetches pending transactions as transactions enter the pending state | | [`eth_newSideBlockFilter`](#eth_newsideblockfilter) | Public · read-only (stateful filter) | Creates a filter that fetches blocks that are imported into the chain with a non-canonical status | | [`eth_pendingTransactions`](#eth_pendingtransactions) | Public · read-only | Returns the transactions that are in the transaction pool and have a from address that is one of the accounts | | [`eth_sendRawTransaction`](#eth_sendrawtransaction) | Public · write (client-signed) | Will add the signed transaction to the transaction pool | | [`eth_syncing`](#eth_syncing) | Public · read-only | Returns false in case the node is currently not syncing with the network | | [`eth_uninstallFilter`](#eth_uninstallfilter) | Public · read-only (stateful filter) | Removes the filter with the given filter id. | ### `eth_accounts` Returns the collection of accounts this node manages. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:281` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | array of addresses | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_accounts", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_accounts", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": [] } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_blockNumber` Returns the block number of the chain head. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:644` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x10e5" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_call` Executes the given transaction on the state for the given block number. Additionally, the caller can specify a batch of contract for fields overriding. Note, this function doesn't make and changes in the state/blockchain and is useful to execute and retrieve values. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1148` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `args` | `txObject` | yes | transaction call object {from,to,gas,gasPrice|maxFeePerGas,maxPriorityFeePerGas,value,input|data,nonce,accessList} | | 1 | `blockNrOrHash` | `blockRef` | no | block number (hex), tag, or EIP-1898 object (optional) | | 2 | `overrides` | `stateOverride` | no | optional state override set (address → {balance,nonce,code,state,stateDiff}) | | 3 | `blockOverrides` | `blockOverrides` | no | optional block override object | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_call", "params": [ { "to": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "data": "0x" }, "latest" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_call", "params": [{"to": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "data": "0x"}, "latest"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_chainId` Is the EIP-155 replay-protection chain id for the current Ethereum chain config. Note, this method does not conform to EIP-695 because the configured chain ID is always returned, regardless of the current head block. We used to return an error when the chain wasn't synced up to a block where EIP-155 is enabled, but this behavior caused issues in CL clients. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:639` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_chainId", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_chainId", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x12db8" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_coinbase` Is the address that mining rewards will be sent to (alias for Etherbase). | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/api.go:40` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | address | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_coinbase", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_coinbase", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_createAccessList` Creates an EIP-2930 type AccessList for the given transaction. Reexec and BlockNrOrHash can be specified to create the accessList on top of a certain state. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1614` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | {accessList, gasUsed, error?} | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `args` | `txObject` | yes | transaction call object {from,to,gas,gasPrice|maxFeePerGas,maxPriorityFeePerGas,value,input|data,nonce,accessList} | | 1 | `blockNrOrHash` | `blockRef` | no | block number (hex), tag, or EIP-1898 object (optional) | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_createAccessList", "params": [ { "from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "to": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "value": "0x1" }, "latest" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_createAccessList", "params": [{"from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "to": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "value": "0x1"}, "latest"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "accessList": [], "gasUsed": "0x5208" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_estimateGas` Returns the lowest possible gas limit that allows the transaction to run successfully at block `blockNrOrHash`, or the latest block if `blockNrOrHash` is unspecified. It returns error if the transaction would revert or if there are unexpected failures. The returned value is capped by both `args.Gas` (if non-nil & non-zero) and the backend's RPCGasCap configuration (if non-zero). Note: Required blob gas is not computed in this method. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1206` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `args` | `txObject` | yes | transaction call object {from,to,gas,gasPrice|maxFeePerGas,maxPriorityFeePerGas,value,input|data,nonce,accessList} | | 1 | `blockNrOrHash` | `blockRef` | no | block number (hex), tag, or EIP-1898 object (optional) | | 2 | `overrides` | `stateOverride` | no | optional state override set (address → {balance,nonce,code,state,stateDiff}) | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_estimateGas", "params": [ { "from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "to": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "value": "0x1" } ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_estimateGas", "params": [{"from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "to": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "value": "0x1"}]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x5208" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_etherbase` Is the address that mining rewards will be sent to. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/api.go:35` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | address | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_etherbase", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_etherbase", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_feeHistory` Returns the fee market history. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:102` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | {oldestBlock, baseFeePerGas[], gasUsedRatio[], reward[][]} | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockCount` | `quantity` | yes | hex or decimal integer | | 1 | `lastBlock` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | | 2 | `rewardPercentiles` | `number[]` | yes | array of percentiles | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_feeHistory", "params": [ "0x4", "latest", [ 25, 75 ] ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_feeHistory", "params": ["0x4", "latest", [25, 75]]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "oldestBlock": "0x10e2", "reward": [ [ "0x0", "0x0" ], [ "0x0", "0x0" ], [ "0x0", "0x0" ], "... 1 more items" ], "baseFeePerGas": [ "0x7", "0x7", "0x7", "... 2 more items" ], "gasUsedRatio": [ 0, 0, 0, "... 1 more items" ] } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_fillTransaction` Fills the defaults (nonce, gas, gasPrice or 1559 fields) on a given unsigned transaction, and returns it to the caller for further processing (signing + broadcast). | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1971` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | {raw, tx} | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `args` | `txObject` | yes | transaction call object {from,to,gas,gasPrice|maxFeePerGas,maxPriorityFeePerGas,value,input|data,nonce,accessList} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_fillTransaction", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_fillTransaction", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_gasPrice` Returns a suggestion for a gas price for legacy transactions. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:74` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_gasPrice", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_gasPrice", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x3b9aca07" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getBalance` Returns the amount of wei for the given address in the state of the given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block numbers are also allowed. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:652` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `address` | `address` | yes | 20-byte hex address, 0x-prefixed | | 1 | `blockNrOrHash` | `blockRef` | yes | block number (hex), tag, or EIP-1898 object {blockHash|blockNumber} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getBalance", "params": [ "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "latest" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBalance", "params": ["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "latest"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x3635aeea7ab9f4a444" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getBlockByHash` Returns the requested block. When fullTx is true all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:836` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | block object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `hash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | | 1 | `fullTx` | `boolean` | yes | true or false | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockByHash", "params": [ "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", false ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBlockByHash", "params": ["0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", false]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "number": "0x10e1", "hash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "parentHash": "0x66a9adfb26cee8cf852691267bfec16dc1490841e76966205f545efef0541a5e", "nonce": "0x00000000000000fb", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...(+384 hex chars)", "stateRoot": "0x850511e4d281469a9c70d3874250b89362769b56b932190883d0c5d92c0acb71", "miner": "0x94e398784febbb1c56ddc2e4bc10d6edc4924f70", "difficulty": "0x80", "totalDifficulty": "0x15e980", "extraData": "0xcb89505141492d47332d31c0", "gasLimit": "0xe4e1c0", "gasUsed": "0x7db0", "timestamp": "0x6aef708e", "transactionsRoot": "0xe66016557fc6dae1bf564c354c63c71af21e7ad87162abb104db03b29e95cc25", "receiptsRoot": "0x63980e0720c5a6d49a058491cf5a325f412c8f8c10d089a2322a774b71a5bdaf", "baseFeePerGas": "0x7", "transactions": [ "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e" ], "uncles": [], "size": "0x5b6" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getBlockByNumber` Returns the requested canonical block. - When blockNr is -1 the chain pending block is returned. - When blockNr is -2 the chain latest block is returned. - When blockNr is -3 the chain finalized block is returned. - When blockNr is -4 the chain safe block is returned. - When fullTx is true all transactions in the block are returned, otherwise only the transaction hash is returned. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:821` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | block object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `number` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | | 1 | `fullTx` | `boolean` | yes | true or false | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockByNumber", "params": [ "0x10e1", false ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBlockByNumber", "params": ["0x10e1", false]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "number": "0x10e1", "hash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "parentHash": "0x66a9adfb26cee8cf852691267bfec16dc1490841e76966205f545efef0541a5e", "nonce": "0x00000000000000fb", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...(+384 hex chars)", "stateRoot": "0x850511e4d281469a9c70d3874250b89362769b56b932190883d0c5d92c0acb71", "miner": "0x94e398784febbb1c56ddc2e4bc10d6edc4924f70", "difficulty": "0x80", "totalDifficulty": "0x15e980", "extraData": "0xcb89505141492d47332d31c0", "gasLimit": "0xe4e1c0", "gasUsed": "0x7db0", "timestamp": "0x6aef708e", "transactionsRoot": "0xe66016557fc6dae1bf564c354c63c71af21e7ad87162abb104db03b29e95cc25", "receiptsRoot": "0x63980e0720c5a6d49a058491cf5a325f412c8f8c10d089a2322a774b71a5bdaf", "baseFeePerGas": "0x7", "transactions": [ "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e" ], "uncles": [], "size": "0x5b6" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. - Recorded: `["latest"]` → `{"code": -32602, "message": "missing value for required argument 1"}` --- ### `eth_getBlockReceipts` Returns the block receipts for the given block hash or number or tag. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:921` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | array of receipt objects | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockNrOrHash` | `blockRef` | yes | block number (hex), tag, or EIP-1898 object {blockHash|blockNumber} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockReceipts", "params": [ "0x10e1" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBlockReceipts", "params": ["0x10e1"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": [ { "blockHash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "blockNumber": "0x10e1", "contractAddress": null, "cumulativeGasUsed": "0x7db0", "effectiveGasPrice": "0x3b9aca07", "from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "gasUsed": "0x7db0", "logs": [], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...(+384 hex chars)", "status": "0x1", "to": "0x08a60aa7959381fa8089f4db1d359107e243a59f", "transactionHash": "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e", "transactionIndex": "0x0", "type": "0x2" } ] } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getBlockTransactionCountByHash` Returns the number of transactions in the block with the given hash. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1721` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockHash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockTransactionCountByHash", "params": [ "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBlockTransactionCountByHash", "params": ["0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x1" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getBlockTransactionCountByNumber` Returns the number of transactions in the block with the given block number. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1712` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockNr` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockTransactionCountByNumber", "params": [ "0x10e1" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBlockTransactionCountByNumber", "params": ["0x10e1"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x1" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getCode` Returns the code stored at the given address in the state for the given block number. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:895` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `address` | `address` | yes | 20-byte hex address, 0x-prefixed | | 1 | `blockNrOrHash` | `blockRef` | yes | block number (hex), tag, or EIP-1898 object {blockHash|blockNumber} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getCode", "params": [ "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "latest" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getCode", "params": ["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "latest"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getFilterChanges` Returns the logs for the filter with the given id since last time it was called. This can be used for polling. For pending transaction and block filters the result is []common.Hash. (pending)Log filters return []Log. | | | |---|---| | Access | **Public · read-only (stateful filter)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/filters/api.go:491` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | false or sync-progress object | !!! note "Behaviour on PQWERAI" Creates or reads per-node filter state that expires after 5 minutes of inactivity; unreliable behind load-balanced endpoints. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `id` | `filterId` | yes | filter identifier returned by eth_newFilter, eth_newBlockFilter or eth_newPendingTransactionFilter | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getFilterChanges", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getFilterChanges", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getHashrate` Returns the current hashrate for local CPU miner and remote miner. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/consensus/ethash/api.go:111` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | number | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getHashrate", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getHashrate", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getHeaderByHash` Returns the requested header by hash. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:806` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | header object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `hash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getHeaderByHash", "params": [ "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getHeaderByHash", "params": ["0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "number": "0x10e1", "hash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "parentHash": "0x66a9adfb26cee8cf852691267bfec16dc1490841e76966205f545efef0541a5e", "nonce": "0x00000000000000fb", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...(+384 hex chars)", "stateRoot": "0x850511e4d281469a9c70d3874250b89362769b56b932190883d0c5d92c0acb71", "miner": "0x94e398784febbb1c56ddc2e4bc10d6edc4924f70", "difficulty": "0x80", "totalDifficulty": "0x15e980", "extraData": "0xcb89505141492d47332d31c0", "gasLimit": "0xe4e1c0", "gasUsed": "0x7db0", "timestamp": "0x6aef708e", "transactionsRoot": "0xe66016557fc6dae1bf564c354c63c71af21e7ad87162abb104db03b29e95cc25", "receiptsRoot": "0x63980e0720c5a6d49a058491cf5a325f412c8f8c10d089a2322a774b71a5bdaf", "baseFeePerGas": "0x7" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getHeaderByNumber` Returns the requested canonical block header. - When blockNr is -1 the chain pending header is returned. - When blockNr is -2 the chain latest header is returned. - When blockNr is -3 the chain finalized header is returned. - When blockNr is -4 the chain safe header is returned. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:792` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | header object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `number` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getHeaderByNumber", "params": [ "0x10e1" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getHeaderByNumber", "params": ["0x10e1"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "number": "0x10e1", "hash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "parentHash": "0x66a9adfb26cee8cf852691267bfec16dc1490841e76966205f545efef0541a5e", "nonce": "0x00000000000000fb", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...(+384 hex chars)", "stateRoot": "0x850511e4d281469a9c70d3874250b89362769b56b932190883d0c5d92c0acb71", "miner": "0x94e398784febbb1c56ddc2e4bc10d6edc4924f70", "difficulty": "0x80", "totalDifficulty": "0x15e980", "extraData": "0xcb89505141492d47332d31c0", "gasLimit": "0xe4e1c0", "gasUsed": "0x7db0", "timestamp": "0x6aef708e", "transactionsRoot": "0xe66016557fc6dae1bf564c354c63c71af21e7ad87162abb104db03b29e95cc25", "receiptsRoot": "0x63980e0720c5a6d49a058491cf5a325f412c8f8c10d089a2322a774b71a5bdaf", "baseFeePerGas": "0x7" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getLogs` Returns logs matching a filter. PQWERAI bounds the block range per request (default 5000 blocks). | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` · Core 263419f9 (filter API exposed) | | Verified | source `core/source/cmd/pqwerai-core/logs.go:37` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | array of log objects | !!! note "Behaviour on PQWERAI" Block range bounded by --rpc.logs-max-range (default node setting; 1..100000 allowed). Larger ranges return an error. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `crit` | `filterObject` | yes | {fromBlock,toBlock,address,topics,blockHash} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getLogs", "params": [ { "fromBlock": "0x10e1", "toBlock": "0x10e1" } ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getLogs", "params": [{"fromBlock": "0x10e1", "toBlock": "0x10e1"}]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": [] } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getProof` Returns the Merkle-proof for a given account and optionally some storage keys. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:692` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | EIP-1186 account proof object | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `address` | `address` | yes | 20-byte hex address, 0x-prefixed | | 1 | `storageKeys` | `string[]` | yes | array of strings | | 2 | `blockNrOrHash` | `blockRef` | yes | block number (hex), tag, or EIP-1898 object {blockHash|blockNumber} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getProof", "params": [ "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", [], "latest" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getProof", "params": ["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", [], "latest"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "address": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "accountProof": [ "0xf901f1a0fc9771f0cd44e009b8449faa0c7d351db07eef2dd7d00e419e6b996e69bbe23da0210afa3c0b074785b1688aa55b6707c381659ca66dc198037b6ee7...(+872 hex chars)", "0xf8b180808080a07ab70ff2d2d64d2217473a4b4edc62d05639d26a03c000d97de59e1ea8bda3f580808080a0d66dcb0cc9dcf42abe143fe67915ed7995c82f2d...(+230 hex chars)", "0xe21ba03b5577aafd96df7005c1055909de947eae1cbada1101d40c390a1bf905422102", "... 2 more items" ], "balance": "0x3635aeea7ab9f4a444", "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "nonce": "0xee", "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "storageProof": [] } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getRawTransactionByBlockHashAndIndex` Returns the bytes of the transaction for the given block hash and index. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1754` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockHash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | | 1 | `index` | `quantity` | yes | 0x-prefixed hex integer | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": [ "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": ["", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getRawTransactionByBlockNumberAndIndex` Returns the bytes of the transaction for the given block number and index. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1746` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockNr` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | | 1 | `index` | `quantity` | yes | 0x-prefixed hex integer | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByBlockNumberAndIndex", "params": [ "0x10e1", "0x0" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByBlockNumberAndIndex", "params": ["0x10e1", "0x0"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x02f9039f83012db881ed843b9aca00843b9aca0e83020b889408a60aa7959381fa8089f4db1d359107e243a59f80b9032ef9032b8a505141492d4646472d31f9...(+1734 hex chars)" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getRawTransactionByHash` Returns the bytes of the transaction for the given hash. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1802` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `hash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByHash", "params": [ "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByHash", "params": ["0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x02f9039f83012db881ed843b9aca00843b9aca0e83020b889408a60aa7959381fa8089f4db1d359107e243a59f80b9032ef9032b8a505141492d4646472d31f9...(+1734 hex chars)" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getStorageAt` Returns the storage from the state at the given address, key and block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block numbers are also allowed. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:907` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `address` | `address` | yes | 20-byte hex address, 0x-prefixed | | 1 | `hexKey` | `string` | yes | JSON string | | 2 | `blockNrOrHash` | `blockRef` | yes | block number (hex), tag, or EIP-1898 object {blockHash|blockNumber} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getStorageAt", "params": [ "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "0x0", "latest" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getStorageAt", "params": ["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "0x0", "latest"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x0000000000000000000000000000000000000000000000000000000000000000" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getTransactionByBlockHashAndIndex` Returns the transaction for the given block hash and index. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1738` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | transaction object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockHash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | | 1 | `index` | `quantity` | yes | 0x-prefixed hex integer | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByBlockHashAndIndex", "params": [ "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "0x0" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "0x0"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "blockHash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "blockNumber": "0x10e1", "from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "gas": "0x20b88", "gasPrice": "0x3b9aca07", "maxFeePerGas": "0x3b9aca0e", "maxPriorityFeePerGas": "0x3b9aca00", "hash": "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e", "input": "0xf9032b8a505141492d4646472d31f9031df8b001a00000000000000000000000000000000000000000000000000000000000012db8a0c1e5c97d8db65fbf279e...(+1500 hex chars)", "nonce": "0xed", "to": "0x08a60aa7959381fa8089f4db1d359107e243a59f", "transactionIndex": "0x0", "value": "0x0", "type": "0x2", "accessList": [], "chainId": "0x12db8", "v": "0x1", "r": "0x4e51e9439149f9ffa9ea5b28a5fd2dc1fe40dd069a55614d667461164191b715", "s": "0x78798e9b616a9503df5f17e90acc4ee3f960e83f4cb1af0dbc54d257ee5dee3f", "yParity": "0x1" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getTransactionByBlockNumberAndIndex` Returns the transaction for the given block number and index. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1730` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | transaction object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockNr` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | | 1 | `index` | `quantity` | yes | 0x-prefixed hex integer | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByBlockNumberAndIndex", "params": [ "0x10e1", "0x0" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x10e1", "0x0"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "blockHash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "blockNumber": "0x10e1", "from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "gas": "0x20b88", "gasPrice": "0x3b9aca07", "maxFeePerGas": "0x3b9aca0e", "maxPriorityFeePerGas": "0x3b9aca00", "hash": "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e", "input": "0xf9032b8a505141492d4646472d31f9031df8b001a00000000000000000000000000000000000000000000000000000000000012db8a0c1e5c97d8db65fbf279e...(+1500 hex chars)", "nonce": "0xed", "to": "0x08a60aa7959381fa8089f4db1d359107e243a59f", "transactionIndex": "0x0", "value": "0x0", "type": "0x2", "accessList": [], "chainId": "0x12db8", "v": "0x1", "r": "0x4e51e9439149f9ffa9ea5b28a5fd2dc1fe40dd069a55614d667461164191b715", "s": "0x78798e9b616a9503df5f17e90acc4ee3f960e83f4cb1af0dbc54d257ee5dee3f", "yParity": "0x1" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getTransactionByHash` Returns the transaction for the given hash | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1781` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | transaction object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `hash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByHash", "params": [ "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionByHash", "params": ["0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "blockHash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "blockNumber": "0x10e1", "from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "gas": "0x20b88", "gasPrice": "0x3b9aca07", "maxFeePerGas": "0x3b9aca0e", "maxPriorityFeePerGas": "0x3b9aca00", "hash": "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e", "input": "0xf9032b8a505141492d4646472d31f9031df8b001a00000000000000000000000000000000000000000000000000000000000012db8a0c1e5c97d8db65fbf279e...(+1500 hex chars)", "nonce": "0xed", "to": "0x08a60aa7959381fa8089f4db1d359107e243a59f", "transactionIndex": "0x0", "value": "0x0", "type": "0x2", "accessList": [], "chainId": "0x12db8", "v": "0x1", "r": "0x4e51e9439149f9ffa9ea5b28a5fd2dc1fe40dd069a55614d667461164191b715", "s": "0x78798e9b616a9503df5f17e90acc4ee3f960e83f4cb1af0dbc54d257ee5dee3f", "yParity": "0x1" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getTransactionCount` Returns the number of transactions the given address has sent for the given block number | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1762` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `address` | `address` | yes | 20-byte hex address, 0x-prefixed | | 1 | `blockNrOrHash` | `blockRef` | yes | block number (hex), tag, or EIP-1898 object {blockHash|blockNumber} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionCount", "params": [ "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "latest" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionCount", "params": ["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "latest"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0xee" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getTransactionReceipt` Returns the transaction receipt for the given transaction hash. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1818` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | receipt object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `hash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionReceipt", "params": [ "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionReceipt", "params": ["0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "blockHash": "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd", "blockNumber": "0x10e1", "contractAddress": null, "cumulativeGasUsed": "0x7db0", "effectiveGasPrice": "0x3b9aca07", "from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "gasUsed": "0x7db0", "logs": [], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...(+384 hex chars)", "status": "0x1", "to": "0x08a60aa7959381fa8089f4db1d359107e243a59f", "transactionHash": "0x45cebff2a5a70838d9c076efc0367c82a43f80eb9db44773798fce3539edaf2e", "transactionIndex": "0x0", "type": "0x2" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getUncleByBlockHashAndIndex` Returns the uncle block for the given block hash and index. When fullTx is true all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:862` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | block object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockHash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | | 1 | `index` | `quantity` | yes | 0x-prefixed hex integer | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getUncleByBlockHashAndIndex", "params": [ "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleByBlockHashAndIndex", "params": ["", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getUncleByBlockNumberAndIndex` Returns the uncle block for the given block hash and index. When fullTx is true all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:846` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | block object or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockNr` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | | 1 | `index` | `quantity` | yes | 0x-prefixed hex integer | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getUncleByBlockNumberAndIndex", "params": [ "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleByBlockNumberAndIndex", "params": ["", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getUncleCountByBlockHash` Returns number of uncles in the block for the given block hash | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:886` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockHash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getUncleCountByBlockHash", "params": [ "0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleCountByBlockHash", "params": ["0x8f54b666737cb5cec32914481915f662aa66e2d25c2cebc2ffca803b63afbcfd"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x0" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getUncleCountByBlockNumber` Returns number of uncles in the block for the given block number | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:877` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) or null | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `blockNr` | `blockTag` | yes | block number (hex) or 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized' | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getUncleCountByBlockNumber", "params": [ "0x10e1" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleCountByBlockNumber", "params": ["0x10e1"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x0" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_hashrate` Returns the POW hashrate. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/api.go:45` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_hashrate", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_hashrate", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x0" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_maxPriorityFeePerGas` Returns a suggestion for a gas tip cap for dynamic fee transactions. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:86` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_maxPriorityFeePerGas", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_maxPriorityFeePerGas", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x3b9aca00" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_mining` Returns an indication if this node is currently mining. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/api.go:50` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | boolean | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_mining", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_mining", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": true } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_newBlockFilter` Creates a filter that fetches blocks that are imported into the chain. It is part of the filter package since polling goes with eth_getFilterChanges. | | | |---|---| | Access | **Public · read-only (stateful filter)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/filters/api.go:196` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | filter ID (hex string) | !!! note "Behaviour on PQWERAI" Creates or reads per-node filter state that expires after 5 minutes of inactivity; unreliable behind load-balanced endpoints. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_newBlockFilter", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_newBlockFilter", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_newFilter` Creates a new filter and returns the filter id. It can be used to retrieve logs when the state changes. This method cannot be used to fetch logs that are already stored in the state. Default criteria for the from and to block are "latest". Using "latest" as block number will return logs for mined blocks. Using "pending" as block number returns logs for not yet mined (pending) blocks. In case logs are removed (chain reorg) previously returned logs are returned again but with the removed property set to true. In case "fromBlock" > "toBlock" an error is returned. | | | |---|---| | Access | **Public · read-only (stateful filter)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/filters/api.go:370` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | filter ID (hex string) | !!! note "Behaviour on PQWERAI" Creates or reads per-node filter state that expires after 5 minutes of inactivity; unreliable behind load-balanced endpoints. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `crit` | `filterObject` | yes | {fromBlock,toBlock,address,topics,blockHash} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_newFilter", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_newFilter", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_newPendingTransactionFilter` Creates a filter that fetches pending transactions as transactions enter the pending state. It is part of the filter package because this filter can be used through the `eth_getFilterChanges` polling method that is also used for log filters. | | | |---|---| | Access | **Public · read-only (stateful filter)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/filters/api.go:120` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | filter ID (hex string) | !!! note "Behaviour on PQWERAI" Creates or reads per-node filter state that expires after 5 minutes of inactivity; unreliable behind load-balanced endpoints. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `fullTx` | `*bool` | no | *bool | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_newPendingTransactionFilter", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_newPendingTransactionFilter", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_newSideBlockFilter` Creates a filter that fetches blocks that are imported into the chain with a non-canonical status. It is part of the filter package since polling goes with eth_getFilterChanges. | | | |---|---| | Access | **Public · read-only (stateful filter)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/filters/api.go:229` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | filter ID (hex string) | !!! note "Behaviour on PQWERAI" Creates or reads per-node filter state that expires after 5 minutes of inactivity; unreliable behind load-balanced endpoints. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_newSideBlockFilter", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_newSideBlockFilter", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_pendingTransactions` Returns the transactions that are in the transaction pool and have a from address that is one of the accounts this node manages. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:2065` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | array of transaction objects | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_pendingTransactions", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_pendingTransactions", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_sendRawTransaction` Will add the signed transaction to the transaction pool. The sender is responsible for signing the transaction and using the correct nonce. | | | |---|---| | Access | **Public · write (client-signed)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1989` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | 32-byte hash | !!! note "Behaviour on PQWERAI" Broadcasts a transaction signed by the client. The node never receives keys. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `input` | `bytes` | yes | 0x-prefixed hex data | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_sendRawTransaction", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_sendRawTransaction", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. - Recorded: `["0x00"]` → `{"code": -32000, "message": "typed transaction too short"}` --- ### `eth_syncing` Returns false in case the node is currently not syncing with the network. It can be up-to-date or has not yet received the latest block headers from its pears. In case it is synchronizing: - startingBlock: block number this node started to synchronize from - currentBlock: block number this node is currently importing - highestBlock: block number of the highest block header this node has received from peers - pulledStates: number of state entries processed until now - knownStates: number of known state entries that still need to be pulled | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:136` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | false or sync-progress object | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_syncing", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_syncing", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": false } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_uninstallFilter` Removes the filter with the given filter id. | | | |---|---| | Access | **Public · read-only (stateful filter)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/eth/filters/api.go:436` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | boolean | !!! note "Behaviour on PQWERAI" Creates or reads per-node filter state that expires after 5 minutes of inactivity; unreliable behind load-balanced endpoints. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `id` | `filterId` | yes | filter identifier returned by eth_newFilter, eth_newBlockFilter or eth_newPendingTransactionFilter | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_uninstallFilter", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_uninstallFilter", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- # JSON-RPC: g4 namespace (finality) # g4 namespace (finality) PQWERAI BFT finality, Smartnode registry and exact issuance accounting. 3 public methods. Operator, disabled and unsupported methods of this namespace are listed in [Operator interfaces](operator.md). `$RPC` is your node URL (see [quickstart](../../getting-started/blockchain-quickstart.md)). | Method | Access | Summary | |---|---|---| | [`g4_evidence`](#g4_evidence) | Public · read-only | Lists equivocation evidence (double or surround votes) detected by this node. | | [`g4_status`](#g4_status) | Public · read-only | Finality and issuance accounting: head, justified/finalized checkpoints, registry totals, exact issuance count | | [`g4_validators`](#g4_validators) | Public · read-only | Lists Smartnode validators from the registry: id, owner, Ed25519 key, stake, delegated stake, activation epoch | ### `g4_evidence` Lists equivocation evidence (double or surround votes) detected by this node. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/g4.go:376` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | array of objects | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "g4_evidence", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "g4_evidence", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": null } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `g4_status` Finality and issuance accounting: head, justified/finalized checkpoints, registry totals, exact issuance counters and vote-submission counters. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/g4.go:210` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | object | !!! note "Behaviour on PQWERAI" PQWERAI finality and issuance accounting. Fields minted_wei, pow_issued_wei, pos_issued_wei, founder_issued_wei and fee_burn_wei are exact counters read from consensus state. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "g4_status", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "g4_status", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "epoch_set_root": "8ae82c2488bbcda80595ba903a5825dc356ab2a2b891809c9b50c017fe250065", "epoch_set_size": 2, "fee_burn_wei": "1109182695701309", "finality": true, "finalized_hash": "0x982c1d3af93176df3ed7c1387b484ab70f3748b82000b2f70d0e7b3fb6a5e2d0", "finalized_height": 4288, "founder_issued_wei": "17832760910000000", "head": 4325, "justified_hash": "0x66a9adfb26cee8cf852691267bfec16dc1490841e76966205f545efef0541a5e", "justified_height": 4320, "liveness_ejected_validators": 2, "liveness_participation_records": true, "minted_wei": "1019143783276091000000000", "pos_issued_wei": "353088666018000000", "pow_issued_wei": "1412354664072000000", "registry_locked_gwei": 130000000000, "registry_slash_burned_gwei": 0, "rejected_certificates": 0, "validators": 5, "vote_counters": { "forged_or_unauthorized": 2080, "malformed": 4, "participation_relayed": 15, "replayed": 1, "stale": 18 } } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `g4_validators` Lists Smartnode validators from the registry: id, owner, Ed25519 key, stake, delegated stake, activation epoch and status. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/g4.go:344` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | array of objects | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "g4_validators", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "g4_validators", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": [ { "activation_epoch": 0, "delegated_gwei": 0, "id": "44e1990f323a4e9f679841988f1f2c86f939ccfd7cdcd22c17eb91f5a2c24e61", "key": "0fd5d00dcabc5375ee04d70c54192f32fce7e7131c2cce728e65ef08be526a4c", "owner": "0x460e14b0296783a6f66cf1eed54853f4b5d5a918", "pending_key": false, "stake_gwei": 32000000000, "status": "exiting" }, { "activation_epoch": 0, "delegated_gwei": 2000000000, "id": "92571f2ba70dcf9f86b1eb60527d478dd0f24e429bf9b65c92663236280e70f8", "key": "bf9fee5e279c5a8ae2549a2b6612b46f87d35c7df205643d1b2383f5580c2474", "owner": "0xfd6daa176013d5b9b7176e65caa61fb25a5cfe93", "pending_key": false, "stake_gwei": 32000000000, "status": "active" }, { "activation_epoch": 0, "delegated_gwei": 0, "id": "9a738ce18aff9ee770b5afcf15a754188e82b33ed1c22c3c3ee7d34f99821798", "key": "7b0086337ae830eb03a89c7502f8ba248d50e6d35196e55c51271b5b88a65803", "owner": "0x478031f6aceef7404992d014a7d88a51b24e4ef1", "pending_key": false, "stake_gwei": 32000000000, "status": "exiting" }, "... 2 more items" ] } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- # JSON-RPC: net namespace # net namespace Network identity and peer count. 3 public methods. Operator, disabled and unsupported methods of this namespace are listed in [Operator interfaces](operator.md). `$RPC` is your node URL (see [quickstart](../../getting-started/blockchain-quickstart.md)). | Method | Access | Summary | |---|---|---| | [`net_listening`](#net_listening) | Public · read-only | Returns an indication if the node is listening for network connections. | | [`net_peerCount`](#net_peercount) | Public · read-only | Returns the number of connected peers | | [`net_version`](#net_version) | Public · read-only | Returns the current ethereum protocol version. | ### `net_listening` Returns an indication if the node is listening for network connections. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:2295` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | boolean | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "net_listening", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "net_listening", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": true } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `net_peerCount` Returns the number of connected peers | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:2300` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | quantity (hex) | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "net_peerCount", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "net_peerCount", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x3" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `net_version` Returns the current ethereum protocol version. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:2305` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | string | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "net_version", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "net_version", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "77240" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- # Operator JSON-RPC interfaces # Operator interfaces !!! danger "Not for public endpoints or documentation tooling" These methods are registered by PQWERAI Core but are either privileged (mining, validator voting, peer diagnostics), need keys the node never holds, or are deliberately disabled. They are documented so operators can recognise them. The API playground never executes them, and a public RPC proxy should not forward them. | Method | Class | Why it is restricted | |---|---|---| | [`eth_getFilterLogs`](#eth_getfilterlogs) | Disabled on PQWERAI Core | Always returns an error on PQWERAI Core: a stored filter would bypass the eth_getLogs block-range bound. Use eth_getLogs or eth_getFilterChanges. | | [`eth_getWork`](#eth_getwork) | Operator · mining | Legacy Ethash external-miner interface. GhostRider sealing runs inside the node through the pinned helper; operator use only, never through a public proxy. | | [`eth_resend`](#eth_resend) | Unsupported (node-held keys) | Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. | | [`eth_sendTransaction`](#eth_sendtransaction) | Unsupported (node-held keys) | Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. | | [`eth_sign`](#eth_sign) | Unsupported (node-held keys) | Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. | | [`eth_signTransaction`](#eth_signtransaction) | Unsupported (node-held keys) | Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. | | [`eth_submitHashrate`](#eth_submithashrate) | Operator · mining | Legacy Ethash external-miner interface. GhostRider sealing runs inside the node through the pinned helper; operator use only, never through a public proxy. | | [`eth_submitWork`](#eth_submitwork) | Operator · mining | Legacy Ethash external-miner interface. GhostRider sealing runs inside the node through the pinned helper; operator use only, never through a public proxy. | | [`g4_context`](#g4_context) | Operator · validator helper | Read-only helpers used by Smartnode signers to obtain the checkpoint vote context. Not needed by applications. | | [`g4_link`](#g4_link) | Operator · validator helper | Read-only helpers used by Smartnode signers to obtain the checkpoint vote context. Not needed by applications. | | [`g4_submitVote`](#g4_submitvote) | Operator · validator action | Accepts signature-verified Smartnode finality votes. Authenticated, replay-checked and rate-limited by the node. Never exposed through documentation tooling. | | [`pqwerai_peerHealth`](#pqwerai_peerhealth) | Operator · diagnostics | Peer manager diagnostics (peer IDs and subnets). Operators should not expose it through public endpoints. | ## Namespaces that are not served Probed on the live node: every method of these namespaces returns `-32601 method not found`. | Namespace | Result | |---|---| | `admin_*` | not served (-32601) | | `clique_*` | not served (-32601) | | `debug_*` | not served (-32601) | | `engine_*` | not served (-32601) | | `ethash_*` | not served (-32601) | | `les_*` | not served (-32601) | | `miner_*` | not served (-32601) | | `personal_*` | not served (-32601) | | `trace_*` | not served (-32601) | ### `eth_getFilterLogs` Disabled on PQWERAI Core (would bypass the eth_getLogs range bound). | | | |---|---| | Access | **Disabled on PQWERAI Core** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/logs.go:52` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | array of log objects | !!! warning "Behaviour on PQWERAI" Always returns an error on PQWERAI Core: a stored filter would bypass the eth_getLogs block-range bound. Use eth_getLogs or eth_getFilterChanges. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `id` | `filterId` | yes | filter identifier returned by eth_newFilter, eth_newBlockFilter or eth_newPendingTransactionFilter | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getFilterLogs", "params": [ "0x1" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getFilterLogs", "params": ["0x1"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "error": { "code": -32000, "message": "eth_getFilterLogs is disabled; use eth_getLogs (bounded range) or eth_getFilterChanges" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_getWork` Returns a work package for external miner. The work package consists of 3 strings: result[0] - 32 bytes hex encoded current block header pow-hash result[1] - 32 bytes hex encoded seed hash used for DAG result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty result[3] - hex encoded block number | | | |---|---| | Access | **Operator · mining** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/consensus/ethash/api.go:42` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | [headerHash, seedHash, target, blockNumber] | !!! warning "Behaviour on PQWERAI" Legacy Ethash external-miner interface. GhostRider sealing runs inside the node through the pinned helper; operator use only, never through a public proxy. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_getWork", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getWork", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. - Recorded: `[]` → `{"code": -32000, "message": "no mining work available yet"}` --- ### `eth_resend` Accepts an existing transaction and a new gas price and limit. It will remove the given transaction from the pool and reinsert it with the new gas price and limit. | | | |---|---| | Access | **Unsupported (node-held keys)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:2089` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | 32-byte hash | !!! warning "Behaviour on PQWERAI" Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `sendArgs` | `txObject` | yes | transaction call object {from,to,gas,gasPrice|maxFeePerGas,maxPriorityFeePerGas,value,input|data,nonce,accessList} | | 1 | `gasPrice` | `quantity` | no | 0x-prefixed hex integer | | 2 | `gasLimit` | `*hexutil.Uint64` | no | *hexutil.Uint64 | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_resend", "params": [ "", "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_resend", "params": ["", "", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_sendTransaction` Creates a transaction for the given argument, sign it and submit it to the transaction pool. | | | |---|---| | Access | **Unsupported (node-held keys)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:1935` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | 32-byte hash | !!! warning "Behaviour on PQWERAI" Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `args` | `txObject` | yes | transaction call object {from,to,gas,gasPrice|maxFeePerGas,maxPriorityFeePerGas,value,input|data,nonce,accessList} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_sendTransaction", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_sendTransaction", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. - Recorded: `[{"from": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "to": "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "value": "0x1"}]` → `{"code": -32000, "message": "unknown account"}` --- ### `eth_sign` Calculates an ECDSA signature for: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message). Note, the produced signature conforms to the secp256k1 curve R, S and V values, where the V value will be 27 or 28 for legacy reasons. The account associated with addr must be unlocked. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign | | | |---|---| | Access | **Unsupported (node-held keys)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:2006` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | !!! warning "Behaviour on PQWERAI" Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `addr` | `address` | yes | 20-byte hex address, 0x-prefixed | | 1 | `data` | `bytes` | yes | 0x-prefixed hex data | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_sign", "params": [ "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_sign", "params": ["", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. - Recorded: `["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743", "0x00"]` → `{"code": -32000, "message": "unknown account"}` --- ### `eth_signTransaction` Will sign the given transaction with the from account. The node needs to have the private key of the account corresponding with the given from address and it needs to be unlocked. | | | |---|---| | Access | **Unsupported (node-held keys)** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:2031` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | {raw, tx} | !!! warning "Behaviour on PQWERAI" Requires an account unlocked inside the node. PQWERAI Core exposes no personal_* namespace and loads no keystore, so these return an error; sign in the client and use eth_sendRawTransaction. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `args` | `txObject` | yes | transaction call object {from,to,gas,gasPrice|maxFeePerGas,maxPriorityFeePerGas,value,input|data,nonce,accessList} | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_signTransaction", "params": [ "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_signTransaction", "params": [""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_submitHashrate` Can be used for remote miners to submit their hash rate. This enables the node to report the combined hash rate of all miners which submit work through this node. It accepts the miner hash rate and an identifier which must be unique between nodes. | | | |---|---| | Access | **Operator · mining** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/consensus/ethash/api.go:93` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | boolean | !!! warning "Behaviour on PQWERAI" Legacy Ethash external-miner interface. GhostRider sealing runs inside the node through the pinned helper; operator use only, never through a public proxy. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `rate` | `quantity` | yes | 0x-prefixed hex integer | | 1 | `id` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_submitHashrate", "params": [ "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_submitHashrate", "params": ["", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `eth_submitWork` Can be used by external miner to submit their POW solution. It returns an indication if the work was accepted. Note either an invalid solution, a stale work a non-existent work will return false. | | | |---|---| | Access | **Operator · mining** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/consensus/ethash/api.go:67` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | boolean | !!! warning "Behaviour on PQWERAI" Legacy Ethash external-miner interface. GhostRider sealing runs inside the node through the pinned helper; operator use only, never through a public proxy. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `nonce` | `bytes8` | yes | 8-byte nonce | | 1 | `hash` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | | 2 | `digest` | `hash32` | yes | 32-byte hex hash, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_submitWork", "params": [ "", "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_submitWork", "params": ["", "", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `g4_context` Builds the RLP vote context for a checkpoint link between two heights. | | | |---|---| | Access | **Operator · validator helper** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/g4.go:330` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | string | !!! warning "Behaviour on PQWERAI" Read-only helpers used by Smartnode signers to obtain the checkpoint vote context. Not needed by applications. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `source` | `integer` | yes | JSON number | | 1 | `target` | `integer` | yes | JSON number | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "g4_context", "params": [ "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "g4_context", "params": ["", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. - Recorded: `[0, 1]` → `{"code": -32000, "message": "invalid checkpoint link"}` --- ### `g4_link` Returns the next checkpoint link (source, target, RLP vote context) validators should sign, or null. | | | |---|---| | Access | **Operator · validator helper** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/g4.go:259` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | object | !!! warning "Behaviour on PQWERAI" Read-only helpers used by Smartnode signers to obtain the checkpoint vote context. Not needed by applications. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `refused` | `integer` | no | JSON number (optional) | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "g4_link", "params": [ null ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "g4_link", "params": [null]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": null } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `g4_submitVote` Submits a signed Smartnode finality vote (RLP context + signed vote). Authenticated against the epoch validator set. | | | |---|---| | Access | **Operator · validator action** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/g4.go:407` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | object | !!! warning "Behaviour on PQWERAI" Accepts signature-verified Smartnode finality votes. Authenticated, replay-checked and rate-limited by the node. Never exposed through documentation tooling. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `ctxHex` | `string` | yes | JSON string | | 1 | `voteHex` | `string` | yes | JSON string | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "g4_submitVote", "params": [ "", "" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "g4_submitVote", "params": ["", ""]}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `pqwerai_peerHealth` Peer-manager diagnostics: target, connected peers (IDs and subnets), dial candidates, cache and manifest status. | | | |---|---| | Access | **Operator · diagnostics** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/cmd/pqwerai-core/peers.go:555` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | peer health object | !!! warning "Behaviour on PQWERAI" Peer manager diagnostics (peer IDs and subnets). Operators should not expose it through public endpoints. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "pqwerai_peerHealth", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "pqwerai_peerHealth", "params": []}' \ "$RPC" ``` === "Response" No live response is recorded for this method (state-changing, operator-only or no safe sample). **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- # JSON-RPC: txpool namespace # txpool namespace Transaction-pool inspection (node-local view of pending and queued transactions). 4 public methods. Operator, disabled and unsupported methods of this namespace are listed in [Operator interfaces](operator.md). `$RPC` is your node URL (see [quickstart](../../getting-started/blockchain-quickstart.md)). | Method | Access | Summary | |---|---|---| | [`txpool_content`](#txpool_content) | Public · read-only | Returns the transactions contained within the transaction pool. | | [`txpool_contentFrom`](#txpool_contentfrom) | Public · read-only | Returns the transactions contained within the transaction pool. | | [`txpool_inspect`](#txpool_inspect) | Public · read-only | Retrieves the content of the transaction pool and flattens it into an easily inspectable list. | | [`txpool_status`](#txpool_status) | Public · read-only | Returns the number of pending and queued transaction in the pool. | ### `txpool_content` Returns the transactions contained within the transaction pool. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:176` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | map[string]map[string]map[string]*RPCTransaction | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "txpool_content", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "txpool_content", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "pending": {}, "queued": {} } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `txpool_contentFrom` Returns the transactions contained within the transaction pool. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:203` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | map[string]map[string]*RPCTransaction | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `addr` | `address` | yes | 20-byte hex address, 0x-prefixed | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "txpool_contentFrom", "params": [ "0xfedcd2b6768f15ed5eaf4da44d80467096ea6743" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "txpool_contentFrom", "params": ["0xfedcd2b6768f15ed5eaf4da44d80467096ea6743"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "pending": {}, "queued": {} } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `txpool_inspect` Retrieves the content of the transaction pool and flattens it into an easily inspectable list. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:236` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | map[string]map[string]map[string]string | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "txpool_inspect", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "txpool_inspect", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "pending": {}, "queued": {} } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `txpool_status` Returns the number of pending and queued transaction in the pool. | | | |---|---| | Access | **Public · read-only** | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/internal/ethapi/api.go:226` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | map[string]hexutil.Uint | !!! note "Behaviour on PQWERAI" Read-only but describes this node's local configuration or mempool; results differ per node. **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "txpool_status", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "txpool_status", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": { "pending": "0x0", "queued": "0x0" } } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- # JSON-RPC: web3 namespace # web3 namespace Client version and Keccak-256 helper. 2 public methods. Operator, disabled and unsupported methods of this namespace are listed in [Operator interfaces](operator.md). `$RPC` is your node URL (see [quickstart](../../getting-started/blockchain-quickstart.md)). | Method | Access | Summary | |---|---|---| | [`web3_clientVersion`](#web3_clientversion) | Public · read-only | Returns the client identifier. | | [`web3_sha3`](#web3_sha3) | Public · read-only | Applies the ethereum sha3 implementation on the input | ### `web3_clientVersion` Returns the client identifier. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/node/api.go:333` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | string | **Parameters:** none === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "web3_clientVersion", "params": [] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "web3_clientVersion", "params": []}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "CoreGeth/linux-amd64/go1.26.8" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- ### `web3_sha3` Applies the ethereum sha3 implementation on the input. It assumes the input is hex encoded. | | | |---|---| | Access | **Public · read-only** · playground | | Network | private testnet 77240 (local node or approved endpoint); mainnet not available | | Authentication | none on loopback; bearer token when the node binds a non-loopback address; public proxies rate-limit per IP | | Minimum software | protocol `pqwerai-v8-testnet/1` | | Verified | source `core/source/node/api.go:339` at Core `bad4a06ea`; registered on live `CoreGeth/linux-amd64/go1.26.8` | | Returns | data (hex) | **Parameters** | # | Name | Type | Required | Description | |---|---|---|---|---| | 0 | `input` | `bytes` | yes | 0x-prefixed hex data | === "JSON-RPC request" ```json { "jsonrpc": "2.0", "id": 1, "method": "web3_sha3", "params": [ "0x68656c6c6f" ] } ``` === "curl" ```bash curl -s -H 'content-type: application/json' \ -d '{"jsonrpc": "2.0", "id": 1, "method": "web3_sha3", "params": ["0x68656c6c6f"]}' \ "$RPC" ``` === "Recorded response" Recorded 2026-11-07T18:41:00+00:00 at head 4325 on a disposable local testnet, chain 77240. Long arrays are truncated. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8" } ``` **Errors and edge cases** - `-32602` invalid or missing parameter (e.g. `missing value for required argument 0`). - `-32000` execution or validation error with a message from the node. --- # Protocol Research and Specifications # Protocol Research and Specifications This Developer Hub documents **what is implemented and tested** on testnet-rc1. Design plans and research are kept apart so they are never mistaken for available features. | Kind | Where | Status meaning | |---|---|---| | Current product documentation | This site | Implemented; tested where stated on each page | | Normative chain parameters | [`network.json`](../blockchain/network-parameters.md) | Binding for nodes and wallets | | Master Plan v8 and decision records | Project blueprint (repository-internal) | **Draft target**; existing code and tests decide status | | Historical plans (v4/v6/v7) | Project blueprint | **Historical**; superseded | ## Research tracks (not available) | Track | State | |---|---| | PASE parallel execution | Optional node setting; consensus-neutral; independent value transfers only | | WASM contract VM (C/C++/C#) | Experimental branch; not part of testnet-rc1; needs deterministic metering and audit | | Difficulty rule v2 (higher hash-rate band) | Candidate, not active | | liveness/v1 (duty window, inactivity exit) | Candidate genesis profile; active on local testnets only | | Distributed training, training rewards | Out of scope for testnet-rc1 | | Independent multi-operator AI cohort | Required before AI gates can pass; not established | ## Statements that are historical, not current - "AI revenue split 80/7/4/4/4/1" → replaced by [revenue policy v3](../ai/revenue-policy.md). - "Block rewards 80 % PoW / 20 % PoS" → current split is 79.2 / 19.8 / 1 % founder. - "The chain has no PUSH0/MCOPY" → obsolete; see [EVM compatibility](../blockchain/evm-compatibility.md). - Placeholder site URLs and the old `PQWERAI_v8` repository name in older material (corrected in this release). # Resources # Resources | Page | Contents | |---|---| | [Changelog](changelog.md) | API, SDK/tooling, contract toolchain and protocol changes | | [Compatibility matrix](compatibility.md) | Which Wallet, Core, explorer API and compiler versions were tested together | | [Versions](versions.md) | Documentation versions and what each covers | | [AI-friendly resources](ai-resources.md) | `llms.txt`, `llms-full.txt`, OpenRPC, OpenAPI, Postman | | [Source provenance](provenance.md) | How this site is built from reviewed sources, and the latest test results | | [Known gaps and limitations](gaps.md) | What is missing or not public yet | # AI-friendly resources # AI-friendly resources | Resource | Contents | |---|---| | [`/llms.txt`](../llms.txt) | Curated index of every public page with a one-line description | | [`/llms-full.txt`](../llms-full.txt) | Full text of every public page (Markdown) in one file | | [`rpc-methods.json`](../downloads/rpc-methods.json) | All 72 RPC methods: parameters, return types, access class, source location, recorded examples | | [`pqwerai-openrpc.json`](../downloads/pqwerai-openrpc.json) | OpenRPC 1.2.6 document of the public methods | | [`explorer-openapi.yaml`](../downloads/explorer-openapi.yaml) | Explorer REST API, OpenAPI 3.1 | | [`pqwerai-postman-collection.json`](../downloads/pqwerai-postman-collection.json) | Read-only RPC + explorer requests | | [`provenance.json`](../provenance.json) | Source commit, build version, pages, sources | These files are generated in the same build as the human pages, from the same allowlisted sources, and pass the same publication checks; there is no separate, broader export for agents. ## MCP documentation server (evaluated, not deployed) A read-only MCP server exposing `search_docs`, `get_page` and `get_rpc_method` over the files above is feasible (the data is static and public). It is not deployed yet. If built, it must serve only this build's public files, never the repository, and never proxy node RPC. # Changelog # Changelog ## Website feature refresh — 2026-11-11 - Added a wallet overview and updated the feature inventory to the 0.7.3 development checkpoint. - Documented opt-in local models, AI P2P, paid Ask, Contract Studio and token safety work. - Kept historical 0.6.0 acceptance separate from later implementation; no new wallet acceptance or public binary release claimed. - Reviewed website DNS, HTTPS and rollback instructions against the existing deployment. ## Developer Hub 1.0 — 2026-11-07 (docs) - First public developer portal: catalog, 8 tested journeys, JSON-RPC and explorer references, playground, `llms.txt`. - **Correction:** chain 77240 executes `PUSH0`, `MCOPY`, `TLOAD`/`TSTORE` (measured). Compile for `cancun` or `london`. - **Correction:** block issuance is 79.2 % PoW / 19.8 % PoS / 1 % founder (older guides said 80/20). - **Correction:** AI revenue policy v3 replaces 80/7/4/4/4/1 for new escrows. - Explorer: first OpenAPI 3.1 schema (`explorer/openapi.yaml`), contract-tested; `/api/v1/mining` documented. ## Protocol and Core (testnet-rc1) | Area | Change | |---|---| | Issuance | Founder treasury 1 % carved out of issuance (owner decision 2026-11-05); founder address required in genesis | | JSON-RPC | Filter API exposed (`eth_getLogs` and filters) with a 5000-block range bound; `eth_getFilterLogs` disabled | | JSON-RPC | `pqwerai_peerHealth` operator diagnostics | | JSON-RPC | `g4_status` adds `liveness_ejected_validators`, `liveness_participation_records` on liveness/v1 builds | | Finality | FFG checkpoint finality over the registry validator set; signer journal with double/surround locks | | P2P | Peer target, subnet limit, peer cache, signed seed manifests, discv4 seeded by bootnodes | ## Applications | Component | Version | Notes | |---|---|---| | Windows Wallet | 0.7.3 development | Studio, opt-in local models/P2P and paid Ask; historical complete gate remains 0.6.0 | | AI ServiceEscrow | v3 | Inference-only revenue policy | Format: entries record what changed for developers; exact commits are in the repository history and [provenance](provenance.md). # Compatibility matrix # Compatibility matrix (testnet-rc1) | Component | Version | Tested how | Result | |---|---|---|---| | Protocol | `pqwerai-v8-testnet/1`, chain 77240 | All journeys | ✅ | | Core (method inventory source) | `bad4a06ea` source snapshot | RPC methods extracted from source | ✅ 72 methods | | Core (live node used for tests) | release build `6a3337e7` (`CoreGeth/linux-amd64/go1.26.8`) | Live probe + journeys | ✅ 72/72 registered | | GhostRider helper | SHA-256 `3a54f0bb…99a8` | Mining on local testnet | ✅ | | PQWERAI Windows Wallet | 0.6.0 | Project test suite (not re-run for docs) | ✅ per release evidence | | Explorer API | v1 (`explorer/openapi.yaml` 1.0.0) | Contract test vs live index | ✅ 35/35 | | solc | 0.8.26+commit.8a97fa7a | Foundry + CLI | ✅ | | Vyper | 0.4.3+commit.bff19ea2 | CLI | ✅ | | Huff Neo `hnc` | 1.7.1 (2fe1d0c9) | CLI | ✅ (experimental tooling) | | Fe | 26.5.1 (149c758) | CLI | ✅ (experimental language) | | OpenZeppelin Contracts | 5.0.2 (tar SHA-256 `18c7b7e9…925a`) | ERC-20/721/1155, Ownable2Step, AccessControl | ✅ | | Foundry | 1.8.5 (51a52c5) | Every journey | ✅ | | Hardhat, Remix, ethers.js, viem, web3.py | — | Not executed | ⚪ NOT RUN | !!! note "Two Core revisions" The repository holds the Core source snapshot `bad4a06ea` that the RPC inventory is parsed from; the local testnet used to verify it runs the later release build `6a3337e7`. Every method in the snapshot is registered on the live build; the live build additionally reports liveness fields in `g4_status`. # Known gaps and limitations # Known gaps and limitations | Area | Gap | |---|---| | Network | Private testnet only. No public RPC endpoint, no public bootnodes for outsiders, no mainnet | | Faucet | Specified (5 PQAI per request, rate-limited) but not operated publicly | | Explorer | No public instance; no cursor pagination; no source verification; token names/symbols not read; ERC-1155 events not decoded; PostgreSQL path not executed | | JSON-RPC | HTTP only (no WebSocket subscriptions); no tracing (`debug_*`/`trace_*`); `safe`/`finalized` tags unsupported (use `g4_status`) | | SDKs | No official JS/TS/Python SDK; Hardhat, Remix, ethers.js, viem and web3.py examples were not executed for this release | | Contract languages | Huff and Fe tooling in the Wallet Studio is on an unreleased branch; Fe is experimental | | Wallet | Windows only (Linux CLI); not code-signed; no hardware-wallet support; not independently audited; complete 0.7.3 acceptance not rerun for this site update | | Native Windows node | Not available (WSL2 required) | | AI | No public provider network or gateway; single-operator local tests; receipts are provider claims; distributed routing and accountable hardware measurement open; training out of scope | | Finality | Local adversarial tests pass; **no independent consensus/security audit yet** | | Documentation | Edit/report links point to a private repository; external readers need another feedback channel. Screenshots and accessibility checks are automated locally but there is no external accessibility audit | # Source provenance # Source provenance ## Pipeline ```mermaid flowchart LR A[Core sourcemethod signatures] --> I[rpc_inventory.py] L[Live local node] --> I I --> R[rpc-methods.json] O[explorer/openapi.yaml] --> C[explorer_contract_test.py] X[Live explorer index] --> C N[network.json] --> G[gen_reference.py] R --> G O --> G G --> D[developers/docsgenerated pages] E[developers/examples] --> H[run_examples.shon local testnet] E --> M[MkDocs build+ devhub hook] D --> M P[authored pagesclassification: public] --> M M --> K[check_docs.pylinks · secrets · policy] K --> S[(Published site+ provenance.json)] ``` - **Allowlist:** `developers/SOURCE_MANIFEST.json` lists the only repository paths that may feed the site; private directories are explicitly excluded. - **Classification gate:** the build fails if any page lacks `classification: public` or a valid status. - **Secret gate:** the built site is scanned for private keys, tokens, private paths, non-documentation IP addresses and a hashed deny-list of sensitive values (the values themselves are never committed). - **Freshness gates:** generated pages must equal what the current inputs produce; RPC method references, compiler versions, chain parameters and economic statements are checked against their sources. - **Identity:** every page footer and `/provenance.json` name the exact source commit and build version. ## Latest results (2026-11-07) | Check | Result | |---|---| | RPC inventory: source methods registered on live node | PASS 72/72; 9 absent namespaces confirmed `-32601` | | Explorer contract test (static + live) | PASS 35/35 | | Tutorial journeys on local testnet | PASS 19/19 steps in 11 journeys (below) | | Documentation build (`mkdocs build --strict`) and `check_docs.py` | PASS 11/11 gate checks | | Unit tests (`tests/test_devhub.py`) | PASS 10/10 | | Ethers.js, viem, web3.py, Hardhat, Remix examples | NOT RUN (dependencies not installed) | | Journey | Steps | Result | |---|---|---| | Blockchain quickstart (incl. waiting for BFT finality) | 6 | PASS | | Raw JSON-RPC with curl | 1 | PASS | | Python opcode probe | 1 | PASS | | First smart contract (build, deploy, verify, interact) | 4 | PASS | | ERC-20 token | 1 | PASS | | ERC-721 and ERC-1155 | 1 | PASS | | Access control, events, payable, libraries (TipJar) | 1 | PASS | | Five-language Counter (Solidity, Vyper, Yul, Huff, Fe) | 1 | PASS | | AI escrow (quote, fund, propose, accept, finalize, withdraw, refund) | 1 | PASS | | Mining rewards counters | 1 | PASS | | Smartnode key generation and registry reads | 1 | PASS | Not executed against the chain for this release: Smartnode registration, delegation and exit (would change the shared validator set). Raw results and logs: `audit/evidence/devhub/` in the repository. # Documentation versions # Documentation versions | Version | URL path | Covers | Search index | |---|---|---|---| | **testnet-rc1** (current, alias `latest`) | `/testnet-rc1/` | Private testnet, protocol `pqwerai-v8-testnet/1` | Own index, this version only | | dev | built on request | Unreleased branches (e.g. Studio multi-language, WASM VM) | Separate, never aliased to latest | | Archived versions | `//` | Rebuilt from their release tag when a newer testnet ships | Own index | | Mainnet | — | Not authorized; published only after an explicit owner decision | — | The version selector in the header lists the published versions (`/versions.json`). Each version is built from one source commit; the commit and build version are printed in the header banner and in `/provenance.json`. # Smartnodes and Finality # Smartnodes and Finality Smartnodes are validators registered on chain with stake. Each 32-block epoch they sign the checkpoint link chosen by the Casper-FFG voting rule; a link signed by **more than 2/3 of the epoch set's effective stake** justifies the target, and justification of the next checkpoint finalizes it. Nodes never reorganise below the finalized checkpoint. | Topic | Page | |---|---| | Run a validator | [Set up a Smartnode](../getting-started/smartnode.md) | | Register, top up, delegate, claim, rotate, exit, withdraw, slash | [Registry operations](registry-operations.md) | | Votes, certificates, evidence, guarantees | [BFT finality](finality.md) | | What applications should wait for | [Finality for applications](../blockchain/finality.md) | !!! note "What finality does and does not claim" Finality on testnet-rc1 is an FFG-style checkpoint protocol over a registry-derived validator set with signature-verified votes and slashable equivocation. It has passed the project's local adversarial tests; it has **not** had an independent consensus/security audit, which remains a requirement before any public launch. # BFT finality # BFT finality | Parameter | Value | |---|---| | Epoch / checkpoint spacing | 32 blocks | | Quorum | strictly more than 2/3 of the epoch set's effective stake | | Minimum genesis validators | 4 | | Max link span | 4096 blocks | | Vote transport | signed votes over authenticated JSON-RPC (`g4_submitVote`); certificates travel in blocks over devp2p | ## Flow ```mermaid sequenceDiagram participant S as Validator signer participant N as Own node participant C as Chain S->>N: g4_link (source = justified, target = latest checkpoint) N-->>S: RLP vote context S->>S: journal check (no double / surround vote), fsync S->>N: g4_submitVote(context, signed vote) N->>N: verify signature vs epoch set, reject stale / replayed N->>C: certificate transaction once > 2/3 stake signed C-->>C: justify target, finalize source ``` ## Safety mechanisms - **Signer journal:** persistent, fsync before releasing a vote, refuses double votes (same target height, different hash) and surround votes, anchored against stale backups. Never restore it from an old backup. - **Equivocation evidence:** a node that sees two conflicting votes from one validator records them (`g4_evidence`) and relays a slashing transaction; 25 % of the validator's stake is burned. - **Vote flood resistance:** forged, malformed, stale and replayed submissions are rejected and counted (`g4_status.vote_counters`); rejected traffic cannot crowd out valid votes. ## Liveness With less than 2/3 of stake online, PoW block production continues but finality stalls. The candidate `liveness/v1` genesis profile (experimental; active on the local testnet) adds a duty window for late certificates and force-exits validators that carry no vote for K consecutive checkpoints (not slashed); `g4_status` then reports `liveness_ejected_validators` and `liveness_participation_records`. # Smartnode registry operations # Registry operations Registry operations are ordinary transactions sent to the registry system account `keccak256('PQAI/private/G4/registry/v1')[12:]`, each with gas limit 150,000. Use `pqwerai-cli`, `pqwerai-wallet-cli` or the Windows Wallet; the calldata format is internal and byte-identical between the Go and C# tools. | Op | Code | Command | Rules | |---|---|---|---| | Register | 1 | `sn-register -from -keyfile sn-key.json -stake ` | Proof of possession binds key, owner, chain ID, genesis. Min 1 PQAI. Activates after 2 epochs | | Top up | 2 | `sn-topup -from -id -amount ` | Effective stake capped at 2048 PQAI | | Delegate | 3 | `sn-delegate -from -id -amount ` | Min 0.001 PQAI | | Undelegate | 4 | `sn-undelegate -from -id -amount ` | | | Claim | 5 | `sn-claim -from -id ` | Withdraw accrued validator rewards | | Rotate key | 6 | `sn-rotate -from -id -keyfile new.json` | Restart the signer with the new key | | Exit | 7 | `sn-exit -from -id ` | Leaves the set at its exit epoch | | Withdraw | 8 | `sn-withdraw -from -id ` | After 4 unbonding epochs **and** finality of the withdrawable epoch | | Slash | 9 | `sn-slash -from -vote-a -vote-b ` | Double or surround vote evidence; burns 25 % of stake | Read-only views: `pqwerai-cli sn-validators`, `sn-status`, or [`g4_validators`](../reference/json-rpc/g4.md#g4_validators) and [`g4_status`](../reference/json-rpc/g4.md#g4_status). Limits: at most 64 validators in an epoch set and 256 registered; evidence is accepted within 3 epochs. # Wallets and SDKs # Wallets, SDKs and tools !!! note "Official vs. compatible" PQWERAI publishes **no official JavaScript, TypeScript or Python SDK**. The official tools are the Windows Wallet, `pqwerai-cli`/`pqwerai-wallet-cli` and the node. Everything else is standard Ethereum tooling that works because PQWERAI speaks Ethereum JSON-RPC. Filter tools | Tool | Kind | Status for this release | Use for | |---|---|---|---| | [PQWERAI Windows Wallet 0.6.0](windows-wallet.md) | Official desktop wallet | ✅ Released to testers; tested 101/101 unit+integration, 11/11 UI | Accounts, transfers, tokens, Studio deploys, own node, mining, Smartnodes, AI sharing | | [pqwerai-cli / pqwerai-wallet-cli](core-cli.md) | Official CLI | ✅ Tested (keygen, registry reads); parity 21/21 | Scripts, Smartnode operations, backups | | [Foundry 1.8.5](foundry.md) | Contract toolchain + CLI | ✅ Every tutorial executed with it | Compile, deploy, test, `cast` RPC calls (TypeScript-free) | | [Hardhat](hardhat.md) | JS/TS contract toolchain | Configuration documented, **not executed** | TypeScript projects, plugins | | [Remix](remix.md) | Browser IDE | Configuration documented, **not executed** | Learning, quick experiments | | [ethers.js v6](ethers.md) | TS/JS library | Example **not executed** | Frontends, Node.js backends | | [viem 2](viem.md) | TS library | Example **not executed** | Typed frontends | | [web3.py 7](web3py.md) | Python library | Example **not executed** | Python backends, data jobs | | Python standard library | — | ✅ [Opcode probe](../blockchain/evm-compatibility.md#probe-a-node-yourself) executed | Minimal JSON-RPC clients | | [Explorer API](../explorer/index.md) | REST | ✅ Contract-tested | Indexed history, issuance, validators | | [Contract verification](../contracts/verification.md) | Procedure | ✅ Tested | Proving deployed bytecode | "Not executed" means the configuration is written from the chain's verified parameters, but the dependency was not installed and run for this release (no new downloads were authorized). See [Known gaps](../resources/gaps.md). ## Chain configuration for any tool | Setting | Value | |---|---| | Chain ID | `77240` (`0x12db8`) | | Currency | PQAI, 18 decimals | | RPC | your node, e.g. `http://127.0.0.1:8545` | | EVM target | `cancun` (no blob opcodes) or `london` | | Finality | `g4_status.finalized_height` — not the `finalized` block tag | # Core CLI and flags # Core CLI and configuration flags Extracted from the Core source at the documented revision. `pqwerai-core` is the node; `pqwerai-cli` is the command-line wallet and Smartnode tool (the Windows Wallet ships the equivalent `pqwerai-wallet-cli`). ## `pqwerai-core` node flags | Flag | Type | Default | Description | |---|---|---|---| | `--datadir` | string | — | database directory (required) | | `--genesis` | string | — | private-testnet genesis.json (required) | | `--helper` | string | — | GhostRider hash helper path (required) | | `--helper-sha256` | string | — | GhostRider hash helper SHA-256 (required) | | `--difficulty` | uint64 | `16` | fixed private-testnet base difficulty; must match genesis | | `--port` | int | `0` | P2P TCP port (0 = random) | | `--rpc.addr` | string | `127.0.0.1` | JSON-RPC bind address | | `--rpc.port` | int | `8545` | JSON-RPC port | | `--rpc.token-file` | string | — | file containing a bearer token; REQUIRED for non-loopback RPC | | `--peers` | string | — | comma separated enode URLs to connect to | | `--mine` | bool | `false` | mine GhostRider blocks | | `--etherbase` | string | — | mining reward address | | `--pase-workers` | int | `0` | experimental PASE workers (0 = canonical serial, the default) | | `--g4-relayer-key` | string | — | secp256k1 key file of a funded disposable test account that relays finality certificates | | `--verbosity` | int | `3` | log level 0-5 | | `--expect-genesis-hash` | string | — | refuse to start unless the genesis block hash equals this value | | `--maxpeers` | int | `16` | maximum P2P peers | | `--p2p.target` | int | `8` | keep at least this many peer connections when candidates exist ( | | `--rpc.logs-max-range` | uint64 | `5000` | maximum block range of one eth_getLogs request | | `--miner.gasceil` | uint64 | `0` | block gas limit this miner targets (0 = keep the genesis gas limit) | | `--miner.certificate-hold` | duration | `ethash.CertificateHoldDuration` | local policy: max wait after a finality checkpoint for its certificate before sealing (0 = off) | ## `pqwerai-core genesis` flags (network creation) | Flag | Type | Default | Description | |---|---|---|---| | `--helper` | string | — | GhostRider hash helper path | | `--helper-sha256` | string | — | GhostRider hash helper SHA-256 | | `--difficulty` | uint64 | `16` | fixed private-testnet base difficulty | | `--out` | string | `genesis.json` | output file | | `--alloc` | string | — | comma separated 0xADDRESS=PQAI whole-coin test allocations | | `--validators` | string | — | JSON validator list; enables the private registry + FFG finality profile | | `--founder` | string | — | public founder address receiving 1% of new issuance (79.2/19.8/1); registry profile only | | `--timestamp` | uint64 | `uint64(time.Now().Unix()-3600)` | genesis timestamp | | `--chain-id` | uint64 | `ethash.DevFixtureChainID` | private testnet chain ID (1337 disposable fixture, 77240 testnet-rc1) | | `--gas-limit` | uint64 | `15000000` | genesis block gas limit | ## `pqwerai-cli` global flags | Flag | Type | Default | Description | |---|---|---|---| | `-rpc` | string | `http://127.0.0.1:8545` (env `PQWERAI_RPC`) | node JSON-RPC URL | | `-token-file` | string | env `PQWERAI_RPC_TOKEN_FILE` | RPC bearer token file | | `-keystore` | string | `pqwerai-keystore` (env `PQWERAI_KEYSTORE`) | keystore directory | | `-password-file` | string | env `PQWERAI_PASSWORD_FILE` | password file (else first stdin line) | | `-backup-password-file` | string | env `PQWERAI_BACKUP_PASSWORD_FILE` | backup passphrase file (encrypted backups) | | `-timeout` | duration | `60s` | operation timeout | ## `pqwerai-cli` commands `backup` `balance` `call` `deploy` `erc20-balance` `erc20-transfer` `erc721-owner` `erc721-transfer` `history` `import-key` `list` `new` `nonce` `read` `restore` `send` `sn-claim` `sn-delegate` `sn-exit` `sn-keygen` `sn-register` `sn-rotate` `sn-slash` `sn-status` `sn-topup` `sn-undelegate` `sn-validators` `sn-withdraw` `status` `tx` `verify-backup` Transaction and Smartnode commands accept: | Flag | Description | |---|---| | `-from` | sender | | `-to` | recipient / contract | | `-amount` | PQAI (or token units for erc20) | | `-code` | contract creation bytecode hex file | | `-data` | calldata hex | | `-token` | token contract | | `-id` | token id or validator id | | `-keyfile` | BFT key file | | `-vote-a` | signed vote hex (sn-slash) | | `-vote-b` | signed vote hex (sn-slash) | | `-stake` | stake in PQAI | | `-owner` | owner | | `-encrypt` | seal the whole backup with the backup passphrase | | `-out` | output key file | !!! warning "Secrets" Pass passwords with `-password-file` (mode 0600) or stdin, never as arguments. Keep mining payout keys and validator keys off shared servers. # ethers.js # ethers.js v6 !!! warning "Not executed for this release" Pin the version you test (e.g. `npm install ethers@6.13.4 --save-exact`). The JSON-RPC behaviour it relies on is verified in the [reference](../reference/json-rpc/index.md). ```ts title="pqwerai.ts" import { JsonRpcProvider, Wallet, Contract, parseEther } from "ethers"; const provider = new JsonRpcProvider(process.env.PQWERAI_RPC ?? "http://127.0.0.1:8545", 77240, { staticNetwork: true }); if ((await provider.getNetwork()).chainId !== 77240n) throw new Error("not PQWERAI testnet"); console.log("head", await provider.getBlockNumber()); // Load an encrypted keystore (never a raw key in source code) const wallet = (await Wallet.fromEncryptedJson(keystoreJson, password)).connect(provider); const tx = await wallet.sendTransaction({ to: "0x000000000000000000000000000000000000dEaD", value: parseEther("0.01") }); const receipt = await tx.wait(); // PQWERAI finality (do not use provider.getBlock("finalized"): it errors on PQWERAI) async function isFinal(blockNumber: number, blockHash: string) { const s = await provider.send("g4_status", []); return s.finalized_height >= blockNumber && (await provider.getBlock(blockNumber))?.hash === blockHash; } const counter = new Contract(address, ["function get() view returns (uint256)", "function increment()"], wallet); await (await counter.increment()).wait(); console.log(await counter.get()); ``` - `staticNetwork: true` avoids repeated `eth_chainId` polling. - Event subscriptions use polling (HTTP only); keep ranges within 5000 blocks. # Foundry # Foundry Foundry 1.8.5 is the reference toolchain for this documentation: every Getting Started journey is executed with it. ```bash curl -L https://foundry.paradigm.xyz | bash foundryup --install 1.8.5 forge --version # forge Version: 1.8.5 ``` ```toml title="foundry.toml" --8 --ether --rpc-url "$RPC"` | | Send | `cast send --value 0.01ether --keystore … --password-file … --rpc-url "$RPC"` | | Deploy | `forge create src/C.sol:C --broadcast --keystore … --password-file … --rpc-url "$RPC" --constructor-args …` (constructor args **last**) | | Raw bytecode deploy | `cast send --async --create 0x` (options **before** `--create`) | | Call | `cast call "get()(uint256)" --rpc-url "$RPC"` | | PQWERAI finality | `cast rpc g4_status --rpc-url "$RPC"` | | Logs | `cast logs --from-block N --to-block M --address "Event(...)"` (≤ 5000 blocks) | Notes from testing: - `cast receipt status` prints `true`/`false`. - `forge` lint warnings (e.g. `reentrancy-events`) are advisory; the tutorials are written to avoid them. - Offline builds: `FOUNDRY_OFFLINE=true FOUNDRY_SOLC=/path/to/solc-0.8.26`. - `forge script --broadcast` works like on any EVM chain; set `--chain-id 77240` if you sign offline. # Hardhat # Hardhat !!! warning "Not executed for this release" This configuration is derived from the verified chain parameters but was not run (Hardhat was not installed on the test machine). Report problems with the link at the bottom of the page. ```ts title="hardhat.config.ts" import type { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; const config: HardhatUserConfig = { solidity: { version: "0.8.26", settings: { evmVersion: "cancun", optimizer: { enabled: true, runs: 200 }, metadata: { bytecodeHash: "none" } }, }, networks: { pqwerai: { url: process.env.PQWERAI_RPC ?? "http://127.0.0.1:8545", chainId: 77240, accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : [], // prefer a hardware wallet or keystore plugin }, }, }; export default config; ``` ```bash npx hardhat compile npx hardhat run scripts/deploy.ts --network pqwerai ``` - Do not commit private keys or `.env` files; never reuse a mainnet key. - Hardhat's "finalized" helpers do not understand PQWERAI finality; check `g4_status` ([finality](../blockchain/finality.md)). - Contract verification plugins (Etherscan) do not apply; use [byte-for-byte verification](../contracts/verification.md). # Remix # Remix !!! warning "Not executed for this release" 1. Compiler: **0.8.26**, EVM version **cancun** (Advanced configurations), optimizer 200 runs. 2. Deploy & run → *Environment*: - **Injected Provider** with a browser wallet configured for chain ID 77240 and your node URL, or - **Custom – External HTTP Provider** pointing at your node. 3. PQWERAI Core sends no CORS headers, so a browser page cannot call a node directly unless you run a local proxy that adds them for `https://remix.ethereum.org`. Do not expose a node publicly to make Remix work. 4. To deploy with the PQWERAI Windows Wallet instead: compile in Remix, copy the compiled artifact JSON, and use **Studio → Paste from AI/file** — the wallet recognises Remix artifacts. # viem # viem 2 !!! warning "Not executed for this release" ```ts title="chain.ts" import { defineChain, createPublicClient, createWalletClient, http, parseEther } from "viem"; import { privateKeyToAccount } from "viem/accounts"; export const pqwerai = defineChain({ id: 77240, name: "PQWERAI Testnet", nativeCurrency: { name: "PQAI", symbol: "PQAI", decimals: 18 }, rpcUrls: { default: { http: [process.env.PQWERAI_RPC ?? "http://127.0.0.1:8545"] } }, testnet: true, }); const client = createPublicClient({ chain: pqwerai, transport: http() }); console.log(await client.getBlockNumber()); // PQWERAI finality comes from g4_status, not blockTag "finalized" const status = await client.request({ method: "g4_status" as any, params: [] as any }); const wallet = createWalletClient({ chain: pqwerai, transport: http(), account: privateKeyToAccount(process.env.KEY as `0x${string}`) }); const hash = await wallet.sendTransaction({ to: "0x000000000000000000000000000000000000dEaD", value: parseEther("0.01") }); await client.waitForTransactionReceipt({ hash }); ``` Do not pass `blockTag: "finalized"` or `"safe"`; PQWERAI Core returns `finalized block not found`. # web3.py # web3.py 7 !!! warning "Not executed for this release" The standard-library [opcode probe](../blockchain/evm-compatibility.md#probe-a-node-yourself) is the executed Python example. Pin web3 when you test (e.g. `pip install web3==7.6.0`). ```python title="pq_w3_example.py" import json, os from web3 import Web3 from eth_account import Account w3 = Web3(Web3.HTTPProvider(os.environ.get("PQWERAI_RPC", "http://127.0.0.1:8545"))) assert w3.eth.chain_id == 77240, "not the PQWERAI testnet" print("head", w3.eth.block_number) acct = Account.from_key(Account.decrypt(json.load(open("keystore/dev")), open("keystore/dev.password").read().strip())) tx = {"to": "0x000000000000000000000000000000000000dEaD", "value": w3.to_wei(0.01, "ether"), "nonce": w3.eth.get_transaction_count(acct.address, "pending"), "chainId": 77240, "maxPriorityFeePerGas": w3.eth.max_priority_fee, "type": 2} tx["maxFeePerGas"] = 2 * w3.eth.get_block("latest")["baseFeePerGas"] + tx["maxPriorityFeePerGas"] tx["gas"] = w3.eth.estimate_gas({**tx, "from": acct.address}) h = w3.eth.send_raw_transaction(acct.sign_transaction(tx).raw_transaction) r = w3.eth.wait_for_transaction_receipt(h) status = w3.provider.make_request("g4_status", [])["result"] print("final" if status["finalized_height"] >= r["blockNumber"] else "awaiting finality") ``` # PQWERAI Windows Wallet # PQWERAI Windows Wallet Non-custodial wallet for the private testnet: keys stay on your PC, signing is local, the wallet talks to a PQWERAI node over JSON-RPC. The latest reviewed development checkpoint is **0.7.3**, source `1d2919f22c5c27d26ad6a4a5bd951f82112b968d` on `release/wallet-0.7.0` (reviewed 11 November 2026). It is **not independently audited and not code-signed** yet. This website distributes documentation, not wallet binaries. The historical **0.6.0** gate passed 101/101 unit and integration tests and 11/11 installed-executable UI tests. Those results do not certify the complete 0.7.3 build; this website update does not rerun wallet acceptance. ## Latest development features | Feature | Implementation and limits | |---|---| | Contract Studio | Multi-language projects, ABI handling, simulation, project attachments and deployment verification; ERC-1155, ERC-4626 and permit templates | | Token protection | Warnings for suspicious token names and approvals; native PQAI wrap/unwrap support | | Local models | Optional signed Bonsai model bundle, hash verification, registry approval/revocation checks and bounded local runtime; explicit download and hosting consent | | AI P2P | Opt-in overlay, provider discovery and relay support; availability depends on reachable peers and an approved network | | Paid Ask | Discover an eligible provider, inspect its signed quote, confirm the maximum spend, fund a testnet escrow and accept the delivered charge | | Experimental WASM | C# and C++ tooling requires a compatible experimental chain; not implied by standard chain connectivity | Studio's historical local run at `7a23858` passed S1–S5 and two GUI checks. Its broader selection also recorded one environment-dependent AI quote failure and one local-node skip. No complete 0.7.3 acceptance or independent multi-operator AI acceptance is claimed. Provider signatures identify a claim; they do not independently prove inference quality. ## Install | Artifact | Use | |---|---| | `PQWERAI-Wallet--win-x64.msi` | Per-user install, no administrator rights | | `PQWERAI-Wallet--win-x64-portable.zip` | Portable; data stays next to the exe; includes `pqwerai-wallet-cli.exe` | | `pqwerai-wallet-cli--linux-x64.tar.gz` | Linux command-line wallet | Verify the SHA-256 against `SHA256SUMS` before running: `Get-FileHash -Algorithm SHA256`. ## Features for developers | Area | What it does | |---|---| | Network | Pins chain ID **and** genesis hash on approval; refuses to sign if they change; bearer tokens DPAPI-protected; https certificate pinning | | Studio | Flowchart to deploy ERC-20 / ERC-721 templates (OpenZeppelin 5.0.2, precompiled) or custom Solidity; byte-for-byte post-deploy verification | | Own node | Runs the verified Linux Core in WSL2, joins or creates a network, optional GhostRider mining | | Smartnodes | Register (Ed25519 key + proof of possession), delegate, top up, exit, withdraw, claim, report conflicting votes; finality dashboard | | AI Sharing | Opt-in local models and P2P; local diagnostic requests are not payable; paid Ask is a separate explicitly funded testnet escrow flow | | Console | `pqwerai-wallet-cli` inside the wallet (`status`, `balance $me`, `send …`, `sn-validators`) | | Command palette | Ctrl+K / F1 | ## Security model (summary) - Web3 Secret Storage V3 keystores (scrypt), encrypted backup v2 (AES-256-GCM), keys zeroed after signing. - No `personal_*`/`eth_sign*` RPCs, no telemetry; every RPC response treated as hostile (size, depth, id, hex checks). - Fee rule: `maxFee = 2 × baseFee + tip`; amounts are exact integers. - Status progression: Pending → Confirmed → **BFT-Finalized** (block ≤ `g4_status.finalized_height`, still canonical). Download location and release notes are published by the PQWERAI project for testers; the wallet source is not public.