Skip to content

README: say which mode tops up the balance by itself - #5

Merged
lightchainaidev merged 1 commit into
mainfrom
readme-topups
Oct 10, 2026
Merged

lightchainaidev merged 1 commit into
mainfrom
readme-topups

Conversation

@lightchainaidev

Copy link
Copy Markdown
Contributor

The README said the SDK "pays a 402 by itself" given a wallet, and that x402 mode "deposits once". That reads as if both modes refill the prepaid balance. Only the default mode does.

  • Default mode (payment: "delegate") with account: on a 402, lc.fetch sends depositAndAuthorize and retries once. This is unchanged.
  • x402 mode: it signs each call's payment and never deposits. An empty balance answers 402 insufficient_funds; the caller runs lc.deposit() and retries.

The intro, the Automatic top-ups section, the x402 section and its example, and the Members table now say this. README only; no code changes.

The default mode deposits on a 402 when given a wallet; x402 mode only signs
payments and never deposits, so an empty balance answers 402 insufficient_funds.
@lightchainaidev
lightchainaidev merged commit 58b9ad1 into main Oct 10, 2026
1 check passed
@lightchainaidev
lightchainaidev deleted the readme-topups branch October 10, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant