# XE Testnet

> Public testnet for XE, an open-source Layer 1 for decentralized compute and networking: per-account block lattice, ~3s finality, zero fees, signed P2P chat, multisig governance and compute leasing, with a JSON HTTP API on every node.

XE Testnet (https://test.network) is the public testnet site for XE, operated by XE L1 Ltd.. XE is pre-1.0: the network `testnet-0001` is live for the ledger (send, receive, burn, faucet), signed P2P chat, the multisig-governed state chain and every read endpoint; compute leasing, XUSD issuance and providers are built but not open on this testnet yet. Everything here is free to use and the source is GPL-3.0 at https://github.com/xeprotocol/xe.

**When to use XE Testnet.** Reach for it when the job is one of these:

- Read live ledger state programmatically — accounts, balances, per-account block chains, recent blocks, pending sends, frontiers, delegation weights or conflicts — with no API key.
- Move test value between accounts: create an ed25519 keypair, draw 1,000 XE per account per day from the faucet, then submit signed `send`/`receive`/`burn` blocks with zero fees and ~3s finality.
- Prototype agent-to-agent payments or machine identities on a per-account block lattice where each participant owns its own chain.
- Send or subscribe to ed25519-signed peer-to-peer chat between accounts (SSE delivery).
- Inspect on-chain governance: state-chain blocks, the DAO keyset and system keys such as `sys.network_id` and `sys.minter`.
- Run or test an XE node, a provider, or a block explorer against a real network, or hunt bugs for the XE bounty.

**Not the right tool** for anything needing real monetary value, stable (XUSD-priced) compute leasing, GPU compute or end-to-end encrypted messaging: those are on the roadmap, not testable yet. XE on this testnet has no monetary value, and the network can be wiped.

**How to call it.** The JSON HTTP API needs no authentication for reads. Use the versioned base `https://test.network/api/v1`: `GET https://test.network/api/v1/node` returns node info, `GET https://test.network/api/v1/accounts` lists accounts. 32 read endpoints are open; the machine-readable contract is the OpenAPI 3.1 document at https://test.network/openapi.json (unique operationIds, typed parameters, request and response schemas, typed errors). Amounts are integer micro-units (1 XE = 1,000,000). Writes are signed blocks you construct yourself — the node never signs for you. Rate limits are per IP (reads 1000 per 5s, writes 50 per 5s) and every response carries `RateLimit-Policy` and `RateLimit` headers, with `Retry-After` on a 429. Errors are JSON with `error.code`, `error.message` and `error.hint`. The API is versioned in the path (v1 now, additive-only changes within a major, 180 days of overlap between majors, Deprecation/Sunset headers before removal — https://test.network/developers#versioning). Every HTML page on this site returns Markdown for `Accept: text/markdown`, and https://test.network/llms-full.txt is the whole site in one file.

**SDK (build from source).** The official client is the TypeScript SDK `@xeprotocol/sdk` at https://github.com/xeprotocol/sdk. It builds, signs and proof-of-works blocks locally and submits them to any node's HTTP API, so keys never leave your process; it runs in Node (≥ 20) and in the browser. It is pre-release and **not published to npm or any registry yet** — do not `npm install @xeprotocol/sdk`, it will fail. Get it from the repository instead:

```sh
git clone https://github.com/xeprotocol/sdk.git
cd sdk
npm install        # runs the prepare script, which compiles src/ to dist/
npm run build      # only needed again after you change the source
npm test           # unit tests, no network needed
```

Then use it from your own project with `npm install /path/to/sdk` (or `npm link`), or depend on it straight from git with `npm install github:xeprotocol/sdk`, which also runs the build. Import as `import { Wallet, Xe, toMicro, fromMicro } from "@xeprotocol/sdk"`; the Node-only `@xeprotocol/sdk/jobs` entry runs code on a leased machine. Step-by-step tutorials (first wallet, faucet, sending, errors and retries, leases) are in https://github.com/xeprotocol/sdk/tree/master/examples. Wallets, send/receive/burn, balances, reads, and leasing calls are implemented; messaging and the account directory are not yet, and the API will change before 1.0. If you would rather not build anything, the HTTP API above needs no SDK at all.

## Start here

- [XE Testnet Developer Portal](https://test.network/developers): Base URLs and versioning (/api/v1), authentication, rate limits and headers, error model, all developer resources.
- [Getting Started](https://test.network/docs/getting-started): Build the node from source, create a wallet, use the faucet, send and receive XE.
- [API Reference](https://test.network/docs/api): Every node API endpoint with an executable playground; conventions, auth and rate limits.
- [OpenAPI 3.1 specification](https://test.network/openapi.json): Machine-readable contract for the node API: operationIds, parameters, schemas, security schemes.
- [API discovery document](https://test.network/api/v1): JSON index of endpoints, servers, auth, versioning policy and rate limits.
- [CLI](https://test.network/docs/cli): The xe command line: wallet, send/receive, faucet, node, lease, offline signing.
- [XE SDK (TypeScript, build from source)](https://github.com/xeprotocol/sdk): Official client @xeprotocol/sdk; pre-release, not on npm. Clone, `npm install` (builds dist/), then `npm install /path/to/sdk` or `npm install github:xeprotocol/sdk`. Node ≥ 20 or browser; signs locally.
- [SDK tutorials](https://github.com/xeprotocol/sdk/tree/master/examples): Step-by-step TypeScript and JavaScript examples: first wallet, faucet, sending, errors and retries, leases, jobs.

## Docs: Getting started

- [XE Network Documentation](https://test.network/docs): Block-lattice cryptocurrency with compute leasing, DAO governance, and P2P messaging.
- [Getting Started](https://test.network/docs/getting-started): Build the XE CLI, create a wallet, request XE from the testnet faucet, and make your first transactions.
- [Architecture](https://test.network/docs/architecture): Core node package map, block validation pipeline, and startup sequence.

## Docs: Concepts

- [Block Lattice](https://test.network/docs/block-lattice): Per-account chains, cross-chain links, and the twelve block types.
- [Accounts & Keys](https://test.network/docs/accounts): Ed25519 key pairs, addresses, signing, multisig, and delegation.
- [Assets (XE & XUSD)](https://test.network/docs/assets): Dual-asset model — XE for consensus weight and provider emission, XUSD for compute payment.

## Docs: Protocol

- [Consensus](https://test.network/docs/consensus): Two-phase ORV finality — every block finalizes at ≥67% of delegated XE weight.
- [Networking](https://test.network/docs/networking): libp2p host, peer admission, GossipSub topics, frontier sync, DHT, and request-response messaging.
- [Compute Leasing](https://test.network/docs/compute): Lease lifecycle, cost model, attestations, VM management, and provider economics.
- [State Chain](https://test.network/docs/state-chain): Linear multisig chain — a deterministic state machine for DAO governance and emission.
- [Proof of Uptime](https://test.network/docs/uptime): Design proposal for verifiable uptime proofs — not yet implemented.

## Docs: Interfaces

- [API Reference](https://test.network/docs/api): Executable HTTP API playground for accounts, blocks, leases, state chain, directory, chat, and node operations.
- [CLI Reference](https://test.network/docs/cli): The xe binary — unified CLI for node operation and client interaction.
- [Explorer & Web UI](https://test.network/docs/explorer): Embedded web UI shipped inside the xe binary via //go:embed. No JS deps.
- [Web Wallet](https://test.network/docs/wallet): Client-side wallet using Web Crypto. Private keys never leave the browser.

## Docs: Reference

- [Binary Encoding](https://test.network/docs/encoding): Version 2 (0x02) — deterministic block and vote wire formats.
- [Cryptography](https://test.network/docs/cryptography): ed25519, SHA-256, blake2b PoW. Cross-implementation compatibility (Go ↔ JS).
- [System Constants](https://test.network/docs/constants): Difficulty, timing, size limits, lease economics, performance certificates.
- [Deployment](https://test.network/docs/deployment): Single-binary deployment with embedded UI, Caddy reverse proxy, and bootstrap peer setup.

## Site

- [Home](https://test.network/): What XE is, what works on the testnet today and what does not.
- [Bug Bounty](https://test.network/bounty): Phased bounty programme, reward tiers, scope and how to report.
- [Web Wallet](https://test.network/wallet): The node-served browser wallet and the hosted testnet instance.
- [Explorer](https://test.network/explorer): Interactive block explorer; agents should use the API instead.
- [About](https://test.network/about): Who runs the testnet, what XE is and the project's status.
- [Contact](https://test.network/contact): General enquiries hello@xe.network, security disclosures security@xe.network, bugs on GitHub.
- [Privacy](https://test.network/privacy): What this site and the public node record.

## Optional

- [Full site as Markdown](https://test.network/llms-full.txt): Every page above concatenated into one Markdown file.
- [Sitemap](https://test.network/sitemap.xml)
- [Source code](https://github.com/xeprotocol/xe): The node, CLI, wallet and explorer, GPL-3.0.
- [Hosted web wallet](https://ldn.test.network/wallet/): Client-side keys; runs against the London node.
- [Live node API base](https://ldn.test.network/api/): The node's own route manifest.
- [xe.network](https://xe.network): The mainnet project site; separate from this testnet.
