UNPKG

@verax-attestation-registry/verax-sdk

Version:

Verax Attestation Registry SDK to interact with the subgraph and the contracts

22 lines 824 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.subgraphCall = exports.stringifyWhereClause = void 0; const axios_1 = __importDefault(require("axios")); function stringifyWhereClause(whereClauseObj) { const json = JSON.stringify(whereClauseObj); return json.replace(/"([^"]+)":/g, "$1:"); } exports.stringifyWhereClause = stringifyWhereClause; function subgraphCall(query, url) { return axios_1.default.post(url, { query }, { headers: { "Content-Type": "application/json", Accept: "application/json", }, }); } exports.subgraphCall = subgraphCall; //# sourceMappingURL=graphClientHelper.js.map