@lumiapassport/ui-kit 1.9.3 → 1.10.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/iframe/_headers +4 -1
- package/dist/iframe/index.html +2 -2
- package/dist/iframe/main.js +1 -1
- package/dist/iframe/oauth/telegram.html +128 -0
- package/dist/iframe/oauth/telegram.js +112 -0
- package/dist/index.cjs +3851 -3542
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -4
- package/dist/index.d.ts +227 -4
- package/dist/index.js +3799 -3454
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import { UserOperationV07, UserOperationV06 } from '@lumiapassport/core/bundler';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as viem from 'viem';
|
|
6
|
-
import { Chain, Hash as Hash$1, TransactionReceipt } from 'viem';
|
|
6
|
+
import { Chain, Hash as Hash$1, TransactionReceipt, Address as Address$1, Hex } from 'viem';
|
|
7
7
|
export { JwtTokens, LoginResponse, VerifyResponse, getValidTokens, jwtTokenManager, logout } from '@lumiapassport/core/auth';
|
|
8
8
|
import * as wagmi from 'wagmi';
|
|
9
9
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -633,7 +633,7 @@ declare const wagmiConfig: wagmi.Config<readonly [viem.Chain], {
|
|
|
633
633
|
[lumiaBeam.id]: viem.HttpTransport<undefined, false>;
|
|
634
634
|
}, readonly wagmi.CreateConnectorFn[]>;
|
|
635
635
|
|
|
636
|
-
interface Transaction {
|
|
636
|
+
interface Transaction$1 {
|
|
637
637
|
hash: Hash$1;
|
|
638
638
|
from: string;
|
|
639
639
|
to: string | null;
|
|
@@ -782,7 +782,7 @@ declare function useTransactions(): {
|
|
|
782
782
|
transactionIndex: number;
|
|
783
783
|
}>;
|
|
784
784
|
getTransactionReceipt: (hash: Hash$1) => Promise<TransactionReceipt>;
|
|
785
|
-
getTransactionHistory: (address: `0x${string}`, limit?: number) => Promise<Transaction[]>;
|
|
785
|
+
getTransactionHistory: (address: `0x${string}`, limit?: number) => Promise<Transaction$1[]>;
|
|
786
786
|
address: `0x${string}`;
|
|
787
787
|
isConnected: boolean;
|
|
788
788
|
};
|
|
@@ -1013,6 +1013,24 @@ declare function useLumiaPassportLinkedProfiles(): {
|
|
|
1013
1013
|
* Implements postMessage protocol with HMAC authentication and replay protection
|
|
1014
1014
|
*/
|
|
1015
1015
|
|
|
1016
|
+
interface Transaction {
|
|
1017
|
+
to: Address$1;
|
|
1018
|
+
value: string;
|
|
1019
|
+
data?: Hex;
|
|
1020
|
+
gasLimit?: string;
|
|
1021
|
+
}
|
|
1022
|
+
interface IframeManagerConfig {
|
|
1023
|
+
iframeUrl: string;
|
|
1024
|
+
projectId: string;
|
|
1025
|
+
debug?: boolean;
|
|
1026
|
+
onWalletReady?: (status: WalletReadyStatus) => void;
|
|
1027
|
+
themeColors?: {
|
|
1028
|
+
background?: string;
|
|
1029
|
+
text?: string;
|
|
1030
|
+
textSecondary?: string;
|
|
1031
|
+
border?: string;
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1016
1034
|
interface WalletReadyStatus {
|
|
1017
1035
|
ready: boolean;
|
|
1018
1036
|
userId?: string;
|
|
@@ -1021,5 +1039,210 @@ interface WalletReadyStatus {
|
|
|
1021
1039
|
hasSession: boolean;
|
|
1022
1040
|
timestamp: number;
|
|
1023
1041
|
}
|
|
1042
|
+
declare class IframeManager {
|
|
1043
|
+
private iframe;
|
|
1044
|
+
private iframeUrl;
|
|
1045
|
+
private projectId;
|
|
1046
|
+
private debug;
|
|
1047
|
+
private sessionToken;
|
|
1048
|
+
private isReady;
|
|
1049
|
+
private readyPromise;
|
|
1050
|
+
private readyResolve;
|
|
1051
|
+
private onWalletReadyCallback?;
|
|
1052
|
+
private themeColors?;
|
|
1053
|
+
private pendingRequests;
|
|
1054
|
+
private usedNonces;
|
|
1055
|
+
private messageListener;
|
|
1056
|
+
private readonly REQUEST_TIMEOUT;
|
|
1057
|
+
private readonly NONCE_EXPIRY;
|
|
1058
|
+
constructor(config: IframeManagerConfig);
|
|
1059
|
+
/**
|
|
1060
|
+
* Initialize iframe and wait for it to be ready
|
|
1061
|
+
*/
|
|
1062
|
+
initialize(): Promise<void>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Set the onWalletReady callback
|
|
1065
|
+
*/
|
|
1066
|
+
setOnWalletReady(callback: (status: WalletReadyStatus) => void): void;
|
|
1067
|
+
/**
|
|
1068
|
+
* Authenticate SDK with iframe to establish session
|
|
1069
|
+
*/
|
|
1070
|
+
private authenticateSDK;
|
|
1071
|
+
/**
|
|
1072
|
+
* Handle incoming postMessage events
|
|
1073
|
+
*/
|
|
1074
|
+
private handleMessage;
|
|
1075
|
+
/**
|
|
1076
|
+
* Handle token refresh request from iframe
|
|
1077
|
+
*/
|
|
1078
|
+
private handleTokenRefreshRequest;
|
|
1079
|
+
/**
|
|
1080
|
+
* Send secure message to iframe
|
|
1081
|
+
*/
|
|
1082
|
+
private sendMessage;
|
|
1083
|
+
/**
|
|
1084
|
+
* Compute HMAC for message authentication
|
|
1085
|
+
*/
|
|
1086
|
+
private computeHMAC;
|
|
1087
|
+
/**
|
|
1088
|
+
* Generate unique message ID
|
|
1089
|
+
*/
|
|
1090
|
+
private generateMessageId;
|
|
1091
|
+
/**
|
|
1092
|
+
* Generate nonce for replay protection
|
|
1093
|
+
*/
|
|
1094
|
+
private generateNonce;
|
|
1095
|
+
/**
|
|
1096
|
+
* Show iframe (for consent/confirmation UI)
|
|
1097
|
+
*/
|
|
1098
|
+
showIframe(): void;
|
|
1099
|
+
/**
|
|
1100
|
+
* Hide iframe
|
|
1101
|
+
*/
|
|
1102
|
+
hideIframe(): void;
|
|
1103
|
+
/**
|
|
1104
|
+
* Authenticate user with application
|
|
1105
|
+
*/
|
|
1106
|
+
authenticate(userId: string): Promise<{
|
|
1107
|
+
userId: string;
|
|
1108
|
+
address: Address$1 | undefined;
|
|
1109
|
+
}>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Start DKG (Distributed Key Generation)
|
|
1112
|
+
*/
|
|
1113
|
+
startDKG(userId: string, accessToken?: string): Promise<Address$1>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Sign transaction
|
|
1116
|
+
*/
|
|
1117
|
+
signTransaction(userId: string, transaction: Transaction, accessToken?: string): Promise<Hex>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Sign EIP712 typed data
|
|
1120
|
+
*/
|
|
1121
|
+
signTypedData(userId: string, typedData: {
|
|
1122
|
+
domain: {
|
|
1123
|
+
name?: string;
|
|
1124
|
+
version?: string;
|
|
1125
|
+
chainId?: number;
|
|
1126
|
+
verifyingContract?: string;
|
|
1127
|
+
salt?: string;
|
|
1128
|
+
};
|
|
1129
|
+
types: Record<string, Array<{
|
|
1130
|
+
name: string;
|
|
1131
|
+
type: string;
|
|
1132
|
+
}>>;
|
|
1133
|
+
primaryType: string;
|
|
1134
|
+
message: Record<string, any>;
|
|
1135
|
+
}, digest32: Hex, accessToken?: string): Promise<Hex>;
|
|
1136
|
+
/**
|
|
1137
|
+
* Get user's wallet address
|
|
1138
|
+
*/
|
|
1139
|
+
getAddress(userId: string): Promise<Address$1 | undefined>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Check if user has a keyshare
|
|
1142
|
+
*/
|
|
1143
|
+
checkKeyshare(userId: string): Promise<{
|
|
1144
|
+
hasKeyshare: boolean;
|
|
1145
|
+
address?: Address$1;
|
|
1146
|
+
}>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Open social auth popup (Telegram, Discord, Twitter, etc.)
|
|
1149
|
+
*/
|
|
1150
|
+
openSocialAuthPopup(provider: string, config?: Record<string, any>): Promise<{
|
|
1151
|
+
provider: string;
|
|
1152
|
+
success: boolean;
|
|
1153
|
+
user?: any;
|
|
1154
|
+
error?: string;
|
|
1155
|
+
}>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Get trusted apps for user
|
|
1158
|
+
*/
|
|
1159
|
+
getTrustedApps(userId: string): Promise<Array<{
|
|
1160
|
+
userId: string;
|
|
1161
|
+
projectId: string;
|
|
1162
|
+
origin: string;
|
|
1163
|
+
trustedAt: number;
|
|
1164
|
+
}>>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Remove app from trusted list
|
|
1167
|
+
*/
|
|
1168
|
+
removeTrustedApp(userId: string, projectId: string, origin: string): Promise<boolean>;
|
|
1169
|
+
/**
|
|
1170
|
+
* Create backup of keyshare
|
|
1171
|
+
*/
|
|
1172
|
+
createBackup(userId: string, backupRequest: {
|
|
1173
|
+
method: 'server' | 'cloud' | 'local';
|
|
1174
|
+
password?: string;
|
|
1175
|
+
cloudProvider?: string;
|
|
1176
|
+
}, accessToken?: string): Promise<{
|
|
1177
|
+
success: boolean;
|
|
1178
|
+
method: string;
|
|
1179
|
+
timestamp: number;
|
|
1180
|
+
error?: string;
|
|
1181
|
+
}>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Restore keyshare from server backup
|
|
1184
|
+
*/
|
|
1185
|
+
restoreFromServer(userId: string, password?: string, accessToken?: string): Promise<{
|
|
1186
|
+
success: boolean;
|
|
1187
|
+
timestamp: number;
|
|
1188
|
+
error?: string;
|
|
1189
|
+
data?: any;
|
|
1190
|
+
}>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Encrypt backup data without uploading (for cloud/local backups)
|
|
1193
|
+
* Returns encrypted data that parent can upload/download
|
|
1194
|
+
*/
|
|
1195
|
+
encryptBackupData(userId: string, password?: string): Promise<any>;
|
|
1196
|
+
/**
|
|
1197
|
+
* Restore keyshare from local file backup
|
|
1198
|
+
*/
|
|
1199
|
+
restoreFromLocalFile(userId: string, fileContent: string, password?: string): Promise<{
|
|
1200
|
+
success: boolean;
|
|
1201
|
+
timestamp: number;
|
|
1202
|
+
error?: string;
|
|
1203
|
+
data?: any;
|
|
1204
|
+
}>;
|
|
1205
|
+
/**
|
|
1206
|
+
* Get backup status for user
|
|
1207
|
+
*/
|
|
1208
|
+
getBackupStatus(userId: string): Promise<{
|
|
1209
|
+
server: {
|
|
1210
|
+
lastBackup?: number;
|
|
1211
|
+
error?: string;
|
|
1212
|
+
};
|
|
1213
|
+
cloud: {
|
|
1214
|
+
lastBackup?: number;
|
|
1215
|
+
error?: string;
|
|
1216
|
+
};
|
|
1217
|
+
local: {
|
|
1218
|
+
lastBackup?: number;
|
|
1219
|
+
error?: string;
|
|
1220
|
+
};
|
|
1221
|
+
}>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Get available cloud providers
|
|
1224
|
+
*/
|
|
1225
|
+
getCloudProviders(): Promise<Array<{
|
|
1226
|
+
id: string;
|
|
1227
|
+
name: string;
|
|
1228
|
+
available: boolean;
|
|
1229
|
+
}>>;
|
|
1230
|
+
/**
|
|
1231
|
+
* Cleanup and destroy iframe
|
|
1232
|
+
*/
|
|
1233
|
+
destroy(): void;
|
|
1234
|
+
/**
|
|
1235
|
+
* Debug logging
|
|
1236
|
+
*/
|
|
1237
|
+
private log;
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Get or create iframe manager singleton
|
|
1241
|
+
*/
|
|
1242
|
+
declare function getIframeManager(config?: IframeManagerConfig): IframeManager;
|
|
1243
|
+
/**
|
|
1244
|
+
* Destroy iframe manager singleton
|
|
1245
|
+
*/
|
|
1246
|
+
declare function destroyIframeManager(): void;
|
|
1024
1247
|
|
|
1025
|
-
export { type AccountSession$1 as AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, Hash, type HashProps, KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, type LumiaPassportSessionProviderProps, LumiaRainbowKitProvider, type LumiaRainbowKitProviderProps, LumiaSessionProvider, type LumiaSessionProviderProps, LumiaWagmiProvider, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type Theme, 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, type WalletReadyStatus, deployAccount, getUserProfile, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportConfig, useLumiaPassportLinkedProfiles, useLumiaPassportSession, useLumiaSession, useSendTransaction, useSmartAccountTransactions, useTheme, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|
|
1248
|
+
export { type AccountSession$1 as AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, Hash, type HashProps, KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, type LumiaPassportSessionProviderProps, LumiaRainbowKitProvider, type LumiaRainbowKitProviderProps, LumiaSessionProvider, type LumiaSessionProviderProps, LumiaWagmiProvider, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type Theme, ThemeToggle, type TokenBalance, type Transaction$1 as 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, type WalletReadyStatus, deployAccount, destroyIframeManager, getIframeManager, getUserProfile, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportConfig, useLumiaPassportLinkedProfiles, useLumiaPassportSession, useLumiaSession, useSendTransaction, useSmartAccountTransactions, useTheme, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import { UserOperationV07, UserOperationV06 } from '@lumiapassport/core/bundler';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as viem from 'viem';
|
|
6
|
-
import { Chain, Hash as Hash$1, TransactionReceipt } from 'viem';
|
|
6
|
+
import { Chain, Hash as Hash$1, TransactionReceipt, Address as Address$1, Hex } from 'viem';
|
|
7
7
|
export { JwtTokens, LoginResponse, VerifyResponse, getValidTokens, jwtTokenManager, logout } from '@lumiapassport/core/auth';
|
|
8
8
|
import * as wagmi from 'wagmi';
|
|
9
9
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -633,7 +633,7 @@ declare const wagmiConfig: wagmi.Config<readonly [viem.Chain], {
|
|
|
633
633
|
[lumiaBeam.id]: viem.HttpTransport<undefined, false>;
|
|
634
634
|
}, readonly wagmi.CreateConnectorFn[]>;
|
|
635
635
|
|
|
636
|
-
interface Transaction {
|
|
636
|
+
interface Transaction$1 {
|
|
637
637
|
hash: Hash$1;
|
|
638
638
|
from: string;
|
|
639
639
|
to: string | null;
|
|
@@ -782,7 +782,7 @@ declare function useTransactions(): {
|
|
|
782
782
|
transactionIndex: number;
|
|
783
783
|
}>;
|
|
784
784
|
getTransactionReceipt: (hash: Hash$1) => Promise<TransactionReceipt>;
|
|
785
|
-
getTransactionHistory: (address: `0x${string}`, limit?: number) => Promise<Transaction[]>;
|
|
785
|
+
getTransactionHistory: (address: `0x${string}`, limit?: number) => Promise<Transaction$1[]>;
|
|
786
786
|
address: `0x${string}`;
|
|
787
787
|
isConnected: boolean;
|
|
788
788
|
};
|
|
@@ -1013,6 +1013,24 @@ declare function useLumiaPassportLinkedProfiles(): {
|
|
|
1013
1013
|
* Implements postMessage protocol with HMAC authentication and replay protection
|
|
1014
1014
|
*/
|
|
1015
1015
|
|
|
1016
|
+
interface Transaction {
|
|
1017
|
+
to: Address$1;
|
|
1018
|
+
value: string;
|
|
1019
|
+
data?: Hex;
|
|
1020
|
+
gasLimit?: string;
|
|
1021
|
+
}
|
|
1022
|
+
interface IframeManagerConfig {
|
|
1023
|
+
iframeUrl: string;
|
|
1024
|
+
projectId: string;
|
|
1025
|
+
debug?: boolean;
|
|
1026
|
+
onWalletReady?: (status: WalletReadyStatus) => void;
|
|
1027
|
+
themeColors?: {
|
|
1028
|
+
background?: string;
|
|
1029
|
+
text?: string;
|
|
1030
|
+
textSecondary?: string;
|
|
1031
|
+
border?: string;
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1016
1034
|
interface WalletReadyStatus {
|
|
1017
1035
|
ready: boolean;
|
|
1018
1036
|
userId?: string;
|
|
@@ -1021,5 +1039,210 @@ interface WalletReadyStatus {
|
|
|
1021
1039
|
hasSession: boolean;
|
|
1022
1040
|
timestamp: number;
|
|
1023
1041
|
}
|
|
1042
|
+
declare class IframeManager {
|
|
1043
|
+
private iframe;
|
|
1044
|
+
private iframeUrl;
|
|
1045
|
+
private projectId;
|
|
1046
|
+
private debug;
|
|
1047
|
+
private sessionToken;
|
|
1048
|
+
private isReady;
|
|
1049
|
+
private readyPromise;
|
|
1050
|
+
private readyResolve;
|
|
1051
|
+
private onWalletReadyCallback?;
|
|
1052
|
+
private themeColors?;
|
|
1053
|
+
private pendingRequests;
|
|
1054
|
+
private usedNonces;
|
|
1055
|
+
private messageListener;
|
|
1056
|
+
private readonly REQUEST_TIMEOUT;
|
|
1057
|
+
private readonly NONCE_EXPIRY;
|
|
1058
|
+
constructor(config: IframeManagerConfig);
|
|
1059
|
+
/**
|
|
1060
|
+
* Initialize iframe and wait for it to be ready
|
|
1061
|
+
*/
|
|
1062
|
+
initialize(): Promise<void>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Set the onWalletReady callback
|
|
1065
|
+
*/
|
|
1066
|
+
setOnWalletReady(callback: (status: WalletReadyStatus) => void): void;
|
|
1067
|
+
/**
|
|
1068
|
+
* Authenticate SDK with iframe to establish session
|
|
1069
|
+
*/
|
|
1070
|
+
private authenticateSDK;
|
|
1071
|
+
/**
|
|
1072
|
+
* Handle incoming postMessage events
|
|
1073
|
+
*/
|
|
1074
|
+
private handleMessage;
|
|
1075
|
+
/**
|
|
1076
|
+
* Handle token refresh request from iframe
|
|
1077
|
+
*/
|
|
1078
|
+
private handleTokenRefreshRequest;
|
|
1079
|
+
/**
|
|
1080
|
+
* Send secure message to iframe
|
|
1081
|
+
*/
|
|
1082
|
+
private sendMessage;
|
|
1083
|
+
/**
|
|
1084
|
+
* Compute HMAC for message authentication
|
|
1085
|
+
*/
|
|
1086
|
+
private computeHMAC;
|
|
1087
|
+
/**
|
|
1088
|
+
* Generate unique message ID
|
|
1089
|
+
*/
|
|
1090
|
+
private generateMessageId;
|
|
1091
|
+
/**
|
|
1092
|
+
* Generate nonce for replay protection
|
|
1093
|
+
*/
|
|
1094
|
+
private generateNonce;
|
|
1095
|
+
/**
|
|
1096
|
+
* Show iframe (for consent/confirmation UI)
|
|
1097
|
+
*/
|
|
1098
|
+
showIframe(): void;
|
|
1099
|
+
/**
|
|
1100
|
+
* Hide iframe
|
|
1101
|
+
*/
|
|
1102
|
+
hideIframe(): void;
|
|
1103
|
+
/**
|
|
1104
|
+
* Authenticate user with application
|
|
1105
|
+
*/
|
|
1106
|
+
authenticate(userId: string): Promise<{
|
|
1107
|
+
userId: string;
|
|
1108
|
+
address: Address$1 | undefined;
|
|
1109
|
+
}>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Start DKG (Distributed Key Generation)
|
|
1112
|
+
*/
|
|
1113
|
+
startDKG(userId: string, accessToken?: string): Promise<Address$1>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Sign transaction
|
|
1116
|
+
*/
|
|
1117
|
+
signTransaction(userId: string, transaction: Transaction, accessToken?: string): Promise<Hex>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Sign EIP712 typed data
|
|
1120
|
+
*/
|
|
1121
|
+
signTypedData(userId: string, typedData: {
|
|
1122
|
+
domain: {
|
|
1123
|
+
name?: string;
|
|
1124
|
+
version?: string;
|
|
1125
|
+
chainId?: number;
|
|
1126
|
+
verifyingContract?: string;
|
|
1127
|
+
salt?: string;
|
|
1128
|
+
};
|
|
1129
|
+
types: Record<string, Array<{
|
|
1130
|
+
name: string;
|
|
1131
|
+
type: string;
|
|
1132
|
+
}>>;
|
|
1133
|
+
primaryType: string;
|
|
1134
|
+
message: Record<string, any>;
|
|
1135
|
+
}, digest32: Hex, accessToken?: string): Promise<Hex>;
|
|
1136
|
+
/**
|
|
1137
|
+
* Get user's wallet address
|
|
1138
|
+
*/
|
|
1139
|
+
getAddress(userId: string): Promise<Address$1 | undefined>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Check if user has a keyshare
|
|
1142
|
+
*/
|
|
1143
|
+
checkKeyshare(userId: string): Promise<{
|
|
1144
|
+
hasKeyshare: boolean;
|
|
1145
|
+
address?: Address$1;
|
|
1146
|
+
}>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Open social auth popup (Telegram, Discord, Twitter, etc.)
|
|
1149
|
+
*/
|
|
1150
|
+
openSocialAuthPopup(provider: string, config?: Record<string, any>): Promise<{
|
|
1151
|
+
provider: string;
|
|
1152
|
+
success: boolean;
|
|
1153
|
+
user?: any;
|
|
1154
|
+
error?: string;
|
|
1155
|
+
}>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Get trusted apps for user
|
|
1158
|
+
*/
|
|
1159
|
+
getTrustedApps(userId: string): Promise<Array<{
|
|
1160
|
+
userId: string;
|
|
1161
|
+
projectId: string;
|
|
1162
|
+
origin: string;
|
|
1163
|
+
trustedAt: number;
|
|
1164
|
+
}>>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Remove app from trusted list
|
|
1167
|
+
*/
|
|
1168
|
+
removeTrustedApp(userId: string, projectId: string, origin: string): Promise<boolean>;
|
|
1169
|
+
/**
|
|
1170
|
+
* Create backup of keyshare
|
|
1171
|
+
*/
|
|
1172
|
+
createBackup(userId: string, backupRequest: {
|
|
1173
|
+
method: 'server' | 'cloud' | 'local';
|
|
1174
|
+
password?: string;
|
|
1175
|
+
cloudProvider?: string;
|
|
1176
|
+
}, accessToken?: string): Promise<{
|
|
1177
|
+
success: boolean;
|
|
1178
|
+
method: string;
|
|
1179
|
+
timestamp: number;
|
|
1180
|
+
error?: string;
|
|
1181
|
+
}>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Restore keyshare from server backup
|
|
1184
|
+
*/
|
|
1185
|
+
restoreFromServer(userId: string, password?: string, accessToken?: string): Promise<{
|
|
1186
|
+
success: boolean;
|
|
1187
|
+
timestamp: number;
|
|
1188
|
+
error?: string;
|
|
1189
|
+
data?: any;
|
|
1190
|
+
}>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Encrypt backup data without uploading (for cloud/local backups)
|
|
1193
|
+
* Returns encrypted data that parent can upload/download
|
|
1194
|
+
*/
|
|
1195
|
+
encryptBackupData(userId: string, password?: string): Promise<any>;
|
|
1196
|
+
/**
|
|
1197
|
+
* Restore keyshare from local file backup
|
|
1198
|
+
*/
|
|
1199
|
+
restoreFromLocalFile(userId: string, fileContent: string, password?: string): Promise<{
|
|
1200
|
+
success: boolean;
|
|
1201
|
+
timestamp: number;
|
|
1202
|
+
error?: string;
|
|
1203
|
+
data?: any;
|
|
1204
|
+
}>;
|
|
1205
|
+
/**
|
|
1206
|
+
* Get backup status for user
|
|
1207
|
+
*/
|
|
1208
|
+
getBackupStatus(userId: string): Promise<{
|
|
1209
|
+
server: {
|
|
1210
|
+
lastBackup?: number;
|
|
1211
|
+
error?: string;
|
|
1212
|
+
};
|
|
1213
|
+
cloud: {
|
|
1214
|
+
lastBackup?: number;
|
|
1215
|
+
error?: string;
|
|
1216
|
+
};
|
|
1217
|
+
local: {
|
|
1218
|
+
lastBackup?: number;
|
|
1219
|
+
error?: string;
|
|
1220
|
+
};
|
|
1221
|
+
}>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Get available cloud providers
|
|
1224
|
+
*/
|
|
1225
|
+
getCloudProviders(): Promise<Array<{
|
|
1226
|
+
id: string;
|
|
1227
|
+
name: string;
|
|
1228
|
+
available: boolean;
|
|
1229
|
+
}>>;
|
|
1230
|
+
/**
|
|
1231
|
+
* Cleanup and destroy iframe
|
|
1232
|
+
*/
|
|
1233
|
+
destroy(): void;
|
|
1234
|
+
/**
|
|
1235
|
+
* Debug logging
|
|
1236
|
+
*/
|
|
1237
|
+
private log;
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Get or create iframe manager singleton
|
|
1241
|
+
*/
|
|
1242
|
+
declare function getIframeManager(config?: IframeManagerConfig): IframeManager;
|
|
1243
|
+
/**
|
|
1244
|
+
* Destroy iframe manager singleton
|
|
1245
|
+
*/
|
|
1246
|
+
declare function destroyIframeManager(): void;
|
|
1024
1247
|
|
|
1025
|
-
export { type AccountSession$1 as AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, Hash, type HashProps, KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, type LumiaPassportSessionProviderProps, LumiaRainbowKitProvider, type LumiaRainbowKitProviderProps, LumiaSessionProvider, type LumiaSessionProviderProps, LumiaWagmiProvider, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type Theme, 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, type WalletReadyStatus, deployAccount, getUserProfile, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportConfig, useLumiaPassportLinkedProfiles, useLumiaPassportSession, useLumiaSession, useSendTransaction, useSmartAccountTransactions, useTheme, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|
|
1248
|
+
export { type AccountSession$1 as AccountSession, Address, type AddressProps, type Asset, ConnectWalletButton, type ConnectWalletButtonProps, Hash, type HashProps, KeyshareBackup, LUMIA_EXPLORER_URL, LumiaLogo, type LumiaPassportCallbacks, type LumiaPassportConfig, LumiaPassportProvider, type LumiaPassportProviderProps, LumiaPassportSessionProvider, type LumiaPassportSessionProviderProps, LumiaRainbowKitProvider, type LumiaRainbowKitProviderProps, LumiaSessionProvider, type LumiaSessionProviderProps, LumiaWagmiProvider, type ProviderDetail, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type Theme, ThemeToggle, type TokenBalance, type Transaction$1 as 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, type WalletReadyStatus, deployAccount, destroyIframeManager, getIframeManager, getUserProfile, lumiaBeam, prepareUserOperation, queryClient, sendUserOperation, signTypedData, updateUserProfile, useAssets, useLogout, useLumiaPassportConfig, useLumiaPassportLinkedProfiles, useLumiaPassportSession, useLumiaSession, useSendTransaction, useSmartAccountTransactions, useTheme, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, wagmiConfig };
|