getUserDetails
Get current authenticated user details including smart wallet, chains, protocols, and settings. Requires SIWE authentication.
Signature
getUserDetails(asset?: "USDC" | "WETH"): Promise<UpdateUserProfileResponse>
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
asset | "USDC" | "WETH" | ❌ | Asset to get details for (default: "USDC") |
Returns
User profile including smart wallet, chains, protocols, and settings
Return Type
interface UpdateUserProfileResponse {
success: boolean;
smartWallet?: string;
chains?: number[];
strategy?: string;
protocols?: string[];
autoSelectProtocols?: boolean;
omniAccount?: boolean;
autocompounding?: boolean;
agentName?: string;
crosschainStrategy?: boolean;
executorProxy?: boolean;
hasActiveSessionKey?: boolean;
splitting?: boolean;
minSplits?: number;
customization?: Record<string, any>;
asset?: "USDC" | "WETH";
}
Note: This endpoint now returns UpdateUserProfileResponse which is shared with updateUserProfile.
Example
await sdk.connectAccount(privateKey, chainId);
// Get USDC settings (default)
const user = await sdk.getUserDetails();
console.log("Smart Wallet:", user.smartWallet);
console.log("Chains:", user.chains);
console.log("Has Active Session:", user.hasActiveSessionKey);
console.log("USDC Strategy:", user.strategy);
// Get WETH settings
const wethUser = await sdk.getUserDetails("WETH");
console.log("WETH Strategy:", wethUser.strategy);