"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProofPointIdType = exports.ProofPointId = void 0;
/**
 * Proof point id type
 */
var ProofPointIdType;
(function (ProofPointIdType) {
    // The ID is an IPFS document ID. The proof point will be authenticated using Ethereum authentication.
    ProofPointIdType[ProofPointIdType["Ipfs"] = 0] = "Ipfs";
})(ProofPointIdType || (ProofPointIdType = {}));
exports.ProofPointIdType = ProofPointIdType;
/**
 * Proof point id
 * A unique identifier for a proof point.
 */
var ProofPointId = /** @class */ (function () {
    function ProofPointId(id, type) {
        this._id = id;
        this._type = type;
    }
    ProofPointId.parse = function (input) {
        if (/^Qm[1-9A-HJ-NP-Za-km-z]{44}$/.test(input)) {
            return new ProofPointId(input, ProofPointIdType.Ipfs);
        }
        throw new Error("Invalid Proof Point ID: " + input);
    };
    ProofPointId.prototype.getType = function () {
        return this._type;
    };
    ProofPointId.prototype.toString = function () {
        return this._id;
    };
    ProofPointId.prototype.equals = function (other) {
        return this._id === other._id;
    };
    return ProofPointId;
}());
exports.ProofPointId = ProofPointId;
