react-native-hyperkyc-sdk
v0.36.0
Published
React Native wrapper for HyperKYC SDK
Downloads
9,428
Readme
react-native-hyperkyc-sdk
React Native wrapper for HyperKYC SDK
Installation
npm install react-native-hyperkyc-sdk
Usage
import { NativeModules } from 'react-native';
const { Hyperkyc } = NativeModules
// ...
var configDictionary = {};
configDictionary["appId"] = appID
configDictionary["appKey"] = appKey
var inputsDictionary = {};
inputsDictionary["bvnNumber"] = "number-123"
inputsDictionary["image"] = "image-path"
// configDictionary["defaultLangCode"] = "vn"
configDictionary["inputs"] = inputsDictionary
configDictionary["transactionId"] = transactionId
configDictionary["workflowId"] = "<workflow-id>"
// Generate unique ID
Hyperkyc.createUniqueId(uniqueId =>{
console.log(uniqueId)
configDictionary["uniqueId"] = uniqueId;
});
//Prefetch configs
Hyperkyc.prefetch(appID, workflowID)
Hyperkyc.launch(configDictionary, function(response){
console.log(response)
})
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT