@dubsdotapp/expo 0.2.79 → 0.3.0
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 +62 -1
- package/dist/index.d.ts +62 -1
- package/dist/index.js +627 -302
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +654 -319
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +30 -0
- package/src/index.ts +5 -2
- package/src/types.ts +53 -0
- package/src/ui/DeveloperDashboardSheet.tsx +353 -0
- package/src/ui/index.ts +2 -0
package/dist/index.d.mts
CHANGED
|
@@ -400,6 +400,54 @@ interface UFCEvent {
|
|
|
400
400
|
date: string | null;
|
|
401
401
|
fights: UFCFight[];
|
|
402
402
|
}
|
|
403
|
+
interface DeveloperCommission {
|
|
404
|
+
id: number;
|
|
405
|
+
gameId: string;
|
|
406
|
+
/** Commission amount in lamports */
|
|
407
|
+
amount: number;
|
|
408
|
+
/** Commission amount in SOL */
|
|
409
|
+
amountSol: number;
|
|
410
|
+
status: 'pending' | 'paid' | 'cancelled';
|
|
411
|
+
createdAt: string;
|
|
412
|
+
paidAt: string | null;
|
|
413
|
+
txSignature: string | null;
|
|
414
|
+
gameType: string;
|
|
415
|
+
/** Total pot size in lamports */
|
|
416
|
+
potSize: number;
|
|
417
|
+
/** Total pot size in SOL */
|
|
418
|
+
potSizeSol: number;
|
|
419
|
+
appId?: number;
|
|
420
|
+
appName?: string;
|
|
421
|
+
}
|
|
422
|
+
interface DeveloperCommissionsSummary {
|
|
423
|
+
totalEarned: number;
|
|
424
|
+
totalEarnedSol: number;
|
|
425
|
+
totalPaid: number;
|
|
426
|
+
totalPaidSol: number;
|
|
427
|
+
totalPending: number;
|
|
428
|
+
totalPendingSol: number;
|
|
429
|
+
totalGames: number;
|
|
430
|
+
last7Days?: {
|
|
431
|
+
games: number;
|
|
432
|
+
earned: number;
|
|
433
|
+
earnedSol: number;
|
|
434
|
+
};
|
|
435
|
+
last30Days?: {
|
|
436
|
+
games: number;
|
|
437
|
+
earned: number;
|
|
438
|
+
earnedSol: number;
|
|
439
|
+
};
|
|
440
|
+
commissionWallet?: string;
|
|
441
|
+
}
|
|
442
|
+
interface DeveloperCommissionsResult {
|
|
443
|
+
commissions: DeveloperCommission[];
|
|
444
|
+
summary: DeveloperCommissionsSummary;
|
|
445
|
+
pagination: {
|
|
446
|
+
total: number;
|
|
447
|
+
limit: number;
|
|
448
|
+
offset: number;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
403
451
|
interface UiConfig {
|
|
404
452
|
accentColor?: string;
|
|
405
453
|
appIcon?: string;
|
|
@@ -485,6 +533,13 @@ declare class DubsClient {
|
|
|
485
533
|
getErrorCodesLocal(): Record<number, SolanaErrorCode>;
|
|
486
534
|
/** Fetch the app's UI customization config (accent color, icon, tagline, environment) */
|
|
487
535
|
getAppConfig(): Promise<UiConfig>;
|
|
536
|
+
/** Fetch paginated list of commission earnings for this app */
|
|
537
|
+
getCommissions(params?: {
|
|
538
|
+
limit?: number;
|
|
539
|
+
offset?: number;
|
|
540
|
+
}): Promise<DeveloperCommissionsResult>;
|
|
541
|
+
/** Fetch a quick summary of commission earnings for this app */
|
|
542
|
+
getCommissionsSummary(): Promise<DeveloperCommissionsSummary>;
|
|
488
543
|
}
|
|
489
544
|
|
|
490
545
|
declare class DubsApiError extends Error {
|
|
@@ -963,6 +1018,12 @@ interface UserProfileSheetProps {
|
|
|
963
1018
|
}
|
|
964
1019
|
declare function UserProfileSheet({ visible, onDismiss, user, onAvatarUpdated, onDisconnect, }: UserProfileSheetProps): react_jsx_runtime.JSX.Element;
|
|
965
1020
|
|
|
1021
|
+
interface DeveloperDashboardSheetProps {
|
|
1022
|
+
visible: boolean;
|
|
1023
|
+
onDismiss: () => void;
|
|
1024
|
+
}
|
|
1025
|
+
declare function DeveloperDashboardSheet({ visible, onDismiss }: DeveloperDashboardSheetProps): react_jsx_runtime.JSX.Element;
|
|
1026
|
+
|
|
966
1027
|
interface DubsTheme {
|
|
967
1028
|
background: string;
|
|
968
1029
|
surface: string;
|
|
@@ -1132,4 +1193,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1132
1193
|
*/
|
|
1133
1194
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1134
1195
|
|
|
1135
|
-
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 PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
|
1196
|
+
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 DeveloperCommission, type DeveloperCommissionsResult, type DeveloperCommissionsSummary, DeveloperDashboardSheet, type DeveloperDashboardSheetProps, 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 TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
package/dist/index.d.ts
CHANGED
|
@@ -400,6 +400,54 @@ interface UFCEvent {
|
|
|
400
400
|
date: string | null;
|
|
401
401
|
fights: UFCFight[];
|
|
402
402
|
}
|
|
403
|
+
interface DeveloperCommission {
|
|
404
|
+
id: number;
|
|
405
|
+
gameId: string;
|
|
406
|
+
/** Commission amount in lamports */
|
|
407
|
+
amount: number;
|
|
408
|
+
/** Commission amount in SOL */
|
|
409
|
+
amountSol: number;
|
|
410
|
+
status: 'pending' | 'paid' | 'cancelled';
|
|
411
|
+
createdAt: string;
|
|
412
|
+
paidAt: string | null;
|
|
413
|
+
txSignature: string | null;
|
|
414
|
+
gameType: string;
|
|
415
|
+
/** Total pot size in lamports */
|
|
416
|
+
potSize: number;
|
|
417
|
+
/** Total pot size in SOL */
|
|
418
|
+
potSizeSol: number;
|
|
419
|
+
appId?: number;
|
|
420
|
+
appName?: string;
|
|
421
|
+
}
|
|
422
|
+
interface DeveloperCommissionsSummary {
|
|
423
|
+
totalEarned: number;
|
|
424
|
+
totalEarnedSol: number;
|
|
425
|
+
totalPaid: number;
|
|
426
|
+
totalPaidSol: number;
|
|
427
|
+
totalPending: number;
|
|
428
|
+
totalPendingSol: number;
|
|
429
|
+
totalGames: number;
|
|
430
|
+
last7Days?: {
|
|
431
|
+
games: number;
|
|
432
|
+
earned: number;
|
|
433
|
+
earnedSol: number;
|
|
434
|
+
};
|
|
435
|
+
last30Days?: {
|
|
436
|
+
games: number;
|
|
437
|
+
earned: number;
|
|
438
|
+
earnedSol: number;
|
|
439
|
+
};
|
|
440
|
+
commissionWallet?: string;
|
|
441
|
+
}
|
|
442
|
+
interface DeveloperCommissionsResult {
|
|
443
|
+
commissions: DeveloperCommission[];
|
|
444
|
+
summary: DeveloperCommissionsSummary;
|
|
445
|
+
pagination: {
|
|
446
|
+
total: number;
|
|
447
|
+
limit: number;
|
|
448
|
+
offset: number;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
403
451
|
interface UiConfig {
|
|
404
452
|
accentColor?: string;
|
|
405
453
|
appIcon?: string;
|
|
@@ -485,6 +533,13 @@ declare class DubsClient {
|
|
|
485
533
|
getErrorCodesLocal(): Record<number, SolanaErrorCode>;
|
|
486
534
|
/** Fetch the app's UI customization config (accent color, icon, tagline, environment) */
|
|
487
535
|
getAppConfig(): Promise<UiConfig>;
|
|
536
|
+
/** Fetch paginated list of commission earnings for this app */
|
|
537
|
+
getCommissions(params?: {
|
|
538
|
+
limit?: number;
|
|
539
|
+
offset?: number;
|
|
540
|
+
}): Promise<DeveloperCommissionsResult>;
|
|
541
|
+
/** Fetch a quick summary of commission earnings for this app */
|
|
542
|
+
getCommissionsSummary(): Promise<DeveloperCommissionsSummary>;
|
|
488
543
|
}
|
|
489
544
|
|
|
490
545
|
declare class DubsApiError extends Error {
|
|
@@ -963,6 +1018,12 @@ interface UserProfileSheetProps {
|
|
|
963
1018
|
}
|
|
964
1019
|
declare function UserProfileSheet({ visible, onDismiss, user, onAvatarUpdated, onDisconnect, }: UserProfileSheetProps): react_jsx_runtime.JSX.Element;
|
|
965
1020
|
|
|
1021
|
+
interface DeveloperDashboardSheetProps {
|
|
1022
|
+
visible: boolean;
|
|
1023
|
+
onDismiss: () => void;
|
|
1024
|
+
}
|
|
1025
|
+
declare function DeveloperDashboardSheet({ visible, onDismiss }: DeveloperDashboardSheetProps): react_jsx_runtime.JSX.Element;
|
|
1026
|
+
|
|
966
1027
|
interface DubsTheme {
|
|
967
1028
|
background: string;
|
|
968
1029
|
surface: string;
|
|
@@ -1132,4 +1193,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1132
1193
|
*/
|
|
1133
1194
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1134
1195
|
|
|
1135
|
-
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 PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
|
1196
|
+
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 DeveloperCommission, type DeveloperCommissionsResult, type DeveloperCommissionsSummary, DeveloperDashboardSheet, type DeveloperDashboardSheetProps, 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 TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|