@meshconnect/web-link-sdk 3.2.14 → 3.2.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshconnect/web-link-sdk",
3
- "version": "3.2.14",
3
+ "version": "3.2.16",
4
4
  "description": "A client-side JS library for integrating with Mesh Connect",
5
5
  "exports": "./index.js",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "util": "^0.12.4"
23
23
  },
24
24
  "dependencies": {
25
- "@meshconnect/node-api": "^2.0.22",
25
+ "@meshconnect/node-api": "^2.0.23",
26
26
  "@meshconnect/solana-web3.js": "^1.0.4",
27
27
  "bs58": "^5.0.0",
28
28
  "buffer": "^6.0.3",
@@ -1 +1 @@
1
- export declare const sdkVersion = "3.2.14";
1
+ export declare const sdkVersion = "3.2.16";
package/utils/version.js CHANGED
@@ -1 +1 @@
1
- export var sdkVersion = '3.2.14';
1
+ export var sdkVersion = '3.2.16';
@@ -9,10 +9,10 @@ export declare class SolanaWalletStrategy extends BaseWalletStrategy {
9
9
  disconnect(payload: DisconnectPayload): Promise<void>;
10
10
  signMessage(payload: SignRequestPayload): Promise<string>;
11
11
  /**
12
- * @note Solana doesn't support chain switching as it's a single-chain network
13
- * This method is implemented to satisfy the interface but will always return mainnet (101)
12
+ * Handles chain switching for Solana networks
13
+ * Supports both mainnet (101) and devnet (103)
14
14
  */
15
- switchChain(_payload: ChainSwitchPayload): Promise<{
15
+ switchChain(payload: ChainSwitchPayload): Promise<{
16
16
  chainId: string;
17
17
  accounts: string[];
18
18
  }>;
@@ -127,13 +127,20 @@ var SolanaWalletStrategy = /** @class */ (function (_super) {
127
127
  });
128
128
  };
129
129
  /**
130
- * @note Solana doesn't support chain switching as it's a single-chain network
131
- * This method is implemented to satisfy the interface but will always return mainnet (101)
130
+ * Handles chain switching for Solana networks
131
+ * Supports both mainnet (101) and devnet (103)
132
132
  */
133
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
134
- SolanaWalletStrategy.prototype.switchChain = function (_payload) {
133
+ SolanaWalletStrategy.prototype.switchChain = function (payload) {
135
134
  return __awaiter(this, void 0, void 0, function () {
136
135
  return __generator(this, function (_a) {
136
+ // Check if the requested chainId is for Solana Devnet (103)
137
+ if (payload.chainId === 103) {
138
+ return [2 /*return*/, {
139
+ chainId: '103',
140
+ accounts: []
141
+ }];
142
+ }
143
+ // Default to mainnet (101) for all other cases
137
144
  return [2 /*return*/, {
138
145
  chainId: '101',
139
146
  accounts: []