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

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/index.d.ts CHANGED
@@ -26,10 +26,12 @@ interface PhantomSDKConfig extends Omit<EmbeddedProviderConfig, "apiBaseUrl" | "
26
26
  };
27
27
  }
28
28
  interface ConnectOptions {
29
- /** OAuth provider to use */
30
- provider?: "google" | "apple" | "jwt";
29
+ /** OAuth provider to use (required) */
30
+ provider: "google" | "apple" | "jwt" | "phantom";
31
31
  /** JWT token for JWT authentication */
32
32
  jwtToken?: string;
33
+ /** Custom authentication data */
34
+ customAuthData?: Record<string, any>;
33
35
  }
34
36
 
35
37
  interface PhantomContextValue {
@@ -51,7 +53,7 @@ declare function PhantomProvider({ children, config, debugConfig }: PhantomProvi
51
53
  declare function usePhantom(): PhantomContextValue;
52
54
 
53
55
  declare function useConnect(): {
54
- connect: (_options?: ConnectOptions) => Promise<ConnectResult>;
56
+ connect: (options: ConnectOptions) => Promise<ConnectResult>;
55
57
  isConnecting: boolean;
56
58
  error: Error | null;
57
59
  };
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.19",
156
+ sdk_version: "1.0.0-beta.20",
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.19"
562
+ [import_constants2.ANALYTICS_HEADERS.SDK_VERSION]: "1.0.0-beta.20"
563
563
  // Replaced at build time
564
564
  }
565
565
  };
@@ -644,12 +644,12 @@ var import_react2 = require("react");
644
644
  function useConnect() {
645
645
  const { sdk, isConnecting, connectError, setWalletId } = usePhantom();
646
646
  const connect = (0, import_react2.useCallback)(
647
- async (_options) => {
647
+ async (options) => {
648
648
  if (!sdk) {
649
649
  throw new Error("SDK not initialized");
650
650
  }
651
651
  try {
652
- const result = await sdk.connect();
652
+ const result = await sdk.connect(options);
653
653
  if (result.status === "completed" && result.walletId) {
654
654
  setWalletId(result.walletId);
655
655
  }
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.19",
112
+ sdk_version: "1.0.0-beta.20",
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.19"
518
+ [ANALYTICS_HEADERS.SDK_VERSION]: "1.0.0-beta.20"
519
519
  // Replaced at build time
520
520
  }
521
521
  };
@@ -600,12 +600,12 @@ import { useCallback } from "react";
600
600
  function useConnect() {
601
601
  const { sdk, isConnecting, connectError, setWalletId } = usePhantom();
602
602
  const connect = useCallback(
603
- async (_options) => {
603
+ async (options) => {
604
604
  if (!sdk) {
605
605
  throw new Error("SDK not initialized");
606
606
  }
607
607
  try {
608
- const result = await sdk.connect();
608
+ const result = await sdk.connect(options);
609
609
  if (result.status === "completed" && result.walletId) {
610
610
  setWalletId(result.walletId);
611
611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phantom/react-native-sdk",
3
- "version": "1.0.0-beta.19",
3
+ "version": "1.0.0-beta.20",
4
4
  "description": "Phantom Wallet SDK for React Native and Expo applications",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -48,10 +48,10 @@
48
48
  "@phantom/api-key-stamper": "^1.0.0-beta.8",
49
49
  "@phantom/base64url": "^1.0.0-beta.8",
50
50
  "@phantom/chain-interfaces": "^1.0.0-beta.8",
51
- "@phantom/client": "^1.0.0-beta.19",
51
+ "@phantom/client": "^1.0.0-beta.20",
52
52
  "@phantom/constants": "^1.0.0-beta.8",
53
53
  "@phantom/crypto": "^1.0.0-beta.8",
54
- "@phantom/embedded-provider-core": "^1.0.0-beta.19",
54
+ "@phantom/embedded-provider-core": "^1.0.0-beta.20",
55
55
  "@phantom/sdk-types": "^1.0.0-beta.8",
56
56
  "@types/bs58": "^5.0.0",
57
57
  "bs58": "^6.0.0",