@fullonlabs/interop-js 4.0.4 → 4.0.5
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.
- package/README.md +0 -21
- package/lib/core/interopSigning.js +1 -1
- package/lib/core/multichainInteropJs.d.ts +2 -5
- package/lib/core/multichainInteropJs.js +1 -1
- package/lib/core/strategies/chainStrategyFactory.js +1 -1
- package/lib/types/index.d.ts +1 -5
- package/package.json +1 -1
- package/lib/core/strategies/armoniaStrategy.d.ts +0 -8
- package/lib/core/strategies/armoniaStrategy.js +0 -1
package/README.md
CHANGED
|
@@ -45,7 +45,6 @@ is unavailable on the selected relayer. If the response includes
|
|
|
45
45
|
|
|
46
46
|
| Wallet | SDK chain argument | Contract operations |
|
|
47
47
|
| --- | --- | --- |
|
|
48
|
-
| Armonia Armadillo (native K1 messages) | `amax` | Bind and execute |
|
|
49
48
|
| Ethereum, BNB Smart Chain, Arbitrum | `eth`, `bsc`, `arbitrum` | Bind and execute |
|
|
50
49
|
| Tron, Solana, Statter | `tron`, `solana`, `statter` | Bind and execute |
|
|
51
50
|
| Bitcoin, TON | `btc`, `ton` | Bind only, with a wallet adapter |
|
|
@@ -105,23 +104,3 @@ request matches the configured chain and contracts, requested wallet route,
|
|
|
105
104
|
and exact action bytes before signing. A `success:<transaction_id>` result
|
|
106
105
|
means the relayer accepted the transaction. Use the chain to confirm
|
|
107
106
|
inclusion and finality.
|
|
108
|
-
|
|
109
|
-
## Armonia native wallets
|
|
110
|
-
|
|
111
|
-
`loginByChain('amax')` uses the Armadillo extension's `requestAccounts()` and
|
|
112
|
-
`signMessage(message)` methods. It identifies a wallet by `amax:` followed by
|
|
113
|
-
its lowercase compressed K1 public key in hex, independently of the AMAX
|
|
114
|
-
account's display name. AMAX, FU and PUB_K1 public keys are accepted.
|
|
115
|
-
|
|
116
|
-
For a new binding, the default FullOn account name is the selected AMAX account
|
|
117
|
-
name. It must be 12 characters using a-z and 1-5 and must be available on FullOn.
|
|
118
|
-
Pass `loginByChain('amax', {account: 'myfullonacct'})` to request a different
|
|
119
|
-
name. An existing public-key binding is reused without requesting a new name.
|
|
120
|
-
The signed bind message includes the requested FullOn account name explicitly.
|
|
121
|
-
|
|
122
|
-
The relayer must advertise `amax_sign_message`, with `bindamax` and `pushamax`
|
|
123
|
-
ready. Native SIG_K1 signatures cover SHA-256 of the exact UTF-8 prepared
|
|
124
|
-
message. Execution binds the FullOn chain, contracts, binding ID, nonce and
|
|
125
|
-
all action bytes. Ethereum personal-sign signatures are not interchangeable.
|
|
126
|
-
Account-name ownership on AMAX is not asserted; possession of its wallet key
|
|
127
|
-
is what authorizes the FullOn proxy account.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
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;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { AccountInfo, ApiConfig, ChainType, InteropPrepared
|
|
1
|
+
import { AccountInfo, ApiConfig, ChainType, InteropPrepared } from "../types";
|
|
2
2
|
type Route = {
|
|
3
3
|
wallet_signing: string;
|
|
4
4
|
bind: {
|
|
5
5
|
wallet_fields: string[];
|
|
6
|
-
ready?: boolean;
|
|
7
6
|
} | null;
|
|
8
7
|
execute: {
|
|
9
8
|
wallet_fields: string[];
|
|
10
|
-
ready?: boolean;
|
|
11
9
|
} | null;
|
|
12
10
|
};
|
|
13
11
|
type Routes = Pick<InteropPrepared, "chain_id" | "proxy_contract" | "owner_contract" | "signing_protocol"> & {
|
|
14
12
|
routes: Record<string, Route>;
|
|
15
|
-
submission_enabled?: boolean;
|
|
16
13
|
};
|
|
17
14
|
declare class multichainInteropJs {
|
|
18
15
|
static setConfig(config: Partial<ApiConfig>): void;
|
|
19
16
|
static getRoutes(): Promise<Routes>;
|
|
20
|
-
static loginByChain(chain: ChainType
|
|
17
|
+
static loginByChain(chain: ChainType): Promise<AccountInfo | string>;
|
|
21
18
|
static transactByChain(chain: ChainType, address: string, transactions: any[]): Promise<string>;
|
|
22
19
|
static signTransaction(chain: ChainType, message: string): Promise<any>;
|
|
23
20
|
private static normalizeAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x46dd66=_0x294f;function _0x294f(_0x389251,_0x4f3603){_0x389251=_0x389251-0x1c0;const _0xfd6609=_0xfd66();let _0x294f57=_0xfd6609[_0x389251];return _0x294f57;}(function(_0xfe4e65,_0x44cada){const _0x102b13=_0x294f,_0x58f539=_0xfe4e65();while(!![]){try{const _0x41c76e=parseInt(_0x102b13(0x229))/0x1*(-parseInt(_0x102b13(0x1fe))/0x2)+parseInt(_0x102b13(0x20e))/0x3*(-parseInt(_0x102b13(0x203))/0x4)+-parseInt(_0x102b13(0x1e9))/0x5*(-parseInt(_0x102b13(0x217))/0x6)+parseInt(_0x102b13(0x1e8))/0x7*(parseInt(_0x102b13(0x1e2))/0x8)+-parseInt(_0x102b13(0x21c))/0x9*(-parseInt(_0x102b13(0x21d))/0xa)+-parseInt(_0x102b13(0x1f9))/0xb+parseInt(_0x102b13(0x21a))/0xc;if(_0x41c76e===_0x44cada)break;else _0x58f539['push'](_0x58f539['shift']());}catch(_0x598367){_0x58f539['push'](_0x58f539['shift']());}}}(_0xfd66,0x9f2f9));function _0xfd66(){const _0x163dfb=['/v1/interop/prepare','source','normalizeAddress','checkPreparedMessage','./httpClient','ArmoniaStrategy','all','arbitrum','Interop\x20prepared\x20actions\x20differ\x20from\x20the\x20requested\x20actions','length','success:','binargs','Interop\x20','throw','relay','proxy_contract','transaction_id','__awaiter','Wallet\x20signature\x20or\x20required\x20interop\x20fields\x20are\x20missing','wallet_signing','signTransaction','getStrategy','map','transactByChain','formatWalletSignature','default','hex','normalizeHex','SHA256','./config','sign','Interop\x20relayer\x20returned\x20no\x20transaction\x20ID','assign','sha256','/v1/interop/submit','__esModule','concat','/v1/chain/get_table_rows','crypto-js','toLowerCase','toString','connect','txns','/v1/chain/get_info','bsc','signing_message','done','test','contract','./strategies/armoniaStrategy','proxyApi','created_at','signMessage','Transaction\x20failed','walletAdapters','sleep','/v1/chain/abi_json_to_bin','158296qxiyCo','wallet_fields','Interop\x20prepared\x20request\x20differs\x20from\x20the\x20requested\x20route','action','getAccount','includes','168YkCWib','8100edpUhq','apply','chain_id','parse','./strategies/chainStrategyFactory','data','submit_args','submission_enabled','get','post','routes','owner_contract','config','signature','\x20is\x20not\x20enabled\x20for\x20','errorToString','11569547daVzKM','then','string','next','arb','813534eZHeBq','account','signing_protocol','Login\x20failed','bindingAccount','68pAbfgR','pending:','amax','message','find','Expected\x201\x20to\x2016\x20interop\x20actions','setConfig','execute','bind','__importDefault','./interopSigning','107754croIOI','isSupportedProtocol','defineProperty','/v1/interop/get_routes','ownerContract','stringify','Interop\x20relayer\x20does\x20not\x20match\x20the\x20configured\x20FullOn\x20chain\x20or\x20contracts','address','loginByChain','990huwfJm','Armonia\x20binding\x20requires\x20a\x2012-character\x20FullOn\x20account\x20name','defaultDelay','14231496scBRUk','value','2379087RetVVO','30MrxEjH','operation','proxyContract','response','nonce','some','eth','getRoutes','chainApi','ready','proxyaccts','base','1hWqpzb'];_0xfd66=function(){return _0x163dfb;};return _0xfd66();}var __awaiter=this&&this[_0x46dd66(0x23b)]||function(_0x93f0f8,_0x18160d,_0x2b45f7,_0x7105ec){function _0x40db0d(_0x529de3){return _0x529de3 instanceof _0x2b45f7?_0x529de3:new _0x2b45f7(function(_0x39664c){_0x39664c(_0x529de3);});}return new(_0x2b45f7||(_0x2b45f7=Promise))(function(_0x36641d,_0x40ca4f){const _0x5a772d=_0x294f;function _0x5d356d(_0x56ec0c){const _0x5a46ec=_0x294f;try{_0x4003e0(_0x7105ec[_0x5a46ec(0x1fc)](_0x56ec0c));}catch(_0x58d94f){_0x40ca4f(_0x58d94f);}}function _0x499faf(_0x16c88c){const _0x3ff1ad=_0x294f;try{_0x4003e0(_0x7105ec[_0x3ff1ad(0x237)](_0x16c88c));}catch(_0x486dce){_0x40ca4f(_0x486dce);}}function _0x4003e0(_0x19f6f9){const _0x2e2c18=_0x294f;_0x19f6f9[_0x2e2c18(0x1d7)]?_0x36641d(_0x19f6f9[_0x2e2c18(0x21b)]):_0x40db0d(_0x19f6f9[_0x2e2c18(0x21b)])[_0x2e2c18(0x1fa)](_0x5d356d,_0x499faf);}_0x4003e0((_0x7105ec=_0x7105ec[_0x5a772d(0x1ea)](_0x93f0f8,_0x18160d||[]))[_0x5a772d(0x1fc)]());});},__importDefault=this&&this[_0x46dd66(0x20c)]||function(_0x5be796){const _0x456fe4=_0x46dd66;return _0x5be796&&_0x5be796[_0x456fe4(0x1cc)]?_0x5be796:{'default':_0x5be796};};Object[_0x46dd66(0x210)](exports,_0x46dd66(0x1cc),{'value':!![]});const armoniaStrategy_1=require(_0x46dd66(0x1da)),crypto_js_1=__importDefault(require(_0x46dd66(0x1cf))),config_1=__importDefault(require(_0x46dd66(0x1c6))),httpClient_1=__importDefault(require(_0x46dd66(0x22e))),chainStrategyFactory_1=__importDefault(require(_0x46dd66(0x1ed))),interopSigning_1=require(_0x46dd66(0x20d));class multichainInteropJs{static[_0x46dd66(0x209)](_0x1fceea){const _0x2bfbcb=_0x46dd66;config_1[_0x2bfbcb(0x1c2)][_0x2bfbcb(0x209)](_0x1fceea);}static[_0x46dd66(0x224)](){const _0x5080a1=_0x46dd66;return new httpClient_1[(_0x5080a1(0x1c2))](config_1[_0x5080a1(0x1c2)][_0x5080a1(0x1f5)][_0x5080a1(0x1db)])[_0x5080a1(0x1f1)](_0x5080a1(0x211));}static[_0x46dd66(0x216)](_0x2bfaaa,_0x7382dd={}){var _0x5d0649,_0x22ef33,_0x4b4eda;return __awaiter(this,void 0x0,void 0x0,function*(){const _0xe07edf=_0x294f;try{const _0x50c265=config_1[_0xe07edf(0x1c2)][_0xe07edf(0x1f5)],_0x5aecac=new httpClient_1[(_0xe07edf(0x1c2))](_0x50c265[_0xe07edf(0x225)]),_0x186afb=(_0x22ef33=(_0x5d0649=_0x50c265[_0xe07edf(0x1df)])===null||_0x5d0649===void 0x0?void 0x0:_0x5d0649[_0x2bfaaa])!==null&&_0x22ef33!==void 0x0?_0x22ef33:chainStrategyFactory_1[_0xe07edf(0x1c2)][_0xe07edf(0x23f)](_0x2bfaaa),_0x5c0e02=this[_0xe07edf(0x22c)](_0x2bfaaa,yield _0x186afb[_0xe07edf(0x1d2)]());let _0x4446a6=yield this[_0xe07edf(0x1e6)](_0x5aecac,_0x50c265[_0xe07edf(0x212)],_0x5c0e02);if(!_0x4446a6){const {transaction_id:_0x5c5f01}=yield this[_0xe07edf(0x238)](_0xe07edf(0x20b),_0x2bfaaa,_0x5c0e02,[],_0x50c265,(_0x4b4eda=_0x7382dd[_0xe07edf(0x1ff)])!==null&&_0x4b4eda!==void 0x0?_0x4b4eda:_0x186afb instanceof armoniaStrategy_1[_0xe07edf(0x22f)]?_0x186afb[_0xe07edf(0x202)]:undefined);for(let _0x36978f=0x0;_0x36978f<0x3&&!_0x4446a6;++_0x36978f){if(_0x36978f)yield this[_0xe07edf(0x1e0)](_0x50c265[_0xe07edf(0x219)]);_0x4446a6=yield this[_0xe07edf(0x1e6)](_0x5aecac,_0x50c265[_0xe07edf(0x212)],_0x5c0e02);}if(!_0x4446a6)return _0xe07edf(0x204)[_0xe07edf(0x1cd)](_0x5c5f01);}return{'account':_0x4446a6[_0xe07edf(0x1ff)],'address':_0x4446a6[_0xe07edf(0x215)],'chain':_0x2bfaaa,'createdAt':_0x4446a6[_0xe07edf(0x1dc)],'nonce':_0x4446a6[_0xe07edf(0x221)]};}catch(_0x3e4ca9){return this[_0xe07edf(0x1f8)](_0x3e4ca9,_0xe07edf(0x201));}});}static[_0x46dd66(0x1c0)](_0x35e3eb,_0x18e5a0,_0x596c7c){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x4a9cc4=_0x294f;try{const {transaction_id:_0x160193}=yield this[_0x4a9cc4(0x238)](_0x4a9cc4(0x20a),_0x35e3eb,this[_0x4a9cc4(0x22c)](_0x35e3eb,_0x18e5a0),_0x596c7c,config_1[_0x4a9cc4(0x1c2)][_0x4a9cc4(0x1f5)]);return _0x4a9cc4(0x234)[_0x4a9cc4(0x1cd)](_0x160193);}catch(_0x195e28){return this[_0x4a9cc4(0x1f8)](_0x195e28,_0x4a9cc4(0x1de));}});}static[_0x46dd66(0x23e)](_0x4d730b,_0xacb167){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x54fa03=_0x294f;return chainStrategyFactory_1[_0x54fa03(0x1c2)][_0x54fa03(0x23f)](_0x4d730b)[_0x54fa03(0x1dd)](_0xacb167);});}static[_0x46dd66(0x22c)](_0x17a5db,_0x39c86c){const _0x480b00=_0x46dd66;return[_0x480b00(0x223),_0x480b00(0x1d5),_0x480b00(0x231),_0x480b00(0x228)][_0x480b00(0x1e7)](_0x17a5db)?_0x39c86c[_0x480b00(0x1d0)]():_0x39c86c;}static[_0x46dd66(0x238)](_0x186610,_0x244cbc,_0x4abf7a,_0x55604e,_0x5f0857,_0x1812e7){var _0x49f777,_0x333187;return __awaiter(this,void 0x0,void 0x0,function*(){const _0xab04dc=_0x294f,_0x35a27c=new httpClient_1[(_0xab04dc(0x1c2))](_0x5f0857[_0xab04dc(0x1db)]),_0x527585=new httpClient_1[(_0xab04dc(0x1c2))](_0x5f0857[_0xab04dc(0x225)]),_0x173019=_0x244cbc===_0xab04dc(0x231)?_0xab04dc(0x1fd):_0x244cbc,[_0x19bc85,_0x5bff19]=yield Promise[_0xab04dc(0x230)]([_0x35a27c[_0xab04dc(0x1f1)](_0xab04dc(0x211)),_0x527585[_0xab04dc(0x1f2)](_0xab04dc(0x1d4),{})]),_0x22713b=_0x19bc85[_0xab04dc(0x1f3)][_0x173019],_0x3eeaac=_0x22713b===null||_0x22713b===void 0x0?void 0x0:_0x22713b[_0x186610];if(!_0x3eeaac||_0x3eeaac[_0xab04dc(0x226)]===![]||_0x19bc85[_0xab04dc(0x1f0)]===![])throw new Error(_0xab04dc(0x236)[_0xab04dc(0x1cd)](_0x186610,_0xab04dc(0x1f7))[_0xab04dc(0x1cd)](_0x173019));if(_0x19bc85[_0xab04dc(0x1eb)]!==_0x5bff19[_0xab04dc(0x1eb)]||_0x19bc85[_0xab04dc(0x239)]!==_0x5f0857[_0xab04dc(0x21f)]||_0x19bc85[_0xab04dc(0x1f4)]!==_0x5f0857[_0xab04dc(0x212)]||!(0x0,interopSigning_1[_0xab04dc(0x20f)])(_0x19bc85[_0xab04dc(0x200)]))throw new Error(_0xab04dc(0x214));if(_0x186610===_0xab04dc(0x20a)&&(!_0x55604e[_0xab04dc(0x233)]||_0x55604e[_0xab04dc(0x233)]>0x10))throw new Error(_0xab04dc(0x208));const _0x1406d3=yield Promise[_0xab04dc(0x230)](_0x55604e[_0xab04dc(0x240)](({contract:_0x5b9b41,action:_0x544c5c,data:_0x37c86b})=>__awaiter(this,void 0x0,void 0x0,function*(){const _0x720af6=_0xab04dc;return{'contract':_0x5b9b41,'action':_0x544c5c,'data':(0x0,interopSigning_1[_0x720af6(0x1c4)])(typeof _0x37c86b===_0x720af6(0x1fb)?_0x37c86b:(yield _0x527585[_0x720af6(0x1f2)](_0x720af6(0x1e1),{'code':_0x5b9b41,'action':_0x544c5c,'args':_0x37c86b}))[_0x720af6(0x235)])};})));if(_0x186610===_0xab04dc(0x20b)&&_0x244cbc===_0xab04dc(0x205)&&!/^[a-z1-5]{12}$/[_0xab04dc(0x1d8)](_0x1812e7!==null&&_0x1812e7!==void 0x0?_0x1812e7:''))throw new Error(_0xab04dc(0x218));const _0x571a1e=yield _0x35a27c[_0xab04dc(0x1f2)](_0xab04dc(0x22a),Object[_0xab04dc(0x1c9)](Object[_0xab04dc(0x1c9)]({'operation':_0x186610,'source':_0x173019,'address':_0x4abf7a},_0x186610===_0xab04dc(0x20a)?{'txns':_0x1406d3}:{}),_0x186610===_0xab04dc(0x20b)&&_0x244cbc===_0xab04dc(0x205)?{'account':_0x1812e7}:{})),_0x39ba83=_0x571a1e[_0xab04dc(0x1ef)];if(_0x571a1e[_0xab04dc(0x1eb)]!==_0x19bc85[_0xab04dc(0x1eb)]||_0x571a1e[_0xab04dc(0x239)]!==_0x19bc85[_0xab04dc(0x239)]||_0x571a1e[_0xab04dc(0x1f4)]!==_0x19bc85[_0xab04dc(0x1f4)]||_0x571a1e[_0xab04dc(0x200)]!==_0x19bc85[_0xab04dc(0x200)]||_0x571a1e[_0xab04dc(0x23d)]!==_0x22713b[_0xab04dc(0x23d)]||_0x39ba83[_0xab04dc(0x21e)]!==_0x186610||_0x39ba83[_0xab04dc(0x22b)]!==_0x173019||_0x39ba83[_0xab04dc(0x215)]!==_0x4abf7a||_0x186610===_0xab04dc(0x20b)&&_0x244cbc===_0xab04dc(0x205)&&_0x39ba83[_0xab04dc(0x1ff)]!==_0x1812e7)throw new Error(_0xab04dc(0x1e4));if(_0x186610===_0xab04dc(0x20a)){if(((_0x49f777=_0x39ba83[_0xab04dc(0x1d3)])===null||_0x49f777===void 0x0?void 0x0:_0x49f777[_0xab04dc(0x233)])!==_0x1406d3[_0xab04dc(0x233)]||_0x1406d3[_0xab04dc(0x222)]((_0x4673b1,_0x1b4acd)=>{const _0x23295b=_0xab04dc,_0x1aadd2=_0x39ba83[_0x23295b(0x1d3)][_0x1b4acd];return _0x1aadd2[_0x23295b(0x1d9)]!==_0x4673b1[_0x23295b(0x1d9)]||_0x1aadd2[_0x23295b(0x1e5)]!==_0x4673b1[_0x23295b(0x1e5)]||(0x0,interopSigning_1[_0x23295b(0x1c4)])(_0x1aadd2[_0x23295b(0x1ee)])!==_0x4673b1[_0x23295b(0x1ee)];}))throw new Error(_0xab04dc(0x232));}(0x0,interopSigning_1[_0xab04dc(0x22d)])(_0x571a1e);const _0x804a74=(_0x333187=_0x5f0857[_0xab04dc(0x1df)])===null||_0x333187===void 0x0?void 0x0:_0x333187[_0x244cbc],_0x483f02=_0x804a74?yield _0x804a74[_0xab04dc(0x1c7)](JSON[_0xab04dc(0x1ec)](JSON[_0xab04dc(0x213)](_0x571a1e))):(0x0,interopSigning_1[_0xab04dc(0x1c1)])(_0x571a1e,yield this[_0xab04dc(0x23e)](_0x244cbc,_0x571a1e[_0xab04dc(0x1d6)]));if(!_0x483f02[_0xab04dc(0x1f6)]||_0x3eeaac[_0xab04dc(0x1e3)][_0xab04dc(0x222)](_0x1640f6=>{const _0x51ba9f=_0xab04dc;var _0x59b22b;return((_0x59b22b=_0x483f02[_0x51ba9f(0x1e3)])===null||_0x59b22b===void 0x0?void 0x0:_0x59b22b[_0x1640f6])===undefined;}))throw new Error(_0xab04dc(0x23c));if(_0x244cbc===_0xab04dc(0x205))(0x0,interopSigning_1[_0xab04dc(0x1c1)])(_0x571a1e,_0x483f02[_0xab04dc(0x1f6)]);(0x0,interopSigning_1[_0xab04dc(0x22d)])(_0x571a1e);const _0x572730=yield _0x35a27c[_0xab04dc(0x1f2)](_0xab04dc(0x1cb),Object[_0xab04dc(0x1c9)](Object[_0xab04dc(0x1c9)]({},_0x39ba83),{'signature':_0x483f02[_0xab04dc(0x1f6)],'wallet_fields':_0x483f02[_0xab04dc(0x1e3)]}));if(!/^[a-f0-9]{64}$/i[_0xab04dc(0x1d8)](_0x572730[_0xab04dc(0x23a)]))throw new Error(_0xab04dc(0x1c8));return _0x572730;});}static[_0x46dd66(0x1e6)](_0x4afa52,_0x5f4f80,_0x28a32b){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x215595=_0x294f,_0x5a3ca2=crypto_js_1[_0x215595(0x1c2)][_0x215595(0x1c5)](_0x28a32b)[_0x215595(0x1d1)](),{rows:_0x34723d}=yield _0x4afa52[_0x215595(0x1f2)](_0x215595(0x1ce),{'code':_0x5f4f80,'scope':_0x5f4f80,'table':_0x215595(0x227),'index_position':0x2,'key_type':_0x215595(0x1ca),'encode_type':_0x215595(0x1c3),'lower_bound':_0x5a3ca2,'upper_bound':_0x5a3ca2,'json':!![],'limit':0x1});return _0x34723d[_0x215595(0x207)](_0x176c50=>_0x176c50[_0x215595(0x215)]===_0x28a32b);});}static[_0x46dd66(0x1f8)](_0x22ab00,_0x219ec9){const _0x5e94e1=_0x46dd66;var _0x158474,_0x4e0265,_0x578b95;const _0x50b377=_0x22ab00,_0x1e1c59=(_0x578b95=(_0x4e0265=(_0x158474=_0x50b377===null||_0x50b377===void 0x0?void 0x0:_0x50b377[_0x5e94e1(0x220)])===null||_0x158474===void 0x0?void 0x0:_0x158474[_0x5e94e1(0x1ee)])===null||_0x4e0265===void 0x0?void 0x0:_0x4e0265[_0x5e94e1(0x206)])!==null&&_0x578b95!==void 0x0?_0x578b95:_0x22ab00 instanceof Error?_0x22ab00[_0x5e94e1(0x206)]:String(_0x22ab00);return''[_0x5e94e1(0x1cd)](_0x219ec9,'%')[_0x5e94e1(0x1cd)](_0x1e1c59);}}multichainInteropJs[_0x46dd66(0x1e0)]=_0x269453=>new Promise(_0x5f56bd=>setTimeout(_0x5f56bd,_0x269453)),exports[_0x46dd66(0x1c2)]=multichainInteropJs;
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
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;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ChainType = "
|
|
1
|
+
export type ChainType = "eth" | "bsc" | "arbitrum" | "base" | "solana" | "tron" | "statter" | "btc" | "ton";
|
|
2
2
|
export interface AccountInfo {
|
|
3
3
|
account: string;
|
|
4
4
|
address: string;
|
|
@@ -45,7 +45,3 @@ export interface InteropPrepared {
|
|
|
45
45
|
}[];
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
export interface InteropLoginOptions {
|
|
49
|
-
/** Requested FullOn account name for a new Armonia binding. */
|
|
50
|
-
account?: string;
|
|
51
|
-
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
|
-
"version": "4.0.
|
|
7
|
+
"version": "4.0.5",
|
|
8
8
|
"description": "A simple Web3 wallet connector supporting Ethereum, Solana, Tron, and Arbitrum.",
|
|
9
9
|
"main": "./lib/index.js",
|
|
10
10
|
"types": "./lib/index.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const _0x27bf7d=_0x2453;(function(_0x320d98,_0x35844b){const _0x4f9363=_0x2453,_0x2eb27c=_0x320d98();while(!![]){try{const _0x21a422=-parseInt(_0x4f9363(0x1d5))/0x1+-parseInt(_0x4f9363(0x1ce))/0x2+parseInt(_0x4f9363(0x1e1))/0x3+parseInt(_0x4f9363(0x1d3))/0x4+-parseInt(_0x4f9363(0x1de))/0x5+parseInt(_0x4f9363(0x1d1))/0x6*(-parseInt(_0x4f9363(0x1da))/0x7)+parseInt(_0x4f9363(0x1dd))/0x8*(parseInt(_0x4f9363(0x1ef))/0x9);if(_0x21a422===_0x35844b)break;else _0x2eb27c['push'](_0x2eb27c['shift']());}catch(_0xcaaaee){_0x2eb27c['push'](_0x2eb27c['shift']());}}}(_0x5028,0xf035e));function _0x2453(_0x528197,_0x3881f4){_0x528197=_0x528197-0x1c8;const _0x50283c=_0x5028();let _0x2453ea=_0x50283c[_0x528197];return _0x2453ea;}var __awaiter=this&&this[_0x27bf7d(0x1c8)]||function(_0x38cd06,_0x345e0c,_0x51b85c,_0x1014c2){function _0xc8f37c(_0x48e65b){return _0x48e65b instanceof _0x51b85c?_0x48e65b:new _0x51b85c(function(_0x3d3ea3){_0x3d3ea3(_0x48e65b);});}return new(_0x51b85c||(_0x51b85c=Promise))(function(_0x1cdb9a,_0x2bda97){const _0x1dbce2=_0x2453;function _0x11e917(_0xae0678){const _0x1b44ed=_0x2453;try{_0x57b3cf(_0x1014c2[_0x1b44ed(0x1e5)](_0xae0678));}catch(_0x5f007b){_0x2bda97(_0x5f007b);}}function _0x5d1e4b(_0x2b7cb6){const _0x48e4df=_0x2453;try{_0x57b3cf(_0x1014c2[_0x48e4df(0x1d6)](_0x2b7cb6));}catch(_0x4b1b6f){_0x2bda97(_0x4b1b6f);}}function _0x57b3cf(_0x53a570){const _0x44b91f=_0x2453;_0x53a570[_0x44b91f(0x1c9)]?_0x1cdb9a(_0x53a570[_0x44b91f(0x1d0)]):_0xc8f37c(_0x53a570[_0x44b91f(0x1d0)])[_0x44b91f(0x1cf)](_0x11e917,_0x5d1e4b);}_0x57b3cf((_0x1014c2=_0x1014c2[_0x1dbce2(0x1d8)](_0x38cd06,_0x345e0c||[]))[_0x1dbce2(0x1e5)]());});};Object[_0x27bf7d(0x1d4)](exports,_0x27bf7d(0x1cb),{'value':!![]}),exports[_0x27bf7d(0x1cc)]=void 0x0;const antelope_1=require(_0x27bf7d(0x1db)),ethers_1=require(_0x27bf7d(0x1f4)),base_1=require(_0x27bf7d(0x1d9));class ArmoniaStrategy extends base_1[_0x27bf7d(0x1eb)]{[_0x27bf7d(0x1e4)](){const _0x5fb19a=_0x27bf7d,_0x306555=window[_0x5fb19a(0x1f5)];if(!_0x306555)throw new Error(_0x5fb19a(0x1e6));return _0x306555;}[_0x27bf7d(0x1f1)](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x44dca4=_0x2453,[_0x49c523]=yield this[_0x44dca4(0x1e4)]()[_0x44dca4(0x1e9)]();if(!(_0x49c523===null||_0x49c523===void 0x0?void 0x0:_0x49c523[_0x44dca4(0x1e8)])||!_0x49c523[_0x44dca4(0x1cd)])throw new Error(_0x44dca4(0x1f0));const _0x566e5c=_0x49c523[_0x44dca4(0x1e8)][_0x44dca4(0x1e3)](/^(AMAX|FU)/,_0x44dca4(0x1f2)),_0x1f1942=antelope_1[_0x44dca4(0x1ec)][_0x44dca4(0x1d2)](_0x566e5c);if(_0x1f1942[_0x44dca4(0x1e7)]!=='K1')throw new Error(_0x44dca4(0x1d7));return this[_0x44dca4(0x1f3)]=_0x49c523[_0x44dca4(0x1cd)],this[_0x44dca4(0x1ca)]=_0x44dca4(0x1e2)+ethers_1[_0x44dca4(0x1f4)][_0x44dca4(0x1ee)](_0x1f1942[_0x44dca4(0x1ea)][_0x44dca4(0x1df)])[_0x44dca4(0x1dc)](0x2),this[_0x44dca4(0x1ca)];});}[_0x27bf7d(0x1e0)](_0x9a98bd){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x53aed0=_0x2453,_0xd2617d=this[_0x53aed0(0x1ca)],_0xdeb869=yield this[_0x53aed0(0x1f1)]();if(_0xd2617d&&_0xd2617d!==_0xdeb869)throw new Error(_0x53aed0(0x1ed));return this[_0x53aed0(0x1e4)]()[_0x53aed0(0x1e0)](_0x9a98bd);});}}exports[_0x27bf7d(0x1cc)]=ArmoniaStrategy;function _0x5028(){const _0x3ac479=['publicKey','requestAccounts','data','BaseChainStrategy','PublicKey','Armonia\x20account\x20changed;\x20reconnect\x20the\x20wallet','hexlify','477nUzRGw','No\x20Armonia\x20account\x20selected','connect','EOS','bindingAccount','ethers','armadillo','__awaiter','done','identity','__esModule','ArmoniaStrategy','account','2633338ANJDpi','then','value','2444478IuSGOJ','from','872116IOMFLo','defineProperty','655377BaEDHP','throw','Armonia\x20requires\x20a\x20K1\x20public\x20key','apply','./base','14Jqzajr','@wharfkit/antelope','slice','527816aCmqlv','2896930cZjNzx','array','signMessage','1906050FKbjjT','amax:','replace','provider','next','Armonia\x20Armadillo\x20wallet\x20not\x20found','type'];_0x5028=function(){return _0x3ac479;};return _0x5028();}
|