import { LCDClient } from "@osmonauts/lcd"; import { QueryGaugeIdsRequest, QueryGaugeIdsResponseSDKType, QueryDistrInfoRequest, QueryDistrInfoResponseSDKType, QueryParamsRequest, QueryParamsResponseSDKType, QueryLockableDurationsRequest, QueryLockableDurationsResponseSDKType, QueryIncentivizedPoolsRequest, QueryIncentivizedPoolsResponseSDKType, QueryExternalIncentiveGaugesRequest, QueryExternalIncentiveGaugesResponseSDKType } from "./query"; export class LCDQueryClient { req: LCDClient; constructor({ requestClient }: { requestClient: LCDClient; }) { this.req = requestClient; this.gaugeIds = this.gaugeIds.bind(this); this.distrInfo = this.distrInfo.bind(this); this.params = this.params.bind(this); this.lockableDurations = this.lockableDurations.bind(this); this.incentivizedPools = this.incentivizedPools.bind(this); this.externalIncentiveGauges = this.externalIncentiveGauges.bind(this); } /* GaugeIds takes the pool id and returns the matching gauge ids and durations */ async gaugeIds(params: QueryGaugeIdsRequest): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/gauge-ids/${params.poolId}`; return await this.req.get(endpoint); } /* DistrInfo returns the pool's matching gauge ids and weights. */ async distrInfo(_params: QueryDistrInfoRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/distr_info`; return await this.req.get(endpoint); } /* Params returns pool incentives params. */ async params(_params: QueryParamsRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/params`; return await this.req.get(endpoint); } /* LockableDurations returns lock durations for pools. */ async lockableDurations(_params: QueryLockableDurationsRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/lockable_durations`; return await this.req.get(endpoint); } /* IncentivizedPools returns currently incentivized pools */ async incentivizedPools(_params: QueryIncentivizedPoolsRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/incentivized_pools`; return await this.req.get(endpoint); } /* ExternalIncentiveGauges returns external incentive gauges. */ async externalIncentiveGauges(_params: QueryExternalIncentiveGaugesRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/external_incentive_gauges`; return await this.req.get(endpoint); } }