Skip to product information
1 of 1

Tollbooth DPYC

tollbooth-dpyc

tollbooth-dpyc

Monetize a service you already know how to build, whether it offers five tools or fifty: install the wheel, decorate one async function, and the identity, the ledger, the pricing and the Lightning settlement sit underneath you.

Your server keeps its own tools and its own logic.

View full details

What the wheel carries

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

Configuration, patron balances and a cache for them, a BTCPay client for Lightning invoices, and a map from your tools to price tiers all arrive ready. Service credentials reach you through a vault backend of your choosing, so secrets stay out of your environment. An Authority certifier obtains its certificate during a purchase rather than as a second round trip, a registry handles service discovery, and a constraint engine 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 and price previews. You write only the part that makes your service yours.

The dependency runs one way. Your server depends on the wheel, and an Authority remains a network peer rather than a code dependency, so you can change Authority and leave your code exactly as it is.

At a glance

🔓 Apache 2.0 top to bottom, every line of it
🔌 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, where a service needs them, arrive by encrypted Nostr DM through a vault backend you choose
⚡ 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