Browser integration
Classic script
The hosted /api.js bundle exposes the global DecodeBox object. Use it with a classic script tag
and await DecodeBox.ready before calling the SDK.
The extensionless /api alias serves the same classic bundle and is used by the existing ZAP
add-on. SDK calls run in the application that loads the script.
ES module
Import the SDK in an external module or a <script type="module"> block.
For cross-origin module loading, the server must respond with a JavaScript MIME type and allow the page's origin through CORS. If your site sets a Content Security Policy, permit the SDK's script origin and load your own initialization code according to that policy. Use HTTPS or localhost for operations that require Web Crypto.
Local development and offline usage
For offline use or self-hosting, keep a verified copy of the classic bundle alongside your page. You can also download a verified milestone bundle. To build from source now, install Node.js 24 and run the following commands.
For a published SDK release, check out its Git tag before installing dependencies. The build creates
dist/api.js and the dist/sdk/ aliases. Save this as dist/example.html and open
it from disk, or copy both example.html and api.js to your own static site.
The browser can open these two files and print Hello with the network disconnected. To update,
obtain or build the new release, verify its digest, then replace the local bundle and update
any integrity pin your application uses.