@talken/talkenkit 2.7.5-beta.1 → 2.7.5-beta.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.
- package/dist/AbcCredentialManager-6FBGTSSM.js +7 -0
- package/dist/abcWallet-6BIO6Q6T.js +184 -0
- package/dist/abcWallet-HKEIJA6T.js +172 -0
- package/dist/chunk-CGSOMXYJ.js +5757 -0
- package/dist/chunk-PZ4TCLAJ.js +7816 -0
- package/dist/chunk-SUYKWM5G.js +451 -0
- package/dist/components/ConfirmationModal/NonEvmSignConfirmationModal.d.ts +1 -1
- package/dist/components/ConfirmationModal/NonEvmTransferConfirmationModal.d.ts +1 -1
- package/dist/components/ConfirmationModal/SignConfirmationModal.d.ts +1 -1
- package/dist/components/ConfirmationModal/TransactionConfirmationModal.d.ts +2 -1
- package/dist/components/ConfirmationModal/constants.d.ts +0 -4
- package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +31 -1
- package/dist/components/TransactionResultModal/TransactionResultModal.css.d.ts +3 -0
- package/dist/components/TransactionResultModal/TransactionResultModal.d.ts +1 -1
- package/dist/config/networks.d.ts +2 -1
- package/dist/gasless/GaslessConfigSingleton.d.ts +11 -0
- package/dist/gasless/api/ChainConfigApi.d.ts +20 -0
- package/dist/gasless/api/RelayerApi.d.ts +25 -0
- package/dist/gasless/api/TokenCapabilityApi.d.ts +12 -0
- package/dist/gasless/config.d.ts +12 -0
- package/dist/gasless/hooks/useGaslessTransfer.d.ts +18 -0
- package/dist/gasless/index.d.ts +12 -0
- package/dist/gasless/services/Eip7702Service.d.ts +80 -0
- package/dist/gasless/services/GaslessFeeService.d.ts +55 -0
- package/dist/gasless/services/GaslessTransferService.d.ts +61 -0
- package/dist/gasless/services/PermitSignService.d.ts +28 -0
- package/dist/gasless/signer/AbcWaasSigner.d.ts +27 -0
- package/dist/gasless/signer/GaslessSigner.d.ts +43 -0
- package/dist/gasless/signer/WagmiSigner.d.ts +63 -0
- package/dist/gasless/signer/index.d.ts +4 -0
- package/dist/gasless/types.d.ts +298 -0
- package/dist/gasless/utils/delegationGuard.d.ts +50 -0
- package/dist/gasless/utils/feeTokenResolver.d.ts +35 -0
- package/dist/gasless/utils/revokeDelegation.d.ts +55 -0
- package/dist/gasless/utils/transferDetector.d.ts +20 -0
- package/dist/hooks/internal/abcEmbeddedWallet.d.ts +1 -1
- package/dist/hooks/useXrplWallet.d.ts +77 -0
- package/dist/index.css +41 -37
- package/dist/index.d.ts +9 -4
- package/dist/index.js +2499 -1583
- package/dist/providers/AbcAuthProvider.d.ts +2 -1
- package/dist/providers/SignConfirmationProvider/SignConfirmationProvider.d.ts +1 -1
- package/dist/providers/SignConfirmationProvider/SuppressSignConfirmation.d.ts +11 -0
- package/dist/providers/SignConfirmationProvider/index.d.ts +2 -1
- package/dist/providers/SignConfirmationProvider/types.d.ts +14 -1
- package/dist/providers/SignConfirmationProvider/useTransactionResolver.d.ts +2 -1
- package/dist/providers/TransactionResultProvider/SuppressTransactionResult.d.ts +11 -0
- package/dist/providers/TransactionResultProvider/index.d.ts +1 -0
- package/dist/providers/TransactionResultProvider/types.d.ts +8 -1
- package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.d.ts +2 -0
- package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.d.ts +14 -0
- package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/ProviderError.d.ts +3 -0
- package/dist/wallets/walletConnectors/abcWallet/ProviderError.js +5 -3
- package/dist/wallets/walletConnectors/abcWallet/StorageService.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +8 -8
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +22 -21
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.d.ts +16 -0
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +10 -10
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +21 -20
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +23 -22
- package/dist/wallets/walletConnectors/abcWallet/abcXrplProvider.d.ts +99 -0
- package/dist/wallets/walletConnectors/abcWallet/abcXrplProvider.js +19 -0
- package/dist/wallets/walletConnectors/abcWallet/api/ConfigApi.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.d.ts +3 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +15 -14
- package/dist/wallets/walletConnectors/abcWallet/api/TokenApi.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +20 -19
- package/dist/wallets/walletConnectors/abcWallet/api/modules/auth.js +5 -5
- package/dist/wallets/walletConnectors/abcWallet/api/modules/bitcoin.d.ts +1 -1
- package/dist/wallets/walletConnectors/abcWallet/api/modules/bitcoin.js +5 -5
- package/dist/wallets/walletConnectors/abcWallet/api/modules/evm.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/api/modules/solana.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/modules/tron.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/modules/wallet.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/modules/walletscan.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/modules/xrp.d.ts +85 -0
- package/dist/wallets/walletConnectors/abcWallet/api/modules/xrp.js +8 -0
- package/dist/wallets/walletConnectors/abcWallet/constants.d.ts +9 -0
- package/dist/wallets/walletConnectors/abcWallet/constants.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/index.d.ts +5 -0
- package/dist/wallets/walletConnectors/abcWallet/index.js +50 -35
- package/dist/wallets/walletConnectors/abcWallet/networkConfig.d.ts +31 -3
- package/dist/wallets/walletConnectors/abcWallet/networkConfig.js +11 -3
- package/dist/wallets/walletConnectors/abcWallet/sessionUtils.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/types/api.types.d.ts +13 -11
- package/dist/wallets/walletConnectors/abcWallet/types/auth.types.d.ts +3 -1
- package/dist/wallets/walletConnectors/abcWallet/types/config.types.d.ts +1 -0
- package/dist/wallets/walletConnectors/abcWallet/types/config.types.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/types/wallet.types.d.ts +15 -1
- package/dist/wallets/walletConnectors/abcWallet/types.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/utils.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.d.ts +2 -1
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +8 -8
- package/dist/wallets/walletConnectors/chunk-25VIZXJZ.js +341 -0
- package/dist/wallets/walletConnectors/chunk-26URNKLZ.js +341 -0
- package/dist/wallets/walletConnectors/chunk-2H2JI5BJ.js +108 -0
- package/dist/wallets/walletConnectors/chunk-2LH53QET.js +71 -0
- package/dist/wallets/walletConnectors/chunk-2LOET2LX.js +64 -0
- package/dist/wallets/walletConnectors/chunk-2XNFYA54.js +492 -0
- package/dist/wallets/walletConnectors/chunk-326CQ42T.js +378 -0
- package/dist/wallets/walletConnectors/chunk-3NWM24MH.js +61 -0
- package/dist/wallets/walletConnectors/chunk-3QC567QK.js +94 -0
- package/dist/wallets/walletConnectors/chunk-3Z5DO42M.js +240 -0
- package/dist/wallets/walletConnectors/chunk-4K2V7RCL.js +96 -0
- package/dist/wallets/walletConnectors/chunk-4QNRNDMZ.js +378 -0
- package/dist/wallets/walletConnectors/chunk-4V3HRM2R.js +95 -0
- package/dist/wallets/walletConnectors/chunk-4Y7YP4IR.js +115 -0
- package/dist/wallets/walletConnectors/chunk-5QYCHHVB.js +98 -0
- package/dist/wallets/walletConnectors/chunk-6P3FYHAH.js +108 -0
- package/dist/wallets/walletConnectors/chunk-76M232IF.js +101 -0
- package/dist/wallets/walletConnectors/chunk-7IBMHOYD.js +102 -0
- package/dist/wallets/walletConnectors/chunk-ACGSFRMZ.js +73 -0
- package/dist/wallets/walletConnectors/chunk-AJ2YNYCD.js +277 -0
- package/dist/wallets/walletConnectors/chunk-BOHX6ZNO.js +3030 -0
- package/dist/wallets/walletConnectors/chunk-BZPKBSWY.js +66 -0
- package/dist/wallets/walletConnectors/chunk-CHEPDEJ2.js +73 -0
- package/dist/wallets/walletConnectors/chunk-CMETID7A.js +1463 -0
- package/dist/wallets/walletConnectors/chunk-DDRPEB2X.js +366 -0
- package/dist/wallets/walletConnectors/chunk-DHWJ3552.js +93 -0
- package/dist/wallets/walletConnectors/chunk-DPVILLWF.js +492 -0
- package/dist/wallets/walletConnectors/chunk-E4B4UELA.js +3030 -0
- package/dist/wallets/walletConnectors/chunk-EJALZNAR.js +101 -0
- package/dist/wallets/walletConnectors/chunk-F74FF7OS.js +370 -0
- package/dist/wallets/walletConnectors/chunk-FVA6H2VF.js +95 -0
- package/dist/wallets/walletConnectors/chunk-FWX2HD26.js +30 -0
- package/dist/wallets/walletConnectors/chunk-G7QF44XS.js +378 -0
- package/dist/wallets/walletConnectors/chunk-GCHYGJNO.js +131 -0
- package/dist/wallets/walletConnectors/chunk-GNF5CHDQ.js +102 -0
- package/dist/wallets/walletConnectors/chunk-GZPGNUNF.js +94 -0
- package/dist/wallets/walletConnectors/chunk-HALTGRQW.js +87 -0
- package/dist/wallets/walletConnectors/chunk-I2LB6GVH.js +341 -0
- package/dist/wallets/walletConnectors/chunk-ICGK5DGY.js +146 -0
- package/dist/wallets/walletConnectors/chunk-IGZOEVKN.js +58 -0
- package/dist/wallets/walletConnectors/chunk-IJJQA3AB.js +218 -0
- package/dist/wallets/walletConnectors/chunk-JL3QLDZK.js +186 -0
- package/dist/wallets/walletConnectors/chunk-JU6AJBYS.js +20 -0
- package/dist/wallets/walletConnectors/chunk-KLCVXROA.js +71 -0
- package/dist/wallets/walletConnectors/chunk-KNNHGFKJ.js +98 -0
- package/dist/wallets/walletConnectors/chunk-KQDFRZT4.js +65 -0
- package/dist/wallets/walletConnectors/chunk-KTVJLN3O.js +58 -0
- package/dist/wallets/walletConnectors/chunk-L3EPZ4NZ.js +52 -0
- package/dist/wallets/walletConnectors/chunk-LKNK2KKU.js +76 -0
- package/dist/wallets/walletConnectors/chunk-LLOSDVCH.js +58 -0
- package/dist/wallets/walletConnectors/chunk-LQI5HRAB.js +218 -0
- package/dist/wallets/walletConnectors/chunk-LTN4JK3R.js +340 -0
- package/dist/wallets/walletConnectors/chunk-MGVZ2TUF.js +318 -0
- package/dist/wallets/walletConnectors/chunk-MQ57XDYK.js +340 -0
- package/dist/wallets/walletConnectors/chunk-MU46EEQT.js +128 -0
- package/dist/wallets/walletConnectors/chunk-MUAOEA3O.js +103 -0
- package/dist/wallets/walletConnectors/chunk-MVZX47XV.js +366 -0
- package/dist/wallets/walletConnectors/chunk-MWHKTQPO.js +71 -0
- package/dist/wallets/walletConnectors/chunk-MY7UE4VE.js +240 -0
- package/dist/wallets/walletConnectors/chunk-MYQPTETH.js +186 -0
- package/dist/wallets/walletConnectors/chunk-NEMEHJ72.js +93 -0
- package/dist/wallets/walletConnectors/chunk-NF72HTDP.js +378 -0
- package/dist/wallets/walletConnectors/chunk-NP7RQXKC.js +94 -0
- package/dist/wallets/walletConnectors/chunk-OKTFRDOV.js +340 -0
- package/dist/wallets/walletConnectors/chunk-PXL5G2PM.js +96 -0
- package/dist/wallets/walletConnectors/chunk-QB3QLNSL.js +76 -0
- package/dist/wallets/walletConnectors/chunk-QCM7BJYI.js +366 -0
- package/dist/wallets/walletConnectors/chunk-QI5BHIHY.js +318 -0
- package/dist/wallets/walletConnectors/chunk-QLPGMWGT.js +132 -0
- package/dist/wallets/walletConnectors/chunk-QODJUJ3A.js +370 -0
- package/dist/wallets/walletConnectors/chunk-QRU6XFHH.js +110 -0
- package/dist/wallets/walletConnectors/chunk-RIN5NUVA.js +1463 -0
- package/dist/wallets/walletConnectors/chunk-RM3S3BY3.js +58 -0
- package/dist/wallets/walletConnectors/chunk-S5XGT2XC.js +131 -0
- package/dist/wallets/walletConnectors/chunk-SJ7H7FJB.js +58 -0
- package/dist/wallets/walletConnectors/chunk-TA4DDCKN.js +96 -0
- package/dist/wallets/walletConnectors/chunk-TBWPVX5M.js +148 -0
- package/dist/wallets/walletConnectors/chunk-TLRR3FFT.js +132 -0
- package/dist/wallets/walletConnectors/chunk-TM6YD43A.js +341 -0
- package/dist/wallets/walletConnectors/chunk-TWVKSPTP.js +91 -0
- package/dist/wallets/walletConnectors/chunk-TYJR3KGY.js +46 -0
- package/dist/wallets/walletConnectors/chunk-U5UPCM5V.js +66 -0
- package/dist/wallets/walletConnectors/chunk-UPQCNBIW.js +341 -0
- package/dist/wallets/walletConnectors/chunk-UZAUWE5E.js +27 -0
- package/dist/wallets/walletConnectors/chunk-V2C47DTB.js +66 -0
- package/dist/wallets/walletConnectors/chunk-VVXSRRXI.js +189 -0
- package/dist/wallets/walletConnectors/chunk-WHL6MSKS.js +492 -0
- package/dist/wallets/walletConnectors/chunk-WZ4ZJB74.js +340 -0
- package/dist/wallets/walletConnectors/chunk-X3DT5G3F.js +215 -0
- package/dist/wallets/walletConnectors/chunk-XDNFWX2X.js +199 -0
- package/dist/wallets/walletConnectors/chunk-XFUNA24R.js +195 -0
- package/dist/wallets/walletConnectors/chunk-XS6GJRRA.js +98 -0
- package/dist/wallets/walletConnectors/chunk-XSJUQHR7.js +95 -0
- package/dist/wallets/walletConnectors/chunk-XSX5EECZ.js +96 -0
- package/dist/wallets/walletConnectors/chunk-YJ5RF7V4.js +492 -0
- package/dist/wallets/walletConnectors/chunk-YNE2UX2Z.js +137 -0
- package/dist/wallets/walletConnectors/chunk-YXWHHI4S.js +64 -0
- package/dist/wallets/walletConnectors/index.js +80 -79
- package/package.json +2 -2
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getBitcoinNetwork,
|
|
4
|
+
getEvmNetwork,
|
|
5
|
+
getSolanaNetwork,
|
|
6
|
+
getTronNetwork,
|
|
7
|
+
getXrplNetwork
|
|
8
|
+
} from "./chunk-X3DT5G3F.js";
|
|
9
|
+
import {
|
|
10
|
+
AbcError
|
|
11
|
+
} from "./chunk-BUAWEYGV.js";
|
|
12
|
+
import {
|
|
13
|
+
createLogger
|
|
14
|
+
} from "./chunk-762I67R6.js";
|
|
15
|
+
import {
|
|
16
|
+
getCredentialManager
|
|
17
|
+
} from "./chunk-YNE2UX2Z.js";
|
|
18
|
+
|
|
19
|
+
// src/wallets/walletConnectors/abcWallet/walletGeneration.ts
|
|
20
|
+
import { getTalkenApiClient } from "@talken/talkenkit";
|
|
21
|
+
var logger = createLogger("WalletGeneration");
|
|
22
|
+
async function mapApiResponseToWallets(genResponse, infoResponse, email) {
|
|
23
|
+
const accounts = infoResponse?.accounts || [];
|
|
24
|
+
const evmAccount = accounts[0] || infoResponse || {};
|
|
25
|
+
const uid = String(genResponse.uid || evmAccount.uid || "");
|
|
26
|
+
const wid = String(genResponse.wid || evmAccount.wid || "");
|
|
27
|
+
const sid = String(
|
|
28
|
+
evmAccount.sid || evmAccount.ethAddress || genResponse.evmAddress || ""
|
|
29
|
+
);
|
|
30
|
+
const pubkey = String(evmAccount.pubkey || genResponse.pubkey || "");
|
|
31
|
+
const solMaterial = genResponse.solana || {};
|
|
32
|
+
let btcAddress = genResponse.btcAddress || "";
|
|
33
|
+
let trxAddress = genResponse.trxAddress || "";
|
|
34
|
+
let xrpAddress = genResponse.xrpAddress || "";
|
|
35
|
+
if ((!btcAddress || !trxAddress || !xrpAddress) && pubkey) {
|
|
36
|
+
try {
|
|
37
|
+
const api = getTalkenApiClient();
|
|
38
|
+
if (api) {
|
|
39
|
+
const addrResponse = await api.wallet.getAddressForChain("all");
|
|
40
|
+
if (!btcAddress)
|
|
41
|
+
btcAddress = addrResponse?.btc || addrResponse?.btcAddress || "";
|
|
42
|
+
if (!trxAddress)
|
|
43
|
+
trxAddress = addrResponse?.trx || addrResponse?.trxAddress || "";
|
|
44
|
+
if (!xrpAddress)
|
|
45
|
+
xrpAddress = addrResponse?.xrp || addrResponse?.xrpAddress || "";
|
|
46
|
+
}
|
|
47
|
+
} catch (err) {
|
|
48
|
+
logger.warn("Failed to derive BTC/TRX/XRP addresses:", err);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const pvencstr = String(evmAccount.pvencstr || "");
|
|
52
|
+
const edp = String(evmAccount.encryptDevicePassword || "");
|
|
53
|
+
if (uid && wid && sid && pvencstr && edp) {
|
|
54
|
+
getCredentialManager().setEvmSigningCredentials({
|
|
55
|
+
uid,
|
|
56
|
+
wid,
|
|
57
|
+
sid,
|
|
58
|
+
pvencstr,
|
|
59
|
+
encryptDevicePassword: edp
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const evmWallet = {
|
|
63
|
+
uid,
|
|
64
|
+
sessionId: sid,
|
|
65
|
+
keyId: wid,
|
|
66
|
+
encryptedShare: pvencstr,
|
|
67
|
+
secretStore: edp,
|
|
68
|
+
address: genResponse.evmAddress || sid,
|
|
69
|
+
chainId: getEvmNetwork(),
|
|
70
|
+
sid,
|
|
71
|
+
type: "evm",
|
|
72
|
+
email,
|
|
73
|
+
pubkey
|
|
74
|
+
};
|
|
75
|
+
const solanaWallet = {
|
|
76
|
+
uid,
|
|
77
|
+
sessionId: String(solMaterial.shareId || ""),
|
|
78
|
+
keyId: String(solMaterial.keyId || ""),
|
|
79
|
+
encryptedShare: String(solMaterial.encryptedShare || ""),
|
|
80
|
+
secretStore: String(solMaterial.secretStore || ""),
|
|
81
|
+
shareId: String(solMaterial.shareId || ""),
|
|
82
|
+
publicKey: String(solMaterial.publicKey || ""),
|
|
83
|
+
address: genResponse.solAddress || solMaterial.address || "",
|
|
84
|
+
network: getSolanaNetwork()
|
|
85
|
+
};
|
|
86
|
+
const bitcoinWallet = {
|
|
87
|
+
uid,
|
|
88
|
+
sessionId: sid,
|
|
89
|
+
keyId: wid,
|
|
90
|
+
encryptedShare: String(evmAccount.pvencstr || ""),
|
|
91
|
+
shareId: sid,
|
|
92
|
+
publicKey: pubkey,
|
|
93
|
+
address: btcAddress,
|
|
94
|
+
addressType: "bech32",
|
|
95
|
+
network: getBitcoinNetwork()
|
|
96
|
+
};
|
|
97
|
+
const tronWallet = {
|
|
98
|
+
uid,
|
|
99
|
+
sessionId: sid,
|
|
100
|
+
keyId: wid,
|
|
101
|
+
encryptedShare: String(evmAccount.pvencstr || ""),
|
|
102
|
+
shareId: sid,
|
|
103
|
+
publicKey: pubkey,
|
|
104
|
+
address: trxAddress,
|
|
105
|
+
network: getTronNetwork()
|
|
106
|
+
};
|
|
107
|
+
const xrplWallet = {
|
|
108
|
+
uid,
|
|
109
|
+
sessionId: sid,
|
|
110
|
+
keyId: wid,
|
|
111
|
+
encryptedShare: String(evmAccount.pvencstr || ""),
|
|
112
|
+
shareId: sid,
|
|
113
|
+
publicKey: pubkey,
|
|
114
|
+
address: xrpAddress,
|
|
115
|
+
network: getXrplNetwork()
|
|
116
|
+
};
|
|
117
|
+
return { evmWallet, solanaWallet, bitcoinWallet, tronWallet, xrplWallet };
|
|
118
|
+
}
|
|
119
|
+
async function generateMpcWallets(hashedPin, email) {
|
|
120
|
+
const api = getTalkenApiClient();
|
|
121
|
+
if (!api) {
|
|
122
|
+
throw new AbcError(
|
|
123
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
124
|
+
"TalkenApiClient not initialized"
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
try {
|
|
128
|
+
const genResponse = await api.wallet.generate(hashedPin, email);
|
|
129
|
+
const infoResponse = await api.wallet.getInfo().catch(() => ({}));
|
|
130
|
+
return await mapApiResponseToWallets(
|
|
131
|
+
genResponse,
|
|
132
|
+
infoResponse,
|
|
133
|
+
email || ""
|
|
134
|
+
);
|
|
135
|
+
} catch (error) {
|
|
136
|
+
throw new AbcError(
|
|
137
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
138
|
+
`Failed to generate MPC wallets: ${error.message}`,
|
|
139
|
+
{ originalError: error }
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async function recoverMpcWallets(hashedPin, email) {
|
|
144
|
+
const api = getTalkenApiClient();
|
|
145
|
+
if (!api) {
|
|
146
|
+
throw new AbcError(
|
|
147
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
148
|
+
"TalkenApiClient not initialized"
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
const genResponse = await api.wallet.recover(hashedPin, email);
|
|
153
|
+
const infoResponse = await api.wallet.getInfo().catch(() => ({}));
|
|
154
|
+
return await mapApiResponseToWallets(
|
|
155
|
+
genResponse,
|
|
156
|
+
infoResponse,
|
|
157
|
+
email || ""
|
|
158
|
+
);
|
|
159
|
+
} catch (error) {
|
|
160
|
+
throw new AbcError(
|
|
161
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
162
|
+
`Failed to recover MPC wallets: ${error.message}`,
|
|
163
|
+
{ originalError: error }
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function validateMpcWallets(result) {
|
|
168
|
+
const errors = [];
|
|
169
|
+
if (!result.evmWallet) {
|
|
170
|
+
errors.push("EVM wallet is missing");
|
|
171
|
+
} else {
|
|
172
|
+
if (!result.evmWallet.address || !result.evmWallet.address.startsWith("0x")) {
|
|
173
|
+
errors.push("Invalid EVM wallet address");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (!result.solanaWallet) {
|
|
177
|
+
errors.push("Solana wallet is missing");
|
|
178
|
+
} else {
|
|
179
|
+
if (!result.solanaWallet.address) {
|
|
180
|
+
errors.push("Invalid Solana wallet address");
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (!result.bitcoinWallet) {
|
|
184
|
+
errors.push("Bitcoin wallet is missing");
|
|
185
|
+
} else {
|
|
186
|
+
if (!result.bitcoinWallet.address) {
|
|
187
|
+
errors.push("Invalid Bitcoin wallet address");
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (!result.tronWallet) {
|
|
191
|
+
errors.push("TRON wallet is missing");
|
|
192
|
+
} else {
|
|
193
|
+
if (!result.tronWallet.address) {
|
|
194
|
+
errors.push("Invalid TRON wallet address");
|
|
195
|
+
} else if (!result.tronWallet.address.startsWith("T")) {
|
|
196
|
+
errors.push("Invalid TRON address format (expected T prefix)");
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (!result.xrplWallet) {
|
|
200
|
+
errors.push("XRPL wallet is missing");
|
|
201
|
+
} else {
|
|
202
|
+
if (!result.xrplWallet.address) {
|
|
203
|
+
errors.push("Invalid XRPL wallet address");
|
|
204
|
+
} else if (!result.xrplWallet.address.startsWith("r")) {
|
|
205
|
+
errors.push("Invalid XRPL address format (expected r prefix)");
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
valid: errors.length === 0,
|
|
210
|
+
errors
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export {
|
|
215
|
+
generateMpcWallets,
|
|
216
|
+
recoverMpcWallets,
|
|
217
|
+
validateMpcWallets
|
|
218
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-PONHGUSY.js";
|
|
6
|
+
import {
|
|
7
|
+
isAndroid,
|
|
8
|
+
isIOS
|
|
9
|
+
} from "./chunk-RETKWSKD.js";
|
|
10
|
+
import {
|
|
11
|
+
getWalletConnectConnector
|
|
12
|
+
} from "./chunk-PODFK4OS.js";
|
|
13
|
+
|
|
14
|
+
// src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
|
|
15
|
+
function isMetaMask(ethereum) {
|
|
16
|
+
if (!ethereum?.isMetaMask)
|
|
17
|
+
return false;
|
|
18
|
+
if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state)
|
|
19
|
+
return false;
|
|
20
|
+
if (ethereum.isApexWallet)
|
|
21
|
+
return false;
|
|
22
|
+
if (ethereum.isAvalanche)
|
|
23
|
+
return false;
|
|
24
|
+
if (ethereum.isBackpack)
|
|
25
|
+
return false;
|
|
26
|
+
if (ethereum.isBifrost)
|
|
27
|
+
return false;
|
|
28
|
+
if (ethereum.isBitKeep)
|
|
29
|
+
return false;
|
|
30
|
+
if (ethereum.isBitski)
|
|
31
|
+
return false;
|
|
32
|
+
if (ethereum.isBlockWallet)
|
|
33
|
+
return false;
|
|
34
|
+
if (ethereum.isCoinbaseWallet)
|
|
35
|
+
return false;
|
|
36
|
+
if (ethereum.isDawn)
|
|
37
|
+
return false;
|
|
38
|
+
if (ethereum.isEnkrypt)
|
|
39
|
+
return false;
|
|
40
|
+
if (ethereum.isExodus)
|
|
41
|
+
return false;
|
|
42
|
+
if (ethereum.isFrame)
|
|
43
|
+
return false;
|
|
44
|
+
if (ethereum.isFrontier)
|
|
45
|
+
return false;
|
|
46
|
+
if (ethereum.isGamestop)
|
|
47
|
+
return false;
|
|
48
|
+
if (ethereum.isHyperPay)
|
|
49
|
+
return false;
|
|
50
|
+
if (ethereum.isImToken)
|
|
51
|
+
return false;
|
|
52
|
+
if (ethereum.isKuCoinWallet)
|
|
53
|
+
return false;
|
|
54
|
+
if (ethereum.isMathWallet)
|
|
55
|
+
return false;
|
|
56
|
+
if (ethereum.isNestWallet)
|
|
57
|
+
return false;
|
|
58
|
+
if (ethereum.isOkxWallet || ethereum.isOKExWallet)
|
|
59
|
+
return false;
|
|
60
|
+
if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet)
|
|
61
|
+
return false;
|
|
62
|
+
if (ethereum.isOpera)
|
|
63
|
+
return false;
|
|
64
|
+
if (ethereum.isPhantom)
|
|
65
|
+
return false;
|
|
66
|
+
if (ethereum.isPortal)
|
|
67
|
+
return false;
|
|
68
|
+
if (ethereum.isRabby)
|
|
69
|
+
return false;
|
|
70
|
+
if (ethereum.isRainbow)
|
|
71
|
+
return false;
|
|
72
|
+
if (ethereum.isStatus)
|
|
73
|
+
return false;
|
|
74
|
+
if (ethereum.isTalisman)
|
|
75
|
+
return false;
|
|
76
|
+
if (ethereum.isTally)
|
|
77
|
+
return false;
|
|
78
|
+
if (ethereum.isTokenPocket)
|
|
79
|
+
return false;
|
|
80
|
+
if (ethereum.isTokenary)
|
|
81
|
+
return false;
|
|
82
|
+
if (ethereum.isTrust || ethereum.isTrustWallet)
|
|
83
|
+
return false;
|
|
84
|
+
if (ethereum.isXDEFI)
|
|
85
|
+
return false;
|
|
86
|
+
if (ethereum.isZeal)
|
|
87
|
+
return false;
|
|
88
|
+
if (ethereum.isZerion)
|
|
89
|
+
return false;
|
|
90
|
+
if (ethereum.__seif)
|
|
91
|
+
return false;
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
var metaMaskWallet = ({
|
|
95
|
+
projectId,
|
|
96
|
+
walletConnectParameters
|
|
97
|
+
}) => {
|
|
98
|
+
const isMetaMaskInjected = hasInjectedProvider({ flag: "isMetaMask" });
|
|
99
|
+
const shouldUseWalletConnect = !isMetaMaskInjected;
|
|
100
|
+
const getUri = (uri) => {
|
|
101
|
+
return isAndroid() ? uri : isIOS() ? (
|
|
102
|
+
// currently broken in MetaMask v6.5.0 https://github.com/MetaMask/metamask-mobile/issues/6457
|
|
103
|
+
`metamask://wc?uri=${encodeURIComponent(uri)}`
|
|
104
|
+
) : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
|
|
105
|
+
};
|
|
106
|
+
return {
|
|
107
|
+
id: "metaMask",
|
|
108
|
+
name: "MetaMask",
|
|
109
|
+
rdns: "io.metamask",
|
|
110
|
+
iconUrl: async () => (await import("./metaMaskWallet-TTFGMJRC.js")).default,
|
|
111
|
+
iconAccent: "#f6851a",
|
|
112
|
+
iconBackground: "#fff",
|
|
113
|
+
installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
|
|
114
|
+
downloadUrls: {
|
|
115
|
+
android: "https://play.google.com/store/apps/details?id=io.metamask",
|
|
116
|
+
ios: "https://apps.apple.com/us/app/metamask/id1438144202",
|
|
117
|
+
mobile: "https://metamask.io/download",
|
|
118
|
+
qrCode: "https://metamask.io/download",
|
|
119
|
+
chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
|
|
120
|
+
edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
|
|
121
|
+
firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
|
|
122
|
+
opera: "https://addons.opera.com/extensions/details/metamask-10",
|
|
123
|
+
browserExtension: "https://metamask.io/download"
|
|
124
|
+
},
|
|
125
|
+
mobile: {
|
|
126
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
127
|
+
},
|
|
128
|
+
qrCode: shouldUseWalletConnect ? {
|
|
129
|
+
getUri,
|
|
130
|
+
instructions: {
|
|
131
|
+
learnMoreUrl: "https://metamask.io/faqs/",
|
|
132
|
+
steps: [
|
|
133
|
+
{
|
|
134
|
+
description: "wallet_connectors.metamask.qr_code.step1.description",
|
|
135
|
+
step: "install",
|
|
136
|
+
title: "wallet_connectors.metamask.qr_code.step1.title"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
description: "wallet_connectors.metamask.qr_code.step2.description",
|
|
140
|
+
step: "create",
|
|
141
|
+
title: "wallet_connectors.metamask.qr_code.step2.title"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
description: "wallet_connectors.metamask.qr_code.step3.description",
|
|
145
|
+
step: "refresh",
|
|
146
|
+
title: "wallet_connectors.metamask.qr_code.step3.title"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
} : void 0,
|
|
151
|
+
extension: {
|
|
152
|
+
instructions: {
|
|
153
|
+
learnMoreUrl: "https://metamask.io/faqs/",
|
|
154
|
+
steps: [
|
|
155
|
+
{
|
|
156
|
+
description: "wallet_connectors.metamask.extension.step1.description",
|
|
157
|
+
step: "install",
|
|
158
|
+
title: "wallet_connectors.metamask.extension.step1.title"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
description: "wallet_connectors.metamask.extension.step2.description",
|
|
162
|
+
step: "create",
|
|
163
|
+
title: "wallet_connectors.metamask.extension.step2.title"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
description: "wallet_connectors.metamask.extension.step3.description",
|
|
167
|
+
step: "refresh",
|
|
168
|
+
title: "wallet_connectors.metamask.extension.step3.title"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
174
|
+
projectId,
|
|
175
|
+
walletConnectParameters
|
|
176
|
+
}) : getInjectedConnector({
|
|
177
|
+
target: typeof window !== "undefined" ? window.ethereum?.providers?.find(
|
|
178
|
+
isMetaMask
|
|
179
|
+
) ?? window.ethereum : void 0
|
|
180
|
+
})
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export {
|
|
185
|
+
metaMaskWallet
|
|
186
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/wallets/walletConnectors/abcWallet/types/config.types.ts
|
|
4
|
+
var AbcStorageKey = /* @__PURE__ */ ((AbcStorageKey2) => {
|
|
5
|
+
AbcStorageKey2["USER"] = "user";
|
|
6
|
+
AbcStorageKey2["WALLET"] = "wallet";
|
|
7
|
+
AbcStorageKey2["SOLANA_WALLET"] = "solana_wallet";
|
|
8
|
+
AbcStorageKey2["BITCOIN_WALLET"] = "bitcoin_wallet";
|
|
9
|
+
AbcStorageKey2["TRON_WALLET"] = "tron_wallet";
|
|
10
|
+
AbcStorageKey2["XRPL_WALLET"] = "xrpl_wallet";
|
|
11
|
+
AbcStorageKey2["ACCESS_TOKEN"] = "access_token";
|
|
12
|
+
AbcStorageKey2["REFRESH_TOKEN"] = "refresh_token";
|
|
13
|
+
AbcStorageKey2["EXPIRES_AT"] = "expires_at";
|
|
14
|
+
AbcStorageKey2["AUTH_STATE"] = "auth_state";
|
|
15
|
+
return AbcStorageKey2;
|
|
16
|
+
})(AbcStorageKey || {});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
AbcStorageKey
|
|
20
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
5
|
+
import {
|
|
6
|
+
getInjectedConnector,
|
|
7
|
+
hasInjectedProvider
|
|
8
|
+
} from "./chunk-PONHGUSY.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-PODFK4OS.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
|
|
14
|
+
var bifrostWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isBifrostInjected = hasInjectedProvider({ flag: "isBifrost" });
|
|
19
|
+
const shouldUseWalletConnect = !isBifrostInjected;
|
|
20
|
+
const getUri = (uri) => {
|
|
21
|
+
return isAndroid() ? uri : `https://app.bifrostwallet.com/wc?uri=${encodeURIComponent(uri)}`;
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
id: "bifrostWallet",
|
|
25
|
+
name: "Bifrost Wallet",
|
|
26
|
+
iconUrl: async () => (await import("./bifrostWallet-E7SKKKZP.js")).default,
|
|
27
|
+
iconBackground: "#fff",
|
|
28
|
+
installed: !shouldUseWalletConnect ? isBifrostInjected : void 0,
|
|
29
|
+
downloadUrls: {
|
|
30
|
+
android: "https://play.google.com/store/apps/details?id=com.bifrostwallet.app",
|
|
31
|
+
ios: "https://apps.apple.com/us/app/bifrost-wallet/id1577198351",
|
|
32
|
+
qrCode: "https://bifrostwallet.com/#download-app"
|
|
33
|
+
},
|
|
34
|
+
mobile: {
|
|
35
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
36
|
+
},
|
|
37
|
+
qrCode: shouldUseWalletConnect ? {
|
|
38
|
+
getUri: (uri) => uri,
|
|
39
|
+
instructions: {
|
|
40
|
+
learnMoreUrl: "https://support.bifrostwallet.com/en/articles/6886814-how-to-use-walletconnect",
|
|
41
|
+
steps: [
|
|
42
|
+
{
|
|
43
|
+
description: "wallet_connectors.bifrost.qr_code.step1.description",
|
|
44
|
+
step: "install",
|
|
45
|
+
title: "wallet_connectors.bifrost.qr_code.step1.title"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.bifrost.qr_code.step2.description",
|
|
49
|
+
step: "create",
|
|
50
|
+
title: "wallet_connectors.bifrost.qr_code.step2.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.bifrost.qr_code.step3.description",
|
|
54
|
+
step: "scan",
|
|
55
|
+
title: "wallet_connectors.bifrost.qr_code.step3.title"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
} : void 0,
|
|
60
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
61
|
+
projectId,
|
|
62
|
+
walletConnectParameters
|
|
63
|
+
}) : getInjectedConnector({
|
|
64
|
+
flag: "isBifrost"
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
bifrostWallet
|
|
71
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-PONHGUSY.js";
|
|
6
|
+
import {
|
|
7
|
+
isAndroid
|
|
8
|
+
} from "./chunk-RETKWSKD.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-PODFK4OS.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/frontierWallet/frontierWallet.ts
|
|
14
|
+
var frontierWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isFrontierInjected = hasInjectedProvider({
|
|
19
|
+
namespace: "frontier.ethereum",
|
|
20
|
+
flag: "isFrontier"
|
|
21
|
+
});
|
|
22
|
+
const shouldUseWalletConnect = !isFrontierInjected;
|
|
23
|
+
return {
|
|
24
|
+
id: "frontier",
|
|
25
|
+
name: "Frontier Wallet",
|
|
26
|
+
rdns: "xyz.frontier.wallet",
|
|
27
|
+
installed: isFrontierInjected,
|
|
28
|
+
iconUrl: async () => (await import("./frontierWallet-HNIG7QYQ.js")).default,
|
|
29
|
+
iconBackground: "#CC703C",
|
|
30
|
+
downloadUrls: {
|
|
31
|
+
android: "https://play.google.com/store/apps/details?id=com.frontierwallet",
|
|
32
|
+
ios: "https://apps.apple.com/us/app/frontier-crypto-defi-wallet/id1482380988",
|
|
33
|
+
qrCode: "https://www.frontier.xyz/download",
|
|
34
|
+
chrome: "https://chrome.google.com/webstore/detail/frontier-wallet/kppfdiipphfccemcignhifpjkapfbihd",
|
|
35
|
+
browserExtension: "https://www.frontier.xyz/download"
|
|
36
|
+
},
|
|
37
|
+
mobile: {
|
|
38
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
39
|
+
return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
40
|
+
} : void 0
|
|
41
|
+
},
|
|
42
|
+
qrCode: shouldUseWalletConnect ? {
|
|
43
|
+
getUri: (uri) => {
|
|
44
|
+
return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
45
|
+
},
|
|
46
|
+
instructions: {
|
|
47
|
+
learnMoreUrl: "https://help.frontier.xyz/en/",
|
|
48
|
+
steps: [
|
|
49
|
+
{
|
|
50
|
+
description: "wallet_connectors.im_token.qr_code.step1.description",
|
|
51
|
+
step: "install",
|
|
52
|
+
title: "wallet_connectors.im_token.qr_code.step1.title"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
description: "wallet_connectors.im_token.qr_code.step2.description",
|
|
56
|
+
step: "create",
|
|
57
|
+
title: "wallet_connectors.im_token.qr_code.step2.title"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
description: "wallet_connectors.im_token.qr_code.step3.description",
|
|
61
|
+
step: "scan",
|
|
62
|
+
title: "wallet_connectors.im_token.qr_code.step3.title"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
} : void 0,
|
|
67
|
+
extension: {
|
|
68
|
+
instructions: {
|
|
69
|
+
learnMoreUrl: "https://help.frontier.xyz/en/articles/6967236-setting-up-frontier-on-your-device",
|
|
70
|
+
steps: [
|
|
71
|
+
{
|
|
72
|
+
description: "wallet_connectors.frontier.extension.step1.description",
|
|
73
|
+
step: "install",
|
|
74
|
+
title: "wallet_connectors.frontier.extension.step1.title"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
description: "wallet_connectors.frontier.extension.step2.description",
|
|
78
|
+
step: "create",
|
|
79
|
+
title: "wallet_connectors.frontier.extension.step2.title"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
description: "wallet_connectors.frontier.extension.step3.description",
|
|
83
|
+
step: "refresh",
|
|
84
|
+
title: "wallet_connectors.frontier.extension.step3.title"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({ projectId, walletConnectParameters }) : getInjectedConnector({
|
|
90
|
+
namespace: "frontier.ethereum",
|
|
91
|
+
flag: "isFrontier"
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
frontierWallet
|
|
98
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-PONHGUSY.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-PODFK4OS.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/berasigWallet/berasigWallet.ts
|
|
11
|
+
var berasigWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isBerasigWalletInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "berasig.ethereum"
|
|
17
|
+
});
|
|
18
|
+
const shouldUseWalletConnect = !isBerasigWalletInjected;
|
|
19
|
+
return {
|
|
20
|
+
id: "berasig",
|
|
21
|
+
name: "BeraSig",
|
|
22
|
+
iconUrl: async () => (await import("./berasigWallet-NNBFDHFK.js")).default,
|
|
23
|
+
iconBackground: "#ffffff",
|
|
24
|
+
installed: isBerasigWalletInjected,
|
|
25
|
+
downloadUrls: {
|
|
26
|
+
android: "https://play.google.com/store/apps/details?id=io.berasig.ios",
|
|
27
|
+
ios: "https://apps.apple.com/us/app/berasig-wallet-on-berachain/id6502052535",
|
|
28
|
+
qrCode: "https://berasig.com",
|
|
29
|
+
mobile: "https://berasig.com",
|
|
30
|
+
browserExtension: "https://chromewebstore.google.com/detail/berasig/ckedkkegjbflcfblcjklibnedmfjppbj"
|
|
31
|
+
},
|
|
32
|
+
extension: {
|
|
33
|
+
instructions: {
|
|
34
|
+
steps: [
|
|
35
|
+
{
|
|
36
|
+
description: "wallet_connectors.berasig.extension.step1.description",
|
|
37
|
+
step: "install",
|
|
38
|
+
title: "wallet_connectors.berasig.extension.step1.title"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
description: "wallet_connectors.berasig.extension.step2.description",
|
|
42
|
+
step: "create",
|
|
43
|
+
title: "wallet_connectors.berasig.extension.step2.title"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
description: "wallet_connectors.berasig.extension.step3.description",
|
|
47
|
+
step: "refresh",
|
|
48
|
+
title: "wallet_connectors.berasig.extension.step3.title"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
learnMoreUrl: "https://berasig.com"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
55
|
+
projectId,
|
|
56
|
+
walletConnectParameters
|
|
57
|
+
}) : getInjectedConnector({
|
|
58
|
+
namespace: "berasig.ethereum"
|
|
59
|
+
})
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
berasigWallet
|
|
65
|
+
};
|