> ## 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.

# Wallet demo

title: Wallet Demo

End‑to‑end sample using the PyPI package. Save as `wallet_demo.py` and run with a funded account.

```python theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
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:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
pip install -U peaq-robotics-sdk
```

PyPI: [peaq-robotics-sdk](https://pypi.org/project/peaq-robotics-sdk/)

Expected output (abridged):

```text theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
Address: 5F...abc
Balance: ...
Storage tx: 0x4a8b...9f
Read: {'robot': 'demo', 'status': 'active'}
```
