@affinidi/internal-api-clients
Version:
SDK core monorepo for affinity DID solution
37 lines • 1.95 kB
JavaScript
;
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 _cloudWallet_1 = __importDefault(require("../spec/_cloudWallet"));
const clientMethods = (0, tools_openapi_1.createClientMethods)(_cloudWallet_1.default);
let CloudWalletApiService = class CloudWalletApiService {
constructor(options) {
this.client = (0, tools_openapi_1.createClient)(clientMethods, options.cloudWalletUrl, options);
}
async login(params) {
return this.client.Login({ params });
}
async signCredential(params, accessToken) {
return this.client.SignCredential({ params, authorization: accessToken });
}
async storeCredentials(params, accessToken) {
return this.client.StoreCredentials({ params, authorization: accessToken });
}
async signJwt(jwtObject, accessToken) {
return this.client.SignJwt({ params: { jwtObject }, authorization: accessToken });
}
};
CloudWalletApiService = __decorate([
(0, tools_common_1.profile)()
], CloudWalletApiService);
exports.default = CloudWalletApiService;
//# sourceMappingURL=CloudWalletApiService.js.map