Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Pick the SDK that matches your stack. Both paths converge on the same onchain state.

Requirements

RequirementValue
Node.js≥ 22
TypeScript≥ 5 (for the JS SDK)
Python≥ 3.10 (for the Python SDK)
Peer dependencyviem >= 2.47.10 (JS only; Python pulls web3 >= 6.0 automatically)
RPC accesspeaq mainnet or agung testnet
GasHandled by Gas Station on fresh wallets; needs 2FA for request

Install paths

Two pieces

# 1. Install the CLI (the skill drives it under the hood)
pip install peaq-os-cli

# 2. Add the peaqos skill to your agent (auto-detects Claude Code, Cursor, or Windsurf)
npx @peaqos/skills add peaqos
Then invoke /peaqos in any Claude Code session. To target a specific runtime explicitly, add --agent claude-code | cursor | windsurf. See the peaqOS AI page for details and the manual upload path for ChatGPT / custom GPTs.

Works with

The @peaqos/skills installer ships first-class adapters for Claude Code, Cursor, and Windsurf — auto-detected, or selected with --agent. Hosted assistants without a local CLI (ChatGPT, Claude Projects, custom GPTs) can load AGENT-PROMPT.md as a system prompt manually.The skill calls the JavaScript and Python SDKs through the CLI. Tabs below apply once you start editing code yourself.

Environment variables

VariableRequiredDefaultPurpose
PEAQOS_RPC_URLYesn/apeaq chain RPC endpoint
PEAQOS_PRIVATE_KEYYesn/aOwner wallet private key (hex, 0x...)
PEAQOS_NETWORKCLI onlyn/amainnet or testnet. Selects address + URL defaults for the CLI’s peaqos init. SDK clients ignore it.
PEAQOS_GAS_STATION_URLCLI onlyn/aFaucet base URL. Set to https://depinstation.peaq.network for the public peaq-hosted Gas Station. Required for the peaqos activate funding step unless --skip-funding is set or the wallet already meets the gas threshold.
OWS_PASSPHRASENon/aOWS vault passphrase used by the SDK and CLI wallet helpers (createWallet, importWallet, exportWallet, …). The SDK raises PeaqosError if neither this nor the inline passphrase arg is set (no interactive prompt). The CLI reads it when PEAQOS_OWS_WALLET is set, prompting interactively if unset. See Wallets (OWS).
IDENTITY_REGISTRY_ADDRESSYesn/aIdentity Registry contract. See peaq mainnet contracts for the canonical address.
IDENTITY_STAKING_ADDRESSYesn/aIdentity Staking contract
EVENT_REGISTRY_ADDRESSYesn/aEvent Registry contract
MACHINE_NFT_ADDRESSYesn/aMachine NFT (ONFT) contract
DID_REGISTRY_ADDRESSYesn/aDID Registry precompile address (0x...0800 on every peaq runtime)
BATCH_PRECOMPILE_ADDRESSYesn/aBatch precompile for multi-call bonding (0x...0805 on every peaq runtime)
MACHINE_ACCOUNT_FACTORY_ADDRESSNon/aMachineAccountFactory. Required only for smart-account deploy / predict.
MACHINE_NFT_ADAPTER_ADDRESSNon/aMachineNFTAdapter (LayerZero ONFT adapter). Required only for bridge_nft / bridgeNft when source="peaq".
PEAQOS_OWS_WALLETCLI onlyn/aActive OWS vault wallet name. When set, the CLI loads the wallet via OWS_PASSPHRASE and skips PEAQOS_PRIVATE_KEY. Set by peaqos wallet use or peaqos init (wallet path).
PEAQOS_MCR_API_URLSet for mainnethttp://127.0.0.1:8000MCR API base URL. The default is for self-hosted dev. Set to https://mcr.peaq.xyz to read from the public peaq-hosted MCR.
Full reference with defaults on SDK JS environment and SDK Python environment.

Public RPC endpoints

Use any of the endpoints below for PEAQOS_RPC_URL. QuickNode is the primary set; OnFinality and PublicNode are fallbacks. All of them accept EVM JSON-RPC calls. For private dedicated endpoints, see the QuickNode and OnFinality guides. Full list on Connecting to peaq.
https://quicknode1.peaq.xyz
https://quicknode2.peaq.xyz
https://quicknode3.peaq.xyz

# Secondary / fallback
https://peaq.api.onfinality.io/public
https://peaq-rpc.publicnode.com

peaq mainnet contracts

Core contracts are UUPS upgradeable proxies; treat the addresses as the current proxy pointers. For the architecture diagram and what each contract is responsible for, see Smart contracts.

Required

VariableAddress
IDENTITY_REGISTRY_ADDRESS0xb53Af985765031936311273599389b5B68aC9956
IDENTITY_STAKING_ADDRESS0x11c05A650704136786253e8685f56879A202b1C7
EVENT_REGISTRY_ADDRESS0x43c6c12eecAf4fB3F164375A9c44f8a6Efc139b9
MACHINE_NFT_ADDRESS0x2943F80e9DdB11B9Dd275499C661Df78F5F691F9
DID_REGISTRY_ADDRESS0x0000000000000000000000000000000000000800 (peaq DID precompile)
BATCH_PRECOMPILE_ADDRESS0x0000000000000000000000000000000000000805 (peaq batch precompile)

Optional

Set only if you use the corresponding SDK method.
VariableAddressNeeded for
MACHINE_ACCOUNT_FACTORY_ADDRESS0x4A808d5A90A2c91739E92C70aF19924e0B3D527fdeploySmartAccount / getSmartAccountAddress (ERC-4337)
MACHINE_NFT_ADAPTER_ADDRESS0x9AD5408702EC204441A88589B99ADfC2514AFAE6bridgeNft / bridge_nft when source="peaq" (LayerZero V2 ONFT)

Base mainnet contracts

Needed when bridging into peaq from Base. Pass baseNftAddress / base_nft_address to the bridge method.
ContractAddress
MachineNFTBase (LayerZero ONFT)0xee8A521eA434b11F956E2402beC5eBfa753Babfa

Agung testnet contracts

Use these to point the SDK or CLI at agung. Precompile addresses are identical to mainnet (same fixed slots on every peaq runtime).

Required

VariableAddress
IDENTITY_REGISTRY_ADDRESS0x9E9463a65c7B74623b3b6Cdc39F71be7274e5971
IDENTITY_STAKING_ADDRESS0x55f336714aDb0749DbFE33b057a1702405564E3d
EVENT_REGISTRY_ADDRESS0x2DAD8905380993940e340C5cE6d313d5c2780040
MACHINE_NFT_ADDRESS0xB41C2A4f1c19b6B06beaAce0F5CD8439e77C4b1c
DID_REGISTRY_ADDRESS0x0000000000000000000000000000000000000800 (peaq DID precompile)
BATCH_PRECOMPILE_ADDRESS0x0000000000000000000000000000000000000805 (peaq batch precompile)

Optional

VariableAddressNeeded for
MACHINE_ACCOUNT_FACTORY_ADDRESS0x65a4DfEB799dFf8CF15f13816d648a7805d6b1F9deploySmartAccount / getSmartAccountAddress (ERC-4337)
MACHINE_NFT_ADAPTER_ADDRESS0x63fD7e64A38e50D1486Bc569B4CaCeD38528De22bridgeNft / bridge_nft when source="peaq" (LayerZero V2 ONFT)
ADMIN_FLAGS_ADDRESS0x4181a2Aa34aFb247450FfcBd65be5aBD4Cbee658MCR API server (negative-flag + trust-override reads)
Bridging cannot be exercised on agung. MachineNFTAdapter is deployed, but LayerZero V2 has no DVN routes between agung and Base. bridgeNft / bridge_nft calls will not relay end-to-end. Test the bridge on peaq mainnet ↔ Base mainnet only.

Troubleshooting

The OTP from your authenticator app was wrong or expired. Generate a fresh code and retry. See full error code reference.
The faucet throttles owners after repeated bad OTPs. Wait out the lockout window and retry. See error code reference.
The faucet enforces a per-IP and per-wallet cap. Retry after the cooldown. See error code reference.
The same owner address has hit the daily funding cap. Wait 24 hours or contact support. See error code reference.
Set PEAQOS_RPC_URL in your environment to a valid peaq chain RPC endpoint (e.g., https://peaq.api.onfinality.io/public). Without it, PeaqosClient.fromEnv() raises a ValidationError. See Public RPC endpoints for the full list. Full error taxonomy on errors.