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

pavelon-verify-kyc

v0.2.1

Published

Pavelon EnhanceKyc

Downloads

27

Readme

Installation

yarn add pavelon-verify-kyc

Usage

import EnhancedKyc from 'pavelon-verify-kyc';

const enhanced = new EnhancedKyc({
  senderId: string  //required for otp verification
  authToken: string
  appId: string
  domainId: string
  otpLength: string
})

The onSend() function is an asynchronous function that sends an OTP (One Time Password) to a specified phone number using the enhanced.sendOtp() method. It takes a phoneNumber parameter as its input, which is passed as the phone property to the enhanced.sendOtp() method.


  async function onSend() {
    try {
      const response = await enhanced.sendOtp({ phone: phone });
      
    // handle successful sent code here
      
      console.log(response);
      
    } catch (error) {
    
     //handle error here
     
      console.log(error);
    }
  }
  

The onVerify() function is an asynchronous function that verifies an OTP (One Time Password) for a specified phone number using the enhanced.verifyOtp() method. It takes a code parameter as its input, which is passed as the verifyCode property to the enhanced.verifyOtp() method.


  async function onVerify() {
    try {
      const response = await enhanced.verifyOtp({ verifyCode: code });
      
    // handle successful verification here
      
      console.log(response);
      
    } catch (error) {
    
     //handle error here
     
      console.log(error);
    }
  }
  

The verification() method is designed to support various types of identification verification, including passports, national IDs, SSNIT, driver's licenses, TIN, and digital address verification, it is intended to provide a consistent and scalable way to verify multiple types of identification. Depending on the specific use case, the verification process for each type of identification may have different requirements and validation steps. However, this method can be used as a general-purpose function for handling these requirements.


async function onIDVerify () {

  try {
    const response = await enhanced.verification({
      passport: {
        id: "AB123456",
        firstName: "John",
        lastName: "Doe",
        middleName: "",
        dob: "01/01/1980"
      }
    });
    
    // handle successful verification here
    
    console.log(response);
    
  } catch(error) {
  
    // handle errors here
    
    console.error(error);
  
  }
};



async function verification() {

  const formData = new FormData();
  formData.append("nameOnCard", string);
  formData.append("idNumber", string);
  formData.append("idPhoto", File);
  formData.append("userId", string);   //optional

  try {
    const response = await config.ghanaCard(formData);
    console.log(response);
  } catch (error) {
    console.log(error);
  }
}



  //digital address verification
   digitalAddress: {
        digitalAddress: "",
      },



   //driver license verification
    driver_license: {
        id: "",
        fullName: "",
        dob: ""
    }


   //tin number verification
    tin: "",

    ssnit: {
        id: "",
        fullName: "",
        dob: ""
    },


   //passport verification
    passport: {
        id: "",
        firstName: "",
        lastName: "",
        middleName: "",
        dob: ""
    },


   //voter's id verification
    voter: {
        id: "",
        fullName: "",
    },

    




  };