@dubsdotapp/expo 0.3.3 → 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 +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +387 -111
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +340 -56
- 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,17 @@ 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
|
+
}
|
|
403
414
|
interface ArcadePool {
|
|
404
415
|
id: number;
|
|
405
416
|
app_id: number;
|
|
@@ -552,6 +563,8 @@ declare class DubsClient {
|
|
|
552
563
|
pool: ArcadePool;
|
|
553
564
|
stats: ArcadePoolStats;
|
|
554
565
|
}>;
|
|
566
|
+
/** Build unsigned entry transaction for an arcade pool */
|
|
567
|
+
buildArcadeEntry(poolId: number, walletAddress: string): Promise<BuildArcadeEntryResult>;
|
|
555
568
|
enterArcadePool(poolId: number, params: {
|
|
556
569
|
walletAddress: string;
|
|
557
570
|
txSignature: string;
|
|
@@ -1046,6 +1059,19 @@ interface UseArcadeGameResult {
|
|
|
1046
1059
|
}
|
|
1047
1060
|
declare function useArcadeGame(poolId: number | null, maxLives?: number): UseArcadeGameResult;
|
|
1048
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
|
+
|
|
1049
1075
|
interface UserProfileCardProps {
|
|
1050
1076
|
walletAddress: string;
|
|
1051
1077
|
username?: string;
|
|
@@ -1235,6 +1261,16 @@ interface ClaimButtonProps {
|
|
|
1235
1261
|
*/
|
|
1236
1262
|
declare function ClaimButton({ gameId, style, onSuccess, onError }: ClaimButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1237
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
|
+
|
|
1238
1274
|
/**
|
|
1239
1275
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
1240
1276
|
* Prefers signAndSendTransaction if available (MWA), otherwise falls back to
|
|
@@ -1250,4 +1286,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1250
1286
|
*/
|
|
1251
1287
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1252
1288
|
|
|
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 };
|
|
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,17 @@ 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
|
+
}
|
|
403
414
|
interface ArcadePool {
|
|
404
415
|
id: number;
|
|
405
416
|
app_id: number;
|
|
@@ -552,6 +563,8 @@ declare class DubsClient {
|
|
|
552
563
|
pool: ArcadePool;
|
|
553
564
|
stats: ArcadePoolStats;
|
|
554
565
|
}>;
|
|
566
|
+
/** Build unsigned entry transaction for an arcade pool */
|
|
567
|
+
buildArcadeEntry(poolId: number, walletAddress: string): Promise<BuildArcadeEntryResult>;
|
|
555
568
|
enterArcadePool(poolId: number, params: {
|
|
556
569
|
walletAddress: string;
|
|
557
570
|
txSignature: string;
|
|
@@ -1046,6 +1059,19 @@ interface UseArcadeGameResult {
|
|
|
1046
1059
|
}
|
|
1047
1060
|
declare function useArcadeGame(poolId: number | null, maxLives?: number): UseArcadeGameResult;
|
|
1048
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
|
+
|
|
1049
1075
|
interface UserProfileCardProps {
|
|
1050
1076
|
walletAddress: string;
|
|
1051
1077
|
username?: string;
|
|
@@ -1235,6 +1261,16 @@ interface ClaimButtonProps {
|
|
|
1235
1261
|
*/
|
|
1236
1262
|
declare function ClaimButton({ gameId, style, onSuccess, onError }: ClaimButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1237
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
|
+
|
|
1238
1274
|
/**
|
|
1239
1275
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
1240
1276
|
* Prefers signAndSendTransaction if available (MWA), otherwise falls back to
|
|
@@ -1250,4 +1286,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1250
1286
|
*/
|
|
1251
1287
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1252
1288
|
|
|
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 };
|
|
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 };
|