@dubsdotapp/expo 0.2.20 → 0.2.22
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 +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +300 -245
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +63 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -2
- package/src/hooks/useAuth.ts +10 -3
- package/src/index.ts +2 -0
- package/src/managed-wallet.tsx +6 -4
- package/src/types.ts +4 -0
- package/src/utils/device.ts +68 -0
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,28 @@ 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
4
|
|
|
5
|
+
interface DeviceInfo {
|
|
6
|
+
platform: string;
|
|
7
|
+
modelName: string | null;
|
|
8
|
+
brand: string | null;
|
|
9
|
+
manufacturer: string | null;
|
|
10
|
+
osName: string | null;
|
|
11
|
+
osVersion: string | null;
|
|
12
|
+
deviceType: number | null;
|
|
13
|
+
deviceName: string | null;
|
|
14
|
+
totalMemory: number | null;
|
|
15
|
+
modelId: string | null;
|
|
16
|
+
designName: string | null;
|
|
17
|
+
productName: string | null;
|
|
18
|
+
isDevice: boolean | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Detect Solana Seeker device (synchronous — safe to call during render).
|
|
22
|
+
* Checks brand from expo-device; returns false if expo-device isn't installed.
|
|
23
|
+
*/
|
|
24
|
+
declare function isSolanaSeeker(): boolean;
|
|
25
|
+
declare function getDeviceInfo(): Promise<DeviceInfo>;
|
|
26
|
+
|
|
5
27
|
interface Opponent {
|
|
6
28
|
name: string | null;
|
|
7
29
|
imageUrl: string | null;
|
|
@@ -237,10 +259,12 @@ interface NonceResult {
|
|
|
237
259
|
nonce: string;
|
|
238
260
|
message: string;
|
|
239
261
|
}
|
|
262
|
+
|
|
240
263
|
interface AuthenticateParams {
|
|
241
264
|
walletAddress: string;
|
|
242
265
|
signature: string;
|
|
243
266
|
nonce: string;
|
|
267
|
+
deviceInfo?: DeviceInfo;
|
|
244
268
|
}
|
|
245
269
|
interface AuthenticateResult {
|
|
246
270
|
needsRegistration: boolean;
|
|
@@ -254,6 +278,7 @@ interface RegisterParams {
|
|
|
254
278
|
username: string;
|
|
255
279
|
referralCode?: string;
|
|
256
280
|
avatarUrl?: string;
|
|
281
|
+
deviceInfo?: DeviceInfo;
|
|
257
282
|
}
|
|
258
283
|
interface RegisterResult {
|
|
259
284
|
user: DubsUser;
|
|
@@ -869,4 +894,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
|
|
|
869
894
|
*/
|
|
870
895
|
declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
|
|
871
896
|
|
|
872
|
-
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, 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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
|
|
897
|
+
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, 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, 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, useJoinGame, useNetworkGames };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,28 @@ 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
4
|
|
|
5
|
+
interface DeviceInfo {
|
|
6
|
+
platform: string;
|
|
7
|
+
modelName: string | null;
|
|
8
|
+
brand: string | null;
|
|
9
|
+
manufacturer: string | null;
|
|
10
|
+
osName: string | null;
|
|
11
|
+
osVersion: string | null;
|
|
12
|
+
deviceType: number | null;
|
|
13
|
+
deviceName: string | null;
|
|
14
|
+
totalMemory: number | null;
|
|
15
|
+
modelId: string | null;
|
|
16
|
+
designName: string | null;
|
|
17
|
+
productName: string | null;
|
|
18
|
+
isDevice: boolean | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Detect Solana Seeker device (synchronous — safe to call during render).
|
|
22
|
+
* Checks brand from expo-device; returns false if expo-device isn't installed.
|
|
23
|
+
*/
|
|
24
|
+
declare function isSolanaSeeker(): boolean;
|
|
25
|
+
declare function getDeviceInfo(): Promise<DeviceInfo>;
|
|
26
|
+
|
|
5
27
|
interface Opponent {
|
|
6
28
|
name: string | null;
|
|
7
29
|
imageUrl: string | null;
|
|
@@ -237,10 +259,12 @@ interface NonceResult {
|
|
|
237
259
|
nonce: string;
|
|
238
260
|
message: string;
|
|
239
261
|
}
|
|
262
|
+
|
|
240
263
|
interface AuthenticateParams {
|
|
241
264
|
walletAddress: string;
|
|
242
265
|
signature: string;
|
|
243
266
|
nonce: string;
|
|
267
|
+
deviceInfo?: DeviceInfo;
|
|
244
268
|
}
|
|
245
269
|
interface AuthenticateResult {
|
|
246
270
|
needsRegistration: boolean;
|
|
@@ -254,6 +278,7 @@ interface RegisterParams {
|
|
|
254
278
|
username: string;
|
|
255
279
|
referralCode?: string;
|
|
256
280
|
avatarUrl?: string;
|
|
281
|
+
deviceInfo?: DeviceInfo;
|
|
257
282
|
}
|
|
258
283
|
interface RegisterResult {
|
|
259
284
|
user: DubsUser;
|
|
@@ -869,4 +894,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
|
|
|
869
894
|
*/
|
|
870
895
|
declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
|
|
871
896
|
|
|
872
|
-
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, 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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
|
|
897
|
+
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, 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, 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, useJoinGame, useNetworkGames };
|