UNPKG

@tidecloak/js

Version:

TideCloak client side JS SDK

37 lines 1.54 kB
"use strict"; // // Tide Protocol - Infrastructure for a TRUE Zero-Trust paradigm // Copyright (C) 2022 Tide Foundation Ltd // // This program is free software and is subject to the terms of // the Tide Community Open Code License as published by the // Tide Foundation Limited. You may modify it and redistribute // it in accordance with and subject to the terms of that License. // This program is distributed WITHOUT WARRANTY of any kind, // including without any implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // See the Tide Community Open Code License for more details. // You should have received a copy of the Tide Community Open // Code License along with this program. // If not, see https://tide.org/licenses_tcoc2-0-0-en // Object.defineProperty(exports, "__esModule", { value: true }); const Ed25519_js_1 = require("../../../../Cryptide/Ed25519.js"); class DecryptedConvertRememberedResponse { /** * @param {Point} UserPRISMi * @param {bigint} Timestampi */ constructor(UserPRISMi, Timestampi) { this.UserPRISMi = UserPRISMi; this.timestampi = Timestampi; } static from(data) { const obj = JSON.parse(data); const timestamp = BigInt(obj.Timestampi); const UserPRISMi = Ed25519_js_1.Point.fromBase64(obj.UserPRISMi); return new DecryptedConvertRememberedResponse(UserPRISMi, timestamp); } } exports.default = DecryptedConvertRememberedResponse; //# sourceMappingURL=DecryptedConvertRememberedResponse.js.map