@dynamic-labs/wallet-connector-core 0.19.0-alpha.9 → 0.19.1
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/CHANGELOG.md +299 -0
- package/_virtual/_tslib.cjs +7 -0
- package/_virtual/_tslib.js +7 -1
- package/package.json +6 -6
- package/src/index.cjs +2 -0
- package/src/index.d.ts +3 -2
- package/src/index.js +1 -0
- package/src/lib/IEmailOTPWalletConnector.d.ts +4 -4
- package/src/lib/IEmailWalletConnector.d.ts +6 -6
- package/src/lib/IPasskeyWalletConnector.d.ts +12 -0
- package/src/lib/WalletBookSingleton.cjs +11 -11
- package/src/lib/WalletBookSingleton.d.ts +7 -7
- package/src/lib/WalletBookSingleton.js +11 -11
- package/src/lib/WalletConnector.cjs +306 -271
- package/src/lib/WalletConnector.d.ts +313 -277
- package/src/lib/WalletConnector.js +307 -272
- package/src/lib/WalletConnectorExtension.d.ts +5 -0
- package/src/lib/index.d.ts +5 -4
- package/src/lib/types.d.ts +8 -7
- package/src/utils/PhantomLedgerWalletName.cjs +4 -4
- package/src/utils/PhantomLedgerWalletName.d.ts +5 -5
- package/src/utils/PhantomLedgerWalletName.js +4 -4
- package/src/utils/ProviderLookup/ProviderLookup.cjs +11 -11
- package/src/utils/ProviderLookup/ProviderLookup.d.ts +5 -5
- package/src/utils/ProviderLookup/ProviderLookup.js +11 -11
- package/src/utils/ProviderLookup/index.d.ts +1 -1
- package/src/utils/encoding.cjs +9 -9
- package/src/utils/encoding.d.ts +4 -4
- package/src/utils/encoding.js +9 -9
- package/src/utils/getChainInfo/getChainInfo.cjs +53 -52
- package/src/utils/getChainInfo/getChainInfo.d.ts +2 -2
- package/src/utils/getChainInfo/getChainInfo.js +53 -52
- package/src/utils/getChainInfo/index.d.ts +1 -1
- package/src/utils/getWalletConnectorByKey.cjs +10 -10
- package/src/utils/getWalletConnectorByKey.d.ts +2 -2
- package/src/utils/getWalletConnectorByKey.js +10 -10
- package/src/utils/index.d.ts +17 -16
- package/src/utils/isBloctoConnector/index.d.ts +1 -1
- package/src/utils/isBloctoConnector/isBloctoConnector.d.ts +2 -2
- package/src/utils/isEmailOTPWalletConnector/index.d.ts +1 -1
- package/src/utils/isEmailOTPWalletConnector/isEmailOTPWalletConnector.d.ts +2 -2
- package/src/utils/isEmailWalletConnector/index.d.ts +1 -1
- package/src/utils/isEmailWalletConnector/isEmailWalletConnector.d.ts +2 -2
- package/src/utils/isEmbeddedConnector/index.d.ts +1 -1
- package/src/utils/isEmbeddedConnector/isEmbeddedConnector.cjs +1 -4
- package/src/utils/isEmbeddedConnector/isEmbeddedConnector.d.ts +2 -2
- package/src/utils/isEmbeddedConnector/isEmbeddedConnector.js +1 -4
- package/src/utils/isMagicConnector/index.d.ts +1 -1
- package/src/utils/isMagicConnector/isMagicConnector.d.ts +2 -2
- package/src/utils/isPasskeyWalletConnector/index.d.ts +1 -0
- package/src/utils/isPasskeyWalletConnector/isPasskeyWalletConnector.cjs +7 -0
- package/src/utils/isPasskeyWalletConnector/isPasskeyWalletConnector.d.ts +2 -0
- package/src/utils/isPasskeyWalletConnector/isPasskeyWalletConnector.js +3 -0
- package/src/utils/isSameAddress/index.d.ts +1 -1
- package/src/utils/isSameAddress/isSameAddress.d.ts +1 -1
- package/src/utils/isSameAddress/utils/index.d.ts +1 -1
- package/src/utils/isSameAddress/utils/normalizeAddress/index.d.ts +1 -1
- package/src/utils/isSameAddress/utils/normalizeAddress/normalizeAddress.cjs +8 -8
- package/src/utils/isSameAddress/utils/normalizeAddress/normalizeAddress.d.ts +1 -1
- package/src/utils/isSameAddress/utils/normalizeAddress/normalizeAddress.js +8 -8
- package/src/utils/isSocialWalletConnector/index.d.ts +1 -1
- package/src/utils/isSocialWalletConnector/isSocialWalletConnector.d.ts +2 -2
- package/src/utils/logger.d.ts +2 -2
- package/src/utils/normalizeWalletName/index.d.ts +1 -1
- package/src/utils/normalizeWalletName/normalizeWalletName.d.ts +1 -1
- package/src/utils/shouldLowercaseAddress.cjs +4 -4
- package/src/utils/shouldLowercaseAddress.d.ts +1 -1
- package/src/utils/shouldLowercaseAddress.js +4 -4
- package/src/utils/walletConnectDeepLinks/index.d.ts +2 -2
- package/src/utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.cjs +17 -17
- package/src/utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.d.ts +4 -4
- package/src/utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.js +17 -17
- package/src/utils/walletConnectDeepLinks/walletConnectDeepLinks.cjs +33 -33
- package/src/utils/walletConnectDeepLinks/walletConnectDeepLinks.d.ts +10 -10
- package/src/utils/walletConnectDeepLinks/walletConnectDeepLinks.js +33 -33
|
@@ -11,278 +11,313 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
|
|
12
12
|
var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
|
|
13
13
|
|
|
14
|
-
/* eslint-disable @typescript-eslint/
|
|
15
|
-
/* eslint-disable @typescript-eslint/no-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*
|
|
68
|
-
* @default false
|
|
69
|
-
*/
|
|
70
|
-
this.
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
*
|
|
95
|
-
* @default
|
|
96
|
-
*/
|
|
97
|
-
this.
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
*
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
*
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
*
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
*
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
14
|
+
/* eslint-disable @typescript-eslint/triple-slash-reference */
|
|
15
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
16
|
+
/* eslint-disable prefer-arrow/prefer-arrow-functions */
|
|
17
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
18
|
+
var _WalletConnectorBase_registeredExtensions;
|
|
19
|
+
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
20
|
+
const Chains = [
|
|
21
|
+
'ETH',
|
|
22
|
+
'FLOW',
|
|
23
|
+
'SOL',
|
|
24
|
+
'EVM',
|
|
25
|
+
'ALGO',
|
|
26
|
+
'STARK',
|
|
27
|
+
'ATOM',
|
|
28
|
+
'COSMOS',
|
|
29
|
+
];
|
|
30
|
+
const socialProviders = [
|
|
31
|
+
'google',
|
|
32
|
+
'facebook',
|
|
33
|
+
'apple',
|
|
34
|
+
'github',
|
|
35
|
+
'bitbucket',
|
|
36
|
+
'gitlab',
|
|
37
|
+
'linkedin',
|
|
38
|
+
'twitter',
|
|
39
|
+
'discord',
|
|
40
|
+
'twitch',
|
|
41
|
+
'microsoft',
|
|
42
|
+
];
|
|
43
|
+
class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
44
|
+
/**
|
|
45
|
+
* We store the constructor props so that we can use them later on
|
|
46
|
+
* in getMobileOrInstalledWallet which may fall back to a different class
|
|
47
|
+
* but will need the original constructor props.
|
|
48
|
+
* @param props - constructor props
|
|
49
|
+
*/
|
|
50
|
+
constructor(props) {
|
|
51
|
+
super();
|
|
52
|
+
this.chainRpcProviders = undefined;
|
|
53
|
+
_WalletConnectorBase_registeredExtensions.set(this, []);
|
|
54
|
+
this.didSetup = false;
|
|
55
|
+
/**
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
this.canConnectViaEmail = false;
|
|
59
|
+
/**
|
|
60
|
+
* IF the wallet needs to be connected via a custodial service
|
|
61
|
+
* such as Blocto, this will be true.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
this.canConnectViaCustodialService = false;
|
|
65
|
+
/**
|
|
66
|
+
* If the wallet is not installed, and can be connected via a QR code,
|
|
67
|
+
* this will be true.
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
this.canConnectViaQrCode = false;
|
|
71
|
+
/**
|
|
72
|
+
* Whether this connector can be connected via social login.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
this.canConnectViaSocial = false;
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated getWeb3Provider has been renamed to getWalletClient
|
|
78
|
+
* If you would like to still get the ethers web3Provider,
|
|
79
|
+
* see our docs for enabling ethers: https://docs.dynamic.xyz/ethers
|
|
80
|
+
*
|
|
81
|
+
* Get the wallet provider
|
|
82
|
+
*/
|
|
83
|
+
this.getWeb3Provider = this.getWalletClient;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated getRpcProvider has been renamed to getPublicClient
|
|
86
|
+
* If you would like to still get the ethers rpcProvider,
|
|
87
|
+
* see our docs for enabling ethers: https://docs.dynamic.xyz/ethers
|
|
88
|
+
*
|
|
89
|
+
* Get the rpc provider
|
|
90
|
+
*/
|
|
91
|
+
this.getRpcProvider = this.getPublicClient;
|
|
92
|
+
/**
|
|
93
|
+
* If the wallet generated by a valid embedded wallet provider
|
|
94
|
+
* For example: magic wallets
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
this.isEmbeddedWallet = false;
|
|
98
|
+
/**
|
|
99
|
+
* Flag if it is wallet Connect
|
|
100
|
+
*
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
this.isWalletConnect = false;
|
|
104
|
+
/**
|
|
105
|
+
* Override key for the wallet (used for injected wallet linking)
|
|
106
|
+
*/
|
|
107
|
+
this.overrideKey = undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Additional resources to add to the message to be signed
|
|
110
|
+
*
|
|
111
|
+
* @default undefined
|
|
112
|
+
*/
|
|
113
|
+
this.providerResources = undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Requires switching network in the wallet itself
|
|
116
|
+
* @default undefined
|
|
117
|
+
*/
|
|
118
|
+
this.switchNetworkOnlyFromWallet = undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Whether the connector has been initialized
|
|
121
|
+
* @default true
|
|
122
|
+
*/
|
|
123
|
+
this.isInitialized = true;
|
|
124
|
+
this.constructorProps = props;
|
|
125
|
+
this._walletBookInstance = WalletBookSingleton.WalletBookSingleton.getOrCreate(props.walletBook);
|
|
126
|
+
if (this.walletBook === undefined) {
|
|
127
|
+
throw new Error('WalletConnectorBase was not called with super(props) and is missing wallet-book');
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
extend(extension) {
|
|
131
|
+
if (_tslib.__classPrivateFieldGet(this, _WalletConnectorBase_registeredExtensions, "f").includes(extension.name)) {
|
|
132
|
+
throw new Error(`You can only register a single extension of: ${extension.name}`);
|
|
133
|
+
}
|
|
134
|
+
_tslib.__classPrivateFieldGet(this, _WalletConnectorBase_registeredExtensions, "f").push(extension.name);
|
|
135
|
+
extension.extend(this);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Add the event listeners for the wallet and connect
|
|
139
|
+
* with event emitter.
|
|
140
|
+
*/
|
|
141
|
+
initEventListener() {
|
|
142
|
+
if (this.didSetup)
|
|
143
|
+
return;
|
|
144
|
+
this.didSetup = true;
|
|
145
|
+
this.setupEventListeners();
|
|
146
|
+
}
|
|
147
|
+
get walletBook() {
|
|
148
|
+
return this._walletBookInstance.walletBook;
|
|
149
|
+
}
|
|
150
|
+
filterByWalletBook() {
|
|
151
|
+
try {
|
|
152
|
+
walletBook.getWalletBookWallet(this.walletBook, this.key);
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
catch (_a) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
connect() {
|
|
160
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
yield this.fetchPublicAddress();
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Generic function to close the wallet connection
|
|
166
|
+
* Originally implemented for WalletConnect, but it is used
|
|
167
|
+
* for anything that needs to be "logged out" or cleaned up
|
|
168
|
+
*
|
|
169
|
+
* @default Promise<undefined>
|
|
170
|
+
*/
|
|
171
|
+
endSession() {
|
|
172
|
+
return Promise.resolve();
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Gets the public address of the wallet
|
|
176
|
+
*
|
|
177
|
+
* @default Promise<undefined>
|
|
178
|
+
*/
|
|
179
|
+
fetchPublicAddress(opts) {
|
|
180
|
+
return Promise.resolve(undefined);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Gets the balance of the wallet
|
|
184
|
+
*
|
|
185
|
+
* @default Promise<undefined>
|
|
186
|
+
*/
|
|
187
|
+
getBalance() {
|
|
188
|
+
return Promise.resolve(undefined);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Get the address silently
|
|
192
|
+
*
|
|
193
|
+
* @default Promise<[]>
|
|
194
|
+
*/
|
|
195
|
+
getConnectedAccounts() {
|
|
196
|
+
return Promise.resolve([]);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Gets the deep link of the wallet
|
|
200
|
+
*
|
|
201
|
+
* @default undefined
|
|
202
|
+
*/
|
|
203
|
+
getDeepLink() {
|
|
204
|
+
return undefined;
|
|
205
|
+
}
|
|
206
|
+
getNetwork() {
|
|
207
|
+
return Promise.resolve(undefined);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Gets current network of connected wallet
|
|
211
|
+
*
|
|
212
|
+
* @default Promise<undefined>
|
|
213
|
+
*/
|
|
214
|
+
getNameService() {
|
|
215
|
+
return Promise.resolve(undefined);
|
|
216
|
+
}
|
|
217
|
+
getPublicClient() {
|
|
218
|
+
return Promise.resolve(undefined);
|
|
219
|
+
}
|
|
220
|
+
getSession() {
|
|
221
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
return Promise.resolve();
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
getSigner() {
|
|
226
|
+
return Promise.resolve(undefined);
|
|
227
|
+
}
|
|
228
|
+
getWalletClient() {
|
|
229
|
+
return undefined;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Initialize the wallet connector with any async operations
|
|
233
|
+
*
|
|
234
|
+
* @default Promise<void>
|
|
235
|
+
*/
|
|
236
|
+
init() {
|
|
237
|
+
return Promise.resolve();
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Check if the wallet is installed on the browser
|
|
241
|
+
*
|
|
242
|
+
* @default false
|
|
243
|
+
*/
|
|
244
|
+
isInstalledOnBrowser() {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Override key or the normalized wallet name if needed
|
|
249
|
+
*/
|
|
250
|
+
get key() {
|
|
251
|
+
return this.overrideKey || this.name.replace(/\W/g, '').toLowerCase();
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Whether the wallet connector should fall back to a different wallet connector
|
|
255
|
+
* This is called after the object is instantiated, so it can't be a static property
|
|
256
|
+
* and will return the appropriate instance of the wallet connector
|
|
257
|
+
* @returns WalletConnector
|
|
258
|
+
* @default this
|
|
259
|
+
*/
|
|
260
|
+
getMobileOrInstalledWallet() {
|
|
261
|
+
return this;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* In most cases this is an alias for `signMessage`
|
|
265
|
+
*
|
|
266
|
+
* @default Promise<undefined>
|
|
267
|
+
*/
|
|
268
|
+
proveOwnership(messageToSign) {
|
|
269
|
+
return this.signMessage(messageToSign);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Set up event listeners for the wallet
|
|
273
|
+
*
|
|
274
|
+
* @default void
|
|
275
|
+
*/
|
|
276
|
+
setupEventListeners() {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Sign a message
|
|
281
|
+
*
|
|
282
|
+
* @default Promise<undefined>
|
|
283
|
+
*/
|
|
284
|
+
signMessage(messageToSign) {
|
|
285
|
+
return Promise.resolve(undefined);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Whether the wallet supports network switching
|
|
289
|
+
*
|
|
290
|
+
* @default false
|
|
291
|
+
*/
|
|
292
|
+
supportsNetworkSwitching() {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
switchNetwork({ networkName, networkChainId, }) {
|
|
296
|
+
return Promise.resolve(undefined);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Tear down event listeners for the wallet
|
|
300
|
+
* @default void
|
|
301
|
+
*/
|
|
302
|
+
teardownEventListeners() {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Sign a message
|
|
307
|
+
*
|
|
308
|
+
* @default Promise<undefined>
|
|
309
|
+
*/
|
|
310
|
+
getSupportedNetworks() {
|
|
311
|
+
return Promise.resolve(undefined);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Receive the user verified credentials
|
|
315
|
+
*/
|
|
316
|
+
setVerifiedCredentials(verifiedCredentials) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
285
319
|
}
|
|
320
|
+
_WalletConnectorBase_registeredExtensions = new WeakMap();
|
|
286
321
|
|
|
287
322
|
exports.Chains = Chains;
|
|
288
323
|
exports.WalletConnectorBase = WalletConnectorBase;
|