@solana-mobile/wallet-adapter-mobile 2.2.5 → 2.2.7

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.
@@ -1,521 +1,339 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var walletAdapterBase = require('@solana/wallet-adapter-base');
6
- var web3_js = require('@solana/web3.js');
7
- var walletStandardFeatures = require('@solana/wallet-standard-features');
8
- var walletStandardMobile = require('@solana-mobile/wallet-standard-mobile');
9
-
10
- /******************************************************************************
11
- Copyright (c) Microsoft Corporation.
12
-
13
- Permission to use, copy, modify, and/or distribute this software for any
14
- purpose with or without fee is hereby granted.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
17
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
19
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
20
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
21
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
- PERFORMANCE OF THIS SOFTWARE.
23
- ***************************************************************************** */
24
-
25
- function __awaiter(thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- }
34
-
35
- function __classPrivateFieldGet(receiver, state, kind, f) {
36
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
37
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
38
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
39
- }
40
-
41
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
42
- if (kind === "m") throw new TypeError("Private method is not writable");
43
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
44
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
45
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
46
- }
47
-
48
- (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
49
- if (kind === "m") throw new TypeError("Private method is not writable");
50
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
51
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
52
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
53
- };
54
- (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
55
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
56
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
57
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
58
- };
59
-
60
- /** Name of the feature. */
61
- const StandardConnect = 'standard:connect';
62
-
63
- /** Name of the feature. */
64
- const StandardDisconnect = 'standard:disconnect';
65
-
66
- /** Name of the feature. */
67
- const StandardEvents = 'standard:events';
68
-
69
- (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
70
- if (kind === "m") throw new TypeError("Private method is not writable");
71
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
72
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
73
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
74
- };
75
- (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
76
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
77
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
78
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
79
- };
80
-
81
- (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
82
- if (kind === "m") throw new TypeError("Private method is not writable");
83
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
84
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
85
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
86
- };
87
- (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
88
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
89
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
90
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
91
- };
92
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _solana_wallet_adapter_base = require("@solana/wallet-adapter-base");
3
+ let _solana_web3_js = require("@solana/web3.js");
4
+ let _solana_wallet_standard_features = require("@solana/wallet-standard-features");
5
+ let _wallet_standard_core = require("@wallet-standard/core");
6
+ let _solana_mobile_wallet_standard_mobile = require("@solana-mobile/wallet-standard-mobile");
7
+ //#region src/base64Utils.ts
93
8
  function fromUint8Array(byteArray) {
94
- return window.btoa(String.fromCharCode.call(null, ...byteArray));
9
+ return window.btoa(String.fromCharCode.call(null, ...byteArray));
95
10
  }
96
-
11
+ //#endregion
12
+ //#region src/getIsSupported.ts
97
13
  function getIsSupported() {
98
- return (typeof window !== 'undefined' &&
99
- window.isSecureContext &&
100
- typeof document !== 'undefined' &&
101
- /android/i.test(navigator.userAgent));
14
+ return typeof window !== "undefined" && window.isSecureContext && typeof document !== "undefined" && /android/i.test(navigator.userAgent);
102
15
  }
103
-
104
- var _BaseSolanaMobileWalletAdapter_instances, _BaseSolanaMobileWalletAdapter_wallet, _BaseSolanaMobileWalletAdapter_connecting, _BaseSolanaMobileWalletAdapter_readyState, _BaseSolanaMobileWalletAdapter_accountSelector, _BaseSolanaMobileWalletAdapter_selectedAccount, _BaseSolanaMobileWalletAdapter_publicKey, _BaseSolanaMobileWalletAdapter_handleChangeEvent, _BaseSolanaMobileWalletAdapter_connect, _BaseSolanaMobileWalletAdapter_declareWalletAsInstalled, _BaseSolanaMobileWalletAdapter_assertIsAuthorized, _BaseSolanaMobileWalletAdapter_performSignTransactions, _BaseSolanaMobileWalletAdapter_runWithGuard;
105
- const SolanaMobileWalletAdapterWalletName = walletStandardMobile.SolanaMobileWalletAdapterWalletName;
106
- const SolanaMobileWalletAdapterRemoteWalletName = walletStandardMobile.SolanaMobileWalletAdapterRemoteWalletName;
16
+ //#endregion
17
+ //#region src/adapter.ts
18
+ const SolanaMobileWalletAdapterWalletName = _solana_mobile_wallet_standard_mobile.SolanaMobileWalletAdapterWalletName;
19
+ const SolanaMobileWalletAdapterRemoteWalletName = _solana_mobile_wallet_standard_mobile.SolanaMobileWalletAdapterRemoteWalletName;
107
20
  const SIGNATURE_LENGTH_IN_BYTES = 64;
108
21
  function isVersionedTransaction(transaction) {
109
- return 'version' in transaction;
22
+ return "version" in transaction;
110
23
  }
111
24
  function chainOrClusterToChainId(chain) {
112
- switch (chain) {
113
- case 'mainnet-beta':
114
- return 'solana:mainnet';
115
- case 'testnet':
116
- return 'solana:testnet';
117
- case 'devnet':
118
- return 'solana:devnet';
119
- default:
120
- return chain;
121
- }
25
+ switch (chain) {
26
+ case "mainnet-beta": return "solana:mainnet";
27
+ case "testnet": return "solana:testnet";
28
+ case "devnet": return "solana:devnet";
29
+ default: return chain;
30
+ }
122
31
  }
123
- class BaseSolanaMobileWalletAdapter extends walletAdapterBase.BaseSignInMessageSignerWalletAdapter {
124
- constructor(wallet, config) {
125
- super();
126
- _BaseSolanaMobileWalletAdapter_instances.add(this);
127
- this.supportedTransactionVersions = new Set(
128
- // FIXME(#244): We can't actually know what versions are supported until we know which wallet we're talking to.
129
- ['legacy', 0]);
130
- _BaseSolanaMobileWalletAdapter_wallet.set(this, void 0);
131
- _BaseSolanaMobileWalletAdapter_connecting.set(this, false);
132
- _BaseSolanaMobileWalletAdapter_readyState.set(this, getIsSupported() ? walletAdapterBase.WalletReadyState.Loadable : walletAdapterBase.WalletReadyState.Unsupported);
133
- _BaseSolanaMobileWalletAdapter_accountSelector.set(this, void 0);
134
- _BaseSolanaMobileWalletAdapter_selectedAccount.set(this, void 0);
135
- _BaseSolanaMobileWalletAdapter_publicKey.set(this, void 0);
136
- _BaseSolanaMobileWalletAdapter_handleChangeEvent.set(this, (properties) => __awaiter(this, void 0, void 0, function* () {
137
- if (properties.accounts && properties.accounts.length > 0) {
138
- __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_declareWalletAsInstalled).call(this);
139
- const nextSelectedAccount = yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_accountSelector, "f").call(this, properties.accounts);
140
- if (nextSelectedAccount !== __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_selectedAccount, "f")) {
141
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_selectedAccount, nextSelectedAccount, "f");
142
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_publicKey, undefined, "f");
143
- this.emit('connect',
144
- // Having just set `this.#selectedAccount`, `this.publicKey` is definitely non-null
145
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
146
- this.publicKey);
147
- }
148
- }
149
- }));
150
- // this.#chain = chainOrClusterToChainId(config.chain);
151
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_accountSelector, (accounts) => __awaiter(this, void 0, void 0, function* () {
152
- var _a;
153
- const selectedBase64EncodedAddress = yield config.addressSelector.select(accounts.map(({ publicKey }) => fromUint8Array(publicKey)));
154
- return (_a = accounts.find(({ publicKey }) => fromUint8Array(publicKey) === selectedBase64EncodedAddress)) !== null && _a !== void 0 ? _a : accounts[0];
155
- }), "f");
156
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_wallet, wallet, "f");
157
- __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[StandardEvents].on('change', __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_handleChangeEvent, "f"));
158
- this.name = __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").name;
159
- this.icon = __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").icon;
160
- this.url = __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").url;
161
- // TODO: evaluate if this logic should be kept - it seems to create a nasty bug where
162
- // the wallet tries to auto connect on page load and gets blocked by the popup blocker
163
- // if (this.#readyState !== WalletReadyState.Unsupported) {
164
- // config.authorizationResultCache.get().then((authorizationResult) => {
165
- // if (authorizationResult) {
166
- // // Having a prior authorization result is, right now, the best
167
- // // indication that a mobile wallet is installed. There is no API
168
- // // we can use to test for whether the association URI is supported.
169
- // this.#declareWalletAsInstalled();
170
- // }
171
- // });
172
- // }
173
- }
174
- get publicKey() {
175
- var _a;
176
- if (!__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_publicKey, "f") && __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_selectedAccount, "f")) {
177
- try {
178
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_publicKey, new web3_js.PublicKey(__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_selectedAccount, "f").publicKey), "f");
179
- }
180
- catch (e) {
181
- throw new walletAdapterBase.WalletPublicKeyError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);
182
- }
183
- }
184
- return (_a = __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_publicKey, "f")) !== null && _a !== void 0 ? _a : null;
185
- }
186
- get connected() {
187
- return __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").connected;
188
- }
189
- get connecting() {
190
- return __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_connecting, "f");
191
- }
192
- get readyState() {
193
- return __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_readyState, "f");
194
- }
195
- /** @deprecated Use `autoConnect()` instead. */
196
- autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED() {
197
- return __awaiter(this, void 0, void 0, function* () {
198
- return yield this.autoConnect();
199
- });
200
- }
201
- autoConnect() {
202
- return __awaiter(this, void 0, void 0, function* () {
203
- __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_connect).call(this, true);
204
- });
205
- }
206
- connect() {
207
- return __awaiter(this, void 0, void 0, function* () {
208
- __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_connect).call(this);
209
- });
210
- }
211
- /** @deprecated Use `connect()` or `autoConnect()` instead. */
212
- performAuthorization(signInPayload) {
213
- return __awaiter(this, void 0, void 0, function* () {
214
- try {
215
- const cachedAuthorizationResult = yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").cachedAuthorizationResult;
216
- if (cachedAuthorizationResult) {
217
- yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[StandardConnect].connect({ silent: true });
218
- return cachedAuthorizationResult;
219
- }
220
- if (signInPayload) {
221
- yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[walletStandardFeatures.SolanaSignIn].signIn(signInPayload);
222
- }
223
- else
224
- yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[StandardConnect].connect();
225
- const authorizationResult = yield yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").cachedAuthorizationResult;
226
- return authorizationResult;
227
- }
228
- catch (e) {
229
- throw new walletAdapterBase.WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);
230
- }
231
- });
232
- }
233
- disconnect() {
234
- return __awaiter(this, void 0, void 0, function* () {
235
- // return await this.#runWithGuard(this.#wallet.features[StandardDisconnect].disconnect);
236
- return yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_runWithGuard).call(this, () => __awaiter(this, void 0, void 0, function* () {
237
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_connecting, false, "f");
238
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_publicKey, undefined, "f");
239
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_selectedAccount, undefined, "f");
240
- yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[StandardDisconnect].disconnect();
241
- this.emit('disconnect');
242
- }));
243
- });
244
- }
245
- signIn(input) {
246
- return __awaiter(this, void 0, void 0, function* () {
247
- return __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_runWithGuard).call(this, () => __awaiter(this, void 0, void 0, function* () {
248
- var _a;
249
- if (__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_readyState, "f") !== walletAdapterBase.WalletReadyState.Installed && __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_readyState, "f") !== walletAdapterBase.WalletReadyState.Loadable) {
250
- throw new walletAdapterBase.WalletNotReadyError();
251
- }
252
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_connecting, true, "f");
253
- try {
254
- const outputs = yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[walletStandardFeatures.SolanaSignIn].signIn(Object.assign(Object.assign({}, input), { domain: (_a = input === null || input === void 0 ? void 0 : input.domain) !== null && _a !== void 0 ? _a : window.location.host }));
255
- if (outputs.length > 0) {
256
- return outputs[0];
257
- }
258
- else {
259
- throw new Error("Sign in failed, no sign in result returned by wallet");
260
- }
261
- }
262
- catch (e) {
263
- throw new walletAdapterBase.WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);
264
- }
265
- finally {
266
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_connecting, false, "f");
267
- }
268
- }));
269
- });
270
- }
271
- signMessage(message) {
272
- return __awaiter(this, void 0, void 0, function* () {
273
- return yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_runWithGuard).call(this, () => __awaiter(this, void 0, void 0, function* () {
274
- const account = __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_assertIsAuthorized).call(this);
275
- try {
276
- const outputs = yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[walletStandardFeatures.SolanaSignMessage].signMessage({
277
- account, message: message
278
- });
279
- return outputs[0].signature;
280
- }
281
- catch (error) {
282
- throw new walletAdapterBase.WalletSignMessageError(error === null || error === void 0 ? void 0 : error.message, error);
283
- }
284
- }));
285
- });
286
- }
287
- sendTransaction(transaction, connection, options) {
288
- return __awaiter(this, void 0, void 0, function* () {
289
- return yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_runWithGuard).call(this, () => __awaiter(this, void 0, void 0, function* () {
290
- const account = __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_assertIsAuthorized).call(this);
291
- try {
292
- function getTargetCommitment() {
293
- let targetCommitment;
294
- switch (connection.commitment) {
295
- case 'confirmed':
296
- case 'finalized':
297
- case 'processed':
298
- targetCommitment = connection.commitment;
299
- break;
300
- default:
301
- targetCommitment = 'finalized';
302
- }
303
- let targetPreflightCommitment;
304
- switch (options === null || options === void 0 ? void 0 : options.preflightCommitment) {
305
- case 'confirmed':
306
- case 'finalized':
307
- case 'processed':
308
- targetPreflightCommitment = options.preflightCommitment;
309
- break;
310
- case undefined:
311
- targetPreflightCommitment = targetCommitment;
312
- break;
313
- default:
314
- targetPreflightCommitment = 'finalized';
315
- }
316
- const preflightCommitmentScore = targetPreflightCommitment === 'finalized'
317
- ? 2
318
- : targetPreflightCommitment === 'confirmed'
319
- ? 1
320
- : 0;
321
- const targetCommitmentScore = targetCommitment === 'finalized' ? 2 : targetCommitment === 'confirmed' ? 1 : 0;
322
- return preflightCommitmentScore < targetCommitmentScore
323
- ? targetPreflightCommitment
324
- : targetCommitment;
325
- }
326
- if (walletStandardFeatures.SolanaSignAndSendTransaction in __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features) {
327
- const chain = chainOrClusterToChainId(__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").currentAuthorization.chain);
328
- const [signature] = (yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[walletStandardFeatures.SolanaSignAndSendTransaction].signAndSendTransaction({
329
- account,
330
- transaction: transaction.serialize(),
331
- chain: chain,
332
- options: options ? {
333
- skipPreflight: options.skipPreflight,
334
- maxRetries: options.maxRetries
335
- } : undefined
336
- })).map(((output) => {
337
- return fromUint8Array(output.signature);
338
- }));
339
- return signature;
340
- }
341
- else {
342
- const [signedTransaction] = yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_performSignTransactions).call(this, [transaction]);
343
- if (isVersionedTransaction(signedTransaction)) {
344
- return yield connection.sendTransaction(signedTransaction);
345
- }
346
- else {
347
- const serializedTransaction = signedTransaction.serialize();
348
- return yield connection.sendRawTransaction(serializedTransaction, Object.assign(Object.assign({}, options), { preflightCommitment: getTargetCommitment() }));
349
- }
350
- }
351
- }
352
- catch (error) {
353
- throw new walletAdapterBase.WalletSendTransactionError(error === null || error === void 0 ? void 0 : error.message, error);
354
- }
355
- }));
356
- });
357
- }
358
- signTransaction(transaction) {
359
- return __awaiter(this, void 0, void 0, function* () {
360
- return yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_runWithGuard).call(this, () => __awaiter(this, void 0, void 0, function* () {
361
- const [signedTransaction] = yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_performSignTransactions).call(this, [transaction]);
362
- return signedTransaction;
363
- }));
364
- });
365
- }
366
- signAllTransactions(transactions) {
367
- return __awaiter(this, void 0, void 0, function* () {
368
- return yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_runWithGuard).call(this, () => __awaiter(this, void 0, void 0, function* () {
369
- const signedTransactions = yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_performSignTransactions).call(this, transactions);
370
- return signedTransactions;
371
- }));
372
- });
373
- }
374
- }
375
- _BaseSolanaMobileWalletAdapter_wallet = new WeakMap(), _BaseSolanaMobileWalletAdapter_connecting = new WeakMap(), _BaseSolanaMobileWalletAdapter_readyState = new WeakMap(), _BaseSolanaMobileWalletAdapter_accountSelector = new WeakMap(), _BaseSolanaMobileWalletAdapter_selectedAccount = new WeakMap(), _BaseSolanaMobileWalletAdapter_publicKey = new WeakMap(), _BaseSolanaMobileWalletAdapter_handleChangeEvent = new WeakMap(), _BaseSolanaMobileWalletAdapter_instances = new WeakSet(), _BaseSolanaMobileWalletAdapter_connect = function _BaseSolanaMobileWalletAdapter_connect(autoConnect = false) {
376
- return __awaiter(this, void 0, void 0, function* () {
377
- if (this.connecting || this.connected) {
378
- return;
379
- }
380
- return yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_runWithGuard).call(this, () => __awaiter(this, void 0, void 0, function* () {
381
- if (__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_readyState, "f") !== walletAdapterBase.WalletReadyState.Installed && __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_readyState, "f") !== walletAdapterBase.WalletReadyState.Loadable) {
382
- throw new walletAdapterBase.WalletNotReadyError();
383
- }
384
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_connecting, true, "f");
385
- try {
386
- yield __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[StandardConnect].connect({ silent: autoConnect });
387
- }
388
- catch (e) {
389
- throw new walletAdapterBase.WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);
390
- }
391
- finally {
392
- __classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_connecting, false, "f");
393
- }
394
- }));
395
- });
396
- }, _BaseSolanaMobileWalletAdapter_declareWalletAsInstalled = function _BaseSolanaMobileWalletAdapter_declareWalletAsInstalled() {
397
- if (__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_readyState, "f") !== walletAdapterBase.WalletReadyState.Installed) {
398
- this.emit('readyStateChange', (__classPrivateFieldSet(this, _BaseSolanaMobileWalletAdapter_readyState, walletAdapterBase.WalletReadyState.Installed, "f")));
399
- }
400
- }, _BaseSolanaMobileWalletAdapter_assertIsAuthorized = function _BaseSolanaMobileWalletAdapter_assertIsAuthorized() {
401
- if (!__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").isAuthorized || !__classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_selectedAccount, "f"))
402
- throw new walletAdapterBase.WalletNotConnectedError();
403
- return __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_selectedAccount, "f");
404
- }, _BaseSolanaMobileWalletAdapter_performSignTransactions = function _BaseSolanaMobileWalletAdapter_performSignTransactions(transactions) {
405
- return __awaiter(this, void 0, void 0, function* () {
406
- const account = __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_instances, "m", _BaseSolanaMobileWalletAdapter_assertIsAuthorized).call(this);
407
- try {
408
- if (walletStandardFeatures.SolanaSignTransaction in __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features) {
409
- return __classPrivateFieldGet(this, _BaseSolanaMobileWalletAdapter_wallet, "f").features[walletStandardFeatures.SolanaSignTransaction].signTransaction(...transactions.map((value) => {
410
- return { account, transaction: value.serialize() };
411
- })).then((outputs) => {
412
- return outputs.map((output) => {
413
- const byteArray = output.signedTransaction;
414
- const numSignatures = byteArray[0];
415
- const messageOffset = numSignatures * SIGNATURE_LENGTH_IN_BYTES + 1;
416
- const version = web3_js.VersionedMessage.deserializeMessageVersion(byteArray.slice(messageOffset, byteArray.length));
417
- if (version === 'legacy') {
418
- return web3_js.Transaction.from(byteArray);
419
- }
420
- else {
421
- return web3_js.VersionedTransaction.deserialize(byteArray);
422
- }
423
- });
424
- });
425
- }
426
- else {
427
- throw new Error('Connected wallet does not support signing transactions');
428
- }
429
- }
430
- catch (error) {
431
- throw new walletAdapterBase.WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error);
432
- }
433
- });
434
- }, _BaseSolanaMobileWalletAdapter_runWithGuard = function _BaseSolanaMobileWalletAdapter_runWithGuard(callback) {
435
- return __awaiter(this, void 0, void 0, function* () {
436
- try {
437
- return yield callback();
438
- }
439
- catch (e) {
440
- this.emit('error', e);
441
- throw e;
442
- }
443
- });
32
+ var BaseSolanaMobileWalletAdapter = class extends _solana_wallet_adapter_base.BaseSignInMessageSignerWalletAdapter {
33
+ supportedTransactionVersions = new Set(["legacy", 0]);
34
+ name;
35
+ icon;
36
+ url;
37
+ #wallet;
38
+ #connecting = false;
39
+ #readyState = getIsSupported() ? _solana_wallet_adapter_base.WalletReadyState.Loadable : _solana_wallet_adapter_base.WalletReadyState.Unsupported;
40
+ #accountSelector;
41
+ #selectedAccount;
42
+ #publicKey;
43
+ #handleChangeEvent = async (properties) => {
44
+ if (properties.accounts && properties.accounts.length > 0) {
45
+ this.#declareWalletAsInstalled();
46
+ const nextSelectedAccount = await this.#accountSelector(properties.accounts);
47
+ if (nextSelectedAccount !== this.#selectedAccount) {
48
+ this.#selectedAccount = nextSelectedAccount;
49
+ this.#publicKey = void 0;
50
+ this.emit("connect", this.publicKey);
51
+ }
52
+ }
53
+ };
54
+ constructor(wallet, config) {
55
+ super();
56
+ this.#accountSelector = async (accounts) => {
57
+ const selectedBase64EncodedAddress = await config.addressSelector.select(accounts.map(({ publicKey }) => fromUint8Array(new Uint8Array(publicKey))));
58
+ return accounts.find(({ publicKey }) => fromUint8Array(new Uint8Array(publicKey)) === selectedBase64EncodedAddress) ?? accounts[0];
59
+ };
60
+ this.#wallet = wallet;
61
+ this.#wallet.features[_wallet_standard_core.StandardEvents].on("change", this.#handleChangeEvent);
62
+ this.name = this.#wallet.name;
63
+ this.icon = this.#wallet.icon;
64
+ this.url = this.#wallet.url;
65
+ }
66
+ get publicKey() {
67
+ if (!this.#publicKey && this.#selectedAccount) try {
68
+ this.#publicKey = new _solana_web3_js.PublicKey(this.#selectedAccount.publicKey);
69
+ } catch (e) {
70
+ throw new _solana_wallet_adapter_base.WalletPublicKeyError(e instanceof Error && e?.message || "Unknown error", e);
71
+ }
72
+ return this.#publicKey ?? null;
73
+ }
74
+ get connected() {
75
+ return this.#wallet.connected;
76
+ }
77
+ get connecting() {
78
+ return this.#connecting;
79
+ }
80
+ get readyState() {
81
+ return this.#readyState;
82
+ }
83
+ /** @deprecated Use `autoConnect()` instead. */
84
+ async autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED() {
85
+ return await this.autoConnect();
86
+ }
87
+ async autoConnect() {
88
+ this.#connect(true);
89
+ }
90
+ async connect() {
91
+ this.#connect();
92
+ }
93
+ async #connect(autoConnect = false) {
94
+ if (this.connecting || this.connected) return;
95
+ return await this.#runWithGuard(async () => {
96
+ if (this.#readyState !== _solana_wallet_adapter_base.WalletReadyState.Installed && this.#readyState !== _solana_wallet_adapter_base.WalletReadyState.Loadable) throw new _solana_wallet_adapter_base.WalletNotReadyError();
97
+ this.#connecting = true;
98
+ try {
99
+ await this.#wallet.features[_wallet_standard_core.StandardConnect].connect({ silent: autoConnect });
100
+ } catch (e) {
101
+ throw new _solana_wallet_adapter_base.WalletConnectionError(e instanceof Error && e.message || "Unknown error", e);
102
+ } finally {
103
+ this.#connecting = false;
104
+ }
105
+ });
106
+ }
107
+ /** @deprecated Use `connect()` or `autoConnect()` instead. */
108
+ async performAuthorization(signInPayload) {
109
+ try {
110
+ const cachedAuthorizationResult = await this.#wallet.cachedAuthorizationResult;
111
+ if (cachedAuthorizationResult) {
112
+ await this.#wallet.features[_wallet_standard_core.StandardConnect].connect({ silent: true });
113
+ return cachedAuthorizationResult;
114
+ }
115
+ if (signInPayload) await this.#wallet.features[_solana_wallet_standard_features.SolanaSignIn].signIn(signInPayload);
116
+ else await this.#wallet.features[_wallet_standard_core.StandardConnect].connect();
117
+ return await await this.#wallet.cachedAuthorizationResult;
118
+ } catch (e) {
119
+ throw new _solana_wallet_adapter_base.WalletConnectionError(e instanceof Error && e.message || "Unknown error", e);
120
+ }
121
+ }
122
+ async disconnect() {
123
+ return await this.#runWithGuard(async () => {
124
+ this.#connecting = false;
125
+ this.#publicKey = void 0;
126
+ this.#selectedAccount = void 0;
127
+ await this.#wallet.features[_wallet_standard_core.StandardDisconnect].disconnect();
128
+ this.emit("disconnect");
129
+ });
130
+ }
131
+ async signIn(input) {
132
+ return this.#runWithGuard(async () => {
133
+ if (this.#readyState !== _solana_wallet_adapter_base.WalletReadyState.Installed && this.#readyState !== _solana_wallet_adapter_base.WalletReadyState.Loadable) throw new _solana_wallet_adapter_base.WalletNotReadyError();
134
+ this.#connecting = true;
135
+ try {
136
+ const outputs = await this.#wallet.features[_solana_wallet_standard_features.SolanaSignIn].signIn({
137
+ ...input,
138
+ domain: input?.domain ?? window.location.host
139
+ });
140
+ if (outputs.length > 0) return outputs[0];
141
+ else throw new Error("Sign in failed, no sign in result returned by wallet");
142
+ } catch (e) {
143
+ throw new _solana_wallet_adapter_base.WalletConnectionError(e instanceof Error && e.message || "Unknown error", e);
144
+ } finally {
145
+ this.#connecting = false;
146
+ }
147
+ });
148
+ }
149
+ async signMessage(message) {
150
+ return await this.#runWithGuard(async () => {
151
+ const account = this.#assertIsAuthorized();
152
+ try {
153
+ return (await this.#wallet.features[_solana_wallet_standard_features.SolanaSignMessage].signMessage({
154
+ account,
155
+ message
156
+ }))[0].signature;
157
+ } catch (error) {
158
+ throw new _solana_wallet_adapter_base.WalletSignMessageError(error?.message, error);
159
+ }
160
+ });
161
+ }
162
+ async sendTransaction(transaction, connection, options) {
163
+ return await this.#runWithGuard(async () => {
164
+ const account = this.#assertIsAuthorized();
165
+ try {
166
+ function getTargetCommitment() {
167
+ let targetCommitment;
168
+ switch (connection.commitment) {
169
+ case "confirmed":
170
+ case "finalized":
171
+ case "processed":
172
+ targetCommitment = connection.commitment;
173
+ break;
174
+ default: targetCommitment = "finalized";
175
+ }
176
+ let targetPreflightCommitment;
177
+ switch (options?.preflightCommitment) {
178
+ case "confirmed":
179
+ case "finalized":
180
+ case "processed":
181
+ targetPreflightCommitment = options.preflightCommitment;
182
+ break;
183
+ case void 0:
184
+ targetPreflightCommitment = targetCommitment;
185
+ break;
186
+ default: targetPreflightCommitment = "finalized";
187
+ }
188
+ return (targetPreflightCommitment === "finalized" ? 2 : targetPreflightCommitment === "confirmed" ? 1 : 0) < (targetCommitment === "finalized" ? 2 : targetCommitment === "confirmed" ? 1 : 0) ? targetPreflightCommitment : targetCommitment;
189
+ }
190
+ if (_solana_wallet_standard_features.SolanaSignAndSendTransaction in this.#wallet.features) {
191
+ const chain = chainOrClusterToChainId(this.#wallet.currentAuthorization.chain);
192
+ const [signature] = (await this.#wallet.features[_solana_wallet_standard_features.SolanaSignAndSendTransaction].signAndSendTransaction({
193
+ account,
194
+ transaction: transaction.serialize(),
195
+ chain,
196
+ options: options ? {
197
+ skipPreflight: options.skipPreflight,
198
+ maxRetries: options.maxRetries
199
+ } : void 0
200
+ })).map((output) => {
201
+ return fromUint8Array(output.signature);
202
+ });
203
+ return signature;
204
+ } else {
205
+ const [signedTransaction] = await this.#performSignTransactions([transaction]);
206
+ if (isVersionedTransaction(signedTransaction)) return await connection.sendTransaction(signedTransaction);
207
+ else {
208
+ const serializedTransaction = signedTransaction.serialize();
209
+ return await connection.sendRawTransaction(serializedTransaction, {
210
+ ...options,
211
+ preflightCommitment: getTargetCommitment()
212
+ });
213
+ }
214
+ }
215
+ } catch (error) {
216
+ throw new _solana_wallet_adapter_base.WalletSendTransactionError(error?.message, error);
217
+ }
218
+ });
219
+ }
220
+ async signTransaction(transaction) {
221
+ return await this.#runWithGuard(async () => {
222
+ const [signedTransaction] = await this.#performSignTransactions([transaction]);
223
+ return signedTransaction;
224
+ });
225
+ }
226
+ async signAllTransactions(transactions) {
227
+ return await this.#runWithGuard(async () => {
228
+ return await this.#performSignTransactions(transactions);
229
+ });
230
+ }
231
+ #declareWalletAsInstalled() {
232
+ if (this.#readyState !== _solana_wallet_adapter_base.WalletReadyState.Installed) this.emit("readyStateChange", this.#readyState = _solana_wallet_adapter_base.WalletReadyState.Installed);
233
+ }
234
+ #assertIsAuthorized() {
235
+ if (!this.#wallet.isAuthorized || !this.#selectedAccount) throw new _solana_wallet_adapter_base.WalletNotConnectedError();
236
+ return this.#selectedAccount;
237
+ }
238
+ async #performSignTransactions(transactions) {
239
+ const account = this.#assertIsAuthorized();
240
+ try {
241
+ if (_solana_wallet_standard_features.SolanaSignTransaction in this.#wallet.features) return this.#wallet.features[_solana_wallet_standard_features.SolanaSignTransaction].signTransaction(...transactions.map((value) => {
242
+ return {
243
+ account,
244
+ transaction: value.serialize()
245
+ };
246
+ })).then((outputs) => {
247
+ return outputs.map((output) => {
248
+ const byteArray = output.signedTransaction;
249
+ const messageOffset = byteArray[0] * SIGNATURE_LENGTH_IN_BYTES + 1;
250
+ if (_solana_web3_js.VersionedMessage.deserializeMessageVersion(byteArray.slice(messageOffset, byteArray.length)) === "legacy") return _solana_web3_js.Transaction.from(byteArray);
251
+ else return _solana_web3_js.VersionedTransaction.deserialize(byteArray);
252
+ });
253
+ });
254
+ else throw new Error("Connected wallet does not support signing transactions");
255
+ } catch (error) {
256
+ throw new _solana_wallet_adapter_base.WalletSignTransactionError(error?.message, error);
257
+ }
258
+ }
259
+ async #runWithGuard(callback) {
260
+ try {
261
+ return await callback();
262
+ } catch (e) {
263
+ this.emit("error", e);
264
+ throw e;
265
+ }
266
+ }
444
267
  };
445
- class LocalSolanaMobileWalletAdapter extends BaseSolanaMobileWalletAdapter {
446
- constructor(config) {
447
- var _a;
448
- const chain = chainOrClusterToChainId((_a = config.chain) !== null && _a !== void 0 ? _a : config.cluster);
449
- super(new walletStandardMobile.LocalSolanaMobileWalletAdapterWallet({
450
- appIdentity: config.appIdentity,
451
- authorizationCache: {
452
- set: config.authorizationResultCache.set,
453
- get: () => __awaiter(this, void 0, void 0, function* () {
454
- return yield config.authorizationResultCache.get();
455
- }),
456
- clear: config.authorizationResultCache.clear,
457
- },
458
- chains: [chain],
459
- chainSelector: walletStandardMobile.createDefaultChainSelector(),
460
- onWalletNotFound: () => __awaiter(this, void 0, void 0, function* () {
461
- config.onWalletNotFound(this);
462
- }),
463
- }), {
464
- addressSelector: config.addressSelector,
465
- chain: chain,
466
- });
467
- }
468
- }
469
- class RemoteSolanaMobileWalletAdapter extends BaseSolanaMobileWalletAdapter {
470
- constructor(config) {
471
- const chain = chainOrClusterToChainId(config.chain);
472
- super(new walletStandardMobile.RemoteSolanaMobileWalletAdapterWallet({
473
- appIdentity: config.appIdentity,
474
- authorizationCache: {
475
- set: config.authorizationResultCache.set,
476
- get: () => __awaiter(this, void 0, void 0, function* () {
477
- return yield config.authorizationResultCache.get();
478
- }),
479
- clear: config.authorizationResultCache.clear,
480
- },
481
- chains: [chain],
482
- chainSelector: walletStandardMobile.createDefaultChainSelector(),
483
- remoteHostAuthority: config.remoteHostAuthority,
484
- onWalletNotFound: () => __awaiter(this, void 0, void 0, function* () {
485
- config.onWalletNotFound(this);
486
- }),
487
- }), {
488
- addressSelector: config.addressSelector,
489
- chain: chain,
490
- });
491
- }
492
- }
493
- class SolanaMobileWalletAdapter extends LocalSolanaMobileWalletAdapter {
494
- }
495
-
268
+ var LocalSolanaMobileWalletAdapter = class extends BaseSolanaMobileWalletAdapter {
269
+ constructor(config) {
270
+ const chain = chainOrClusterToChainId(config.chain ?? config.cluster);
271
+ super(new _solana_mobile_wallet_standard_mobile.LocalSolanaMobileWalletAdapterWallet({
272
+ appIdentity: config.appIdentity,
273
+ authorizationCache: {
274
+ set: config.authorizationResultCache.set,
275
+ get: async () => {
276
+ return await config.authorizationResultCache.get();
277
+ },
278
+ clear: config.authorizationResultCache.clear
279
+ },
280
+ chains: [chain],
281
+ chainSelector: (0, _solana_mobile_wallet_standard_mobile.createDefaultChainSelector)(),
282
+ onWalletNotFound: async () => {
283
+ config.onWalletNotFound(this);
284
+ }
285
+ }), {
286
+ addressSelector: config.addressSelector,
287
+ chain
288
+ });
289
+ }
290
+ };
291
+ var RemoteSolanaMobileWalletAdapter = class extends BaseSolanaMobileWalletAdapter {
292
+ constructor(config) {
293
+ const chain = chainOrClusterToChainId(config.chain);
294
+ super(new _solana_mobile_wallet_standard_mobile.RemoteSolanaMobileWalletAdapterWallet({
295
+ appIdentity: config.appIdentity,
296
+ authorizationCache: {
297
+ set: config.authorizationResultCache.set,
298
+ get: async () => {
299
+ return await config.authorizationResultCache.get();
300
+ },
301
+ clear: config.authorizationResultCache.clear
302
+ },
303
+ chains: [chain],
304
+ chainSelector: (0, _solana_mobile_wallet_standard_mobile.createDefaultChainSelector)(),
305
+ remoteHostAuthority: config.remoteHostAuthority,
306
+ onWalletNotFound: async () => {
307
+ config.onWalletNotFound(this);
308
+ }
309
+ }), {
310
+ addressSelector: config.addressSelector,
311
+ chain
312
+ });
313
+ }
314
+ };
315
+ var SolanaMobileWalletAdapter = class extends LocalSolanaMobileWalletAdapter {};
316
+ //#endregion
317
+ //#region src/createDefaultAddressSelector.ts
496
318
  function createDefaultAddressSelector() {
497
- return {
498
- select(addresses) {
499
- return __awaiter(this, void 0, void 0, function* () {
500
- return addresses[0];
501
- });
502
- },
503
- };
319
+ return { async select(addresses) {
320
+ return addresses[0];
321
+ } };
504
322
  }
505
-
323
+ //#endregion
324
+ //#region src/createDefaultAuthorizationResultCache.ts
506
325
  function createDefaultAuthorizationResultCache() {
507
- return walletStandardMobile.createDefaultAuthorizationCache();
326
+ return (0, _solana_mobile_wallet_standard_mobile.createDefaultAuthorizationCache)();
508
327
  }
509
-
510
- function defaultWalletNotFoundHandler(mobileWalletAdapter) {
511
- return __awaiter(this, void 0, void 0, function* () {
512
- return walletStandardMobile.defaultErrorModalWalletNotFoundHandler();
513
- });
328
+ //#endregion
329
+ //#region src/createDefaultWalletNotFoundHandler.ts
330
+ async function defaultWalletNotFoundHandler(mobileWalletAdapter) {
331
+ return (0, _solana_mobile_wallet_standard_mobile.defaultErrorModalWalletNotFoundHandler)();
514
332
  }
515
333
  function createDefaultWalletNotFoundHandler() {
516
- return defaultWalletNotFoundHandler;
334
+ return defaultWalletNotFoundHandler;
517
335
  }
518
-
336
+ //#endregion
519
337
  exports.LocalSolanaMobileWalletAdapter = LocalSolanaMobileWalletAdapter;
520
338
  exports.RemoteSolanaMobileWalletAdapter = RemoteSolanaMobileWalletAdapter;
521
339
  exports.SolanaMobileWalletAdapter = SolanaMobileWalletAdapter;
@@ -524,3 +342,5 @@ exports.SolanaMobileWalletAdapterWalletName = SolanaMobileWalletAdapterWalletNam
524
342
  exports.createDefaultAddressSelector = createDefaultAddressSelector;
525
343
  exports.createDefaultAuthorizationResultCache = createDefaultAuthorizationResultCache;
526
344
  exports.createDefaultWalletNotFoundHandler = createDefaultWalletNotFoundHandler;
345
+
346
+ //# sourceMappingURL=index.browser.js.map