wallets.get()
Retrieve a wallet profile by its unique ID.
Signature
wallets.get(walletId: string): Promise<Wallet>Parameters
walletId
- Type:
string - Required: Yes
- Format: UUID
The unique identifier of the wallet.
Returns
- Type:
Promise<Wallet>
interface Wallet {
id: string;
wallet_address: string;
wallet_address_network: WalletNetwork;
username: string | null;
picture_url: string | null;
created_at: number;
updated_at: number;
}Usage
Basic Example
const wallet = await grapevine.wallets.get('123e4567-e89b-12d3-a456-426614174000');
console.log('Address:', wallet.wallet_address);
console.log('Username:', wallet.username || 'Not set');
console.log('Network:', wallet.wallet_address_network);From Feed Owner
// Get the owner of a feed
const feed = await grapevine.feeds.get(feedId);
const owner = await grapevine.wallets.get(feed.owner_id);
console.log(`Feed "${feed.name}" owned by ${owner.username || owner.wallet_address}`);With Error Handling
try {
const wallet = await grapevine.wallets.get(walletId);
console.log('Wallet found:', wallet.wallet_address);
} catch (error) {
if (error.message.includes('404')) {
console.error('Wallet not found');
} else {
console.error('Error:', error.message);
}
}Notes
- Authentication: Not required - public endpoint
- Use Case: Looking up wallet details when you have the wallet ID (e.g., from a feed's
owner_id) - Alternative: Use getByAddress() if you have the Ethereum address instead
Related
- wallets.getByAddress() - Get by Ethereum address
- wallets.getStats() - Get wallet statistics
- feeds.get() - Get feed details (includes owner_id)