@dubsdotapp/expo 0.2.20 → 0.2.21
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 +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +270 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -7
- 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/types.ts +4 -0
- package/src/utils/device.ts +55 -0
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,23 @@ 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
|
+
declare function getDeviceInfo(): Promise<DeviceInfo>;
|
|
21
|
+
|
|
5
22
|
interface Opponent {
|
|
6
23
|
name: string | null;
|
|
7
24
|
imageUrl: string | null;
|
|
@@ -237,10 +254,12 @@ interface NonceResult {
|
|
|
237
254
|
nonce: string;
|
|
238
255
|
message: string;
|
|
239
256
|
}
|
|
257
|
+
|
|
240
258
|
interface AuthenticateParams {
|
|
241
259
|
walletAddress: string;
|
|
242
260
|
signature: string;
|
|
243
261
|
nonce: string;
|
|
262
|
+
deviceInfo?: DeviceInfo;
|
|
244
263
|
}
|
|
245
264
|
interface AuthenticateResult {
|
|
246
265
|
needsRegistration: boolean;
|
|
@@ -254,6 +273,7 @@ interface RegisterParams {
|
|
|
254
273
|
username: string;
|
|
255
274
|
referralCode?: string;
|
|
256
275
|
avatarUrl?: string;
|
|
276
|
+
deviceInfo?: DeviceInfo;
|
|
257
277
|
}
|
|
258
278
|
interface RegisterResult {
|
|
259
279
|
user: DubsUser;
|
|
@@ -869,4 +889,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
|
|
|
869
889
|
*/
|
|
870
890
|
declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
|
|
871
891
|
|
|
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 };
|
|
892
|
+
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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,23 @@ 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
|
+
declare function getDeviceInfo(): Promise<DeviceInfo>;
|
|
21
|
+
|
|
5
22
|
interface Opponent {
|
|
6
23
|
name: string | null;
|
|
7
24
|
imageUrl: string | null;
|
|
@@ -237,10 +254,12 @@ interface NonceResult {
|
|
|
237
254
|
nonce: string;
|
|
238
255
|
message: string;
|
|
239
256
|
}
|
|
257
|
+
|
|
240
258
|
interface AuthenticateParams {
|
|
241
259
|
walletAddress: string;
|
|
242
260
|
signature: string;
|
|
243
261
|
nonce: string;
|
|
262
|
+
deviceInfo?: DeviceInfo;
|
|
244
263
|
}
|
|
245
264
|
interface AuthenticateResult {
|
|
246
265
|
needsRegistration: boolean;
|
|
@@ -254,6 +273,7 @@ interface RegisterParams {
|
|
|
254
273
|
username: string;
|
|
255
274
|
referralCode?: string;
|
|
256
275
|
avatarUrl?: string;
|
|
276
|
+
deviceInfo?: DeviceInfo;
|
|
257
277
|
}
|
|
258
278
|
interface RegisterResult {
|
|
259
279
|
user: DubsUser;
|
|
@@ -869,4 +889,4 @@ declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers,
|
|
|
869
889
|
*/
|
|
870
890
|
declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAdapter, connection: Connection): Promise<string>;
|
|
871
891
|
|
|
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 };
|
|
892
|
+
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, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useJoinGame, useNetworkGames };
|