react-native-bynn-sdk
Version:
Bynn Mobile SDK for React Native - Identity verification and KYC
1 lines • 2.79 kB
JavaScript
;const _0x1c1c28=_0x1e65;(function(_0x1985c9,_0x8d81e){const _0xfebad1=_0x1e65,_0x4c5c8c=_0x1985c9();while(!![]){try{const _0x355bc3=-parseInt(_0xfebad1(0x151))/0x1*(parseInt(_0xfebad1(0x15a))/0x2)+-parseInt(_0xfebad1(0x15b))/0x3+parseInt(_0xfebad1(0x162))/0x4*(-parseInt(_0xfebad1(0x16a))/0x5)+-parseInt(_0xfebad1(0x155))/0x6+parseInt(_0xfebad1(0x168))/0x7*(-parseInt(_0xfebad1(0x156))/0x8)+parseInt(_0xfebad1(0x157))/0x9*(-parseInt(_0xfebad1(0x165))/0xa)+-parseInt(_0xfebad1(0x163))/0xb*(-parseInt(_0xfebad1(0x159))/0xc);if(_0x355bc3===_0x8d81e)break;else _0x4c5c8c['push'](_0x4c5c8c['shift']());}catch(_0x22bfc3){_0x4c5c8c['push'](_0x4c5c8c['shift']());}}}(_0x53cb,0x5d672));function _0x1e65(_0x46eb66,_0x33b9ca){const _0x53cbd4=_0x53cb();return _0x1e65=function(_0x1e65a9,_0x22c026){_0x1e65a9=_0x1e65a9-0x151;let _0xfe168d=_0x53cbd4[_0x1e65a9];return _0xfe168d;},_0x1e65(_0x46eb66,_0x33b9ca);}Object[_0x1c1c28(0x169)](exports,'__esModule',{'value':!![]}),exports['useBynnLogic']=useBynnLogic;function _0x53cb(){const _0x1d00e0=['next_step','useBynn','1762061gXaGAj','defineProperty','6380CcuwPf','11yqIXnm','log','onmessage','json','3438432CfCDSt','8QAyXuT','117RSQrja','session_id','396zahNme','45382fyJIFh','366108hwfEHy','then','current','close','useRef','apiKey','./api/index','2328CXuNyn','959343IxIDSv','websocket_url','427990ZHBFqz'];_0x53cb=function(){return _0x1d00e0;};return _0x53cb();}var _react=require('react'),_BynnProvider=require('./BynnProvider'),_index=require(_0x1c1c28(0x161));function useBynnLogic(){const _0x16cb15=_0x1c1c28,{options:_0x330d57,setStep:_0x47bece}=(0x0,_BynnProvider[_0x16cb15(0x167)])(),_0x5162b8=(0x0,_react[_0x16cb15(0x15f)])(null);(0x0,_react['useEffect'])(()=>{const _0x2630db=async()=>{const _0x3726af=_0x1e65;try{const _0x330972=await(0x0,_index['createSession'])(_0x330d57);console[_0x3726af(0x152)]('---->>>',_0x330972['session_id']),_0x5162b8['current']=new WebSocket(_0x330972[_0x3726af(0x164)]),_0x5162b8[_0x3726af(0x15d)][_0x3726af(0x153)]=_0x2f8dbe=>{const _0x1d48a6=_0x3726af,_0x37f33b=JSON['parse'](_0x2f8dbe['data']);console[_0x1d48a6(0x152)](_0x37f33b),_0x37f33b?.['next_step']&&_0x47bece(_0x37f33b['next_step']);},setTimeout(()=>{const _0x4c8622=_0x3726af;_0x5162b8['current']?.['readyState']!==0x1&&fetch('https://api.bynn.com/v1/sessions/'+_0x330972[_0x4c8622(0x158)]+'/preflight',{'headers':{'x-api-key':_0x330d57[_0x4c8622(0x160)]}})[_0x4c8622(0x15c)](_0x5ab3f7=>_0x5ab3f7[_0x4c8622(0x154)]())[_0x4c8622(0x15c)](_0xbc15e3=>{const _0xa61c45=_0x4c8622;_0xbc15e3?.[_0xa61c45(0x166)]&&_0x47bece(_0xbc15e3['next_step']);});},0x1388);}catch(_0x20efca){console['error'](_0x20efca),_0x330d57['onError']?.(_0x20efca);}};return _0x2630db(),()=>{const _0x28414f=_0x1e65;_0x5162b8[_0x28414f(0x15d)]?.[_0x28414f(0x15e)]();};},[]);}