react-native-bynn-sdk
Version:
Bynn Mobile SDK for React Native - Identity verification and KYC
1 lines • 4.68 kB
JavaScript
(function(_0x516712,_0x2c9a21){const _0x4d6c8d=_0x3972,_0xb7a381=_0x516712();while(!![]){try{const _0x5de0b7=-parseInt(_0x4d6c8d(0xf5))/0x1+parseInt(_0x4d6c8d(0x10e))/0x2+parseInt(_0x4d6c8d(0xff))/0x3*(-parseInt(_0x4d6c8d(0x108))/0x4)+parseInt(_0x4d6c8d(0xf3))/0x5+parseInt(_0x4d6c8d(0x10b))/0x6+-parseInt(_0x4d6c8d(0x10c))/0x7*(parseInt(_0x4d6c8d(0x10f))/0x8)+parseInt(_0x4d6c8d(0xf8))/0x9*(parseInt(_0x4d6c8d(0xfe))/0xa);if(_0x5de0b7===_0x2c9a21)break;else _0xb7a381['push'](_0xb7a381['shift']());}catch(_0x3528ae){_0xb7a381['push'](_0xb7a381['shift']());}}}(_0x42c4,0x270f0));import _0x5a3385,{useEffect,useState}from'react';import{useBynn}from'./BynnProvider';import{useBynnLogic}from'./useBynn';import _0x42d398 from'./views/ConsentView';import _0x28f502 from'./views/DocumentCaptureFrontView';import _0x11205f from'./views/DocumentCaptureBackView';import{useWebSocket}from'./hooks/useWebSocket';import{createSession}from'./api';import _0x1466b7 from'./views/LivenessCheckStartView';import{PhoneInputView}from'./views/PhoneInputView';function _0x42c4(){const _0x564edf=['550677efQwbV','onError','scan_id_document_front_screen','error','status','websocket_url','createElement','proof_of_address','document_capture_back','4kdidnA','proof_of_funds','completed_screen','396156XTiDKR','7KAURoS','success','333016rvzCQd','699272hlzejB','phone_input','liveness_screen','age_verification','email_input','proof_of_funds_screen','374725gUWUKL','screen','177060ATGgxM','session_id','show','9aOYeiw','proof_of_address_screen','log','consent','ageVerification','document_capture_front','3005330NvlwXU'];_0x42c4=function(){return _0x564edf;};return _0x42c4();}import{EmailInputView}from'./views/EmailInputView';import{ProofOfAddressView}from'./views/ProofOfAddressView';import{ProofOfFundsView}from'./views/ProofOfFundsView';import _0xb481cf from'./views/SuccessView';import _0x6f6bee from'./views/LivenessAgeVerificationView';const VerificationRoot=()=>{const _0xd5743=_0x3972,{step:_0x2cebd5,setStep:_0x3f2206,options:_0x4bca0b,sessionId:_0x5d2900,setSessionId:_0x5a61e4,setGlobalLoading:_0x464961}=useBynn(),[_0xf1fa22,_0x38f787]=useState(null),_0x3c2c33=async()=>{const _0x1dbf56=_0x3972;if(_0x4bca0b[_0x1dbf56(0xfc)])_0x3f2206(_0x1dbf56(0x112));else try{const _0x495ab1=await createSession(_0x4bca0b);_0x5a61e4(_0x495ab1[_0x1dbf56(0xf6)]),_0x38f787(_0x495ab1[_0x1dbf56(0x104)]),_0x3f2206('consent');}catch(_0x337cf0){console[_0x1dbf56(0x102)](_0x337cf0),_0x4bca0b[_0x1dbf56(0x100)]?.(_0x337cf0);}},_0x4c191a=_0x4bdd9a=>{const _0x46289f=_0x3972;(_0x4bdd9a?.[_0x46289f(0x109)]?.[_0x46289f(0x103)]!=undefined||_0x4bdd9a?.['proof_of_funds']?.[_0x46289f(0x103)]!=null)&&_0x464961(![]);(_0x4bdd9a?.[_0x46289f(0x106)]?.[_0x46289f(0x103)]!=undefined||_0x4bdd9a?.[_0x46289f(0x106)]?.['status']!=null)&&_0x464961(![]);if(_0x4bdd9a[_0x46289f(0xf4)]?.[_0x46289f(0xf7)])switch(_0x4bdd9a['screen'][_0x46289f(0xf7)]){case'consent_screen':_0x3f2206('consent');break;case _0x46289f(0x101):_0x3f2206('document_capture_front');break;case'scan_id_document_back_screen':_0x3f2206('document_capture_back');break;case _0x46289f(0x111):_0x3f2206('liveness_info');break;case'phone_verification_screen':_0x3f2206(_0x46289f(0x110));break;case'email_verification_screen':_0x3f2206('email_input');break;case _0x46289f(0xf9):_0x3f2206('proof_of_address');break;case _0x46289f(0x114):_0x3f2206(_0x46289f(0x109));break;case _0x46289f(0x10a):_0x3f2206('success');break;default:console[_0x46289f(0xfa)]('Unhandled\x20screen:',_0x4bdd9a[_0x46289f(0xf4)]['show']);}};useWebSocket({'url':_0xf1fa22,'sessionId':_0x5d2900,'onPreflight':_0x4c191a}),useEffect(()=>{_0x3c2c33();},[]),useBynnLogic();switch(_0x2cebd5){case _0xd5743(0xfb):return _0x5a3385[_0xd5743(0x105)](_0x42d398,null);case _0xd5743(0xfd):return _0x5a3385['createElement'](_0x28f502,null);case _0xd5743(0x107):return _0x5a3385[_0xd5743(0x105)](_0x11205f,null);case'liveness_info':return _0x5a3385['createElement'](_0x1466b7,null);case _0xd5743(0x113):return _0x5a3385[_0xd5743(0x105)](EmailInputView,null);case _0xd5743(0x110):return _0x5a3385['createElement'](PhoneInputView,null);case _0xd5743(0x106):return _0x5a3385[_0xd5743(0x105)](ProofOfAddressView,null);case'proof_of_funds':return _0x5a3385[_0xd5743(0x105)](ProofOfFundsView,null);case _0xd5743(0x10d):return _0x5a3385[_0xd5743(0x105)](_0xb481cf,null);case _0xd5743(0x112):return _0x5a3385[_0xd5743(0x105)](_0x6f6bee,null);default:return null;}};function _0x3972(_0x30ec7a,_0x157135){const _0x42c438=_0x42c4();return _0x3972=function(_0x397240,_0x190315){_0x397240=_0x397240-0xf3;let _0x4d76a4=_0x42c438[_0x397240];return _0x4d76a4;},_0x3972(_0x30ec7a,_0x157135);}export default VerificationRoot;