@dubsdotapp/expo 0.2.5 → 0.2.6

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
@@ -89,6 +89,20 @@ interface CreateGameResult {
89
89
  lockTimestamp: number;
90
90
  event: UnifiedEvent;
91
91
  }
92
+ interface CreateCustomGameParams {
93
+ playerWallet: string;
94
+ teamChoice: 'home' | 'away';
95
+ wagerAmount: number;
96
+ title?: string;
97
+ maxPlayers?: number;
98
+ metadata?: Record<string, unknown>;
99
+ }
100
+ interface CreateCustomGameResult {
101
+ gameId: string;
102
+ gameAddress: string;
103
+ transaction: string;
104
+ lockTimestamp: number;
105
+ }
92
106
  interface JoinGameParams {
93
107
  playerWallet: string;
94
108
  gameId: string;
@@ -318,6 +332,8 @@ declare class DubsClient {
318
332
  createGame(params: CreateGameParams): Promise<CreateGameResult>;
319
333
  joinGame(params: JoinGameParams): Promise<JoinGameResult>;
320
334
  confirmGame(params: ConfirmGameParams): Promise<ConfirmGameResult>;
335
+ createCustomGame(params: CreateCustomGameParams): Promise<CreateCustomGameResult>;
336
+ confirmCustomGame(params: ConfirmGameParams): Promise<ConfirmGameResult>;
321
337
  buildClaimTransaction(params: BuildClaimParams): Promise<BuildClaimResult>;
322
338
  getGame(gameId: string): Promise<GameDetail>;
323
339
  getLiveScore(gameId: string): Promise<LiveScore | null>;
@@ -604,6 +620,20 @@ declare function useClaim(): {
604
620
  reset: () => void;
605
621
  };
606
622
 
623
+ interface CreateCustomGameMutationResult {
624
+ gameId: string;
625
+ gameAddress: string;
626
+ signature: string;
627
+ explorerUrl: string;
628
+ }
629
+ declare function useCreateCustomGame(): {
630
+ execute: (params: CreateCustomGameParams) => Promise<CreateCustomGameMutationResult>;
631
+ status: MutationStatus;
632
+ error: Error | null;
633
+ data: CreateCustomGameMutationResult | null;
634
+ reset: () => void;
635
+ };
636
+
607
637
  interface UseAuthResult {
608
638
  /** Current auth status */
609
639
  status: AuthStatus;
@@ -749,10 +779,23 @@ interface JoinGameButtonProps {
749
779
  */
750
780
  declare function JoinGameButton({ game, walletAddress, selectedTeam, status, onJoin }: JoinGameButtonProps): react_jsx_runtime.JSX.Element | null;
751
781
 
782
+ interface CreateCustomGameSheetProps {
783
+ visible: boolean;
784
+ onDismiss: () => void;
785
+ title?: string;
786
+ maxPlayers?: number;
787
+ fee?: number;
788
+ presetAmounts?: number[];
789
+ metadata?: Record<string, unknown>;
790
+ onSuccess?: (result: CreateCustomGameMutationResult) => void;
791
+ onError?: (error: Error) => void;
792
+ }
793
+ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, metadata, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
794
+
752
795
  /**
753
796
  * Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
754
797
  * Returns the transaction signature.
755
798
  */
756
799
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter): Promise<string>;
757
800
 
758
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, 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, 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, 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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
801
+ export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, 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, 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, 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, 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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
package/dist/index.d.ts CHANGED
@@ -89,6 +89,20 @@ interface CreateGameResult {
89
89
  lockTimestamp: number;
90
90
  event: UnifiedEvent;
91
91
  }
92
+ interface CreateCustomGameParams {
93
+ playerWallet: string;
94
+ teamChoice: 'home' | 'away';
95
+ wagerAmount: number;
96
+ title?: string;
97
+ maxPlayers?: number;
98
+ metadata?: Record<string, unknown>;
99
+ }
100
+ interface CreateCustomGameResult {
101
+ gameId: string;
102
+ gameAddress: string;
103
+ transaction: string;
104
+ lockTimestamp: number;
105
+ }
92
106
  interface JoinGameParams {
93
107
  playerWallet: string;
94
108
  gameId: string;
@@ -318,6 +332,8 @@ declare class DubsClient {
318
332
  createGame(params: CreateGameParams): Promise<CreateGameResult>;
319
333
  joinGame(params: JoinGameParams): Promise<JoinGameResult>;
320
334
  confirmGame(params: ConfirmGameParams): Promise<ConfirmGameResult>;
335
+ createCustomGame(params: CreateCustomGameParams): Promise<CreateCustomGameResult>;
336
+ confirmCustomGame(params: ConfirmGameParams): Promise<ConfirmGameResult>;
321
337
  buildClaimTransaction(params: BuildClaimParams): Promise<BuildClaimResult>;
322
338
  getGame(gameId: string): Promise<GameDetail>;
323
339
  getLiveScore(gameId: string): Promise<LiveScore | null>;
@@ -604,6 +620,20 @@ declare function useClaim(): {
604
620
  reset: () => void;
605
621
  };
606
622
 
623
+ interface CreateCustomGameMutationResult {
624
+ gameId: string;
625
+ gameAddress: string;
626
+ signature: string;
627
+ explorerUrl: string;
628
+ }
629
+ declare function useCreateCustomGame(): {
630
+ execute: (params: CreateCustomGameParams) => Promise<CreateCustomGameMutationResult>;
631
+ status: MutationStatus;
632
+ error: Error | null;
633
+ data: CreateCustomGameMutationResult | null;
634
+ reset: () => void;
635
+ };
636
+
607
637
  interface UseAuthResult {
608
638
  /** Current auth status */
609
639
  status: AuthStatus;
@@ -749,10 +779,23 @@ interface JoinGameButtonProps {
749
779
  */
750
780
  declare function JoinGameButton({ game, walletAddress, selectedTeam, status, onJoin }: JoinGameButtonProps): react_jsx_runtime.JSX.Element | null;
751
781
 
782
+ interface CreateCustomGameSheetProps {
783
+ visible: boolean;
784
+ onDismiss: () => void;
785
+ title?: string;
786
+ maxPlayers?: number;
787
+ fee?: number;
788
+ presetAmounts?: number[];
789
+ metadata?: Record<string, unknown>;
790
+ onSuccess?: (result: CreateCustomGameMutationResult) => void;
791
+ onError?: (error: Error) => void;
792
+ }
793
+ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, metadata, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
794
+
752
795
  /**
753
796
  * Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
754
797
  * Returns the transaction signature.
755
798
  */
756
799
  declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter): Promise<string>;
757
800
 
758
- export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, 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, 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, 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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
801
+ export { AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, type ClaimMutationResult, 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, 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, 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, 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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };