Releases: lnbotdev/csharp-l402
Releases · lnbotdev/csharp-l402
v1.0.0
v1.0.0
Migrate to wallet-scoped L402 API (LnBot SDK v1.0.0).
Breaking Changes
L402ClientOptionsnow requiresWalletIdpropertyL402Optionsnow requiresWalletIdpropertyL402EndpointFilterconstructor now takeswalletIdas first parameterL402Attributenow has aWalletIdproperty- Minimum LnBot SDK dependency is now 1.0.0
Migration
// Before (v0.x)
app.UseL402Paywall("/api", new L402Options { Price = 10 });
// After (v1.0.0)
app.UseL402Paywall("/api", new L402Options { WalletId = "wal_xxx", Price = 10 });v0.2.0
What's Changed
- Fix: Budget tracker now records the actual amount paid via SDK (
payment.Amount) instead of the server's self-reported price - Safety: Client throws
L402PaymentFailedExceptionif server still returns 402 after a successful payment (prevents infinite retry loops) - Feature:
L402Optionsnow supportsExpirySecondsandCaveats(parity with TypeScript package) - Feature:
[L402]attribute andL402EndpointFilterpass throughExpirySecondsandCaveatsto the SDK - Feature: Added
HttpContext.GetL402()typed extension method for accessing L402 verification results without casting fromHttpContext.Items
v0.1.0
Initial release of LnBot.L402 packages.
Packages
- LnBot.L402 — Client-side L402 auto-pay handler for
HttpClient - LnBot.L402.AspNetCore — Server-side L402 paywall middleware,
[L402]attribute, and endpoint filter
Highlights
- Auto-pay any L402-protected API transparently via
HttpClientdelegating handler - Protect ASP.NET Core routes with middleware, controller attributes, or endpoint filters
- Budget controls (max price per request, rolling spend limits)
- Token caching with pluggable
ITokenStore - Dynamic pricing support
- Zero crypto dependencies — all L402 logic via ln.bot API