@reown/appkit-cdn 1.5.2 → 1.5.3-4228d6.0
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/{appkit-D9celFkq.js → appkit-B8PLwrp1.js} +51 -16
- package/dist/{appkit-D9celFkq.js.map → appkit-B8PLwrp1.js.map} +1 -1
- package/dist/appkit.js +1 -1
- package/dist/{ccip-Bu0xcFjJ.js → ccip-B_-loV3-.js} +2 -2
- package/dist/{ccip-Bu0xcFjJ.js.map → ccip-B_-loV3-.js.map} +1 -1
- package/dist/{hooks.module-Bhlrle46.js → hooks.module-B0EZtZAt.js} +2 -2
- package/dist/{hooks.module-Bhlrle46.js.map → hooks.module-B0EZtZAt.js.map} +1 -1
- package/dist/{index-BUvkY72y.js → index-CAIGtZup.js} +3 -3
- package/dist/{index-BUvkY72y.js.map → index-CAIGtZup.js.map} +1 -1
- package/dist/{index-CQ4PM1mj.js → index-CLxIj_Lu.js} +3 -3
- package/dist/{index-CQ4PM1mj.js.map → index-CLxIj_Lu.js.map} +1 -1
- package/dist/{index-BPNhaViM.js → index-CopJc8lb.js} +2 -2
- package/dist/{index-BPNhaViM.js.map → index-CopJc8lb.js.map} +1 -1
- package/dist/{index-BDIUhjmG.js → index-D3qOdMcB.js} +3 -3
- package/dist/{index-BDIUhjmG.js.map → index-D3qOdMcB.js.map} +1 -1
- package/dist/{index-DOllEQlm.js → index-DG9HjHb-.js} +3 -3
- package/dist/{index-DOllEQlm.js.map → index-DG9HjHb-.js.map} +1 -1
- package/dist/{index-DWN1JCRB.js → index-DkfUSmob.js} +2 -2
- package/dist/{index-DWN1JCRB.js.map → index-DkfUSmob.js.map} +1 -1
- package/dist/{index-DPB1iTjw.js → index-Dzj_viZ6.js} +3 -3
- package/dist/{index-DPB1iTjw.js.map → index-Dzj_viZ6.js.map} +1 -1
- package/dist/{index-Dko7m4kW.js → index-J7PY6MW0.js} +3 -3
- package/dist/{index-Dko7m4kW.js.map → index-J7PY6MW0.js.map} +1 -1
- package/dist/{index.es-Cz2md885.js → index.es-CFK4jmIh.js} +3 -3
- package/dist/{index.es-Cz2md885.js.map → index.es-CFK4jmIh.js.map} +1 -1
- package/dist/{metamask-sdk-0eqrTifD.js → metamask-sdk-RnNR2Xd5.js} +2 -2
- package/dist/{metamask-sdk-0eqrTifD.js.map → metamask-sdk-RnNR2Xd5.js.map} +1 -1
- package/dist/{native-luhFo4rc.js → native-DI7LlC0P.js} +2 -2
- package/dist/{native-luhFo4rc.js.map → native-DI7LlC0P.js.map} +1 -1
- package/dist/{w3m-modal-B7fyRh_i.js → w3m-modal-B2BeuWfW.js} +2 -2
- package/dist/{w3m-modal-B7fyRh_i.js.map → w3m-modal-B2BeuWfW.js.map} +1 -1
- package/package.json +7 -7
|
@@ -4392,7 +4392,8 @@ const SafeLocalStorageKeys = {
|
|
|
4392
4392
|
CONNECTED_SOCIAL_USERNAME: "@appkit/connected_social_username",
|
|
4393
4393
|
RECENT_WALLETS: "@appkit/recent_wallets",
|
|
4394
4394
|
DEEPLINK_CHOICE: "WALLETCONNECT_DEEPLINK_CHOICE",
|
|
4395
|
-
CONNECTED_NAMESPACE: "@appkit/connected_namespace"
|
|
4395
|
+
CONNECTED_NAMESPACE: "@appkit/connected_namespace",
|
|
4396
|
+
CONNECTION_STATUS: "@appkit/connection_status"
|
|
4396
4397
|
};
|
|
4397
4398
|
const SafeLocalStorage = {
|
|
4398
4399
|
setItem(key2, value) {
|
|
@@ -13160,6 +13161,21 @@ const StorageUtil = {
|
|
|
13160
13161
|
const allRequestedCaipNetworks = ChainController.getAllRequestedCaipNetworks();
|
|
13161
13162
|
const storedCaipNetwork = allRequestedCaipNetworks == null ? void 0 : allRequestedCaipNetworks.find((c2) => c2.caipNetworkId === storedCaipNetworkId);
|
|
13162
13163
|
return storedCaipNetwork;
|
|
13164
|
+
},
|
|
13165
|
+
setConnectionStatus(status) {
|
|
13166
|
+
try {
|
|
13167
|
+
SafeLocalStorage.setItem(SafeLocalStorageKeys.CONNECTION_STATUS, status);
|
|
13168
|
+
} catch {
|
|
13169
|
+
console.info("Unable to set Connection Status");
|
|
13170
|
+
}
|
|
13171
|
+
},
|
|
13172
|
+
getConnectionStatus() {
|
|
13173
|
+
try {
|
|
13174
|
+
return SafeLocalStorage.getItem(SafeLocalStorageKeys.CONNECTION_STATUS);
|
|
13175
|
+
} catch {
|
|
13176
|
+
console.info("Unable to get Connection Status");
|
|
13177
|
+
return "disconnected";
|
|
13178
|
+
}
|
|
13163
13179
|
}
|
|
13164
13180
|
};
|
|
13165
13181
|
const state$a = proxy({
|
|
@@ -78633,7 +78649,7 @@ async function call$2(client, args) {
|
|
|
78633
78649
|
return { data: response };
|
|
78634
78650
|
} catch (err) {
|
|
78635
78651
|
const data3 = getRevertErrorData$1(err);
|
|
78636
|
-
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-
|
|
78652
|
+
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-B_-loV3-.js");
|
|
78637
78653
|
if (client.ccipRead !== false && (data3 == null ? void 0 : data3.slice(0, 10)) === offchainLookupSignature2 && to2)
|
|
78638
78654
|
return { data: await offchainLookup2(client, { data: data3, to: to2 }) };
|
|
78639
78655
|
if (deploylessCall && (data3 == null ? void 0 : data3.slice(0, 10)) === "0x101bb98d")
|
|
@@ -82872,6 +82888,9 @@ class AdapterBlueprint {
|
|
|
82872
82888
|
return true;
|
|
82873
82889
|
});
|
|
82874
82890
|
}
|
|
82891
|
+
setStatus(status, chainNamespace) {
|
|
82892
|
+
AccountController.setStatus(status, chainNamespace);
|
|
82893
|
+
}
|
|
82875
82894
|
/**
|
|
82876
82895
|
* Adds an event listener for a specific event.
|
|
82877
82896
|
* @template T
|
|
@@ -94168,7 +94187,7 @@ class AppKit {
|
|
|
94168
94187
|
if (options.siwx) {
|
|
94169
94188
|
throw new Error("Cannot set both `siweConfig` and `siwx` options");
|
|
94170
94189
|
}
|
|
94171
|
-
const siwe = await import("./index-
|
|
94190
|
+
const siwe = await import("./index-CLxIj_Lu.js");
|
|
94172
94191
|
if (typeof siwe.mapToSIWX !== "function") {
|
|
94173
94192
|
throw new Error("Please update the `@reown/appkit-siwe` package to the latest version");
|
|
94174
94193
|
}
|
|
@@ -94647,6 +94666,7 @@ class AppKit {
|
|
|
94647
94666
|
});
|
|
94648
94667
|
}
|
|
94649
94668
|
async syncWalletConnectAccount() {
|
|
94669
|
+
this.setStatus("connecting", ChainController.state.activeChain);
|
|
94650
94670
|
const adapter = this.getAdapter(ChainController.state.activeChain);
|
|
94651
94671
|
StorageUtil.setConnectedNamespace(ChainController.state.activeChain);
|
|
94652
94672
|
this.chainNamespaces.forEach(async (chainNamespace) => {
|
|
@@ -94825,11 +94845,14 @@ class AppKit {
|
|
|
94825
94845
|
}
|
|
94826
94846
|
async syncExistingConnection() {
|
|
94827
94847
|
var _a3, _b2, _c, _d, _e2, _f2;
|
|
94848
|
+
console.log(">>> SYNC EXISTING CONNECTION");
|
|
94828
94849
|
const connectedConnector = SafeLocalStorage.getItem(SafeLocalStorageKeys.CONNECTED_CONNECTOR);
|
|
94829
94850
|
const connectedNamespace = SafeLocalStorage.getItem(SafeLocalStorageKeys.CONNECTED_NAMESPACE);
|
|
94830
94851
|
if (connectedConnector === ConstantsUtil$1.CONNECTOR_TYPE_WALLET_CONNECT && connectedNamespace) {
|
|
94852
|
+
console.log(">>> SYNC EXISTING CONNECTION1");
|
|
94831
94853
|
this.syncWalletConnectAccount();
|
|
94832
94854
|
} else if (connectedConnector && connectedConnector !== ConstantsUtil$1.CONNECTOR_TYPE_W3M_AUTH && connectedNamespace) {
|
|
94855
|
+
console.log(">>> SYNC EXISTING CONNECTION2");
|
|
94833
94856
|
const adapter = this.getAdapter(connectedNamespace);
|
|
94834
94857
|
const res = await (adapter == null ? void 0 : adapter.syncConnection({
|
|
94835
94858
|
id: connectedConnector,
|
|
@@ -94837,13 +94860,20 @@ class AppKit {
|
|
|
94837
94860
|
namespace: connectedNamespace,
|
|
94838
94861
|
rpcUrl: (_e2 = (_d = (_c = (_b2 = this.getCaipNetwork()) == null ? void 0 : _b2.rpcUrls) == null ? void 0 : _c.default) == null ? void 0 : _d.http) == null ? void 0 : _e2[0]
|
|
94839
94862
|
}));
|
|
94863
|
+
console.log(">>> SYNC EXISTING CONNECTION3");
|
|
94840
94864
|
if (res) {
|
|
94841
94865
|
this.syncProvider({ ...res, chainNamespace: connectedNamespace });
|
|
94842
94866
|
await this.syncAccount({ ...res, chainNamespace: connectedNamespace });
|
|
94867
|
+
this.setStatus("connected", connectedNamespace);
|
|
94868
|
+
} else {
|
|
94869
|
+
console.log(">>> SYNC EXISTING CONNECTION4");
|
|
94843
94870
|
}
|
|
94844
94871
|
if (!((_f2 = this.caipNetworks) == null ? void 0 : _f2.some((network) => network.id === (res == null ? void 0 : res.chainId)))) {
|
|
94845
94872
|
ChainController.showUnsupportedChainUI();
|
|
94846
94873
|
}
|
|
94874
|
+
} else {
|
|
94875
|
+
console.log(">>> SYNC EXISTING CONNECTION5");
|
|
94876
|
+
this.setStatus("disconnected", connectedNamespace);
|
|
94847
94877
|
}
|
|
94848
94878
|
}
|
|
94849
94879
|
getAdapter(namespace) {
|
|
@@ -94964,8 +94994,8 @@ class AppKit {
|
|
|
94964
94994
|
isInitialized = true;
|
|
94965
94995
|
this.initPromise = new Promise(async (resolve) => {
|
|
94966
94996
|
await Promise.all([
|
|
94967
|
-
import("./index-
|
|
94968
|
-
import("./w3m-modal-
|
|
94997
|
+
import("./index-J7PY6MW0.js"),
|
|
94998
|
+
import("./w3m-modal-B2BeuWfW.js")
|
|
94969
94999
|
]);
|
|
94970
95000
|
const modal = document.createElement("w3m-modal");
|
|
94971
95001
|
if (!OptionsController.state.disableAppend) {
|
|
@@ -94977,7 +95007,7 @@ class AppKit {
|
|
|
94977
95007
|
return this.initPromise;
|
|
94978
95008
|
}
|
|
94979
95009
|
}
|
|
94980
|
-
const PACKAGE_VERSION = "1.5.
|
|
95010
|
+
const PACKAGE_VERSION = "1.5.3-4228d6.0";
|
|
94981
95011
|
var __decorate$1J = function(decorators, target, key2, desc) {
|
|
94982
95012
|
var c2 = arguments.length, r4 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key2) : desc, d4;
|
|
94983
95013
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -112021,7 +112051,7 @@ function version4$1(parameters) {
|
|
|
112021
112051
|
async getProvider() {
|
|
112022
112052
|
if (!walletProvider) {
|
|
112023
112053
|
const CoinbaseWalletSDK = await (async () => {
|
|
112024
|
-
const { default: SDK } = await import("./index-
|
|
112054
|
+
const { default: SDK } = await import("./index-DG9HjHb-.js").then((n6) => n6.i);
|
|
112025
112055
|
if (typeof SDK !== "function" && typeof SDK.default === "function")
|
|
112026
112056
|
return SDK.default;
|
|
112027
112057
|
return SDK;
|
|
@@ -112200,7 +112230,7 @@ function version3$1(parameters) {
|
|
|
112200
112230
|
var _a3;
|
|
112201
112231
|
if (!walletProvider) {
|
|
112202
112232
|
const CoinbaseWalletSDK = await (async () => {
|
|
112203
|
-
const { default: SDK } = await import("./index-
|
|
112233
|
+
const { default: SDK } = await import("./index-Dzj_viZ6.js").then((n6) => n6.i);
|
|
112204
112234
|
if (typeof SDK !== "function" && typeof SDK.default === "function")
|
|
112205
112235
|
return SDK.default;
|
|
112206
112236
|
return SDK;
|
|
@@ -113157,8 +113187,12 @@ class WagmiAdapter extends AdapterBlueprint {
|
|
|
113157
113187
|
});
|
|
113158
113188
|
}
|
|
113159
113189
|
setupWatchers() {
|
|
113190
|
+
const initialAccountData = getAccount$1(this.wagmiConfig);
|
|
113191
|
+
StorageUtil.setConnectionStatus(initialAccountData.status);
|
|
113160
113192
|
watchAccount$1(this.wagmiConfig, {
|
|
113161
113193
|
onChange: (accountData) => {
|
|
113194
|
+
StorageUtil.setConnectionStatus(accountData.status);
|
|
113195
|
+
this.emit("statusChanged", accountData.status);
|
|
113162
113196
|
if (accountData.address) {
|
|
113163
113197
|
this.emit("accountChanged", {
|
|
113164
113198
|
address: accountData.address,
|
|
@@ -113176,6 +113210,7 @@ class WagmiAdapter extends AdapterBlueprint {
|
|
|
113176
113210
|
watchConnections$1(this.wagmiConfig, {
|
|
113177
113211
|
onChange: (connections) => {
|
|
113178
113212
|
if (connections.length === 0) {
|
|
113213
|
+
this.emit("statusChanged", "disconnected");
|
|
113179
113214
|
this.emit("disconnect");
|
|
113180
113215
|
}
|
|
113181
113216
|
}
|
|
@@ -133734,7 +133769,7 @@ async function getWebSocketRpcClient(url, options = {}) {
|
|
|
133734
133769
|
const { keepAlive, reconnect: reconnect2 } = options;
|
|
133735
133770
|
return getSocketRpcClient({
|
|
133736
133771
|
async getSocket({ onClose, onError, onOpen, onResponse }) {
|
|
133737
|
-
const WebSocket2 = await import("./native-
|
|
133772
|
+
const WebSocket2 = await import("./native-DI7LlC0P.js").then((module) => module.WebSocket);
|
|
133738
133773
|
const socket = new WebSocket2(url);
|
|
133739
133774
|
function onClose_() {
|
|
133740
133775
|
onClose();
|
|
@@ -139870,7 +139905,7 @@ function version4(parameters) {
|
|
|
139870
139905
|
async getProvider() {
|
|
139871
139906
|
if (!walletProvider) {
|
|
139872
139907
|
const CoinbaseWalletSDK = await (async () => {
|
|
139873
|
-
const { default: SDK } = await import("./index-
|
|
139908
|
+
const { default: SDK } = await import("./index-DG9HjHb-.js").then((n6) => n6.i);
|
|
139874
139909
|
if (typeof SDK !== "function" && typeof SDK.default === "function")
|
|
139875
139910
|
return SDK.default;
|
|
139876
139911
|
return SDK;
|
|
@@ -140049,7 +140084,7 @@ function version3(parameters) {
|
|
|
140049
140084
|
var _a3;
|
|
140050
140085
|
if (!walletProvider) {
|
|
140051
140086
|
const CoinbaseWalletSDK = await (async () => {
|
|
140052
|
-
const { default: SDK } = await import("./index-
|
|
140087
|
+
const { default: SDK } = await import("./index-Dzj_viZ6.js").then((n6) => n6.i);
|
|
140053
140088
|
if (typeof SDK !== "function" && typeof SDK.default === "function")
|
|
140054
140089
|
return SDK.default;
|
|
140055
140090
|
return SDK;
|
|
@@ -140255,7 +140290,7 @@ function metaMask(parameters = {}) {
|
|
|
140255
140290
|
async getProvider() {
|
|
140256
140291
|
async function initProvider() {
|
|
140257
140292
|
const MetaMaskSDK = await (async () => {
|
|
140258
|
-
const { default: SDK } = await import("./metamask-sdk-
|
|
140293
|
+
const { default: SDK } = await import("./metamask-sdk-RnNR2Xd5.js").then((n6) => n6.m);
|
|
140259
140294
|
if (typeof SDK !== "function" && typeof SDK.default === "function")
|
|
140260
140295
|
return SDK.default;
|
|
140261
140296
|
return SDK;
|
|
@@ -140486,14 +140521,14 @@ function safe(parameters = {}) {
|
|
|
140486
140521
|
if (!isIframe)
|
|
140487
140522
|
return;
|
|
140488
140523
|
if (!provider_) {
|
|
140489
|
-
const { default: SDK } = await import("./index-
|
|
140524
|
+
const { default: SDK } = await import("./index-DkfUSmob.js");
|
|
140490
140525
|
const sdk = new SDK(parameters);
|
|
140491
140526
|
const safe2 = await withTimeout(() => sdk.safe.getInfo(), {
|
|
140492
140527
|
timeout: parameters.unstable_getInfoTimeout ?? 10
|
|
140493
140528
|
});
|
|
140494
140529
|
if (!safe2)
|
|
140495
140530
|
throw new Error("Could not load Safe information");
|
|
140496
|
-
const { SafeAppProvider } = await import("./index-
|
|
140531
|
+
const { SafeAppProvider } = await import("./index-CopJc8lb.js").then((n6) => n6.i);
|
|
140497
140532
|
provider_ = new SafeAppProvider(safe2, sdk);
|
|
140498
140533
|
}
|
|
140499
140534
|
return provider_;
|
|
@@ -140662,7 +140697,7 @@ function walletConnect(parameters) {
|
|
|
140662
140697
|
const optionalChains = config2.chains.map((x3) => x3.id);
|
|
140663
140698
|
if (!optionalChains.length)
|
|
140664
140699
|
return;
|
|
140665
|
-
const { EthereumProvider } = await import("./index.es-
|
|
140700
|
+
const { EthereumProvider } = await import("./index.es-CFK4jmIh.js");
|
|
140666
140701
|
return await EthereumProvider.init({
|
|
140667
140702
|
...parameters,
|
|
140668
140703
|
disableProviderPing: true,
|
|
@@ -141046,4 +141081,4 @@ export {
|
|
|
141046
141081
|
WuiShimmer as y,
|
|
141047
141082
|
WuiText as z
|
|
141048
141083
|
};
|
|
141049
|
-
//# sourceMappingURL=appkit-
|
|
141084
|
+
//# sourceMappingURL=appkit-B8PLwrp1.js.map
|