@identity.com/verifiable-presentations
Version:
Utility Library to securely handle verifiable presentations
51 lines (50 loc) • 2.14 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VerifiablePresentationManagerFactory = void 0;
var VerifiablePresentationManager_1 = require("./VerifiablePresentationManager");
var VerifiablePresentationManagerFactory = /** @class */ (function () {
function VerifiablePresentationManagerFactory() {
}
/**
* Most secure manager verify data in a redundant way
*/
VerifiablePresentationManagerFactory.createCustomManager = function (options, verifyAnchor) {
return new VerifiablePresentationManager_1.VerifiablePresentationManager(options, verifyAnchor);
};
/**
* Most secure manager verify data in a redundant way
*/
VerifiablePresentationManagerFactory.createSecureRedundantManager = function () {
return new VerifiablePresentationManager_1.VerifiablePresentationManager({});
};
/**
* Good secure manager that favor the ingestion performance by skipping the verify only on that process
*/
VerifiablePresentationManagerFactory.createSecureFastIngestManager = function () {
return new VerifiablePresentationManager_1.VerifiablePresentationManager({
skipAddVerify: true
});
};
/**
* Good secure manager that favor the read performance by skipping the verify only on that process
*/
VerifiablePresentationManagerFactory.createSecureFastReadManager = function () {
return new VerifiablePresentationManager_1.VerifiablePresentationManager({
skipGetVerify: true,
allowGetUnverified: true
});
};
/**
* Mock manager that should only be used in test or development
*/
VerifiablePresentationManagerFactory.createInsecureManager = function () {
return new VerifiablePresentationManager_1.VerifiablePresentationManager({
skipAddVerify: true,
skipGetVerify: true,
allowGetUnverified: true,
notThrow: true
});
};
return VerifiablePresentationManagerFactory;
}());
exports.VerifiablePresentationManagerFactory = VerifiablePresentationManagerFactory;