Skip to content

Releases: lnbotdev/csharp-l402

v1.0.0

05 Mar 18:53

Choose a tag to compare

v1.0.0

Migrate to wallet-scoped L402 API (LnBot SDK v1.0.0).

Breaking Changes

  • L402ClientOptions now requires WalletId property
  • L402Options now requires WalletId property
  • L402EndpointFilter constructor now takes walletId as first parameter
  • L402Attribute now has a WalletId property
  • 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

27 Feb 20:43

Choose a tag to compare

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 L402PaymentFailedException if server still returns 402 after a successful payment (prevents infinite retry loops)
  • Feature: L402Options now supports ExpirySeconds and Caveats (parity with TypeScript package)
  • Feature: [L402] attribute and L402EndpointFilter pass through ExpirySeconds and Caveats to the SDK
  • Feature: Added HttpContext.GetL402() typed extension method for accessing L402 verification results without casting from HttpContext.Items

v0.1.0

27 Feb 20:21

Choose a tag to compare

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 HttpClient delegating 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