UNPKG

bifcore-sdk-nodejs-bop-test

Version:
581 lines (493 loc) 18.5 kB
/* eslint-disable */ /** * @fileoverview * @enhanceable * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.protocol.ConfidentialAsset', null, global); goog.exportSymbol('proto.protocol.ConfidentialTx', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.ConfidentialAsset = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.ConfidentialAsset, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.ConfidentialAsset.displayName = 'proto.protocol.ConfidentialAsset'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.ConfidentialAsset.prototype.toObject = function (opt_includeInstance) { return proto.protocol.ConfidentialAsset.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.ConfidentialAsset} msg The msg instance to transform. * @return {!Object} */ proto.protocol.ConfidentialAsset.toObject = function (includeInstance, msg) { var f, obj = { id: msg.getId(), commit: msg.getCommit(), rangeProof: msg.getRangeProof(), encryptValue: msg.getEncryptValue(), fromPubkey: msg.getFromPubkey(), to: msg.getTo() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.ConfidentialAsset} */ proto.protocol.ConfidentialAsset.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.ConfidentialAsset; return proto.protocol.ConfidentialAsset.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.ConfidentialAsset} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.ConfidentialAsset} */ proto.protocol.ConfidentialAsset.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCommit(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setRangeProof(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setEncryptValue(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setFromPubkey(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setTo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.protocol.ConfidentialAsset} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.ConfidentialAsset.serializeBinaryToWriter = function (message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.ConfidentialAsset.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.protocol.ConfidentialAsset.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getCommit(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getRangeProof(); if (f.length > 0) { writer.writeString( 3, f ); } f = this.getEncryptValue(); if (f.length > 0) { writer.writeString( 4, f ); } f = this.getFromPubkey(); if (f.length > 0) { writer.writeString( 5, f ); } f = this.getTo(); if (f.length > 0) { writer.writeString( 6, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.ConfidentialAsset} The clone. */ proto.protocol.ConfidentialAsset.prototype.cloneMessage = function () { return /** @type {!proto.protocol.ConfidentialAsset} */ (jspb.Message.cloneMessage(this)); }; /** * optional string id = 1; * @return {string} */ proto.protocol.ConfidentialAsset.prototype.getId = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.protocol.ConfidentialAsset.prototype.setId = function (value) { jspb.Message.setField(this, 1, value); }; /** * optional string commit = 2; * @return {string} */ proto.protocol.ConfidentialAsset.prototype.getCommit = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.protocol.ConfidentialAsset.prototype.setCommit = function (value) { jspb.Message.setField(this, 2, value); }; /** * optional string range_proof = 3; * @return {string} */ proto.protocol.ConfidentialAsset.prototype.getRangeProof = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** @param {string} value */ proto.protocol.ConfidentialAsset.prototype.setRangeProof = function (value) { jspb.Message.setField(this, 3, value); }; /** * optional string encrypt_value = 4; * @return {string} */ proto.protocol.ConfidentialAsset.prototype.getEncryptValue = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** @param {string} value */ proto.protocol.ConfidentialAsset.prototype.setEncryptValue = function (value) { jspb.Message.setField(this, 4, value); }; /** * optional string from_pubkey = 5; * @return {string} */ proto.protocol.ConfidentialAsset.prototype.getFromPubkey = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, "")); }; /** @param {string} value */ proto.protocol.ConfidentialAsset.prototype.setFromPubkey = function (value) { jspb.Message.setField(this, 5, value); }; /** * optional string to = 6; * @return {string} */ proto.protocol.ConfidentialAsset.prototype.getTo = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, "")); }; /** @param {string} value */ proto.protocol.ConfidentialAsset.prototype.setTo = function (value) { jspb.Message.setField(this, 6, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.protocol.ConfidentialTx = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ConfidentialTx.repeatedFields_, null); }; goog.inherits(proto.protocol.ConfidentialTx, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.ConfidentialTx.displayName = 'proto.protocol.ConfidentialTx'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.ConfidentialTx.repeatedFields_ = [3, 4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.ConfidentialTx.prototype.toObject = function (opt_includeInstance) { return proto.protocol.ConfidentialTx.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.protocol.ConfidentialTx} msg The msg instance to transform. * @return {!Object} */ proto.protocol.ConfidentialTx.toObject = function (includeInstance, msg) { var f, obj = { excessSig: msg.getExcessSig(), excessMsg: msg.getExcessMsg(), inputsList: jspb.Message.toObjectList(msg.getInputsList(), proto.protocol.ConfidentialAsset.toObject, includeInstance), outputsList: jspb.Message.toObjectList(msg.getOutputsList(), proto.protocol.ConfidentialAsset.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.ConfidentialTx} */ proto.protocol.ConfidentialTx.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.ConfidentialTx; return proto.protocol.ConfidentialTx.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.ConfidentialTx} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.ConfidentialTx} */ proto.protocol.ConfidentialTx.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setExcessSig(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setExcessMsg(value); break; case 3: var value = new proto.protocol.ConfidentialAsset; reader.readMessage(value, proto.protocol.ConfidentialAsset.deserializeBinaryFromReader); msg.getInputsList().push(value); msg.setInputsList(msg.getInputsList()); break; case 4: var value = new proto.protocol.ConfidentialAsset; reader.readMessage(value, proto.protocol.ConfidentialAsset.deserializeBinaryFromReader); msg.getOutputsList().push(value); msg.setOutputsList(msg.getOutputsList()); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.protocol.ConfidentialTx} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.ConfidentialTx.serializeBinaryToWriter = function (message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.ConfidentialTx.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.protocol.ConfidentialTx.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getExcessSig(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getExcessMsg(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getInputsList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, proto.protocol.ConfidentialAsset.serializeBinaryToWriter ); } f = this.getOutputsList(); if (f.length > 0) { writer.writeRepeatedMessage( 4, f, proto.protocol.ConfidentialAsset.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.ConfidentialTx} The clone. */ proto.protocol.ConfidentialTx.prototype.cloneMessage = function () { return /** @type {!proto.protocol.ConfidentialTx} */ (jspb.Message.cloneMessage(this)); }; /** * optional string excess_sig = 1; * @return {string} */ proto.protocol.ConfidentialTx.prototype.getExcessSig = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.protocol.ConfidentialTx.prototype.setExcessSig = function (value) { jspb.Message.setField(this, 1, value); }; /** * optional string excess_msg = 2; * @return {string} */ proto.protocol.ConfidentialTx.prototype.getExcessMsg = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.protocol.ConfidentialTx.prototype.setExcessMsg = function (value) { jspb.Message.setField(this, 2, value); }; /** * repeated ConfidentialAsset inputs = 3; * If you change this array by adding, removing or replacing elements, or if you * replace the array itself, then you must call the setter to update it. * @return {!Array.<!proto.protocol.ConfidentialAsset>} */ proto.protocol.ConfidentialTx.prototype.getInputsList = function () { return /** @type{!Array.<!proto.protocol.ConfidentialAsset>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.protocol.ConfidentialAsset, 3)); }; /** @param {Array.<!proto.protocol.ConfidentialAsset>} value */ proto.protocol.ConfidentialTx.prototype.setInputsList = function (value) { jspb.Message.setRepeatedWrapperField(this, 3, value); }; proto.protocol.ConfidentialTx.prototype.clearInputsList = function () { this.setInputsList([]); }; /** * repeated ConfidentialAsset outputs = 4; * If you change this array by adding, removing or replacing elements, or if you * replace the array itself, then you must call the setter to update it. * @return {!Array.<!proto.protocol.ConfidentialAsset>} */ proto.protocol.ConfidentialTx.prototype.getOutputsList = function () { return /** @type{!Array.<!proto.protocol.ConfidentialAsset>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.protocol.ConfidentialAsset, 4)); }; /** @param {Array.<!proto.protocol.ConfidentialAsset>} value */ proto.protocol.ConfidentialTx.prototype.setOutputsList = function (value) { jspb.Message.setRepeatedWrapperField(this, 4, value); }; proto.protocol.ConfidentialTx.prototype.clearOutputsList = function () { this.setOutputsList([]); }; goog.object.extend(exports, proto.protocol);