This project contains a Edge/Chrome/Firefox browser extension implementing a Crescent prover. The browser extension can interact with the sample issuer to retrieve JSON Web Tokens (JWT) and present a Crescent zero-knowledge proof to the sample verifier, with the help of a client helper to offload expensive storage and computation.
Make sure node.js and npm are installed on your system; the latest Long-Term Support (LTS) version is recommended for both.
Run the install script:
npm install
Build the extension (3 modes):
-
production build (minified w/o sourcemapping)
npm run build
-
debug build (no minification and sourcemapping enabled)
npm run build:debug
-
watch build (watches files and does debug build on save)
npm run build:watch
Follow the side-loading instruction for your browser to load the extension:
The Edge/Chrome manifest.json
file is located at samples/browser-extension/dist/chrome
The Firefox manifest.json
file is located at samples/browser-extension/dist/firefox
There is a known issue when using the client extension on Firefox where the extension popup window closes immediately after opening the filepicker when importing a credential from file, preventing the import from succeeding. To work around this:
- Open a new tab and navigate to
about:config
. - Search for
ui.popup.disable_autohide
and set it totrue
.
Note: This change keeps the popup window open until you press the [esc] key instead of it auto-closing when it loses focus.
The browser extension's pop-up menu contains three tabs:
- Wallet: displays credentials that can be displayed to a verifier
- About: displays information about the project
- Config: contains settings to reset the extension, configure the client helper service, and import a credential
Visiting an issuer website will trigger importation into the wallet.