Skip to content

feat: embed_qr + QR placement contract (v1.4.0)#7

Merged
ValidPay-io merged 1 commit into
mainfrom
feat/embed-qr
Jun 17, 2026
Merged

feat: embed_qr + QR placement contract (v1.4.0)#7
ValidPay-io merged 1 commit into
mainfrom
feat/embed-qr

Conversation

@ValidPay-io

Copy link
Copy Markdown
Owner

Mirrors @validpay/node-sdk 0.7.0. Adds embed_qr(pdf_bytes, retrieval_id, key, placement) + QrPlacement contract (anchor + insets + width + units + page) + pure build_verify_url / resolve_qr_rect helpers. New optional extra validpay[pdf] (qrcode, Pillow, reportlab, pypdf), lazily imported — core stays dependency-light. 19 new tests; full suite green.

Mirrors @validpay/node-sdk 0.7.0. Integrators who seal a file get back a
retrieval_id + key but were on their own to render the verify QR and guess
where to put it on the document — fiddly, since PDFs use a bottom-left
origin while every screen uses top-left.

Adds validpay.pdf:
- embed_qr(pdf_bytes, retrieval_id, key, placement) -> sealed PDF bytes.
- QrPlacement contract: anchor (page corner) + x/y insets + width + units
  + page. The EXACT vocabulary the Node SDK and the website "Try it" tool
  use, so a position picked once maps 1:1.
- build_verify_url + resolve_qr_rect: pure, dependency-free helpers.
- Scannability guard: warns under ~72pt, raises if off-page.

New optional extra `validpay[pdf]` (qrcode, Pillow, reportlab, pypdf),
lazily imported — the core SDK stays dependency-light. 19 new tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ValidPay-io
ValidPay-io merged commit 09aa6c7 into main Jun 17, 2026
4 checks passed
@ValidPay-io
ValidPay-io deleted the feat/embed-qr branch June 17, 2026 10:54
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