0.0.2 • Published 2 years ago
pave-kyc-sdk-v.1 v0.0.2
Installation
Usage
To start using the sdk, please follow these steps all access method returns promise:
- Authorization with authToken and privateKey provided by @pavelon.
import EnhanceKyc from 'pave-kyc-sdk-test1'
export const config = new EnhanceKyc({
authToken: '',
privateKey: '',
})
- 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
}
- PostLocation access method config.location()
const onSave = (evt) => {
evt.preventDefault()
config.location({
fullName: '',
details: [],
})
}
- PostContact access method config.contact()
const onSave = (evt) => {
evt.preventDefault()
config.contact({
fullName: '',
details: [],
})
}
- PostMessages access method config.message()
const onSave = (evt) => {
evt.preventDefault()
config.message({
fullName: '',
details: [],
})
}
- 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"
}
};