import { ParaClient } from '../para-client.js';
import type { Wallet } from '../types.js';
export const definition = {
name: 'get_wallet',
description: 'Get wallet details by ID, including status, address, and public key.',
inputSchema: {
type: 'object' as const,
properties: {
walletId: {
type: 'string',
description: 'The wallet ID returned from create_wallet',
},
},
required: ['walletId'],
},
};
export async function handler(client: ParaClient, args: Record<string, unknown>) {
const walletId = args.walletId as string;
const wallet = await client.requestWithRetry<Wallet>(`/v1/wallets/${walletId}`);
return {
content: [
{
type: 'text' as const,
text: JSON.stringify(wallet, null, 2),
},
],
};
}