This repository demonstrates how to integrate the @plutoxyz/web-proofs library in both vanilla JavaScript and React applications.
ℹ️ The default option for generating Web Proofs is to use the Pluto-hosted notary. Developers do not need to set up the prover or host it themselves, unless they explicitly want to self-host this infrastructure or build custom infrastructure. For more information, see the detailed documentation here docs.pluto.xyz/getting-started/example-github-repo.
- Install dependencies
npm install
- Run examples
Basic examples:
npm run vanilla # Basic vanilla JavaScript example
npm run react # Basic React example
Advanced examples with configuration UI:
npm run vanilla:advanced # Advanced vanilla JavaScript example
npm run react:advanced # Advanced React example
Navigate to http://localhost:5173/
in your browser.
Demonstrate minimal setup required to integrate web-proofs:
- Simple proof generation
- Default configuration
- No UI customization
- Basic implementation:
examples/vanilla-js/index.js
- HTML template:
examples/vanilla-js/index.html
- Basic component:
examples/react/App.jsx
- Entry point:
examples/react/main.jsx
Show full capabilities with:
- Configurable prover mode (Origo/TLSN)
- Device mode selection (iOS/Chrome Extension)
- QR code size adjustment
- Error handling options
- Loading state customization
- Styling customization
- Debug mode
- Advanced implementation:
examples/vanilla-js/advanced/index.js
- HTML template:
examples/vanilla-js/advanced/index.html
- Advanced component:
examples/react/advanced/App.jsx
- Configuration component:
examples/react/advanced/ProveConfig.jsx
- Entry point:
examples/react/advanced/main.jsx
For detailed documentation and integration guides, visit https://docs.pluto.xyz/guides/using-the-javascript-sdk
- Telegram - Community chat and support
MIT License - see LICENSE.md for details.