npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

p2pme-encrypted-payment-proof

v1.6.0

Published

Headless client SDK for P2P payment proofs. Framework-agnostic API client + sign-in helper used by the user, merchant, and ops UIs. Proofs are stored raw and gated by role-authorized APIs.

Readme

p2pme-encrypted-payment-proof

Headless client SDK for P2P payment proofs. No UI — pure, framework-agnostic TypeScript: an API client plus a sign-in helper. The user-app, merchant-app, and ops-dashboard install this and wire the calls into their own screens, so all three talk to the proof server identically. Proofs are stored raw on the server and gated by role-authorized APIs.

The package keeps the encrypted-payment-proof name for continuity; the current design is raw storage + role-authorized APIs, not client-side encryption. See ../../docs/AUTH.md.

What it does

  • createSessionAuthorization({ baseUrl, address, chainId, signMessage, storage? }) — one personal_sign → a short-lived bearer token, reused for the whole session. Returns the authorization() you hand to createProofClient, plus a synchronous hasFreshSession() probe. Pass storage (e.g. sessionStorage) to survive reloads; concurrent calls share one in-flight mint (one signature for a burst of requests).
  • createProofClient({ baseUrl, authorization }) — request / list / upload / download proofs, plus countPendingProofRequests({ address, circleIds }) (unauthenticated badge count, no signature). Files cross the wire as base64; the note as 0x-hex.
  • uploadProofFile(client, request, file) / downloadProofFile(client, file) / ALLOWED_PROOF_MIME — shared raw upload/download flow (strips EXIF before upload, returns a typed Blob on download) so all three apps behave identically.
  • stripExif(bytes) / flattenImage(file, opts) — client-side privacy + size helpers to run before upload (flattenImage downscales a multi-MB phone photo to ~150–400 KB and drops EXIF; guard with canFlattenImage()).

Auth

createSessionAuthorization(...) signs a single compact message (payment-proof.p2p.me:sign-in:<address>:<chainId>:<timestamp>) via personal_sign, exchanges it at POST /auth/session for a bearer token, and caches it (re-signing only near expiry). Claim your on-chain identity in address (the smart-account address in the user/merchant apps; the EOA in ops); the server verifies EOA, ERC-1271, and ERC-6492 signatures. See ../../docs/AUTH.md and ../../docs/VERIFY.md.

Fast, clean uploads

Up to 5 files hang off one order (delete one to free a slot). Strip EXIF / flatten client-side, then upload the raw bytes; uploads have no ordering dependency, so run them in parallel with Promise.all. proofClient.deleteProof(requestId, fileId) frees a slot when at the cap.