@dubsdotapp/expo 0.2.21 → 0.2.22

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.mts CHANGED
@@ -17,6 +17,11 @@ interface DeviceInfo {
17
17
  productName: string | null;
18
18
  isDevice: boolean | null;
19
19
  }
20
+ /**
21
+ * Detect Solana Seeker device (synchronous — safe to call during render).
22
+ * Checks brand from expo-device; returns false if expo-device isn't installed.
23
+ */
24
+ declare function isSolanaSeeker(): boolean;
20
25
  declare function getDeviceInfo(): Promise<DeviceInfo>;
21
26
 
22
27
  interface Opponent {
@@ -889,4 +894,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
889
894
  */
890
895
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
891
896
 
892
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, getDeviceInfo, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
897
+ export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
package/dist/index.d.ts CHANGED
@@ -17,6 +17,11 @@ interface DeviceInfo {
17
17
  productName: string | null;
18
18
  isDevice: boolean | null;
19
19
  }
20
+ /**
21
+ * Detect Solana Seeker device (synchronous — safe to call during render).
22
+ * Checks brand from expo-device; returns false if expo-device isn't installed.
23
+ */
24
+ declare function isSolanaSeeker(): boolean;
20
25
  declare function getDeviceInfo(): Promise<DeviceInfo>;
21
26
 
22
27
  interface Opponent {
@@ -889,4 +894,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
889
894
  */
890
895
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
891
896
 
892
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, getDeviceInfo, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
897
+ export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
package/dist/index.js CHANGED
@@ -52,6 +52,7 @@ __export(index_exports, {
52
52
  UserProfileCard: () => UserProfileCard,
53
53
  createSecureStoreStorage: () => createSecureStoreStorage,
54
54
  getDeviceInfo: () => getDeviceInfo,
55
+ isSolanaSeeker: () => isSolanaSeeker,
55
56
  mergeTheme: () => mergeTheme,
56
57
  parseSolanaError: () => parseSolanaError,
57
58
  signAndSendBase64Transaction: () => signAndSendBase64Transaction,
@@ -559,7 +560,7 @@ var import_web34 = require("@solana/web3.js");
559
560
 
560
561
  // src/managed-wallet.tsx
561
562
  var import_react = require("react");
562
- var import_react_native4 = require("react-native");
563
+ var import_react_native5 = require("react-native");
563
564
 
564
565
  // src/wallet/mwa-adapter.ts
565
566
  var import_web3 = require("@solana/web3.js");
@@ -1028,11 +1029,58 @@ var PhantomDeeplinkAdapter = class {
1028
1029
  }
1029
1030
  };
1030
1031
 
1032
+ // src/utils/device.ts
1033
+ var import_react_native2 = require("react-native");
1034
+ function isSolanaSeeker() {
1035
+ try {
1036
+ const Device = require("expo-device");
1037
+ return Device.brand?.toLowerCase() === "solanamobile";
1038
+ } catch {
1039
+ return false;
1040
+ }
1041
+ }
1042
+ async function getDeviceInfo() {
1043
+ try {
1044
+ const Device = require("expo-device");
1045
+ return {
1046
+ platform: import_react_native2.Platform.OS,
1047
+ modelName: Device.modelName,
1048
+ brand: Device.brand,
1049
+ manufacturer: Device.manufacturer,
1050
+ osName: Device.osName,
1051
+ osVersion: Device.osVersion,
1052
+ deviceType: Device.deviceType,
1053
+ deviceName: Device.deviceName,
1054
+ totalMemory: Device.totalMemory,
1055
+ modelId: Device.modelId,
1056
+ designName: Device.designName,
1057
+ productName: Device.productName,
1058
+ isDevice: Device.isDevice
1059
+ };
1060
+ } catch {
1061
+ return {
1062
+ platform: import_react_native2.Platform.OS,
1063
+ modelName: null,
1064
+ brand: null,
1065
+ manufacturer: null,
1066
+ osName: null,
1067
+ osVersion: null,
1068
+ deviceType: null,
1069
+ deviceName: null,
1070
+ totalMemory: null,
1071
+ modelId: null,
1072
+ designName: null,
1073
+ productName: null,
1074
+ isDevice: null
1075
+ };
1076
+ }
1077
+ }
1078
+
1031
1079
  // src/ui/ConnectWalletScreen.tsx
1032
- var import_react_native3 = require("react-native");
1080
+ var import_react_native4 = require("react-native");
1033
1081
 
1034
1082
  // src/ui/theme.ts
1035
- var import_react_native2 = require("react-native");
1083
+ var import_react_native3 = require("react-native");
1036
1084
  var dark = {
1037
1085
  background: "#08080D",
1038
1086
  surface: "#111118",
@@ -1066,7 +1114,7 @@ var light = {
1066
1114
  errorBorder: "#FECACA"
1067
1115
  };
1068
1116
  function useDubsTheme() {
1069
- const scheme = (0, import_react_native2.useColorScheme)();
1117
+ const scheme = (0, import_react_native3.useColorScheme)();
1070
1118
  return scheme === "light" ? light : dark;
1071
1119
  }
1072
1120
  function mergeTheme(base, overrides) {
@@ -1086,44 +1134,44 @@ function ConnectWalletScreen({
1086
1134
  }) {
1087
1135
  const t = useDubsTheme();
1088
1136
  const accent = accentColor || t.accent;
1089
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.View, { style: [styles.container, { backgroundColor: t.background }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native3.View, { style: styles.content, children: [
1090
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native3.View, { style: styles.brandingSection, children: [
1137
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.View, { style: [styles.container, { backgroundColor: t.background }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native4.View, { style: styles.content, children: [
1138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native4.View, { style: styles.brandingSection, children: [
1091
1139
  appIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1092
- import_react_native3.Image,
1140
+ import_react_native4.Image,
1093
1141
  {
1094
1142
  source: { uri: appIcon },
1095
1143
  style: styles.logoImage
1096
1144
  }
1097
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.View, { style: [styles.logoCircle, { backgroundColor: accent }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: styles.logoText, children: appName.charAt(0).toUpperCase() }) }),
1098
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.appName, { color: t.text }], children: appName }),
1099
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.subtitle, { color: t.textMuted }], children: tagline || "Connect your Solana wallet to get started" })
1145
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.View, { style: [styles.logoCircle, { backgroundColor: accent }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.Text, { style: styles.logoText, children: appName.charAt(0).toUpperCase() }) }),
1146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.Text, { style: [styles.appName, { color: t.text }], children: appName }),
1147
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.Text, { style: [styles.subtitle, { color: t.textMuted }], children: tagline || "Connect your Solana wallet to get started" })
1100
1148
  ] }),
1101
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native3.View, { style: styles.actionSection, children: [
1149
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native4.View, { style: styles.actionSection, children: [
1102
1150
  error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1103
- import_react_native3.View,
1151
+ import_react_native4.View,
1104
1152
  {
1105
1153
  style: [
1106
1154
  styles.errorBox,
1107
1155
  { backgroundColor: t.errorBg, borderColor: t.errorBorder }
1108
1156
  ],
1109
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.errorText, { color: t.errorText }], children: error })
1157
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.Text, { style: [styles.errorText, { color: t.errorText }], children: error })
1110
1158
  }
1111
1159
  ) : null,
1112
1160
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1113
- import_react_native3.TouchableOpacity,
1161
+ import_react_native4.TouchableOpacity,
1114
1162
  {
1115
1163
  style: [styles.connectButton, { backgroundColor: accent }],
1116
1164
  onPress: onConnect,
1117
1165
  disabled: connecting,
1118
1166
  activeOpacity: 0.8,
1119
- children: connecting ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.ActivityIndicator, { color: "#FFFFFF", size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: styles.connectButtonText, children: "Connect Wallet" })
1167
+ children: connecting ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.ActivityIndicator, { color: "#FFFFFF", size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.Text, { style: styles.connectButtonText, children: "Connect Wallet" })
1120
1168
  }
1121
1169
  ),
1122
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.hint, { color: t.textDim }], children: "Phantom, Solflare, or any Solana wallet" })
1170
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.Text, { style: [styles.hint, { color: t.textDim }], children: "Phantom, Solflare, or any Solana wallet" })
1123
1171
  ] })
1124
1172
  ] }) });
1125
1173
  }
1126
- var styles = import_react_native3.StyleSheet.create({
1174
+ var styles = import_react_native4.StyleSheet.create({
1127
1175
  container: {
1128
1176
  flex: 1,
1129
1177
  justifyContent: "center"
@@ -1245,8 +1293,9 @@ function ManagedWalletProvider({
1245
1293
  const [connecting, setConnecting] = (0, import_react.useState)(false);
1246
1294
  const [isReady, setIsReady] = (0, import_react.useState)(false);
1247
1295
  const [error, setError] = (0, import_react.useState)(null);
1248
- const usePhantom = import_react_native4.Platform.OS === "ios" && !!redirectUri;
1249
- console.log(TAG3, `Platform: ${import_react_native4.Platform.OS}, redirectUri: ${redirectUri ? "provided" : "not set"}, usePhantom: ${usePhantom}`);
1296
+ const seeker = import_react_native5.Platform.OS === "android" && isSolanaSeeker();
1297
+ const usePhantom = !seeker && !!redirectUri;
1298
+ console.log(TAG3, `Platform: ${import_react_native5.Platform.OS}, seeker: ${seeker}, redirectUri: ${redirectUri ? "provided" : "not set"}, usePhantom: ${usePhantom}`);
1250
1299
  const adapterRef = (0, import_react.useRef)(null);
1251
1300
  const transactRef = (0, import_react.useRef)(null);
1252
1301
  if (!adapterRef.current) {
@@ -1789,45 +1838,6 @@ var import_bs583 = __toESM(require("bs58"));
1789
1838
  var import_react10 = require("react");
1790
1839
  var AuthContext = (0, import_react10.createContext)(null);
1791
1840
 
1792
- // src/utils/device.ts
1793
- var import_react_native5 = require("react-native");
1794
- async function getDeviceInfo() {
1795
- try {
1796
- const Device = require("expo-device");
1797
- return {
1798
- platform: import_react_native5.Platform.OS,
1799
- modelName: Device.modelName,
1800
- brand: Device.brand,
1801
- manufacturer: Device.manufacturer,
1802
- osName: Device.osName,
1803
- osVersion: Device.osVersion,
1804
- deviceType: Device.deviceType,
1805
- deviceName: Device.deviceName,
1806
- totalMemory: Device.totalMemory,
1807
- modelId: Device.modelId,
1808
- designName: Device.designName,
1809
- productName: Device.productName,
1810
- isDevice: Device.isDevice
1811
- };
1812
- } catch {
1813
- return {
1814
- platform: import_react_native5.Platform.OS,
1815
- modelName: null,
1816
- brand: null,
1817
- manufacturer: null,
1818
- osName: null,
1819
- osVersion: null,
1820
- deviceType: null,
1821
- deviceName: null,
1822
- totalMemory: null,
1823
- modelId: null,
1824
- designName: null,
1825
- productName: null,
1826
- isDevice: null
1827
- };
1828
- }
1829
- }
1830
-
1831
1841
  // src/hooks/useAuth.ts
1832
1842
  function useAuth() {
1833
1843
  const sharedAuth = (0, import_react11.useContext)(AuthContext);
@@ -3694,6 +3704,7 @@ var styles9 = import_react_native14.StyleSheet.create({
3694
3704
  UserProfileCard,
3695
3705
  createSecureStoreStorage,
3696
3706
  getDeviceInfo,
3707
+ isSolanaSeeker,
3697
3708
  mergeTheme,
3698
3709
  parseSolanaError,
3699
3710
  signAndSendBase64Transaction,