feat: QR placement contract — buildVerifyUrl + resolveQrRect (v1.2.0)#5
Merged
Conversation
…2.0)
Parity with @validpay/node-sdk 0.7.0 / validpay (py) 1.4.0. Adds the
canonical placement contract so a position picked once (e.g. in the
developer console "Try it" tool) maps to the same spot across every SDK:
- buildVerifyUrl(retrievalId, key) -> verify URL with a base64url key in
the fragment; feed it to a QR component (react-native-qrcode-svg, …).
- resolveQrRect(placement, pageW, pageH) -> { x, y, size } in PDF
bottom-left points, for stamping with your own PDF lib.
- QrPlacement / QrAnchor / QrUnit types + MIN_RECOMMENDED_QR_PT.
No on-device embedQr: editing PDF bytes on a phone isn't practical, so RN
ships the pure contract only (seal PDFs server-side with the Node SDK, or
just display the QR). Pure + dependency-free. 10 new tests; suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Parity with node 0.7.0 / python 1.4.0. Adds the canonical placement contract (buildVerifyUrl, resolveQrRect, QrPlacement types, MIN_RECOMMENDED_QR_PT) so a position picked once maps 1:1 across SDKs + the 'Try it' tool. No on-device embedQr (PDF editing on a phone isn't practical) — render the QR or seal server-side. Pure/dependency-free. 10 new tests; suite green.