@dubsdotapp/expo 0.3.2 → 0.3.4
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 +155 -1
- package/dist/index.d.ts +155 -1
- package/dist/index.js +586 -111
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +575 -95
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +16 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useEnterArcadePool.ts +79 -0
- package/src/index.ts +6 -1
- package/src/types.ts +15 -0
- package/src/ui/game/EnterArcadePoolSheet.tsx +260 -0
- package/src/ui/game/index.ts +2 -0
- package/src/ui/index.ts +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -400,6 +400,78 @@ interface UFCEvent {
|
|
|
400
400
|
date: string | null;
|
|
401
401
|
fights: UFCFight[];
|
|
402
402
|
}
|
|
403
|
+
interface BuildArcadeEntryResult {
|
|
404
|
+
transaction: string;
|
|
405
|
+
poolId: string;
|
|
406
|
+
amount: string;
|
|
407
|
+
destination: string;
|
|
408
|
+
}
|
|
409
|
+
interface EnterArcadePoolResult {
|
|
410
|
+
poolId: string;
|
|
411
|
+
signature: string;
|
|
412
|
+
entry: ArcadeEntry;
|
|
413
|
+
}
|
|
414
|
+
interface ArcadePool {
|
|
415
|
+
id: number;
|
|
416
|
+
app_id: number;
|
|
417
|
+
game_slug: string;
|
|
418
|
+
name: string;
|
|
419
|
+
buy_in_lamports: number;
|
|
420
|
+
max_lives: number;
|
|
421
|
+
period_start: string;
|
|
422
|
+
period_end: string;
|
|
423
|
+
schedule: 'weekly' | 'daily' | 'manual';
|
|
424
|
+
status: 'open' | 'active' | 'resolving' | 'complete' | 'cancelled';
|
|
425
|
+
solana_game_id: string | null;
|
|
426
|
+
solana_game_address: string | null;
|
|
427
|
+
total_entries: number;
|
|
428
|
+
created_at: string;
|
|
429
|
+
}
|
|
430
|
+
interface ArcadeEntry {
|
|
431
|
+
id: number;
|
|
432
|
+
pool_id: number;
|
|
433
|
+
wallet_address: string;
|
|
434
|
+
best_score: number;
|
|
435
|
+
lives_used: number;
|
|
436
|
+
rank: number | null;
|
|
437
|
+
created_at: string;
|
|
438
|
+
attempts: ArcadeAttempt[] | null;
|
|
439
|
+
}
|
|
440
|
+
interface ArcadeAttempt {
|
|
441
|
+
id: number;
|
|
442
|
+
attempt_number: number;
|
|
443
|
+
score: number | null;
|
|
444
|
+
status: 'active' | 'submitted' | 'expired';
|
|
445
|
+
started_at: string;
|
|
446
|
+
submitted_at: string | null;
|
|
447
|
+
duration_ms: number | null;
|
|
448
|
+
}
|
|
449
|
+
interface ArcadeLeaderboardEntry {
|
|
450
|
+
id: number;
|
|
451
|
+
wallet_address: string;
|
|
452
|
+
best_score: number;
|
|
453
|
+
lives_used: number;
|
|
454
|
+
username: string;
|
|
455
|
+
avatar: string | null;
|
|
456
|
+
rank: number;
|
|
457
|
+
}
|
|
458
|
+
interface ArcadePoolStats {
|
|
459
|
+
total_entries: number;
|
|
460
|
+
top_score: number;
|
|
461
|
+
avg_score: number;
|
|
462
|
+
active_players: number;
|
|
463
|
+
}
|
|
464
|
+
interface StartAttemptResult {
|
|
465
|
+
sessionToken: string;
|
|
466
|
+
attemptNumber: number;
|
|
467
|
+
livesRemaining: number;
|
|
468
|
+
}
|
|
469
|
+
interface SubmitScoreResult {
|
|
470
|
+
score: number;
|
|
471
|
+
bestScore: number;
|
|
472
|
+
livesUsed: number;
|
|
473
|
+
isNewBest: boolean;
|
|
474
|
+
}
|
|
403
475
|
interface UiConfig {
|
|
404
476
|
accentColor?: string;
|
|
405
477
|
appIcon?: string;
|
|
@@ -483,6 +555,32 @@ declare class DubsClient {
|
|
|
483
555
|
parseErrorLocal(error: unknown): ParsedError;
|
|
484
556
|
/** Get the full local error code map */
|
|
485
557
|
getErrorCodesLocal(): Record<number, SolanaErrorCode>;
|
|
558
|
+
getArcadePools(params?: {
|
|
559
|
+
gameSlug?: string;
|
|
560
|
+
status?: string;
|
|
561
|
+
}): Promise<ArcadePool[]>;
|
|
562
|
+
getArcadePool(poolId: number): Promise<{
|
|
563
|
+
pool: ArcadePool;
|
|
564
|
+
stats: ArcadePoolStats;
|
|
565
|
+
}>;
|
|
566
|
+
/** Build unsigned entry transaction for an arcade pool */
|
|
567
|
+
buildArcadeEntry(poolId: number, walletAddress: string): Promise<BuildArcadeEntryResult>;
|
|
568
|
+
enterArcadePool(poolId: number, params: {
|
|
569
|
+
walletAddress: string;
|
|
570
|
+
txSignature: string;
|
|
571
|
+
}): Promise<ArcadeEntry>;
|
|
572
|
+
startArcadeAttempt(poolId: number, walletAddress: string): Promise<StartAttemptResult>;
|
|
573
|
+
submitArcadeScore(poolId: number, params: {
|
|
574
|
+
walletAddress: string;
|
|
575
|
+
sessionToken: string;
|
|
576
|
+
score: number;
|
|
577
|
+
durationMs?: number;
|
|
578
|
+
}): Promise<SubmitScoreResult>;
|
|
579
|
+
getArcadeLeaderboard(poolId: number, params?: {
|
|
580
|
+
limit?: number;
|
|
581
|
+
offset?: number;
|
|
582
|
+
}): Promise<ArcadeLeaderboardEntry[]>;
|
|
583
|
+
getArcadeEntry(poolId: number, walletAddress: string): Promise<ArcadeEntry>;
|
|
486
584
|
/** Fetch the app's UI customization config (accent color, icon, tagline, environment) */
|
|
487
585
|
getAppConfig(): Promise<UiConfig>;
|
|
488
586
|
}
|
|
@@ -928,6 +1026,52 @@ interface PushNotificationStatus {
|
|
|
928
1026
|
}
|
|
929
1027
|
declare function usePushNotifications(): PushNotificationStatus;
|
|
930
1028
|
|
|
1029
|
+
interface UseArcadePoolsResult {
|
|
1030
|
+
pools: ArcadePool[];
|
|
1031
|
+
loading: boolean;
|
|
1032
|
+
error: Error | null;
|
|
1033
|
+
refetch: () => void;
|
|
1034
|
+
}
|
|
1035
|
+
declare function useArcadePools(gameSlug?: string): UseArcadePoolsResult;
|
|
1036
|
+
|
|
1037
|
+
interface UseArcadePoolResult {
|
|
1038
|
+
pool: ArcadePool | null;
|
|
1039
|
+
stats: ArcadePoolStats | null;
|
|
1040
|
+
leaderboard: ArcadeLeaderboardEntry[];
|
|
1041
|
+
loading: boolean;
|
|
1042
|
+
error: Error | null;
|
|
1043
|
+
refetch: () => void;
|
|
1044
|
+
}
|
|
1045
|
+
declare function useArcadePool(poolId: number | null): UseArcadePoolResult;
|
|
1046
|
+
|
|
1047
|
+
interface UseArcadeGameResult {
|
|
1048
|
+
entry: ArcadeEntry | null;
|
|
1049
|
+
livesRemaining: number;
|
|
1050
|
+
bestScore: number;
|
|
1051
|
+
loading: boolean;
|
|
1052
|
+
error: Error | null;
|
|
1053
|
+
/** Fetch/refresh the user's entry for this pool */
|
|
1054
|
+
refreshEntry: () => Promise<void>;
|
|
1055
|
+
/** Start a new life — returns session token to pass to the game */
|
|
1056
|
+
startAttempt: () => Promise<StartAttemptResult>;
|
|
1057
|
+
/** Submit score after game over */
|
|
1058
|
+
submitScore: (sessionToken: string, score: number, durationMs?: number) => Promise<SubmitScoreResult>;
|
|
1059
|
+
}
|
|
1060
|
+
declare function useArcadeGame(poolId: number | null, maxLives?: number): UseArcadeGameResult;
|
|
1061
|
+
|
|
1062
|
+
interface EnterArcadePoolMutationResult {
|
|
1063
|
+
poolId: number;
|
|
1064
|
+
signature: string;
|
|
1065
|
+
entry: ArcadeEntry;
|
|
1066
|
+
}
|
|
1067
|
+
declare function useEnterArcadePool(): {
|
|
1068
|
+
execute: (poolId: number) => Promise<EnterArcadePoolMutationResult>;
|
|
1069
|
+
status: MutationStatus;
|
|
1070
|
+
error: Error | null;
|
|
1071
|
+
data: EnterArcadePoolMutationResult | null;
|
|
1072
|
+
reset: () => void;
|
|
1073
|
+
};
|
|
1074
|
+
|
|
931
1075
|
interface UserProfileCardProps {
|
|
932
1076
|
walletAddress: string;
|
|
933
1077
|
username?: string;
|
|
@@ -1117,6 +1261,16 @@ interface ClaimButtonProps {
|
|
|
1117
1261
|
*/
|
|
1118
1262
|
declare function ClaimButton({ gameId, style, onSuccess, onError }: ClaimButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1119
1263
|
|
|
1264
|
+
interface EnterArcadePoolSheetProps {
|
|
1265
|
+
visible: boolean;
|
|
1266
|
+
onDismiss: () => void;
|
|
1267
|
+
pool: ArcadePool;
|
|
1268
|
+
stats?: ArcadePoolStats | null;
|
|
1269
|
+
onSuccess?: (result: EnterArcadePoolMutationResult) => void;
|
|
1270
|
+
onError?: (error: Error) => void;
|
|
1271
|
+
}
|
|
1272
|
+
declare function EnterArcadePoolSheet({ visible, onDismiss, pool, stats, onSuccess, onError, }: EnterArcadePoolSheetProps): react_jsx_runtime.JSX.Element;
|
|
1273
|
+
|
|
1120
1274
|
/**
|
|
1121
1275
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
1122
1276
|
* Prefers signAndSendTransaction if available (MWA), otherwise falls back to
|
|
@@ -1132,4 +1286,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1132
1286
|
*/
|
|
1133
1287
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1134
1288
|
|
|
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 };
|
|
1289
|
+
export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildArcadeEntryResult, 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 EnterArcadePoolMutationResult, type EnterArcadePoolResult, EnterArcadePoolSheet, type EnterArcadePoolSheetProps, 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, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
package/dist/index.d.ts
CHANGED
|
@@ -400,6 +400,78 @@ interface UFCEvent {
|
|
|
400
400
|
date: string | null;
|
|
401
401
|
fights: UFCFight[];
|
|
402
402
|
}
|
|
403
|
+
interface BuildArcadeEntryResult {
|
|
404
|
+
transaction: string;
|
|
405
|
+
poolId: string;
|
|
406
|
+
amount: string;
|
|
407
|
+
destination: string;
|
|
408
|
+
}
|
|
409
|
+
interface EnterArcadePoolResult {
|
|
410
|
+
poolId: string;
|
|
411
|
+
signature: string;
|
|
412
|
+
entry: ArcadeEntry;
|
|
413
|
+
}
|
|
414
|
+
interface ArcadePool {
|
|
415
|
+
id: number;
|
|
416
|
+
app_id: number;
|
|
417
|
+
game_slug: string;
|
|
418
|
+
name: string;
|
|
419
|
+
buy_in_lamports: number;
|
|
420
|
+
max_lives: number;
|
|
421
|
+
period_start: string;
|
|
422
|
+
period_end: string;
|
|
423
|
+
schedule: 'weekly' | 'daily' | 'manual';
|
|
424
|
+
status: 'open' | 'active' | 'resolving' | 'complete' | 'cancelled';
|
|
425
|
+
solana_game_id: string | null;
|
|
426
|
+
solana_game_address: string | null;
|
|
427
|
+
total_entries: number;
|
|
428
|
+
created_at: string;
|
|
429
|
+
}
|
|
430
|
+
interface ArcadeEntry {
|
|
431
|
+
id: number;
|
|
432
|
+
pool_id: number;
|
|
433
|
+
wallet_address: string;
|
|
434
|
+
best_score: number;
|
|
435
|
+
lives_used: number;
|
|
436
|
+
rank: number | null;
|
|
437
|
+
created_at: string;
|
|
438
|
+
attempts: ArcadeAttempt[] | null;
|
|
439
|
+
}
|
|
440
|
+
interface ArcadeAttempt {
|
|
441
|
+
id: number;
|
|
442
|
+
attempt_number: number;
|
|
443
|
+
score: number | null;
|
|
444
|
+
status: 'active' | 'submitted' | 'expired';
|
|
445
|
+
started_at: string;
|
|
446
|
+
submitted_at: string | null;
|
|
447
|
+
duration_ms: number | null;
|
|
448
|
+
}
|
|
449
|
+
interface ArcadeLeaderboardEntry {
|
|
450
|
+
id: number;
|
|
451
|
+
wallet_address: string;
|
|
452
|
+
best_score: number;
|
|
453
|
+
lives_used: number;
|
|
454
|
+
username: string;
|
|
455
|
+
avatar: string | null;
|
|
456
|
+
rank: number;
|
|
457
|
+
}
|
|
458
|
+
interface ArcadePoolStats {
|
|
459
|
+
total_entries: number;
|
|
460
|
+
top_score: number;
|
|
461
|
+
avg_score: number;
|
|
462
|
+
active_players: number;
|
|
463
|
+
}
|
|
464
|
+
interface StartAttemptResult {
|
|
465
|
+
sessionToken: string;
|
|
466
|
+
attemptNumber: number;
|
|
467
|
+
livesRemaining: number;
|
|
468
|
+
}
|
|
469
|
+
interface SubmitScoreResult {
|
|
470
|
+
score: number;
|
|
471
|
+
bestScore: number;
|
|
472
|
+
livesUsed: number;
|
|
473
|
+
isNewBest: boolean;
|
|
474
|
+
}
|
|
403
475
|
interface UiConfig {
|
|
404
476
|
accentColor?: string;
|
|
405
477
|
appIcon?: string;
|
|
@@ -483,6 +555,32 @@ declare class DubsClient {
|
|
|
483
555
|
parseErrorLocal(error: unknown): ParsedError;
|
|
484
556
|
/** Get the full local error code map */
|
|
485
557
|
getErrorCodesLocal(): Record<number, SolanaErrorCode>;
|
|
558
|
+
getArcadePools(params?: {
|
|
559
|
+
gameSlug?: string;
|
|
560
|
+
status?: string;
|
|
561
|
+
}): Promise<ArcadePool[]>;
|
|
562
|
+
getArcadePool(poolId: number): Promise<{
|
|
563
|
+
pool: ArcadePool;
|
|
564
|
+
stats: ArcadePoolStats;
|
|
565
|
+
}>;
|
|
566
|
+
/** Build unsigned entry transaction for an arcade pool */
|
|
567
|
+
buildArcadeEntry(poolId: number, walletAddress: string): Promise<BuildArcadeEntryResult>;
|
|
568
|
+
enterArcadePool(poolId: number, params: {
|
|
569
|
+
walletAddress: string;
|
|
570
|
+
txSignature: string;
|
|
571
|
+
}): Promise<ArcadeEntry>;
|
|
572
|
+
startArcadeAttempt(poolId: number, walletAddress: string): Promise<StartAttemptResult>;
|
|
573
|
+
submitArcadeScore(poolId: number, params: {
|
|
574
|
+
walletAddress: string;
|
|
575
|
+
sessionToken: string;
|
|
576
|
+
score: number;
|
|
577
|
+
durationMs?: number;
|
|
578
|
+
}): Promise<SubmitScoreResult>;
|
|
579
|
+
getArcadeLeaderboard(poolId: number, params?: {
|
|
580
|
+
limit?: number;
|
|
581
|
+
offset?: number;
|
|
582
|
+
}): Promise<ArcadeLeaderboardEntry[]>;
|
|
583
|
+
getArcadeEntry(poolId: number, walletAddress: string): Promise<ArcadeEntry>;
|
|
486
584
|
/** Fetch the app's UI customization config (accent color, icon, tagline, environment) */
|
|
487
585
|
getAppConfig(): Promise<UiConfig>;
|
|
488
586
|
}
|
|
@@ -928,6 +1026,52 @@ interface PushNotificationStatus {
|
|
|
928
1026
|
}
|
|
929
1027
|
declare function usePushNotifications(): PushNotificationStatus;
|
|
930
1028
|
|
|
1029
|
+
interface UseArcadePoolsResult {
|
|
1030
|
+
pools: ArcadePool[];
|
|
1031
|
+
loading: boolean;
|
|
1032
|
+
error: Error | null;
|
|
1033
|
+
refetch: () => void;
|
|
1034
|
+
}
|
|
1035
|
+
declare function useArcadePools(gameSlug?: string): UseArcadePoolsResult;
|
|
1036
|
+
|
|
1037
|
+
interface UseArcadePoolResult {
|
|
1038
|
+
pool: ArcadePool | null;
|
|
1039
|
+
stats: ArcadePoolStats | null;
|
|
1040
|
+
leaderboard: ArcadeLeaderboardEntry[];
|
|
1041
|
+
loading: boolean;
|
|
1042
|
+
error: Error | null;
|
|
1043
|
+
refetch: () => void;
|
|
1044
|
+
}
|
|
1045
|
+
declare function useArcadePool(poolId: number | null): UseArcadePoolResult;
|
|
1046
|
+
|
|
1047
|
+
interface UseArcadeGameResult {
|
|
1048
|
+
entry: ArcadeEntry | null;
|
|
1049
|
+
livesRemaining: number;
|
|
1050
|
+
bestScore: number;
|
|
1051
|
+
loading: boolean;
|
|
1052
|
+
error: Error | null;
|
|
1053
|
+
/** Fetch/refresh the user's entry for this pool */
|
|
1054
|
+
refreshEntry: () => Promise<void>;
|
|
1055
|
+
/** Start a new life — returns session token to pass to the game */
|
|
1056
|
+
startAttempt: () => Promise<StartAttemptResult>;
|
|
1057
|
+
/** Submit score after game over */
|
|
1058
|
+
submitScore: (sessionToken: string, score: number, durationMs?: number) => Promise<SubmitScoreResult>;
|
|
1059
|
+
}
|
|
1060
|
+
declare function useArcadeGame(poolId: number | null, maxLives?: number): UseArcadeGameResult;
|
|
1061
|
+
|
|
1062
|
+
interface EnterArcadePoolMutationResult {
|
|
1063
|
+
poolId: number;
|
|
1064
|
+
signature: string;
|
|
1065
|
+
entry: ArcadeEntry;
|
|
1066
|
+
}
|
|
1067
|
+
declare function useEnterArcadePool(): {
|
|
1068
|
+
execute: (poolId: number) => Promise<EnterArcadePoolMutationResult>;
|
|
1069
|
+
status: MutationStatus;
|
|
1070
|
+
error: Error | null;
|
|
1071
|
+
data: EnterArcadePoolMutationResult | null;
|
|
1072
|
+
reset: () => void;
|
|
1073
|
+
};
|
|
1074
|
+
|
|
931
1075
|
interface UserProfileCardProps {
|
|
932
1076
|
walletAddress: string;
|
|
933
1077
|
username?: string;
|
|
@@ -1117,6 +1261,16 @@ interface ClaimButtonProps {
|
|
|
1117
1261
|
*/
|
|
1118
1262
|
declare function ClaimButton({ gameId, style, onSuccess, onError }: ClaimButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1119
1263
|
|
|
1264
|
+
interface EnterArcadePoolSheetProps {
|
|
1265
|
+
visible: boolean;
|
|
1266
|
+
onDismiss: () => void;
|
|
1267
|
+
pool: ArcadePool;
|
|
1268
|
+
stats?: ArcadePoolStats | null;
|
|
1269
|
+
onSuccess?: (result: EnterArcadePoolMutationResult) => void;
|
|
1270
|
+
onError?: (error: Error) => void;
|
|
1271
|
+
}
|
|
1272
|
+
declare function EnterArcadePoolSheet({ visible, onDismiss, pool, stats, onSuccess, onError, }: EnterArcadePoolSheetProps): react_jsx_runtime.JSX.Element;
|
|
1273
|
+
|
|
1120
1274
|
/**
|
|
1121
1275
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
1122
1276
|
* Prefers signAndSendTransaction if available (MWA), otherwise falls back to
|
|
@@ -1132,4 +1286,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1132
1286
|
*/
|
|
1133
1287
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1134
1288
|
|
|
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 };
|
|
1289
|
+
export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildArcadeEntryResult, 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 EnterArcadePoolMutationResult, type EnterArcadePoolResult, EnterArcadePoolSheet, type EnterArcadePoolSheetProps, 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, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|