0.0.2 • Published 2 years ago

pave-kyc-sdk-v.1 v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Installation

Usage

To start using the sdk, please follow these steps all access method returns promise:

  1. Authorization with authToken and privateKey provided by @pavelon.
import EnhanceKyc from 'pave-kyc-sdk-test1'

export const config = new EnhanceKyc({
  authToken: '',
  privateKey: '',
})
  1. OTP Veification access method, returns promise reponse config.sendOtp() && config.verifyCode
const onSend = (evt) => {
  evt.preventDefault()
  config.sendOtp({ phone: str }) // returns promise
}

const onVerify = (evt) => {
  evt.preventDefault()
  config.verifyOtp({ verifyCode: int }) // returns promise
}
  1. PostLocation access method config.location()
const onSave = (evt) => {
  evt.preventDefault()

  config.location({
    fullName: '',
    details: [],
  })
}
  1. PostContact access method config.contact()
const onSave = (evt) => {
  evt.preventDefault()

  config.contact({
    fullName: '',
    details: [],
  })
}
  1. PostMessages access method config.message()
const onSave = (evt) => {
  evt.preventDefault()

  config.message({
    fullName: '',
    details: [],
  })
}
  1. IdVerification access method config.verification()
  const onSave = (evt) => {
    evt.preventDefault();

   config.verification({
        digitalAddress: {
          digitalAddress: "GA1838164",
        },
      });


    driver_license: {
        id: "23234343",
        fullName: "Juls Tens",
        dob: "12-34-1223"
    }

    tin: "029302382",

    ssnit: {
        id: "23234343",
        fullName: "Juls Tens",
        dob: "12-34-1223"
    },

    passport: {
        id: "23234343",
        firstName: "Juls",
        lastName: "Tens",
        middleName: "Tagong",
        dob: "12-34-1223"
    },

    voter: {
        id: "23234343",
        fullName: "Juls",
        //isNew: false
    },

    digitalAddress: {
        digitalAddress: "GA1838164"
    }


  };
0.0.2

2 years ago

0.0.1

2 years ago