import 'rxjs';

const getParams = (req, params) => Array.isArray(req.params) ? Object.fromEntries(
  params.map((key, i) => [key, req.params[i]])
) : req.params;
let uuid = 0;
const getUuid = () => `${uuid++}`;
const respond = (req, result) => ({
  jsonrpc: "2.0",
  id: req.id,
  result
});
const errorResponse = (req, error) => ({
  jsonrpc: "2.0",
  id: req.id,
  error
});

export { errorResponse, getParams, getUuid, respond };
//# sourceMappingURL=rpc_utils.js.map
