Metadata-Version: 2.5
Name: openreceive
Version: 0.4.4
Summary: Receive-only Lightning checkout for Python hosts: NWC wallet kernel, settlement engine, framework-free HTTP handler, Django and FastAPI adapters.
Project-URL: Homepage, https://openreceive.org
Project-URL: Documentation, https://openreceive.org/guides
Project-URL: Source, https://github.com/OpenReceive/openreceive
Project-URL: Changelog, https://github.com/OpenReceive/openreceive/blob/master/CHANGELOG.md
Author-email: OpenReceive <info@openreceive.org>
License-Expression: MIT
License-File: LICENSE
Keywords: bitcoin,django,fastapi,lightning,nostr,nwc,payments
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.10
Requires-Dist: coincurve>=20
Requires-Dist: cryptography>=42
Requires-Dist: httpx>=0.27
Requires-Dist: websockets<16,>=13
Provides-Extra: django
Requires-Dist: django>=5.2; extra == 'django'
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.115; extra == 'fastapi'
Requires-Dist: sqlalchemy>=2; extra == 'fastapi'
Requires-Dist: starlette>=0.40; extra == 'fastapi'
Provides-Extra: flask
Requires-Dist: flask>=3; extra == 'flask'
Requires-Dist: sqlalchemy>=2; extra == 'flask'
Provides-Extra: sqlalchemy
Requires-Dist: sqlalchemy>=2; extra == 'sqlalchemy'
Description-Content-Type: text/markdown

# openreceive

Receive-only Lightning checkout for Python hosts, over Nostr Wallet Connect.
One distribution with framework extras:

```sh
pip install "openreceive[django]"    # Django >= 5.2
pip install "openreceive[fastapi]"   # FastAPI >= 0.115 (sync SQLAlchemy engine for the two tables)
pip install "openreceive[sqlalchemy]"  # plain hosts: the handler + the SQL repository
```

The package is engine #5 of the OpenReceive monorepo and reproduces the shared
money, settlement, NIP-47 paging, swap-provider and HTTP behavior pinned by
`spec/test-vectors/` (`tools/conformance/python-crosslang.py`). The host owns
orders, prices and fulfillment; OpenReceive owns the `openreceive_payments` /
`openreceive_meta` rows inside the host's database, the per-reference lock,
write-once settlement and the reconciliation state machine.

Layout:

- `openreceive` — kernel: `money`, `settlement`, `nwc` (URI, info, requests,
  errors, the `ReceiveNwcClient` protocol and the production client),
  `payments` (wallet walk, closure decision), `swap`, `rates`.
- `openreceive.storage` — the `PaymentRepository` protocol, the SQLAlchemy
  Core repository (`SqlPaymentRepository`, `payments_schema_sql(dialect)`).
- `openreceive.server` — `Service`, the framework-free `RequestHandler`
  (request → status/body/headers), `OpenReceiveApp` (handler + repository +
  the gated opportunistic reconcile), notifications worker, doctor, `Host`.
- `openreceive.testing` — `FakeWallet`, `FakeSwapProvider` and the testkit
  fixtures every engine shares (`docs/internal/testkit-contract.md`).

Documentation: https://openreceive.org/guides — quickstarts for Django and
FastAPI, the storage guide, and the host testing guide.

Receive-only NWC codes must never reach browsers, logs or tests. `NWC_URI`,
`LSC_URI_PRIMARY` and `LSC_URI_BACKUP` are read from the process environment.
