import { Address } from 'viem'; import { fetchGraphData } from './fetch-graph'; import { transform, WALLET_QUERY, WalletEntity } from './query/wallets'; import { PrexApiService } from '../api'; export async function querySharedWallets( apiService: PrexApiService, user: Address ) { const body = await fetchGraphData(apiService, 'endUser', WALLET_QUERY, { address: user.toLowerCase(), }); const wallet = body as WalletEntity; return transform(wallet); }