Prerequisites
For the local quickstart
Section titled “For the local quickstart”You need Node.js and a package manager. Nothing else: no account, no keys to fund, no network.
- Node.js 22 or later. Check with
node --version. Install from nodejs.org. - pnpm, npm or yarn. The examples use pnpm 10:
corepack enable pnpm.
Then go to the local quickstart.
For the QoreChain testnet
Section titled “For the QoreChain testnet”PQ-402 settles on the QoreChain testnet (qorechain-diana, EVM chain id 9800). Each account that takes part, the
server’s and the client’s, needs the following. Each item is explained once here; the
testnet quickstart runs them in order.
-
A testnet account. A BIP-39 phrase is enough: the same phrase gives you an EVM address (
0x…), the same account in bech32 form (qor1…), an ML-DSA-87 key and an ML-KEM-1024 key. Use a phrase that holds nothing else. -
QOR for fees. Claim it at the faucet, dashboard.qorechain.io/faucet. It pays 100 QOR per claim, once every 24 hours, to a
qor1…address. Registering keys and opening EVM windows are native transactions that cost QOR. The client only needs QOR for its own setup: the server pays the gas of every payment. -
fUSD, for the client. fUSD is the testnet dollar (6 decimals) that payments are made in. The faucet sends it with the QOR, as a bank coin. A contract can only see it as an ERC-20 balance, so convert it first with the native message
/cosmos.evm.erc20.v1.MsgConvertCoin(denomerc20:0x97143B771D34ddb9130b807b135Ae675A5a963CA). QoreChain’s EVM development guide shows the message. -
A registered ML-DSA-87 key. This is the key that signs payments, receipts and escrow withdrawals. You register it once, with a proof of possession that shows the chain you hold the secret key. Contracts read it through the
pqcKeyStatusprecompile and check signatures withpqcVerify. -
A registered ML-KEM-1024 key. This is the key others seal to. The server reads the client’s key from the chain’s KEM key registry to seal the answer, and the client reads the server’s to seal the question. Neither side ever takes a key from the other’s messages. Register both keys.
-
An open EVM window, where needed. On QoreChain an account sends EVM transactions only inside a window it opens with a native transaction. A window has a lifetime in blocks, a transaction count, a QOR budget and, when scoped, a list of contracts it may call. The server needs one scoped to the escrow (and the agent-budget vault if you offer it) to submit settlements. The client needs one only to deposit into or withdraw from the escrow. See
window.ts.