Built for Build Before Q-Day. Live on the QoreChain testnet, qorechain-diana. Read the source
Docs

Build with Fenestella

Four things you can use today: the request call, the MCP server for AI agents, the account API, and the contracts. Everything here runs against qorechain-diana; reading accounts works on mainnet too.

Ask for a window

@fenestella/connect has no dependencies and is on npm (source in packages/connect):

npm install @fenestella/connect
import { requestWindow, FenestellaError } from "@fenestella/connect";

try {
  const granted = await requestWindow({
    reason: "Pay this month's invoices from the Bills contract.",
    allowedTargets: ["0xa8006f2378e8307ffdb0d46fc89668bc69d00eb0"],
    maxTxs: 10,
    maxValueUqor: "2000000", // 2 QOR: value plus the maximum fee of each transaction
    blocks: 1200,
    network: "testnet",
  });
  // granted.txHash, granted.account, granted.evmAddress
  // granted.window: what the chain now stores for the account
} catch (err) {
  if (err instanceof FenestellaError) {
    // err.code: "rejected" | "invalid" | "failed" | "blocked" | "closed" | "timeout"
  }
}
FieldMeaningChain limit
blocksHow long the window stays open1 to 17,280
maxTxsHow many EVM transactions it admits1 to 1,000
maxValueUqorTotal value plus maximum fees, in uqor (1 QOR = 1,000,000)above 0
allowedTargetsThe only recipients allowed; contract creation is refusedat most 16
nativeOnlyPlain QOR transfers only; cannot be combined with targets
reasonShown to the user as your words280 characters

What the user sees, and what you cannot change:

Call requestWindow() from a click handler, or the browser blocks the popup. Try the flow.

Skip the request when a window already fits

import { windowCovers } from "@fenestella/connect";

const res = await fetch(
  "https://fenestella.vercel.app/api/account?network=testnet&address=" + account,
);
const { truth } = await res.json();

if (!windowCovers(truth.window, need)) {
  await requestWindow({ ...need, reason: "..." });
}

For AI agents: the MCP server

@fenestella/mcp gives Claude, Cursor or any MCP client a QoreChain agent on a leash the chain enforces. Its key, kept on your machine, may call only AgentVault.payBill; the vault pays only payees you approved with your post-quantum key, within your limits. Without a key it reads: what a stolen classical key could do to an account, the Q-Day radar, your vault and bills, and the pqcVerify / pqcKeyStatus precompiles.

npx @fenestella/mcp keygen      # prints a new agent key

// claude_desktop_config.json or .mcp.json
{
  "mcpServers": {
    "fenestella": {
      "command": "npx",
      "args": ["-y", "@fenestella/mcp"],
      "env": { "FENESTELLA_AGENT_KEY": "0x…" }
    }
  }
}

Tools: check_account, qday_radar, vault_status, list_bills, request_window (a link you approve in your own wallet), verify_pq_signature, link_agent and pay_bill. The relayer forwards only a payBill call to the vault and refuses to spend a fee on a bill the vault would refuse. Full guide.

Account API

Read-only, no key needed. Each section of the answer is read on its own; one that fails is named in unknown and is never reported as safe.

GET /api/account?network=testnet&address=qor1...   (or 0x...)

{
  "truth": {
    "address": { "cosmos": "qor1...", "evm": "0x..." },
    "keyType": "eth_secp256k1",
    "pqc": { "registered": true, "possessionProven": true },
    "kem": { "found": false },
    "window": { "live": true, "remainingTxs": "2", "remainingValue": "200000",
                "remainingBlocks": "118", "nativeOnly": false,
                "allowedTargets": ["0x..."] },
    "abstractAccount": { "moduleEnabled": true, "account": null,
                         "rules": [], "authenticators": [] },
    "unknown": []
  },
  "exposure": { "level": "scoped", "headline": "...", "can": [], "cannot": [],
                "warnings": [], "advice": [], "linkedKeys": [] }
}

Exposure levels: takeover, open, scoped, sealed, unknown.

Contracts on testnet

ContractAddressWhat it does
FenestellaReceipts0xc520f7084758a3faafd2d8ffb7432c87787a1accRecords a digest only with an ML-DSA-87 signature by the account's registered key
AgentVault0x51fb13cc0513f02cd16e98f9b4a9f233027c2551Holds each owner's agent budget and bills. Pays only an approved payee within the owner's limits; payees, limits, pause and withdrawal change only with the owner's ML-DSA-87 signature, checked by pqcVerify
AgentReports0x2b8d4cdcdc7a2efbcfca7691b58605dc1bc91462A mailbox that only emits: the agent posts reports signed with its post-quantum key and sealed to the owner
Bills0xa8006f2378e8307ffdb0d46fc89668bc69d00eb0The first bill contract, kept for older leashes: paying forwards the exact amount and holds nothing

QorePQC.sol wraps the chain's pqcKeyStatus and pqcVerify precompiles and reverts when a precompile is inactive, so an empty answer is never read as “verified”. Reuse it in your own contracts.

Run it yourself

git clone https://github.com/angelraph/fenestella
cd fenestella && npm install
npm run dev      # the console
npm test         # unit tests
npm run spike    # window lifecycle on testnet with a throwaway key
npm run attack   # everything the classical key alone can try