@lumiapassport/ui-kit 1.14.23 → 1.14.25
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +2033 -1787
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +97 -2
- package/dist/index.d.ts +97 -2
- package/dist/index.js +2000 -1756
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -779,7 +779,8 @@ declare enum PageKey {
|
|
|
779
779
|
UNLINK_PROVIDER = "unlink-provider",
|
|
780
780
|
SECURITY = "security",
|
|
781
781
|
KEYSARE_BACKUP = "keysare-backup",
|
|
782
|
-
KEYSHARE_RESTORE = "keyshare-restore"
|
|
782
|
+
KEYSHARE_RESTORE = "keyshare-restore",
|
|
783
|
+
NICKNAME_SETTINGS = "nickname-settings"
|
|
783
784
|
}
|
|
784
785
|
/** WIP: need to develop page options typeset, i.e options: AuthOpenOptions | BuyOpenOption etc */
|
|
785
786
|
interface PageOpenParams {
|
|
@@ -984,6 +985,95 @@ interface UseLogoutReturn {
|
|
|
984
985
|
*/
|
|
985
986
|
declare function useLogout(): UseLogoutReturn;
|
|
986
987
|
|
|
988
|
+
/**
|
|
989
|
+
* Nickname API types
|
|
990
|
+
* Types for nickname-related API responses and requests
|
|
991
|
+
*/
|
|
992
|
+
/**
|
|
993
|
+
* Detailed nickname information
|
|
994
|
+
* Returned by GET /api/auth/nickname
|
|
995
|
+
*/
|
|
996
|
+
interface NicknameInfo {
|
|
997
|
+
handle: string;
|
|
998
|
+
displayHandle: string;
|
|
999
|
+
createdAt: string;
|
|
1000
|
+
changedAt: string | null;
|
|
1001
|
+
changeCount: number;
|
|
1002
|
+
canChange: boolean;
|
|
1003
|
+
cooldownEndsAt: string | null;
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* Result of changing nickname
|
|
1007
|
+
* Returned by PUT /api/auth/nickname
|
|
1008
|
+
*/
|
|
1009
|
+
interface NicknameChangeResult {
|
|
1010
|
+
handle: string;
|
|
1011
|
+
displayHandle: string;
|
|
1012
|
+
previousHandle: string;
|
|
1013
|
+
isFirstChange: boolean;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Nickname availability check result
|
|
1017
|
+
* Returned by GET /api/auth/nicknames/{handle}/check
|
|
1018
|
+
*/
|
|
1019
|
+
interface NicknameAvailability {
|
|
1020
|
+
handle: string;
|
|
1021
|
+
available: boolean;
|
|
1022
|
+
reason?: NicknameUnavailableReason;
|
|
1023
|
+
}
|
|
1024
|
+
type NicknameUnavailableReason = 'TAKEN' | 'RESERVED' | 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_CHARS' | 'INVALID_UNDERSCORE';
|
|
1025
|
+
/**
|
|
1026
|
+
* Nickname to wallet address resolution
|
|
1027
|
+
* Returned by GET /api/auth/nicknames/{handle}/resolve
|
|
1028
|
+
*/
|
|
1029
|
+
interface NicknameResolution {
|
|
1030
|
+
handle: string;
|
|
1031
|
+
displayHandle: string;
|
|
1032
|
+
walletAddress: `0x${string}`;
|
|
1033
|
+
ownerAddress: `0x${string}`;
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Client-side nickname validation result
|
|
1037
|
+
*/
|
|
1038
|
+
interface NicknameValidationResult {
|
|
1039
|
+
valid: boolean;
|
|
1040
|
+
error?: NicknameValidationError;
|
|
1041
|
+
}
|
|
1042
|
+
type NicknameValidationError = 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_CHARS' | 'INVALID_UNDERSCORE';
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* useNicknameResolve hook
|
|
1046
|
+
* Public hook for resolving nicknames to wallet addresses
|
|
1047
|
+
*/
|
|
1048
|
+
|
|
1049
|
+
interface UseNicknameResolveResult {
|
|
1050
|
+
data: NicknameResolution | undefined;
|
|
1051
|
+
isLoading: boolean;
|
|
1052
|
+
isResolving: boolean;
|
|
1053
|
+
isError: boolean;
|
|
1054
|
+
isNotFound: boolean;
|
|
1055
|
+
error: Error | null;
|
|
1056
|
+
resolvedAddress: string | null;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Detect if input looks like a nickname (vs an address)
|
|
1060
|
+
* - Starts with @ or contains only lowercase a-z, 0-9, underscore
|
|
1061
|
+
* - Does not start with 0x
|
|
1062
|
+
*/
|
|
1063
|
+
declare function looksLikeNickname(input: string): boolean;
|
|
1064
|
+
/**
|
|
1065
|
+
* Hook to resolve a nickname to a wallet address
|
|
1066
|
+
*
|
|
1067
|
+
* - Debounces API calls by 300ms
|
|
1068
|
+
* - Only resolves when input looks like a nickname
|
|
1069
|
+
* - Returns resolved address when found
|
|
1070
|
+
*
|
|
1071
|
+
* @param input - The recipient input (can be address or nickname)
|
|
1072
|
+
* @param enabled - Whether resolution should be enabled (default: true)
|
|
1073
|
+
* @returns Resolution data, loading states, error state, resolved address
|
|
1074
|
+
*/
|
|
1075
|
+
declare function useNicknameResolve(input: string, enabled?: boolean): UseNicknameResolveResult;
|
|
1076
|
+
|
|
987
1077
|
declare const LUMIA_EXPLORER_URL: string;
|
|
988
1078
|
declare const lumiaBeam: Chain;
|
|
989
1079
|
|
|
@@ -1016,6 +1106,7 @@ interface ProviderDetail {
|
|
|
1016
1106
|
}
|
|
1017
1107
|
/**
|
|
1018
1108
|
* User profile information
|
|
1109
|
+
* Extended to include nickname fields from backend
|
|
1019
1110
|
*/
|
|
1020
1111
|
interface UserProfile {
|
|
1021
1112
|
userId: string;
|
|
@@ -1029,6 +1120,10 @@ interface UserProfile {
|
|
|
1029
1120
|
provider: 'sumsub' | 'uaepass' | 'custom';
|
|
1030
1121
|
kycStatus: string;
|
|
1031
1122
|
} | null;
|
|
1123
|
+
nickname: string | null;
|
|
1124
|
+
nicknameDisplay: string | null;
|
|
1125
|
+
nicknameCanChange: boolean;
|
|
1126
|
+
nicknameCooldownEndsAt: string | null;
|
|
1032
1127
|
}
|
|
1033
1128
|
interface UpdateProfileRequest {
|
|
1034
1129
|
displayName?: string;
|
|
@@ -1401,4 +1496,4 @@ declare function useLumiaPassportLinkedProfiles(): {
|
|
|
1401
1496
|
refresh: () => Promise<void>;
|
|
1402
1497
|
};
|
|
1403
1498
|
|
|
1404
|
-
export { type AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, ErrorCodes, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportError, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, LumiaRainbowKitProvider, LumiaWagmiProvider, PageKey, type PageOpenParams, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TypedDataDomain, type TypedDataField, type UpdateProfileRequest, type UseLogoutReturn, type UseSendTransactionReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UserOpMempool, type UserOpReceipt, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserProfile, UserRejectedError, type WalletReadyStatus, createLumiaPassportError, deployAccount, destroyIframeManager, getIframeManager, getUserProfile, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportAccountSession, useLumiaPassportAddress, useLumiaPassportBalance, useLumiaPassportColorMode, useLumiaPassportConfig, useLumiaPassportError, useLumiaPassportHasServerVault, useLumiaPassportIFrameReady, useLumiaPassportIsMobileView, useLumiaPassportLinkedProfiles, useLumiaPassportLoadingStatus, useLumiaPassportOpen, useLumiaPassportRecoveryUserId, useLumiaPassportSession, useSendTransaction, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|
|
1499
|
+
export { type AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, ErrorCodes, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportError, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, LumiaRainbowKitProvider, LumiaWagmiProvider, type NicknameAvailability, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameValidationResult, PageKey, type PageOpenParams, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TypedDataDomain, type TypedDataField, type UpdateProfileRequest, type UseLogoutReturn, type UseNicknameResolveResult, type UseSendTransactionReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UserOpMempool, type UserOpReceipt, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserProfile, UserRejectedError, type WalletReadyStatus, createLumiaPassportError, deployAccount, destroyIframeManager, getIframeManager, getUserProfile, looksLikeNickname, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportAccountSession, useLumiaPassportAddress, useLumiaPassportBalance, useLumiaPassportColorMode, useLumiaPassportConfig, useLumiaPassportError, useLumiaPassportHasServerVault, useLumiaPassportIFrameReady, useLumiaPassportIsMobileView, useLumiaPassportLinkedProfiles, useLumiaPassportLoadingStatus, useLumiaPassportOpen, useLumiaPassportRecoveryUserId, useLumiaPassportSession, useNicknameResolve, useSendTransaction, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -779,7 +779,8 @@ declare enum PageKey {
|
|
|
779
779
|
UNLINK_PROVIDER = "unlink-provider",
|
|
780
780
|
SECURITY = "security",
|
|
781
781
|
KEYSARE_BACKUP = "keysare-backup",
|
|
782
|
-
KEYSHARE_RESTORE = "keyshare-restore"
|
|
782
|
+
KEYSHARE_RESTORE = "keyshare-restore",
|
|
783
|
+
NICKNAME_SETTINGS = "nickname-settings"
|
|
783
784
|
}
|
|
784
785
|
/** WIP: need to develop page options typeset, i.e options: AuthOpenOptions | BuyOpenOption etc */
|
|
785
786
|
interface PageOpenParams {
|
|
@@ -984,6 +985,95 @@ interface UseLogoutReturn {
|
|
|
984
985
|
*/
|
|
985
986
|
declare function useLogout(): UseLogoutReturn;
|
|
986
987
|
|
|
988
|
+
/**
|
|
989
|
+
* Nickname API types
|
|
990
|
+
* Types for nickname-related API responses and requests
|
|
991
|
+
*/
|
|
992
|
+
/**
|
|
993
|
+
* Detailed nickname information
|
|
994
|
+
* Returned by GET /api/auth/nickname
|
|
995
|
+
*/
|
|
996
|
+
interface NicknameInfo {
|
|
997
|
+
handle: string;
|
|
998
|
+
displayHandle: string;
|
|
999
|
+
createdAt: string;
|
|
1000
|
+
changedAt: string | null;
|
|
1001
|
+
changeCount: number;
|
|
1002
|
+
canChange: boolean;
|
|
1003
|
+
cooldownEndsAt: string | null;
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* Result of changing nickname
|
|
1007
|
+
* Returned by PUT /api/auth/nickname
|
|
1008
|
+
*/
|
|
1009
|
+
interface NicknameChangeResult {
|
|
1010
|
+
handle: string;
|
|
1011
|
+
displayHandle: string;
|
|
1012
|
+
previousHandle: string;
|
|
1013
|
+
isFirstChange: boolean;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Nickname availability check result
|
|
1017
|
+
* Returned by GET /api/auth/nicknames/{handle}/check
|
|
1018
|
+
*/
|
|
1019
|
+
interface NicknameAvailability {
|
|
1020
|
+
handle: string;
|
|
1021
|
+
available: boolean;
|
|
1022
|
+
reason?: NicknameUnavailableReason;
|
|
1023
|
+
}
|
|
1024
|
+
type NicknameUnavailableReason = 'TAKEN' | 'RESERVED' | 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_CHARS' | 'INVALID_UNDERSCORE';
|
|
1025
|
+
/**
|
|
1026
|
+
* Nickname to wallet address resolution
|
|
1027
|
+
* Returned by GET /api/auth/nicknames/{handle}/resolve
|
|
1028
|
+
*/
|
|
1029
|
+
interface NicknameResolution {
|
|
1030
|
+
handle: string;
|
|
1031
|
+
displayHandle: string;
|
|
1032
|
+
walletAddress: `0x${string}`;
|
|
1033
|
+
ownerAddress: `0x${string}`;
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Client-side nickname validation result
|
|
1037
|
+
*/
|
|
1038
|
+
interface NicknameValidationResult {
|
|
1039
|
+
valid: boolean;
|
|
1040
|
+
error?: NicknameValidationError;
|
|
1041
|
+
}
|
|
1042
|
+
type NicknameValidationError = 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_CHARS' | 'INVALID_UNDERSCORE';
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* useNicknameResolve hook
|
|
1046
|
+
* Public hook for resolving nicknames to wallet addresses
|
|
1047
|
+
*/
|
|
1048
|
+
|
|
1049
|
+
interface UseNicknameResolveResult {
|
|
1050
|
+
data: NicknameResolution | undefined;
|
|
1051
|
+
isLoading: boolean;
|
|
1052
|
+
isResolving: boolean;
|
|
1053
|
+
isError: boolean;
|
|
1054
|
+
isNotFound: boolean;
|
|
1055
|
+
error: Error | null;
|
|
1056
|
+
resolvedAddress: string | null;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Detect if input looks like a nickname (vs an address)
|
|
1060
|
+
* - Starts with @ or contains only lowercase a-z, 0-9, underscore
|
|
1061
|
+
* - Does not start with 0x
|
|
1062
|
+
*/
|
|
1063
|
+
declare function looksLikeNickname(input: string): boolean;
|
|
1064
|
+
/**
|
|
1065
|
+
* Hook to resolve a nickname to a wallet address
|
|
1066
|
+
*
|
|
1067
|
+
* - Debounces API calls by 300ms
|
|
1068
|
+
* - Only resolves when input looks like a nickname
|
|
1069
|
+
* - Returns resolved address when found
|
|
1070
|
+
*
|
|
1071
|
+
* @param input - The recipient input (can be address or nickname)
|
|
1072
|
+
* @param enabled - Whether resolution should be enabled (default: true)
|
|
1073
|
+
* @returns Resolution data, loading states, error state, resolved address
|
|
1074
|
+
*/
|
|
1075
|
+
declare function useNicknameResolve(input: string, enabled?: boolean): UseNicknameResolveResult;
|
|
1076
|
+
|
|
987
1077
|
declare const LUMIA_EXPLORER_URL: string;
|
|
988
1078
|
declare const lumiaBeam: Chain;
|
|
989
1079
|
|
|
@@ -1016,6 +1106,7 @@ interface ProviderDetail {
|
|
|
1016
1106
|
}
|
|
1017
1107
|
/**
|
|
1018
1108
|
* User profile information
|
|
1109
|
+
* Extended to include nickname fields from backend
|
|
1019
1110
|
*/
|
|
1020
1111
|
interface UserProfile {
|
|
1021
1112
|
userId: string;
|
|
@@ -1029,6 +1120,10 @@ interface UserProfile {
|
|
|
1029
1120
|
provider: 'sumsub' | 'uaepass' | 'custom';
|
|
1030
1121
|
kycStatus: string;
|
|
1031
1122
|
} | null;
|
|
1123
|
+
nickname: string | null;
|
|
1124
|
+
nicknameDisplay: string | null;
|
|
1125
|
+
nicknameCanChange: boolean;
|
|
1126
|
+
nicknameCooldownEndsAt: string | null;
|
|
1032
1127
|
}
|
|
1033
1128
|
interface UpdateProfileRequest {
|
|
1034
1129
|
displayName?: string;
|
|
@@ -1401,4 +1496,4 @@ declare function useLumiaPassportLinkedProfiles(): {
|
|
|
1401
1496
|
refresh: () => Promise<void>;
|
|
1402
1497
|
};
|
|
1403
1498
|
|
|
1404
|
-
export { type AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, ErrorCodes, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportError, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, LumiaRainbowKitProvider, LumiaWagmiProvider, PageKey, type PageOpenParams, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TypedDataDomain, type TypedDataField, type UpdateProfileRequest, type UseLogoutReturn, type UseSendTransactionReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UserOpMempool, type UserOpReceipt, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserProfile, UserRejectedError, type WalletReadyStatus, createLumiaPassportError, deployAccount, destroyIframeManager, getIframeManager, getUserProfile, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportAccountSession, useLumiaPassportAddress, useLumiaPassportBalance, useLumiaPassportColorMode, useLumiaPassportConfig, useLumiaPassportError, useLumiaPassportHasServerVault, useLumiaPassportIFrameReady, useLumiaPassportIsMobileView, useLumiaPassportLinkedProfiles, useLumiaPassportLoadingStatus, useLumiaPassportOpen, useLumiaPassportRecoveryUserId, useLumiaPassportSession, useSendTransaction, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|
|
1499
|
+
export { type AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, ErrorCodes, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportError, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, LumiaRainbowKitProvider, LumiaWagmiProvider, type NicknameAvailability, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameValidationResult, PageKey, type PageOpenParams, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TypedDataDomain, type TypedDataField, type UpdateProfileRequest, type UseLogoutReturn, type UseNicknameResolveResult, type UseSendTransactionReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UserOpMempool, type UserOpReceipt, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserProfile, UserRejectedError, type WalletReadyStatus, createLumiaPassportError, deployAccount, destroyIframeManager, getIframeManager, getUserProfile, looksLikeNickname, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportAccountSession, useLumiaPassportAddress, useLumiaPassportBalance, useLumiaPassportColorMode, useLumiaPassportConfig, useLumiaPassportError, useLumiaPassportHasServerVault, useLumiaPassportIFrameReady, useLumiaPassportIsMobileView, useLumiaPassportLinkedProfiles, useLumiaPassportLoadingStatus, useLumiaPassportOpen, useLumiaPassportRecoveryUserId, useLumiaPassportSession, useNicknameResolve, useSendTransaction, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|