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.

Activate is the entry point to peaqOS. Register a machine on peaq chain and give it a peaqID, a keypair, and a Machine NFT: the primitives every later function builds on.

What ships

ComponentDescription
peaqIDW3C DID anchoring the machine’s on-chain identity. Portable across chains.
Identity NFTMinted automatically by IdentityRegistry at registration. tokenId == machineId.
Machine NFTLayerZero V2 ONFT linking to the machine’s financial profile. Minted via a separate mintNft call after registration. See Machine NFT ownership.
1 PEAQ bondSent as msg.value on the register() call (the contract’s current minBond). Required to graduate onto the MCR rated scale later.
Machine walletPer-machine EVM keypair, generated by the SDK.

How activation works

The SDK exposes each step as a discrete call so you can compose your own flow. For one-shot activation from the terminal, the CLI runs all six steps idempotently. Re-runs skip already-completed steps using ./peaqos.log as the resume marker:
# self-managed: caller's key drives every step
peaqos activate --doc-url "https://example.com/docs" --data-api "https://example.com/events"

# proxy-managed: --for and --machine-key must be used together
peaqos activate --for 0xMachineAddress --machine-key ./machine.key --doc-url "https://example.com/docs" --data-api "https://example.com/events"
See CLI reference: activate for all flags (including --skip-funding, --doc-url, --data-api, --visibility).
1

Generate a keypair

The SDK generates a new keypair for the machine. This becomes the machine’s signing identity on peaq chain.
import "dotenv/config";
import { PeaqosClient } from "@peaqos/peaq-os-sdk";

const client = PeaqosClient.fromEnv();
const keypair = PeaqosClient.generateKeypair();
// { address: "0x...", privateKey: "0x..." }
2

Fund the wallet

Fund the machine’s wallet with PEAQ for gas and the 1 PEAQ bond.Projects with partner access to the peaq Gas Station can request initial gas from the faucet using the SDK (2FA-gated). Otherwise, fund the wallet directly from any PEAQ-holding address.
3

Register the machine

Two patterns depending on your deployment model.
Owner equals operator. One machine, one wallet. Use registerMachine to register the machine under its own keypair.
const machineClient = new PeaqosClient({
  rpcUrl: client.rpcUrl,
  privateKey: keypair.privateKey,
  contracts: client.contracts,
});
const machineId = await machineClient.registerMachine();
console.log(machineId);
// Returns the on-chain machine ID (number)
Full guide: Self-managed onboarding.
4

Mint the Machine NFT and link the DID

NFT and the DID attributes are written by the machine itself.
const tx = await machineClient.mintNft(machineId, keypair.address);
const nftTokenId = await machineClient.tokenIdOf(machineId);

await machineClient.writeMachineDIDAttributes({
  machineId,
  nftTokenId,
  operatorDid: "",
  documentationUrl: "https://example.com/docs",
  dataApi: "https://example.com/events",
  dataVisibility: "public",
});
mintNft returns a new, independent tokenId on the MachineNFT contract. writeMachineDIDAttributes binds machineId and nftTokenId to the machine’s DID. See Machine NFT ownership for the full rationale.
5

Confirm registration

After all three calls the machine has a peaqID, an Identity NFT, a Machine NFT, and a 1 PEAQ bond. Query the machine’s profile against the MCR API, where {did} is did:peaq:<machine_address>:
curl "${PEAQOS_MCR_API_URL}/machine/did:peaq:0xYourMachineAddress"
The machine is Provisioned at first: on-chain, but not yet rated. It graduates onto the rated scale once both gates clear: a sustained first-to-last event span, and either enough qualifying revenue events or enough activity events. The events condition is OR, so activity-only machines can graduate without revenue. See Machine Credit Rating.

After activation

Once a machine is registered, later functions add new capabilities.
Next stepFunctionStatus
Build a credit rating from revenue and activity eventsQualifyLive
Get attested by the peaq Foundation or an OEMVerifyComing Soon
List services in the Service RegistryMonetizeComing Soon
Pair an AI agent with delegated spendingScaleComing Soon
Fractionalize the machine for investor ownershipTokenizeComing Soon

Concepts

peaqID

W3C DID, portable identity, cross-chain resolution.

Machine NFT

LayerZero V2 ONFT whose tokenURI resolves to the machine’s Machine Card (ERC-8004 JSON schema).

Events

Revenue events (type 0) and activity events (type 1).

Machine Credit Rating

Moody’s-style rating from a machine’s history.

Gas Station

2FA-gated faucet for initial machine gas.

SDK reference

Guides

Self-managed onboarding

Single machine, owner-operated.

Proxy operator fleet

Register and manage N machines from one identity.