//@ts-nocheck
import { setPaginationParams } from "../../../helpers";
import { LCDClient } from "@cosmology/lcd";
import { QueryGrantsRequest, QueryGrantsResponseSDKType, QueryGranterGrantsRequest, QueryGranterGrantsResponseSDKType, QueryGranteeGrantsRequest, QueryGranteeGrantsResponseSDKType } from "./query";
export class LCDQueryClient {
  req: LCDClient;
  constructor({
    requestClient
  }: {
    requestClient: LCDClient;
  }) {
    this.req = requestClient;
    this.grants = this.grants.bind(this);
    this.granterGrants = this.granterGrants.bind(this);
    this.granteeGrants = this.granteeGrants.bind(this);
  }
  /* Returns list of `Authorization`, granted to the grantee by the granter. */
  async grants(params: QueryGrantsRequest): Promise<QueryGrantsResponseSDKType> {
    const options: any = {
      params: {}
    };
    if (typeof params?.granter !== "undefined") {
      options.params.granter = params.granter;
    }
    if (typeof params?.grantee !== "undefined") {
      options.params.grantee = params.grantee;
    }
    if (typeof params?.msgTypeUrl !== "undefined") {
      options.params.msg_type_url = params.msgTypeUrl;
    }
    if (typeof params?.pagination !== "undefined") {
      setPaginationParams(options, params.pagination);
    }
    const endpoint = `cosmos/authz/v1beta1/grants`;
    return await this.req.get<QueryGrantsResponseSDKType>(endpoint, options);
  }
  /* GranterGrants returns list of `GrantAuthorization`, granted by granter.
  
   Since: cosmos-sdk 0.46 */
  async granterGrants(params: QueryGranterGrantsRequest): Promise<QueryGranterGrantsResponseSDKType> {
    const options: any = {
      params: {}
    };
    if (typeof params?.pagination !== "undefined") {
      setPaginationParams(options, params.pagination);
    }
    const endpoint = `cosmos/authz/v1beta1/grants/granter/${params.granter}`;
    return await this.req.get<QueryGranterGrantsResponseSDKType>(endpoint, options);
  }
  /* GranteeGrants returns a list of `GrantAuthorization` by grantee.
  
   Since: cosmos-sdk 0.46 */
  async granteeGrants(params: QueryGranteeGrantsRequest): Promise<QueryGranteeGrantsResponseSDKType> {
    const options: any = {
      params: {}
    };
    if (typeof params?.pagination !== "undefined") {
      setPaginationParams(options, params.pagination);
    }
    const endpoint = `cosmos/authz/v1beta1/grants/grantee/${params.grantee}`;
    return await this.req.get<QueryGranteeGrantsResponseSDKType>(endpoint, options);
  }
}

Homonyms

bootloader/go-cyber/ts/packages/cyber-ts/src/cosmwasm/wasm/v1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/upgrade/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/graph/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/bank/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/liquidity/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/bandwidth/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/distribution/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/clock/v1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/grid/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/gov/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/params/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/mint/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/rank/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/resources/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/osmosis/tokenfactory/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/gov/v1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/auth/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cyber/dmn/v1beta1/query.lcd.ts
bootloader/go-cyber/ts/packages/cyber-ts/src/cosmos/staking/v1beta1/query.lcd.ts

Graph