@getvouch/react-native-sdk
v0.9.9
Published
React Native turbo module for Vouch SDK
Readme
vouch react native turbo module
React Native Turbo Module for Vouch SDK
Documentation
For detailed documentation, please visit the Vouch Documentation.
Installation
npm install @getvouch/react-native-sdk
# or
yarn add @getvouch/react-native-sdkUsage
import VouchSDK from '@getvouch/react-native-sdk';
await VouchSDK.initialize({
customerId: 'CUSTOMER_ID',
apiKey: 'API_KEY',
languageCodeOverride: 'en'
});
try {
const result = await VouchSDK.start({
dataSourceId: 'DATA_SOURCE_ID',
webhookUrl: 'https://your-server.com/webhook',
inputs: {
INPUT_NAME1: 'value1',
INPUT_NAME2: 'value2'
}
});
console.log('Vouch result:', result.proofId);
} catch (error) {
console.error('Vouch error:', error);
}
// Optional: call when explicitly tearing down your SDK session, such as during
// app sign-out or when resetting SDK lifecycle state before a later initialize.
await VouchSDK.destroy();Headless proving flow
const result = await VouchSDK.startHeadless({
dataSourceId: 'DATA_SOURCE_ID',
webhookUrl: 'https://your-server.com/webhook',
inputs: {
INPUT_NAME1: 'value1',
},
}, (progress) => {
console.log('Vouch progress:', progress);
});
console.log('Vouch result:', result.proofId);Requirements
- React Native 0.81.5 or higher
- iOS 16.4 or higher
- Android API 33 or higher
License
MIT
