@phantom/react-native-sdk 1.0.0-beta.20 → 1.0.0-beta.21

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/README.md CHANGED
@@ -276,14 +276,44 @@ if (isAvailable) {
276
276
  // Sign a transaction (without sending)
277
277
  const signedTx = await ethereum.signTransaction(transactionData);
278
278
 
279
- // Sign and send a transaction
279
+ // Sign and send a transaction
280
280
  const result = await ethereum.sendTransaction(transactionData);
281
281
 
282
+ // Switch to a different chain
283
+ await ethereum.switchChain(137); // Switch to Polygon
284
+ await ethereum.switchChain("0x89"); // Also accepts hex strings
285
+
282
286
  // Get current chain ID
283
287
  const chainId = await ethereum.getChainId();
284
288
  }
285
289
  ```
286
290
 
291
+ **Available Methods:**
292
+
293
+ - `getAccounts()` - Get connected Ethereum accounts
294
+ - `signPersonalMessage(message, address)` - Sign personal message
295
+ - `signTypedData(typedData, address)` - Sign EIP-712 typed data
296
+ - `signTransaction(transaction)` - Sign transaction without sending
297
+ - `sendTransaction(transaction)` - Sign and send transaction
298
+ - `switchChain(chainId)` - Switch chains (accepts chain ID as number or hex string)
299
+ - `getChainId()` - Get current chain ID
300
+ - `isConnected()` - Check connection status
301
+
302
+ **Supported EVM Networks:**
303
+
304
+ | Network | Chain ID | Usage |
305
+ |---------|----------|-------|
306
+ | Ethereum Mainnet | `1` | `ethereum.switchChain(1)` |
307
+ | Ethereum Sepolia | `11155111` | `ethereum.switchChain(11155111)` |
308
+ | Polygon Mainnet | `137` | `ethereum.switchChain(137)` |
309
+ | Polygon Amoy | `80002` | `ethereum.switchChain(80002)` |
310
+ | Base Mainnet | `8453` | `ethereum.switchChain(8453)` |
311
+ | Base Sepolia | `84532` | `ethereum.switchChain(84532)` |
312
+ | Arbitrum One | `42161` | `ethereum.switchChain(42161)` |
313
+ | Arbitrum Sepolia | `421614` | `ethereum.switchChain(421614)` |
314
+ | Monad Mainnet | `143` | `ethereum.switchChain(143)` |
315
+ | Monad Testnet | `10143` | `ethereum.switchChain(10143)` |
316
+
287
317
  #### useDisconnect
288
318
 
289
319
  Manages wallet disconnection.
package/dist/index.js CHANGED
@@ -153,7 +153,7 @@ var ExpoAuthProvider = class {
153
153
  // OAuth session management - defaults to allow refresh unless explicitly clearing after logout
154
154
  clear_previous_session: (phantomOptions.clearPreviousSession ?? false).toString(),
155
155
  allow_refresh: (phantomOptions.allowRefresh ?? true).toString(),
156
- sdk_version: "1.0.0-beta.20",
156
+ sdk_version: "1.0.0-beta.21",
157
157
  sdk_type: "react-native",
158
158
  platform: import_react_native.Platform.OS
159
159
  });
@@ -559,7 +559,7 @@ function PhantomProvider({ children, config, debugConfig }) {
559
559
  [import_constants2.ANALYTICS_HEADERS.PLATFORM_VERSION]: `${import_react_native3.Platform.Version}`,
560
560
  [import_constants2.ANALYTICS_HEADERS.APP_ID]: config.appId,
561
561
  [import_constants2.ANALYTICS_HEADERS.WALLET_TYPE]: config.embeddedWalletType,
562
- [import_constants2.ANALYTICS_HEADERS.SDK_VERSION]: "1.0.0-beta.20"
562
+ [import_constants2.ANALYTICS_HEADERS.SDK_VERSION]: "1.0.0-beta.21"
563
563
  // Replaced at build time
564
564
  }
565
565
  };
package/dist/index.mjs CHANGED
@@ -109,7 +109,7 @@ var ExpoAuthProvider = class {
109
109
  // OAuth session management - defaults to allow refresh unless explicitly clearing after logout
110
110
  clear_previous_session: (phantomOptions.clearPreviousSession ?? false).toString(),
111
111
  allow_refresh: (phantomOptions.allowRefresh ?? true).toString(),
112
- sdk_version: "1.0.0-beta.20",
112
+ sdk_version: "1.0.0-beta.21",
113
113
  sdk_type: "react-native",
114
114
  platform: Platform.OS
115
115
  });
@@ -515,7 +515,7 @@ function PhantomProvider({ children, config, debugConfig }) {
515
515
  [ANALYTICS_HEADERS.PLATFORM_VERSION]: `${Platform2.Version}`,
516
516
  [ANALYTICS_HEADERS.APP_ID]: config.appId,
517
517
  [ANALYTICS_HEADERS.WALLET_TYPE]: config.embeddedWalletType,
518
- [ANALYTICS_HEADERS.SDK_VERSION]: "1.0.0-beta.20"
518
+ [ANALYTICS_HEADERS.SDK_VERSION]: "1.0.0-beta.21"
519
519
  // Replaced at build time
520
520
  }
521
521
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phantom/react-native-sdk",
3
- "version": "1.0.0-beta.20",
3
+ "version": "1.0.0-beta.21",
4
4
  "description": "Phantom Wallet SDK for React Native and Expo applications",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -45,14 +45,14 @@
45
45
  "directory": "packages/react-native-sdk"
46
46
  },
47
47
  "dependencies": {
48
- "@phantom/api-key-stamper": "^1.0.0-beta.8",
49
- "@phantom/base64url": "^1.0.0-beta.8",
50
- "@phantom/chain-interfaces": "^1.0.0-beta.8",
51
- "@phantom/client": "^1.0.0-beta.20",
52
- "@phantom/constants": "^1.0.0-beta.8",
53
- "@phantom/crypto": "^1.0.0-beta.8",
54
- "@phantom/embedded-provider-core": "^1.0.0-beta.20",
55
- "@phantom/sdk-types": "^1.0.0-beta.8",
48
+ "@phantom/api-key-stamper": "^1.0.0-beta.9",
49
+ "@phantom/base64url": "^1.0.0-beta.9",
50
+ "@phantom/chain-interfaces": "^1.0.0-beta.9",
51
+ "@phantom/client": "^1.0.0-beta.21",
52
+ "@phantom/constants": "^1.0.0-beta.9",
53
+ "@phantom/crypto": "^1.0.0-beta.9",
54
+ "@phantom/embedded-provider-core": "^1.0.0-beta.21",
55
+ "@phantom/sdk-types": "^1.0.0-beta.9",
56
56
  "@types/bs58": "^5.0.0",
57
57
  "bs58": "^6.0.0",
58
58
  "buffer": "^6.0.3"