iSDK Developer Documentation
The Integration SDK (iSDK) is a client-side library containing the official web components and rendering pipelines for Universal Documents.
1. Getting Started
Include the official iSDK script block into your HTML template. This enables the native <ud-reader> element automatically.
<script src="https://isdk.universaldocument.org/dist/isdk.js" defer></script>
2. Embedding the Reader Component
Insert the reader component directly inside your page layout and point it to any UDS/UDR document URL:
<ud-reader src="https://data.universaldocument.org/invoice.uds"></ud-reader>
3. Listening to Verification Events
The iSDK fires custom events indicating when a document has successfully loaded, verified its cryptographic hashes, or failed validation:
const reader = document.querySelector('ud-reader');
reader.addEventListener('ud:verified', (e) => {
console.log('Document verification succeeded!', e.detail.hash);
});
reader.addEventListener('ud:tampered', (e) => {
console.error('Tampering detected in block:', e.detail.failedBlockId);
});
4. API Methods
Interact programmatically with the active document state:
reader.getDocumentPayload()— Returns the parsed JSON document tree.reader.verifySignature()— Triggers an on-demand cryptographic verification cycle.reader.exportToPDF()— Generates a print-ready version.