UNPKG

@verax-attestation-registry/verax-sdk

Version:

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

35 lines 1.21 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const BaseDataMapper_1 = __importDefault(require("./BaseDataMapper")); const AttestationRegistry_1 = require("../abi/AttestationRegistry"); const abiCoder_1 = require("../utils/abiCoder"); class UtilsDataMapper extends BaseDataMapper_1.default { constructor() { super(...arguments); this.typeName = "counter"; this.gqlInterface = `{ attestations modules portals schemas }`; } async getVersionNumber() { return this.web3Client.readContract({ abi: AttestationRegistry_1.abiAttestationRegistry, address: this.conf.attestationRegistryAddress, functionName: "getVersionNumber", }); } encode(schema, values) { return (0, abiCoder_1.encode)(schema, values); } decode(schema, attestationData) { return (0, abiCoder_1.decodeWithRetry)(schema, attestationData); } } exports.default = UtilsDataMapper; //# sourceMappingURL=UtilsDataMapper.js.map