@talken/talkenkit 2.7.5-beta.1 → 2.7.5-beta.2
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/abcWallet-HKEIJA6T.js +172 -0
- package/dist/chunk-CGSOMXYJ.js +5757 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +874 -792
- package/dist/providers/SignConfirmationProvider/SuppressSignConfirmation.d.ts +11 -0
- package/dist/providers/SignConfirmationProvider/index.d.ts +1 -0
- 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 +1 -0
- package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.d.ts +9 -0
- package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +13 -13
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +9 -9
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +14 -14
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/api/modules/auth.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/api/modules/bitcoin.d.ts +1 -1
- package/dist/wallets/walletConnectors/abcWallet/index.js +45 -45
- package/dist/wallets/walletConnectors/abcWallet/types/api.types.d.ts +10 -10
- package/dist/wallets/walletConnectors/abcWallet/types.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/utils.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +4 -4
- package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/binanceWallet/binanceWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- 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-3QC567QK.js +94 -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-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-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-EJALZNAR.js +101 -0
- package/dist/wallets/walletConnectors/chunk-FVA6H2VF.js +95 -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-JL3QLDZK.js +186 -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-LKNK2KKU.js +76 -0
- package/dist/wallets/walletConnectors/chunk-LLOSDVCH.js +58 -0
- package/dist/wallets/walletConnectors/chunk-MQ57XDYK.js +340 -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-MYQPTETH.js +186 -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-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-TWVKSPTP.js +91 -0
- package/dist/wallets/walletConnectors/chunk-U5UPCM5V.js +66 -0
- package/dist/wallets/walletConnectors/chunk-UZAUWE5E.js +27 -0
- package/dist/wallets/walletConnectors/chunk-V2C47DTB.js +66 -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/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +87 -87
- package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
- package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
- package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getBitcoinNetwork,
|
|
4
|
+
getEvmNetwork,
|
|
5
|
+
getSolanaNetwork,
|
|
6
|
+
getTronNetwork
|
|
7
|
+
} from "./chunk-O4AU63LK.js";
|
|
8
|
+
import {
|
|
9
|
+
createLogger
|
|
10
|
+
} from "./chunk-762I67R6.js";
|
|
11
|
+
import {
|
|
12
|
+
getCredentialManager
|
|
13
|
+
} from "./chunk-P6KWAOFF.js";
|
|
14
|
+
import {
|
|
15
|
+
AbcError
|
|
16
|
+
} from "./chunk-BUAWEYGV.js";
|
|
17
|
+
|
|
18
|
+
// src/wallets/walletConnectors/abcWallet/walletGeneration.ts
|
|
19
|
+
import { getTalkenApiClient } from "@talken/talkenkit";
|
|
20
|
+
var logger = createLogger("WalletGeneration");
|
|
21
|
+
async function mapApiResponseToWallets(genResponse, infoResponse, email) {
|
|
22
|
+
const accounts = infoResponse?.accounts || [];
|
|
23
|
+
const evmAccount = accounts[0] || infoResponse || {};
|
|
24
|
+
const uid = String(genResponse.uid || evmAccount.uid || "");
|
|
25
|
+
const wid = String(genResponse.wid || evmAccount.wid || "");
|
|
26
|
+
const sid = String(
|
|
27
|
+
evmAccount.sid || evmAccount.ethAddress || genResponse.evmAddress || ""
|
|
28
|
+
);
|
|
29
|
+
const pubkey = String(evmAccount.pubkey || genResponse.pubkey || "");
|
|
30
|
+
const solMaterial = genResponse.solana || {};
|
|
31
|
+
let btcAddress = genResponse.btcAddress || "";
|
|
32
|
+
let trxAddress = genResponse.trxAddress || "";
|
|
33
|
+
if ((!btcAddress || !trxAddress) && pubkey) {
|
|
34
|
+
try {
|
|
35
|
+
const api = getTalkenApiClient();
|
|
36
|
+
if (api) {
|
|
37
|
+
const addrResponse = await api.wallet.getAddressForChain("all");
|
|
38
|
+
if (!btcAddress)
|
|
39
|
+
btcAddress = addrResponse?.btc || addrResponse?.btcAddress || "";
|
|
40
|
+
if (!trxAddress)
|
|
41
|
+
trxAddress = addrResponse?.trx || addrResponse?.trxAddress || "";
|
|
42
|
+
}
|
|
43
|
+
} catch (err) {
|
|
44
|
+
logger.warn("Failed to derive BTC/TRX addresses:", err);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const pvencstr = String(evmAccount.pvencstr || "");
|
|
48
|
+
const edp = String(evmAccount.encryptDevicePassword || "");
|
|
49
|
+
if (uid && wid && sid && pvencstr && edp) {
|
|
50
|
+
getCredentialManager().setEvmSigningCredentials({
|
|
51
|
+
uid,
|
|
52
|
+
wid,
|
|
53
|
+
sid,
|
|
54
|
+
pvencstr,
|
|
55
|
+
encryptDevicePassword: edp
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const evmWallet = {
|
|
59
|
+
uid,
|
|
60
|
+
sessionId: sid,
|
|
61
|
+
keyId: wid,
|
|
62
|
+
encryptedShare: pvencstr,
|
|
63
|
+
secretStore: edp,
|
|
64
|
+
address: genResponse.evmAddress || sid,
|
|
65
|
+
chainId: getEvmNetwork(),
|
|
66
|
+
sid,
|
|
67
|
+
type: "evm",
|
|
68
|
+
email,
|
|
69
|
+
pubkey
|
|
70
|
+
};
|
|
71
|
+
const solanaWallet = {
|
|
72
|
+
uid,
|
|
73
|
+
sessionId: String(solMaterial.shareId || ""),
|
|
74
|
+
keyId: String(solMaterial.keyId || ""),
|
|
75
|
+
encryptedShare: String(solMaterial.encryptedShare || ""),
|
|
76
|
+
secretStore: String(solMaterial.secretStore || ""),
|
|
77
|
+
shareId: String(solMaterial.shareId || ""),
|
|
78
|
+
publicKey: String(solMaterial.publicKey || ""),
|
|
79
|
+
address: genResponse.solAddress || solMaterial.address || "",
|
|
80
|
+
network: getSolanaNetwork()
|
|
81
|
+
};
|
|
82
|
+
const bitcoinWallet = {
|
|
83
|
+
uid,
|
|
84
|
+
sessionId: sid,
|
|
85
|
+
keyId: wid,
|
|
86
|
+
encryptedShare: String(evmAccount.pvencstr || ""),
|
|
87
|
+
shareId: sid,
|
|
88
|
+
publicKey: pubkey,
|
|
89
|
+
address: btcAddress,
|
|
90
|
+
addressType: "bech32",
|
|
91
|
+
network: getBitcoinNetwork()
|
|
92
|
+
};
|
|
93
|
+
const tronWallet = {
|
|
94
|
+
uid,
|
|
95
|
+
sessionId: sid,
|
|
96
|
+
keyId: wid,
|
|
97
|
+
encryptedShare: String(evmAccount.pvencstr || ""),
|
|
98
|
+
shareId: sid,
|
|
99
|
+
publicKey: pubkey,
|
|
100
|
+
address: trxAddress,
|
|
101
|
+
network: getTronNetwork()
|
|
102
|
+
};
|
|
103
|
+
return { evmWallet, solanaWallet, bitcoinWallet, tronWallet };
|
|
104
|
+
}
|
|
105
|
+
async function generateMpcWallets(hashedPin, email) {
|
|
106
|
+
const api = getTalkenApiClient();
|
|
107
|
+
if (!api) {
|
|
108
|
+
throw new AbcError(
|
|
109
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
110
|
+
"TalkenApiClient not initialized"
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const genResponse = await api.wallet.generate(hashedPin, email);
|
|
115
|
+
const infoResponse = await api.wallet.getInfo().catch(() => ({}));
|
|
116
|
+
return await mapApiResponseToWallets(
|
|
117
|
+
genResponse,
|
|
118
|
+
infoResponse,
|
|
119
|
+
email || ""
|
|
120
|
+
);
|
|
121
|
+
} catch (error) {
|
|
122
|
+
throw new AbcError(
|
|
123
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
124
|
+
`Failed to generate MPC wallets: ${error.message}`,
|
|
125
|
+
{ originalError: error }
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async function recoverMpcWallets(hashedPin, email) {
|
|
130
|
+
const api = getTalkenApiClient();
|
|
131
|
+
if (!api) {
|
|
132
|
+
throw new AbcError(
|
|
133
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
134
|
+
"TalkenApiClient not initialized"
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
const genResponse = await api.wallet.recover(hashedPin, email);
|
|
139
|
+
const infoResponse = await api.wallet.getInfo().catch(() => ({}));
|
|
140
|
+
return await mapApiResponseToWallets(
|
|
141
|
+
genResponse,
|
|
142
|
+
infoResponse,
|
|
143
|
+
email || ""
|
|
144
|
+
);
|
|
145
|
+
} catch (error) {
|
|
146
|
+
throw new AbcError(
|
|
147
|
+
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
148
|
+
`Failed to recover MPC wallets: ${error.message}`,
|
|
149
|
+
{ originalError: error }
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function validateMpcWallets(result) {
|
|
154
|
+
const errors = [];
|
|
155
|
+
if (!result.evmWallet) {
|
|
156
|
+
errors.push("EVM wallet is missing");
|
|
157
|
+
} else {
|
|
158
|
+
if (!result.evmWallet.address || !result.evmWallet.address.startsWith("0x")) {
|
|
159
|
+
errors.push("Invalid EVM wallet address");
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (!result.solanaWallet) {
|
|
163
|
+
errors.push("Solana wallet is missing");
|
|
164
|
+
} else {
|
|
165
|
+
if (!result.solanaWallet.address) {
|
|
166
|
+
errors.push("Invalid Solana wallet address");
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (!result.bitcoinWallet) {
|
|
170
|
+
errors.push("Bitcoin wallet is missing");
|
|
171
|
+
} else {
|
|
172
|
+
if (!result.bitcoinWallet.address) {
|
|
173
|
+
errors.push("Invalid Bitcoin wallet address");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (!result.tronWallet) {
|
|
177
|
+
errors.push("TRON wallet is missing");
|
|
178
|
+
} else {
|
|
179
|
+
if (!result.tronWallet.address) {
|
|
180
|
+
errors.push("Invalid TRON wallet address");
|
|
181
|
+
} else if (!result.tronWallet.address.startsWith("T")) {
|
|
182
|
+
errors.push("Invalid TRON address format (expected T prefix)");
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
valid: errors.length === 0,
|
|
187
|
+
errors
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export {
|
|
192
|
+
generateMpcWallets,
|
|
193
|
+
recoverMpcWallets,
|
|
194
|
+
validateMpcWallets
|
|
195
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
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/bybitWallet/bybitWallet.ts
|
|
11
|
+
var bybitWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isBybitInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "bybitWallet"
|
|
17
|
+
});
|
|
18
|
+
const shouldUseWalletConnect = !isBybitInjected;
|
|
19
|
+
const getUri = (uri) => {
|
|
20
|
+
return `bybitapp://open/route?targetUrl=by://web3/walletconnect/wc?uri=${encodeURIComponent(
|
|
21
|
+
uri
|
|
22
|
+
)}`;
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
id: "bybit",
|
|
26
|
+
name: "Bybit Wallet",
|
|
27
|
+
rdns: "com.bybit",
|
|
28
|
+
iconUrl: async () => (await import("./bybitWallet-GR4PFINZ.js")).default,
|
|
29
|
+
installed: !shouldUseWalletConnect ? isBybitInjected : void 0,
|
|
30
|
+
iconBackground: "#000000",
|
|
31
|
+
downloadUrls: {
|
|
32
|
+
chrome: "https://chromewebstore.google.com/detail/bybit-wallet/pdliaogehgdbhbnmkklieghmmjkpigpa",
|
|
33
|
+
browserExtension: "https://www.bybit.com/en/web3",
|
|
34
|
+
android: "https://play.google.com/store/apps/details?id=com.bybit.app",
|
|
35
|
+
ios: "https://apps.apple.com/us/app/bybit-buy-trade-crypto/id1488296980",
|
|
36
|
+
mobile: "https://www.bybit.com/en/web3",
|
|
37
|
+
qrCode: "https://www.bybit.com/en/web3"
|
|
38
|
+
},
|
|
39
|
+
mobile: {
|
|
40
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
41
|
+
},
|
|
42
|
+
qrCode: shouldUseWalletConnect ? {
|
|
43
|
+
getUri: (uri) => uri,
|
|
44
|
+
instructions: {
|
|
45
|
+
learnMoreUrl: "https://www.bybit.com/en/web3",
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.bybit.qr_code.step1.description",
|
|
49
|
+
step: "install",
|
|
50
|
+
title: "wallet_connectors.bybit.qr_code.step1.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.bybit.qr_code.step2.description",
|
|
54
|
+
step: "create",
|
|
55
|
+
title: "wallet_connectors.bybit.qr_code.step2.title"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
description: "wallet_connectors.bybit.qr_code.step3.description",
|
|
59
|
+
step: "scan",
|
|
60
|
+
title: "wallet_connectors.bybit.qr_code.step3.title"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
} : void 0,
|
|
65
|
+
extension: {
|
|
66
|
+
instructions: {
|
|
67
|
+
learnMoreUrl: "https://www.bybit.com/en/web3",
|
|
68
|
+
steps: [
|
|
69
|
+
{
|
|
70
|
+
description: "wallet_connectors.bybit.extension.step1.description",
|
|
71
|
+
step: "install",
|
|
72
|
+
title: "wallet_connectors.bybit.extension.step1.title"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
description: "wallet_connectors.bybit.extension.step2.description",
|
|
76
|
+
step: "create",
|
|
77
|
+
title: "wallet_connectors.bybit.extension.step2.title"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
description: "wallet_connectors.bybit.extension.step3.description",
|
|
81
|
+
step: "refresh",
|
|
82
|
+
title: "wallet_connectors.bybit.extension.step3.title"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
88
|
+
projectId,
|
|
89
|
+
walletConnectParameters
|
|
90
|
+
}) : getInjectedConnector({
|
|
91
|
+
namespace: "bybitWallet"
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
bybitWallet
|
|
98
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-PONHGUSY.js";
|
|
6
|
+
import {
|
|
7
|
+
isMobile
|
|
8
|
+
} from "./chunk-RETKWSKD.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-PODFK4OS.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
|
|
14
|
+
var tokenPocketWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isTokenPocketInjected = hasInjectedProvider({ flag: "isTokenPocket" });
|
|
19
|
+
const shouldUseWalletConnect = !isTokenPocketInjected;
|
|
20
|
+
const getUri = (uri) => {
|
|
21
|
+
return isMobile() ? `tpoutside://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
id: "tokenPocket",
|
|
25
|
+
name: "TokenPocket",
|
|
26
|
+
rdns: "pro.tokenpocket",
|
|
27
|
+
iconUrl: async () => (await import("./tokenPocketWallet-BVMBOYTC.js")).default,
|
|
28
|
+
iconBackground: "#2980FE",
|
|
29
|
+
installed: !shouldUseWalletConnect ? isTokenPocketInjected : void 0,
|
|
30
|
+
downloadUrls: {
|
|
31
|
+
chrome: "https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii",
|
|
32
|
+
browserExtension: "https://extension.tokenpocket.pro/",
|
|
33
|
+
android: "https://play.google.com/store/apps/details?id=vip.mytokenpocket",
|
|
34
|
+
ios: "https://apps.apple.com/us/app/tp-global-wallet/id6444625622",
|
|
35
|
+
qrCode: "https://tokenpocket.pro/en/download/app",
|
|
36
|
+
mobile: "https://tokenpocket.pro/en/download/app"
|
|
37
|
+
},
|
|
38
|
+
mobile: {
|
|
39
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
40
|
+
},
|
|
41
|
+
qrCode: shouldUseWalletConnect ? {
|
|
42
|
+
getUri,
|
|
43
|
+
instructions: {
|
|
44
|
+
learnMoreUrl: "https://help.tokenpocket.pro/en/",
|
|
45
|
+
steps: [
|
|
46
|
+
{
|
|
47
|
+
description: "wallet_connectors.token_pocket.qr_code.step1.description",
|
|
48
|
+
step: "install",
|
|
49
|
+
title: "wallet_connectors.token_pocket.qr_code.step1.title"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
description: "wallet_connectors.token_pocket.qr_code.step2.description",
|
|
53
|
+
step: "create",
|
|
54
|
+
title: "wallet_connectors.token_pocket.qr_code.step2.title"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
description: "wallet_connectors.token_pocket.qr_code.step3.description",
|
|
58
|
+
step: "scan",
|
|
59
|
+
title: "wallet_connectors.token_pocket.qr_code.step3.title"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
} : void 0,
|
|
64
|
+
extension: {
|
|
65
|
+
instructions: {
|
|
66
|
+
learnMoreUrl: "https://help.tokenpocket.pro/en/extension-wallet/faq/installation-tutorial",
|
|
67
|
+
steps: [
|
|
68
|
+
{
|
|
69
|
+
description: "wallet_connectors.token_pocket.extension.step1.description",
|
|
70
|
+
step: "install",
|
|
71
|
+
title: "wallet_connectors.token_pocket.extension.step1.title"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
description: "wallet_connectors.token_pocket.extension.step2.description",
|
|
75
|
+
step: "create",
|
|
76
|
+
title: "wallet_connectors.token_pocket.extension.step2.title"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
description: "wallet_connectors.token_pocket.extension.step3.description",
|
|
80
|
+
step: "refresh",
|
|
81
|
+
title: "wallet_connectors.token_pocket.extension.step3.title"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
87
|
+
projectId,
|
|
88
|
+
walletConnectParameters
|
|
89
|
+
}) : getInjectedConnector({ flag: "isTokenPocket" })
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
tokenPocketWallet
|
|
95
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
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/roninWallet/roninWallet.ts
|
|
11
|
+
var roninWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isRoninInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "ronin.provider"
|
|
17
|
+
});
|
|
18
|
+
const shouldUseWalletConnect = !isRoninInjected;
|
|
19
|
+
const getUri = (uri) => {
|
|
20
|
+
return `roninwallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
id: "ronin",
|
|
24
|
+
name: "Ronin Wallet",
|
|
25
|
+
iconUrl: async () => (await import("./roninWallet-SAB5ESVK.js")).default,
|
|
26
|
+
iconBackground: "#ffffff",
|
|
27
|
+
rdns: "com.roninchain.wallet",
|
|
28
|
+
installed: isRoninInjected || void 0,
|
|
29
|
+
downloadUrls: {
|
|
30
|
+
android: "https://play.google.com/store/apps/details?id=com.skymavis.genesis",
|
|
31
|
+
ios: "https://apps.apple.com/us/app/ronin-wallet/id1592675001",
|
|
32
|
+
mobile: "https://wallet.roninchain.com",
|
|
33
|
+
chrome: "https://chrome.google.com/webstore/detail/ronin-wallet/fnjhmkhhmkbjkkabndcnnogagogbneec",
|
|
34
|
+
edge: "https://microsoftedge.microsoft.com/addons/detail/ronin-wallet/kjmoohlgokccodicjjfebfomlbljgfhk",
|
|
35
|
+
firefox: "https://addons.mozilla.org/firefox/addon/ronin-wallet",
|
|
36
|
+
browserExtension: "https://wallet.roninchain.com/",
|
|
37
|
+
qrCode: "https://wallet.roninchain.com/"
|
|
38
|
+
},
|
|
39
|
+
mobile: {
|
|
40
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
41
|
+
},
|
|
42
|
+
qrCode: shouldUseWalletConnect ? {
|
|
43
|
+
getUri: (uri) => uri,
|
|
44
|
+
instructions: {
|
|
45
|
+
learnMoreUrl: "https://wallet.roninchain.com/",
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.ronin.qr_code.step1.description",
|
|
49
|
+
step: "install",
|
|
50
|
+
title: "wallet_connectors.ronin.qr_code.step1.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.ronin.qr_code.step2.description",
|
|
54
|
+
step: "create",
|
|
55
|
+
title: "wallet_connectors.ronin.qr_code.step2.title"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
description: "wallet_connectors.ronin.qr_code.step3.description",
|
|
59
|
+
step: "scan",
|
|
60
|
+
title: "wallet_connectors.ronin.qr_code.step3.title"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
} : void 0,
|
|
65
|
+
extension: {
|
|
66
|
+
instructions: {
|
|
67
|
+
learnMoreUrl: "https://wallet.roninchain.com/",
|
|
68
|
+
steps: [
|
|
69
|
+
{
|
|
70
|
+
description: "wallet_connectors.ronin.extension.step1.description",
|
|
71
|
+
step: "install",
|
|
72
|
+
title: "wallet_connectors.ronin.extension.step1.title"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
description: "wallet_connectors.ronin.extension.step2.description",
|
|
76
|
+
step: "create",
|
|
77
|
+
title: "wallet_connectors.ronin.extension.step2.title"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
description: "wallet_connectors.ronin.extension.step3.description",
|
|
81
|
+
step: "refresh",
|
|
82
|
+
title: "wallet_connectors.ronin.extension.step3.title"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
88
|
+
projectId,
|
|
89
|
+
walletConnectParameters
|
|
90
|
+
}) : getInjectedConnector({ namespace: "ronin.provider" })
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
roninWallet
|
|
96
|
+
};
|