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.

This concept has been absorbed into peaqOS. See peaqID for the current identity model.
You can fully customize the identity document. All fields are optional; sensible defaults are applied if omitted. Accepted options and types:
  • id: string (default: generated from your address)
  • controller: string (default: same as id)
  • verificationMethods: array of objects { id: string, type: string, controller: string, publicKeyMultibase: string }
  • authentications: array of strings (verification method references)
  • services: array of objects { id: string, type: string, serviceEndpoint?: string, data?: string }
  • signature: object { type: string, issuer: string, hash: string }
  • name: string (stored on-chain; default: did:peaq:<address>)
  • tx_options, on_status: transaction options/callback
Example (custom fields):
from peaq_robot import PeaqRobot
from peaq_robot.types import TxOptions, ConfirmationMode

sdk = PeaqRobot()

res = sdk.id.create_identity(
    name=f"identity:{sdk.address}",
    id=f"identity:{sdk.address}",
    controller=f"identity:{sdk.address}",
    verificationMethods=[{
        "id": f"identity:{sdk.address}#keys-1",
        "type": "Sr25519VerificationKey2020",
        "controller": f"identity:{sdk.address}",
        "publicKeyMultibase": sdk.id.keypair.public_key.hex(),
    }],
    authentications=[f"identity:{sdk.address}#keys-1"],
    services=[
        {"id": "#telemetry", "type": "RobotService", "data": "v1"}
    ],
    signature={
        "type": "Sr25519VerificationKey2020",
        "issuer": sdk.address,
        "hash": "demo",
    },
    tx_options=TxOptions(mode=ConfirmationMode.FAST),
)
print(res)

# Read back the final on-chain document (decoded if available)
doc = sdk.id.read_identity()
print(doc["decoded_data"])  # includes id, controller, verificationMethods, authentications, services, signature
Notes:
  • If you only want the minimal document, you can omit all fields; defaults are applied.
  • Services support either serviceEndpoint or compact data for small payloads.
  • For FINAL confirmation and status logs, pass tx_options and on_status.