Skip to content

Files

Latest commit

 

History

History
54 lines (32 loc) · 2.41 KB

README.md

File metadata and controls

54 lines (32 loc) · 2.41 KB

Crescent sample client browser extension

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.

Setup

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

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

Installation

Follow the side-loading instruction for your browser to load the extension:

Edge
Chrome
Firefox

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

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:

  1. Open a new tab and navigate to about:config.
  2. Search for ui.popup.disable_autohide and set it to true.

Note: This change keeps the popup window open until you press the [esc] key instead of it auto-closing when it loses focus.

Usage

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.