Quickstart · 2 minutes
Verify a Document
Add client-side document verification to any web page. One script tag, one HTML element. No backend, no API keys, no data transmitted.
The simplest integration
This is a complete, working HTML page that verifies PDF documents:
index.html
<!DOCTYPE html> <html lang="en"> <head> <script type="module" src="https://unpkg.com/@attestto/[email protected]/dist/attestto-verify.js" integrity="sha384-v5irXGJ3QL+rHxekFY6LC4PsECPYYAtLt4L7qA30edAvB+/Ah+ZS8IvSXoxqmctW" crossorigin="anonymous" ></script> </head> <body> <!-- That's it. Drop this anywhere. --> <attestto-verify></attestto-verify> </body> </html>
Save this as index.html, open it in a browser, and drop any PDF. The component will:
1
Hash the entire file (SHA-256) — locally, in the browser
2
Detect digital signatures (PAdES/PKCS#7)
3
Run a forensic audit — JavaScript injection, OpenAction scripts, embedded files, encryption
4
Display results with verification level badges
Privacy guarantee: Your documents never leave the device.
All verification runs 100% client-side. No analytics, no tracking, no network requests.
Add signing too
Want users to sign documents with their DID wallet? Add the sign component:
sign.html
<script type="module" src="https://unpkg.com/@attestto/[email protected]/dist/attestto-verify.js" integrity="sha384-v5irXGJ3QL+rHxekFY6LC4PsECPYYAtLt4L7qA30edAvB+/Ah+ZS8IvSXoxqmctW" crossorigin="anonymous" ></script> <!-- Verify documents --> <attestto-verify></attestto-verify> <!-- Sign with any DID wallet --> <attestto-sign></attestto-sign>
Listen for results
Both components emit standard DOM events that cross Shadow DOM boundaries:
JavaScript
const el = document.querySelector('attestto-verify') el.addEventListener('verification-complete', (e) => { console.log('Hash:', e.detail.hash) console.log('Signatures:', e.detail.signatures.length) // Send hash to your backend for recording fetch('/api/verify', { method: 'POST', body: JSON.stringify(e.detail) }) })
Next steps
Now that you have verification working:
- Theme it — match the component to your brand with CSS custom properties
- Add plugins — extend verification with DID resolution, trust registries, or custom checks
- Full API reference — all attributes, events, and CSS parts
- Issue a credential — go deeper with the VC SDK