@dubsdotapp/expo 0.2.40 → 0.2.42
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 +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +337 -219
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +178 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/provider.tsx +50 -38
- package/src/ui/game/ClaimButton.tsx +128 -0
- package/src/ui/game/ClaimPrizeSheet.tsx +1 -1
- package/src/ui/game/JoinGameButton.tsx +1 -1
- package/src/ui/game/index.ts +2 -0
- package/src/ui/index.ts +2 -1
- package/src/ui/theme.ts +9 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React$1 from 'react';
|
|
3
3
|
import { PublicKey, Transaction, Connection } from '@solana/web3.js';
|
|
4
|
+
import { ViewStyle } from 'react-native';
|
|
4
5
|
|
|
5
6
|
interface DeviceInfo {
|
|
6
7
|
platform: string;
|
|
@@ -974,6 +975,20 @@ interface ClaimPrizeSheetProps {
|
|
|
974
975
|
}
|
|
975
976
|
declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, isRefund, onSuccess, onError, }: ClaimPrizeSheetProps): react_jsx_runtime.JSX.Element;
|
|
976
977
|
|
|
978
|
+
interface ClaimButtonProps {
|
|
979
|
+
gameId: string;
|
|
980
|
+
style?: ViewStyle;
|
|
981
|
+
onSuccess?: (result: ClaimMutationResult) => void;
|
|
982
|
+
onError?: (error: Error) => void;
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* Drop-in claim button that handles eligibility checks, prize/refund display,
|
|
986
|
+
* and the claim sheet lifecycle internally.
|
|
987
|
+
*
|
|
988
|
+
* Renders nothing when the user is ineligible (lost, not resolved, not a bettor, etc.).
|
|
989
|
+
*/
|
|
990
|
+
declare function ClaimButton({ gameId, style, onSuccess, onError }: ClaimButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
991
|
+
|
|
977
992
|
/**
|
|
978
993
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
979
994
|
* Prefers signAndSendTransaction if available (MWA), otherwise falls back to
|
|
@@ -982,4 +997,4 @@ declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, isRe
|
|
|
982
997
|
*/
|
|
983
998
|
declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
|
|
984
999
|
|
|
985
|
-
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 };
|
|
1000
|
+
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 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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React$1 from 'react';
|
|
3
3
|
import { PublicKey, Transaction, Connection } from '@solana/web3.js';
|
|
4
|
+
import { ViewStyle } from 'react-native';
|
|
4
5
|
|
|
5
6
|
interface DeviceInfo {
|
|
6
7
|
platform: string;
|
|
@@ -974,6 +975,20 @@ interface ClaimPrizeSheetProps {
|
|
|
974
975
|
}
|
|
975
976
|
declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, isRefund, onSuccess, onError, }: ClaimPrizeSheetProps): react_jsx_runtime.JSX.Element;
|
|
976
977
|
|
|
978
|
+
interface ClaimButtonProps {
|
|
979
|
+
gameId: string;
|
|
980
|
+
style?: ViewStyle;
|
|
981
|
+
onSuccess?: (result: ClaimMutationResult) => void;
|
|
982
|
+
onError?: (error: Error) => void;
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* Drop-in claim button that handles eligibility checks, prize/refund display,
|
|
986
|
+
* and the claim sheet lifecycle internally.
|
|
987
|
+
*
|
|
988
|
+
* Renders nothing when the user is ineligible (lost, not resolved, not a bettor, etc.).
|
|
989
|
+
*/
|
|
990
|
+
declare function ClaimButton({ gameId, style, onSuccess, onError }: ClaimButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
991
|
+
|
|
977
992
|
/**
|
|
978
993
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
979
994
|
* Prefers signAndSendTransaction if available (MWA), otherwise falls back to
|
|
@@ -982,4 +997,4 @@ declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, isRe
|
|
|
982
997
|
*/
|
|
983
998
|
declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
|
|
984
999
|
|
|
985
|
-
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 };
|
|
1000
|
+
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 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 };
|