Skip to product information
1 of 1

Tollbooth DPYC

tollbooth-dpyc

tollbooth-dpyc

Everything else in this collection is this wheel with domain tools bolted on.

Install the wheel. Decorate one async function. That is the whole integration. Your server keeps its own tools and its own logic; the wheel supplies the identity, the ledger, the pricing, and the settlement underneath them.

What comes in the box: TollboothConfig for settings, UserLedger and LedgerCache for balances, BTCPayClient for Lightning invoices, TOOL_COSTS mapping your tools to tiers, a VaultBackend protocol so credentials never touch your environment, AuthorityCertifier to obtain certificates during a purchase rather than as a second call, DPYCRegistry for service discovery, and a constraint engine that turns a pricing model into surge windows, happy hours, and supply caps.

Call register_standard_tools() and every DPYC infrastructure tool appears at once — npub proofs, the Secure Courier, credit purchase, balance checks, price previews. You write only what makes your service yours.

The dependency runs one way. Your server depends on the wheel; an Authority is a network peer rather than a code dependency, so nothing in your deployment is coupled to whoever certifies you. Change Authority and your code does not change.

At a glance

🔓 Apache 2.0 top to bottom — no open core, no paid tier
🔌 Pairs with FastMCP 3.4.7. Core requirements are httpx and pynostr; Nostr relay features want the [nostr] extra
🤝 Implements the DPYC Social Contract
🔑 Patron credentials are optional and, where needed, arrive by encrypted Nostr DM through a VaultBackend of your choosing
⚡ Settles over Lightning through BTCPay. Patrons may use any wallet
📜 Patent pending, US Prov. App. No. 64/045,999

Links

🐍 PyPI: pip install tollbooth-dpyc
GitHub GitHub: lonniev/tollbooth-dpyc
👀 tollbooth-dpyc.com

View full details