getUserDetails
Get current authenticated user details including smart wallet, chains, protocols, and settings. Requires SIWE authentication.
Signature
getUserDetails(): Promise<UserDetailsResponse>
Returns
User details including smart wallet, chains, protocols, settings
Return Type
interface UserDetailsResponse {
success: boolean;
user: {
id: string;
address: string;
smartWallet?: string;
chains: number[];
protocols: Protocol[];
hasActiveSessionKey: boolean;
email?: string;
strategy?: string;
telegramId?: string;
walletType?: string;
autoSelectProtocols: boolean;
autocompounding?: boolean;
omniAccount?: boolean;
crosschainStrategy?: boolean;
agentName?: string;
customization?: Record<string, string[]>;
};
}
Example
await sdk.connectAccount(privateKey, chainId);
const user = await sdk.getUserDetails();
console.log("Smart Wallet:", user.user.smartWallet);
console.log("Chains:", user.user.chains);
console.log("Has Active Session:", user.user.hasActiveSessionKey);