UNPKG

@affinidi/internal-api-clients

Version:
40 lines 1.91 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const tools_common_1 = require("@affinidi/tools-common"); const tools_openapi_1 = require("@affinidi/tools-openapi"); const _registry_1 = __importDefault(require("../spec/_registry")); const clientMethods = (0, tools_openapi_1.createClientMethods)(_registry_1.default); let RegistryApiService = class RegistryApiService { constructor(options) { this.client = (0, tools_openapi_1.createClient)(clientMethods, options.registryUrl, options); } async putDocumentInIpfs(params) { return this.client.PutDocumentInIpfs({ params }); } async createAnchorTransaction(params) { return this.client.CreateAnchorTransaction({ params }); } async anchorDid(params) { return this.client.AnchorDid({ params }); } async resolveDid(params) { return this.client.ResolveDid({ params }); } async transactionCount(params) { return this.client.TransactionCount({ params }); } }; RegistryApiService = __decorate([ (0, tools_common_1.profile)() ], RegistryApiService); exports.default = RegistryApiService; //# sourceMappingURL=RegistryApiService.js.map