@talken/talkenkit 2.8.3 → 2.8.4
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 → AbcCredentialManager-QM2BNLSR.js} +1 -1
- package/dist/{abcWallet-7ZZXHG7O.js → abcWallet-4PXYWHYM.js} +2 -2
- package/dist/{chunk-SUYKWM5G.js → chunk-PS5CBMY5.js} +10 -8
- package/dist/{chunk-HX6JUKSS.js → chunk-ZISAJ7BZ.js} +253 -25
- package/dist/index.css +13 -13
- package/dist/index.js +11 -11
- package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/StorageService.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +5 -5
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +19 -16
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +7 -6
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +19 -17
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +20 -17
- package/dist/wallets/walletConnectors/abcWallet/abcXrplProvider.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/api/ConfigApi.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +15 -13
- 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 +18 -16
- package/dist/wallets/walletConnectors/abcWallet/api/modules/auth.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/modules/bitcoin.d.ts +1 -1
- package/dist/wallets/walletConnectors/abcWallet/api/modules/bitcoin.js +13 -5
- package/dist/wallets/walletConnectors/abcWallet/api/modules/evm.d.ts +8 -5
- package/dist/wallets/walletConnectors/abcWallet/api/modules/evm.js +12 -4
- package/dist/wallets/walletConnectors/abcWallet/api/modules/signBodies.d.ts +34 -0
- package/dist/wallets/walletConnectors/abcWallet/api/modules/signBodies.js +25 -0
- package/dist/wallets/walletConnectors/abcWallet/api/modules/signingRefresh.d.ts +17 -0
- package/dist/wallets/walletConnectors/abcWallet/api/modules/signingRefresh.js +18 -0
- package/dist/wallets/walletConnectors/abcWallet/api/modules/solana.d.ts +1 -1
- package/dist/wallets/walletConnectors/abcWallet/api/modules/solana.js +9 -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.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/constants.d.ts +6 -6
- package/dist/wallets/walletConnectors/abcWallet/constants.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/evmTxType.d.ts +20 -0
- package/dist/wallets/walletConnectors/abcWallet/evmTxType.js +8 -0
- package/dist/wallets/walletConnectors/abcWallet/index.js +37 -34
- package/dist/wallets/walletConnectors/abcWallet/sessionUtils.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/types/api.types.d.ts +71 -1
- package/dist/wallets/walletConnectors/abcWallet/types.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/utils.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +5 -5
- package/dist/wallets/walletConnectors/{chunk-3NWM24MH.js → chunk-5E7TNMON.js} +6 -3
- package/dist/wallets/walletConnectors/{chunk-YNE2UX2Z.js → chunk-5SHN7JNR.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-TYJR3KGY.js → chunk-6BHMNR5X.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-2LOET2LX.js → chunk-6HR6CEOY.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ANBOP6A6.js → chunk-6LPMWYFM.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-L3EPZ4NZ.js → chunk-75H6DQT6.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-3Z5DO42M.js → chunk-7GBAUSQJ.js} +10 -8
- package/dist/wallets/walletConnectors/{chunk-7DLZKN46.js → chunk-CCUNTMLD.js} +6 -6
- package/dist/wallets/walletConnectors/{chunk-HM73RD2O.js → chunk-CIAVEXOY.js} +10 -4
- package/dist/wallets/walletConnectors/{chunk-URTS7ZIZ.js → chunk-DPYQH3WE.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-2LH53QET.js → chunk-F6AHT6K4.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZXG3X6PV.js → chunk-F6EG7H2O.js} +2 -2
- package/dist/wallets/walletConnectors/chunk-FLBJ7T4Q.js +44 -0
- package/dist/wallets/walletConnectors/{chunk-4DGLNUHL.js → chunk-FWKMNVWU.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZOBSRU6L.js → chunk-HFW2XV2R.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-M4YGDOD5.js → chunk-HMMEOZDT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-S6XEM7RM.js → chunk-HXYOWG5P.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-CXWASK7L.js → chunk-KX3IFHJQ.js} +16 -16
- package/dist/wallets/walletConnectors/chunk-OESFVVLA.js +38 -0
- package/dist/wallets/walletConnectors/{chunk-XDNFWX2X.js → chunk-OEZE4GBQ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-YFNVHCMA.js → chunk-QTBJ6WNZ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-FWX2HD26.js → chunk-RQYBKCWA.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-4BG6V5TZ.js → chunk-TXB6KXPR.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-4Y7YP4IR.js → chunk-UNLWNVSN.js} +16 -6
- package/dist/wallets/walletConnectors/{chunk-6FPKKAFI.js → chunk-XQTK7NGN.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-VVXSRRXI.js → chunk-YECMDMEA.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-ICGK5DGY.js → chunk-YUBS7MJ6.js} +44 -19
- package/dist/wallets/walletConnectors/{chunk-NEMEHJ72.js → chunk-ZITVWA4X.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-ZTIRW7TR.js +161 -0
- package/dist/wallets/walletConnectors/index.js +64 -61
- package/package.json +1 -1
- package/dist/wallets/walletConnectors/chunk-2KHTFKPP.js +0 -186
- package/dist/wallets/walletConnectors/chunk-3QC567QK.js +0 -94
- package/dist/wallets/walletConnectors/chunk-4K2V7RCL.js +0 -96
- package/dist/wallets/walletConnectors/chunk-4V3HRM2R.js +0 -95
- package/dist/wallets/walletConnectors/chunk-5QYCHHVB.js +0 -98
- package/dist/wallets/walletConnectors/chunk-76M232IF.js +0 -101
- package/dist/wallets/walletConnectors/chunk-7IBMHOYD.js +0 -102
- package/dist/wallets/walletConnectors/chunk-A2DZALFI.js +0 -108
- package/dist/wallets/walletConnectors/chunk-BZPKBSWY.js +0 -66
- package/dist/wallets/walletConnectors/chunk-CEOJSQAI.js +0 -66
- package/dist/wallets/walletConnectors/chunk-CTAFZ5RQ.js +0 -71
- package/dist/wallets/walletConnectors/chunk-DHWJ3552.js +0 -93
- package/dist/wallets/walletConnectors/chunk-EJALZNAR.js +0 -101
- package/dist/wallets/walletConnectors/chunk-FE2BFYJB.js +0 -73
- package/dist/wallets/walletConnectors/chunk-FGYJTUYV.js +0 -94
- package/dist/wallets/walletConnectors/chunk-FVA6H2VF.js +0 -95
- package/dist/wallets/walletConnectors/chunk-GNF5CHDQ.js +0 -102
- package/dist/wallets/walletConnectors/chunk-GZPGNUNF.js +0 -94
- package/dist/wallets/walletConnectors/chunk-HALTGRQW.js +0 -87
- package/dist/wallets/walletConnectors/chunk-IONL6LMJ.js +0 -71
- package/dist/wallets/walletConnectors/chunk-KNNHGFKJ.js +0 -98
- package/dist/wallets/walletConnectors/chunk-KQDFRZT4.js +0 -65
- package/dist/wallets/walletConnectors/chunk-KQROIRBW.js +0 -27
- package/dist/wallets/walletConnectors/chunk-LKNK2KKU.js +0 -76
- package/dist/wallets/walletConnectors/chunk-NM7YUGLV.js +0 -186
- package/dist/wallets/walletConnectors/chunk-PXL5G2PM.js +0 -96
- package/dist/wallets/walletConnectors/chunk-QB3QLNSL.js +0 -76
- package/dist/wallets/walletConnectors/chunk-QRU6XFHH.js +0 -110
- package/dist/wallets/walletConnectors/chunk-T6RB3SM7.js +0 -73
- package/dist/wallets/walletConnectors/chunk-TA4DDCKN.js +0 -96
- package/dist/wallets/walletConnectors/chunk-TWVKSPTP.js +0 -91
- package/dist/wallets/walletConnectors/chunk-U5UPCM5V.js +0 -66
- package/dist/wallets/walletConnectors/chunk-V5LGED4F.js +0 -103
- package/dist/wallets/walletConnectors/chunk-WZMFQQ6R.js +0 -108
- package/dist/wallets/walletConnectors/chunk-XS6GJRRA.js +0 -98
- package/dist/wallets/walletConnectors/chunk-XSJUQHR7.js +0 -95
- package/dist/wallets/walletConnectors/chunk-XSX5EECZ.js +0 -96
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
TalkenApiError
|
|
4
|
+
} from "./chunk-BUAWEYGV.js";
|
|
5
|
+
|
|
6
|
+
// src/wallets/walletConnectors/abcWallet/api/modules/signBodies.ts
|
|
7
|
+
function badRequest(message) {
|
|
8
|
+
return new TalkenApiError("BAD_REQUEST", message, 400);
|
|
9
|
+
}
|
|
10
|
+
function compact(body) {
|
|
11
|
+
return Object.fromEntries(
|
|
12
|
+
Object.entries(body).filter(([, value]) => value != null)
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function isRecord(value) {
|
|
16
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
function toDecimalString(value, field) {
|
|
19
|
+
const text = typeof value === "string" ? value.trim() : String(value);
|
|
20
|
+
if (!/^(0x[0-9a-fA-F]+|\d+)$/.test(text)) {
|
|
21
|
+
throw badRequest(`${field} must be a decimal or 0x-hex integer`);
|
|
22
|
+
}
|
|
23
|
+
return BigInt(text).toString(10);
|
|
24
|
+
}
|
|
25
|
+
function toSignTxBody(params) {
|
|
26
|
+
if (!params.network || !params.to) {
|
|
27
|
+
throw badRequest("network and to are required");
|
|
28
|
+
}
|
|
29
|
+
return compact({
|
|
30
|
+
chainKey: params.network,
|
|
31
|
+
to: params.to,
|
|
32
|
+
amountWei: toDecimalString(params.value || "0", "value"),
|
|
33
|
+
data: params.data,
|
|
34
|
+
nonce: params.nonce,
|
|
35
|
+
gasLimit: params.gasLimit,
|
|
36
|
+
gasPrice: params.gasPrice,
|
|
37
|
+
maxFeePerGas: params.maxFeePerGas,
|
|
38
|
+
maxPriorityFeePerGas: params.maxPriorityFeePerGas,
|
|
39
|
+
type: params.type,
|
|
40
|
+
pin: params.pin,
|
|
41
|
+
email: params.email
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function referencedTypeNames(types) {
|
|
45
|
+
const names = /* @__PURE__ */ new Set();
|
|
46
|
+
for (const fields of Object.values(types)) {
|
|
47
|
+
if (!Array.isArray(fields))
|
|
48
|
+
continue;
|
|
49
|
+
for (const field of fields) {
|
|
50
|
+
const type = isRecord(field) ? field.type : void 0;
|
|
51
|
+
if (typeof type === "string")
|
|
52
|
+
names.add(type.replace(/(\[\d*\])+$/, ""));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return names;
|
|
56
|
+
}
|
|
57
|
+
function inferPrimaryType(types) {
|
|
58
|
+
const referenced = referencedTypeNames(types);
|
|
59
|
+
const roots = Object.keys(types).filter(
|
|
60
|
+
(name) => name !== "EIP712Domain" && !referenced.has(name)
|
|
61
|
+
);
|
|
62
|
+
if (roots.length !== 1) {
|
|
63
|
+
throw badRequest(
|
|
64
|
+
"typedData.primaryType is required when types has no single root struct"
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
return roots[0];
|
|
68
|
+
}
|
|
69
|
+
function toSignTypedDataBody(params) {
|
|
70
|
+
if (!params.network || !params.typedData) {
|
|
71
|
+
throw badRequest("network and typedData are required");
|
|
72
|
+
}
|
|
73
|
+
let parsed = params.typedData;
|
|
74
|
+
if (typeof parsed === "string") {
|
|
75
|
+
try {
|
|
76
|
+
parsed = JSON.parse(parsed);
|
|
77
|
+
} catch {
|
|
78
|
+
throw badRequest("typedData must be valid JSON");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (!isRecord(parsed))
|
|
82
|
+
throw badRequest("typedData must be a JSON object");
|
|
83
|
+
const { domain, types, primaryType, message } = parsed;
|
|
84
|
+
if (!isRecord(domain))
|
|
85
|
+
throw badRequest("typedData.domain must be an object");
|
|
86
|
+
if (!isRecord(types))
|
|
87
|
+
throw badRequest("typedData.types must be an object");
|
|
88
|
+
if (!isRecord(message)) {
|
|
89
|
+
throw badRequest("typedData.message must be an object");
|
|
90
|
+
}
|
|
91
|
+
if (primaryType != null && (typeof primaryType !== "string" || primaryType.trim() === "")) {
|
|
92
|
+
throw badRequest("typedData.primaryType must be a non-empty string");
|
|
93
|
+
}
|
|
94
|
+
return compact({
|
|
95
|
+
chainKey: params.network,
|
|
96
|
+
domain,
|
|
97
|
+
types,
|
|
98
|
+
primaryType: primaryType ?? inferPrimaryType(types),
|
|
99
|
+
message,
|
|
100
|
+
pin: params.pin,
|
|
101
|
+
email: params.email
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function toSignMessageBody(params) {
|
|
105
|
+
return compact({
|
|
106
|
+
chainKey: params.network,
|
|
107
|
+
message: params.message,
|
|
108
|
+
address: params.address,
|
|
109
|
+
signaturePrefix: params.signaturePrefix,
|
|
110
|
+
pin: params.pin,
|
|
111
|
+
email: params.email
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function toSignAuthorizationBody(params) {
|
|
115
|
+
const { authorization } = params;
|
|
116
|
+
if (!authorization?.address || authorization.chainId == null || authorization.nonce == null) {
|
|
117
|
+
throw badRequest(
|
|
118
|
+
"authorization.chainId, authorization.address, authorization.nonce are required"
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
return compact({
|
|
122
|
+
chainKey: params.network,
|
|
123
|
+
authorization: {
|
|
124
|
+
chainId: Number(
|
|
125
|
+
toDecimalString(authorization.chainId, "authorization.chainId")
|
|
126
|
+
),
|
|
127
|
+
address: authorization.address,
|
|
128
|
+
nonce: toDecimalString(authorization.nonce, "authorization.nonce")
|
|
129
|
+
},
|
|
130
|
+
pin: params.pin,
|
|
131
|
+
email: params.email
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function toSignSolanaBody(params) {
|
|
135
|
+
return compact({
|
|
136
|
+
message: params.message,
|
|
137
|
+
network: params.network,
|
|
138
|
+
pin: params.pin,
|
|
139
|
+
keyId: params.keyId,
|
|
140
|
+
encryptedShare: params.encryptedShare,
|
|
141
|
+
secretStore: params.secretStore
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function toSignHashBody(params) {
|
|
145
|
+
return compact({
|
|
146
|
+
hash: params.hash,
|
|
147
|
+
chainKey: params.network || void 0,
|
|
148
|
+
pin: params.pin,
|
|
149
|
+
email: params.email
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export {
|
|
154
|
+
toDecimalString,
|
|
155
|
+
toSignTxBody,
|
|
156
|
+
toSignTypedDataBody,
|
|
157
|
+
toSignMessageBody,
|
|
158
|
+
toSignAuthorizationBody,
|
|
159
|
+
toSignSolanaBody,
|
|
160
|
+
toSignHashBody
|
|
161
|
+
};
|
|
@@ -1,62 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
abcWallet
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-HMMEOZDT.js";
|
|
5
|
+
import "./chunk-CCUNTMLD.js";
|
|
6
|
+
import "./chunk-CIAVEXOY.js";
|
|
7
|
+
import "./chunk-OESFVVLA.js";
|
|
8
|
+
import "./chunk-KX3IFHJQ.js";
|
|
9
|
+
import "./chunk-6HR6CEOY.js";
|
|
10
|
+
import "./chunk-F6AHT6K4.js";
|
|
11
|
+
import "./chunk-HFW2XV2R.js";
|
|
12
|
+
import "./chunk-OEZE4GBQ.js";
|
|
13
|
+
import "./chunk-UNLWNVSN.js";
|
|
14
|
+
import "./chunk-YUBS7MJ6.js";
|
|
15
|
+
import "./chunk-FLBJ7T4Q.js";
|
|
16
|
+
import "./chunk-5E7TNMON.js";
|
|
17
|
+
import "./chunk-ZTIRW7TR.js";
|
|
18
|
+
import "./chunk-6BHMNR5X.js";
|
|
16
19
|
import "./chunk-GFWUFYT2.js";
|
|
17
20
|
import {
|
|
18
21
|
zerionWallet
|
|
19
22
|
} from "./chunk-55PYSSYF.js";
|
|
20
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-5SHN7JNR.js";
|
|
21
24
|
import "./chunk-3DHUDD4U.js";
|
|
22
25
|
import "./chunk-R6ZE7JAZ.js";
|
|
23
26
|
import "./chunk-CBKU2ERC.js";
|
|
24
27
|
import "./chunk-YXWHHI4S.js";
|
|
25
28
|
import "./chunk-KXPCOVNY.js";
|
|
26
29
|
import "./chunk-2DFJ6LEN.js";
|
|
27
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-YECMDMEA.js";
|
|
28
31
|
import "./chunk-3IYXGND5.js";
|
|
32
|
+
import "./chunk-RKQS3OQG.js";
|
|
29
33
|
import "./chunk-YTIJR6EJ.js";
|
|
30
34
|
import "./chunk-PR5O3NNO.js";
|
|
31
35
|
import "./chunk-JU6AJBYS.js";
|
|
32
36
|
import "./chunk-BUAWEYGV.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-3Z5DO42M.js";
|
|
37
|
+
import "./chunk-ZITVWA4X.js";
|
|
38
|
+
import "./chunk-7GBAUSQJ.js";
|
|
36
39
|
import {
|
|
37
40
|
tokenaryWallet
|
|
38
41
|
} from "./chunk-AGYNSAGV.js";
|
|
39
42
|
import {
|
|
40
|
-
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import {
|
|
43
|
-
talismanWallet
|
|
44
|
-
} from "./chunk-CV5HJWQX.js";
|
|
43
|
+
trustWallet
|
|
44
|
+
} from "./chunk-PK5F7QCO.js";
|
|
45
45
|
import {
|
|
46
46
|
valoraWallet
|
|
47
47
|
} from "./chunk-CVUEWUDI.js";
|
|
48
|
+
import {
|
|
49
|
+
uniswapWallet
|
|
50
|
+
} from "./chunk-DLDZUVTB.js";
|
|
48
51
|
import {
|
|
49
52
|
walletConnectWallet
|
|
50
53
|
} from "./chunk-KU5R3WAJ.js";
|
|
54
|
+
import {
|
|
55
|
+
wigwamWallet
|
|
56
|
+
} from "./chunk-XHES3UIX.js";
|
|
51
57
|
import {
|
|
52
58
|
xdefiWallet
|
|
53
59
|
} from "./chunk-LAXV47ZW.js";
|
|
54
60
|
import {
|
|
55
61
|
zealWallet
|
|
56
62
|
} from "./chunk-NPZ2IXNP.js";
|
|
57
|
-
import {
|
|
58
|
-
wigwamWallet
|
|
59
|
-
} from "./chunk-XHES3UIX.js";
|
|
60
63
|
import {
|
|
61
64
|
safeWallet
|
|
62
65
|
} from "./chunk-Z2QCE6O6.js";
|
|
@@ -66,24 +69,24 @@ import {
|
|
|
66
69
|
import {
|
|
67
70
|
safepalWallet
|
|
68
71
|
} from "./chunk-6UT4SIPZ.js";
|
|
69
|
-
import {
|
|
70
|
-
seifWallet
|
|
71
|
-
} from "./chunk-4MX42IPK.js";
|
|
72
72
|
import {
|
|
73
73
|
subWallet
|
|
74
74
|
} from "./chunk-AM4YPUW3.js";
|
|
75
75
|
import {
|
|
76
76
|
tahoWallet
|
|
77
77
|
} from "./chunk-ETH7KTEX.js";
|
|
78
|
+
import {
|
|
79
|
+
seifWallet
|
|
80
|
+
} from "./chunk-4MX42IPK.js";
|
|
81
|
+
import {
|
|
82
|
+
talismanWallet
|
|
83
|
+
} from "./chunk-CV5HJWQX.js";
|
|
78
84
|
import {
|
|
79
85
|
tokenPocketWallet
|
|
80
86
|
} from "./chunk-D24ZTR45.js";
|
|
81
87
|
import {
|
|
82
|
-
|
|
83
|
-
} from "./chunk-
|
|
84
|
-
import {
|
|
85
|
-
omniWallet
|
|
86
|
-
} from "./chunk-RGPO7AY3.js";
|
|
88
|
+
oneInchWallet
|
|
89
|
+
} from "./chunk-OJT577AY.js";
|
|
87
90
|
import {
|
|
88
91
|
oneKeyWallet
|
|
89
92
|
} from "./chunk-WQX4JNSR.js";
|
|
@@ -106,20 +109,20 @@ import {
|
|
|
106
109
|
roninWallet
|
|
107
110
|
} from "./chunk-TP7VE6CR.js";
|
|
108
111
|
import {
|
|
109
|
-
|
|
110
|
-
} from "./chunk-
|
|
111
|
-
import {
|
|
112
|
-
metaMaskWallet
|
|
113
|
-
} from "./chunk-YYWOGELV.js";
|
|
112
|
+
ledgerWallet
|
|
113
|
+
} from "./chunk-BF3VSNPL.js";
|
|
114
114
|
import {
|
|
115
115
|
magicEdenWallet
|
|
116
116
|
} from "./chunk-6MKGDGZC.js";
|
|
117
117
|
import {
|
|
118
|
-
|
|
119
|
-
} from "./chunk-
|
|
118
|
+
metaMaskWallet
|
|
119
|
+
} from "./chunk-YYWOGELV.js";
|
|
120
120
|
import {
|
|
121
121
|
nestWallet
|
|
122
122
|
} from "./chunk-V4DYVGON.js";
|
|
123
|
+
import {
|
|
124
|
+
mewWallet
|
|
125
|
+
} from "./chunk-T4UIU4M2.js";
|
|
123
126
|
import {
|
|
124
127
|
oktoWallet
|
|
125
128
|
} from "./chunk-7SSXG35M.js";
|
|
@@ -127,11 +130,8 @@ import {
|
|
|
127
130
|
okxWallet
|
|
128
131
|
} from "./chunk-N4US77B2.js";
|
|
129
132
|
import {
|
|
130
|
-
|
|
131
|
-
} from "./chunk-
|
|
132
|
-
import {
|
|
133
|
-
injectedWallet
|
|
134
|
-
} from "./chunk-DWN4FQRW.js";
|
|
133
|
+
omniWallet
|
|
134
|
+
} from "./chunk-RGPO7AY3.js";
|
|
135
135
|
import {
|
|
136
136
|
imTokenWallet
|
|
137
137
|
} from "./chunk-EHE2536P.js";
|
|
@@ -141,6 +141,9 @@ import {
|
|
|
141
141
|
import {
|
|
142
142
|
kaiaWallet
|
|
143
143
|
} from "./chunk-X3BXCZPF.js";
|
|
144
|
+
import {
|
|
145
|
+
injectedWallet
|
|
146
|
+
} from "./chunk-DWN4FQRW.js";
|
|
144
147
|
import {
|
|
145
148
|
kaikasWallet
|
|
146
149
|
} from "./chunk-PWGB7WJS.js";
|
|
@@ -151,23 +154,23 @@ import {
|
|
|
151
154
|
krakenWallet
|
|
152
155
|
} from "./chunk-CYOZFCR6.js";
|
|
153
156
|
import {
|
|
154
|
-
|
|
155
|
-
} from "./chunk-
|
|
157
|
+
kresusWallet
|
|
158
|
+
} from "./chunk-CM3VR7OM.js";
|
|
156
159
|
import {
|
|
157
|
-
|
|
158
|
-
} from "./chunk-
|
|
160
|
+
coreWallet
|
|
161
|
+
} from "./chunk-EV4S6LIH.js";
|
|
159
162
|
import {
|
|
160
163
|
dawnWallet
|
|
161
164
|
} from "./chunk-GYKXFIR2.js";
|
|
162
165
|
import {
|
|
163
166
|
desigWallet
|
|
164
167
|
} from "./chunk-5DEGWPQO.js";
|
|
165
|
-
import {
|
|
166
|
-
foxWallet
|
|
167
|
-
} from "./chunk-WJY36N2I.js";
|
|
168
168
|
import {
|
|
169
169
|
enkryptWallet
|
|
170
170
|
} from "./chunk-UHVWJDT6.js";
|
|
171
|
+
import {
|
|
172
|
+
foxWallet
|
|
173
|
+
} from "./chunk-WJY36N2I.js";
|
|
171
174
|
import {
|
|
172
175
|
frameWallet
|
|
173
176
|
} from "./chunk-DM3JOHQX.js";
|
|
@@ -195,35 +198,35 @@ import {
|
|
|
195
198
|
import {
|
|
196
199
|
coin98Wallet
|
|
197
200
|
} from "./chunk-RN23EOYO.js";
|
|
201
|
+
import {
|
|
202
|
+
coinbaseWallet
|
|
203
|
+
} from "./chunk-PNEDRY6O.js";
|
|
198
204
|
import {
|
|
199
205
|
compassWallet
|
|
200
206
|
} from "./chunk-DK4AJRIP.js";
|
|
201
|
-
import {
|
|
202
|
-
coreWallet
|
|
203
|
-
} from "./chunk-EV4S6LIH.js";
|
|
204
207
|
import {
|
|
205
208
|
argentWallet
|
|
206
209
|
} from "./chunk-XT2WYPN5.js";
|
|
207
|
-
import {
|
|
208
|
-
bestWallet
|
|
209
|
-
} from "./chunk-OPAPBEA5.js";
|
|
210
210
|
import {
|
|
211
211
|
berasigWallet
|
|
212
212
|
} from "./chunk-6WB5NVHI.js";
|
|
213
|
+
import {
|
|
214
|
+
bestWallet
|
|
215
|
+
} from "./chunk-OPAPBEA5.js";
|
|
213
216
|
import {
|
|
214
217
|
bifrostWallet
|
|
215
218
|
} from "./chunk-KOZORVBW.js";
|
|
216
219
|
import {
|
|
217
220
|
binanceWallet
|
|
218
221
|
} from "./chunk-LGGIEH7O.js";
|
|
219
|
-
import {
|
|
220
|
-
bitskiWallet
|
|
221
|
-
} from "./chunk-QIR4GIBB.js";
|
|
222
222
|
import {
|
|
223
223
|
bitgetWallet
|
|
224
224
|
} from "./chunk-DKEP5NZT.js";
|
|
225
225
|
import "./chunk-RETKWSKD.js";
|
|
226
226
|
import "./chunk-PODFK4OS.js";
|
|
227
|
+
import {
|
|
228
|
+
bitskiWallet
|
|
229
|
+
} from "./chunk-QIR4GIBB.js";
|
|
227
230
|
import "./chunk-PONHGUSY.js";
|
|
228
231
|
export {
|
|
229
232
|
abcWallet,
|
package/package.json
CHANGED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
isAndroid,
|
|
4
|
-
isIOS
|
|
5
|
-
} from "./chunk-RETKWSKD.js";
|
|
6
|
-
import {
|
|
7
|
-
getInjectedConnector,
|
|
8
|
-
hasInjectedProvider
|
|
9
|
-
} from "./chunk-PONHGUSY.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-YFHEHW7V.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
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
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/gateWallet/gateWallet.ts
|
|
14
|
-
var gateWallet = ({
|
|
15
|
-
projectId,
|
|
16
|
-
walletConnectParameters
|
|
17
|
-
}) => {
|
|
18
|
-
const isGateInjected = hasInjectedProvider({ namespace: "gatewallet" });
|
|
19
|
-
const shouldUseWalletConnect = !isGateInjected;
|
|
20
|
-
return {
|
|
21
|
-
id: "gate",
|
|
22
|
-
name: "Gate Wallet",
|
|
23
|
-
rdns: "io.gate.wallet",
|
|
24
|
-
iconUrl: async () => (await import("./gateWallet-ZVEZILRP.js")).default,
|
|
25
|
-
iconAccent: "#fff",
|
|
26
|
-
iconBackground: "#fff",
|
|
27
|
-
downloadUrls: {
|
|
28
|
-
android: "https://play.google.com/store/apps/details?id=com.gateio.gateio",
|
|
29
|
-
ios: "https://apps.apple.com/us/app/gate-io-buy-bitcoin-crypto/id1294998195",
|
|
30
|
-
mobile: "https://www.gate.io/mobileapp",
|
|
31
|
-
qrCode: "https://www.gate.io/web3",
|
|
32
|
-
chrome: "https://chromewebstore.google.com/detail/gate-wallet/cpmkedoipcpimgecpmgpldfpohjplkpp",
|
|
33
|
-
browserExtension: "https://www.gate.io/web3"
|
|
34
|
-
},
|
|
35
|
-
mobile: {
|
|
36
|
-
getUri: shouldUseWalletConnect ? (uri) => {
|
|
37
|
-
return isAndroid() ? uri : `gtweb3wallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
38
|
-
} : void 0
|
|
39
|
-
},
|
|
40
|
-
qrCode: shouldUseWalletConnect ? {
|
|
41
|
-
getUri: (uri) => uri,
|
|
42
|
-
instructions: {
|
|
43
|
-
learnMoreUrl: "https://www.gate.io/learn",
|
|
44
|
-
steps: [
|
|
45
|
-
{
|
|
46
|
-
description: "wallet_connectors.gate.qr_code.step1.description",
|
|
47
|
-
step: "install",
|
|
48
|
-
title: "wallet_connectors.gate.qr_code.step1.title"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
description: "wallet_connectors.gate.qr_code.step2.description",
|
|
52
|
-
step: "create",
|
|
53
|
-
title: "wallet_connectors.gate.qr_code.step2.title"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
description: "wallet_connectors.gate.qr_code.step3.description",
|
|
57
|
-
step: "scan",
|
|
58
|
-
title: "wallet_connectors.gate.qr_code.step3.title"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
} : void 0,
|
|
63
|
-
extension: {
|
|
64
|
-
instructions: {
|
|
65
|
-
learnMoreUrl: "https://www.gate.io/learn",
|
|
66
|
-
steps: [
|
|
67
|
-
{
|
|
68
|
-
description: "wallet_connectors.gate.extension.step1.description",
|
|
69
|
-
step: "install",
|
|
70
|
-
title: "wallet_connectors.gate.extension.step1.title"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
description: "wallet_connectors.gate.extension.step2.description",
|
|
74
|
-
step: "create",
|
|
75
|
-
title: "wallet_connectors.gate.extension.step2.title"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
description: "wallet_connectors.gate.extension.step3.description",
|
|
79
|
-
step: "refresh",
|
|
80
|
-
title: "wallet_connectors.gate.extension.step3.title"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
86
|
-
projectId,
|
|
87
|
-
walletConnectParameters
|
|
88
|
-
}) : getInjectedConnector({ namespace: "gatewallet" })
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export {
|
|
93
|
-
gateWallet
|
|
94
|
-
};
|