@solana/connector 0.2.3 → 0.2.6
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/{chunk-WPDCSFX2.mjs → chunk-26SWXQP6.mjs} +11 -8
- package/dist/chunk-26SWXQP6.mjs.map +1 -0
- package/dist/{chunk-NLPEO5GT.js → chunk-5MA4YO43.js} +3 -3
- package/dist/chunk-5MA4YO43.js.map +1 -0
- package/dist/{chunk-B6YBZB6H.js → chunk-6UTXGTYX.js} +26 -23
- package/dist/chunk-6UTXGTYX.js.map +1 -0
- package/dist/{chunk-X2X5TFXS.js → chunk-7DATF5NN.js} +4 -4
- package/dist/{chunk-X2X5TFXS.js.map → chunk-7DATF5NN.js.map} +1 -1
- package/dist/{chunk-E3DAIOYS.mjs → chunk-GM3PZ3WK.mjs} +11 -6
- package/dist/chunk-GM3PZ3WK.mjs.map +1 -0
- package/dist/{chunk-QST7XLMB.js → chunk-PNZYYZZS.js} +11 -6
- package/dist/chunk-PNZYYZZS.js.map +1 -0
- package/dist/{chunk-UOML5ULB.mjs → chunk-PP7GI6BR.mjs} +3 -3
- package/dist/{chunk-UOML5ULB.mjs.map → chunk-PP7GI6BR.mjs.map} +1 -1
- package/dist/{chunk-DFKGCW7K.mjs → chunk-STJOIQUF.mjs} +35 -8
- package/dist/chunk-STJOIQUF.mjs.map +1 -0
- package/dist/{chunk-ULEPN4NL.js → chunk-USIWRRHO.js} +34 -7
- package/dist/chunk-USIWRRHO.js.map +1 -0
- package/dist/{chunk-A7WQ3K75.mjs → chunk-ZBPAQUIP.mjs} +3 -3
- package/dist/chunk-ZBPAQUIP.mjs.map +1 -0
- package/dist/compat.d.mts +1 -1
- package/dist/compat.d.ts +1 -1
- package/dist/headless.d.mts +5 -6
- package/dist/headless.d.ts +5 -6
- package/dist/headless.js +113 -113
- package/dist/headless.mjs +3 -3
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +154 -154
- package/dist/index.mjs +4 -4
- package/dist/{protocol-G-z1lRqo.d.mts → protocol-nWSt9TTV.d.mts} +1 -1
- package/dist/{protocol-G-z1lRqo.d.ts → protocol-nWSt9TTV.d.ts} +1 -1
- package/dist/react.d.mts +23 -18
- package/dist/react.d.ts +23 -18
- package/dist/react.js +49 -49
- package/dist/react.mjs +2 -2
- package/dist/remote.d.mts +2 -2
- package/dist/remote.d.ts +2 -2
- package/dist/remote.js +13 -13
- package/dist/remote.mjs +2 -2
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +13 -10
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +5 -2
- package/dist/server.mjs.map +1 -1
- package/dist/{standard-shim-BB0Lkg_C.d.ts → standard-shim-BK2nn2ZT.d.ts} +15 -8
- package/dist/{standard-shim-n5phZB1d.d.mts → standard-shim-DSMKHCxD.d.mts} +15 -8
- package/dist/{transaction-signer-7NaYmP5w.d.ts → transaction-signer-B3eCsMfI.d.mts} +1 -1
- package/dist/{transaction-signer-7NaYmP5w.d.mts → transaction-signer-B3eCsMfI.d.ts} +1 -1
- package/dist/{walletconnect-F2M3PAAN.js → walletconnect-FFPQ6PDH.js} +8 -8
- package/dist/{walletconnect-F2M3PAAN.js.map → walletconnect-FFPQ6PDH.js.map} +1 -1
- package/dist/walletconnect-HMQQB3YM.mjs +3 -0
- package/dist/{walletconnect-Z6LPGALR.mjs.map → walletconnect-HMQQB3YM.mjs.map} +1 -1
- package/package.json +40 -31
- package/dist/chunk-A7WQ3K75.mjs.map +0 -1
- package/dist/chunk-B6YBZB6H.js.map +0 -1
- package/dist/chunk-DFKGCW7K.mjs.map +0 -1
- package/dist/chunk-E3DAIOYS.mjs.map +0 -1
- package/dist/chunk-NLPEO5GT.js.map +0 -1
- package/dist/chunk-QST7XLMB.js.map +0 -1
- package/dist/chunk-ULEPN4NL.js.map +0 -1
- package/dist/chunk-WPDCSFX2.mjs.map +0 -1
- package/dist/walletconnect-Z6LPGALR.mjs +0 -3
|
@@ -1857,7 +1857,7 @@ var logger5 = chunkBF67LVVM_js.createLogger("ConnectorClient"), ConnectorClient
|
|
|
1857
1857
|
async initializeWalletConnect() {
|
|
1858
1858
|
if (this.config.walletConnect?.enabled)
|
|
1859
1859
|
try {
|
|
1860
|
-
let { registerWalletConnectWallet } = await import('./walletconnect-
|
|
1860
|
+
let { registerWalletConnectWallet } = await import('./walletconnect-FFPQ6PDH.js');
|
|
1861
1861
|
this.walletConnectRegistration = await registerWalletConnectWallet(this.config.walletConnect), this.config.debug && logger5.info("WalletConnect wallet registered successfully");
|
|
1862
1862
|
} catch (error) {
|
|
1863
1863
|
this.config.debug && logger5.error("Failed to register WalletConnect wallet", { error });
|
|
@@ -1963,6 +1963,22 @@ var logger5 = chunkBF67LVVM_js.createLogger("ConnectorClient"), ConnectorClient
|
|
|
1963
1963
|
trackTransaction(activity) {
|
|
1964
1964
|
this.transactionTracker.trackTransaction(activity);
|
|
1965
1965
|
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Emit a pre-send transaction preview event for devtools.
|
|
1968
|
+
*
|
|
1969
|
+
* This does not sign or send the transaction. It exists so apps that do not
|
|
1970
|
+
* use the connector transaction signer can still surface wire bytes in the
|
|
1971
|
+
* debugger (e.g. to simulate before sending).
|
|
1972
|
+
*/
|
|
1973
|
+
previewTransaction(transaction) {
|
|
1974
|
+
let { serialized } = chunk4KD6HQQG_js.prepareTransactionForWallet(transaction);
|
|
1975
|
+
this.eventEmitter.emit({
|
|
1976
|
+
type: "transaction:preparing",
|
|
1977
|
+
transaction: serialized,
|
|
1978
|
+
size: serialized.length,
|
|
1979
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1980
|
+
});
|
|
1981
|
+
}
|
|
1966
1982
|
updateTransactionStatus(signature, status, error) {
|
|
1967
1983
|
this.transactionTracker.updateStatus(signature, status, error);
|
|
1968
1984
|
}
|
|
@@ -2236,7 +2252,7 @@ function getDefaultConfig(options) {
|
|
|
2236
2252
|
additionalWallets,
|
|
2237
2253
|
wallets
|
|
2238
2254
|
} = options, defaultClusters = clusters ?? [
|
|
2239
|
-
core.createSolanaMainnet(),
|
|
2255
|
+
core.createSolanaMainnet("https://api.mainnet-beta.solana.com"),
|
|
2240
2256
|
core.createSolanaDevnet(),
|
|
2241
2257
|
core.createSolanaTestnet(),
|
|
2242
2258
|
...network === "localnet" ? [core.createSolanaLocalnet()] : [],
|
|
@@ -2342,12 +2358,23 @@ function getInitialCluster(network = "mainnet-beta") {
|
|
|
2342
2358
|
return toClusterId(network);
|
|
2343
2359
|
}
|
|
2344
2360
|
function getDefaultMobileConfig(options) {
|
|
2345
|
-
|
|
2361
|
+
function getAppOrigin(appUrl) {
|
|
2362
|
+
if (appUrl)
|
|
2363
|
+
try {
|
|
2364
|
+
return new URL(appUrl).origin;
|
|
2365
|
+
} catch {
|
|
2366
|
+
return appUrl;
|
|
2367
|
+
}
|
|
2368
|
+
return typeof window < "u" ? window.location.origin : "https://localhost:3000";
|
|
2369
|
+
}
|
|
2370
|
+
let origin = getAppOrigin(options.appUrl);
|
|
2346
2371
|
return {
|
|
2347
2372
|
appIdentity: {
|
|
2348
2373
|
name: options.appName,
|
|
2349
|
-
uri:
|
|
2350
|
-
icon
|
|
2374
|
+
uri: origin,
|
|
2375
|
+
// Use a relative icon path so wallets resolve it against `uri`.
|
|
2376
|
+
// This avoids invalid URLs like: `${uri}/${uri}/favicon.ico` on mobile.
|
|
2377
|
+
icon: "/favicon.ico"
|
|
2351
2378
|
},
|
|
2352
2379
|
cluster: options.network || "mainnet-beta"
|
|
2353
2380
|
};
|
|
@@ -3246,5 +3273,5 @@ exports.toClusterId = toClusterId;
|
|
|
3246
3273
|
exports.toLegacyWalletState = toLegacyWalletState;
|
|
3247
3274
|
exports.truncate = truncate;
|
|
3248
3275
|
exports.validateConfigOptions = validateConfigOptions;
|
|
3249
|
-
//# sourceMappingURL=chunk-
|
|
3250
|
-
//# sourceMappingURL=chunk-
|
|
3276
|
+
//# sourceMappingURL=chunk-USIWRRHO.js.map
|
|
3277
|
+
//# sourceMappingURL=chunk-USIWRRHO.js.map
|