@dubsdotapp/expo 0.2.32 → 0.2.34

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
@@ -160,6 +160,17 @@ interface BuildClaimResult {
160
160
  gameAddress: string;
161
161
  message: string;
162
162
  }
163
+ interface ConfirmClaimParams {
164
+ playerWallet: string;
165
+ signature: string;
166
+ amountClaimed?: number;
167
+ }
168
+ interface ConfirmClaimResult {
169
+ gameId: string;
170
+ signature: string;
171
+ explorerUrl: string;
172
+ message: string;
173
+ }
163
174
  interface GameMedia {
164
175
  poster: string | null;
165
176
  thumbnail: string | null;
@@ -170,6 +181,8 @@ interface Bettor {
170
181
  avatar: string | null;
171
182
  team: 'home' | 'away' | 'draw';
172
183
  amount: number;
184
+ amountClaimed: number | null;
185
+ claimSignature: string | null;
173
186
  }
174
187
  interface GameDetail {
175
188
  gameId: string;
@@ -361,6 +374,7 @@ declare class DubsClient {
361
374
  createCustomGame(params: CreateCustomGameParams): Promise<CreateCustomGameResult>;
362
375
  confirmCustomGame(params: ConfirmGameParams): Promise<ConfirmGameResult>;
363
376
  buildClaimTransaction(params: BuildClaimParams): Promise<BuildClaimResult>;
377
+ confirmClaim(gameId: string, params: ConfirmClaimParams): Promise<ConfirmClaimResult>;
364
378
  getGame(gameId: string): Promise<GameDetail>;
365
379
  getLiveScore(gameId: string): Promise<LiveScore | null>;
366
380
  getGames(params?: GetGamesParams): Promise<GameListItem[]>;
@@ -720,7 +734,9 @@ interface ClaimMutationResult {
720
734
  explorerUrl: string;
721
735
  }
722
736
  declare function useClaim(): {
723
- execute: (params: BuildClaimParams) => Promise<ClaimMutationResult>;
737
+ execute: (params: BuildClaimParams & {
738
+ amountClaimed?: number;
739
+ }) => Promise<ClaimMutationResult>;
724
740
  status: MutationStatus;
725
741
  error: Error | null;
726
742
  data: ClaimMutationResult | null;
@@ -742,6 +758,29 @@ declare function useCreateCustomGame(): {
742
758
  reset: () => void;
743
759
  };
744
760
 
761
+ interface ClaimStatus {
762
+ /** Whether the current wallet has claimed this game's prize */
763
+ hasClaimed: boolean;
764
+ /** Amount claimed (null if not claimed) */
765
+ amountClaimed: number | null;
766
+ /** Claim transaction signature (null if not claimed) */
767
+ claimSignature: string | null;
768
+ /** Whether the game has been resolved */
769
+ isResolved: boolean;
770
+ /** Loading state */
771
+ loading: boolean;
772
+ /** Error if fetch failed */
773
+ error: Error | null;
774
+ /** Re-fetch claim status */
775
+ refetch: () => void;
776
+ }
777
+ /**
778
+ * Check whether the current wallet has already claimed a prize for a game.
779
+ *
780
+ * Uses the game detail endpoint which includes per-bettor claim data.
781
+ */
782
+ declare function useHasClaimed(gameId: string | null): ClaimStatus;
783
+
745
784
  interface UseAuthResult {
746
785
  /** Current auth status */
747
786
  status: AuthStatus;
@@ -939,4 +978,4 @@ declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, onSu
939
978
  */
940
979
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
941
980
 
942
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, 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 };
981
+ export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, type ClaimStatus, type ConfirmClaimParams, type ConfirmClaimResult, 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, useHasClaimed, useJoinGame, useNetworkGames };
package/dist/index.d.ts CHANGED
@@ -160,6 +160,17 @@ interface BuildClaimResult {
160
160
  gameAddress: string;
161
161
  message: string;
162
162
  }
163
+ interface ConfirmClaimParams {
164
+ playerWallet: string;
165
+ signature: string;
166
+ amountClaimed?: number;
167
+ }
168
+ interface ConfirmClaimResult {
169
+ gameId: string;
170
+ signature: string;
171
+ explorerUrl: string;
172
+ message: string;
173
+ }
163
174
  interface GameMedia {
164
175
  poster: string | null;
165
176
  thumbnail: string | null;
@@ -170,6 +181,8 @@ interface Bettor {
170
181
  avatar: string | null;
171
182
  team: 'home' | 'away' | 'draw';
172
183
  amount: number;
184
+ amountClaimed: number | null;
185
+ claimSignature: string | null;
173
186
  }
174
187
  interface GameDetail {
175
188
  gameId: string;
@@ -361,6 +374,7 @@ declare class DubsClient {
361
374
  createCustomGame(params: CreateCustomGameParams): Promise<CreateCustomGameResult>;
362
375
  confirmCustomGame(params: ConfirmGameParams): Promise<ConfirmGameResult>;
363
376
  buildClaimTransaction(params: BuildClaimParams): Promise<BuildClaimResult>;
377
+ confirmClaim(gameId: string, params: ConfirmClaimParams): Promise<ConfirmClaimResult>;
364
378
  getGame(gameId: string): Promise<GameDetail>;
365
379
  getLiveScore(gameId: string): Promise<LiveScore | null>;
366
380
  getGames(params?: GetGamesParams): Promise<GameListItem[]>;
@@ -720,7 +734,9 @@ interface ClaimMutationResult {
720
734
  explorerUrl: string;
721
735
  }
722
736
  declare function useClaim(): {
723
- execute: (params: BuildClaimParams) => Promise<ClaimMutationResult>;
737
+ execute: (params: BuildClaimParams & {
738
+ amountClaimed?: number;
739
+ }) => Promise<ClaimMutationResult>;
724
740
  status: MutationStatus;
725
741
  error: Error | null;
726
742
  data: ClaimMutationResult | null;
@@ -742,6 +758,29 @@ declare function useCreateCustomGame(): {
742
758
  reset: () => void;
743
759
  };
744
760
 
761
+ interface ClaimStatus {
762
+ /** Whether the current wallet has claimed this game's prize */
763
+ hasClaimed: boolean;
764
+ /** Amount claimed (null if not claimed) */
765
+ amountClaimed: number | null;
766
+ /** Claim transaction signature (null if not claimed) */
767
+ claimSignature: string | null;
768
+ /** Whether the game has been resolved */
769
+ isResolved: boolean;
770
+ /** Loading state */
771
+ loading: boolean;
772
+ /** Error if fetch failed */
773
+ error: Error | null;
774
+ /** Re-fetch claim status */
775
+ refetch: () => void;
776
+ }
777
+ /**
778
+ * Check whether the current wallet has already claimed a prize for a game.
779
+ *
780
+ * Uses the game detail endpoint which includes per-bettor claim data.
781
+ */
782
+ declare function useHasClaimed(gameId: string | null): ClaimStatus;
783
+
745
784
  interface UseAuthResult {
746
785
  /** Current auth status */
747
786
  status: AuthStatus;
@@ -939,4 +978,4 @@ declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, onSu
939
978
  */
940
979
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
941
980
 
942
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, 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 };
981
+ export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, type ClaimStatus, type ConfirmClaimParams, type ConfirmClaimResult, 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, useHasClaimed, useJoinGame, useNetworkGames };