Privacy and security
Spam and abuse protection
The layers that stop automated abuse, replays and impersonation.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The layers that stop automated abuse, replays and impersonation.
| Layer | Purpose | Implementation |
|---|---|---|
| One-time-code sign-in | Prove ownership of a mobile number or email | Web3Auth SMS / email passwordless login |
| Token verification | Stop impersonation | Every write requires a Web3Auth ID token, checked for signature (ES256), issuer and the Numpay app’s audience |
| Identity from the token only | Stop claiming someone else’s number | Registration ignores any mobile number or email in the request body and uses the verified token |
| Ownership checks | Stop editing other users’ data | Profile updates are allowed only for the account that owns them; NEAR deposit status is shown only to the user it was quoted for |
| Rate limiting | Stop floods | 100 API requests per minute per IP |
| Replay protection | Stop duplicate payments | ERC-4337 nonces in each smart account; the EntryPoint rejects reused or out-of-order operations |
| Strict CORS | Stop other sites calling the API from a browser | Only Numpay’s own web origins are allowed in production |
| Security headers | Harden the API | Helmet with a restrictive Content-Security-Policy |
| Input validation | Reject malformed data | zod schemas on users, transactions and identifiers |
| Deposit limits | Bound NEAR deposits | $1–$10,000 per deposit, recipient fixed server-side |
