docs: codify paykit issuer interoperability - #1216
Open
ovitrif wants to merge 3 commits into
Open
Conversation
Greptile SummaryThe PR codifies and tests Android’s Paykit issuer interoperability contract while adding stable automation identifiers for the incoming Payment Request journey.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or non-blocking defects identified. The network-specific identifiers remain aligned across publication, request filtering, SDK endpoint selection, and resolution; endpoint parsing preserves prior semantics, and the new automation tags are exposed through the application’s global Compose resource-ID semantics.
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/repositories/PaykitIssuerInterop.kt | Centralizes the canonical Bitcoin asset, network-aware identifier filtering, and strict endpoint payload parsing without introducing a behavioral defect. |
| app/src/main/java/to/bitkit/repositories/PaykitPaymentRequestRepo.kt | Applies current-network endpoint filtering to incoming payment requests while preserving order and removing duplicates. |
| app/src/main/java/to/bitkit/repositories/PublicPaykitRepo.kt | Delegates endpoint payload handling to the shared interoperability helper and introduces consistent network-specific on-chain method IDs. |
| app/src/main/java/to/bitkit/services/PaykitSdkService.kt | Uses the shared canonical asset when constructing Paykit request terms. |
| app/src/test/java/to/bitkit/repositories/PaykitIssuerInteropTest.kt | Exercises the production request mapper and endpoint parser against fixtures for all supported networks. |
| app/src/main/java/to/bitkit/ui/screens/paymentrequests/PaymentRequestsScreen.kt | Adds externally usable automation tags to incoming request Pay and Reject actions. |
| app/src/main/java/to/bitkit/ui/screens/wallets/send/SendConfirmScreen.kt | Adds a stable root automation tag distinguishing Payment Request confirmation from ordinary send confirmation. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Issuer sends one-time Payment Request] --> B[Validate btc asset, lifecycle, amount, and expiry]
B --> C[Filter identifiers for current network]
C --> D{Supported identifier remains?}
D -->|No| E[Do not present request]
D -->|Yes| F[Resolve linked issuer endpoint]
F --> G[Parse JSON object and non-empty value]
G --> H[Validate invoice or address]
H --> I[Present incoming request]
I --> J[Open Payment Request confirmation]
Reviews (1): Last reviewed commit: "test: align paykit issuer fixtures" | Re-trigger Greptile
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.
Closes #1208
This PR:
5515aa049223dcfa1f1b0eaf0fe4e8f985e4e562.Description
btcand identifier casing, preserves issuer order, removes duplicates, and drops unsupported or wrong-network identifiers.value, retaining optional string bounds.934f4be316d589a221ace99683c828ae67ec60d433a06fcacb0d31501e5be300.Preview
N/A — no user-visible changes.
QA Notes
Manual Tests
btc-regtest-p2wpkhJSON endpoint → send the canonical 100,000-sat one-time request → Payment Requests → Pay: Payment Request Confirm shows 100,000 sats and the issuer as recipient.Automated Checks
PaykitIssuerInteropTest.kt: consumes the exact shared JSON fixture and covers accepted and rejected requests and endpoint payloads across all four networks and four documented on-chain scripts.PaymentRequestsScreenTest.kt: verifies the stable Pay and Reject automation identifiers; the connected Pixel 9a run passed 5/5 tests.PublicPaykitRepoTest.ktandPaykitPaymentRequestRepoTest.ktinto the canonical fixture suite so one source exercises the real parser and request mapper.