Open-source Python SDK for OpenClaw AI entities to connect to Lightning wallets via Nostr Wallet Connect (NIP-47). Lets bots pay invoices, check balance, create invoices, and list transactions.
This SDK gives AI agents wallet access without custody. The human controls the wallet. The agent gets a scoped NWC connection string. Built on top of nostrkey for all Nostr crypto/relay primitives.
nostrwalletconnect on PyPI — pip install nostrwalletconnect
nostrwalletconnect.connection— parsenostr+walletconnect://URIs (NWCConnection dataclass)nostrwalletconnect.client— NWCClient async context manager, all NIP-47 methodsnostrwalletconnect.types— response dataclasses (BalanceResponse, PayResponse, etc.)
- Depends on
nostrkey— no duplication of crypto/relay code - Async-first API (asyncio + websockets)
- NIP-44 encrypted communication (via nostrkey.crypto)
- Event kinds: 23194 (request), 23195 (response), 13194 (info)
- Type hints throughout, Python 3.10+
- MIT licensed, open source
- kebab-case for file names in docs/config, snake_case for Python modules
- Tests in
tests/using pytest - Examples in
examples/ - ClawHub skill definition in
clawhub/(SKILL.md + metadata.json) - Keep
metadata.jsonversion in sync withpyproject.toml
nostrkey.app.OC-python.src— NostrKey identity SDK (dependency)loginwithnostr.web.landingpage.src— Landing page,/openclawlists this skillnostrkey.bizdocs.src— Business docs (OpenClaw GTM)