react-native-bynn-sdk
Version:
Bynn Mobile SDK for React Native - Identity verification and KYC
1 lines • 6.95 kB
JavaScript
(function(_0x1eaeef,_0x1acb7d){const _0x48467c=_0x4a47,_0x14da60=_0x1eaeef();while(!![]){try{const _0x54eaed=parseInt(_0x48467c(0x118))/0x1*(parseInt(_0x48467c(0xf6))/0x2)+parseInt(_0x48467c(0xfc))/0x3+parseInt(_0x48467c(0x111))/0x4*(-parseInt(_0x48467c(0x10f))/0x5)+parseInt(_0x48467c(0x106))/0x6+-parseInt(_0x48467c(0xff))/0x7+-parseInt(_0x48467c(0x10e))/0x8*(-parseInt(_0x48467c(0x10a))/0x9)+-parseInt(_0x48467c(0x10b))/0xa*(parseInt(_0x48467c(0x119))/0xb);if(_0x54eaed===_0x1acb7d)break;else _0x14da60['push'](_0x14da60['shift']());}catch(_0x28d46f){_0x14da60['push'](_0x14da60['shift']());}}}(_0x39db,0x9ec10));import _0x896016,{useState}from'react';import{View,Text,Alert,SafeAreaView,Image,TouchableOpacity}from'react-native';function _0x39db(){const _0x518db7=['liveness_session','access_key','1539099iYcYGl','Liveness\x20check\x20response:','90%','7417284rjvEVG','&accessKeyId=','Begin','dataisSafe','&secretAccessKey=','token','log','2678310jeAmBS','session_id','createElement','credentials','1935qRoIGR','20GXCngy','map','center','9048fIDxPC','3775JfAWym','Error','692GGRXwb','#FFFFFF','text','Fragment','row','Fail','®ion=eu-west-1','28648ZXjoij','1060906kSLvKx','Liveness\x20check\x20url:','photo_sensitive_warning','No\x20session','500','88%','https://aws-liveness.vercel.app/?sessionId=','600','58DpgRPA','&sessionToken=','Verify\x20ID','message'];_0x39db=function(){return _0x518db7;};return _0x39db();}import{useBynnSession}from'../useBynnSession';import{completeLivenessCheck,startLivenessCheck}from'../api/index';import{Font,Height,Width}from'../utils/dimensions';import _0x4f0814 from'./LivenessWebView';import{useTranslation}from'react-i18next';function _0x4a47(_0x55804c,_0x47c892){const _0x39db7b=_0x39db();return _0x4a47=function(_0x4a47c6,_0x450353){_0x4a47c6=_0x4a47c6-0xf2;let _0x53be49=_0x39db7b[_0x4a47c6];return _0x53be49;},_0x4a47(_0x55804c,_0x47c892);}import'../i18n';import _0x7952cc from'./ExitView';const LivenessCheckStartView=()=>{const _0x4e98d6=_0x4a47,{sessionId:_0x144240}=useBynnSession(),[_0x3095fc,_0x1a8f7c]=useState(''),[_0x4b9a97,_0x2db1ae]=useState(![]),[_0x485cc0,_0x2047ea]=useState(![]),{t:_0x2b2689}=useTranslation();console[_0x4e98d6(0x105)]('Conscent',_0x144240);const _0x202523=[{'icon':require('../assets/zap.png'),'text':_0x2b2689(_0x4e98d6(0x11b))},{'icon':require('../assets/smile.png'),'text':_0x2b2689('start_requirement_selfie_text2')},{'icon':require('../assets/lock.png'),'text':_0x2b2689(_0x4e98d6(0x102))}],_0x4edcc9=async()=>{const _0x4363ce=_0x4e98d6;try{if(!_0x144240)throw new Error('No\x20session');const _0x1586b5=await startLivenessCheck(_0x144240);console['log'](_0x4363ce(0xfd),_0x1586b5),console[_0x4363ce(0x105)](_0x4363ce(0x11a),_0x4363ce(0xf4)+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)]['session_id'])+_0x4363ce(0x100)+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)][_0x4363ce(0x109)]['id'])+_0x4363ce(0x103)+encodeURIComponent(_0x1586b5['liveness_session']['credentials'][_0x4363ce(0xfb)])+'&sessionToken='+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)]['credentials']['token'])+'®ion=eu-west-1'),console['log'](_0x4363ce(0x11a),'http://localhost:5173/?sessionId='+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)]['session_id'])+'&accessKeyId='+encodeURIComponent(_0x1586b5['liveness_session'][_0x4363ce(0x109)]['id'])+_0x4363ce(0x103)+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)][_0x4363ce(0x109)][_0x4363ce(0xfb)])+_0x4363ce(0xf7)+encodeURIComponent(_0x1586b5['liveness_session']['credentials'][_0x4363ce(0x104)])+'®ion=eu-west-1'),_0x1a8f7c('https://aws-liveness.vercel.app/?sessionId='+encodeURIComponent(_0x1586b5['liveness_session'][_0x4363ce(0x107)])+'&accessKeyId='+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)]['credentials']['id'])+'&secretAccessKey='+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)]['credentials']['access_key'])+_0x4363ce(0xf7)+encodeURIComponent(_0x1586b5[_0x4363ce(0xfa)]['credentials']['token'])+_0x4363ce(0x117)),_0x2db1ae(!![]);}catch(_0x2672ac){console['error'](_0x2672ac),Alert['alert'](_0x4363ce(0x110),_0x2672ac[_0x4363ce(0xf9)]);}},_0x9b391a=async()=>{const _0x256294=_0x4e98d6;try{if(!_0x144240)throw new Error(_0x256294(0x11c));const _0x442feb=await completeLivenessCheck(_0x144240);console[_0x256294(0x105)](_0x442feb),_0x2db1ae(![]);}catch(_0x29052a){console['error'](_0x29052a),Alert['alert'](_0x256294(0x110),_0x29052a['message']);}};return _0x896016['createElement'](SafeAreaView,{'style':{'flex':0x1,'alignItems':_0x4e98d6(0x10d),'backgroundColor':_0x4e98d6(0x112)}},_0x4b9a97?_0x896016['createElement'](_0x4f0814,{'url':_0x3095fc,'onComplete':()=>{const _0x28c425=_0x4e98d6;console[_0x28c425(0x105)]('Success'),_0x9b391a();},'onError':()=>{const _0xc4e648=_0x4e98d6;console[_0xc4e648(0x105)](_0xc4e648(0x116)),_0x2db1ae(![]);}}):_0x896016['createElement'](_0x896016[_0x4e98d6(0x114)],null,_0x896016[_0x4e98d6(0x108)](View,{'style':{'flexDirection':'row','justifyContent':'space-between','width':_0x4e98d6(0xfe)}},_0x896016['createElement'](Text,{'style':{'fontSize':Font(0x10),'fontWeight':'500','lineHeight':Height(0x18),'alignSelf':'center','color':'#15181E'}},_0x4e98d6(0xf8))),_0x896016['createElement'](Image,{'source':require('../assets/liveImg.png'),'style':{'height':Height(0x78),'width':Width(0x54),'marginVertical':Height(0x14)}}),_0x896016[_0x4e98d6(0x108)](Text,{'style':{'fontSize':Font(0x19),'marginBottom':Height(0x14),'fontWeight':_0x4e98d6(0xf5),'lineHeight':Height(0x20),'textAlign':'center','width':'70%','paddingHorizontal':Width(0x5),'marginTop':Height(0xf)}},_0x2b2689('liveness_pre_title2')),_0x202523[_0x4e98d6(0x10c)]((_0x471938,_0x4905cf)=>{const _0x44699c=_0x4e98d6;return _0x896016['createElement'](View,{'key':_0x4905cf,'style':{'flexDirection':_0x44699c(0x115),'width':'90%','columnGap':Width(0xa),'marginBottom':Height(0xf)}},_0x896016['createElement'](Image,{'source':_0x471938['icon'],'style':{'height':Height(0x14),'width':Height(0x14)}}),_0x896016[_0x44699c(0x108)](Text,{'style':{'fontSize':Font(0x10),'fontWeight':'400','lineHeight':Height(0x18),'color':'#374255','width':_0x44699c(0xf3)}},_0x471938[_0x44699c(0x113)]));}),_0x896016[_0x4e98d6(0x108)](View,{'style':{'justifyContent':_0x4e98d6(0x10d),'alignItems':'center','position':'absolute','bottom':Height(0x1e)}},_0x896016['createElement'](TouchableOpacity,{'onPress':_0x4edcc9,'style':{'height':Height(0x38),'width':Width(0x168),'backgroundColor':'#15181E','justifyContent':'center','alignItems':_0x4e98d6(0x10d),'borderRadius':Height(0x38)}},_0x896016[_0x4e98d6(0x108)](Text,{'style':{'color':_0x4e98d6(0x112),'fontSize':Font(0x10),'lineHeight':Height(0x18),'fontWeight':_0x4e98d6(0xf2)}},_0x4e98d6(0x101))),_0x896016['createElement'](Image,{'style':{'height':Height(0x1e),'width':Width(0x64),'marginTop':Height(0x14)},'source':require('../assets/logo.png')}))),_0x896016[_0x4e98d6(0x108)](_0x7952cc,{'visible':_0x485cc0,'onCancel':()=>_0x2047ea(![]),'onConfirm':()=>_0x2047ea(![])}));};export default LivenessCheckStartView;