@socure-inc/docv-react-native
Version:
The Predictive Document Verification (DocV) SDK React Native bridge allows you to use the DocV SDK v5 for Android and iOS in your React Native application.
33 lines (29 loc) • 728 B
text/typescript
import { NativeModules } from 'react-native';
const LINKING_ERROR =
`The package '@socure-inc/docv-react-native' doesn't seem to be linked.\n\n` +
'- Rebuilt the app after installing the package';
const SocureDocVReactNative = NativeModules.SocureDocVReactNative
? NativeModules.SocureDocVReactNative
: new Proxy(
{},
{
get() {
throw new Error(LINKING_ERROR);
},
}
);
export function launchSocureDocV(
docVTransactionToken: string,
publicKey: string,
useSocureGov: boolean,
onSuccess: Function,
onError: Function
) {
return SocureDocVReactNative.launchSocureDocV(
docVTransactionToken,
publicKey,
useSocureGov,
onSuccess,
onError
);
}