code: function sendQuery (
    {
      privateKey,
      creatorAccountId,
      queryService,
      timeoutLimit
    } = DEFAULT_OPTIONS,
    query,
    onResponse = function (resolve, reject, responseName, response) {}
  ) {
    return new Promise((resolve, reject) => {
      const queryClient = queryService
  
      let queryToSend = flow(
        (q) => queryHelper.addMeta(q, { creatorAccountId }),
        (q) => queryHelper.sign(q, privateKey)
      )(query)
  
      /**
       * grpc-node hangs against unresponsive server, which possibly occur when
       * invalid node IP is set. To avoid this problem, we use timeout timer.
       * c.f. {@link https://github.com/grpc/grpc/issues/13163 Grpc issue 13163}
       */
      const timer = setTimeout(() => {
        queryClient.$channel.close()
        reject(new Error('please check IP address OR your internet connection'))
      }, timeoutLimit)
  
      queryClient.find(queryToSend, (err, response) => {
        clearTimeout(timer)
  
        if (err) {
          return reject(err)
        }
  
        const type = response.getResponseCase()
        const responseName = getProtoEnumName(
          pbResponse.QueryResponse.ResponseCase,
          'iroha.protocol.QueryResponse',
          type
        )
  
        onResponse(resolve, reject, responseName, response)
      })
    })
  }
docs: wrapper function of queries
  @param {Object} queryOptions
  @param {Object} query
  @param {Function} onResponse