@metamask/connect-multichain 0.5.0 → 0.5.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 +8 -1
- package/dist/browser/es/connect-multichain.mjs +47 -40
- package/dist/browser/es/connect-multichain.mjs.map +1 -1
- package/dist/browser/es/metafile-esm.json +1 -1
- package/dist/browser/iife/connect-multichain.js +1886 -91
- package/dist/browser/iife/connect-multichain.js.map +1 -1
- package/dist/browser/iife/metafile-iife.json +1 -1
- package/dist/browser/umd/connect-multichain.js +47 -40
- package/dist/browser/umd/connect-multichain.js.map +1 -1
- package/dist/browser/umd/metafile-cjs.json +1 -1
- package/dist/node/cjs/connect-multichain.js +40 -40
- package/dist/node/cjs/connect-multichain.js.map +1 -1
- package/dist/node/cjs/metafile-cjs.json +1 -1
- package/dist/node/es/connect-multichain.mjs +40 -40
- package/dist/node/es/connect-multichain.mjs.map +1 -1
- package/dist/node/es/metafile-esm.json +1 -1
- package/dist/react-native/es/connect-multichain.mjs +47 -40
- package/dist/react-native/es/connect-multichain.mjs.map +1 -1
- package/dist/react-native/es/metafile-esm.json +1 -1
- package/dist/src/index.browser.d.ts +1 -0
- package/dist/src/index.browser.d.ts.map +1 -1
- package/dist/src/index.browser.js +4 -2
- package/dist/src/index.browser.js.map +1 -1
- package/dist/src/index.native.d.ts +1 -0
- package/dist/src/index.native.d.ts.map +1 -1
- package/dist/src/index.native.js +4 -2
- package/dist/src/index.native.js.map +1 -1
- package/dist/src/index.node.js +2 -2
- package/dist/src/index.node.js.map +1 -1
- package/dist/src/multichain/index.d.ts +2 -2
- package/dist/src/multichain/index.d.ts.map +1 -1
- package/dist/src/multichain/index.js +79 -79
- package/dist/src/multichain/index.js.map +1 -1
- package/dist/src/multichain/transports/multichainApiClientWrapper/index.d.ts +3 -3
- package/dist/src/multichain/transports/multichainApiClientWrapper/index.d.ts.map +1 -1
- package/dist/src/multichain/transports/multichainApiClientWrapper/index.js +10 -10
- package/dist/src/multichain/transports/multichainApiClientWrapper/index.js.map +1 -1
- package/dist/src/polyfills/buffer-shim.d.ts +2 -0
- package/dist/src/polyfills/buffer-shim.d.ts.map +1 -0
- package/dist/src/polyfills/buffer-shim.js +22 -0
- package/dist/src/polyfills/buffer-shim.js.map +1 -0
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.1]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- fix: Resolve Buffer polyfill requirement for browser/React Native consumers ([#121](https://github.com/MetaMask/connect-monorepo/pull/121))
|
|
15
|
+
|
|
10
16
|
## [0.5.0]
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -110,7 +116,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
110
116
|
|
|
111
117
|
- Initial release
|
|
112
118
|
|
|
113
|
-
[Unreleased]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.5.
|
|
119
|
+
[Unreleased]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.5.1...HEAD
|
|
120
|
+
[0.5.1]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.5.0...@metamask/connect-multichain@0.5.1
|
|
114
121
|
[0.5.0]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.4.0...@metamask/connect-multichain@0.5.0
|
|
115
122
|
[0.4.0]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.3.2...@metamask/connect-multichain@0.4.0
|
|
116
123
|
[0.3.2]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/connect-multichain@0.3.1...@metamask/connect-multichain@0.3.2
|
|
@@ -1167,6 +1167,13 @@ var init_web2 = __esm({
|
|
|
1167
1167
|
}
|
|
1168
1168
|
});
|
|
1169
1169
|
|
|
1170
|
+
// src/polyfills/buffer-shim.ts
|
|
1171
|
+
import { Buffer as Buffer2 } from "buffer";
|
|
1172
|
+
var g = typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : {};
|
|
1173
|
+
if (!g.Buffer) {
|
|
1174
|
+
g.Buffer = Buffer2;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1170
1177
|
// src/multichain/index.ts
|
|
1171
1178
|
import { analytics as analytics2 } from "@metamask/analytics";
|
|
1172
1179
|
import {
|
|
@@ -2233,15 +2240,15 @@ var getUniqueId = () => {
|
|
|
2233
2240
|
};
|
|
2234
2241
|
var _MultichainApiClientWrapperTransport_instances, walletCreateSession_fn, walletGetSession_fn, walletRevokeSession_fn, walletInvokeMethod_fn;
|
|
2235
2242
|
var MultichainApiClientWrapperTransport = class {
|
|
2236
|
-
constructor(
|
|
2237
|
-
this.
|
|
2243
|
+
constructor(metamaskConnectMultichain) {
|
|
2244
|
+
this.metamaskConnectMultichain = metamaskConnectMultichain;
|
|
2238
2245
|
__privateAdd(this, _MultichainApiClientWrapperTransport_instances);
|
|
2239
2246
|
this.requestId = getUniqueId();
|
|
2240
2247
|
this.notificationCallbacks = /* @__PURE__ */ new Set();
|
|
2241
2248
|
}
|
|
2242
2249
|
isTransportDefined() {
|
|
2243
2250
|
try {
|
|
2244
|
-
return Boolean(this.
|
|
2251
|
+
return Boolean(this.metamaskConnectMultichain.transport);
|
|
2245
2252
|
} catch (error) {
|
|
2246
2253
|
return false;
|
|
2247
2254
|
}
|
|
@@ -2255,7 +2262,7 @@ var MultichainApiClientWrapperTransport = class {
|
|
|
2255
2262
|
});
|
|
2256
2263
|
}
|
|
2257
2264
|
setupNotifcationListener() {
|
|
2258
|
-
this.
|
|
2265
|
+
this.metamaskConnectMultichain.transport.onNotification(
|
|
2259
2266
|
this.notifyCallbacks.bind(this)
|
|
2260
2267
|
);
|
|
2261
2268
|
}
|
|
@@ -2302,7 +2309,7 @@ var MultichainApiClientWrapperTransport = class {
|
|
|
2302
2309
|
this.notificationCallbacks.delete(callback);
|
|
2303
2310
|
};
|
|
2304
2311
|
}
|
|
2305
|
-
return this.
|
|
2312
|
+
return this.metamaskConnectMultichain.transport.onNotification(callback);
|
|
2306
2313
|
}
|
|
2307
2314
|
};
|
|
2308
2315
|
_MultichainApiClientWrapperTransport_instances = new WeakSet();
|
|
@@ -2325,13 +2332,13 @@ walletCreateSession_fn = function(request) {
|
|
|
2325
2332
|
});
|
|
2326
2333
|
const accounts = [...new Set(scopeAccounts)];
|
|
2327
2334
|
console.log("\u{1F4DA} SDK connect");
|
|
2328
|
-
yield this.
|
|
2335
|
+
yield this.metamaskConnectMultichain.connect(
|
|
2329
2336
|
scopes,
|
|
2330
2337
|
accounts,
|
|
2331
2338
|
createSessionParams.sessionProperties
|
|
2332
2339
|
);
|
|
2333
2340
|
console.log("\u{1F4DA} SDK connected");
|
|
2334
|
-
return this.
|
|
2341
|
+
return this.metamaskConnectMultichain.transport.request({
|
|
2335
2342
|
method: "wallet_getSession"
|
|
2336
2343
|
});
|
|
2337
2344
|
});
|
|
@@ -2347,7 +2354,7 @@ walletGetSession_fn = function(request) {
|
|
|
2347
2354
|
}
|
|
2348
2355
|
};
|
|
2349
2356
|
}
|
|
2350
|
-
return this.
|
|
2357
|
+
return this.metamaskConnectMultichain.transport.request({
|
|
2351
2358
|
method: "wallet_getSession"
|
|
2352
2359
|
});
|
|
2353
2360
|
});
|
|
@@ -2358,7 +2365,7 @@ walletRevokeSession_fn = function(request) {
|
|
|
2358
2365
|
return { jsonrpc: "2.0", id: request.id, result: true };
|
|
2359
2366
|
}
|
|
2360
2367
|
try {
|
|
2361
|
-
this.
|
|
2368
|
+
this.metamaskConnectMultichain.disconnect();
|
|
2362
2369
|
return { jsonrpc: "2.0", id: request.id, result: true };
|
|
2363
2370
|
} catch (error) {
|
|
2364
2371
|
return { jsonrpc: "2.0", id: request.id, result: false };
|
|
@@ -2370,7 +2377,7 @@ walletInvokeMethod_fn = function(request) {
|
|
|
2370
2377
|
if (!this.isTransportDefined()) {
|
|
2371
2378
|
return { error: providerErrors.unauthorized() };
|
|
2372
2379
|
}
|
|
2373
|
-
const result = this.
|
|
2380
|
+
const result = this.metamaskConnectMultichain.invokeMethod(
|
|
2374
2381
|
request.params
|
|
2375
2382
|
);
|
|
2376
2383
|
return {
|
|
@@ -2381,8 +2388,8 @@ walletInvokeMethod_fn = function(request) {
|
|
|
2381
2388
|
|
|
2382
2389
|
// src/multichain/index.ts
|
|
2383
2390
|
var logger2 = createLogger("metamask-sdk:core");
|
|
2384
|
-
var _a, _provider, _providerTransportWrapper, _transport2, _dappClient, _beforeUnloadListener, _listener, _sdkInfo,
|
|
2385
|
-
var
|
|
2391
|
+
var _a, _provider, _providerTransportWrapper, _transport2, _dappClient, _beforeUnloadListener, _listener, _sdkInfo, _MetaMaskConnectMultichain_instances, setupAnalytics_fn, onTransportNotification_fn, getStoredTransport_fn, setupTransport_fn, init_fn, createDappClient_fn, setupMWP_fn, onBeforeUnload_fn, createBeforeUnloadListener_fn, renderInstallModalAsync_fn, showInstallModal_fn, headlessConnect_fn, setupDefaultTransport_fn, deeplinkConnect_fn, handleConnection_fn;
|
|
2392
|
+
var _MetaMaskConnectMultichain = class _MetaMaskConnectMultichain extends MultichainCore {
|
|
2386
2393
|
constructor(options) {
|
|
2387
2394
|
var _a2, _b, _c, _d, _e, _f;
|
|
2388
2395
|
const withDappMetadata = setupDappMetadata(options);
|
|
@@ -2398,7 +2405,7 @@ var _MultichainSDK = class _MultichainSDK extends MultichainCore {
|
|
|
2398
2405
|
})
|
|
2399
2406
|
});
|
|
2400
2407
|
super(allOptions);
|
|
2401
|
-
__privateAdd(this,
|
|
2408
|
+
__privateAdd(this, _MetaMaskConnectMultichain_instances);
|
|
2402
2409
|
__privateAdd(this, _provider);
|
|
2403
2410
|
__privateAdd(this, _providerTransportWrapper);
|
|
2404
2411
|
__privateAdd(this, _transport2);
|
|
@@ -2445,7 +2452,7 @@ var _MultichainSDK = class _MultichainSDK extends MultichainCore {
|
|
|
2445
2452
|
static create(options) {
|
|
2446
2453
|
return __async(this, null, function* () {
|
|
2447
2454
|
var _a2;
|
|
2448
|
-
const instance = new
|
|
2455
|
+
const instance = new _MetaMaskConnectMultichain(options);
|
|
2449
2456
|
const isEnabled2 = yield isEnabled(
|
|
2450
2457
|
"metamask-sdk:core",
|
|
2451
2458
|
instance.options.storage
|
|
@@ -2453,7 +2460,7 @@ var _MultichainSDK = class _MultichainSDK extends MultichainCore {
|
|
|
2453
2460
|
if (isEnabled2) {
|
|
2454
2461
|
enableDebug("metamask-sdk:core");
|
|
2455
2462
|
}
|
|
2456
|
-
yield __privateMethod(_a2 = instance,
|
|
2463
|
+
yield __privateMethod(_a2 = instance, _MetaMaskConnectMultichain_instances, init_fn).call(_a2);
|
|
2457
2464
|
return instance;
|
|
2458
2465
|
});
|
|
2459
2466
|
}
|
|
@@ -2493,7 +2500,7 @@ var _MultichainSDK = class _MultichainSDK extends MultichainCore {
|
|
|
2493
2500
|
logger2("Error tracking connection_initiated event", error);
|
|
2494
2501
|
}
|
|
2495
2502
|
if (((_a2 = __privateGet(this, _transport2)) == null ? void 0 : _a2.isConnected()) && !secure) {
|
|
2496
|
-
return __privateMethod(this,
|
|
2503
|
+
return __privateMethod(this, _MetaMaskConnectMultichain_instances, handleConnection_fn).call(this, __privateGet(this, _transport2).connect({ scopes, caipAccountIds, sessionProperties, forceRequest }).then(() => __async(this, null, function* () {
|
|
2497
2504
|
if (__privateGet(this, _transport2) instanceof MWPTransport) {
|
|
2498
2505
|
return this.storage.setTransport("mwp" /* MWP */);
|
|
2499
2506
|
}
|
|
@@ -2501,19 +2508,19 @@ var _MultichainSDK = class _MultichainSDK extends MultichainCore {
|
|
|
2501
2508
|
})), scopes, transportType);
|
|
2502
2509
|
}
|
|
2503
2510
|
if (platformType === "in-app-browser" /* MetaMaskMobileWebview */) {
|
|
2504
|
-
const defaultTransport = yield __privateMethod(this,
|
|
2505
|
-
return __privateMethod(this,
|
|
2511
|
+
const defaultTransport = yield __privateMethod(this, _MetaMaskConnectMultichain_instances, setupDefaultTransport_fn).call(this);
|
|
2512
|
+
return __privateMethod(this, _MetaMaskConnectMultichain_instances, handleConnection_fn).call(this, defaultTransport.connect({ scopes, caipAccountIds, sessionProperties, forceRequest }), scopes, transportType);
|
|
2506
2513
|
}
|
|
2507
2514
|
if (isWeb && hasExtensionInstalled && preferExtension) {
|
|
2508
|
-
const defaultTransport = yield __privateMethod(this,
|
|
2509
|
-
return __privateMethod(this,
|
|
2515
|
+
const defaultTransport = yield __privateMethod(this, _MetaMaskConnectMultichain_instances, setupDefaultTransport_fn).call(this);
|
|
2516
|
+
return __privateMethod(this, _MetaMaskConnectMultichain_instances, handleConnection_fn).call(this, defaultTransport.connect({ scopes, caipAccountIds, sessionProperties, forceRequest }), scopes, transportType);
|
|
2510
2517
|
}
|
|
2511
|
-
yield __privateMethod(this,
|
|
2518
|
+
yield __privateMethod(this, _MetaMaskConnectMultichain_instances, setupMWP_fn).call(this);
|
|
2512
2519
|
const shouldShowInstallModal = hasExtensionInstalled ? showInstallModal : !preferExtension || showInstallModal;
|
|
2513
2520
|
if (secure && !shouldShowInstallModal) {
|
|
2514
|
-
return __privateMethod(this,
|
|
2521
|
+
return __privateMethod(this, _MetaMaskConnectMultichain_instances, handleConnection_fn).call(this, __privateMethod(this, _MetaMaskConnectMultichain_instances, deeplinkConnect_fn).call(this, scopes, caipAccountIds, sessionProperties), scopes, transportType);
|
|
2515
2522
|
}
|
|
2516
|
-
return __privateMethod(this,
|
|
2523
|
+
return __privateMethod(this, _MetaMaskConnectMultichain_instances, handleConnection_fn).call(this, __privateMethod(this, _MetaMaskConnectMultichain_instances, showInstallModal_fn).call(this, shouldShowInstallModal, scopes, caipAccountIds, sessionProperties), scopes, transportType);
|
|
2517
2524
|
});
|
|
2518
2525
|
}
|
|
2519
2526
|
emit(event, args) {
|
|
@@ -2573,7 +2580,7 @@ _dappClient = new WeakMap();
|
|
|
2573
2580
|
_beforeUnloadListener = new WeakMap();
|
|
2574
2581
|
_listener = new WeakMap();
|
|
2575
2582
|
_sdkInfo = new WeakMap();
|
|
2576
|
-
|
|
2583
|
+
_MetaMaskConnectMultichain_instances = new WeakSet();
|
|
2577
2584
|
setupAnalytics_fn = function() {
|
|
2578
2585
|
return __async(this, null, function* () {
|
|
2579
2586
|
var _a2;
|
|
@@ -2616,19 +2623,19 @@ getStoredTransport_fn = function() {
|
|
|
2616
2623
|
__privateSet(this, _transport2, apiTransport);
|
|
2617
2624
|
__privateGet(this, _providerTransportWrapper).setupNotifcationListener();
|
|
2618
2625
|
__privateSet(this, _listener, apiTransport.onNotification(
|
|
2619
|
-
__privateMethod(this,
|
|
2626
|
+
__privateMethod(this, _MetaMaskConnectMultichain_instances, onTransportNotification_fn).bind(this)
|
|
2620
2627
|
));
|
|
2621
2628
|
return apiTransport;
|
|
2622
2629
|
}
|
|
2623
2630
|
} else if (transportType === "mwp" /* MWP */) {
|
|
2624
2631
|
const { adapter: kvstore } = this.options.storage;
|
|
2625
|
-
const dappClient = yield __privateMethod(this,
|
|
2632
|
+
const dappClient = yield __privateMethod(this, _MetaMaskConnectMultichain_instances, createDappClient_fn).call(this);
|
|
2626
2633
|
const apiTransport = new MWPTransport(dappClient, kvstore);
|
|
2627
2634
|
__privateSet(this, _dappClient, dappClient);
|
|
2628
2635
|
__privateSet(this, _transport2, apiTransport);
|
|
2629
2636
|
__privateGet(this, _providerTransportWrapper).setupNotifcationListener();
|
|
2630
2637
|
__privateSet(this, _listener, apiTransport.onNotification(
|
|
2631
|
-
__privateMethod(this,
|
|
2638
|
+
__privateMethod(this, _MetaMaskConnectMultichain_instances, onTransportNotification_fn).bind(this)
|
|
2632
2639
|
));
|
|
2633
2640
|
return apiTransport;
|
|
2634
2641
|
}
|
|
@@ -2639,7 +2646,7 @@ getStoredTransport_fn = function() {
|
|
|
2639
2646
|
};
|
|
2640
2647
|
setupTransport_fn = function() {
|
|
2641
2648
|
return __async(this, null, function* () {
|
|
2642
|
-
const transport = yield __privateMethod(this,
|
|
2649
|
+
const transport = yield __privateMethod(this, _MetaMaskConnectMultichain_instances, getStoredTransport_fn).call(this);
|
|
2643
2650
|
if (transport) {
|
|
2644
2651
|
if (!this.transport.isConnected()) {
|
|
2645
2652
|
this.status = "connecting";
|
|
@@ -2663,8 +2670,8 @@ init_fn = function() {
|
|
|
2663
2670
|
if (typeof window !== "undefined" && ((_a2 = window.mmsdk) == null ? void 0 : _a2.isInitialized)) {
|
|
2664
2671
|
logger2("MetaMaskSDK: init already initialized");
|
|
2665
2672
|
} else {
|
|
2666
|
-
yield __privateMethod(this,
|
|
2667
|
-
yield __privateMethod(this,
|
|
2673
|
+
yield __privateMethod(this, _MetaMaskConnectMultichain_instances, setupAnalytics_fn).call(this);
|
|
2674
|
+
yield __privateMethod(this, _MetaMaskConnectMultichain_instances, setupTransport_fn).call(this);
|
|
2668
2675
|
try {
|
|
2669
2676
|
const baseProps = yield getBaseAnalyticsProperties(
|
|
2670
2677
|
this.options,
|
|
@@ -2708,13 +2715,13 @@ setupMWP_fn = function() {
|
|
|
2708
2715
|
return;
|
|
2709
2716
|
}
|
|
2710
2717
|
const { adapter: kvstore } = this.options.storage;
|
|
2711
|
-
const dappClient = yield __privateMethod(this,
|
|
2718
|
+
const dappClient = yield __privateMethod(this, _MetaMaskConnectMultichain_instances, createDappClient_fn).call(this);
|
|
2712
2719
|
__privateSet(this, _dappClient, dappClient);
|
|
2713
2720
|
const apiTransport = new MWPTransport(dappClient, kvstore);
|
|
2714
2721
|
__privateSet(this, _transport2, apiTransport);
|
|
2715
2722
|
__privateGet(this, _providerTransportWrapper).setupNotifcationListener();
|
|
2716
2723
|
__privateSet(this, _listener, this.transport.onNotification(
|
|
2717
|
-
__privateMethod(this,
|
|
2724
|
+
__privateMethod(this, _MetaMaskConnectMultichain_instances, onTransportNotification_fn).bind(this)
|
|
2718
2725
|
));
|
|
2719
2726
|
yield this.storage.setTransport("mwp" /* MWP */);
|
|
2720
2727
|
});
|
|
@@ -2729,13 +2736,13 @@ onBeforeUnload_fn = function() {
|
|
|
2729
2736
|
};
|
|
2730
2737
|
createBeforeUnloadListener_fn = function() {
|
|
2731
2738
|
if (typeof window !== "undefined" && typeof window.addEventListener !== "undefined") {
|
|
2732
|
-
window.addEventListener("beforeunload", __privateMethod(this,
|
|
2739
|
+
window.addEventListener("beforeunload", __privateMethod(this, _MetaMaskConnectMultichain_instances, onBeforeUnload_fn).bind(this));
|
|
2733
2740
|
}
|
|
2734
2741
|
return () => {
|
|
2735
2742
|
if (typeof window !== "undefined" && typeof window.removeEventListener !== "undefined") {
|
|
2736
2743
|
window.removeEventListener(
|
|
2737
2744
|
"beforeunload",
|
|
2738
|
-
__privateMethod(this,
|
|
2745
|
+
__privateMethod(this, _MetaMaskConnectMultichain_instances, onBeforeUnload_fn).bind(this)
|
|
2739
2746
|
);
|
|
2740
2747
|
}
|
|
2741
2748
|
};
|
|
@@ -2811,11 +2818,11 @@ renderInstallModalAsync_fn = function(desktopPreferred, scopes, caipAccountIds,
|
|
|
2811
2818
|
showInstallModal_fn = function(desktopPreferred, scopes, caipAccountIds, sessionProperties) {
|
|
2812
2819
|
return __async(this, null, function* () {
|
|
2813
2820
|
var _a2;
|
|
2814
|
-
(_a2 = __privateGet(this, _beforeUnloadListener)) != null ? _a2 : __privateSet(this, _beforeUnloadListener, __privateMethod(this,
|
|
2821
|
+
(_a2 = __privateGet(this, _beforeUnloadListener)) != null ? _a2 : __privateSet(this, _beforeUnloadListener, __privateMethod(this, _MetaMaskConnectMultichain_instances, createBeforeUnloadListener_fn).call(this));
|
|
2815
2822
|
if (this.options.ui.headless) {
|
|
2816
|
-
yield __privateMethod(this,
|
|
2823
|
+
yield __privateMethod(this, _MetaMaskConnectMultichain_instances, headlessConnect_fn).call(this, scopes, caipAccountIds, sessionProperties);
|
|
2817
2824
|
} else {
|
|
2818
|
-
yield __privateMethod(this,
|
|
2825
|
+
yield __privateMethod(this, _MetaMaskConnectMultichain_instances, renderInstallModalAsync_fn).call(this, desktopPreferred, scopes, caipAccountIds, sessionProperties);
|
|
2819
2826
|
}
|
|
2820
2827
|
});
|
|
2821
2828
|
};
|
|
@@ -2867,7 +2874,7 @@ setupDefaultTransport_fn = function() {
|
|
|
2867
2874
|
yield this.storage.setTransport("browser" /* Browser */);
|
|
2868
2875
|
const transport = new DefaultTransport();
|
|
2869
2876
|
__privateSet(this, _listener, transport.onNotification(
|
|
2870
|
-
__privateMethod(this,
|
|
2877
|
+
__privateMethod(this, _MetaMaskConnectMultichain_instances, onTransportNotification_fn).bind(this)
|
|
2871
2878
|
));
|
|
2872
2879
|
__privateSet(this, _transport2, transport);
|
|
2873
2880
|
__privateGet(this, _providerTransportWrapper).setupNotifcationListener();
|
|
@@ -2980,7 +2987,7 @@ handleConnection_fn = function(promise, scopes, transportType) {
|
|
|
2980
2987
|
}));
|
|
2981
2988
|
});
|
|
2982
2989
|
};
|
|
2983
|
-
var
|
|
2990
|
+
var MetaMaskConnectMultichain = _MetaMaskConnectMultichain;
|
|
2984
2991
|
|
|
2985
2992
|
// src/store/index.ts
|
|
2986
2993
|
import * as uuid from "uuid";
|
|
@@ -3344,7 +3351,7 @@ var createMultichainClient = (options) => __async(null, null, function* () {
|
|
|
3344
3351
|
storage = options.storage;
|
|
3345
3352
|
}
|
|
3346
3353
|
const factory = new ModalFactory(uiModules);
|
|
3347
|
-
return
|
|
3354
|
+
return MetaMaskConnectMultichain.create(__spreadProps(__spreadValues({}, options), {
|
|
3348
3355
|
storage,
|
|
3349
3356
|
ui: __spreadProps(__spreadValues({}, options.ui), {
|
|
3350
3357
|
factory
|