import { Duration } from "../../../google/protobuf/duration"; import { DistrInfo, Params } from "./incentives"; import { Gauge } from "../../incentives/gauge"; import { LCDClient } from "@osmonauts/lcd"; import { QueryGaugeIdsRequest, QueryGaugeIdsResponse, QueryDistrInfoRequest, QueryDistrInfoResponse, QueryParamsRequest, QueryParamsResponse, QueryLockableDurationsRequest, QueryLockableDurationsResponse, QueryIncentivizedPoolsRequest, QueryIncentivizedPoolsResponse, QueryExternalIncentiveGaugesRequest, QueryExternalIncentiveGaugesResponse } from "./query"; export class LCDQueryClient extends LCDClient { constructor({ restEndpoint }: { restEndpoint: string; }) { super({ restEndpoint }); } /* 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.pool_id}`; return await this.request(endpoint); } /* DistrInfo */ async distrInfo(_params: QueryDistrInfoRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/distr_info`; return await this.request(endpoint); } /* Params */ async params(_params: QueryParamsRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/params`; return await this.request(endpoint); } /* LockableDurations */ async lockableDurations(_params: QueryLockableDurationsRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/lockable_durations`; return await this.request(endpoint); } /* IncentivizedPools */ async incentivizedPools(_params: QueryIncentivizedPoolsRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/incentivized_pools`; return await this.request(endpoint); } /* ExternalIncentiveGauges */ async externalIncentiveGauges(_params: QueryExternalIncentiveGaugesRequest = {}): Promise { const endpoint = `osmosis/pool-incentives/v1beta1/external_incentive_gauges`; return await this.request(endpoint); } }