@fullonlabs/interop-js 0.0.0-stage → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +119 -2
  3. package/lib/core/config.d.ts +8 -0
  4. package/lib/core/config.js +1 -0
  5. package/lib/core/httpClient.d.ts +10 -0
  6. package/lib/core/httpClient.js +1 -0
  7. package/lib/core/interopSigning.d.ts +5 -0
  8. package/lib/core/interopSigning.js +1 -0
  9. package/lib/core/multichainInteropConnector.d.ts +46 -0
  10. package/lib/core/multichainInteropConnector.js +1 -0
  11. package/lib/core/multichainInteropJs.d.ts +26 -0
  12. package/lib/core/multichainInteropJs.js +1 -0
  13. package/lib/core/strategies/arbitrumStrategy.d.ts +5 -0
  14. package/lib/core/strategies/arbitrumStrategy.js +1 -0
  15. package/lib/core/strategies/base.d.ts +4 -0
  16. package/lib/core/strategies/base.js +1 -0
  17. package/lib/core/strategies/baseStrategy.d.ts +5 -0
  18. package/lib/core/strategies/baseStrategy.js +1 -0
  19. package/lib/core/strategies/bscStrategy.d.ts +5 -0
  20. package/lib/core/strategies/bscStrategy.js +1 -0
  21. package/lib/core/strategies/chainStrategyFactory.d.ts +13 -0
  22. package/lib/core/strategies/chainStrategyFactory.js +1 -0
  23. package/lib/core/strategies/ethStrategy.d.ts +5 -0
  24. package/lib/core/strategies/ethStrategy.js +1 -0
  25. package/lib/core/strategies/solanaStrategy.d.ts +5 -0
  26. package/lib/core/strategies/solanaStrategy.js +1 -0
  27. package/lib/core/strategies/statterStrategy.d.ts +5 -0
  28. package/lib/core/strategies/statterStrategy.js +1 -0
  29. package/lib/core/strategies/tronStrategy.d.ts +5 -0
  30. package/lib/core/strategies/tronStrategy.js +1 -0
  31. package/lib/index.d.ts +3 -0
  32. package/lib/index.js +1 -0
  33. package/lib/types/index.d.ts +47 -0
  34. package/lib/types/index.js +1 -0
  35. package/lib/utils/helpers.d.ts +60 -0
  36. package/lib/utils/helpers.js +1 -0
  37. package/package.json +56 -5
package/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright © 2025 Greymass Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the “Software”), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT DESIGNED, LICENSED OR
25
+ INTENDED FOR USE IN THE DESIGN, CONSTRUCTION, OPERATION OR
26
+ MAINTENANCE OF ANY MILITARY FACILITY.
package/README.md CHANGED
@@ -1,3 +1,120 @@
1
- # Temporary Holding Version
1
+ # MultiChain Interoperability SDK
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+
4
+ A wallet-agnostic TypeScript SDK for FullOn Network interoperability with
5
+ Ethereum, BNB Smart Chain (BSC), Arbitrum, Solana, and Tron. Users can sign in
6
+ and authorize transactions with a compatible third-party self-custodial wallet.
7
+ Private keys stay in the wallet, and the SDK submits signed requests to FullOn
8
+ for execution.
9
+
10
+ ### Features
11
+ - 🌐 **Multi-chain support**: integrated EVM-compatible chains (ETH/BSC/Arbitrum) and non-EVM chains (Solana/Tron)
12
+ - 🔐 **Wallet connection**: support MetaMask/Phantom/TronLink and other mainstream wallets
13
+ - 📦 **Out-of-the-box**: encapsulate chain interaction logic to simplify DApp development
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install @fullonlabs/interop-js
19
+ # or
20
+ yarn add @fullonlabs/interop-js
21
+ ```
22
+
23
+ ## Currenly Supported Chain Types
24
+ - `Ethereum`
25
+ - `BSC`
26
+ - `Arbitrum`
27
+ - `Solana`
28
+ - `Tron`
29
+
30
+
31
+ ## FullOn interop relayer
32
+
33
+ Set `chainApi` to the FullOn RPC endpoint and `proxyApi` to the base URL of a
34
+ node or gateway exposing the interop plugin. The SDK supports both FullOn
35
+ mainnet and testnet. Both endpoints must point to the same network. Use
36
+ `https://m.flonscan.io` for both on mainnet or `https://t.flonscan.io` for both
37
+ on testnet.
38
+
39
+ Call `MultichainInteropJs.getRoutes()` to discover which binding and execution
40
+ operations the selected relayer enables. Wallet connectivity and relayer route
41
+ availability are independent. The SDK supports both `fullon-interop-v1` and
42
+ `fullon-interop-v2`.
43
+
44
+ The SDK prepares the request, checks the returned message against the target
45
+ network and exact action bytes, signs with the wallet, and submits the result.
46
+ `success:<transaction_id>` means the relayer accepted the transaction. Check
47
+ the chain for finality. Login returns `pending:<transaction_id>` when the
48
+ binding was accepted but its account is not visible yet.
49
+
50
+ The built-in signers cover the configured EVM personal signing routes, Tron,
51
+ Solana, and Statter. Supply `walletAdapters.btc` or `walletAdapters.ton` for
52
+ Bitcoin or TON binding. Each adapter implements `connect()` and
53
+ `sign(prepared)`, returning the ABI-formatted `signature` and the
54
+ `wallet_fields` reported by the relayer for that operation. BTC and TON
55
+ execution are unavailable with the current contract routes.
56
+
57
+ ## Wallet login example
58
+ ```js
59
+ import MultichainInteropJs, { AccountInfo, ChainType } from '@fullonlabs/interop-js';
60
+
61
+ // Initialize configuration (update chainApi URL when necessary)
62
+ MultichainInteropJs.setConfig({
63
+ chainApi: "https://m.flonscan.io",
64
+ proxyApi: "https://your-interop-relayer.example",
65
+ proxyContract: "interopproxy",
66
+ ownerContract:"interopowner",
67
+ defaultDelay: 3000,
68
+ });
69
+
70
+ // Ethereum Login
71
+ const ethLogin = async () => {
72
+ try {
73
+ const account: AccountInfo | string = await MultichainInteropJs.loginByChain('eth' as ChainType);
74
+ if(typeof account === 'string'){
75
+ console.log('errorMsg',account)
76
+ }else{
77
+ console.log('successObject',account)
78
+ }
79
+ } catch (error) {
80
+ console.error('Login failed:', error);
81
+ }
82
+ };
83
+
84
+ // Solana Login
85
+ const solanaLogin = async () => {
86
+ const account: AccountInfo | string = await MultichainInteropJs.loginByChain('solana' as ChainType);
87
+ if(typeof account === 'string'){
88
+ console.log('errorMsg',account)
89
+ }else{
90
+ console.log('Solana public key',account?.address)
91
+ }
92
+ };
93
+ ```
94
+
95
+
96
+ ## Submit transaction example
97
+
98
+ ```js
99
+ const sendTransaction = async () => {
100
+ const result = await MultichainInteropJs.transactByChain(
101
+ 'eth', // Chain Type
102
+ '0x123...4ow', // User address
103
+ [{ // Transaction parameters
104
+ contract: 'abc.contract', //update contract accordingly
105
+ action: 'transfer',
106
+ data: {
107
+ from: 'apl...eg',
108
+ to: 'apl...ee',
109
+ quantity: '1.0000 ETH'
110
+ }
111
+ }]
112
+ );
113
+
114
+ if (result.includes('success:')) {
115
+ console.log('Transaction confirmed!');
116
+ }else{
117
+ console.log('errorMsg',result)
118
+ }
119
+ };
120
+ ```
@@ -0,0 +1,8 @@
1
+ import { ApiConfig } from "../types";
2
+ declare class ConfigManager {
3
+ private static currentConfig;
4
+ static setConfig(config: Partial<ApiConfig>): void;
5
+ static get config(): Readonly<ApiConfig>;
6
+ private static validateConfig;
7
+ }
8
+ export default ConfigManager;
@@ -0,0 +1 @@
1
+ "use strict";const _0x3e6094=_0x18ed;(function(_0x45aba9,_0x53af51){const _0x52b55c=_0x18ed,_0x15b0dc=_0x45aba9();while(!![]){try{const _0x36a65c=parseInt(_0x52b55c(0x1a1))/0x1*(parseInt(_0x52b55c(0x199))/0x2)+parseInt(_0x52b55c(0x19a))/0x3+-parseInt(_0x52b55c(0x19b))/0x4+parseInt(_0x52b55c(0x197))/0x5*(parseInt(_0x52b55c(0x193))/0x6)+-parseInt(_0x52b55c(0x1a8))/0x7+-parseInt(_0x52b55c(0x198))/0x8+-parseInt(_0x52b55c(0x19d))/0x9;if(_0x36a65c===_0x53af51)break;else _0x15b0dc['push'](_0x15b0dc['shift']());}catch(_0x216242){_0x15b0dc['push'](_0x15b0dc['shift']());}}}(_0x48ec,0x4521f));function _0x48ec(){const _0x30e20d=['6284yiiPCP','271404tedyMb','585228xtHOhB','validateConfig','1918125GmCxui','setConfig','currentConfig','interopproxy','107BtKGlP','defaultDelay','chainApi','config','defineProperty','proxyApi','https://m.flonscan.io','1596805FkTWIE','assign','Invalid\x20CHAIN_API','default','Invalid\x20PROXY_API','1626612evKGYe','interopowner','__esModule','Invalid\x20DEFAULT_DELAY','10lhIssQ','785216mvFjQL'];_0x48ec=function(){return _0x30e20d;};return _0x48ec();}Object[_0x3e6094(0x1a5)](exports,_0x3e6094(0x195),{'value':!![]});const DEFAULT_CONFIG={'chainApi':_0x3e6094(0x1a7),'proxyApi':_0x3e6094(0x1a7),'proxyContract':_0x3e6094(0x1a0),'ownerContract':_0x3e6094(0x194),'defaultDelay':0xbb8};function _0x18ed(_0x345ebf,_0xa8612e){_0x345ebf=_0x345ebf-0x191;const _0x48ec0d=_0x48ec();let _0x18ed53=_0x48ec0d[_0x345ebf];return _0x18ed53;}class ConfigManager{static[_0x3e6094(0x19e)](_0x2ffd1b){const _0x211159=_0x3e6094,_0x5c3f14=Object[_0x211159(0x1a9)](Object[_0x211159(0x1a9)]({},this[_0x211159(0x19f)]),_0x2ffd1b);this[_0x211159(0x19c)](_0x5c3f14),this[_0x211159(0x19f)]=_0x5c3f14;}static get[_0x3e6094(0x1a4)](){const _0x2b639a=_0x3e6094;return Object[_0x2b639a(0x1a9)]({},this[_0x2b639a(0x19f)]);}static[_0x3e6094(0x19c)](_0x3e9c78){const _0x3c996d=_0x3e6094,_0x57882b=_0x18c950=>{try{return new URL(_0x18c950),!![];}catch(_0x2399b5){return![];}};if(!_0x57882b(_0x3e9c78[_0x3c996d(0x1a3)]))throw new Error(_0x3c996d(0x1aa));if(!_0x57882b(_0x3e9c78[_0x3c996d(0x1a6)]))throw new Error(_0x3c996d(0x192));if(_0x3e9c78[_0x3c996d(0x1a2)]<0x0)throw new Error(_0x3c996d(0x196));}}ConfigManager[_0x3e6094(0x19f)]=DEFAULT_CONFIG,exports[_0x3e6094(0x191)]=ConfigManager;
@@ -0,0 +1,10 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ declare class HttpClient {
3
+ private instance;
4
+ constructor(baseURL: string, timeout?: number);
5
+ get<T = any>(url: string, params?: any, config?: AxiosRequestConfig): Promise<T>;
6
+ post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
7
+ put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
8
+ delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
9
+ }
10
+ export default HttpClient;
@@ -0,0 +1 @@
1
+ "use strict";var _0x47454c=_0x3559;function _0x1e71(){var _0x1f63f8=['__importDefault','1226922KVApVi','4100831IqHrIB','41541WUhEYT','default','2891355jdngjR','68990XMHjRH','then','44PGirJS','put','defineProperty','instance','assign','application/json','delete','create','axios','3084150UctloF','data','post','23109600ehokIl','__esModule','get'];_0x1e71=function(){return _0x1f63f8;};return _0x1e71();}(function(_0x203428,_0x1de594){var _0x3f6b7e=_0x3559,_0x12fd1f=_0x203428();while(!![]){try{var _0x3d270b=-parseInt(_0x3f6b7e(0xba))/0x1+-parseInt(_0x3f6b7e(0xb5))/0x2+-parseInt(_0x3f6b7e(0xb7))/0x3*(parseInt(_0x3f6b7e(0xbc))/0x4)+-parseInt(_0x3f6b7e(0xb9))/0x5+-parseInt(_0x3f6b7e(0xc5))/0x6+-parseInt(_0x3f6b7e(0xb6))/0x7+parseInt(_0x3f6b7e(0xc8))/0x8;if(_0x3d270b===_0x1de594)break;else _0x12fd1f['push'](_0x12fd1f['shift']());}catch(_0x2b240e){_0x12fd1f['push'](_0x12fd1f['shift']());}}}(_0x1e71,0x5bbfb));var __importDefault=this&&this[_0x47454c(0xb4)]||function(_0xa751be){var _0x1a92a6=_0x47454c;return _0xa751be&&_0xa751be[_0x1a92a6(0xc9)]?_0xa751be:{'default':_0xa751be};};Object[_0x47454c(0xbe)](exports,_0x47454c(0xc9),{'value':!![]});const axios_1=__importDefault(require(_0x47454c(0xc4)));class HttpClient{constructor(_0x359290,_0x216066=0x2710){var _0x466786=_0x47454c;this[_0x466786(0xbf)]=axios_1[_0x466786(0xb8)][_0x466786(0xc3)]({'baseURL':_0x359290,'timeout':_0x216066,'headers':{'Content-Type':_0x466786(0xc1)}});}[_0x47454c(0xca)](_0xc4022,_0x1e18a8,_0x4a7c91){var _0x46f3a0=_0x47454c;return this[_0x46f3a0(0xbf)][_0x46f3a0(0xca)](_0xc4022,Object[_0x46f3a0(0xc0)]({'params':_0x1e18a8},_0x4a7c91))[_0x46f3a0(0xbb)](_0x1a6e77=>_0x1a6e77[_0x46f3a0(0xc6)]);}[_0x47454c(0xc7)](_0xbf6f11,_0x58d2a6,_0x7770d6){var _0x26a985=_0x47454c;return this[_0x26a985(0xbf)][_0x26a985(0xc7)](_0xbf6f11,_0x58d2a6,_0x7770d6)[_0x26a985(0xbb)](_0xd07c06=>_0xd07c06[_0x26a985(0xc6)]);}[_0x47454c(0xbd)](_0x18fb07,_0x2f5e49,_0x27e1e2){var _0x5e9b27=_0x47454c;return this[_0x5e9b27(0xbf)][_0x5e9b27(0xbd)](_0x18fb07,_0x2f5e49,_0x27e1e2)[_0x5e9b27(0xbb)](_0x1a2c7b=>_0x1a2c7b[_0x5e9b27(0xc6)]);}[_0x47454c(0xc2)](_0x483267,_0x1a7df9){var _0x189b4f=_0x47454c;return this[_0x189b4f(0xbf)][_0x189b4f(0xc2)](_0x483267,_0x1a7df9)[_0x189b4f(0xbb)](_0x2fcd75=>_0x2fcd75[_0x189b4f(0xc6)]);}}function _0x3559(_0x30af28,_0x103dd1){_0x30af28=_0x30af28-0xb4;var _0x1e7172=_0x1e71();var _0x35593c=_0x1e7172[_0x30af28];return _0x35593c;}exports[_0x47454c(0xb8)]=HttpClient;
@@ -0,0 +1,5 @@
1
+ import { InteropPrepared, InteropWalletSignature } from "../types";
2
+ export declare function normalizeHex(hex: string, length?: number): string;
3
+ export declare function isSupportedProtocol(protocol: string): boolean;
4
+ export declare function checkPreparedMessage(prepared: InteropPrepared): void;
5
+ export declare function formatWalletSignature(prepared: InteropPrepared, signed: any): InteropWalletSignature;
@@ -0,0 +1 @@
1
+ "use strict";const _0x363d88=_0xa498;(function(_0x52b4b5,_0x2ead1e){const _0x102af3=_0xa498,_0x45a2a8=_0x52b4b5();while(!![]){try{const _0x483cb9=-parseInt(_0x102af3(0x124))/0x1*(parseInt(_0x102af3(0x132))/0x2)+parseInt(_0x102af3(0xfe))/0x3+-parseInt(_0x102af3(0x122))/0x4+parseInt(_0x102af3(0x138))/0x5*(parseInt(_0x102af3(0x11d))/0x6)+parseInt(_0x102af3(0x12c))/0x7+-parseInt(_0x102af3(0x135))/0x8*(parseInt(_0x102af3(0xfd))/0x9)+parseInt(_0x102af3(0x130))/0xa*(-parseInt(_0x102af3(0x121))/0xb);if(_0x483cb9===_0x2ead1e)break;else _0x45a2a8['push'](_0x45a2a8['shift']());}catch(_0x4de1ce){_0x45a2a8['push'](_0x45a2a8['shift']());}}}(_0x19f1,0xebc14));Object[_0x363d88(0xea)](exports,_0x363d88(0xeb),{'value':!![]}),exports[_0x363d88(0x118)]=exports[_0x363d88(0xe4)]=exports[_0x363d88(0x123)]=exports[_0x363d88(0x109)]=void 0x0;const antelope_1=require(_0x363d88(0xe1)),ethers_1=require(_0x363d88(0x10e));function _0x19f1(){const _0x28f6c8=['9747DkzJxR','4873212YSEDbD','fullon-interop-v2','toLowerCase','test','solana_sign_message','tron_signed_message','computePublicKey','operation','nonce','\x20Signed\x20Message:\x0a','action','normalizeHex','computeAddress','Name','string','sha256','ethers','This\x20wallet\x20signing\x20scheme\x20needs\x20a\x20configured\x20adapter','owner_contract','yParity','expires_at','wallet_signing','now','txns','signing_message','bind','formatWalletSignature','length','writeVaruint32','Ethereum','chain_id','30Kiwzut','hexlify','toString','signing_protocol','187joJbud','1640144KUDbSG','isSupportedProtocol','1702vrudHa','Signature','writeString','statter_rsa_md5','account','source','l1_pubkey','TRON','4723271SiuCZV','keccak256','from','0x41','142370rJajtP','eth_personal','2kpWchH','data','submit_args','5528DlowGu','binding_id','sign','68615wIZqkY','publicKey','toUtf8Bytes','address','@wharfkit/antelope','writeArray','fullon-interop-v1','checkPreparedMessage','getData','encodeBase58','slice','ABIEncoder','recoverPublicKey','defineProperty','__esModule','l2_pubkey','replace','isInteger','UInt32','concat','getBytes','UInt64','proxy_contract','Wallet\x20signature\x20does\x20not\x20match\x20the\x20requested\x20address','toABI','Invalid\x20interop\x20hex\x20value','FullOn\x20Interop\x20','PublicKey','contract','SigningKey','Unsupported\x20or\x20expired\x20interop\x20signing\x20request','Interop\x20signing\x20message\x20does\x20not\x20match\x20the\x20prepared\x20action'];_0x19f1=function(){return _0x28f6c8;};return _0x19f1();}function bytes(_0x5e7b43,_0x24ad18){const _0x4c125a=_0x363d88;if(typeof _0x5e7b43!==_0x4c125a(0x10c)||!/^(?:[a-fA-F0-9]{2})*$/[_0x4c125a(0x101)](_0x5e7b43)||_0x24ad18!==undefined&&_0x5e7b43[_0x4c125a(0x119)]!==_0x24ad18*0x2)throw new Error(_0x4c125a(0xf6));return ethers_1[_0x4c125a(0x10e)][_0x4c125a(0xf1)]('0x'+_0x5e7b43);}function normalizeHex(_0x1bd3c1,_0x56ba65){const _0xd780ff=_0x363d88,_0x87f9dd=typeof _0x1bd3c1===_0xd780ff(0x10c)?_0x1bd3c1[_0xd780ff(0xed)](/^0x/i,''):_0x1bd3c1;return bytes(_0x87f9dd,_0x56ba65),_0x87f9dd[_0xd780ff(0x100)]();}function _0xa498(_0x27cec6,_0x2585ac){_0x27cec6=_0x27cec6-0xe0;const _0x19f1c0=_0x19f1();let _0xa49887=_0x19f1c0[_0x27cec6];return _0xa49887;}exports[_0x363d88(0x109)]=normalizeHex;function isSupportedProtocol(_0x3c364d){const _0x2ca39b=_0x363d88;return _0x3c364d===_0x2ca39b(0xe3)||_0x3c364d===_0x2ca39b(0xff);}exports[_0x363d88(0x123)]=isSupportedProtocol;function checkPreparedMessage(_0x2b0de3){const _0x4d4c0a=_0x363d88,_0x3d04ce=_0x2b0de3[_0x4d4c0a(0x134)];if(!isSupportedProtocol(_0x2b0de3[_0x4d4c0a(0x120)])||_0x3d04ce[_0x4d4c0a(0x112)]!==_0x2b0de3[_0x4d4c0a(0x112)]||!Number[_0x4d4c0a(0xee)](_0x3d04ce[_0x4d4c0a(0x112)])||_0x3d04ce[_0x4d4c0a(0x112)]>0xffffffff||_0x3d04ce[_0x4d4c0a(0x112)]<=Date[_0x4d4c0a(0x114)]()/0x3e8)throw new Error(_0x4d4c0a(0xfb));const _0x12bd96=new antelope_1[(_0x4d4c0a(0xe8))]();_0x12bd96[_0x4d4c0a(0xe2)](bytes(_0x2b0de3[_0x4d4c0a(0x11c)],0x20));for(const _0x76ad04 of[_0x2b0de3[_0x4d4c0a(0xf3)],_0x2b0de3[_0x4d4c0a(0x110)],_0x3d04ce[_0x4d4c0a(0x105)],_0x3d04ce[_0x4d4c0a(0x129)],_0x3d04ce[_0x4d4c0a(0x128)]]){antelope_1[_0x4d4c0a(0x10b)][_0x4d4c0a(0x12e)](_0x76ad04)[_0x4d4c0a(0xf5)](_0x12bd96);}_0x12bd96[_0x4d4c0a(0x126)](_0x3d04ce[_0x4d4c0a(0xe0)]),antelope_1[_0x4d4c0a(0xef)][_0x4d4c0a(0x12e)](_0x3d04ce[_0x4d4c0a(0x112)])[_0x4d4c0a(0xf5)](_0x12bd96);const _0x41a277=_0x3d04ce[_0x4d4c0a(0x105)]===_0x4d4c0a(0x117);_0x12bd96[_0x4d4c0a(0xe2)](_0x41a277?new Uint8Array(0x20):bytes(_0x3d04ce[_0x4d4c0a(0x136)],0x20)),antelope_1[_0x4d4c0a(0xf2)][_0x4d4c0a(0x12e)](_0x41a277?'0':_0x3d04ce[_0x4d4c0a(0x106)])[_0x4d4c0a(0xf5)](_0x12bd96);const _0x58484a=_0x41a277?[]:_0x3d04ce[_0x4d4c0a(0x115)];_0x12bd96[_0x4d4c0a(0x11a)](_0x58484a[_0x4d4c0a(0x119)]);for(const _0x542fa9 of _0x58484a){antelope_1[_0x4d4c0a(0x10b)][_0x4d4c0a(0x12e)](_0x542fa9[_0x4d4c0a(0xf9)])[_0x4d4c0a(0xf5)](_0x12bd96),antelope_1[_0x4d4c0a(0x10b)][_0x4d4c0a(0x12e)](_0x542fa9[_0x4d4c0a(0x108)])[_0x4d4c0a(0xf5)](_0x12bd96);const _0x3c322a=bytes(_0x542fa9[_0x4d4c0a(0x133)]);_0x12bd96[_0x4d4c0a(0x11a)](_0x3c322a[_0x4d4c0a(0x119)]),_0x12bd96[_0x4d4c0a(0xe2)](_0x3c322a);}const _0x1587e4=_0x4d4c0a(0xf7)+_0x2b0de3[_0x4d4c0a(0x120)][_0x4d4c0a(0xe7)](-0x2)+':'+ethers_1[_0x4d4c0a(0x10e)][_0x4d4c0a(0x11e)](_0x12bd96[_0x4d4c0a(0xe5)]())[_0x4d4c0a(0xe7)](0x2);if(_0x1587e4!==_0x2b0de3[_0x4d4c0a(0x116)])throw new Error(_0x4d4c0a(0xfc));}exports[_0x363d88(0xe4)]=checkPreparedMessage;function formatWalletSignature(_0x5b79cc,_0x234b5b){const _0xaeea6=_0x363d88,_0x337023=_0x5b79cc[_0xaeea6(0x134)][_0xaeea6(0x105)]===_0xaeea6(0x117);if(_0x5b79cc[_0xaeea6(0x113)]===_0xaeea6(0x102))return{'signature':normalizeHex(_0x234b5b,0x40)};if(_0x5b79cc[_0xaeea6(0x113)]===_0xaeea6(0x127))return{'signature':normalizeHex(_0x234b5b[_0xaeea6(0x137)],0x80),'wallet_fields':_0x337023?{'l1_pubkey':normalizeHex(_0x234b5b[_0xaeea6(0x139)])}:{}};const _0x368947=_0x5b79cc[_0xaeea6(0x113)]===_0xaeea6(0x103);if(!_0x368947&&_0x5b79cc[_0xaeea6(0x113)]!==_0xaeea6(0x131))throw new Error(_0xaeea6(0x10f));const _0x27293d=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x13a)](_0x5b79cc[_0xaeea6(0x116)]),_0x88c711=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x13a)]('\x19'+(_0x368947?_0xaeea6(0x12b):_0xaeea6(0x11b))+_0xaeea6(0x107)+_0x27293d[_0xaeea6(0x119)]),_0x2fa174=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x12d)](ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xf0)]([_0x88c711,_0x27293d])),_0x38bd16=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x125)][_0xaeea6(0x12e)](_0x234b5b),_0x85ee2d=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xfa)][_0xaeea6(0xe9)](_0x2fa174,_0x38bd16),_0x54f8b3=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x10a)](_0x85ee2d)[_0xaeea6(0x100)](),_0x358e23=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xf0)]([_0xaeea6(0x12f),_0x54f8b3]),_0x27d770=()=>ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xf1)](ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x10d)](ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x10d)](_0x358e23)))[_0xaeea6(0xe7)](0x0,0x4),_0x106d4c=_0x368947?ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xe6)](ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xf0)]([_0x358e23,_0x27d770()])):_0x54f8b3;if(_0x106d4c!==_0x5b79cc[_0xaeea6(0x134)][_0xaeea6(0xe0)])throw new Error(_0xaeea6(0xf4));const _0x106829={'msg_header':ethers_1[_0xaeea6(0x10e)][_0xaeea6(0x11e)](_0x88c711)[_0xaeea6(0xe7)](0x2)};if(_0x337023){const _0x1be688=ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xfa)][_0xaeea6(0x104)](_0x85ee2d,!![]);_0x106829[_0xaeea6(0x12a)]=_0x85ee2d[_0xaeea6(0xe7)](0x4),_0x106829[_0xaeea6(0xec)]=antelope_1[_0xaeea6(0xf8)][_0xaeea6(0x12e)]({'type':'K1','compressed':ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xf1)](_0x1be688)})[_0xaeea6(0x11f)]();}return{'signature':antelope_1[_0xaeea6(0x125)][_0xaeea6(0x12e)]({'type':'K1','r':ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xf1)](_0x38bd16['r']),'s':ethers_1[_0xaeea6(0x10e)][_0xaeea6(0xf1)](_0x38bd16['s']),'recid':_0x38bd16[_0xaeea6(0x111)]})[_0xaeea6(0x11f)](),'wallet_fields':_0x106829};}exports[_0x363d88(0x118)]=formatWalletSignature;
@@ -0,0 +1,46 @@
1
+ declare class MultichainInteropConnector {
2
+ /**
3
+ * connect Ethereum Wallet
4
+ */
5
+ static connectEthereum(): Promise<any>;
6
+ /**
7
+ * Ethereum Signature
8
+ * @param message Message to be signed
9
+ */
10
+ static signMessageEthereum(message: string): Promise<any>;
11
+ static connectBSC(): Promise<any>;
12
+ static signMessageBSC(message: string): Promise<string>;
13
+ static connectArbitrum(): Promise<any>;
14
+ static signMessageArbitrum(message: string): Promise<string>;
15
+ static connectBase(): Promise<any>;
16
+ static signMessageBase(message: string): Promise<string>;
17
+ /**
18
+ * connect Solana wallet
19
+ */
20
+ static connectSolana(): Promise<string>;
21
+ /**
22
+ * connect web Solana wallet
23
+ */
24
+ static connectWebSolana(): Promise<string>;
25
+ /**
26
+ * Solana signature
27
+ */
28
+ static signMessageSolana(message: string): Promise<string>;
29
+ /**
30
+ * connect TRON wallet
31
+ */
32
+ static connectTron(): Promise<any>;
33
+ /**
34
+ * TRON signature
35
+ */
36
+ static signMessageTron(message: string): Promise<string>;
37
+ /**
38
+ * connect Statter wallet
39
+ */
40
+ static connectStatter(): Promise<any>;
41
+ /**
42
+ * Statter signature
43
+ */
44
+ static signMessageStatter(message: string): Promise<string>;
45
+ }
46
+ export default MultichainInteropConnector;
@@ -0,0 +1 @@
1
+ "use strict";const _0x145f2d=_0x3a6b;(function(_0x3919d2,_0x28df0c){const _0x59c9eb=_0x3a6b,_0x4c6f14=_0x3919d2();while(!![]){try{const _0x3df523=-parseInt(_0x59c9eb(0x1a7))/0x1*(parseInt(_0x59c9eb(0x1a3))/0x2)+parseInt(_0x59c9eb(0x1d3))/0x3*(-parseInt(_0x59c9eb(0x1e7))/0x4)+-parseInt(_0x59c9eb(0x19e))/0x5+-parseInt(_0x59c9eb(0x1dd))/0x6*(parseInt(_0x59c9eb(0x1ed))/0x7)+-parseInt(_0x59c9eb(0x1a4))/0x8+-parseInt(_0x59c9eb(0x1b6))/0x9+parseInt(_0x59c9eb(0x1a5))/0xa;if(_0x3df523===_0x28df0c)break;else _0x4c6f14['push'](_0x4c6f14['shift']());}catch(_0x5cbeeb){_0x4c6f14['push'](_0x4c6f14['shift']());}}}(_0x26c6,0x1ab56));var __awaiter=this&&this[_0x145f2d(0x1d9)]||function(_0x13d148,_0x148246,_0x197c3b,_0x1e29bc){function _0x10369(_0x36b212){return _0x36b212 instanceof _0x197c3b?_0x36b212:new _0x197c3b(function(_0x4f7274){_0x4f7274(_0x36b212);});}return new(_0x197c3b||(_0x197c3b=Promise))(function(_0x36301b,_0x363c0c){const _0x42be95=_0x3a6b;function _0x5aa908(_0x31ce8f){const _0x843d41=_0x3a6b;try{_0x5c9b8f(_0x1e29bc[_0x843d41(0x1c9)](_0x31ce8f));}catch(_0x3f406d){_0x363c0c(_0x3f406d);}}function _0x22a73d(_0x9878a7){const _0x4508d6=_0x3a6b;try{_0x5c9b8f(_0x1e29bc[_0x4508d6(0x1f9)](_0x9878a7));}catch(_0x1cc7a7){_0x363c0c(_0x1cc7a7);}}function _0x5c9b8f(_0x47d80a){const _0xc0b395=_0x3a6b;_0x47d80a[_0xc0b395(0x1db)]?_0x36301b(_0x47d80a[_0xc0b395(0x1c4)]):_0x10369(_0x47d80a[_0xc0b395(0x1c4)])[_0xc0b395(0x1ab)](_0x5aa908,_0x22a73d);}_0x5c9b8f((_0x1e29bc=_0x1e29bc[_0x42be95(0x1da)](_0x13d148,_0x148246||[]))[_0x42be95(0x1c9)]());});};Object[_0x145f2d(0x1cc)](exports,_0x145f2d(0x1aa),{'value':!![]});const ethers_1=require(_0x145f2d(0x1ea)),helpers_1=require(_0x145f2d(0x1b9));function _0x3a6b(_0x5babcc,_0x26091b){_0x5babcc=_0x5babcc-0x19c;const _0x26c61f=_0x26c6();let _0x3a6b57=_0x26c61f[_0x5babcc];return _0x3a6b57;}class MultichainInteropConnector{static[_0x145f2d(0x1c8)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1239ea=_0x3a6b;try{if(!window[_0x1239ea(0x1fc)])throw new helpers_1[(_0x1239ea(0x1b0))](_0x1239ea(0x1c2));const _0x1592e1=new ethers_1[(_0x1239ea(0x1c6))](window[_0x1239ea(0x1fc)]),{chainId:_0x140d41}=yield _0x1592e1[_0x1239ea(0x1c5)]();_0x140d41[_0x1239ea(0x1ee)]()!=='1'&&(yield window[_0x1239ea(0x1fc)][_0x1239ea(0x1c7)]({'method':_0x1239ea(0x1d1),'params':[{'chainId':_0x1239ea(0x1e4)}]}));const _0xf4b126=yield _0x1592e1[_0x1239ea(0x1f0)](_0x1239ea(0x1b8),[]);return _0xf4b126[0x0]||null;}catch(_0x4e1650){throw _0x1239ea(0x1be)[_0x1239ea(0x19c)](_0x4e1650[_0x1239ea(0x1bd)]);}});}static[_0x145f2d(0x1d0)](_0x2092e3){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1a8183=_0x3a6b;try{if(!window[_0x1a8183(0x1fc)])throw new helpers_1[(_0x1a8183(0x1b0))](_0x1a8183(0x1c2));const _0x39d0be=new ethers_1[(_0x1a8183(0x1c6))](window[_0x1a8183(0x1fc)],0x1),_0x30ef16=yield _0x39d0be[_0x1a8183(0x1d5)]();return _0x30ef16[_0x1a8183(0x1b1)](_0x2092e3);}catch(_0x75dccf){throw _0x1a8183(0x1b5)[_0x1a8183(0x19c)](_0x75dccf[_0x1a8183(0x1bd)]);}});}static[_0x145f2d(0x1e1)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1c9f3e=_0x3a6b;try{if(!window[_0x1c9f3e(0x1fc)])throw new helpers_1[(_0x1c9f3e(0x1b0))](_0x1c9f3e(0x1f1));const _0x3f52f4=new ethers_1[(_0x1c9f3e(0x1c6))](window[_0x1c9f3e(0x1fc)]),{chainId:_0xead57d}=yield _0x3f52f4[_0x1c9f3e(0x1c5)]();_0xead57d[_0x1c9f3e(0x1ee)]()!=='56'&&(yield window[_0x1c9f3e(0x1fc)][_0x1c9f3e(0x1c7)]({'method':_0x1c9f3e(0x1d1),'params':[{'chainId':_0x1c9f3e(0x1a8)}]}));const _0x5563c0=yield _0x3f52f4[_0x1c9f3e(0x1f0)](_0x1c9f3e(0x1b8),[]);return _0x5563c0[0x0]||null;}catch(_0x535646){throw _0x1c9f3e(0x1a1)[_0x1c9f3e(0x19c)](_0x535646[_0x1c9f3e(0x1bd)]);}});}static[_0x145f2d(0x1f5)](_0x37635c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4f8cba=_0x3a6b;try{if(!window[_0x4f8cba(0x1fc)])throw new helpers_1[(_0x4f8cba(0x1b0))](_0x4f8cba(0x1f1));const _0x10aa1b=new ethers_1[(_0x4f8cba(0x1c6))](window[_0x4f8cba(0x1fc)],0x38),_0x2f0c19=yield _0x10aa1b[_0x4f8cba(0x1d5)]();return _0x2f0c19[_0x4f8cba(0x1b1)](_0x37635c);}catch(_0x81cd1d){throw _0x4f8cba(0x1ce)[_0x4f8cba(0x19c)](_0x81cd1d[_0x4f8cba(0x1bd)]);}});}static[_0x145f2d(0x202)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x18a622=_0x3a6b;try{if(!window[_0x18a622(0x1fc)])throw new helpers_1[(_0x18a622(0x1b0))](_0x18a622(0x1fd));const _0x1096ac=new ethers_1[(_0x18a622(0x1c6))](window[_0x18a622(0x1fc)]),{chainId:_0x2057f2}=yield _0x1096ac[_0x18a622(0x1c5)]();if(_0x2057f2[_0x18a622(0x1ee)]()!==_0x18a622(0x1e6))try{yield window[_0x18a622(0x1fc)][_0x18a622(0x1c7)]({'method':_0x18a622(0x1d1),'params':[{'chainId':_0x18a622(0x1e3)}]});}catch(_0x2c1caa){_0x2c1caa[_0x18a622(0x1f3)]===0xa4b1&&(yield window[_0x18a622(0x1fc)][_0x18a622(0x1c7)]({'method':_0x18a622(0x1fa),'params':[{'chainId':_0x18a622(0x1bc),'chainName':_0x18a622(0x1af),'nativeCurrency':{'name':_0x18a622(0x1fb),'symbol':_0x18a622(0x1fb),'decimals':0x12},'rpcUrls':[_0x18a622(0x1ef)],'blockExplorerUrls':[_0x18a622(0x1de)]}]}));}const _0x32dc30=yield _0x1096ac[_0x18a622(0x1f0)](_0x18a622(0x1b8),[]);return _0x32dc30[0x0]||null;}catch(_0x2a7371){throw _0x18a622(0x1b7)[_0x18a622(0x19c)](_0x2a7371[_0x18a622(0x1bd)]);}});}static[_0x145f2d(0x1cd)](_0x120ed0){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x571313=_0x3a6b;try{if(!window[_0x571313(0x1fc)])throw new helpers_1[(_0x571313(0x1b0))](_0x571313(0x1fd));const _0x424898=new ethers_1[(_0x571313(0x1c6))](window[_0x571313(0x1fc)],0xa4b1),_0x3c54f5=yield _0x424898[_0x571313(0x1d5)]();return _0x3c54f5[_0x571313(0x1b1)](_0x120ed0);}catch(_0x947bc7){throw _0x571313(0x1e9)[_0x571313(0x19c)](_0x947bc7[_0x571313(0x1bd)]);}});}static[_0x145f2d(0x1ff)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2b7d95=_0x3a6b;try{if(!window[_0x2b7d95(0x1fc)])throw new helpers_1[(_0x2b7d95(0x1b0))](_0x2b7d95(0x1f8));const _0x1a0254=new ethers_1[(_0x2b7d95(0x1c6))](window[_0x2b7d95(0x1fc)]),{chainId:_0x368432}=yield _0x1a0254[_0x2b7d95(0x1c5)]();if(_0x368432[_0x2b7d95(0x1ee)]()!==_0x2b7d95(0x1d6))try{yield window[_0x2b7d95(0x1fc)][_0x2b7d95(0x1c7)]({'method':_0x2b7d95(0x1d1),'params':[{'chainId':_0x2b7d95(0x1cb)}]});}catch(_0x35b035){_0x35b035[_0x2b7d95(0x1f3)]===0x2105&&(yield window[_0x2b7d95(0x1fc)][_0x2b7d95(0x1c7)]({'method':_0x2b7d95(0x1fa),'params':[{'chainId':_0x2b7d95(0x1cb),'chainName':_0x2b7d95(0x1bb),'nativeCurrency':{'name':_0x2b7d95(0x1fb),'symbol':_0x2b7d95(0x1fb),'decimals':0x12},'rpcUrls':[_0x2b7d95(0x1f7)],'blockExplorerUrls':[_0x2b7d95(0x1ae)]}]}));}const _0x5aeff2=yield _0x1a0254[_0x2b7d95(0x1f0)](_0x2b7d95(0x1b8),[]);return _0x5aeff2[0x0]||null;}catch(_0x1af6e4){throw _0x2b7d95(0x1cf)[_0x2b7d95(0x19c)](_0x1af6e4[_0x2b7d95(0x1bd)]);}});}static[_0x145f2d(0x1fe)](_0x4ad2f3){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5b47cc=_0x3a6b;try{if(!window[_0x5b47cc(0x1fc)])throw new helpers_1[(_0x5b47cc(0x1b0))](_0x5b47cc(0x1f8));const _0xdac36c=new ethers_1[(_0x5b47cc(0x1c6))](window[_0x5b47cc(0x1fc)],0x2105),_0x3a80f5=yield _0xdac36c[_0x5b47cc(0x1d5)]();return _0x3a80f5[_0x5b47cc(0x1b1)](_0x4ad2f3);}catch(_0x441769){throw _0x5b47cc(0x19d)[_0x5b47cc(0x19c)](_0x441769[_0x5b47cc(0x1bd)]);}});}static[_0x145f2d(0x1b3)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3186c0=_0x3a6b;try{if(!window[_0x3186c0(0x1ad)])throw new helpers_1[(_0x3186c0(0x1b0))](_0x3186c0(0x201));const _0x23d5d8=yield window[_0x3186c0(0x1ad)][_0x3186c0(0x1b2)]();return _0x23d5d8[_0x3186c0(0x1f4)]?_0x23d5d8[_0x3186c0(0x1f4)][_0x3186c0(0x1ee)]():window[_0x3186c0(0x1ad)][_0x3186c0(0x1f4)][_0x3186c0(0x1ee)]();}catch(_0x3653ed){throw _0x3186c0(0x1d4)[_0x3186c0(0x19c)](_0x3653ed[_0x3186c0(0x1bd)]);}});}static[_0x145f2d(0x1ba)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5a1c12=_0x3a6b;try{if(!window[_0x5a1c12(0x1ad)])throw new helpers_1[(_0x5a1c12(0x1b0))](_0x5a1c12(0x201));const _0x2361b2=yield window[_0x5a1c12(0x1ad)][_0x5a1c12(0x1b2)]();return _0x2361b2[_0x5a1c12(0x1f4)][_0x5a1c12(0x1ee)]();}catch(_0x3f6067){throw _0x5a1c12(0x1d4)[_0x5a1c12(0x19c)](_0x3f6067[_0x5a1c12(0x1bd)]);}});}static[_0x145f2d(0x1a9)](_0x4e32d5){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1d60a0=_0x3a6b;try{if(!window[_0x1d60a0(0x1ad)])throw new helpers_1[(_0x1d60a0(0x1b0))](_0x1d60a0(0x201));const _0xc50133=new TextEncoder()[_0x1d60a0(0x1df)](_0x4e32d5),{signature:_0x4c187f}=yield window[_0x1d60a0(0x1ad)][_0x1d60a0(0x1b1)](_0xc50133,_0x1d60a0(0x1b4)),_0x20b43e=(0x0,ethers_1[_0x1d60a0(0x1f2)])(Uint8Array[_0x1d60a0(0x1d2)](_0x4c187f))[_0x1d60a0(0x19f)](0x2)[_0x1d60a0(0x1d8)]();return _0x20b43e;}catch(_0x50b06b){throw _0x1d60a0(0x1ac)[_0x1d60a0(0x19c)](_0x50b06b[_0x1d60a0(0x1bd)]);}});}static[_0x145f2d(0x1bf)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4515b0=_0x3a6b;try{if(!window[_0x4515b0(0x1ca)])throw new helpers_1[(_0x4515b0(0x1b0))](_0x4515b0(0x1a2));const _0x1a2cf5=window[_0x4515b0(0x1ca)][_0x4515b0(0x1e2)][_0x4515b0(0x1d7)];return _0x1a2cf5;}catch(_0x571177){throw _0x4515b0(0x1a6)[_0x4515b0(0x19c)](_0x571177[_0x4515b0(0x1bd)]);}});}static[_0x145f2d(0x1c1)](_0x17da6c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x3b8122=_0x3a6b;try{if(!window[_0x3b8122(0x1ca)])throw new helpers_1[(_0x3b8122(0x1b0))](_0x3b8122(0x1a2));const _0x4c23a9=yield window[_0x3b8122(0x1ca)][_0x3b8122(0x1eb)][_0x3b8122(0x1e5)](_0x17da6c);return _0x4c23a9;}catch(_0x42f5be){throw _0x3b8122(0x1a0)[_0x3b8122(0x19c)](_0x42f5be[_0x3b8122(0x1bd)]);}});}static[_0x145f2d(0x200)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2c7bad=_0x3a6b;try{if(!window[_0x2c7bad(0x1c3)])throw new helpers_1[(_0x2c7bad(0x1b0))](_0x2c7bad(0x1ec));const _0x40588b=yield window[_0x2c7bad(0x1c3)][_0x2c7bad(0x1f6)]();return _0x40588b;}catch(_0x3cfd75){throw _0x2c7bad(0x1c0)[_0x2c7bad(0x19c)](_0x3cfd75[_0x2c7bad(0x1bd)]);}});}static[_0x145f2d(0x1e8)](_0x1b6907){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x205907=_0x3a6b;try{if(!window[_0x205907(0x1c3)])throw new helpers_1[(_0x205907(0x1b0))](_0x205907(0x1ec));const _0xbe6c60=yield window[_0x205907(0x1c3)][_0x205907(0x1b1)](_0x1b6907);return _0xbe6c60;}catch(_0x58c590){throw _0x205907(0x1e0)[_0x205907(0x19c)](_0x58c590[_0x205907(0x1bd)]);}});}}exports[_0x145f2d(0x1dc)]=MultichainInteropConnector;function _0x26c6(){const _0x3e9dff=['Ethereum\x20signing\x20failed:\x20','1929573AlqPhz','Arbitrum\x20connection\x20failed:\x20','eth_requestAccounts','../utils/helpers','connectWebSolana','Base\x20Mainnet','0xA4B1','message','Ethereum\x20connection\x20failed:\x20','connectTron','Statter\x20connection\x20failed:\x20','signMessageTron','Ethereum\x20wallet\x20not\x20found','statter','value','getNetwork','BrowserProvider','request','connectEthereum','next','tronWeb','0x2105','defineProperty','signMessageArbitrum','Bsc\x20signing\x20failed:\x20','Base\x20connection\x20failed:\x20','signMessageEthereum','wallet_switchEthereumChain','from','132vRQpIU','Solana\x20connection\x20failed:\x20','getSigner','8453','base58','toUpperCase','__awaiter','apply','done','default','60780YAElDp','https://arbiscan.io','encode','Statter\x20signing\x20failed:\x20','connectBSC','defaultAddress','0xa4b1','0x1','signMessageV2','42161','3132mPpKwL','signMessageStatter','Arbitrum\x20signing\x20failed:\x20','ethers','trx','Statter\x20wallet\x20not\x20ready','70pjaWJx','toString','https://arbitrum.llamarpc.com','send','Bsc\x20wallet\x20not\x20found','hexlify','code','publicKey','signMessageBSC','getWalletSTT','https://base.llamarpc.com','Base\x20wallet\x20not\x20found','throw','wallet_addEthereumChain','ETH','ethereum','Arbitrum\x20wallet\x20not\x20found','signMessageBase','connectBase','connectStatter','Solana\x20wallet\x20not\x20found','connectArbitrum','concat','Base\x20signing\x20failed:\x20','695485NfmwzB','slice','Tron\x20signing\x20failed:\x20','Bsc\x20connection\x20failed:\x20','Tron\x20wallet\x20not\x20ready','204fLRnwb','1427952YAAkHW','9210600VPxlsM','Tron\x20connection\x20failed:\x20','1411shOezB','0x38','signMessageSolana','__esModule','then','Solana\x20signing\x20failed:\x20','solana','https://basescan.org','Arbitrum\x20LlamaNodes','BlockchainError','signMessage','connect','connectSolana','utf8'];_0x26c6=function(){return _0x3e9dff;};return _0x26c6();}
@@ -0,0 +1,26 @@
1
+ import { AccountInfo, ApiConfig, ChainType, InteropPrepared } from "../types";
2
+ type Route = {
3
+ wallet_signing: string;
4
+ bind: {
5
+ wallet_fields: string[];
6
+ } | null;
7
+ execute: {
8
+ wallet_fields: string[];
9
+ } | null;
10
+ };
11
+ type Routes = Pick<InteropPrepared, "chain_id" | "proxy_contract" | "owner_contract" | "signing_protocol"> & {
12
+ routes: Record<string, Route>;
13
+ };
14
+ declare class multichainInteropJs {
15
+ static setConfig(config: Partial<ApiConfig>): void;
16
+ static getRoutes(): Promise<Routes>;
17
+ static loginByChain(chain: ChainType): Promise<AccountInfo | string>;
18
+ static transactByChain(chain: ChainType, address: string, transactions: any[]): Promise<string>;
19
+ static signTransaction(chain: ChainType, message: string): Promise<any>;
20
+ private static normalizeAddress;
21
+ private static relay;
22
+ private static getAccount;
23
+ private static errorToString;
24
+ static sleep: (time: number) => Promise<unknown>;
25
+ }
26
+ export default multichainInteropJs;
@@ -0,0 +1 @@
1
+ "use strict";const _0x5eae14=_0x2ddb;(function(_0x29ce2a,_0x2de2bd){const _0x54748d=_0x2ddb,_0x496035=_0x29ce2a();while(!![]){try{const _0x539f5c=-parseInt(_0x54748d(0x6d))/0x1+-parseInt(_0x54748d(0xa7))/0x2*(parseInt(_0x54748d(0x96))/0x3)+-parseInt(_0x54748d(0xa0))/0x4*(parseInt(_0x54748d(0x9e))/0x5)+-parseInt(_0x54748d(0xae))/0x6+-parseInt(_0x54748d(0xc7))/0x7*(-parseInt(_0x54748d(0xb0))/0x8)+-parseInt(_0x54748d(0xc5))/0x9*(parseInt(_0x54748d(0x95))/0xa)+parseInt(_0x54748d(0xb7))/0xb;if(_0x539f5c===_0x2de2bd)break;else _0x496035['push'](_0x496035['shift']());}catch(_0x2f07da){_0x496035['push'](_0x496035['shift']());}}}(_0x5a48,0x1a9c3));function _0x2ddb(_0x30e6e0,_0x1708c8){_0x30e6e0=_0x30e6e0-0x6c;const _0x5a48b3=_0x5a48();let _0x2ddb89=_0x5a48b3[_0x30e6e0];return _0x2ddb89;}var __awaiter=this&&this[_0x5eae14(0xb9)]||function(_0x53344c,_0x1ce159,_0x215903,_0x315d35){function _0x77889a(_0xac751a){return _0xac751a instanceof _0x215903?_0xac751a:new _0x215903(function(_0x344d85){_0x344d85(_0xac751a);});}return new(_0x215903||(_0x215903=Promise))(function(_0x35ab1e,_0x17e82b){const _0x484f07=_0x2ddb;function _0x5aad30(_0x2a163d){const _0x5d3a67=_0x2ddb;try{_0x4d2b70(_0x315d35[_0x5d3a67(0xb1)](_0x2a163d));}catch(_0x4100d1){_0x17e82b(_0x4100d1);}}function _0x21b92e(_0x412c81){const _0x169530=_0x2ddb;try{_0x4d2b70(_0x315d35[_0x169530(0xc6)](_0x412c81));}catch(_0x51957b){_0x17e82b(_0x51957b);}}function _0x4d2b70(_0x37239b){const _0x1e0df4=_0x2ddb;_0x37239b[_0x1e0df4(0xbf)]?_0x35ab1e(_0x37239b[_0x1e0df4(0x71)]):_0x77889a(_0x37239b[_0x1e0df4(0x71)])[_0x1e0df4(0xb2)](_0x5aad30,_0x21b92e);}_0x4d2b70((_0x315d35=_0x315d35[_0x484f07(0xd5)](_0x53344c,_0x1ce159||[]))[_0x484f07(0xb1)]());});},__importDefault=this&&this[_0x5eae14(0xd4)]||function(_0x24a24b){const _0x14f743=_0x5eae14;return _0x24a24b&&_0x24a24b[_0x14f743(0xb3)]?_0x24a24b:{'default':_0x24a24b};};Object[_0x5eae14(0x86)](exports,_0x5eae14(0xb3),{'value':!![]});function _0x5a48(){const _0x49078d=['value','signTransaction','signMessage','Interop\x20relayer\x20returned\x20no\x20transaction\x20ID','proxyApi','operation','transaction_id','getRoutes','loginByChain','Transaction\x20failed','get','map','bind','proxyContract','connect','signature','isSupportedProtocol','success:','submit_args','base','arbitrum','defineProperty','Wallet\x20signature\x20or\x20required\x20interop\x20fields\x20are\x20missing','relay','walletAdapters','string','/v1/chain/get_info','crypto-js','Interop\x20prepared\x20request\x20differs\x20from\x20the\x20requested\x20route','/v1/chain/abi_json_to_bin','./strategies/chainStrategyFactory','contract','nonce','arb','default','stringify','129230GgCwYq','15111VZpKIB','transactByChain','created_at','bsc','toLowerCase','parse','source','proxyaccts','170ciPqdZ','data','2012jVcSjt','normalizeHex','some','execute','sign','txns','./config','20rJTLCG','all','owner_contract','Expected\x201\x20to\x2016\x20interop\x20actions','address','hex','action','8688iwMAxK','signing_message','439816oYuXVl','next','then','__esModule','message','getStrategy','\x20is\x20not\x20enabled\x20for\x20','2170949lDrPzQ','chainApi','__awaiter','errorToString','Interop\x20prepared\x20actions\x20differ\x20from\x20the\x20requested\x20actions','Login\x20failed','routes','/v1/interop/submit','done','/v1/interop/get_routes','formatWalletSignature','pending:','defaultDelay','includes','18aiIkDH','throw','7IqQBMc','account','length','/v1/interop/prepare','ownerContract','signing_protocol','getAccount','proxy_contract','response','chain_id','setConfig','toString','wallet_signing','__importDefault','apply','/v1/chain/get_table_rows','concat','SHA256','normalizeAddress','sleep','Interop\x20relayer\x20does\x20not\x20match\x20the\x20configured\x20FullOn\x20chain\x20or\x20contracts','./interopSigning','test','find','checkPreparedMessage','post','assign','config','Interop\x20','eth','./httpClient','48575fZCqzy','binargs','sha256','wallet_fields'];_0x5a48=function(){return _0x49078d;};return _0x5a48();}const crypto_js_1=__importDefault(require(_0x5eae14(0x8c))),config_1=__importDefault(require(_0x5eae14(0xa6))),httpClient_1=__importDefault(require(_0x5eae14(0x6c))),chainStrategyFactory_1=__importDefault(require(_0x5eae14(0x8f))),interopSigning_1=require(_0x5eae14(0xdc));class multichainInteropJs{static[_0x5eae14(0xd1)](_0x90d370){const _0x5d7638=_0x5eae14;config_1[_0x5d7638(0x93)][_0x5d7638(0xd1)](_0x90d370);}static[_0x5eae14(0x78)](){const _0x19a1da=_0x5eae14;return new httpClient_1[(_0x19a1da(0x93))](config_1[_0x19a1da(0x93)][_0x19a1da(0xe2)][_0x19a1da(0x75)])[_0x19a1da(0x7b)](_0x19a1da(0xc0));}static[_0x5eae14(0x79)](_0x4608ac){var _0x1bec25,_0x94efe3;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x282da0=_0x2ddb;try{const _0x4b6a1f=config_1[_0x282da0(0x93)][_0x282da0(0xe2)],_0x351718=new httpClient_1[(_0x282da0(0x93))](_0x4b6a1f[_0x282da0(0xb8)]),_0xf4e7e0=(_0x94efe3=(_0x1bec25=_0x4b6a1f[_0x282da0(0x89)])===null||_0x1bec25===void 0x0?void 0x0:_0x1bec25[_0x4608ac])!==null&&_0x94efe3!==void 0x0?_0x94efe3:chainStrategyFactory_1[_0x282da0(0x93)][_0x282da0(0xb5)](_0x4608ac),_0x32fb0e=this[_0x282da0(0xd9)](_0x4608ac,yield _0xf4e7e0[_0x282da0(0x7f)]());let _0x66a074=yield this[_0x282da0(0xcd)](_0x351718,_0x4b6a1f[_0x282da0(0xcb)],_0x32fb0e);if(!_0x66a074){const {transaction_id:_0x231279}=yield this[_0x282da0(0x88)](_0x282da0(0x7d),_0x4608ac,_0x32fb0e,[],_0x4b6a1f);for(let _0x44d06e=0x0;_0x44d06e<0x3&&!_0x66a074;++_0x44d06e){if(_0x44d06e)yield this[_0x282da0(0xda)](_0x4b6a1f[_0x282da0(0xc3)]);_0x66a074=yield this[_0x282da0(0xcd)](_0x351718,_0x4b6a1f[_0x282da0(0xcb)],_0x32fb0e);}if(!_0x66a074)return _0x282da0(0xc2)[_0x282da0(0xd7)](_0x231279);}return{'account':_0x66a074[_0x282da0(0xc8)],'address':_0x66a074[_0x282da0(0xab)],'chain':_0x4608ac,'createdAt':_0x66a074[_0x282da0(0x98)],'nonce':_0x66a074[_0x282da0(0x91)]};}catch(_0x1d668f){return this[_0x282da0(0xba)](_0x1d668f,_0x282da0(0xbc));}});}static[_0x5eae14(0x97)](_0x779cc8,_0x5edc7f,_0x6349ee){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x43aca7=_0x2ddb;try{const {transaction_id:_0x59af83}=yield this[_0x43aca7(0x88)](_0x43aca7(0xa3),_0x779cc8,this[_0x43aca7(0xd9)](_0x779cc8,_0x5edc7f),_0x6349ee,config_1[_0x43aca7(0x93)][_0x43aca7(0xe2)]);return _0x43aca7(0x82)[_0x43aca7(0xd7)](_0x59af83);}catch(_0x456b3a){return this[_0x43aca7(0xba)](_0x456b3a,_0x43aca7(0x7a));}});}static[_0x5eae14(0x72)](_0x56ef81,_0x467999){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x386a05=_0x2ddb;return chainStrategyFactory_1[_0x386a05(0x93)][_0x386a05(0xb5)](_0x56ef81)[_0x386a05(0x73)](_0x467999);});}static[_0x5eae14(0xd9)](_0x586561,_0x606814){const _0x6d2ac4=_0x5eae14;return[_0x6d2ac4(0xe4),_0x6d2ac4(0x99),_0x6d2ac4(0x85),_0x6d2ac4(0x84)][_0x6d2ac4(0xc4)](_0x586561)?_0x606814[_0x6d2ac4(0x9a)]():_0x606814;}static[_0x5eae14(0x88)](_0x534de5,_0x3ba10c,_0x57df3c,_0x431092,_0x565c7c){var _0x3d8487,_0x245ca8;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x190fa7=_0x2ddb,_0x3e8ebe=new httpClient_1[(_0x190fa7(0x93))](_0x565c7c[_0x190fa7(0x75)]),_0x3270b8=new httpClient_1[(_0x190fa7(0x93))](_0x565c7c[_0x190fa7(0xb8)]),_0x342e17=_0x3ba10c===_0x190fa7(0x85)?_0x190fa7(0x92):_0x3ba10c,[_0x27e80f,_0x5ad746]=yield Promise[_0x190fa7(0xa8)]([_0x3e8ebe[_0x190fa7(0x7b)](_0x190fa7(0xc0)),_0x3270b8[_0x190fa7(0xe0)](_0x190fa7(0x8b),{})]),_0x395292=_0x27e80f[_0x190fa7(0xbd)][_0x342e17],_0x3f83ec=_0x395292===null||_0x395292===void 0x0?void 0x0:_0x395292[_0x534de5];if(!_0x3f83ec)throw new Error(_0x190fa7(0xe3)[_0x190fa7(0xd7)](_0x534de5,_0x190fa7(0xb6))[_0x190fa7(0xd7)](_0x342e17));if(_0x27e80f[_0x190fa7(0xd0)]!==_0x5ad746[_0x190fa7(0xd0)]||_0x27e80f[_0x190fa7(0xce)]!==_0x565c7c[_0x190fa7(0x7e)]||_0x27e80f[_0x190fa7(0xa9)]!==_0x565c7c[_0x190fa7(0xcb)]||!(0x0,interopSigning_1[_0x190fa7(0x81)])(_0x27e80f[_0x190fa7(0xcc)]))throw new Error(_0x190fa7(0xdb));if(_0x534de5===_0x190fa7(0xa3)&&(!_0x431092[_0x190fa7(0xc9)]||_0x431092[_0x190fa7(0xc9)]>0x10))throw new Error(_0x190fa7(0xaa));const _0x24f10c=yield Promise[_0x190fa7(0xa8)](_0x431092[_0x190fa7(0x7c)](({contract:_0x4971df,action:_0x792860,data:_0x38c8ed})=>__awaiter(this,void 0x0,void 0x0,function*(){const _0x130e69=_0x190fa7;return{'contract':_0x4971df,'action':_0x792860,'data':(0x0,interopSigning_1[_0x130e69(0xa1)])(typeof _0x38c8ed===_0x130e69(0x8a)?_0x38c8ed:(yield _0x3270b8[_0x130e69(0xe0)](_0x130e69(0x8e),{'code':_0x4971df,'action':_0x792860,'args':_0x38c8ed}))[_0x130e69(0x6e)])};}))),_0x58e027=yield _0x3e8ebe[_0x190fa7(0xe0)](_0x190fa7(0xca),Object[_0x190fa7(0xe1)]({'operation':_0x534de5,'source':_0x342e17,'address':_0x57df3c},_0x534de5===_0x190fa7(0xa3)?{'txns':_0x24f10c}:{})),_0x536edf=_0x58e027[_0x190fa7(0x83)];if(_0x58e027[_0x190fa7(0xd0)]!==_0x27e80f[_0x190fa7(0xd0)]||_0x58e027[_0x190fa7(0xce)]!==_0x27e80f[_0x190fa7(0xce)]||_0x58e027[_0x190fa7(0xa9)]!==_0x27e80f[_0x190fa7(0xa9)]||_0x58e027[_0x190fa7(0xcc)]!==_0x27e80f[_0x190fa7(0xcc)]||_0x58e027[_0x190fa7(0xd3)]!==_0x395292[_0x190fa7(0xd3)]||_0x536edf[_0x190fa7(0x76)]!==_0x534de5||_0x536edf[_0x190fa7(0x9c)]!==_0x342e17||_0x536edf[_0x190fa7(0xab)]!==_0x57df3c)throw new Error(_0x190fa7(0x8d));if(_0x534de5===_0x190fa7(0xa3)){if(((_0x3d8487=_0x536edf[_0x190fa7(0xa5)])===null||_0x3d8487===void 0x0?void 0x0:_0x3d8487[_0x190fa7(0xc9)])!==_0x24f10c[_0x190fa7(0xc9)]||_0x24f10c[_0x190fa7(0xa2)]((_0x32caef,_0x52a9aa)=>{const _0x543af5=_0x190fa7,_0x31b83c=_0x536edf[_0x543af5(0xa5)][_0x52a9aa];return _0x31b83c[_0x543af5(0x90)]!==_0x32caef[_0x543af5(0x90)]||_0x31b83c[_0x543af5(0xad)]!==_0x32caef[_0x543af5(0xad)]||(0x0,interopSigning_1[_0x543af5(0xa1)])(_0x31b83c[_0x543af5(0x9f)])!==_0x32caef[_0x543af5(0x9f)];}))throw new Error(_0x190fa7(0xbb));}(0x0,interopSigning_1[_0x190fa7(0xdf)])(_0x58e027);const _0x211be7=(_0x245ca8=_0x565c7c[_0x190fa7(0x89)])===null||_0x245ca8===void 0x0?void 0x0:_0x245ca8[_0x3ba10c],_0x3b63ce=_0x211be7?yield _0x211be7[_0x190fa7(0xa4)](JSON[_0x190fa7(0x9b)](JSON[_0x190fa7(0x94)](_0x58e027))):(0x0,interopSigning_1[_0x190fa7(0xc1)])(_0x58e027,yield this[_0x190fa7(0x72)](_0x3ba10c,_0x58e027[_0x190fa7(0xaf)]));if(!_0x3b63ce[_0x190fa7(0x80)]||_0x3f83ec[_0x190fa7(0x70)][_0x190fa7(0xa2)](_0x4d705e=>{const _0x16a4bc=_0x190fa7;var _0x2b02f9;return((_0x2b02f9=_0x3b63ce[_0x16a4bc(0x70)])===null||_0x2b02f9===void 0x0?void 0x0:_0x2b02f9[_0x4d705e])===undefined;}))throw new Error(_0x190fa7(0x87));(0x0,interopSigning_1[_0x190fa7(0xdf)])(_0x58e027);const _0x121668=yield _0x3e8ebe[_0x190fa7(0xe0)](_0x190fa7(0xbe),Object[_0x190fa7(0xe1)](Object[_0x190fa7(0xe1)]({},_0x536edf),{'signature':_0x3b63ce[_0x190fa7(0x80)],'wallet_fields':_0x3b63ce[_0x190fa7(0x70)]}));if(!/^[a-f0-9]{64}$/i[_0x190fa7(0xdd)](_0x121668[_0x190fa7(0x77)]))throw new Error(_0x190fa7(0x74));return _0x121668;});}static[_0x5eae14(0xcd)](_0x594598,_0x25884d,_0xfa2c32){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5cbabd=_0x2ddb,_0x58ebcc=crypto_js_1[_0x5cbabd(0x93)][_0x5cbabd(0xd8)](_0xfa2c32)[_0x5cbabd(0xd2)](),{rows:_0x538edd}=yield _0x594598[_0x5cbabd(0xe0)](_0x5cbabd(0xd6),{'code':_0x25884d,'scope':_0x25884d,'table':_0x5cbabd(0x9d),'index_position':0x2,'key_type':_0x5cbabd(0x6f),'encode_type':_0x5cbabd(0xac),'lower_bound':_0x58ebcc,'upper_bound':_0x58ebcc,'json':!![],'limit':0x1});return _0x538edd[_0x5cbabd(0xde)](_0xf3d944=>_0xf3d944[_0x5cbabd(0xab)]===_0xfa2c32);});}static[_0x5eae14(0xba)](_0x9f34ad,_0x16e4d3){const _0x12fcd4=_0x5eae14;var _0x5febb5,_0x4ba052,_0x4d93e8;const _0x157c64=_0x9f34ad,_0x7bc02=(_0x4d93e8=(_0x4ba052=(_0x5febb5=_0x157c64===null||_0x157c64===void 0x0?void 0x0:_0x157c64[_0x12fcd4(0xcf)])===null||_0x5febb5===void 0x0?void 0x0:_0x5febb5[_0x12fcd4(0x9f)])===null||_0x4ba052===void 0x0?void 0x0:_0x4ba052[_0x12fcd4(0xb4)])!==null&&_0x4d93e8!==void 0x0?_0x4d93e8:_0x9f34ad instanceof Error?_0x9f34ad[_0x12fcd4(0xb4)]:String(_0x9f34ad);return''[_0x12fcd4(0xd7)](_0x16e4d3,'%')[_0x12fcd4(0xd7)](_0x7bc02);}}multichainInteropJs[_0x5eae14(0xda)]=_0x4a31fd=>new Promise(_0x112d9b=>setTimeout(_0x112d9b,_0x4a31fd)),exports[_0x5eae14(0x93)]=multichainInteropJs;
@@ -0,0 +1,5 @@
1
+ import { BaseChainStrategy } from "./base";
2
+ export declare class ArbitrumStrategy extends BaseChainStrategy {
3
+ connect(): Promise<any>;
4
+ signMessage(message: string): Promise<string>;
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0xaf68ad=_0x8134;(function(_0x5e012e,_0x5fa9b2){var _0x3ed8aa=_0x8134,_0x50ce04=_0x5e012e();while(!![]){try{var _0x4e4228=parseInt(_0x3ed8aa(0x1b9))/0x1*(-parseInt(_0x3ed8aa(0x1c4))/0x2)+-parseInt(_0x3ed8aa(0x1c2))/0x3*(-parseInt(_0x3ed8aa(0x1c6))/0x4)+-parseInt(_0x3ed8aa(0x1b4))/0x5+-parseInt(_0x3ed8aa(0x1b6))/0x6+parseInt(_0x3ed8aa(0x1c7))/0x7*(-parseInt(_0x3ed8aa(0x1b7))/0x8)+parseInt(_0x3ed8aa(0x1ae))/0x9*(-parseInt(_0x3ed8aa(0x1b2))/0xa)+parseInt(_0x3ed8aa(0x1bc))/0xb;if(_0x4e4228===_0x5fa9b2)break;else _0x50ce04['push'](_0x50ce04['shift']());}catch(_0x151a33){_0x50ce04['push'](_0x50ce04['shift']());}}}(_0x36db,0xd3053));var __awaiter=this&&this[_0xaf68ad(0x1bd)]||function(_0x30a8b0,_0x46a8ba,_0x8d52f8,_0x3af4f6){function _0x41db9f(_0x2f0fc0){return _0x2f0fc0 instanceof _0x8d52f8?_0x2f0fc0:new _0x8d52f8(function(_0x2fe11b){_0x2fe11b(_0x2f0fc0);});}return new(_0x8d52f8||(_0x8d52f8=Promise))(function(_0x5e39f9,_0x2e7319){var _0x3e2ff6=_0x8134;function _0x1261f1(_0x246a5d){var _0x2dc189=_0x8134;try{_0x39caa8(_0x3af4f6[_0x2dc189(0x1c5)](_0x246a5d));}catch(_0x4c0c33){_0x2e7319(_0x4c0c33);}}function _0x5b6975(_0x938e9d){var _0x49b437=_0x8134;try{_0x39caa8(_0x3af4f6[_0x49b437(0x1b1)](_0x938e9d));}catch(_0x29c37c){_0x2e7319(_0x29c37c);}}function _0x39caa8(_0x4e4c75){var _0x51856f=_0x8134;_0x4e4c75[_0x51856f(0x1b8)]?_0x5e39f9(_0x4e4c75[_0x51856f(0x1c1)]):_0x41db9f(_0x4e4c75[_0x51856f(0x1c1)])[_0x51856f(0x1af)](_0x1261f1,_0x5b6975);}_0x39caa8((_0x3af4f6=_0x3af4f6[_0x3e2ff6(0x1ad)](_0x30a8b0,_0x46a8ba||[]))[_0x3e2ff6(0x1c5)]());});},__importDefault=this&&this[_0xaf68ad(0x1ba)]||function(_0x2dd50e){var _0xac9896=_0xaf68ad;return _0x2dd50e&&_0x2dd50e[_0xac9896(0x1b0)]?_0x2dd50e:{'default':_0x2dd50e};};Object[_0xaf68ad(0x1be)](exports,_0xaf68ad(0x1b0),{'value':!![]}),exports[_0xaf68ad(0x1b5)]=void 0x0;function _0x8134(_0x468d03,_0x29ddfa){_0x468d03=_0x468d03-0x1ab;var _0x36db9a=_0x36db();var _0x8134f0=_0x36db9a[_0x468d03];return _0x8134f0;}const multichainInteropConnector_1=__importDefault(require(_0xaf68ad(0x1ac))),base_1=require(_0xaf68ad(0x1bb));class ArbitrumStrategy extends base_1[_0xaf68ad(0x1b3)]{[_0xaf68ad(0x1c8)](){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x9d0c41=_0x8134;return multichainInteropConnector_1[_0x9d0c41(0x1bf)][_0x9d0c41(0x1c3)]();});}[_0xaf68ad(0x1ab)](_0x4c32fa){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x1f1e72=_0x8134;return multichainInteropConnector_1[_0x1f1e72(0x1bf)][_0x1f1e72(0x1c0)](_0x4c32fa);});}}exports[_0xaf68ad(0x1b5)]=ArbitrumStrategy;function _0x36db(){var _0x3f755c=['then','__esModule','throw','510qtxDjd','BaseChainStrategy','3108215RfPOUA','ArbitrumStrategy','3729744sdjxxe','96PndskK','done','5889dioVWw','__importDefault','./base','56014838JgcikV','__awaiter','defineProperty','default','signMessageArbitrum','value','11001IYCTDj','connectArbitrum','134YvIBiu','next','408SLutSK','895685aXWlDv','connect','signMessage','../multichainInteropConnector','apply','252117ofFzrT'];_0x36db=function(){return _0x3f755c;};return _0x36db();}
@@ -0,0 +1,4 @@
1
+ export declare abstract class BaseChainStrategy {
2
+ abstract connect(): Promise<string>;
3
+ abstract signMessage(message: string): Promise<any>;
4
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0x387667=_0x3389;(function(_0x4790ae,_0x2912ea){var _0xed8c=_0x3389,_0x31c5df=_0x4790ae();while(!![]){try{var _0xe120ae=-parseInt(_0xed8c(0xea))/0x1+-parseInt(_0xed8c(0xe1))/0x2+parseInt(_0xed8c(0xe7))/0x3+parseInt(_0xed8c(0xe6))/0x4+parseInt(_0xed8c(0xe9))/0x5+parseInt(_0xed8c(0xe8))/0x6+-parseInt(_0xed8c(0xe4))/0x7;if(_0xe120ae===_0x2912ea)break;else _0x31c5df['push'](_0x31c5df['shift']());}catch(_0x3ae134){_0x31c5df['push'](_0x31c5df['shift']());}}}(_0x3ab4,0x3eda8));Object[_0x387667(0xe5)](exports,_0x387667(0xe3),{'value':!![]}),exports[_0x387667(0xe2)]=void 0x0;function _0x3ab4(){var _0xfadb31=['1450896FYvcwR','146660aIWkxW','442826TUfxDU','24490WBxVIo','BaseChainStrategy','__esModule','3129539eaTAfc','defineProperty','1592592LEEVvS','1470900vRJRvd'];_0x3ab4=function(){return _0xfadb31;};return _0x3ab4();}class BaseChainStrategy{}function _0x3389(_0x30a053,_0x3c1759){_0x30a053=_0x30a053-0xe1;var _0x3ab4bf=_0x3ab4();var _0x33894d=_0x3ab4bf[_0x30a053];return _0x33894d;}exports[_0x387667(0xe2)]=BaseChainStrategy;
@@ -0,0 +1,5 @@
1
+ import { BaseChainStrategy } from "./base";
2
+ export declare class BaseStrategy extends BaseChainStrategy {
3
+ connect(): Promise<any>;
4
+ signMessage(message: string): Promise<string>;
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0x2f25a9=_0x204b;(function(_0x47c502,_0xacd401){var _0x355631=_0x204b,_0x4a561d=_0x47c502();while(!![]){try{var _0x24f12b=-parseInt(_0x355631(0x1b4))/0x1+-parseInt(_0x355631(0x1ac))/0x2*(parseInt(_0x355631(0x1a9))/0x3)+parseInt(_0x355631(0x1ad))/0x4*(parseInt(_0x355631(0x1b6))/0x5)+parseInt(_0x355631(0x1b7))/0x6*(parseInt(_0x355631(0x1ae))/0x7)+-parseInt(_0x355631(0x1b1))/0x8*(parseInt(_0x355631(0x1bc))/0x9)+-parseInt(_0x355631(0x1bd))/0xa+parseInt(_0x355631(0x1ba))/0xb;if(_0x24f12b===_0xacd401)break;else _0x4a561d['push'](_0x4a561d['shift']());}catch(_0x353772){_0x4a561d['push'](_0x4a561d['shift']());}}}(_0x3976,0x47acd));var __awaiter=this&&this[_0x2f25a9(0x1b3)]||function(_0x492ab9,_0x50ab7e,_0x125c45,_0x14c4a2){function _0x167c65(_0x400077){return _0x400077 instanceof _0x125c45?_0x400077:new _0x125c45(function(_0x4b9627){_0x4b9627(_0x400077);});}return new(_0x125c45||(_0x125c45=Promise))(function(_0x51d1d7,_0x588487){var _0x263182=_0x204b;function _0x167d96(_0x294b65){var _0x36acd2=_0x204b;try{_0x54edec(_0x14c4a2[_0x36acd2(0x1c5)](_0x294b65));}catch(_0x433e97){_0x588487(_0x433e97);}}function _0x7829a3(_0x3fc7d3){var _0x265e4f=_0x204b;try{_0x54edec(_0x14c4a2[_0x265e4f(0x1c4)](_0x3fc7d3));}catch(_0x2e4104){_0x588487(_0x2e4104);}}function _0x54edec(_0x58fb96){var _0xedf78e=_0x204b;_0x58fb96[_0xedf78e(0x1af)]?_0x51d1d7(_0x58fb96[_0xedf78e(0x1ab)]):_0x167c65(_0x58fb96[_0xedf78e(0x1ab)])[_0xedf78e(0x1c0)](_0x167d96,_0x7829a3);}_0x54edec((_0x14c4a2=_0x14c4a2[_0x263182(0x1c2)](_0x492ab9,_0x50ab7e||[]))[_0x263182(0x1c5)]());});},__importDefault=this&&this[_0x2f25a9(0x1c3)]||function(_0x1ddb56){var _0xc6ae4a=_0x2f25a9;return _0x1ddb56&&_0x1ddb56[_0xc6ae4a(0x1b2)]?_0x1ddb56:{'default':_0x1ddb56};};Object[_0x2f25a9(0x1aa)](exports,_0x2f25a9(0x1b2),{'value':!![]}),exports[_0x2f25a9(0x1bf)]=void 0x0;const multichainInteropConnector_1=__importDefault(require(_0x2f25a9(0x1b8))),base_1=require(_0x2f25a9(0x1c1));function _0x3976(){var _0x2ebe71=['340UiGNrj','12kqFiRs','../multichainInteropConnector','connect','11954745BLvgIw','signMessageBase','1021257pxPhmO','4352100OVjwlg','connectBase','BaseStrategy','then','./base','apply','__importDefault','throw','next','signMessage','6cuYmaY','defineProperty','value','395588FGZqaV','24980SdzbQx','1373561uCFkzp','done','default','40aXxBZt','__esModule','__awaiter','212157hKbUlH','BaseChainStrategy'];_0x3976=function(){return _0x2ebe71;};return _0x3976();}class BaseStrategy extends base_1[_0x2f25a9(0x1b5)]{[_0x2f25a9(0x1b9)](){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x21a1c2=_0x204b;return multichainInteropConnector_1[_0x21a1c2(0x1b0)][_0x21a1c2(0x1be)]();});}[_0x2f25a9(0x1a8)](_0x3e3dd4){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x44a84c=_0x204b;return multichainInteropConnector_1[_0x44a84c(0x1b0)][_0x44a84c(0x1bb)](_0x3e3dd4);});}}function _0x204b(_0x332ace,_0x2b92c3){_0x332ace=_0x332ace-0x1a8;var _0x39760c=_0x3976();var _0x204bb7=_0x39760c[_0x332ace];return _0x204bb7;}exports[_0x2f25a9(0x1bf)]=BaseStrategy;
@@ -0,0 +1,5 @@
1
+ import { BaseChainStrategy } from "./base";
2
+ export declare class BSCStrategy extends BaseChainStrategy {
3
+ connect(): Promise<any>;
4
+ signMessage(message: string): Promise<string>;
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0x227919=_0x2919;(function(_0x25bf2b,_0x110e83){var _0x36488=_0x2919,_0x1e5adc=_0x25bf2b();while(!![]){try{var _0x4d9188=parseInt(_0x36488(0x101))/0x1+-parseInt(_0x36488(0x113))/0x2*(parseInt(_0x36488(0x110))/0x3)+parseInt(_0x36488(0x102))/0x4*(-parseInt(_0x36488(0xf6))/0x5)+-parseInt(_0x36488(0x10d))/0x6+parseInt(_0x36488(0xfe))/0x7+-parseInt(_0x36488(0x106))/0x8*(-parseInt(_0x36488(0x103))/0x9)+-parseInt(_0x36488(0xfc))/0xa*(-parseInt(_0x36488(0x100))/0xb);if(_0x4d9188===_0x110e83)break;else _0x1e5adc['push'](_0x1e5adc['shift']());}catch(_0x479458){_0x1e5adc['push'](_0x1e5adc['shift']());}}}(_0x1afa,0xde434));function _0x2919(_0x15892e,_0xe08ff1){_0x15892e=_0x15892e-0xf6;var _0x1afa3d=_0x1afa();var _0x291944=_0x1afa3d[_0x15892e];return _0x291944;}var __awaiter=this&&this[_0x227919(0xfa)]||function(_0x321cfa,_0x299bb0,_0x167429,_0x2865b5){function _0x5757b1(_0x5a7480){return _0x5a7480 instanceof _0x167429?_0x5a7480:new _0x167429(function(_0x15cc5c){_0x15cc5c(_0x5a7480);});}return new(_0x167429||(_0x167429=Promise))(function(_0xf00a56,_0xdfaa6a){var _0x392e31=_0x2919;function _0x282270(_0x4433f4){var _0x1bfb49=_0x2919;try{_0x3d452c(_0x2865b5[_0x1bfb49(0xf7)](_0x4433f4));}catch(_0x5869b7){_0xdfaa6a(_0x5869b7);}}function _0x19617c(_0x9ed2c9){var _0x3125da=_0x2919;try{_0x3d452c(_0x2865b5[_0x3125da(0xf8)](_0x9ed2c9));}catch(_0x106fbd){_0xdfaa6a(_0x106fbd);}}function _0x3d452c(_0x36d800){var _0x975bd5=_0x2919;_0x36d800[_0x975bd5(0xfb)]?_0xf00a56(_0x36d800[_0x975bd5(0x10c)]):_0x5757b1(_0x36d800[_0x975bd5(0x10c)])[_0x975bd5(0x107)](_0x282270,_0x19617c);}_0x3d452c((_0x2865b5=_0x2865b5[_0x392e31(0x10e)](_0x321cfa,_0x299bb0||[]))[_0x392e31(0xf7)]());});},__importDefault=this&&this[_0x227919(0xfd)]||function(_0x396d54){var _0x10d06e=_0x227919;return _0x396d54&&_0x396d54[_0x10d06e(0x10b)]?_0x396d54:{'default':_0x396d54};};Object[_0x227919(0x10f)](exports,_0x227919(0x10b),{'value':!![]}),exports[_0x227919(0x111)]=void 0x0;const multichainInteropConnector_1=__importDefault(require(_0x227919(0x104))),base_1=require(_0x227919(0x105));class BSCStrategy extends base_1[_0x227919(0x108)]{[_0x227919(0x109)](){return __awaiter(this,void 0x0,void 0x0,function*(){var _0xaf0642=_0x2919;return multichainInteropConnector_1[_0xaf0642(0xf9)][_0xaf0642(0xff)]();});}[_0x227919(0x10a)](_0x469d3f){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x84c3ff=_0x2919;return multichainInteropConnector_1[_0x84c3ff(0xf9)][_0x84c3ff(0x112)](_0x469d3f);});}}function _0x1afa(){var _0x5ab602=['throw','default','__awaiter','done','2155240LCFpjK','__importDefault','9703918sWvHlY','connectBSC','55vVDCRm','1033080ptwEjT','84TypAEI','18sJTTMs','../multichainInteropConnector','./base','155328njRaaG','then','BaseChainStrategy','connect','signMessage','__esModule','value','733230OzlNzm','apply','defineProperty','24tvugPe','BSCStrategy','signMessageBSC','304162CJGqID','306325tEkOgK','next'];_0x1afa=function(){return _0x5ab602;};return _0x1afa();}exports[_0x227919(0x111)]=BSCStrategy;
@@ -0,0 +1,13 @@
1
+ import { ChainType } from "../../types";
2
+ import { BaseChainStrategy } from "./base";
3
+ /**
4
+ * Strategy factory optimization implementation
5
+ */
6
+ declare class ChainStrategyFactory {
7
+ private static readonly _strategies;
8
+ static registerStrategy(chainType: ChainType, strategy: BaseChainStrategy): void;
9
+ static getStrategy(chainType: ChainType): BaseChainStrategy;
10
+ static getStrategies(chainTypes: ChainType[]): BaseChainStrategy[];
11
+ static get supportedChains(): ChainType[];
12
+ }
13
+ export default ChainStrategyFactory;
@@ -0,0 +1 @@
1
+ "use strict";const _0x2e56af=_0x32af;(function(_0x26da92,_0x29c908){const _0x3636d0=_0x32af,_0x447eb3=_0x26da92();while(!![]){try{const _0xeedff7=-parseInt(_0x3636d0(0xc0))/0x1+-parseInt(_0x3636d0(0xd9))/0x2*(parseInt(_0x3636d0(0xee))/0x3)+-parseInt(_0x3636d0(0xc6))/0x4+parseInt(_0x3636d0(0xce))/0x5*(parseInt(_0x3636d0(0xcf))/0x6)+-parseInt(_0x3636d0(0xd8))/0x7+parseInt(_0x3636d0(0xdb))/0x8+parseInt(_0x3636d0(0xd5))/0x9*(parseInt(_0x3636d0(0xc5))/0xa);if(_0xeedff7===_0x29c908)break;else _0x447eb3['push'](_0x447eb3['shift']());}catch(_0x2a7383){_0x447eb3['push'](_0x447eb3['shift']());}}}(_0x1d1b,0x522ca));function _0x1d1b(){const _0x4604f6=['registerStrategy','TronStrategy','ArbitrumStrategy','945aSsNHl','getStrategy','tron','4156915hCOjzk','4ZlWuhg','from','4874936SnCcwn','solana','BaseStrategy','default','./arbitrumStrategy','map','concat','StatterStrategy','Unsupported\x20chain\x20type:\x20','get','_strategies','./tronStrategy','./ethStrategy','./solanaStrategy','set','./bscStrategy','BSCStrategy','__esModule','statter','66279AEejTf','supportedChains','base','99950JDtJjs','has','bsc','./baseStrategy','warn','45090pfRpaf','2177348rWHVCh','keys','./statterStrategy','eth','Overriding\x20existing\x20strategy\x20for\x20','getStrategies','SolanaStrategy','arbitrum','2680460JiyKJm','6vmHmaT','EthereumStrategy','defineProperty'];_0x1d1b=function(){return _0x4604f6;};return _0x1d1b();}Object[_0x2e56af(0xd1)](exports,_0x2e56af(0xec),{'value':!![]});const ethStrategy_1=require(_0x2e56af(0xe7)),bscStrategy_1=require(_0x2e56af(0xea)),solanaStrategy_1=require(_0x2e56af(0xe8)),arbitrumStrategy_1=require(_0x2e56af(0xdf)),tronStrategy_1=require(_0x2e56af(0xe6)),statterStrategy_1=require(_0x2e56af(0xc8)),baseStrategy_1=require(_0x2e56af(0xc3));function _0x32af(_0x45d862,_0x202d78){_0x45d862=_0x45d862-0xc0;const _0x1d1bfa=_0x1d1b();let _0x32af4c=_0x1d1bfa[_0x45d862];return _0x32af4c;}class ChainStrategyFactory{static[_0x2e56af(0xd2)](_0x3e60b4,_0x36893b){const _0x4249a6=_0x2e56af;this[_0x4249a6(0xe5)][_0x4249a6(0xc1)](_0x3e60b4)&&console[_0x4249a6(0xc4)](_0x4249a6(0xca)[_0x4249a6(0xe1)](_0x3e60b4)),this[_0x4249a6(0xe5)][_0x4249a6(0xe9)](_0x3e60b4,_0x36893b);}static[_0x2e56af(0xd6)](_0xd7542){const _0x411714=_0x2e56af,_0x15ef24=this[_0x411714(0xe5)][_0x411714(0xe4)](_0xd7542);if(!_0x15ef24)throw _0x411714(0xe3)[_0x411714(0xe1)](_0xd7542);return _0x15ef24;}static[_0x2e56af(0xcb)](_0x41651b){const _0x560180=_0x2e56af;return _0x41651b[_0x560180(0xe0)](_0x12a468=>this[_0x560180(0xd6)](_0x12a468));}static get[_0x2e56af(0xef)](){const _0x28aecf=_0x2e56af;return Array[_0x28aecf(0xda)](this[_0x28aecf(0xe5)][_0x28aecf(0xc7)]());}}ChainStrategyFactory[_0x2e56af(0xe5)]=new Map([[_0x2e56af(0xc9),new ethStrategy_1[(_0x2e56af(0xd0))]()],[_0x2e56af(0xc2),new bscStrategy_1[(_0x2e56af(0xeb))]()],[_0x2e56af(0xcd),new arbitrumStrategy_1[(_0x2e56af(0xd4))]()],[_0x2e56af(0xf0),new baseStrategy_1[(_0x2e56af(0xdd))]()],[_0x2e56af(0xdc),new solanaStrategy_1[(_0x2e56af(0xcc))]()],[_0x2e56af(0xd7),new tronStrategy_1[(_0x2e56af(0xd3))]()],[_0x2e56af(0xed),new statterStrategy_1[(_0x2e56af(0xe2))]()]]),exports[_0x2e56af(0xde)]=ChainStrategyFactory;
@@ -0,0 +1,5 @@
1
+ import { BaseChainStrategy } from "./base";
2
+ export declare class EthereumStrategy extends BaseChainStrategy {
3
+ connect(): Promise<any>;
4
+ signMessage(message: string): Promise<any>;
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0x4e714d=_0x27e2;(function(_0x562e30,_0x4aa71e){var _0x522f5a=_0x27e2,_0xf1c13d=_0x562e30();while(!![]){try{var _0x1c8361=-parseInt(_0x522f5a(0x72))/0x1+-parseInt(_0x522f5a(0x7c))/0x2+parseInt(_0x522f5a(0x6d))/0x3*(-parseInt(_0x522f5a(0x75))/0x4)+-parseInt(_0x522f5a(0x80))/0x5+parseInt(_0x522f5a(0x7e))/0x6*(-parseInt(_0x522f5a(0x74))/0x7)+parseInt(_0x522f5a(0x71))/0x8+-parseInt(_0x522f5a(0x78))/0x9*(-parseInt(_0x522f5a(0x79))/0xa);if(_0x1c8361===_0x4aa71e)break;else _0xf1c13d['push'](_0xf1c13d['shift']());}catch(_0x913152){_0xf1c13d['push'](_0xf1c13d['shift']());}}}(_0x44f8,0x5f7cf));var __awaiter=this&&this[_0x4e714d(0x7a)]||function(_0x7c95f5,_0x5d22f5,_0x4d112e,_0x519942){function _0x5954ae(_0x5e95d9){return _0x5e95d9 instanceof _0x4d112e?_0x5e95d9:new _0x4d112e(function(_0x3be110){_0x3be110(_0x5e95d9);});}return new(_0x4d112e||(_0x4d112e=Promise))(function(_0x1c969d,_0xa8f0f4){var _0x4e7278=_0x27e2;function _0x3de7b7(_0x3670b9){var _0x5007f6=_0x27e2;try{_0x409825(_0x519942[_0x5007f6(0x6e)](_0x3670b9));}catch(_0x3533a0){_0xa8f0f4(_0x3533a0);}}function _0x268c95(_0x4b7519){var _0x188adc=_0x27e2;try{_0x409825(_0x519942[_0x188adc(0x83)](_0x4b7519));}catch(_0x4c3d73){_0xa8f0f4(_0x4c3d73);}}function _0x409825(_0x37c5a1){var _0x5884b8=_0x27e2;_0x37c5a1[_0x5884b8(0x7b)]?_0x1c969d(_0x37c5a1[_0x5884b8(0x84)]):_0x5954ae(_0x37c5a1[_0x5884b8(0x84)])[_0x5884b8(0x85)](_0x3de7b7,_0x268c95);}_0x409825((_0x519942=_0x519942[_0x4e7278(0x70)](_0x7c95f5,_0x5d22f5||[]))[_0x4e7278(0x6e)]());});},__importDefault=this&&this[_0x4e714d(0x7f)]||function(_0x270094){var _0x5eafe5=_0x4e714d;return _0x270094&&_0x270094[_0x5eafe5(0x6b)]?_0x270094:{'default':_0x270094};};function _0x27e2(_0x554498,_0x4c22b3){_0x554498=_0x554498-0x6b;var _0x44f892=_0x44f8();var _0x27e234=_0x44f892[_0x554498];return _0x27e234;}Object[_0x4e714d(0x7d)](exports,_0x4e714d(0x6b),{'value':!![]}),exports[_0x4e714d(0x81)]=void 0x0;const multichainInteropConnector_1=__importDefault(require(_0x4e714d(0x73))),base_1=require(_0x4e714d(0x6c));class EthereumStrategy extends base_1[_0x4e714d(0x6f)]{[_0x4e714d(0x76)](){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x52e9d7=_0x27e2;return multichainInteropConnector_1[_0x52e9d7(0x82)][_0x52e9d7(0x77)]();});}[_0x4e714d(0x86)](_0x1cb837){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x52784a=_0x27e2;return multichainInteropConnector_1[_0x52784a(0x82)][_0x52784a(0x87)](_0x1cb837);});}}function _0x44f8(){var _0x5c98bc=['401632vhuojA','351480AXEasd','../multichainInteropConnector','346906KbDHdW','135188ZJHafA','connect','connectEthereum','18rKhQbn','10492180CKVuUl','__awaiter','done','754332zwERgL','defineProperty','12BOfHCp','__importDefault','1945035TtCJrc','EthereumStrategy','default','throw','value','then','signMessage','signMessageEthereum','__esModule','./base','48lhwANl','next','BaseChainStrategy','apply'];_0x44f8=function(){return _0x5c98bc;};return _0x44f8();}exports[_0x4e714d(0x81)]=EthereumStrategy;
@@ -0,0 +1,5 @@
1
+ import { BaseChainStrategy } from "./base";
2
+ export declare class SolanaStrategy extends BaseChainStrategy {
3
+ connect(): Promise<string>;
4
+ signMessage(message: string): Promise<string>;
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0xc023ed=_0x4586;(function(_0x3ebccc,_0x4ad8d5){var _0x10c659=_0x4586,_0x171e49=_0x3ebccc();while(!![]){try{var _0x3eed09=-parseInt(_0x10c659(0x108))/0x1+-parseInt(_0x10c659(0x104))/0x2*(parseInt(_0x10c659(0x103))/0x3)+-parseInt(_0x10c659(0x112))/0x4+parseInt(_0x10c659(0xfb))/0x5+-parseInt(_0x10c659(0x10f))/0x6*(-parseInt(_0x10c659(0x10d))/0x7)+-parseInt(_0x10c659(0x10e))/0x8+-parseInt(_0x10c659(0x110))/0x9*(-parseInt(_0x10c659(0x113))/0xa);if(_0x3eed09===_0x4ad8d5)break;else _0x171e49['push'](_0x171e49['shift']());}catch(_0x330ab8){_0x171e49['push'](_0x171e49['shift']());}}}(_0x52d0,0x58b3d));var __awaiter=this&&this[_0xc023ed(0x106)]||function(_0x164ada,_0xc93eb7,_0x1a75ff,_0x287ae9){function _0x6517b6(_0x59bc56){return _0x59bc56 instanceof _0x1a75ff?_0x59bc56:new _0x1a75ff(function(_0x62f761){_0x62f761(_0x59bc56);});}return new(_0x1a75ff||(_0x1a75ff=Promise))(function(_0x673e7d,_0x17446b){var _0x4ce0b5=_0x4586;function _0x574c52(_0x2133d4){var _0x3c6208=_0x4586;try{_0x47949d(_0x287ae9[_0x3c6208(0x105)](_0x2133d4));}catch(_0x5d1bea){_0x17446b(_0x5d1bea);}}function _0x3e2d97(_0x2dbb3a){var _0x34c51e=_0x4586;try{_0x47949d(_0x287ae9[_0x34c51e(0x100)](_0x2dbb3a));}catch(_0x3e5a53){_0x17446b(_0x3e5a53);}}function _0x47949d(_0x3b6982){var _0x39685b=_0x4586;_0x3b6982[_0x39685b(0x114)]?_0x673e7d(_0x3b6982[_0x39685b(0x10a)]):_0x6517b6(_0x3b6982[_0x39685b(0x10a)])[_0x39685b(0xfc)](_0x574c52,_0x3e2d97);}_0x47949d((_0x287ae9=_0x287ae9[_0x4ce0b5(0xf8)](_0x164ada,_0xc93eb7||[]))[_0x4ce0b5(0x105)]());});},__importDefault=this&&this[_0xc023ed(0xfe)]||function(_0x4c9b89){var _0x18ac23=_0xc023ed;return _0x4c9b89&&_0x4c9b89[_0x18ac23(0xff)]?_0x4c9b89:{'default':_0x4c9b89};};function _0x4586(_0x1dac84,_0x404a7b){_0x1dac84=_0x1dac84-0xf8;var _0x52d02d=_0x52d0();var _0x45868c=_0x52d02d[_0x1dac84];return _0x45868c;}Object[_0xc023ed(0xf9)](exports,_0xc023ed(0xff),{'value':!![]}),exports[_0xc023ed(0xfd)]=void 0x0;const multichainInteropConnector_1=__importDefault(require(_0xc023ed(0xfa))),base_1=require(_0xc023ed(0x10c));class SolanaStrategy extends base_1[_0xc023ed(0x101)]{[_0xc023ed(0x102)](){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x5b5f0a=_0x4586;return multichainInteropConnector_1[_0x5b5f0a(0x111)][_0x5b5f0a(0x109)]();});}[_0xc023ed(0x10b)](_0x3bbb65){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x47d180=_0x4586;return multichainInteropConnector_1[_0x47d180(0x111)][_0x47d180(0x107)](_0x3bbb65);});}}exports[_0xc023ed(0xfd)]=SolanaStrategy;function _0x52d0(){var _0x125db2=['signMessageSolana','62035cokLYN','connectSolana','value','signMessage','./base','140xvdJwF','5720472iOCpdb','163854WaGIXx','28737EcqtJe','default','2717344sGMXfg','3010RdRquD','done','apply','defineProperty','../multichainInteropConnector','2297965XkNoOH','then','SolanaStrategy','__importDefault','__esModule','throw','BaseChainStrategy','connect','3FfUEdG','294222dokfLE','next','__awaiter'];_0x52d0=function(){return _0x125db2;};return _0x52d0();}
@@ -0,0 +1,5 @@
1
+ import { BaseChainStrategy } from "./base";
2
+ export declare class StatterStrategy extends BaseChainStrategy {
3
+ connect(): Promise<any>;
4
+ signMessage(message: string): Promise<string>;
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0x44f775=_0x46af;function _0x46af(_0x5ec024,_0x135796){_0x5ec024=_0x5ec024-0x1dc;var _0x1c11e2=_0x1c11();var _0x46aff2=_0x1c11e2[_0x5ec024];return _0x46aff2;}(function(_0x2a4d70,_0x4db5fe){var _0x55b0e7=_0x46af,_0x202fa7=_0x2a4d70();while(!![]){try{var _0x23efd4=-parseInt(_0x55b0e7(0x1e3))/0x1*(parseInt(_0x55b0e7(0x1f7))/0x2)+-parseInt(_0x55b0e7(0x1ef))/0x3+-parseInt(_0x55b0e7(0x1e0))/0x4+parseInt(_0x55b0e7(0x1e9))/0x5*(parseInt(_0x55b0e7(0x1f6))/0x6)+-parseInt(_0x55b0e7(0x1ea))/0x7*(-parseInt(_0x55b0e7(0x1f5))/0x8)+-parseInt(_0x55b0e7(0x1f2))/0x9*(parseInt(_0x55b0e7(0x1f1))/0xa)+parseInt(_0x55b0e7(0x1f0))/0xb;if(_0x23efd4===_0x4db5fe)break;else _0x202fa7['push'](_0x202fa7['shift']());}catch(_0x5196d4){_0x202fa7['push'](_0x202fa7['shift']());}}}(_0x1c11,0x60f40));var __awaiter=this&&this[_0x44f775(0x1df)]||function(_0x2d5a93,_0x1a950e,_0xf2722c,_0x5d62aa){function _0x384948(_0x2c08b4){return _0x2c08b4 instanceof _0xf2722c?_0x2c08b4:new _0xf2722c(function(_0x407412){_0x407412(_0x2c08b4);});}return new(_0xf2722c||(_0xf2722c=Promise))(function(_0x22b713,_0x28899d){var _0x44ef07=_0x46af;function _0x13f9aa(_0x2da72a){var _0x17eb9f=_0x46af;try{_0x216331(_0x5d62aa[_0x17eb9f(0x1ee)](_0x2da72a));}catch(_0x4fdb83){_0x28899d(_0x4fdb83);}}function _0x2eab41(_0x1928e1){var _0x997ce1=_0x46af;try{_0x216331(_0x5d62aa[_0x997ce1(0x1ec)](_0x1928e1));}catch(_0x65df38){_0x28899d(_0x65df38);}}function _0x216331(_0x2fe2c1){var _0x21ffb7=_0x46af;_0x2fe2c1[_0x21ffb7(0x1dd)]?_0x22b713(_0x2fe2c1[_0x21ffb7(0x1e8)]):_0x384948(_0x2fe2c1[_0x21ffb7(0x1e8)])[_0x21ffb7(0x1f3)](_0x13f9aa,_0x2eab41);}_0x216331((_0x5d62aa=_0x5d62aa[_0x44ef07(0x1e4)](_0x2d5a93,_0x1a950e||[]))[_0x44ef07(0x1ee)]());});},__importDefault=this&&this[_0x44f775(0x1f4)]||function(_0x2032fb){var _0x3a62fb=_0x44f775;return _0x2032fb&&_0x2032fb[_0x3a62fb(0x1e6)]?_0x2032fb:{'default':_0x2032fb};};Object[_0x44f775(0x1eb)](exports,_0x44f775(0x1e6),{'value':!![]}),exports[_0x44f775(0x1e1)]=void 0x0;const multichainInteropConnector_1=__importDefault(require(_0x44f775(0x1f8))),base_1=require(_0x44f775(0x1e2));class StatterStrategy extends base_1[_0x44f775(0x1e5)]{[_0x44f775(0x1ed)](){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x12d792=_0x46af;return multichainInteropConnector_1[_0x12d792(0x1de)][_0x12d792(0x1f9)]();});}[_0x44f775(0x1e7)](_0x16a56e){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x5c8a90=_0x46af;return multichainInteropConnector_1[_0x5c8a90(0x1de)][_0x5c8a90(0x1dc)](_0x16a56e);});}}exports[_0x44f775(0x1e1)]=StatterStrategy;function _0x1c11(){var _0x1e7eb7=['./base','139cZVUfg','apply','BaseChainStrategy','__esModule','signMessage','value','1200865fEeQmd','7tGQFof','defineProperty','throw','connect','next','886401wtQiPm','12084127IwGjdB','440ouzWVN','36657jQnxfF','then','__importDefault','5302840VuTpTl','6WQTjkW','10238IVrLHC','../multichainInteropConnector','connectStatter','signMessageStatter','done','default','__awaiter','1672980Pvdqij','StatterStrategy'];_0x1c11=function(){return _0x1e7eb7;};return _0x1c11();}
@@ -0,0 +1,5 @@
1
+ import { BaseChainStrategy } from "./base";
2
+ export declare class TronStrategy extends BaseChainStrategy {
3
+ connect(): Promise<any>;
4
+ signMessage(message: string): Promise<string>;
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _0x4a1909=_0xdf7a;(function(_0x11fdff,_0x1e7f1f){var _0x51735d=_0xdf7a,_0xd005=_0x11fdff();while(!![]){try{var _0x3b441b=parseInt(_0x51735d(0xd9))/0x1+-parseInt(_0x51735d(0xcc))/0x2+parseInt(_0x51735d(0xca))/0x3*(-parseInt(_0x51735d(0xce))/0x4)+-parseInt(_0x51735d(0xe1))/0x5+parseInt(_0x51735d(0xd8))/0x6*(parseInt(_0x51735d(0xcf))/0x7)+parseInt(_0x51735d(0xdd))/0x8+parseInt(_0x51735d(0xcd))/0x9*(-parseInt(_0x51735d(0xd2))/0xa);if(_0x3b441b===_0x1e7f1f)break;else _0xd005['push'](_0xd005['shift']());}catch(_0x4072e2){_0xd005['push'](_0xd005['shift']());}}}(_0x41ce,0xb6ed1));var __awaiter=this&&this[_0x4a1909(0xdc)]||function(_0xdc7ccd,_0x3d445f,_0x3a1b86,_0x2944e7){function _0x1c8999(_0xc048a6){return _0xc048a6 instanceof _0x3a1b86?_0xc048a6:new _0x3a1b86(function(_0x3f6657){_0x3f6657(_0xc048a6);});}return new(_0x3a1b86||(_0x3a1b86=Promise))(function(_0x254873,_0x5c0f4c){var _0x9ad33c=_0xdf7a;function _0x3ba187(_0x53ad13){var _0x1a1fa4=_0xdf7a;try{_0x435535(_0x2944e7[_0x1a1fa4(0xc8)](_0x53ad13));}catch(_0x23edcc){_0x5c0f4c(_0x23edcc);}}function _0x401465(_0x4a09cc){var _0x3f8167=_0xdf7a;try{_0x435535(_0x2944e7[_0x3f8167(0xd7)](_0x4a09cc));}catch(_0x81b825){_0x5c0f4c(_0x81b825);}}function _0x435535(_0x2cd7ee){var _0x857e36=_0xdf7a;_0x2cd7ee[_0x857e36(0xde)]?_0x254873(_0x2cd7ee[_0x857e36(0xdf)]):_0x1c8999(_0x2cd7ee[_0x857e36(0xdf)])[_0x857e36(0xd1)](_0x3ba187,_0x401465);}_0x435535((_0x2944e7=_0x2944e7[_0x9ad33c(0xc9)](_0xdc7ccd,_0x3d445f||[]))[_0x9ad33c(0xc8)]());});},__importDefault=this&&this[_0x4a1909(0xdb)]||function(_0x4d5c90){var _0x1205d0=_0x4a1909;return _0x4d5c90&&_0x4d5c90[_0x1205d0(0xd6)]?_0x4d5c90:{'default':_0x4d5c90};};function _0xdf7a(_0x574f5d,_0x3a7094){_0x574f5d=_0x574f5d-0xc8;var _0x41cee9=_0x41ce();var _0xdf7a82=_0x41cee9[_0x574f5d];return _0xdf7a82;}Object[_0x4a1909(0xe0)](exports,_0x4a1909(0xd6),{'value':!![]}),exports[_0x4a1909(0xe4)]=void 0x0;function _0x41ce(){var _0x5d0b67=['TronStrategy','next','apply','90OMZtqM','connectTron','38376lxIPeO','108DGTacg','124452RHhnSp','117131jxiKTT','../multichainInteropConnector','then','514640ZKzDsS','signMessage','./base','signMessageTron','__esModule','throw','276DzGSNe','666855oBqQVk','default','__importDefault','__awaiter','9457136lJYGmf','done','value','defineProperty','1496520GRBzqw','BaseChainStrategy','connect'];_0x41ce=function(){return _0x5d0b67;};return _0x41ce();}const multichainInteropConnector_1=__importDefault(require(_0x4a1909(0xd0))),base_1=require(_0x4a1909(0xd4));class TronStrategy extends base_1[_0x4a1909(0xe2)]{[_0x4a1909(0xe3)](){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x450202=_0xdf7a;return multichainInteropConnector_1[_0x450202(0xda)][_0x450202(0xcb)]();});}[_0x4a1909(0xd3)](_0x14619d){return __awaiter(this,void 0x0,void 0x0,function*(){var _0x2465a5=_0xdf7a;return multichainInteropConnector_1[_0x2465a5(0xda)][_0x2465a5(0xd5)](_0x14619d);});}}exports[_0x4a1909(0xe4)]=TronStrategy;
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import MultichainInteropJs from './core/multichainInteropJs';
2
+ export * from './types';
3
+ export default MultichainInteropJs;
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var _0x5df461=_0xa28d;(function(_0x1c7e09,_0x20ab42){var _0x330ab0=_0xa28d,_0x5ad897=_0x1c7e09();while(!![]){try{var _0x42125b=-parseInt(_0x330ab0(0x1ba))/0x1*(-parseInt(_0x330ab0(0x1bb))/0x2)+parseInt(_0x330ab0(0x1c4))/0x3*(-parseInt(_0x330ab0(0x1b9))/0x4)+parseInt(_0x330ab0(0x1b7))/0x5*(-parseInt(_0x330ab0(0x1be))/0x6)+parseInt(_0x330ab0(0x1b2))/0x7*(-parseInt(_0x330ab0(0x1b8))/0x8)+-parseInt(_0x330ab0(0x1c2))/0x9+parseInt(_0x330ab0(0x1bc))/0xa*(parseInt(_0x330ab0(0x1aa))/0xb)+parseInt(_0x330ab0(0x1ad))/0xc;if(_0x42125b===_0x20ab42)break;else _0x5ad897['push'](_0x5ad897['shift']());}catch(_0x4f3986){_0x5ad897['push'](_0x5ad897['shift']());}}}(_0x980c,0x29056));var __createBinding=this&&this[_0x5df461(0x1ac)]||(Object[_0x5df461(0x1c1)]?function(_0x44467c,_0x12ac33,_0x3d6dc7,_0x5070f1){var _0x12bcd0=_0x5df461;if(_0x5070f1===undefined)_0x5070f1=_0x3d6dc7;var _0x2770a3=Object[_0x12bcd0(0x1b4)](_0x12ac33,_0x3d6dc7);(!_0x2770a3||(_0x12bcd0(0x1ae)in _0x2770a3?!_0x12ac33[_0x12bcd0(0x1b5)]:_0x2770a3[_0x12bcd0(0x1bf)]||_0x2770a3[_0x12bcd0(0x1af)]))&&(_0x2770a3={'enumerable':!![],'get':function(){return _0x12ac33[_0x3d6dc7];}}),Object[_0x12bcd0(0x1c0)](_0x44467c,_0x5070f1,_0x2770a3);}:function(_0x369128,_0x5a35a9,_0xf3140b,_0x13f792){if(_0x13f792===undefined)_0x13f792=_0xf3140b;_0x369128[_0x13f792]=_0x5a35a9[_0xf3140b];}),__exportStar=this&&this[_0x5df461(0x1b3)]||function(_0xfd3118,_0x3b63a4){var _0x36c2f3=_0x5df461;for(var _0x1cc3d3 in _0xfd3118)if(_0x1cc3d3!==_0x36c2f3(0x1b6)&&!Object[_0x36c2f3(0x1bd)][_0x36c2f3(0x1ab)][_0x36c2f3(0x1b1)](_0x3b63a4,_0x1cc3d3))__createBinding(_0x3b63a4,_0xfd3118,_0x1cc3d3);},__importDefault=this&&this[_0x5df461(0x1a9)]||function(_0x24b92f){var _0x2afd4d=_0x5df461;return _0x24b92f&&_0x24b92f[_0x2afd4d(0x1b5)]?_0x24b92f:{'default':_0x24b92f};};function _0xa28d(_0x1964d6,_0x10f7a5){_0x1964d6=_0x1964d6-0x1a9;var _0x980c30=_0x980c();var _0xa28dc5=_0x980c30[_0x1964d6];return _0xa28dc5;}function _0x980c(){var _0x4618c4=['2147gKZcEw','56QTPPkb','1326290xEVtCr','prototype','30VUSXED','writable','defineProperty','create','19467qDPIpm','./types','960YPvGhy','__importDefault','11oDDjJY','hasOwnProperty','__createBinding','8178048kZpdBK','get','configurable','./core/multichainInteropJs','call','7EXGixQ','__exportStar','getOwnPropertyDescriptor','__esModule','default','294055woFGHh','1493192KLoCpf','2792vkusXD'];_0x980c=function(){return _0x4618c4;};return _0x980c();}Object[_0x5df461(0x1c0)](exports,_0x5df461(0x1b5),{'value':!![]});const multichainInteropJs_1=__importDefault(require(_0x5df461(0x1b0)));__exportStar(require(_0x5df461(0x1c3)),exports),exports[_0x5df461(0x1b6)]=multichainInteropJs_1[_0x5df461(0x1b6)];
@@ -0,0 +1,47 @@
1
+ export type ChainType = "eth" | "bsc" | "arbitrum" | "base" | "solana" | "tron" | "statter" | "btc" | "ton";
2
+ export interface AccountInfo {
3
+ account: string;
4
+ address: string;
5
+ chain: ChainType;
6
+ createdAt: string;
7
+ nonce?: number | string;
8
+ }
9
+ export interface ApiConfig {
10
+ chainApi: string;
11
+ proxyApi: string;
12
+ ownerContract: string;
13
+ defaultDelay: number;
14
+ proxyContract?: string;
15
+ walletAdapters?: Partial<Record<ChainType, InteropWalletAdapter>>;
16
+ }
17
+ export interface InteropWalletAdapter {
18
+ connect(): Promise<string>;
19
+ sign(prepared: InteropPrepared): Promise<InteropWalletSignature>;
20
+ }
21
+ export interface InteropWalletSignature {
22
+ signature: string;
23
+ wallet_fields?: Record<string, string | number | boolean>;
24
+ }
25
+ export interface InteropPrepared {
26
+ chain_id: string;
27
+ proxy_contract: string;
28
+ owner_contract: string;
29
+ signing_protocol: string;
30
+ signing_message: string;
31
+ wallet_signing: string;
32
+ expires_at: number;
33
+ submit_args: {
34
+ operation: "bind" | "execute";
35
+ source: string;
36
+ address: string;
37
+ account: string;
38
+ expires_at: number;
39
+ binding_id?: string;
40
+ nonce?: string;
41
+ txns?: {
42
+ contract: string;
43
+ action: string;
44
+ data: string;
45
+ }[];
46
+ };
47
+ }
@@ -0,0 +1 @@
1
+ "use strict";function _0x3823(){var _0x4adbcc=['2512279MkWoqe','__esModule','102814OTQLAS','defineProperty','5631066PnBMBa','2783238oXfdLk','19RlyeSM','4403380XsFBJX','14143680dapANU','3594748ZVdqgx'];_0x3823=function(){return _0x4adbcc;};return _0x3823();}function _0x1bce(_0x468307,_0x375412){_0x468307=_0x468307-0x153;var _0x382390=_0x3823();var _0x1bce96=_0x382390[_0x468307];return _0x1bce96;}var _0x1fcfde=_0x1bce;(function(_0x25211c,_0x1ae3f0){var _0x16a717=_0x1bce,_0x4c4dda=_0x25211c();while(!![]){try{var _0x4558c0=-parseInt(_0x16a717(0x153))/0x1*(parseInt(_0x16a717(0x159))/0x2)+parseInt(_0x16a717(0x15c))/0x3+-parseInt(_0x16a717(0x156))/0x4+-parseInt(_0x16a717(0x154))/0x5+parseInt(_0x16a717(0x15b))/0x6+-parseInt(_0x16a717(0x157))/0x7+parseInt(_0x16a717(0x155))/0x8;if(_0x4558c0===_0x1ae3f0)break;else _0x4c4dda['push'](_0x4c4dda['shift']());}catch(_0x38527d){_0x4c4dda['push'](_0x4c4dda['shift']());}}}(_0x3823,0x7ec38));Object[_0x1fcfde(0x15a)](exports,_0x1fcfde(0x158),{'value':!![]});
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Blockchain tool function set
3
+ */
4
+ type ChainType = "eth" | "bsc" | "arbitrum" | "base" | "solana" | "tron" | "statter";
5
+ export declare class BlockchainError extends Error {
6
+ readonly context: string;
7
+ constructor(message: string, context?: string);
8
+ }
9
+ /**
10
+ * Asynchronous operation with retry
11
+ * @param operation asynchronous function
12
+ * @param maxRetries maximum number of retries
13
+ * @param delay retry delay (ms)
14
+ */
15
+ export declare function retry<T>(operation: () => Promise<T>, maxRetries?: number, delay?: number): Promise<T>;
16
+ /**
17
+ * Generate Keccak256 hash
18
+ */
19
+ export declare function keccak256(message: string): string;
20
+ /**
21
+ * Universal address validator
22
+ * @param address wallet address
23
+ * @param chain chain type
24
+ */
25
+ export declare function validateAddress(address: string, chain: ChainType): boolean;
26
+ /**
27
+ * Hexadecimal to Uint8Array
28
+ */
29
+ export declare function hexToBytes(hex: string): Uint8Array;
30
+ /**
31
+ * ig Digital Security Conversion
32
+ */
33
+ export declare function safeParseNumber(value: string | number, decimals?: number): string;
34
+ /**
35
+ * Format timestamp
36
+ * @param timestamp timestamp (milliseconds)
37
+ * @param format format string (YYYY-MM-DD HH:mm:ss)
38
+ */
39
+ export declare function formatTimestamp(timestamp: number, format?: string): string;
40
+ /**
41
+ * Cancellable delay function
42
+ */
43
+ export declare function sleep(ms: number): Promise<void> & {
44
+ cancel: () => void;
45
+ };
46
+ /**
47
+ * Type protection function
48
+ */
49
+ export declare function isObject(value: unknown): value is Record<string, unknown>;
50
+ export declare function isHexString(value: unknown): value is string;
51
+ /**
52
+ * Deep cloning (basic implementation)
53
+ */
54
+ export declare function deepClone<T>(obj: T): T;
55
+ /**
56
+ * Generate a random nonce
57
+ */
58
+ export declare function generateNonce(length?: number): string;
59
+ export declare function encodeActionData(txn: any): Promise<string | null>;
60
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";const _0x4ff173=_0x1981;(function(_0x4074d3,_0x2179e3){const _0x40c6e6=_0x1981,_0x446806=_0x4074d3();while(!![]){try{const _0x472b9e=parseInt(_0x40c6e6(0x188))/0x1+-parseInt(_0x40c6e6(0x1ad))/0x2+-parseInt(_0x40c6e6(0x1c1))/0x3*(-parseInt(_0x40c6e6(0x18f))/0x4)+-parseInt(_0x40c6e6(0x1a8))/0x5+-parseInt(_0x40c6e6(0x1b7))/0x6*(parseInt(_0x40c6e6(0x1d8))/0x7)+parseInt(_0x40c6e6(0x189))/0x8+parseInt(_0x40c6e6(0x1be))/0x9*(parseInt(_0x40c6e6(0x194))/0xa);if(_0x472b9e===_0x2179e3)break;else _0x446806['push'](_0x446806['shift']());}catch(_0x138b68){_0x446806['push'](_0x446806['shift']());}}}(_0x402c,0xebcc1));var __awaiter=this&&this[_0x4ff173(0x1b1)]||function(_0x18e5fd,_0x6ebdc,_0x34688a,_0x3ffc1f){function _0x5f28b2(_0x10276f){return _0x10276f instanceof _0x34688a?_0x10276f:new _0x34688a(function(_0x28a76a){_0x28a76a(_0x10276f);});}return new(_0x34688a||(_0x34688a=Promise))(function(_0xbe4325,_0x50a4df){const _0xe49515=_0x1981;function _0x17378f(_0x11ce80){const _0x3fb8d6=_0x1981;try{_0x350e72(_0x3ffc1f[_0x3fb8d6(0x187)](_0x11ce80));}catch(_0x55a82a){_0x50a4df(_0x55a82a);}}function _0x261aeb(_0xb165dc){const _0x5cbfbc=_0x1981;try{_0x350e72(_0x3ffc1f[_0x5cbfbc(0x1cf)](_0xb165dc));}catch(_0x23ee8a){_0x50a4df(_0x23ee8a);}}function _0x350e72(_0x50f74a){const _0x176d5d=_0x1981;_0x50f74a[_0x176d5d(0x191)]?_0xbe4325(_0x50f74a[_0x176d5d(0x1aa)]):_0x5f28b2(_0x50f74a[_0x176d5d(0x1aa)])[_0x176d5d(0x1ae)](_0x17378f,_0x261aeb);}_0x350e72((_0x3ffc1f=_0x3ffc1f[_0xe49515(0x1a5)](_0x18e5fd,_0x6ebdc||[]))[_0xe49515(0x187)]());});},__importDefault=this&&this[_0x4ff173(0x186)]||function(_0x15b45f){const _0xa025a=_0x4ff173;return _0x15b45f&&_0x15b45f[_0xa025a(0x17e)]?_0x15b45f:{'default':_0x15b45f};};Object[_0x4ff173(0x1c2)](exports,_0x4ff173(0x17e),{'value':!![]}),exports[_0x4ff173(0x1c8)]=exports[_0x4ff173(0x1ac)]=exports[_0x4ff173(0x1b4)]=exports[_0x4ff173(0x1b5)]=exports[_0x4ff173(0x1bf)]=exports[_0x4ff173(0x1ba)]=exports[_0x4ff173(0x193)]=exports[_0x4ff173(0x1a0)]=exports[_0x4ff173(0x1b2)]=exports[_0x4ff173(0x1d4)]=exports[_0x4ff173(0x1bc)]=exports[_0x4ff173(0x1cc)]=exports[_0x4ff173(0x1ab)]=void 0x0;const crypto_js_1=__importDefault(require(_0x4ff173(0x1af))),antelope_1=require(_0x4ff173(0x1d3)),config_1=__importDefault(require(_0x4ff173(0x1bd)));class BlockchainError extends Error{constructor(_0x2834fb,_0x27d2fb=_0x4ff173(0x1c0)){const _0x2bf391=_0x4ff173;super(_0x2834fb),this[_0x2bf391(0x1d7)]=_0x2bf391(0x1ab),this[_0x2bf391(0x198)]=_0x27d2fb,Error[_0x2bf391(0x19c)](this);}}function _0x402c(){const _0x183e4d=['defineProperty','length','split','default','json','getUTCMonth','encodeActionData','Invalid\x20hexadecimal\x20string','Maximum\x20retries\x20exceeded','config','retry','from','getRandomValues','throw','type','YYYY','Serializer','@wharfkit/antelope','validateAddress','DataConversion','getUTCSeconds','name','28DSTgPF','__esModule','POST','getUTCMinutes','join','application/json','slice','YYYY-MM-DD\x20HH:mm:ss','startsWith','__importDefault','next','1230347nCWLnS','12250440QoxlTU','replace','cancel','test','data','stringify','880260ZwootL','getUTCHours','done','Sleep\x20cancelled','formatTimestamp','20gOAgzX','parse','concat','map','context','encode','contract','action','captureStackTrace','hexString','actions','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789','safeParseNumber','SHA3','isArray','toString','substr','apply','getUTCDate','object','8099495tePiGB','string','value','BlockchainError','generateNonce','1467166ahCHJB','then','crypto-js','/v1/chain/get_abi','__awaiter','hexToBytes','find','deepClone','isHexString','chainApi','2568516TXEYTp','getUTCFullYear','padStart','sleep','padEnd','keccak256','../core/config','7244118cgtErt','isObject','Blockchain','9MVQSTZ'];_0x402c=function(){return _0x183e4d;};return _0x402c();}exports[_0x4ff173(0x1ab)]=BlockchainError;function retry(_0x23d610,_0x25fb01=0x3,_0xaac6c0=0x3e8){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x377e81=_0x1981;for(let _0x560cf7=0x0;_0x560cf7<_0x25fb01;_0x560cf7++){try{return yield _0x23d610();}catch(_0x2b898b){if(_0x560cf7===_0x25fb01-0x1)throw _0x2b898b;yield sleep(_0xaac6c0*(_0x560cf7+0x1));}}throw new BlockchainError(_0x377e81(0x1ca));});}exports[_0x4ff173(0x1cc)]=retry;function keccak256(_0x16460c){const _0x2fd9fb=_0x4ff173;return crypto_js_1[_0x2fd9fb(0x1c5)][_0x2fd9fb(0x1a1)](_0x16460c,{'outputLength':0x100})[_0x2fd9fb(0x1a3)]();}exports[_0x4ff173(0x1bc)]=keccak256;function validateAddress(_0x5284de,_0x32f00b){const _0x56309e={'eth':validateETHAddress,'bsc':validateETHAddress,'base':validateETHAddress,'arbitrum':validateETHAddress,'solana':validateSolanaAddress,'tron':validateTronAddress,'statter':validateSolanaAddress};return _0x56309e[_0x32f00b](_0x5284de);}exports[_0x4ff173(0x1d4)]=validateAddress;function validateETHAddress(_0x467011){const _0x2c94f7=_0x4ff173;return/^0x[a-fA-F0-9]{40}$/[_0x2c94f7(0x18c)](_0x467011);}function validateSolanaAddress(_0x2fb6c4){const _0x510a8c=_0x4ff173;return/^[1-9A-HJ-NP-Za-km-z]{32,44}$/[_0x510a8c(0x18c)](_0x2fb6c4);}function validateTronAddress(_0x4c08cb){const _0x453db7=_0x4ff173;return/^T[a-zA-Z0-9]{33}$/[_0x453db7(0x18c)](_0x4c08cb);}function hexToBytes(_0x5b9dd4){const _0x469222=_0x4ff173;if(!/^(0x)?[0-9a-fA-F]+$/[_0x469222(0x18c)](_0x5b9dd4))throw new BlockchainError(_0x469222(0x1c9),_0x469222(0x1d5));const _0x37dd1e=_0x5b9dd4[_0x469222(0x185)]('0x')?_0x5b9dd4[_0x469222(0x183)](0x2):_0x5b9dd4,_0x178c72=new Uint8Array(_0x37dd1e[_0x469222(0x1c3)]/0x2);for(let _0x49db6d=0x0;_0x49db6d<_0x178c72[_0x469222(0x1c3)];_0x49db6d++){const _0x3b2a20=parseInt(_0x37dd1e[_0x469222(0x1a4)](_0x49db6d*0x2,0x2),0x10);_0x178c72[_0x49db6d]=_0x3b2a20;}return _0x178c72;}exports[_0x4ff173(0x1b2)]=hexToBytes;function safeParseNumber(_0x579429,_0x10321a=0x12){const _0x2d1c1b=_0x4ff173,[_0x2813ed,_0x56e4f0='0']=String(_0x579429)[_0x2d1c1b(0x1c4)]('.'),_0x293cce=_0x56e4f0[_0x2d1c1b(0x1bb)](_0x10321a,'0')[_0x2d1c1b(0x183)](0x0,_0x10321a);return''[_0x2d1c1b(0x196)](_0x2813ed)[_0x2d1c1b(0x196)](_0x293cce);}exports[_0x4ff173(0x1a0)]=safeParseNumber;function formatTimestamp(_0x858aa4,_0x4e69a6=_0x4ff173(0x184)){const _0x3e4b9a=_0x4ff173,_0x4d4f21=new Date(_0x858aa4);return _0x4e69a6[_0x3e4b9a(0x18a)](_0x3e4b9a(0x1d1),String(_0x4d4f21[_0x3e4b9a(0x1b8)]()))[_0x3e4b9a(0x18a)]('MM',String(_0x4d4f21[_0x3e4b9a(0x1c7)]()+0x1)[_0x3e4b9a(0x1b9)](0x2,'0'))[_0x3e4b9a(0x18a)]('DD',String(_0x4d4f21[_0x3e4b9a(0x1a6)]())[_0x3e4b9a(0x1b9)](0x2,'0'))[_0x3e4b9a(0x18a)]('HH',String(_0x4d4f21[_0x3e4b9a(0x190)]())[_0x3e4b9a(0x1b9)](0x2,'0'))[_0x3e4b9a(0x18a)]('mm',String(_0x4d4f21[_0x3e4b9a(0x180)]())[_0x3e4b9a(0x1b9)](0x2,'0'))[_0x3e4b9a(0x18a)]('ss',String(_0x4d4f21[_0x3e4b9a(0x1d6)]())[_0x3e4b9a(0x1b9)](0x2,'0'));}exports[_0x4ff173(0x193)]=formatTimestamp;function sleep(_0xc8bf99){const _0x10d35c=_0x4ff173;let _0x2e2543,_0x505334;const _0x3ac184=new Promise((_0x423b05,_0x249509)=>{_0x505334=_0x249509,_0x2e2543=setTimeout(_0x423b05,_0xc8bf99);});return _0x3ac184[_0x10d35c(0x18b)]=()=>{const _0x227b23=_0x10d35c;clearTimeout(_0x2e2543),_0x505334(new BlockchainError(_0x227b23(0x192)));},_0x3ac184;}exports[_0x4ff173(0x1ba)]=sleep;function isObject(_0x5ef40a){const _0x1b381f=_0x4ff173;return typeof _0x5ef40a===_0x1b381f(0x1a7)&&_0x5ef40a!==null&&!Array[_0x1b381f(0x1a2)](_0x5ef40a);}exports[_0x4ff173(0x1bf)]=isObject;function isHexString(_0x3aac99){const _0x415fee=_0x4ff173;return typeof _0x3aac99===_0x415fee(0x1a9)&&/^0x[0-9a-fA-F]+$/[_0x415fee(0x18c)](_0x3aac99);}function _0x1981(_0x30fbc6,_0xc22625){_0x30fbc6=_0x30fbc6-0x17e;const _0x402c72=_0x402c();let _0x1981ce=_0x402c72[_0x30fbc6];return _0x1981ce;}exports[_0x4ff173(0x1b5)]=isHexString;function deepClone(_0x1583c8){const _0x1e4038=_0x4ff173;return JSON[_0x1e4038(0x195)](JSON[_0x1e4038(0x18e)](_0x1583c8));}exports[_0x4ff173(0x1b4)]=deepClone;function generateNonce(_0x3e66ba=0x10){const _0x5759e4=_0x4ff173,_0x352149=_0x5759e4(0x19f),_0x7745fc=crypto[_0x5759e4(0x1ce)](new Uint8Array(_0x3e66ba));return Array[_0x5759e4(0x1cd)](_0x7745fc)[_0x5759e4(0x197)](_0x16da40=>_0x352149[_0x16da40%_0x352149[_0x5759e4(0x1c3)]])[_0x5759e4(0x181)]('');}exports[_0x4ff173(0x1ac)]=generateNonce;function encodeActionData(_0x8b17ef){var _0x251440;return __awaiter(this,void 0x0,void 0x0,function*(){const _0x56e1c3=_0x1981;try{const _0x1d1add=_0x8b17ef[_0x56e1c3(0x19a)],_0x7f7064=_0x8b17ef[_0x56e1c3(0x19b)],_0xde81c2=_0x8b17ef[_0x56e1c3(0x18d)],_0x39f5fd=config_1[_0x56e1c3(0x1c5)][_0x56e1c3(0x1cb)][_0x56e1c3(0x1b6)][_0x56e1c3(0x18a)](/\/$/,''),_0x414165=yield fetch(_0x39f5fd+_0x56e1c3(0x1b0),{'method':_0x56e1c3(0x17f),'headers':{'Content-Type':_0x56e1c3(0x182)},'body':JSON[_0x56e1c3(0x18e)]({'account_name':_0x1d1add})});if(!_0x414165['ok'])return null;const {abi:_0x3e0cda}=yield _0x414165[_0x56e1c3(0x1c6)](),_0x1f0445=(_0x251440=_0x3e0cda===null||_0x3e0cda===void 0x0?void 0x0:_0x3e0cda[_0x56e1c3(0x19e)])===null||_0x251440===void 0x0?void 0x0:_0x251440[_0x56e1c3(0x1b3)](_0x4c7a7d=>_0x4c7a7d[_0x56e1c3(0x1d7)]===_0x7f7064);if(!_0x1f0445)return null;return antelope_1[_0x56e1c3(0x1d2)][_0x56e1c3(0x199)]({'abi':_0x3e0cda,'type':_0x1f0445[_0x56e1c3(0x1d0)],'object':_0xde81c2})[_0x56e1c3(0x19d)];}catch(_0x5f1221){return null;}});}exports[_0x4ff173(0x1c8)]=encodeActionData;
package/package.json CHANGED
@@ -1,6 +1,57 @@
1
1
  {
2
- "name": "@fullonlabs/interop-js",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@fullonlabs/interop-js",
3
+ "publishConfig": {
4
+ "access": "public",
5
+ "registry": "https://registry.npmjs.org/"
6
+ },
7
+ "version": "4.0.3",
8
+ "description": "A simple Web3 wallet connector supporting Ethereum, Solana, Tron, and Arbitrum.",
9
+ "main": "./lib/index.js",
10
+ "types": "./lib/index.d.ts",
11
+ "engines": {
12
+ "node": ">=20.19.0"
13
+ },
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "test": "npm run build && node tests/interop.test.js",
17
+ "prepack": "npm run build && node scripts/obfuscate.cjs && node tests/interop.test.js"
18
+ },
19
+ "dependencies": {
20
+ "axios": "^1.8.4",
21
+ "crypto-js": "^4.1.1",
22
+ "@wharfkit/antelope": "4.0.2",
23
+ "ethers": "6.17.0",
24
+ "js-base64": "^3.7.7"
25
+ },
26
+ "devDependencies": {
27
+ "@types/crypto-js": "^4.2.2",
28
+ "@types/node": "^16.9.6",
29
+ "@typescript-eslint/eslint-plugin": "^5.22.0",
30
+ "@typescript-eslint/parser": "^5.22.0",
31
+ "eslint": "^8.14.0",
32
+ "eslint-config-prettier": "^8.1.0",
33
+ "eslint-plugin-prettier": "^4.0.0",
34
+ "typescript": "^4.3.2",
35
+ "javascript-obfuscator": "5.10.1"
36
+ },
37
+ "overrides": {
38
+ "zod": "4.6.6"
39
+ },
40
+ "files": [
41
+ "lib"
42
+ ],
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/fullon-labs/interop.jssdk.git"
46
+ },
47
+ "keywords": [
48
+ "web3",
49
+ "ethereum",
50
+ "solana",
51
+ "tron",
52
+ "arbitrum",
53
+ "wallet-connector"
54
+ ],
55
+ "author": "black.pit",
56
+ "license": "MIT"
57
+ }