Terminal tutorial

The whole network on one laptop

A chain you can deploy Solidity to, four validators in Docker, and the agent emulator with four apps that pay each other. Nothing here touches real money.

Ten numbered steps. Copy each command, read what you should see, move on.

Have these installed

  • Go 1.25, builds the node
  • Python 3, runs the local chain script
  • Docker with Compose, the four-validator cluster
  • Foundry, Solidity build and tests
  • Node.js 22 and npm, Hardhat, the SDK and the reference apps
  • Rust 1.91, the layerx command line

Part one

A chain on your machine

The same node software that runs chain 125, started from a fresh genesis with a key that is already funded. Deploy, break things, start over.

  1. 1

    Clone the repository

    Chain, contracts, SDKs and the command line live in one open-source repository. Every command below runs from its root unless a step says otherwise.

    bashReady
    git clone https://github.com/Sidiora-Labs/Paxeer-X-Network.gitcd Paxeer-X-Network
  2. 2

    Start a local chain

    One script builds the node, writes a fresh genesis with a funded admin key, and starts producing blocks in the foreground. It wipes any earlier local chain, so it asks you to confirm with PAX_LOCAL_RESET=1. Leave this terminal open.

    bashReady
    PAX_LOCAL_RESET=1 ./scripts/initialize_local_chain.sh

    You should see: The node prints a block log every fraction of a second. Its JSON-RPC listens on 127.0.0.1:8545.

  3. 3

    Say hello to it

    In a second terminal, ask for the chain ID. A local chain answers 713714 rather than 125 on purpose: a key you use here can never sign anything the live network would accept. Use 713714 in local wallet and test configs.

    bashReady
    curl -s http://127.0.0.1:8545 \  -H 'content-type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'

    You should see

    jsonReady
    {"jsonrpc":"2.0","id":1,"result":"0xae3f2"}
  4. 4

    Run a Hardhat test against it

    The contracts project ships a paxlocal network that points at PAXEER_LOCAL_EVM_RPC_URL, or at port 8545 when the variable is unset. The test funds its signers from the admin key, deploys a token and reads it back from Solidity.

    bashReady
    cd contractsnpm installnpx hardhat test --network paxlocal

    You should see: Mocha lists the test cases as passing. Any Hardhat or Foundry project you already have deploys the same way.

  5. 5

    Build the chain contracts with Foundry

    No running chain needed for this one. Fetch the pinned libraries first, then build and test offline. The project compiles with solc 0.8.27 and includes the interfaces for the network's built-in functions.

    bashReady
    bash contracts/bootstrap-libs.shFOUNDRY_CONFIG=foundry.paxeer.toml forge build --offline --root .FOUNDRY_CONFIG=foundry.paxeer.toml forge test --offline --root .

    You should see: Compiled output lands in contracts/out.

  6. 6

    Or run four validators in Docker

    Closer to the real thing: four validators in one compose stack, with consensus between them. Stop the single node from step 2 first, because the first validator uses the same port. The first run builds the image; later runs skip it.

    bashReady
    make docker-cluster-start# later, once the image existsmake docker-cluster-start-skipbuild

    You should see: Four nodes come up and start agreeing on blocks. Logs and genesis files appear under build/generated. Add Prometheus and Grafana with make docker-cluster-start-monitoring; Grafana opens on http://localhost:3000.

Part two

The agent toolkit

The command line, the emulator and the reference apps let you build an agent that pays and gets paid, with signed receipts, before you spend a single PAX.

  1. 7

    Build the layerx command line

    One binary for keys, environments, the local emulator, payments, receipts, programs, and for installing the MCP and A2A servers into an AI runtime.

    bashReady
    cargo build --manifest-path platform/cli/Cargo.tomlexport PATH="$PWD/platform/target/debug:$PATH"layerx --help

    You should see: The help lists the top-level commands, from wallet, token and key through emulator, install, mcp and a2a.

  2. 8

    Start the emulator

    The emulator is the agent network on your machine: it executes what you send, signs a receipt for it and only ever listens on loopback. The trust anchor it writes is what your profile pins, so a receipt from anywhere else fails to verify.

    bashReady
    umask 077export LAYERX_CONFIG="$HOME/.config/layerx/config.json"mkdir -p "$(dirname "$LAYERX_CONFIG")"layerx emulator provisionlayerx emulator up --sequencer-seed-file "$HOME/.config/layerx/emulator/sequencer.seed"

    You should see: The emulator listens on 127.0.0.1:9402.

  3. 9

    Create a wallet against it

    In another terminal with the same LAYERX_CONFIG, select the emulator environment and create a key. Creation registers the identity and opens its account.

    bashReady
    layerx environment use emulator --endpoint http://localhost:9402 \  --sequencer-trust-anchor-file "$HOME/.config/layerx/emulator/sequencer.anchor"layerx wallet create alicelayerx wallet balance

    You should see: A new address and a zero balance. layerx faucet funds it on the emulator.

  4. 10

    Watch four apps pay each other

    A buyer agent, a paid API, a merchant shop and a programs marketplace. The runner starts its own emulator in a scratch profile, creates real signing keys, pays for an API call, checks out an order, then deploys, lists and buys a program, and shuts everything down when it is done. Stop your own emulator first.

    bashReady
    npm cinpm run buildnode platform/examples/run-reference-apps.mjs --scenario emulator

    You should see: Each scenario prints the receipt it verified. Read them: this is exactly what your users will see on chain 125.

Clean up

Press Ctrl+C in the terminal running the single node or the emulator. The Docker cluster has its own stop target; the monitoring variant is make docker-cluster-stop-monitoring.

bashReady
make docker-cluster-stop

From your laptop to chain 125

Going live means changing these values and nothing else. The code, the receipts and the checks are identical.

SettingLocalPaxeer X
JSON-RPChttp://127.0.0.1:8545https://api-mainnet-beta.paxeer.network/rpc
Chain ID713714 (0xae3f2)125 (0x7D)
FundsAdmin key in genesisPAX from an exchange or the bridge
Agent networkEmulator on localhost:9402The same endpoint as the chain
ExplorerYour node's logshttps://paxscan.io

Now point it at the live network

The developer quickstart takes the same tools to chain 125: connect a wallet, give an agent a limit, make one paid request and read the receipt.