npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tydids-jquery-consent

v1.0.5

Published

JQuery extension for TyDIDs Self-Sovereign Identity & Consent Management

Downloads

31

Readme

tydids-jquery-consent

jQuery extension for TyDIDs Self-Sovereign Identity and Consent Management

A jQuery extension that simplifies the process of adding GDPR compliance to existing webforms. It allows web developers to easily integrate GDPR compliance into their existing forms using decentralized and self-sovereign identities. This extension solves the problem of allowing data providers (web users) to revoke consent given at a later time.

Uses TyDIDs-Core. Backend/Middleware: TyDIDs-SSI-Consent-Router

Try on JSFiddle

Features

  • Easy to Use: tydids-jquery-consent provides a simple and intuitive API for adding GDPR compliance to your webforms.
  • Transparent Implementation: The extension generates a Self-Sovereign Identity (SSI) for each user who checks the GDPR compliance box. This SSI allows the user to revoke consent at any time.
  • No Third-Party Dependencies: tydids-jquery-consent is designed to be a standalone solution. It does not rely on any third-party frameworks or service providers.
  • Backend Compatibility: The value of the GDPR compliance checkbox is changed to the Identity of the SSI. This allows the consent to be easily validated on the backend.

Installation

<script src="https://energychain.github.io/tydids-jquery-consent/dist/tydids-jquery-consent.js"/>

Usage

Getting Consent

$('#consentCheck').tydisConsent(); // #consentCheck is ID of checkbox field for GDPR Constent

This will add the necessary functionality to the checkbox. When the user checks the box, an SSI will be generated and downloaded. The value of the checkbox will be changed to the Identity of the SSI.

Checking revocation

CLI

npx tydids-core isgranted <identity>

Node JS

 const provider = new ethers.providers.JsonRpcProvider(env._RPC_URL);
  const bn = (await provider.getBlockNumber()).toString() * 1;
  let sc = new ethers.Contract(env._revokeContract, env._revokeAbi, provider);      
  let rcp = await sc.revocations(identity);
  let ts =  rcp.toString() * 1;   
  console.log("isGranted("+identity+")@Consensus:"+bn); 
  if(ts > 0) {
    console.log("Revoked at "+new Date(ts*1000).toISOString());
    process.exit(1);
  } else {
    sc = new ethers.Contract(env._publishContract, env._publishAbi, provider);      
    rcp = await sc.publishs(identity);
    ts =  rcp.toString() * 1;    
    console.log("Granted at "+new Date(ts*1000).toISOString());
    process.exit(0);
  }

For details check TyDIDs-Core

Rest API

https://api.corrently.io/v2.0/tydids/status?identity=<identity>

Configuration

Basic Usage

<input class="form-check-input" type="checkbox" id="consentCheck" name="consentCheck" required="">

Additional Attributes

<input class="form-check-input" type="checkbox" id="consentCheck" name="consentCheck" required=""
       signature="signature" 
       payload="payload" 
       identity="identity" 
       submit="submit" >

signature, payload and identity might be the id of a hidden input field which will be filled after consent. submit is the id of a button which will be "disabled" during consent creation.

License: Apache-2.0

Maintainer / Impressum