diff --git a/dist/generated/qrcode_data_pb.js b/dist/generated/qrcode_data_pb.js index ec425f7ca7b9225db5461cc16560dfe25467572d..ccbbadae5f9671dfa8eac5944157e2c4592d507c 100644 --- a/dist/generated/qrcode_data_pb.js +++ b/dist/generated/qrcode_data_pb.js @@ -760,9 +760,9 @@ $root.vereign = (function () { * Properties of an IpfsContentData_V1. * @memberof vereign.protobuf.qrcode_data * @interface IIpfsContentData_V1 - * @property {string|null} [head] IpfsContentData_V1 head - * @property {string|null} [key] IpfsContentData_V1 key * @property {string|null} [cid] IpfsContentData_V1 cid + * @property {string|null} [key] IpfsContentData_V1 key + * @property {string|null} [head] IpfsContentData_V1 head * @property {string|null} [ipnsKeyId] IpfsContentData_V1 ipnsKeyId */ /** @@ -780,12 +780,12 @@ $root.vereign = (function () { this[keys[i]] = properties[keys[i]]; } /** - * IpfsContentData_V1 head. - * @member {string} head + * IpfsContentData_V1 cid. + * @member {string} cid * @memberof vereign.protobuf.qrcode_data.IpfsContentData_V1 * @instance */ - IpfsContentData_V1.prototype.head = ""; + IpfsContentData_V1.prototype.cid = ""; /** * IpfsContentData_V1 key. * @member {string} key @@ -794,12 +794,12 @@ $root.vereign = (function () { */ IpfsContentData_V1.prototype.key = ""; /** - * IpfsContentData_V1 cid. - * @member {string} cid + * IpfsContentData_V1 head. + * @member {string} head * @memberof vereign.protobuf.qrcode_data.IpfsContentData_V1 * @instance */ - IpfsContentData_V1.prototype.cid = ""; + IpfsContentData_V1.prototype.head = ""; /** * IpfsContentData_V1 ipnsKeyId. * @member {string} ipnsKeyId @@ -830,12 +830,12 @@ $root.vereign = (function () { IpfsContentData_V1.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.head != null && Object.hasOwnProperty.call(message, "head")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.head); + if (message.cid != null && Object.hasOwnProperty.call(message, "cid")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.cid); if (message.key != null && Object.hasOwnProperty.call(message, "key")) writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.key); - if (message.cid != null && Object.hasOwnProperty.call(message, "cid")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.cid); + if (message.head != null && Object.hasOwnProperty.call(message, "head")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.head); if (message.ipnsKeyId != null && Object.hasOwnProperty.call(message, "ipnsKeyId")) writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.ipnsKeyId); return writer; @@ -871,13 +871,13 @@ $root.vereign = (function () { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.head = reader.string(); + message.cid = reader.string(); break; case 2: message.key = reader.string(); break; case 3: - message.cid = reader.string(); + message.head = reader.string(); break; case 4: message.ipnsKeyId = reader.string(); @@ -915,15 +915,15 @@ $root.vereign = (function () { IpfsContentData_V1.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.head != null && message.hasOwnProperty("head")) - if (!$util.isString(message.head)) - return "head: string expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; if (message.cid != null && message.hasOwnProperty("cid")) if (!$util.isString(message.cid)) return "cid: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.head != null && message.hasOwnProperty("head")) + if (!$util.isString(message.head)) + return "head: string expected"; if (message.ipnsKeyId != null && message.hasOwnProperty("ipnsKeyId")) if (!$util.isString(message.ipnsKeyId)) return "ipnsKeyId: string expected"; @@ -941,12 +941,12 @@ $root.vereign = (function () { if (object instanceof $root.vereign.protobuf.qrcode_data.IpfsContentData_V1) return object; var message = new $root.vereign.protobuf.qrcode_data.IpfsContentData_V1(); - if (object.head != null) - message.head = String(object.head); - if (object.key != null) - message.key = String(object.key); if (object.cid != null) message.cid = String(object.cid); + if (object.key != null) + message.key = String(object.key); + if (object.head != null) + message.head = String(object.head); if (object.ipnsKeyId != null) message.ipnsKeyId = String(object.ipnsKeyId); return message; @@ -965,17 +965,17 @@ $root.vereign = (function () { options = {}; var object = {}; if (options.defaults) { - object.head = ""; - object.key = ""; object.cid = ""; + object.key = ""; + object.head = ""; object.ipnsKeyId = ""; } - if (message.head != null && message.hasOwnProperty("head")) - object.head = message.head; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; if (message.cid != null && message.hasOwnProperty("cid")) object.cid = message.cid; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.head != null && message.hasOwnProperty("head")) + object.head = message.head; if (message.ipnsKeyId != null && message.hasOwnProperty("ipnsKeyId")) object.ipnsKeyId = message.ipnsKeyId; return object; diff --git a/dist/index.js b/dist/index.js index 04de50511a1bf02c7a61238c090f246e9ddbce48..72d2d74973809087f2cfe7be991f07f7d536d536 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/dist/services/CryptoService/CryptoServiceNode.js b/dist/services/CryptoService/CryptoServiceNode.js index 85eef9eb2e5510f8604bd45ab1da5a6b7074d434..6d33bbf88bb582d2a53edf8863103461e655865a 100644 --- a/dist/services/CryptoService/CryptoServiceNode.js +++ b/dist/services/CryptoService/CryptoServiceNode.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/dist/types.d.ts b/dist/types.d.ts index 71dbbf0daf509ec50beda35c1db5b57c5a6b1577..17a25b551019a0178abcacee2132531826ee47ba 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -29,7 +29,7 @@ export interface IpfsAttachmentData { head: string; contentType: string; } -export declare type IpfsDataVersion = undefined | "v2"; +export type IpfsDataVersion = undefined | "v2"; export interface IpfsData { version: IpfsDataVersion; plaintText: IpfsContentData; @@ -136,7 +136,7 @@ export interface QrCodeData { encryptedData: Uint8Array; nonce: Uint8Array; } -export declare type StatusObject = SenderStatusObject | RecipientStatusObject; +export type StatusObject = SenderStatusObject | RecipientStatusObject; export interface KeyDataPair { key: string; data: string; diff --git a/dist/utils/common.js b/dist/utils/common.js index 0233c1a9f651d9dab519e99c61144382ab1fe5ee..86fbc868c752fad0bb056fd8c8249aa1f7a2ae61 100644 --- a/dist/utils/common.js +++ b/dist/utils/common.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/dist/utils/qrCodeTemplateUtils.d.ts b/dist/utils/qrCodeTemplateUtils.d.ts index e3e8c4fcc2b5ddb72a24040ff3d69733076846f0..6e2bb8a6498d0caa24be6ae4df4fcdc1a7b13303 100644 --- a/dist/utils/qrCodeTemplateUtils.d.ts +++ b/dist/utils/qrCodeTemplateUtils.d.ts @@ -5,7 +5,7 @@ interface TemplateOptions { /** * https://www.qrcode.com/en/about/error_correction.html#:~:text=QR%20Code%20has%20error%20correction,of%20data%20QR%20Code%20size. */ -declare type CorrectionLevels = "L" | "M" | "Q" | "H"; +type CorrectionLevels = "L" | "M" | "Q" | "H"; interface QrCodeOptions { width?: number; height?: number; diff --git a/dist/utils/qrCodeTemplateUtils.js b/dist/utils/qrCodeTemplateUtils.js index e9ac91648b713db83ba6718703a36530d17722c6..f38084bba0e768cad7fe3b21765fd774ba2d0a8d 100644 --- a/dist/utils/qrCodeTemplateUtils.js +++ b/dist/utils/qrCodeTemplateUtils.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -173,7 +177,7 @@ const generateQrCode = (text, qrCodeOptions, templateOptions) => { * @returns */ const generateNodeJSQrCode = (defaultOptions, qrCodeOptions, templateOptions) => __awaiter(void 0, void 0, void 0, function* () { - const QRCodeNodeJS = yield Promise.resolve().then(() => __importStar(require("easyqrcodejs-nodejs"))); + const QRCodeNodeJS = yield Promise.resolve().then(() => __importStar(require("easyqrcodejs-nodejs/index.js"))); defaultOptions["correctLevel"] = QRCodeNodeJS.CorrectLevel[qrCodeOptions.correctionLevel]; // L, M, Q, H const qrcode = new QRCodeNodeJS.default(defaultOptions); diff --git a/dist/utils/requestAdapter.d.ts b/dist/utils/requestAdapter.d.ts index 7a745667d92084e8fc29ce4918708deec9cfd461..f9ae2ab64f2c8769fdcca83bb22fbb44cde97d3d 100644 --- a/dist/utils/requestAdapter.d.ts +++ b/dist/utils/requestAdapter.d.ts @@ -12,7 +12,7 @@ export interface Response<T = unknown> { headers: unknown; config: RequestConfig; } -export declare type Request = (config: RequestConfig) => Promise<Response>; +export type Request = (config: RequestConfig) => Promise<Response>; declare const defaultRequest: Request; export declare class RequestError extends Error { config: RequestConfig;