@dubsdotapp/expo 0.2.28 → 0.2.30

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
@@ -118,12 +118,14 @@ interface CreateCustomGameParams {
118
118
  title?: string;
119
119
  maxPlayers?: number;
120
120
  metadata?: Record<string, unknown>;
121
+ externalGameId?: string;
121
122
  }
122
123
  interface CreateCustomGameResult {
123
124
  gameId: string;
124
125
  gameAddress: string;
125
126
  transaction: string;
126
127
  lockTimestamp: number;
128
+ externalGameId?: string | null;
127
129
  }
128
130
  interface JoinGameParams {
129
131
  playerWallet: string;
@@ -189,6 +191,7 @@ interface GameDetail {
189
191
  drawPool: number;
190
192
  totalPool: number;
191
193
  media: GameMedia;
194
+ externalGameId?: string | null;
192
195
  createdAt: string;
193
196
  updatedAt: string;
194
197
  }
@@ -208,12 +211,14 @@ interface GameListItem {
208
211
  league: string | null;
209
212
  lockTimestamp: number | null;
210
213
  createdAt: string;
214
+ externalGameId?: string | null;
211
215
  opponents: GameListOpponent[];
212
216
  media: GameMedia;
213
217
  }
214
218
  interface GetGamesParams {
215
219
  wallet?: string;
216
220
  status?: 'open' | 'locked' | 'resolved';
221
+ externalGameId?: string;
217
222
  limit?: number;
218
223
  offset?: number;
219
224
  }
@@ -428,6 +433,7 @@ interface TokenStorage {
428
433
  }
429
434
  declare const STORAGE_KEYS: {
430
435
  readonly MWA_AUTH_TOKEN: "dubs_mwa_auth_token";
436
+ readonly MWA_WALLET_ADDRESS: "dubs_mwa_wallet_address";
431
437
  readonly JWT_TOKEN: "dubs_jwt_token";
432
438
  readonly PHANTOM_SESSION: "dubs_phantom_session";
433
439
  readonly PHANTOM_CONNECT_IN_FLIGHT: "dubs_phantom_connect_in_flight";
@@ -576,6 +582,12 @@ declare class MwaWalletAdapter implements WalletAdapter {
576
582
  get connected(): boolean;
577
583
  get authToken(): string | null;
578
584
  setAuthToken(token: string | null): void;
585
+ /**
586
+ * Restore a previous session silently (no wallet interaction).
587
+ * Sets the public key and auth token so the adapter appears connected.
588
+ * The next signing operation will reauthorize with Phantom.
589
+ */
590
+ restoreSession(token: string, walletAddressBase58: string): void;
579
591
  /**
580
592
  * Connect to a mobile wallet. Call this before any signing.
581
593
  * Tries reauthorize first (if we have a saved token), then falls back to
@@ -726,6 +738,7 @@ interface CreateCustomGameMutationResult {
726
738
  signature: string;
727
739
  explorerUrl: string;
728
740
  buyIn: number;
741
+ externalGameId?: string | null;
729
742
  }
730
743
  declare function useCreateCustomGame(): {
731
744
  execute: (params: CreateCustomGameParams) => Promise<CreateCustomGameMutationResult>;
@@ -889,11 +902,29 @@ interface CreateCustomGameSheetProps {
889
902
  presetAmounts?: number[];
890
903
  defaultAmount?: number;
891
904
  metadata?: Record<string, unknown>;
905
+ externalGameId?: string;
892
906
  onAmountChange?: (amount: number | null) => void;
893
907
  onSuccess?: (result: CreateCustomGameMutationResult) => void;
894
908
  onError?: (error: Error) => void;
895
909
  }
896
- declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata, onAmountChange, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
910
+ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata, externalGameId, onAmountChange, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
911
+
912
+ interface JoinGameSheetProps {
913
+ visible: boolean;
914
+ onDismiss: () => void;
915
+ game: GameDetail;
916
+ /** Optional Image component (expo-image, etc.) for team logos */
917
+ ImageComponent?: React$1.ComponentType<any>;
918
+ /** Custom short-name function for team labels */
919
+ shortName?: (name: string | null) => string;
920
+ /** Override team colors (default blue/red) */
921
+ homeColor?: string;
922
+ awayColor?: string;
923
+ /** Callbacks */
924
+ onSuccess?: (result: JoinGameMutationResult) => void;
925
+ onError?: (error: Error) => void;
926
+ }
927
+ declare function JoinGameSheet({ visible, onDismiss, game, ImageComponent, shortName, homeColor, awayColor, onSuccess, onError, }: JoinGameSheetProps): react_jsx_runtime.JSX.Element;
897
928
 
898
929
  /**
899
930
  * Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
@@ -903,4 +934,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
903
934
  */
904
935
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
905
936
 
906
- 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 };
937
+ 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, JoinGameSheet, type JoinGameSheetProps, 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
@@ -118,12 +118,14 @@ interface CreateCustomGameParams {
118
118
  title?: string;
119
119
  maxPlayers?: number;
120
120
  metadata?: Record<string, unknown>;
121
+ externalGameId?: string;
121
122
  }
122
123
  interface CreateCustomGameResult {
123
124
  gameId: string;
124
125
  gameAddress: string;
125
126
  transaction: string;
126
127
  lockTimestamp: number;
128
+ externalGameId?: string | null;
127
129
  }
128
130
  interface JoinGameParams {
129
131
  playerWallet: string;
@@ -189,6 +191,7 @@ interface GameDetail {
189
191
  drawPool: number;
190
192
  totalPool: number;
191
193
  media: GameMedia;
194
+ externalGameId?: string | null;
192
195
  createdAt: string;
193
196
  updatedAt: string;
194
197
  }
@@ -208,12 +211,14 @@ interface GameListItem {
208
211
  league: string | null;
209
212
  lockTimestamp: number | null;
210
213
  createdAt: string;
214
+ externalGameId?: string | null;
211
215
  opponents: GameListOpponent[];
212
216
  media: GameMedia;
213
217
  }
214
218
  interface GetGamesParams {
215
219
  wallet?: string;
216
220
  status?: 'open' | 'locked' | 'resolved';
221
+ externalGameId?: string;
217
222
  limit?: number;
218
223
  offset?: number;
219
224
  }
@@ -428,6 +433,7 @@ interface TokenStorage {
428
433
  }
429
434
  declare const STORAGE_KEYS: {
430
435
  readonly MWA_AUTH_TOKEN: "dubs_mwa_auth_token";
436
+ readonly MWA_WALLET_ADDRESS: "dubs_mwa_wallet_address";
431
437
  readonly JWT_TOKEN: "dubs_jwt_token";
432
438
  readonly PHANTOM_SESSION: "dubs_phantom_session";
433
439
  readonly PHANTOM_CONNECT_IN_FLIGHT: "dubs_phantom_connect_in_flight";
@@ -576,6 +582,12 @@ declare class MwaWalletAdapter implements WalletAdapter {
576
582
  get connected(): boolean;
577
583
  get authToken(): string | null;
578
584
  setAuthToken(token: string | null): void;
585
+ /**
586
+ * Restore a previous session silently (no wallet interaction).
587
+ * Sets the public key and auth token so the adapter appears connected.
588
+ * The next signing operation will reauthorize with Phantom.
589
+ */
590
+ restoreSession(token: string, walletAddressBase58: string): void;
579
591
  /**
580
592
  * Connect to a mobile wallet. Call this before any signing.
581
593
  * Tries reauthorize first (if we have a saved token), then falls back to
@@ -726,6 +738,7 @@ interface CreateCustomGameMutationResult {
726
738
  signature: string;
727
739
  explorerUrl: string;
728
740
  buyIn: number;
741
+ externalGameId?: string | null;
729
742
  }
730
743
  declare function useCreateCustomGame(): {
731
744
  execute: (params: CreateCustomGameParams) => Promise<CreateCustomGameMutationResult>;
@@ -889,11 +902,29 @@ interface CreateCustomGameSheetProps {
889
902
  presetAmounts?: number[];
890
903
  defaultAmount?: number;
891
904
  metadata?: Record<string, unknown>;
905
+ externalGameId?: string;
892
906
  onAmountChange?: (amount: number | null) => void;
893
907
  onSuccess?: (result: CreateCustomGameMutationResult) => void;
894
908
  onError?: (error: Error) => void;
895
909
  }
896
- declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata, onAmountChange, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
910
+ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata, externalGameId, onAmountChange, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
911
+
912
+ interface JoinGameSheetProps {
913
+ visible: boolean;
914
+ onDismiss: () => void;
915
+ game: GameDetail;
916
+ /** Optional Image component (expo-image, etc.) for team logos */
917
+ ImageComponent?: React$1.ComponentType<any>;
918
+ /** Custom short-name function for team labels */
919
+ shortName?: (name: string | null) => string;
920
+ /** Override team colors (default blue/red) */
921
+ homeColor?: string;
922
+ awayColor?: string;
923
+ /** Callbacks */
924
+ onSuccess?: (result: JoinGameMutationResult) => void;
925
+ onError?: (error: Error) => void;
926
+ }
927
+ declare function JoinGameSheet({ visible, onDismiss, game, ImageComponent, shortName, homeColor, awayColor, onSuccess, onError, }: JoinGameSheetProps): react_jsx_runtime.JSX.Element;
897
928
 
898
929
  /**
899
930
  * Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
@@ -903,4 +934,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
903
934
  */
904
935
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
905
936
 
906
- 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 };
937
+ 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, JoinGameSheet, type JoinGameSheetProps, 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 };