Repository navigation
Conversation
… Start POST /api/v1/init creates the wallet from the verified Telegram credential, like /start, with the same P2P service signature. (cherry picked from commit 4e60b07)
(cherry picked from commit 6e0a3e3)
(cherry picked from commit d783593)
The signed Mini App / web app request is now the approval: - P2P sends and invoice payments run straight away; no Confirm / Cancel message, no confirm_threshold, no unconfirmed allowance. - Collect requests send no Pay / Decline message and drop chat_prompt and notified; users approve in the Mini App or web app. - /me drops confirm_threshold and unconfirmed_remaining; invoice decode drops needs_confirmation; transfers drop confirm_by. Transfers saved as awaiting_confirmation before this still expire and give back their counters. max_amount and daily_limit still apply. Passkey approval through the DCA backend is planned. (cherry picked from commit cd68a26)
(cherry picked from commit c37b5a0)
With api.p2p.service_user_auth, P2P calls can carry X-BDB-User instead of a Telegram credential. The service signature (BDB-P2P-ED25519-V2) covers the user ID. Only users linked by a Telegram-verified call (POST /api/v1/init) can be named; /api/v1/init always needs the Telegram credential. V1 keeps working. Off by default. (cherry picked from commit 0c4e950)
Covers keys, both signing schemes, DCA wallet endpoints, collect, init, P2P with V1 and V2 auth, collect approval, errors, flows and a checklist, matching dev as it is now. (cherry picked from commit 652ff48)
Every /api/v1/p2p/* call now names the user with X-BDB-User (signed text BDB-P2P-ED25519-V2) and no longer accepts a Telegram credential. Only POST /api/v1/init takes the Telegram credential; it links the user. - removes api.p2p.service_user_auth (always on) and spend_init_data_max_age (no Telegram login on spends any more) - AuthSpend merged into Auth - docs: P2P, init, collect, DCA guide, spec and example config (cherry picked from commit 0188eba)
(cherry picked from commit 8c03a0d)
POST /api/v1/collect now pays the request in the same call. Removed the approve, decline and cancel endpoints. Only users linked by /api/v1/init can be charged (403 payer_not_linked). A retry with the same external_id never charges twice, and pays a request the bot created but didn't pay.
POST /api/v1/collect takes the payer from X-BDB-User instead of "to" in the body. The wallet signs it with the collect signed text (BDB-COLLECT-ED25519-V1), which adds the user ID as the seventh line.
Removes the p2p-linked record and its check from the P2P calls and collect. /api/v1/init still checks the Telegram login and creates the wallet.
cmnisal
changed the base branch from
xbuddhi/feat/collect-auto-charge-main
to
main
November 20, 2026 01:27
Collaborator
Author
|
Replaced by #118 (rebased onto main after the stack was squash-merged). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings #116 to main. It's stacked on #114, so merge it after #114.
X-BDB-Useron/api/v1/p2p/*and on collect now works for any user with a bot wallet. Thep2p-linkedrecord and its check are removed.After this PR, the stack top differs from dev only by the dev-only standing orders and release.yml.