@talken/talkenkit 2.5.6 → 2.5.8
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 +2 -2
- package/dist/{abcWallet-QJ5BKEXW.js → abcWallet-I7VJMOVP.js} +1 -1
- package/dist/{chunk-VMJ25FLU.js → chunk-SKVG45TX.js} +10 -37
- package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthFlow.d.ts +7 -1
- package/dist/index.css +14 -14
- package/dist/index.js +52 -48
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +5 -5
- package/dist/wallets/walletConnectors/abcWallet/index.js +25 -25
- package/dist/wallets/walletConnectors/{chunk-H2HUW5JH.js → chunk-EKGPNKHR.js} +7 -3
- package/dist/wallets/walletConnectors/{chunk-KNITZFAP.js → chunk-IIXEHCZU.js} +8 -39
- package/dist/wallets/walletConnectors/{chunk-DW36LXIV.js → chunk-SQY7HBRK.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-HKMJ67FD.js → chunk-WDL3NM5W.js} +1 -1
- package/dist/wallets/walletConnectors/index.js +50 -50
- package/dist/wallets/walletConnectors/klipWallet/klipWallet.js +1 -1
- package/package.json +1 -1
- package/dist/AbcCredentialManager-DDHLW2IH.js +0 -7
- package/dist/abcWallet-2BVT5XFX.js +0 -161
- package/dist/abcWallet-BFCI4NEM.js +0 -162
- package/dist/abcWallet-MNJ2CACG.js +0 -162
- package/dist/abcWallet-ZCHM5OL7.js +0 -162
- package/dist/chunk-ALBABQ53.js +0 -354
- package/dist/chunk-KOK5ZBR4.js +0 -5447
- package/dist/chunk-MXXQYQP6.js +0 -6233
- package/dist/chunk-WPRIYR63.js +0 -6206
- package/dist/chunk-YORGXWYS.js +0 -6232
- package/dist/wallets/walletConnectors/chunk-23ABL6OP.js +0 -65
- package/dist/wallets/walletConnectors/chunk-2647P3SA.js +0 -103
- package/dist/wallets/walletConnectors/chunk-26RJNF7V.js +0 -48
- package/dist/wallets/walletConnectors/chunk-2N244XPQ.js +0 -380
- package/dist/wallets/walletConnectors/chunk-2W6UBYKX.js +0 -66
- package/dist/wallets/walletConnectors/chunk-35YXKHTA.js +0 -93
- package/dist/wallets/walletConnectors/chunk-3DSTZ3UG.js +0 -30
- package/dist/wallets/walletConnectors/chunk-3IVTKZ7V.js +0 -87
- package/dist/wallets/walletConnectors/chunk-3MNX7E5G.js +0 -101
- package/dist/wallets/walletConnectors/chunk-3OO564GS.js +0 -49
- package/dist/wallets/walletConnectors/chunk-3RMYBZQG.js +0 -46
- package/dist/wallets/walletConnectors/chunk-4L5UWERJ.js +0 -66
- package/dist/wallets/walletConnectors/chunk-4M2YTGZ3.js +0 -66
- package/dist/wallets/walletConnectors/chunk-4T3UOJYR.js +0 -76
- package/dist/wallets/walletConnectors/chunk-4XASX4ZB.js +0 -96
- package/dist/wallets/walletConnectors/chunk-53IBFGVW.js +0 -102
- package/dist/wallets/walletConnectors/chunk-5CPUXQYD.js +0 -73
- package/dist/wallets/walletConnectors/chunk-5NM2LK2G.js +0 -95
- package/dist/wallets/walletConnectors/chunk-5QHPQU7J.js +0 -55
- package/dist/wallets/walletConnectors/chunk-5VWKDJXD.js +0 -93
- package/dist/wallets/walletConnectors/chunk-6BGUJ5Q6.js +0 -96
- package/dist/wallets/walletConnectors/chunk-6C3GUS6I.js +0 -73
- package/dist/wallets/walletConnectors/chunk-6SUL2VHF.js +0 -32
- package/dist/wallets/walletConnectors/chunk-6UGYPEQE.js +0 -56
- package/dist/wallets/walletConnectors/chunk-6WF4SXLB.js +0 -156
- package/dist/wallets/walletConnectors/chunk-7URFB6QL.js +0 -51
- package/dist/wallets/walletConnectors/chunk-7VF7KE2P.js +0 -45
- package/dist/wallets/walletConnectors/chunk-A2XAHJNR.js +0 -66
- package/dist/wallets/walletConnectors/chunk-A66MTFML.js +0 -223
- package/dist/wallets/walletConnectors/chunk-A6NLGFMN.js +0 -49
- package/dist/wallets/walletConnectors/chunk-ACLPF2UW.js +0 -96
- package/dist/wallets/walletConnectors/chunk-AKLKCDXT.js +0 -186
- package/dist/wallets/walletConnectors/chunk-ATQWOE4J.js +0 -110
- package/dist/wallets/walletConnectors/chunk-B4IG5R5M.js +0 -53
- package/dist/wallets/walletConnectors/chunk-B6DM7J4N.js +0 -71
- package/dist/wallets/walletConnectors/chunk-BHEVY4QY.js +0 -827
- package/dist/wallets/walletConnectors/chunk-BJ3DTYZ7.js +0 -87
- package/dist/wallets/walletConnectors/chunk-BJYSWRV6.js +0 -93
- package/dist/wallets/walletConnectors/chunk-BKQPOZI3.js +0 -102
- package/dist/wallets/walletConnectors/chunk-BXH3GDX5.js +0 -273
- package/dist/wallets/walletConnectors/chunk-C7S72VGD.js +0 -93
- package/dist/wallets/walletConnectors/chunk-CABLJOMU.js +0 -194
- package/dist/wallets/walletConnectors/chunk-CCM24R6M.js +0 -76
- package/dist/wallets/walletConnectors/chunk-CCZUA25H.js +0 -102
- package/dist/wallets/walletConnectors/chunk-CFBCIVO2.js +0 -26
- package/dist/wallets/walletConnectors/chunk-CFJEBVAU.js +0 -94
- package/dist/wallets/walletConnectors/chunk-CP45RGL4.js +0 -45
- package/dist/wallets/walletConnectors/chunk-CULIWWLV.js +0 -101
- package/dist/wallets/walletConnectors/chunk-CYYTCX6W.js +0 -95
- package/dist/wallets/walletConnectors/chunk-D7U5WEH2.js +0 -96
- package/dist/wallets/walletConnectors/chunk-DDW42EKN.js +0 -91
- package/dist/wallets/walletConnectors/chunk-DGVQMUPS.js +0 -27
- package/dist/wallets/walletConnectors/chunk-DIWTXF2C.js +0 -76
- package/dist/wallets/walletConnectors/chunk-DJPJQZX4.js +0 -94
- package/dist/wallets/walletConnectors/chunk-DLVLYRV4.js +0 -108
- package/dist/wallets/walletConnectors/chunk-DMQ4RXIY.js +0 -55
- package/dist/wallets/walletConnectors/chunk-DPME4O44.js +0 -87
- package/dist/wallets/walletConnectors/chunk-DPTDOCWL.js +0 -205
- package/dist/wallets/walletConnectors/chunk-DSTY7YNG.js +0 -96
- package/dist/wallets/walletConnectors/chunk-DVLTKWTZ.js +0 -91
- package/dist/wallets/walletConnectors/chunk-DVXPOWEC.js +0 -52
- package/dist/wallets/walletConnectors/chunk-DW37ROR6.js +0 -98
- package/dist/wallets/walletConnectors/chunk-DZB25PZ7.js +0 -45
- package/dist/wallets/walletConnectors/chunk-E4UMOJTY.js +0 -66
- package/dist/wallets/walletConnectors/chunk-EFYKBPOB.js +0 -53
- package/dist/wallets/walletConnectors/chunk-EM6BREIH.js +0 -108
- package/dist/wallets/walletConnectors/chunk-EYN3CVFM.js +0 -26
- package/dist/wallets/walletConnectors/chunk-F2AMOWPX.js +0 -96
- package/dist/wallets/walletConnectors/chunk-F2HJ4GJ2.js +0 -94
- package/dist/wallets/walletConnectors/chunk-F3ZQ26OQ.js +0 -96
- package/dist/wallets/walletConnectors/chunk-F7IHQMO4.js +0 -50
- package/dist/wallets/walletConnectors/chunk-FBI7UGNO.js +0 -95
- package/dist/wallets/walletConnectors/chunk-FBJ5H6PM.js +0 -300
- package/dist/wallets/walletConnectors/chunk-FXDRSDNB.js +0 -98
- package/dist/wallets/walletConnectors/chunk-G6SV7RAS.js +0 -58
- package/dist/wallets/walletConnectors/chunk-GDGRUMZB.js +0 -17
- package/dist/wallets/walletConnectors/chunk-GF7RKBNV.js +0 -96
- package/dist/wallets/walletConnectors/chunk-GILMNC3J.js +0 -96
- package/dist/wallets/walletConnectors/chunk-H2QKR36C.js +0 -27
- package/dist/wallets/walletConnectors/chunk-H4VBRXN6.js +0 -83
- package/dist/wallets/walletConnectors/chunk-H4VSZRGU.js +0 -55
- package/dist/wallets/walletConnectors/chunk-H7BUMNEW.js +0 -95
- package/dist/wallets/walletConnectors/chunk-HDQGXV3R.js +0 -46
- package/dist/wallets/walletConnectors/chunk-HQBZ7PGP.js +0 -186
- package/dist/wallets/walletConnectors/chunk-HVRLX7AA.js +0 -66
- package/dist/wallets/walletConnectors/chunk-I6ISQP34.js +0 -58
- package/dist/wallets/walletConnectors/chunk-I6ONK6DO.js +0 -95
- package/dist/wallets/walletConnectors/chunk-I6W6WEWT.js +0 -108
- package/dist/wallets/walletConnectors/chunk-IM7DEERX.js +0 -585
- package/dist/wallets/walletConnectors/chunk-IPBHKWE2.js +0 -56
- package/dist/wallets/walletConnectors/chunk-ITLTDJ3D.js +0 -101
- package/dist/wallets/walletConnectors/chunk-J3YPHDHM.js +0 -827
- package/dist/wallets/walletConnectors/chunk-J6CYMZSQ.js +0 -101
- package/dist/wallets/walletConnectors/chunk-JADQLTFW.js +0 -194
- package/dist/wallets/walletConnectors/chunk-JBVBQUCS.js +0 -73
- package/dist/wallets/walletConnectors/chunk-JCCRWFI3.js +0 -110
- package/dist/wallets/walletConnectors/chunk-JKMRKLME.js +0 -69
- package/dist/wallets/walletConnectors/chunk-JWO4ZQLK.js +0 -98
- package/dist/wallets/walletConnectors/chunk-JYCEB5ON.js +0 -50
- package/dist/wallets/walletConnectors/chunk-K6GEK4JB.js +0 -66
- package/dist/wallets/walletConnectors/chunk-K6UZPSBG.js +0 -94
- package/dist/wallets/walletConnectors/chunk-KE6RMEB7.js +0 -93
- package/dist/wallets/walletConnectors/chunk-KGH4QAHQ.js +0 -96
- package/dist/wallets/walletConnectors/chunk-KM55XFBI.js +0 -65
- package/dist/wallets/walletConnectors/chunk-KVQ4CBWP.js +0 -71
- package/dist/wallets/walletConnectors/chunk-L3HWFGTN.js +0 -843
- package/dist/wallets/walletConnectors/chunk-L6WDO3ZN.js +0 -445
- package/dist/wallets/walletConnectors/chunk-LGCRA2U5.js +0 -98
- package/dist/wallets/walletConnectors/chunk-LJJRLODJ.js +0 -17
- package/dist/wallets/walletConnectors/chunk-LRMXMK73.js +0 -407
- package/dist/wallets/walletConnectors/chunk-LRYS2XBT.js +0 -110
- package/dist/wallets/walletConnectors/chunk-MBBGZGXF.js +0 -86
- package/dist/wallets/walletConnectors/chunk-MO2AXXLI.js +0 -30
- package/dist/wallets/walletConnectors/chunk-MUJPEDFF.js +0 -93
- package/dist/wallets/walletConnectors/chunk-NHZMJSPE.js +0 -98
- package/dist/wallets/walletConnectors/chunk-NLA45GHJ.js +0 -300
- package/dist/wallets/walletConnectors/chunk-NMVFC2I3.js +0 -45
- package/dist/wallets/walletConnectors/chunk-NN4KGG3I.js +0 -45
- package/dist/wallets/walletConnectors/chunk-NSEEU5C7.js +0 -66
- package/dist/wallets/walletConnectors/chunk-NU3ITJNK.js +0 -1485
- package/dist/wallets/walletConnectors/chunk-NULM3THX.js +0 -241
- package/dist/wallets/walletConnectors/chunk-OAVY2K7F.js +0 -73
- package/dist/wallets/walletConnectors/chunk-OK4EYIVU.js +0 -378
- package/dist/wallets/walletConnectors/chunk-OMOYFHBT.js +0 -1485
- package/dist/wallets/walletConnectors/chunk-OOCL4OPQ.js +0 -378
- package/dist/wallets/walletConnectors/chunk-OQO5G6D5.js +0 -95
- package/dist/wallets/walletConnectors/chunk-OWSLCYOF.js +0 -103
- package/dist/wallets/walletConnectors/chunk-OX3PQBV2.js +0 -53
- package/dist/wallets/walletConnectors/chunk-PEMOUMS3.js +0 -45
- package/dist/wallets/walletConnectors/chunk-PHF4VWKP.js +0 -51
- package/dist/wallets/walletConnectors/chunk-PHROL2KX.js +0 -71
- package/dist/wallets/walletConnectors/chunk-PKSDTWUF.js +0 -94
- package/dist/wallets/walletConnectors/chunk-PZTCKFMV.js +0 -52
- package/dist/wallets/walletConnectors/chunk-QD3GTY5X.js +0 -98
- package/dist/wallets/walletConnectors/chunk-QSR4D74E.js +0 -378
- package/dist/wallets/walletConnectors/chunk-R5EIXDO7.js +0 -98
- package/dist/wallets/walletConnectors/chunk-RCZCJUTR.js +0 -95
- package/dist/wallets/walletConnectors/chunk-S2PY4MDO.js +0 -108
- package/dist/wallets/walletConnectors/chunk-S6PEOLL3.js +0 -91
- package/dist/wallets/walletConnectors/chunk-SCOX5RF4.js +0 -91
- package/dist/wallets/walletConnectors/chunk-SDRE2D5I.js +0 -378
- package/dist/wallets/walletConnectors/chunk-SHOOZFML.js +0 -95
- package/dist/wallets/walletConnectors/chunk-STRBBO45.js +0 -58
- package/dist/wallets/walletConnectors/chunk-TPQX36FR.js +0 -186
- package/dist/wallets/walletConnectors/chunk-TUDZHFVC.js +0 -76
- package/dist/wallets/walletConnectors/chunk-TVRV7B5N.js +0 -110
- package/dist/wallets/walletConnectors/chunk-U24COF36.js +0 -32
- package/dist/wallets/walletConnectors/chunk-UIZRBU3F.js +0 -94
- package/dist/wallets/walletConnectors/chunk-UXRQQZ2M.js +0 -50
- package/dist/wallets/walletConnectors/chunk-UZWMFUJU.js +0 -65
- package/dist/wallets/walletConnectors/chunk-V6J5RYPW.js +0 -53
- package/dist/wallets/walletConnectors/chunk-V7E5KRXJ.js +0 -103
- package/dist/wallets/walletConnectors/chunk-VDWJ3NQ5.js +0 -52
- package/dist/wallets/walletConnectors/chunk-VM4OQZLZ.js +0 -48
- package/dist/wallets/walletConnectors/chunk-VMCIDCO5.js +0 -54
- package/dist/wallets/walletConnectors/chunk-VNL7XEWF.js +0 -54
- package/dist/wallets/walletConnectors/chunk-VPNHMRSO.js +0 -65
- package/dist/wallets/walletConnectors/chunk-VUMT22HL.js +0 -186
- package/dist/wallets/walletConnectors/chunk-W5RLBS44.js +0 -96
- package/dist/wallets/walletConnectors/chunk-WB7EEKPS.js +0 -50
- package/dist/wallets/walletConnectors/chunk-WSLFMQIG.js +0 -98
- package/dist/wallets/walletConnectors/chunk-WSNGX6YG.js +0 -87
- package/dist/wallets/walletConnectors/chunk-WXXI4WBF.js +0 -71
- package/dist/wallets/walletConnectors/chunk-X2B7QZZE.js +0 -102
- package/dist/wallets/walletConnectors/chunk-XF73ULPJ.js +0 -378
- package/dist/wallets/walletConnectors/chunk-XHS5TWNG.js +0 -58
- package/dist/wallets/walletConnectors/chunk-XOHFJA7X.js +0 -55
- package/dist/wallets/walletConnectors/chunk-Y3E6EZ7J.js +0 -30
- package/dist/wallets/walletConnectors/chunk-YMP3W2MO.js +0 -27
- package/dist/wallets/walletConnectors/chunk-YQTKJ7GF.js +0 -58
- package/dist/wallets/walletConnectors/chunk-YV6IZWGE.js +0 -393
- package/dist/wallets/walletConnectors/chunk-Z2E65XSS.js +0 -96
- package/dist/wallets/walletConnectors/chunk-Z3TWAZA5.js +0 -103
- package/dist/wallets/walletConnectors/chunk-ZFVYS64S.js +0 -96
- package/dist/wallets/walletConnectors/chunk-ZHFDEYPR.js +0 -53
- package/dist/wallets/walletConnectors/chunk-ZRY6ILYP.js +0 -27
- package/dist/wallets/walletConnectors/chunk-ZYWSQ3LI.js +0 -53
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-H4VBRXN6.js";
|
|
6
|
-
|
|
7
|
-
// src/utils/browsers.ts
|
|
8
|
-
function isSafari() {
|
|
9
|
-
return typeof navigator !== "undefined" && typeof navigator.userAgent !== "undefined" && /Version\/([0-9._]+).*Safari/.test(navigator.userAgent);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// src/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.ts
|
|
13
|
-
var tokenaryWallet = () => ({
|
|
14
|
-
id: "tokenary",
|
|
15
|
-
name: "Tokenary",
|
|
16
|
-
iconUrl: async () => (await import("./tokenaryWallet-Z2IGVXSA.js")).default,
|
|
17
|
-
iconBackground: "#ffffff",
|
|
18
|
-
installed: hasInjectedProvider({ flag: "isTokenary" }),
|
|
19
|
-
hidden: () => !isSafari(),
|
|
20
|
-
downloadUrls: {
|
|
21
|
-
ios: "https://tokenary.io/get",
|
|
22
|
-
mobile: "https://tokenary.io",
|
|
23
|
-
qrCode: "https://tokenary.io/get",
|
|
24
|
-
safari: "https://tokenary.io/get",
|
|
25
|
-
browserExtension: "https://tokenary.io/get"
|
|
26
|
-
},
|
|
27
|
-
createConnector: getInjectedConnector({ flag: "isTokenary" })
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export {
|
|
31
|
-
tokenaryWallet
|
|
32
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-MBBGZGXF.js";
|
|
6
|
-
|
|
7
|
-
// src/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.ts
|
|
8
|
-
var oneKeyWallet = () => {
|
|
9
|
-
return {
|
|
10
|
-
id: "onekey",
|
|
11
|
-
name: "OneKey",
|
|
12
|
-
rdns: "so.onekey.app.wallet",
|
|
13
|
-
iconAccent: "#00B812",
|
|
14
|
-
iconBackground: "#fff",
|
|
15
|
-
iconUrl: async () => (await import("./oneKeyWallet-4MM7G2SZ.js")).default,
|
|
16
|
-
installed: hasInjectedProvider({ namespace: "$onekey.ethereum" }),
|
|
17
|
-
downloadUrls: {
|
|
18
|
-
android: "https://play.google.com/store/apps/details?id=so.onekey.app.wallet",
|
|
19
|
-
browserExtension: "https://www.onekey.so/download/",
|
|
20
|
-
chrome: "https://chrome.google.com/webstore/detail/onekey/jnmbobjmhlngoefaiojfljckilhhlhcj",
|
|
21
|
-
edge: "https://microsoftedge.microsoft.com/addons/detail/onekey/obffkkagpmohennipjokmpllocnlndac",
|
|
22
|
-
ios: "https://apps.apple.com/us/app/onekey-open-source-wallet/id1609559473",
|
|
23
|
-
mobile: "https://www.onekey.so/download/",
|
|
24
|
-
qrCode: "https://www.onekey.so/download/"
|
|
25
|
-
},
|
|
26
|
-
extension: {
|
|
27
|
-
instructions: {
|
|
28
|
-
learnMoreUrl: "https://help.onekey.so/hc/en-us/categories/360000170236",
|
|
29
|
-
steps: [
|
|
30
|
-
{
|
|
31
|
-
description: "wallet_connectors.one_key.extension.step1.description",
|
|
32
|
-
step: "install",
|
|
33
|
-
title: "wallet_connectors.one_key.extension.step1.title"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
description: "wallet_connectors.one_key.extension.step2.description",
|
|
37
|
-
step: "create",
|
|
38
|
-
title: "wallet_connectors.one_key.extension.step2.title"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
description: "wallet_connectors.one_key.extension.step3.description",
|
|
42
|
-
step: "refresh",
|
|
43
|
-
title: "wallet_connectors.one_key.extension.step3.title"
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
createConnector: getInjectedConnector({
|
|
49
|
-
namespace: "$onekey.ethereum"
|
|
50
|
-
})
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export {
|
|
55
|
-
oneKeyWallet
|
|
56
|
-
};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
STORAGE_PREFIX
|
|
4
|
-
} from "./chunk-DPTDOCWL.js";
|
|
5
|
-
|
|
6
|
-
// src/wallets/walletConnectors/abcWallet/AbcCredentialManager.ts
|
|
7
|
-
var EMAIL_STORAGE_KEY = `${STORAGE_PREFIX}saved_email`;
|
|
8
|
-
var AUTH_STATE_KEY = `${STORAGE_PREFIX}auth_state`;
|
|
9
|
-
var EVM_CREDS_SESSION_KEY = `${STORAGE_PREFIX}evm_signing_creds`;
|
|
10
|
-
var PIN_HASH_SESSION_KEY = `${STORAGE_PREFIX}pin_hash`;
|
|
11
|
-
var AbcCredentialManager = class _AbcCredentialManager {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.pinHash = null;
|
|
14
|
-
this.email_ = null;
|
|
15
|
-
this.restoreEmailFromStorage();
|
|
16
|
-
}
|
|
17
|
-
static getInstance() {
|
|
18
|
-
if (!_AbcCredentialManager.instance) {
|
|
19
|
-
_AbcCredentialManager.instance = new _AbcCredentialManager();
|
|
20
|
-
}
|
|
21
|
-
return _AbcCredentialManager.instance;
|
|
22
|
-
}
|
|
23
|
-
// ── PIN Hash (memory + sessionStorage) ───────────────────────────
|
|
24
|
-
setPinHash(hash) {
|
|
25
|
-
this.pinHash = hash;
|
|
26
|
-
if (typeof window !== "undefined") {
|
|
27
|
-
try {
|
|
28
|
-
sessionStorage.setItem(PIN_HASH_SESSION_KEY, hash);
|
|
29
|
-
} catch {
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
getPinHash() {
|
|
34
|
-
if (this.pinHash)
|
|
35
|
-
return this.pinHash;
|
|
36
|
-
if (typeof window !== "undefined") {
|
|
37
|
-
try {
|
|
38
|
-
const cached = sessionStorage.getItem(PIN_HASH_SESSION_KEY);
|
|
39
|
-
if (cached) {
|
|
40
|
-
this.pinHash = cached;
|
|
41
|
-
return cached;
|
|
42
|
-
}
|
|
43
|
-
} catch {
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
clearPinHash() {
|
|
49
|
-
this.pinHash = null;
|
|
50
|
-
if (typeof window !== "undefined") {
|
|
51
|
-
try {
|
|
52
|
-
sessionStorage.removeItem(PIN_HASH_SESSION_KEY);
|
|
53
|
-
} catch {
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
// ── Email ─────────────────────────────────────────────────────────
|
|
58
|
-
setEmail(email) {
|
|
59
|
-
this.email_ = email;
|
|
60
|
-
if (typeof window !== "undefined") {
|
|
61
|
-
try {
|
|
62
|
-
localStorage.setItem(EMAIL_STORAGE_KEY, email);
|
|
63
|
-
} catch {
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Get recovery email.
|
|
69
|
-
* Priority: in-memory → auth_state JSON → saved_email localStorage
|
|
70
|
-
*/
|
|
71
|
-
getEmail() {
|
|
72
|
-
if (this.email_)
|
|
73
|
-
return this.email_;
|
|
74
|
-
if (typeof window === "undefined")
|
|
75
|
-
return null;
|
|
76
|
-
try {
|
|
77
|
-
const authState = localStorage.getItem(AUTH_STATE_KEY);
|
|
78
|
-
if (authState) {
|
|
79
|
-
const data = JSON.parse(authState);
|
|
80
|
-
const email = data?.user?.email || data?.wallet?.email;
|
|
81
|
-
if (typeof email === "string" && email.trim()) {
|
|
82
|
-
this.email_ = email.trim();
|
|
83
|
-
return this.email_;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
} catch {
|
|
87
|
-
}
|
|
88
|
-
try {
|
|
89
|
-
const saved = localStorage.getItem(EMAIL_STORAGE_KEY);
|
|
90
|
-
if (saved?.trim()) {
|
|
91
|
-
this.email_ = saved.trim();
|
|
92
|
-
return this.email_;
|
|
93
|
-
}
|
|
94
|
-
} catch {
|
|
95
|
-
}
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
// ── EVM Signing Credentials (sessionStorage — tab-scoped) ────────
|
|
99
|
-
setEvmSigningCredentials(creds) {
|
|
100
|
-
if (typeof window === "undefined")
|
|
101
|
-
return;
|
|
102
|
-
try {
|
|
103
|
-
sessionStorage.setItem(EVM_CREDS_SESSION_KEY, JSON.stringify(creds));
|
|
104
|
-
} catch {
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
getEvmSigningCredentials() {
|
|
108
|
-
if (typeof window === "undefined")
|
|
109
|
-
return null;
|
|
110
|
-
try {
|
|
111
|
-
const raw = sessionStorage.getItem(EVM_CREDS_SESSION_KEY);
|
|
112
|
-
if (!raw)
|
|
113
|
-
return null;
|
|
114
|
-
const parsed = JSON.parse(raw);
|
|
115
|
-
if (parsed?.uid && parsed?.wid && parsed?.sid && parsed?.pvencstr && parsed?.encryptDevicePassword) {
|
|
116
|
-
return parsed;
|
|
117
|
-
}
|
|
118
|
-
return null;
|
|
119
|
-
} catch {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
clearEvmSigningCredentials() {
|
|
124
|
-
if (typeof window === "undefined")
|
|
125
|
-
return;
|
|
126
|
-
try {
|
|
127
|
-
sessionStorage.removeItem(EVM_CREDS_SESSION_KEY);
|
|
128
|
-
} catch {
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
// ── Lifecycle ─────────────────────────────────────────────────────
|
|
132
|
-
/**
|
|
133
|
-
* Restore email from localStorage on initialization.
|
|
134
|
-
* PIN hash is intentionally NOT restored (memory-only).
|
|
135
|
-
*/
|
|
136
|
-
restoreEmailFromStorage() {
|
|
137
|
-
if (typeof window === "undefined")
|
|
138
|
-
return;
|
|
139
|
-
this.getEmail();
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Clear all credentials (logout).
|
|
143
|
-
*/
|
|
144
|
-
clear() {
|
|
145
|
-
this.pinHash = null;
|
|
146
|
-
this.email_ = null;
|
|
147
|
-
this.clearEvmSigningCredentials();
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
function getCredentialManager() {
|
|
151
|
-
return AbcCredentialManager.getInstance();
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export {
|
|
155
|
-
getCredentialManager
|
|
156
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-H4VBRXN6.js";
|
|
6
|
-
|
|
7
|
-
// src/wallets/walletConnectors/safeheronWallet/safeheronWallet.ts
|
|
8
|
-
var safeheronWallet = () => ({
|
|
9
|
-
id: "safeheron",
|
|
10
|
-
name: "Safeheron",
|
|
11
|
-
installed: hasInjectedProvider({
|
|
12
|
-
namespace: "safeheron",
|
|
13
|
-
flag: "isSafeheron"
|
|
14
|
-
}),
|
|
15
|
-
iconUrl: async () => (await import("./safeheronWallet-6JG77AKC.js")).default,
|
|
16
|
-
iconBackground: "#fff",
|
|
17
|
-
downloadUrls: {
|
|
18
|
-
chrome: "https://chrome.google.com/webstore/detail/safeheron/aiaghdjafpiofpainifbgfgjfpclngoh",
|
|
19
|
-
browserExtension: "https://www.safeheron.com/"
|
|
20
|
-
},
|
|
21
|
-
extension: {
|
|
22
|
-
instructions: {
|
|
23
|
-
learnMoreUrl: "https://www.safeheron.com/",
|
|
24
|
-
steps: [
|
|
25
|
-
{
|
|
26
|
-
description: "wallet_connectors.safeheron.extension.step1.description",
|
|
27
|
-
step: "install",
|
|
28
|
-
title: "wallet_connectors.safeheron.extension.step1.title"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
description: "wallet_connectors.safeheron.extension.step2.description",
|
|
32
|
-
step: "create",
|
|
33
|
-
title: "wallet_connectors.safeheron.extension.step2.title"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
description: "wallet_connectors.safeheron.extension.step3.description",
|
|
37
|
-
step: "refresh",
|
|
38
|
-
title: "wallet_connectors.safeheron.extension.step3.title"
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
createConnector: getInjectedConnector({
|
|
44
|
-
namespace: "safeheron",
|
|
45
|
-
flag: "isSafeheron"
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export {
|
|
50
|
-
safeheronWallet
|
|
51
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-H4VBRXN6.js";
|
|
6
|
-
|
|
7
|
-
// src/wallets/walletConnectors/nestWallet/nestWallet.ts
|
|
8
|
-
var nestWallet = () => ({
|
|
9
|
-
id: "nest",
|
|
10
|
-
name: "Nest",
|
|
11
|
-
rdns: "xyz.nestwallet",
|
|
12
|
-
iconUrl: async () => (await import("./nestWallet-BFZZZYLV.js")).default,
|
|
13
|
-
iconBackground: "#fff0",
|
|
14
|
-
installed: hasInjectedProvider({ flag: "isNestWallet" }),
|
|
15
|
-
downloadUrls: {
|
|
16
|
-
browserExtension: "https://nestwallet.xyz"
|
|
17
|
-
},
|
|
18
|
-
extension: {
|
|
19
|
-
instructions: {
|
|
20
|
-
learnMoreUrl: "https://nestwallet.xyz",
|
|
21
|
-
steps: [
|
|
22
|
-
{
|
|
23
|
-
description: "wallet_connectors.nestwallet.extension.step1.description",
|
|
24
|
-
step: "install",
|
|
25
|
-
title: "wallet_connectors.nestwallet.extension.step1.title"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
description: "wallet_connectors.nestwallet.extension.step2.description",
|
|
29
|
-
step: "create",
|
|
30
|
-
title: "wallet_connectors.nestwallet.extension.step2.title"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
description: "wallet_connectors.nestwallet.extension.step3.description",
|
|
34
|
-
step: "refresh",
|
|
35
|
-
title: "wallet_connectors.nestwallet.extension.step3.title"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
createConnector: getInjectedConnector({ flag: "isNestWallet" })
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export {
|
|
44
|
-
nestWallet
|
|
45
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
isAndroid
|
|
4
|
-
} from "./chunk-RETKWSKD.js";
|
|
5
|
-
import {
|
|
6
|
-
getWalletConnectConnector
|
|
7
|
-
} from "./chunk-PODFK4OS.js";
|
|
8
|
-
import {
|
|
9
|
-
getInjectedConnector
|
|
10
|
-
} from "./chunk-MBBGZGXF.js";
|
|
11
|
-
|
|
12
|
-
// src/wallets/walletConnectors/iopayWallet/iopayWallet.ts
|
|
13
|
-
function isIoPayMobile() {
|
|
14
|
-
return typeof navigator !== "undefined" && typeof navigator.userAgent !== "undefined" && (navigator?.userAgent.includes("IoPayAndroid") || navigator?.userAgent.includes("IoPayiOs"));
|
|
15
|
-
}
|
|
16
|
-
var iopayWallet = ({
|
|
17
|
-
projectId,
|
|
18
|
-
walletConnectParameters
|
|
19
|
-
}) => ({
|
|
20
|
-
id: "iopay",
|
|
21
|
-
name: "ioPay Wallet",
|
|
22
|
-
iconUrl: async () => (await import("./iopayWallet-IJHJ7NYT.js")).default,
|
|
23
|
-
iconBackground: "#fff",
|
|
24
|
-
downloadUrls: {
|
|
25
|
-
android: "https://play.google.com/store/apps/details?id=io.iotex.iopay.gp&pli=1",
|
|
26
|
-
ios: "https://apps.apple.com/us/app/iopay-multichain-crypto-wallet/id1478086371",
|
|
27
|
-
qrCode: "https://iopay.me/",
|
|
28
|
-
browserExtension: "https://iopay.me/"
|
|
29
|
-
},
|
|
30
|
-
mobile: {
|
|
31
|
-
getUri: (uri) => {
|
|
32
|
-
return isAndroid() ? uri : `iopay://wc?uri=${encodeURIComponent(uri)}`;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
qrCode: {
|
|
36
|
-
getUri: (uri) => uri,
|
|
37
|
-
instructions: {
|
|
38
|
-
learnMoreUrl: "https://iopay.me/",
|
|
39
|
-
steps: [
|
|
40
|
-
{
|
|
41
|
-
description: "wallet_connectors.iopay.qr_code.step1.description",
|
|
42
|
-
step: "install",
|
|
43
|
-
title: "wallet_connectors.iopay.qr_code.step1.title"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
description: "wallet_connectors.iopay.qr_code.step2.description",
|
|
47
|
-
step: "create",
|
|
48
|
-
title: "wallet_connectors.iopay.qr_code.step2.title"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
description: "wallet_connectors.iopay.qr_code.step3.description",
|
|
52
|
-
step: "scan",
|
|
53
|
-
title: "wallet_connectors.iopay.qr_code.step3.title"
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
createConnector: isIoPayMobile() ? getInjectedConnector({}) : getWalletConnectConnector({
|
|
59
|
-
projectId,
|
|
60
|
-
walletConnectParameters
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export {
|
|
65
|
-
iopayWallet
|
|
66
|
-
};
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
AbcError
|
|
4
|
-
} from "./chunk-4P3SPC44.js";
|
|
5
|
-
import {
|
|
6
|
-
PIN_CONFIG,
|
|
7
|
-
STORAGE_PREFIX,
|
|
8
|
-
TOKEN_EXPIRY
|
|
9
|
-
} from "./chunk-DPTDOCWL.js";
|
|
10
|
-
|
|
11
|
-
// src/wallets/walletConnectors/abcWallet/utils.ts
|
|
12
|
-
async function hashPin(pin) {
|
|
13
|
-
if (typeof window === "undefined" || !window.crypto?.subtle) {
|
|
14
|
-
return btoa(pin);
|
|
15
|
-
}
|
|
16
|
-
const encoder = new TextEncoder();
|
|
17
|
-
const data = encoder.encode(pin);
|
|
18
|
-
const hashBuffer = await window.crypto.subtle.digest("SHA-256", data);
|
|
19
|
-
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
20
|
-
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
21
|
-
return hashHex;
|
|
22
|
-
}
|
|
23
|
-
function validatePin(pin) {
|
|
24
|
-
if (!pin || typeof pin !== "string") {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
const pinLength = pin.length;
|
|
28
|
-
if (pinLength < PIN_CONFIG.MIN_LENGTH || pinLength > PIN_CONFIG.MAX_LENGTH) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
return /^\d+$/.test(pin);
|
|
32
|
-
}
|
|
33
|
-
function validateEmail(email) {
|
|
34
|
-
if (!email || typeof email !== "string") {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
38
|
-
return emailRegex.test(email);
|
|
39
|
-
}
|
|
40
|
-
function getStorageKey(key) {
|
|
41
|
-
return `${STORAGE_PREFIX}${key}`;
|
|
42
|
-
}
|
|
43
|
-
function saveToStorage(key, value) {
|
|
44
|
-
if (typeof window === "undefined")
|
|
45
|
-
return;
|
|
46
|
-
try {
|
|
47
|
-
const storageKey = getStorageKey(key);
|
|
48
|
-
const serialized = JSON.stringify(value);
|
|
49
|
-
localStorage.setItem(storageKey, serialized);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
console.error("Failed to save to storage:", error);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function loadFromStorage(key) {
|
|
55
|
-
if (typeof window === "undefined")
|
|
56
|
-
return null;
|
|
57
|
-
try {
|
|
58
|
-
const storageKey = getStorageKey(key);
|
|
59
|
-
const serialized = localStorage.getItem(storageKey);
|
|
60
|
-
if (!serialized)
|
|
61
|
-
return null;
|
|
62
|
-
try {
|
|
63
|
-
return JSON.parse(serialized);
|
|
64
|
-
} catch {
|
|
65
|
-
return serialized;
|
|
66
|
-
}
|
|
67
|
-
} catch (error) {
|
|
68
|
-
console.error("Failed to load from storage:", error);
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
function removeFromStorage(key) {
|
|
73
|
-
if (typeof window === "undefined")
|
|
74
|
-
return;
|
|
75
|
-
try {
|
|
76
|
-
const storageKey = getStorageKey(key);
|
|
77
|
-
localStorage.removeItem(storageKey);
|
|
78
|
-
} catch (error) {
|
|
79
|
-
console.error("Failed to remove from storage:", error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function clearStorage() {
|
|
83
|
-
if (typeof window === "undefined")
|
|
84
|
-
return;
|
|
85
|
-
const keysToRemove = [];
|
|
86
|
-
for (let i = 0; i < localStorage.length; i++) {
|
|
87
|
-
const key = localStorage.key(i);
|
|
88
|
-
if (key?.startsWith(STORAGE_PREFIX)) {
|
|
89
|
-
keysToRemove.push(key);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
for (const key of keysToRemove) {
|
|
93
|
-
localStorage.removeItem(key);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function isTokenExpired(expiresAt) {
|
|
97
|
-
if (!expiresAt)
|
|
98
|
-
return true;
|
|
99
|
-
return Date.now() >= expiresAt - TOKEN_EXPIRY.REFRESH_BUFFER;
|
|
100
|
-
}
|
|
101
|
-
function calculateExpiryTimestamp(expiresIn) {
|
|
102
|
-
return Date.now() + expiresIn * 1e3;
|
|
103
|
-
}
|
|
104
|
-
function saveAuthState(state) {
|
|
105
|
-
saveToStorage("auth_state" /* AUTH_STATE */, state);
|
|
106
|
-
if (state.user) {
|
|
107
|
-
saveToStorage("user" /* USER */, state.user);
|
|
108
|
-
}
|
|
109
|
-
if (state.wallet) {
|
|
110
|
-
saveToStorage("wallet" /* WALLET */, state.wallet);
|
|
111
|
-
}
|
|
112
|
-
if (state.solanaWallet) {
|
|
113
|
-
saveToStorage("solana_wallet" /* SOLANA_WALLET */, state.solanaWallet);
|
|
114
|
-
}
|
|
115
|
-
if (state.bitcoinWallet) {
|
|
116
|
-
saveToStorage("bitcoin_wallet" /* BITCOIN_WALLET */, state.bitcoinWallet);
|
|
117
|
-
}
|
|
118
|
-
if (state.tronWallet) {
|
|
119
|
-
saveToStorage("tron_wallet" /* TRON_WALLET */, state.tronWallet);
|
|
120
|
-
}
|
|
121
|
-
if (state.accessToken) {
|
|
122
|
-
saveToStorage("access_token" /* ACCESS_TOKEN */, state.accessToken);
|
|
123
|
-
}
|
|
124
|
-
if (state.refreshToken) {
|
|
125
|
-
saveToStorage("refresh_token" /* REFRESH_TOKEN */, state.refreshToken);
|
|
126
|
-
}
|
|
127
|
-
if (state.expiresAt) {
|
|
128
|
-
saveToStorage("expires_at" /* EXPIRES_AT */, state.expiresAt);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function hydrateAuthStateFromIndividualStorage(state) {
|
|
132
|
-
const user = loadFromStorage("user" /* USER */);
|
|
133
|
-
const wallet = loadFromStorage("wallet" /* WALLET */);
|
|
134
|
-
const solanaWallet = loadFromStorage(
|
|
135
|
-
"solana_wallet" /* SOLANA_WALLET */
|
|
136
|
-
);
|
|
137
|
-
const bitcoinWallet = loadFromStorage(
|
|
138
|
-
"bitcoin_wallet" /* BITCOIN_WALLET */
|
|
139
|
-
);
|
|
140
|
-
const tronWallet = loadFromStorage("tron_wallet" /* TRON_WALLET */);
|
|
141
|
-
const accessToken = loadFromStorage("access_token" /* ACCESS_TOKEN */);
|
|
142
|
-
const refreshToken = loadFromStorage("refresh_token" /* REFRESH_TOKEN */);
|
|
143
|
-
const expiresAt = loadFromStorage("expires_at" /* EXPIRES_AT */);
|
|
144
|
-
const nextState = {
|
|
145
|
-
...state,
|
|
146
|
-
user: state.user || user || null,
|
|
147
|
-
wallet: state.wallet || wallet || null,
|
|
148
|
-
solanaWallet: state.solanaWallet || solanaWallet || null,
|
|
149
|
-
bitcoinWallet: state.bitcoinWallet || bitcoinWallet || null,
|
|
150
|
-
tronWallet: state.tronWallet || tronWallet || null,
|
|
151
|
-
accessToken: state.accessToken || accessToken || null,
|
|
152
|
-
refreshToken: state.refreshToken || refreshToken || null,
|
|
153
|
-
expiresAt: state.expiresAt || expiresAt || null
|
|
154
|
-
};
|
|
155
|
-
const wasHydrated = nextState.user !== state.user || nextState.wallet !== state.wallet || nextState.solanaWallet !== state.solanaWallet || nextState.bitcoinWallet !== state.bitcoinWallet || nextState.tronWallet !== state.tronWallet || nextState.accessToken !== state.accessToken || nextState.refreshToken !== state.refreshToken || nextState.expiresAt !== state.expiresAt;
|
|
156
|
-
if (wasHydrated) {
|
|
157
|
-
saveToStorage("auth_state" /* AUTH_STATE */, nextState);
|
|
158
|
-
}
|
|
159
|
-
return nextState;
|
|
160
|
-
}
|
|
161
|
-
function loadAuthState() {
|
|
162
|
-
const state = loadFromStorage("auth_state" /* AUTH_STATE */);
|
|
163
|
-
if (state) {
|
|
164
|
-
if (state.accessToken && isTokenExpired(state.expiresAt)) {
|
|
165
|
-
clearStorage();
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
return hydrateAuthStateFromIndividualStorage(state);
|
|
169
|
-
}
|
|
170
|
-
const user = loadFromStorage("user" /* USER */);
|
|
171
|
-
const wallet = loadFromStorage("wallet" /* WALLET */);
|
|
172
|
-
const solanaWallet = loadFromStorage("solana_wallet" /* SOLANA_WALLET */);
|
|
173
|
-
const accessToken = loadFromStorage("access_token" /* ACCESS_TOKEN */);
|
|
174
|
-
const refreshToken = loadFromStorage("refresh_token" /* REFRESH_TOKEN */);
|
|
175
|
-
const expiresAt = loadFromStorage("expires_at" /* EXPIRES_AT */);
|
|
176
|
-
if (!user || !accessToken) {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
const bitcoinWallet = loadFromStorage("bitcoin_wallet" /* BITCOIN_WALLET */);
|
|
180
|
-
const tronWallet = loadFromStorage("tron_wallet" /* TRON_WALLET */);
|
|
181
|
-
return {
|
|
182
|
-
isAuthenticated: true,
|
|
183
|
-
user,
|
|
184
|
-
wallet,
|
|
185
|
-
solanaWallet,
|
|
186
|
-
bitcoinWallet,
|
|
187
|
-
tronWallet,
|
|
188
|
-
accessToken,
|
|
189
|
-
refreshToken,
|
|
190
|
-
expiresAt
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
function clearAuthState() {
|
|
194
|
-
clearStorage();
|
|
195
|
-
}
|
|
196
|
-
function createAbcError(code, message, details, statusCode) {
|
|
197
|
-
return new AbcError(code, message, details, statusCode);
|
|
198
|
-
}
|
|
199
|
-
function hexToNumber(hex) {
|
|
200
|
-
return Number.parseInt(hex, 16);
|
|
201
|
-
}
|
|
202
|
-
function numberToHex(num) {
|
|
203
|
-
return `0x${num.toString(16)}`;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export {
|
|
207
|
-
hashPin,
|
|
208
|
-
validatePin,
|
|
209
|
-
validateEmail,
|
|
210
|
-
getStorageKey,
|
|
211
|
-
saveToStorage,
|
|
212
|
-
loadFromStorage,
|
|
213
|
-
removeFromStorage,
|
|
214
|
-
clearStorage,
|
|
215
|
-
isTokenExpired,
|
|
216
|
-
calculateExpiryTimestamp,
|
|
217
|
-
saveAuthState,
|
|
218
|
-
loadAuthState,
|
|
219
|
-
clearAuthState,
|
|
220
|
-
createAbcError,
|
|
221
|
-
hexToNumber,
|
|
222
|
-
numberToHex
|
|
223
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-H4VBRXN6.js";
|
|
6
|
-
|
|
7
|
-
// src/wallets/walletConnectors/compassWallet/compassWallet.ts
|
|
8
|
-
var compassWallet = () => {
|
|
9
|
-
const isCompassInjected = hasInjectedProvider({ namespace: "compassEvm" });
|
|
10
|
-
return {
|
|
11
|
-
id: "compass",
|
|
12
|
-
name: "Compass Wallet",
|
|
13
|
-
installed: isCompassInjected,
|
|
14
|
-
rdns: "io.leapwallet.CompassWallet",
|
|
15
|
-
iconUrl: async () => (await import("./compassWallet-3LBTWCKI.js")).default,
|
|
16
|
-
iconBackground: "#fff",
|
|
17
|
-
downloadUrls: {
|
|
18
|
-
chrome: "https://chromewebstore.google.com/detail/compass-wallet-for-sei/anokgmphncpekkhclmingpimjmcooifb",
|
|
19
|
-
browserExtension: "https://compasswallet.io/download"
|
|
20
|
-
},
|
|
21
|
-
extension: {
|
|
22
|
-
instructions: {
|
|
23
|
-
learnMoreUrl: "https://compasswallet.io/download",
|
|
24
|
-
steps: [
|
|
25
|
-
{
|
|
26
|
-
description: "wallet_connectors.compass.extension.step1.description",
|
|
27
|
-
step: "install",
|
|
28
|
-
title: "wallet_connectors.compass.extension.step1.title"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
description: "wallet_connectors.compass.extension.step2.description",
|
|
32
|
-
step: "create",
|
|
33
|
-
title: "wallet_connectors.compass.extension.step2.title"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
description: "wallet_connectors.compass.extension.step3.description",
|
|
37
|
-
step: "refresh",
|
|
38
|
-
title: "wallet_connectors.compass.extension.step3.title"
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
createConnector: getInjectedConnector({ namespace: "compassEvm" })
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export {
|
|
48
|
-
compassWallet
|
|
49
|
-
};
|