// Get host information by namespace
async function getHostInfo(namespace: string) {
try {
const hostInfo = await client.getHost(namespace);
console.log('Host info:', hostInfo);
} catch (error) {
console.error('Failed to fetch host information:', error);
}
}
// Get pool host fees
async function checkPoolFees(hostNamespace: string, poolId: string) {
try {
const fees = await client.getPoolHostFees(hostNamespace, poolId);
console.log('Available fees:', fees);
} catch (error) {
console.error('Failed to fetch pool fees:', error);
}
}
// Filter pools by host
async function getPoolsByHost(hostNames: string[]) {
try {
const pools = await client.listPools({
hostNames,
});
console.log('Host pools:', pools);
} catch (error) {
console.error('Failed to fetch pools:', error);
}
}