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

iblock-verifier

v1.1.0

Published

Integration Library for IdentityBlock Person Verification Platform

Downloads

5

Readme

'iblock-verifier'

API to integrate the personal verification middleware in the web applications.

Uses 'iBlock Mobile Application' to verify the digital identity from user's end.

How to use

Install the 'iblock-verifier' package on your backend server source code using

npm install iblock-verifier

Include the following variables in your .env file, or in the environment variables where your server is hosted. Refer the .env.example inside the 'iblock-verifier' package in the node modules folder.

FUNDING_ACCOUNT="**private key of the account used to fund the newly created accounts **"

Integrate the below explained functions to use the 'iBlock Person Verification Platform' in your web server.

If you are restoring the integration of 'iBlock Person Verification Platform', add the following fields to your .env with the details of your already deployed smart contract addresses.

IBLOCK_VERIFIER_PRIVATE_KEY IBLOCK_VERIFIER_ADDRESS IBLOCK_VERIFIER_CONTRACT_ADDRESS

Refer .env.example file for the format.

Functions

loadContract() ⇒ JSON

Load ( or deploy and load) the smart contract tied to the verifier.

Read the contract address from the 'deployed-contract' file, or deploy a new contract if the 'deployed-contract' file is not present.

Kind: global function
Returns: JSON - {

private-key:{String} - Private key of the Ethereum Account Address of the verifier,

verifier-address: {String} - Ethereum Account Address of the verifier,

contract-address: {String} - Smart Contract address of the verifier

}.

getQR(_verifierName) ⇒ JSON

Get the QR code generated in the format accepted by the 'iBlock Mobile Application'.

Kind: global function
Returns: JSON - {

qr: {String} - QR code URI that contains the verifier details,

token: {String} - unique token to the verification

}.

| Param | Type | Description | | -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | _verifierName | String | The name of the verifying institution. Will be prompted to the user who scans the QR code using the 'iBlock Mobile Application'. |

getTokenVerified(_token, _listOfDataFields) ⇒ JSON

Get the personal details of a user who scanned and approved a QR code with the given token.

If the transaction is not succeeded yet, return "PENDING" as status.

If the user has rejected permission, return "REJECTED" as status.

Kind: global function
Returns: JSON - {

status: {String} - status of the verification. "PENDING" or "APPROVED" or "REJECTED",

data(optional): {JSON} - user's data fields fetched from blockchain, only applicable if status is APPROVED.

}

| Param | Type | Description | | ------------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | _token | String | A token previously generated using the 'iblock-verifier package' to identify the verification transaction. | | _listOfDataFields | Array.<String> | A list of data fields of users which need to be fetched from the blockchain currently allows the set of ["name","email","DOB","country","mobile","gender"] only. |