title: Wallet Demo End‑to‑end sample using the PyPI package. Save as wallet_demo.py and run with a funded account.
import os, time, asyncio
from peaq_robot import PeaqRobot
from peaq_robot.types import TxOptions, ConfirmationMode

sdk = PeaqRobot()
print("Address:", sdk.address)
print("Balance:", sdk.balance)

# Optional: fund via an env mnemonic (demo only)
mnemonic = os.getenv("PEAQ_ROBOT_FUND_MNEMONIC", "")
if mnemonic:
    from substrateinterface.keypair import Keypair
    kp = Keypair.create_from_mnemonic(mnemonic)
    _ = sdk.wallet.send_transaction(
        module='Balances', function='transfer_allow_death',
        params={'dest': sdk.address, 'value': int(1 * 10**18)}, keypair=kp,
    )

# Create DID (idempotent) and store a small JSON payload
try:
    _ = sdk.id.create_identity()
except Exception:
    pass

tx = sdk.store.add_data("DEMO_DATA_001", {"robot": "demo", "status": "active"})
print("Storage tx:", tx)

res = sdk.store.read_data("DEMO_DATA_001")
print("Read:", res.get("data"))
Install first:
pip install -U peaq-robotics-sdk
PyPI: peaq-robotics-sdk Expected output (abridged):
Address: 5F...abc
Balance: ...
Storage tx: 0x4a8b...9f
Read: {'robot': 'demo', 'status': 'active'}