@dubsdotapp/expo 0.3.1 → 0.3.3

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
@@ -400,6 +400,67 @@ interface UFCEvent {
400
400
  date: string | null;
401
401
  fights: UFCFight[];
402
402
  }
403
+ interface ArcadePool {
404
+ id: number;
405
+ app_id: number;
406
+ game_slug: string;
407
+ name: string;
408
+ buy_in_lamports: number;
409
+ max_lives: number;
410
+ period_start: string;
411
+ period_end: string;
412
+ schedule: 'weekly' | 'daily' | 'manual';
413
+ status: 'open' | 'active' | 'resolving' | 'complete' | 'cancelled';
414
+ solana_game_id: string | null;
415
+ solana_game_address: string | null;
416
+ total_entries: number;
417
+ created_at: string;
418
+ }
419
+ interface ArcadeEntry {
420
+ id: number;
421
+ pool_id: number;
422
+ wallet_address: string;
423
+ best_score: number;
424
+ lives_used: number;
425
+ rank: number | null;
426
+ created_at: string;
427
+ attempts: ArcadeAttempt[] | null;
428
+ }
429
+ interface ArcadeAttempt {
430
+ id: number;
431
+ attempt_number: number;
432
+ score: number | null;
433
+ status: 'active' | 'submitted' | 'expired';
434
+ started_at: string;
435
+ submitted_at: string | null;
436
+ duration_ms: number | null;
437
+ }
438
+ interface ArcadeLeaderboardEntry {
439
+ id: number;
440
+ wallet_address: string;
441
+ best_score: number;
442
+ lives_used: number;
443
+ username: string;
444
+ avatar: string | null;
445
+ rank: number;
446
+ }
447
+ interface ArcadePoolStats {
448
+ total_entries: number;
449
+ top_score: number;
450
+ avg_score: number;
451
+ active_players: number;
452
+ }
453
+ interface StartAttemptResult {
454
+ sessionToken: string;
455
+ attemptNumber: number;
456
+ livesRemaining: number;
457
+ }
458
+ interface SubmitScoreResult {
459
+ score: number;
460
+ bestScore: number;
461
+ livesUsed: number;
462
+ isNewBest: boolean;
463
+ }
403
464
  interface UiConfig {
404
465
  accentColor?: string;
405
466
  appIcon?: string;
@@ -483,6 +544,30 @@ declare class DubsClient {
483
544
  parseErrorLocal(error: unknown): ParsedError;
484
545
  /** Get the full local error code map */
485
546
  getErrorCodesLocal(): Record<number, SolanaErrorCode>;
547
+ getArcadePools(params?: {
548
+ gameSlug?: string;
549
+ status?: string;
550
+ }): Promise<ArcadePool[]>;
551
+ getArcadePool(poolId: number): Promise<{
552
+ pool: ArcadePool;
553
+ stats: ArcadePoolStats;
554
+ }>;
555
+ enterArcadePool(poolId: number, params: {
556
+ walletAddress: string;
557
+ txSignature: string;
558
+ }): Promise<ArcadeEntry>;
559
+ startArcadeAttempt(poolId: number, walletAddress: string): Promise<StartAttemptResult>;
560
+ submitArcadeScore(poolId: number, params: {
561
+ walletAddress: string;
562
+ sessionToken: string;
563
+ score: number;
564
+ durationMs?: number;
565
+ }): Promise<SubmitScoreResult>;
566
+ getArcadeLeaderboard(poolId: number, params?: {
567
+ limit?: number;
568
+ offset?: number;
569
+ }): Promise<ArcadeLeaderboardEntry[]>;
570
+ getArcadeEntry(poolId: number, walletAddress: string): Promise<ArcadeEntry>;
486
571
  /** Fetch the app's UI customization config (accent color, icon, tagline, environment) */
487
572
  getAppConfig(): Promise<UiConfig>;
488
573
  }
@@ -928,6 +1013,39 @@ interface PushNotificationStatus {
928
1013
  }
929
1014
  declare function usePushNotifications(): PushNotificationStatus;
930
1015
 
1016
+ interface UseArcadePoolsResult {
1017
+ pools: ArcadePool[];
1018
+ loading: boolean;
1019
+ error: Error | null;
1020
+ refetch: () => void;
1021
+ }
1022
+ declare function useArcadePools(gameSlug?: string): UseArcadePoolsResult;
1023
+
1024
+ interface UseArcadePoolResult {
1025
+ pool: ArcadePool | null;
1026
+ stats: ArcadePoolStats | null;
1027
+ leaderboard: ArcadeLeaderboardEntry[];
1028
+ loading: boolean;
1029
+ error: Error | null;
1030
+ refetch: () => void;
1031
+ }
1032
+ declare function useArcadePool(poolId: number | null): UseArcadePoolResult;
1033
+
1034
+ interface UseArcadeGameResult {
1035
+ entry: ArcadeEntry | null;
1036
+ livesRemaining: number;
1037
+ bestScore: number;
1038
+ loading: boolean;
1039
+ error: Error | null;
1040
+ /** Fetch/refresh the user's entry for this pool */
1041
+ refreshEntry: () => Promise<void>;
1042
+ /** Start a new life — returns session token to pass to the game */
1043
+ startAttempt: () => Promise<StartAttemptResult>;
1044
+ /** Submit score after game over */
1045
+ submitScore: (sessionToken: string, score: number, durationMs?: number) => Promise<SubmitScoreResult>;
1046
+ }
1047
+ declare function useArcadeGame(poolId: number | null, maxLives?: number): UseArcadeGameResult;
1048
+
931
1049
  interface UserProfileCardProps {
932
1050
  walletAddress: string;
933
1051
  username?: string;
@@ -1132,4 +1250,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
1132
1250
  */
1133
1251
  declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
1134
1252
 
1135
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, 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 PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
1253
+ export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, 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 PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type StartAttemptResult, type SubmitScoreResult, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseArcadeGameResult, type UseArcadePoolResult, type UseArcadePoolsResult, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
package/dist/index.d.ts CHANGED
@@ -400,6 +400,67 @@ interface UFCEvent {
400
400
  date: string | null;
401
401
  fights: UFCFight[];
402
402
  }
403
+ interface ArcadePool {
404
+ id: number;
405
+ app_id: number;
406
+ game_slug: string;
407
+ name: string;
408
+ buy_in_lamports: number;
409
+ max_lives: number;
410
+ period_start: string;
411
+ period_end: string;
412
+ schedule: 'weekly' | 'daily' | 'manual';
413
+ status: 'open' | 'active' | 'resolving' | 'complete' | 'cancelled';
414
+ solana_game_id: string | null;
415
+ solana_game_address: string | null;
416
+ total_entries: number;
417
+ created_at: string;
418
+ }
419
+ interface ArcadeEntry {
420
+ id: number;
421
+ pool_id: number;
422
+ wallet_address: string;
423
+ best_score: number;
424
+ lives_used: number;
425
+ rank: number | null;
426
+ created_at: string;
427
+ attempts: ArcadeAttempt[] | null;
428
+ }
429
+ interface ArcadeAttempt {
430
+ id: number;
431
+ attempt_number: number;
432
+ score: number | null;
433
+ status: 'active' | 'submitted' | 'expired';
434
+ started_at: string;
435
+ submitted_at: string | null;
436
+ duration_ms: number | null;
437
+ }
438
+ interface ArcadeLeaderboardEntry {
439
+ id: number;
440
+ wallet_address: string;
441
+ best_score: number;
442
+ lives_used: number;
443
+ username: string;
444
+ avatar: string | null;
445
+ rank: number;
446
+ }
447
+ interface ArcadePoolStats {
448
+ total_entries: number;
449
+ top_score: number;
450
+ avg_score: number;
451
+ active_players: number;
452
+ }
453
+ interface StartAttemptResult {
454
+ sessionToken: string;
455
+ attemptNumber: number;
456
+ livesRemaining: number;
457
+ }
458
+ interface SubmitScoreResult {
459
+ score: number;
460
+ bestScore: number;
461
+ livesUsed: number;
462
+ isNewBest: boolean;
463
+ }
403
464
  interface UiConfig {
404
465
  accentColor?: string;
405
466
  appIcon?: string;
@@ -483,6 +544,30 @@ declare class DubsClient {
483
544
  parseErrorLocal(error: unknown): ParsedError;
484
545
  /** Get the full local error code map */
485
546
  getErrorCodesLocal(): Record<number, SolanaErrorCode>;
547
+ getArcadePools(params?: {
548
+ gameSlug?: string;
549
+ status?: string;
550
+ }): Promise<ArcadePool[]>;
551
+ getArcadePool(poolId: number): Promise<{
552
+ pool: ArcadePool;
553
+ stats: ArcadePoolStats;
554
+ }>;
555
+ enterArcadePool(poolId: number, params: {
556
+ walletAddress: string;
557
+ txSignature: string;
558
+ }): Promise<ArcadeEntry>;
559
+ startArcadeAttempt(poolId: number, walletAddress: string): Promise<StartAttemptResult>;
560
+ submitArcadeScore(poolId: number, params: {
561
+ walletAddress: string;
562
+ sessionToken: string;
563
+ score: number;
564
+ durationMs?: number;
565
+ }): Promise<SubmitScoreResult>;
566
+ getArcadeLeaderboard(poolId: number, params?: {
567
+ limit?: number;
568
+ offset?: number;
569
+ }): Promise<ArcadeLeaderboardEntry[]>;
570
+ getArcadeEntry(poolId: number, walletAddress: string): Promise<ArcadeEntry>;
486
571
  /** Fetch the app's UI customization config (accent color, icon, tagline, environment) */
487
572
  getAppConfig(): Promise<UiConfig>;
488
573
  }
@@ -928,6 +1013,39 @@ interface PushNotificationStatus {
928
1013
  }
929
1014
  declare function usePushNotifications(): PushNotificationStatus;
930
1015
 
1016
+ interface UseArcadePoolsResult {
1017
+ pools: ArcadePool[];
1018
+ loading: boolean;
1019
+ error: Error | null;
1020
+ refetch: () => void;
1021
+ }
1022
+ declare function useArcadePools(gameSlug?: string): UseArcadePoolsResult;
1023
+
1024
+ interface UseArcadePoolResult {
1025
+ pool: ArcadePool | null;
1026
+ stats: ArcadePoolStats | null;
1027
+ leaderboard: ArcadeLeaderboardEntry[];
1028
+ loading: boolean;
1029
+ error: Error | null;
1030
+ refetch: () => void;
1031
+ }
1032
+ declare function useArcadePool(poolId: number | null): UseArcadePoolResult;
1033
+
1034
+ interface UseArcadeGameResult {
1035
+ entry: ArcadeEntry | null;
1036
+ livesRemaining: number;
1037
+ bestScore: number;
1038
+ loading: boolean;
1039
+ error: Error | null;
1040
+ /** Fetch/refresh the user's entry for this pool */
1041
+ refreshEntry: () => Promise<void>;
1042
+ /** Start a new life — returns session token to pass to the game */
1043
+ startAttempt: () => Promise<StartAttemptResult>;
1044
+ /** Submit score after game over */
1045
+ submitScore: (sessionToken: string, score: number, durationMs?: number) => Promise<SubmitScoreResult>;
1046
+ }
1047
+ declare function useArcadeGame(poolId: number | null, maxLives?: number): UseArcadeGameResult;
1048
+
931
1049
  interface UserProfileCardProps {
932
1050
  walletAddress: string;
933
1051
  username?: string;
@@ -1132,4 +1250,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
1132
1250
  */
1133
1251
  declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
1134
1252
 
1135
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, 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 PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
1253
+ export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, 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 PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type StartAttemptResult, type SubmitScoreResult, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseArcadeGameResult, type UseArcadePoolResult, type UseArcadePoolsResult, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };