UNPKG

superchats

Version:

SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp

1 lines 5.91 kB
'use strict';const a47_0x34f5d9=a47_0x18e9;(function(_0x2141ed,_0x1b101c){const _0x393e9b=a47_0x18e9,_0x6f9dba=_0x2141ed();while(!![]){try{const _0x2757e7=parseInt(_0x393e9b(0x11e))/0x1+parseInt(_0x393e9b(0x10a))/0x2+parseInt(_0x393e9b(0x122))/0x3*(-parseInt(_0x393e9b(0x11d))/0x4)+-parseInt(_0x393e9b(0x120))/0x5*(-parseInt(_0x393e9b(0x114))/0x6)+parseInt(_0x393e9b(0x12c))/0x7+parseInt(_0x393e9b(0x10f))/0x8*(-parseInt(_0x393e9b(0x107))/0x9)+-parseInt(_0x393e9b(0x123))/0xa;if(_0x2757e7===_0x1b101c)break;else _0x6f9dba['push'](_0x6f9dba['shift']());}catch(_0x5da964){_0x6f9dba['push'](_0x6f9dba['shift']());}}}(a47_0x1f7f,0xc96a6));Object[a47_0x34f5d9(0x112)](exports,a47_0x34f5d9(0x11c),{'value':!![]}),exports[a47_0x34f5d9(0x126)]=exports[a47_0x34f5d9(0x12a)]=void 0x0;const curve25519_typescript_1=require(a47_0x34f5d9(0x11f)),helpers_1=require(a47_0x34f5d9(0x113));class Curve{constructor(_0x346480){const _0x25e50e=a47_0x34f5d9;this[_0x25e50e(0x12e)]=_0x346480,this['async']=new AsyncCurve();}set[a47_0x34f5d9(0x118)](_0x3de94c){const _0x1e2305=a47_0x34f5d9;this[_0x1e2305(0x12e)]=_0x3de94c;}[a47_0x34f5d9(0x11a)](_0x128c89){const _0x311ea4=a47_0x34f5d9;validatePrivKey(_0x128c89);const _0x5c867c=this[_0x311ea4(0x12e)][_0x311ea4(0x108)](_0x128c89);return processKeys(_0x5c867c);}[a47_0x34f5d9(0x10e)](_0x523639,_0x498321){const _0x39966e=a47_0x34f5d9;_0x523639=validatePubKeyFormat(_0x523639),validatePrivKey(_0x498321);if(_0x523639===undefined||_0x523639[_0x39966e(0x12d)]!=0x20)throw new Error(_0x39966e(0x10b));return this[_0x39966e(0x12e)][_0x39966e(0x117)](_0x523639,_0x498321);}[a47_0x34f5d9(0x110)](_0xfef0df,_0x5b868a){const _0x3b6c45=a47_0x34f5d9;validatePrivKey(_0xfef0df);if(_0x5b868a===undefined)throw new Error('Invalid\x20message');return this[_0x3b6c45(0x12e)][_0x3b6c45(0x128)](_0xfef0df,_0x5b868a);}[a47_0x34f5d9(0x119)](_0x374752,_0x4b22c0,_0x86b1c0){const _0x20bbff=a47_0x34f5d9;_0x374752=validatePubKeyFormat(_0x374752);if(_0x374752===undefined||_0x374752[_0x20bbff(0x12d)]!=0x20)throw new Error(_0x20bbff(0x10b));if(_0x4b22c0===undefined)throw new Error(_0x20bbff(0x10d));if(_0x86b1c0===undefined||_0x86b1c0[_0x20bbff(0x12d)]!=0x40)throw new Error(_0x20bbff(0x124));return this[_0x20bbff(0x12e)][_0x20bbff(0x111)](_0x374752,_0x4b22c0,_0x86b1c0);}}function a47_0x18e9(_0x2ecd32,_0xe0a379){const _0x1f7f96=a47_0x1f7f();return a47_0x18e9=function(_0x18e95e,_0x2abd57){_0x18e95e=_0x18e95e-0x107;let _0x390cb1=_0x1f7f96[_0x18e95e];return _0x390cb1;},a47_0x18e9(_0x2ecd32,_0xe0a379);}exports['Curve']=Curve;function a47_0x1f7f(){const _0x56d44f=['3864288fFkcLT','Ed25519Sign','verify','defineProperty','../helpers','222780YLQuub','AsyncCurve25519Wrapper','warn','sharedSecret','curve','Ed25519Verify','createKeyPair','error','__esModule','246548yCYgjt','1360768NCPBSl','@privacyresearch/curve25519-typescript','60NzFCFi','privKey','45xBPnSK','13280300PIoKxg','Invalid\x20signature','uint8ArrayToArrayBuffer','AsyncCurve','Invalid\x20private\x20key','sign','Invalid\x20public\x20key:\x20','Curve','WARNING:\x20Expected\x20pubkey\x20of\x20length\x2033,\x20please\x20report\x20the\x20ST\x20and\x20client\x20that\x20generated\x20the\x20pubkey','9613422NqtOVh','byteLength','_curve25519','9Rmtlmg','keyPair','pubKey','761890pExNdd','Invalid\x20public\x20key','slice','Invalid\x20message','ECDHE'];a47_0x1f7f=function(){return _0x56d44f;};return a47_0x1f7f();}class AsyncCurve{constructor(){const _0x118c14=a47_0x34f5d9;this[_0x118c14(0x12e)]=new curve25519_typescript_1[(_0x118c14(0x115))]();}set['curve'](_0x5766a5){const _0x1c4842=a47_0x34f5d9;this[_0x1c4842(0x12e)]=_0x5766a5;}async[a47_0x34f5d9(0x11a)](_0x5f0da0){const _0xdfb98a=a47_0x34f5d9;validatePrivKey(_0x5f0da0);const _0xc399b8=await this[_0xdfb98a(0x12e)][_0xdfb98a(0x108)](_0x5f0da0);return processKeys(_0xc399b8);}[a47_0x34f5d9(0x10e)](_0x248b52,_0x1aadcc){const _0x37586d=a47_0x34f5d9;_0x248b52=validatePubKeyFormat(_0x248b52),validatePrivKey(_0x1aadcc);if(_0x248b52===undefined||_0x248b52['byteLength']!=0x20)throw new Error(_0x37586d(0x10b));return this[_0x37586d(0x12e)][_0x37586d(0x117)](_0x248b52,_0x1aadcc);}[a47_0x34f5d9(0x110)](_0x1517ec,_0x3b9335){const _0x4f6c67=a47_0x34f5d9;validatePrivKey(_0x1517ec);if(_0x3b9335===undefined)throw new Error(_0x4f6c67(0x10d));return this[_0x4f6c67(0x12e)]['sign'](_0x1517ec,_0x3b9335);}async[a47_0x34f5d9(0x119)](_0x1514cd,_0x320a61,_0x1e3d47){const _0x3097ab=a47_0x34f5d9;_0x1514cd=validatePubKeyFormat(_0x1514cd);if(_0x1514cd===undefined||_0x1514cd[_0x3097ab(0x12d)]!=0x20)throw new Error(_0x3097ab(0x10b));if(_0x320a61===undefined)throw new Error(_0x3097ab(0x10d));if(_0x1e3d47===undefined||_0x1e3d47['byteLength']!=0x40)throw new Error(_0x3097ab(0x124));const _0x3c09f3=await this[_0x3097ab(0x12e)][_0x3097ab(0x111)](_0x1514cd,_0x320a61,_0x1e3d47);if(_0x3c09f3)throw new Error('Invalid\x20signature');return _0x3c09f3;}}exports[a47_0x34f5d9(0x126)]=AsyncCurve;function validatePrivKey(_0x41b72a){const _0x3ea1ae=a47_0x34f5d9;if(_0x41b72a===undefined||!(_0x41b72a instanceof ArrayBuffer)||_0x41b72a['byteLength']!=0x20)throw new Error(_0x3ea1ae(0x127));}function validatePubKeyFormat(_0xba3187){const _0x3bd983=a47_0x34f5d9;if(_0xba3187===undefined||(_0xba3187[_0x3bd983(0x12d)]!=0x21||new Uint8Array(_0xba3187)[0x0]!=0x5)&&_0xba3187['byteLength']!=0x20){console[_0x3bd983(0x116)](_0x3bd983(0x10b),{'pubKey':_0xba3187});throw new Error(_0x3bd983(0x129)+_0xba3187+'\x20'+(_0xba3187===null||_0xba3187===void 0x0?void 0x0:_0xba3187[_0x3bd983(0x12d)]));}return _0xba3187[_0x3bd983(0x12d)]==0x21?_0xba3187[_0x3bd983(0x10c)](0x1):(console[_0x3bd983(0x11b)](_0x3bd983(0x12b)),_0xba3187);}function processKeys(_0x4ed3e5){const _0x993830=a47_0x34f5d9,_0x2b573f=new Uint8Array(_0x4ed3e5[_0x993830(0x109)]),_0x523966=new Uint8Array(0x21);return _0x523966['set'](_0x2b573f,0x1),_0x523966[0x0]=0x5,{'pubKey':(0x0,helpers_1[_0x993830(0x125)])(_0x523966),'privKey':_0x4ed3e5[_0x993830(0x121)]};}