Skip to content
/ web-proofs-examples Public template

This repository demonstrates how to integrate the @plutoxyz/web-proofs library in both vanilla JavaScript and React applications.

License

Notifications You must be signed in to change notification settings

pluto/web-proofs-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Proofs Examples

License

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.

Quick Start

  1. Install dependencies
npm install
  1. 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.

Basic Examples

Demonstrate minimal setup required to integrate web-proofs:

  • Simple proof generation
  • Default configuration
  • No UI customization

Vanilla JavaScript

  • Basic implementation: examples/vanilla-js/index.js
  • HTML template: examples/vanilla-js/index.html

React

  • Basic component: examples/react/App.jsx
  • Entry point:examples/react/main.jsx

Advanced Examples

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

Vanilla JavaScript

  • Advanced implementation: examples/vanilla-js/advanced/index.js
  • HTML template:examples/vanilla-js/advanced/index.html

React

  • Advanced component: examples/react/advanced/App.jsx
  • Configuration component: examples/react/advanced/ProveConfig.jsx
  • Entry point: examples/react/advanced/main.jsx

Documentation

For detailed documentation and integration guides, visit https://docs.pluto.xyz/guides/using-the-javascript-sdk

Community

License

MIT License - see LICENSE.md for details.

About

This repository demonstrates how to integrate the @plutoxyz/web-proofs library in both vanilla JavaScript and React applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •