diff --git a/dist/generated/qrcode_data_pb.js b/dist/generated/qrcode_data_pb.js index 3eb61e8ba0450908547aa7c3f89901406f591738..c76c848be9c8bb7cad8335ea0ddb7c36f5c9d051 100644 --- a/dist/generated/qrcode_data_pb.js +++ b/dist/generated/qrcode_data_pb.js @@ -2578,6 +2578,530 @@ $root.vereign = (function () { }; return DocumentData_V1; })(); + qrcode_data.SealDocumentHeadData_V1 = (function () { + /** + * Properties of a SealDocumentHeadData_V1. + * @memberof vereign.protobuf.qrcode_data + * @interface ISealDocumentHeadData_V1 + * @property {Uint8Array|null} [key] SealDocumentHeadData_V1 key + * @property {Uint8Array|null} [data] SealDocumentHeadData_V1 data + * @property {string|null} [ipfsIndexCid] SealDocumentHeadData_V1 ipfsIndexCid + */ + /** + * Constructs a new SealDocumentHeadData_V1. + * @memberof vereign.protobuf.qrcode_data + * @classdesc Reference + * https://community.vereign.com/t/seal-blockchain-status-storage-for-documents-and-beyond/371/6 + * Step 14 + * @implements ISealDocumentHeadData_V1 + * @constructor + * @param {vereign.protobuf.qrcode_data.ISealDocumentHeadData_V1=} [properties] Properties to set + */ + function SealDocumentHeadData_V1(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * SealDocumentHeadData_V1 key. + * @member {Uint8Array} key + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @instance + */ + SealDocumentHeadData_V1.prototype.key = $util.newBuffer([]); + /** + * SealDocumentHeadData_V1 data. + * @member {Uint8Array} data + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @instance + */ + SealDocumentHeadData_V1.prototype.data = $util.newBuffer([]); + /** + * SealDocumentHeadData_V1 ipfsIndexCid. + * @member {string} ipfsIndexCid + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @instance + */ + SealDocumentHeadData_V1.prototype.ipfsIndexCid = ""; + /** + * Creates a new SealDocumentHeadData_V1 instance using the specified properties. + * @function create + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {vereign.protobuf.qrcode_data.ISealDocumentHeadData_V1=} [properties] Properties to set + * @returns {vereign.protobuf.qrcode_data.SealDocumentHeadData_V1} SealDocumentHeadData_V1 instance + */ + SealDocumentHeadData_V1.create = function create(properties) { + return new SealDocumentHeadData_V1(properties); + }; + /** + * Encodes the specified SealDocumentHeadData_V1 message. Does not implicitly {@link vereign.protobuf.qrcode_data.SealDocumentHeadData_V1.verify|verify} messages. + * @function encode + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {vereign.protobuf.qrcode_data.ISealDocumentHeadData_V1} message SealDocumentHeadData_V1 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SealDocumentHeadData_V1.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.key); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.data); + if (message.ipfsIndexCid != null && Object.hasOwnProperty.call(message, "ipfsIndexCid")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.ipfsIndexCid); + return writer; + }; + /** + * Encodes the specified SealDocumentHeadData_V1 message, length delimited. Does not implicitly {@link vereign.protobuf.qrcode_data.SealDocumentHeadData_V1.verify|verify} messages. + * @function encodeDelimited + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {vereign.protobuf.qrcode_data.ISealDocumentHeadData_V1} message SealDocumentHeadData_V1 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SealDocumentHeadData_V1.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a SealDocumentHeadData_V1 message from the specified reader or buffer. + * @function decode + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vereign.protobuf.qrcode_data.SealDocumentHeadData_V1} SealDocumentHeadData_V1 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SealDocumentHeadData_V1.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vereign.protobuf.qrcode_data.SealDocumentHeadData_V1(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.ipfsIndexCid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a SealDocumentHeadData_V1 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vereign.protobuf.qrcode_data.SealDocumentHeadData_V1} SealDocumentHeadData_V1 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SealDocumentHeadData_V1.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a SealDocumentHeadData_V1 message. + * @function verify + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SealDocumentHeadData_V1.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.ipfsIndexCid != null && message.hasOwnProperty("ipfsIndexCid")) + if (!$util.isString(message.ipfsIndexCid)) + return "ipfsIndexCid: string expected"; + return null; + }; + /** + * Creates a SealDocumentHeadData_V1 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {Object.<string,*>} object Plain object + * @returns {vereign.protobuf.qrcode_data.SealDocumentHeadData_V1} SealDocumentHeadData_V1 + */ + SealDocumentHeadData_V1.fromObject = function fromObject(object) { + if (object instanceof $root.vereign.protobuf.qrcode_data.SealDocumentHeadData_V1) + return object; + var message = new $root.vereign.protobuf.qrcode_data.SealDocumentHeadData_V1(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.ipfsIndexCid != null) + message.ipfsIndexCid = String(object.ipfsIndexCid); + return message; + }; + /** + * Creates a plain object from a SealDocumentHeadData_V1 message. Also converts values to other types if specified. + * @function toObject + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @static + * @param {vereign.protobuf.qrcode_data.SealDocumentHeadData_V1} message SealDocumentHeadData_V1 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + SealDocumentHeadData_V1.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.ipfsIndexCid = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.ipfsIndexCid != null && message.hasOwnProperty("ipfsIndexCid")) + object.ipfsIndexCid = message.ipfsIndexCid; + return object; + }; + /** + * Converts this SealDocumentHeadData_V1 to JSON. + * @function toJSON + * @memberof vereign.protobuf.qrcode_data.SealDocumentHeadData_V1 + * @instance + * @returns {Object.<string,*>} JSON object + */ + SealDocumentHeadData_V1.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + return SealDocumentHeadData_V1; + })(); + qrcode_data.SealIndexObject_V1 = (function () { + /** + * Properties of a SealIndexObject_V1. + * @memberof vereign.protobuf.qrcode_data + * @interface ISealIndexObject_V1 + * @property {Uint8Array|null} [sealKey] SealIndexObject_V1 sealKey + * @property {string|null} [sealTailCid] SealIndexObject_V1 sealTailCid + * @property {string|null} [chain] SealIndexObject_V1 chain + * @property {string|null} [block] SealIndexObject_V1 block + * @property {string|null} [transactionId] SealIndexObject_V1 transactionId + * @property {string|null} [hashBatchId] SealIndexObject_V1 hashBatchId + */ + /** + * Constructs a new SealIndexObject_V1. + * @memberof vereign.protobuf.qrcode_data + * @classdesc Represents a SealIndexObject_V1. + * @implements ISealIndexObject_V1 + * @constructor + * @param {vereign.protobuf.qrcode_data.ISealIndexObject_V1=} [properties] Properties to set + */ + function SealIndexObject_V1(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * SealIndexObject_V1 sealKey. + * @member {Uint8Array} sealKey + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @instance + */ + SealIndexObject_V1.prototype.sealKey = $util.newBuffer([]); + /** + * SealIndexObject_V1 sealTailCid. + * @member {string} sealTailCid + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @instance + */ + SealIndexObject_V1.prototype.sealTailCid = ""; + /** + * SealIndexObject_V1 chain. + * @member {string} chain + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @instance + */ + SealIndexObject_V1.prototype.chain = ""; + /** + * SealIndexObject_V1 block. + * @member {string} block + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @instance + */ + SealIndexObject_V1.prototype.block = ""; + /** + * SealIndexObject_V1 transactionId. + * @member {string} transactionId + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @instance + */ + SealIndexObject_V1.prototype.transactionId = ""; + /** + * SealIndexObject_V1 hashBatchId. + * @member {string} hashBatchId + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @instance + */ + SealIndexObject_V1.prototype.hashBatchId = ""; + /** + * Creates a new SealIndexObject_V1 instance using the specified properties. + * @function create + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {vereign.protobuf.qrcode_data.ISealIndexObject_V1=} [properties] Properties to set + * @returns {vereign.protobuf.qrcode_data.SealIndexObject_V1} SealIndexObject_V1 instance + */ + SealIndexObject_V1.create = function create(properties) { + return new SealIndexObject_V1(properties); + }; + /** + * Encodes the specified SealIndexObject_V1 message. Does not implicitly {@link vereign.protobuf.qrcode_data.SealIndexObject_V1.verify|verify} messages. + * @function encode + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {vereign.protobuf.qrcode_data.ISealIndexObject_V1} message SealIndexObject_V1 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SealIndexObject_V1.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sealKey != null && Object.hasOwnProperty.call(message, "sealKey")) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.sealKey); + if (message.sealTailCid != null && Object.hasOwnProperty.call(message, "sealTailCid")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.sealTailCid); + if (message.chain != null && Object.hasOwnProperty.call(message, "chain")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.chain); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.block); + if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) + writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.transactionId); + if (message.hashBatchId != null && Object.hasOwnProperty.call(message, "hashBatchId")) + writer.uint32(/* id 6, wireType 2 =*/ 50).string(message.hashBatchId); + return writer; + }; + /** + * Encodes the specified SealIndexObject_V1 message, length delimited. Does not implicitly {@link vereign.protobuf.qrcode_data.SealIndexObject_V1.verify|verify} messages. + * @function encodeDelimited + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {vereign.protobuf.qrcode_data.ISealIndexObject_V1} message SealIndexObject_V1 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SealIndexObject_V1.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a SealIndexObject_V1 message from the specified reader or buffer. + * @function decode + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vereign.protobuf.qrcode_data.SealIndexObject_V1} SealIndexObject_V1 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SealIndexObject_V1.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vereign.protobuf.qrcode_data.SealIndexObject_V1(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sealKey = reader.bytes(); + break; + case 2: + message.sealTailCid = reader.string(); + break; + case 3: + message.chain = reader.string(); + break; + case 4: + message.block = reader.string(); + break; + case 5: + message.transactionId = reader.string(); + break; + case 6: + message.hashBatchId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a SealIndexObject_V1 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vereign.protobuf.qrcode_data.SealIndexObject_V1} SealIndexObject_V1 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SealIndexObject_V1.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a SealIndexObject_V1 message. + * @function verify + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SealIndexObject_V1.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sealKey != null && message.hasOwnProperty("sealKey")) + if (!(message.sealKey && typeof message.sealKey.length === "number" || $util.isString(message.sealKey))) + return "sealKey: buffer expected"; + if (message.sealTailCid != null && message.hasOwnProperty("sealTailCid")) + if (!$util.isString(message.sealTailCid)) + return "sealTailCid: string expected"; + if (message.chain != null && message.hasOwnProperty("chain")) + if (!$util.isString(message.chain)) + return "chain: string expected"; + if (message.block != null && message.hasOwnProperty("block")) + if (!$util.isString(message.block)) + return "block: string expected"; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + if (!$util.isString(message.transactionId)) + return "transactionId: string expected"; + if (message.hashBatchId != null && message.hasOwnProperty("hashBatchId")) + if (!$util.isString(message.hashBatchId)) + return "hashBatchId: string expected"; + return null; + }; + /** + * Creates a SealIndexObject_V1 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {Object.<string,*>} object Plain object + * @returns {vereign.protobuf.qrcode_data.SealIndexObject_V1} SealIndexObject_V1 + */ + SealIndexObject_V1.fromObject = function fromObject(object) { + if (object instanceof $root.vereign.protobuf.qrcode_data.SealIndexObject_V1) + return object; + var message = new $root.vereign.protobuf.qrcode_data.SealIndexObject_V1(); + if (object.sealKey != null) + if (typeof object.sealKey === "string") + $util.base64.decode(object.sealKey, message.sealKey = $util.newBuffer($util.base64.length(object.sealKey)), 0); + else if (object.sealKey.length) + message.sealKey = object.sealKey; + if (object.sealTailCid != null) + message.sealTailCid = String(object.sealTailCid); + if (object.chain != null) + message.chain = String(object.chain); + if (object.block != null) + message.block = String(object.block); + if (object.transactionId != null) + message.transactionId = String(object.transactionId); + if (object.hashBatchId != null) + message.hashBatchId = String(object.hashBatchId); + return message; + }; + /** + * Creates a plain object from a SealIndexObject_V1 message. Also converts values to other types if specified. + * @function toObject + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @static + * @param {vereign.protobuf.qrcode_data.SealIndexObject_V1} message SealIndexObject_V1 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + SealIndexObject_V1.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.sealKey = ""; + else { + object.sealKey = []; + if (options.bytes !== Array) + object.sealKey = $util.newBuffer(object.sealKey); + } + object.sealTailCid = ""; + object.chain = ""; + object.block = ""; + object.transactionId = ""; + object.hashBatchId = ""; + } + if (message.sealKey != null && message.hasOwnProperty("sealKey")) + object.sealKey = options.bytes === String ? $util.base64.encode(message.sealKey, 0, message.sealKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sealKey) : message.sealKey; + if (message.sealTailCid != null && message.hasOwnProperty("sealTailCid")) + object.sealTailCid = message.sealTailCid; + if (message.chain != null && message.hasOwnProperty("chain")) + object.chain = message.chain; + if (message.block != null && message.hasOwnProperty("block")) + object.block = message.block; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + object.transactionId = message.transactionId; + if (message.hashBatchId != null && message.hasOwnProperty("hashBatchId")) + object.hashBatchId = message.hashBatchId; + return object; + }; + /** + * Converts this SealIndexObject_V1 to JSON. + * @function toJSON + * @memberof vereign.protobuf.qrcode_data.SealIndexObject_V1 + * @instance + * @returns {Object.<string,*>} JSON object + */ + SealIndexObject_V1.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + return SealIndexObject_V1; + })(); return qrcode_data; })(); return protobuf;