UNPKG

@dojima-wallet/operator-gateway

Version:

Operator gateway client involving dojima stack

61 lines (47 loc) 106 kB
/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./lib/client.ts": /*!***********************!*\ !*** ./lib/client.ts ***! \***********************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.OperatorGatewayClient = exports.noop = void 0;\nvar operator_grpc_pb_1 = __webpack_require__(/*! ./proto/operator_grpc_pb */ \"./lib/proto/operator_grpc_pb.js\");\nvar grpc_js_1 = __webpack_require__(/*! @grpc/grpc-js */ \"@grpc/grpc-js\");\nvar operator_pb_1 = __webpack_require__(/*! ./proto/operator_pb */ \"./lib/proto/operator_pb.js\");\nvar query_pb_1 = __webpack_require__(/*! ./proto/query_pb */ \"./lib/proto/query_pb.js\");\nvar noop = function () { };\nexports.noop = noop;\nvar OperatorGatewayClient = /** @class */ (function () {\n function OperatorGatewayClient(_a) {\n var server = _a.server;\n this.client = new operator_grpc_pb_1.OperatorTxnsClient(server, grpc_js_1.credentials.createInsecure());\n }\n OperatorGatewayClient.prototype.addChainClient = function (params, callback) {\n return __awaiter(this, void 0, void 0, function () {\n var request, chain;\n return __generator(this, function (_a) {\n request = new operator_pb_1.AddChainClientRequest();\n chain = new query_pb_1.Chain();\n // Set chain properties\n chain.setTicker(params.chain.ticker);\n chain.setName(params.chain.name);\n chain.setId(params.chain.chainId);\n // Set the chain in the request\n request.setChain(chain);\n // Set RPC and WS hosts\n request.setRpchost(params.rpcUrl);\n request.setWshost(params.wsUrl);\n // Use the callback to handle the response\n this.client.addChainClient(request, function (error, response) {\n if (error) {\n console.error(\"Error adding chain client:\", error);\n callback(error, null);\n }\n else {\n callback(null, response);\n }\n });\n return [2 /*return*/];\n });\n });\n };\n return OperatorGatewayClient;\n}());\nexports.OperatorGatewayClient = OperatorGatewayClient;\n\n\n//# sourceURL=webpack://@dojima-wallet/operator-gateway/./lib/client.ts?"); /***/ }), /***/ "./lib/index.ts": /*!**********************!*\ !*** ./lib/index.ts ***! \**********************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar client_1 = __webpack_require__(/*! ./client */ \"./lib/client.ts\");\nvar OperatorInit = /** @class */ (function () {\n function OperatorInit(serverUrl, chainId, prefix) {\n this.client = new client_1.OperatorGatewayClient({\n server: serverUrl,\n chainId: chainId,\n prefix: prefix,\n });\n }\n return OperatorInit;\n}());\nexports[\"default\"] = OperatorInit;\n\n\n//# sourceURL=webpack://@dojima-wallet/operator-gateway/./lib/index.ts?"); /***/ }), /***/ "./lib/proto/operator_grpc_pb.js": /*!***************************************!*\ !*** ./lib/proto/operator_grpc_pb.js ***! \***************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; eval("// GENERATED CODE -- DO NOT EDIT!\n\n\nvar grpc = __webpack_require__(/*! @grpc/grpc-js */ \"@grpc/grpc-js\");\nvar operator_pb = __webpack_require__(/*! ./operator_pb.js */ \"./lib/proto/operator_pb.js\");\nvar query_pb = __webpack_require__(/*! ./query_pb.js */ \"./lib/proto/query_pb.js\");\n\nfunction serialize_AddChainClientRequest(arg) {\n if (!(arg instanceof operator_pb.AddChainClientRequest)) {\n throw new Error(\"Expected argument of type AddChainClientRequest\");\n }\n return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_AddChainClientRequest(buffer_arg) {\n return operator_pb.AddChainClientRequest.deserializeBinary(\n new Uint8Array(buffer_arg)\n );\n}\n\nfunction serialize_AddChainClientResponse(arg) {\n if (!(arg instanceof operator_pb.AddChainClientResponse)) {\n throw new Error(\"Expected argument of type AddChainClientResponse\");\n }\n return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_AddChainClientResponse(buffer_arg) {\n return operator_pb.AddChainClientResponse.deserializeBinary(\n new Uint8Array(buffer_arg)\n );\n}\n\nfunction serialize_TestRequest(arg) {\n if (!(arg instanceof query_pb.TestRequest)) {\n throw new Error(\"Expected argument of type TestRequest\");\n }\n return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_TestRequest(buffer_arg) {\n return query_pb.TestRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_TestResponse(arg) {\n if (!(arg instanceof query_pb.TestResponse)) {\n throw new Error(\"Expected argument of type TestResponse\");\n }\n return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_TestResponse(buffer_arg) {\n return query_pb.TestResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nvar OperatorTxnsService = (exports.OperatorTxnsService = {\n addChainClient: {\n path: \"/OperatorTxns/AddChainClient\",\n requestStream: false,\n responseStream: false,\n requestType: operator_pb.AddChainClientRequest,\n responseType: operator_pb.AddChainClientResponse,\n requestSerialize: serialize_AddChainClientRequest,\n requestDeserialize: deserialize_AddChainClientRequest,\n responseSerialize: serialize_AddChainClientResponse,\n responseDeserialize: deserialize_AddChainClientResponse,\n },\n test1: {\n path: \"/OperatorTxns/Test1\",\n requestStream: false,\n responseStream: false,\n requestType: query_pb.TestRequest,\n responseType: query_pb.TestResponse,\n requestSerialize: serialize_TestRequest,\n requestDeserialize: deserialize_TestRequest,\n responseSerialize: serialize_TestResponse,\n responseDeserialize: deserialize_TestResponse,\n },\n});\n\nexports.OperatorTxnsClient =\n grpc.makeGenericClientConstructor(OperatorTxnsService);\n\n\n//# sourceURL=webpack://@dojima-wallet/operator-gateway/./lib/proto/operator_grpc_pb.js?"); /***/ }), /***/ "./lib/proto/operator_pb.js": /*!**********************************!*\ !*** ./lib/proto/operator_pb.js ***! \**********************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("// source: operator.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n * field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = __webpack_require__(/*! google-protobuf */ \"google-protobuf\");\nvar goog = jspb;\nvar global = function () {\n if (this) {\n return this;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n return Function(\"return this\")();\n}.call(null);\n\nvar query_pb = __webpack_require__(/*! ./query_pb.js */ \"./lib/proto/query_pb.js\");\ngoog.object.extend(proto, query_pb);\ngoog.exportSymbol(\"proto.AddChainClientRequest\", null, global);\ngoog.exportSymbol(\"proto.AddChainClientResponse\", null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.AddChainClientRequest = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.AddChainClientRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.AddChainClientRequest.displayName = \"proto.AddChainClientRequest\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.AddChainClientResponse = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.AddChainClientResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.AddChainClientResponse.displayName = \"proto.AddChainClientResponse\";\n}\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n /**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\n proto.AddChainClientRequest.prototype.toObject = function (\n opt_includeInstance\n ) {\n return proto.AddChainClientRequest.toObject(opt_includeInstance, this);\n };\n\n /**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.AddChainClientRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\n proto.AddChainClientRequest.toObject = function (includeInstance, msg) {\n var f,\n obj = {\n chain:\n (f = msg.getChain()) && query_pb.Chain.toObject(includeInstance, f),\n rpchost: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\n wshost: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n };\n}\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.AddChainClientRequest}\n */\nproto.AddChainClientRequest.deserializeBinary = function (bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.AddChainClientRequest();\n return proto.AddChainClientRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.AddChainClientRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.AddChainClientRequest}\n */\nproto.AddChainClientRequest.deserializeBinaryFromReader = function (\n msg,\n reader\n) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = new query_pb.Chain();\n reader.readMessage(value, query_pb.Chain.deserializeBinaryFromReader);\n msg.setChain(value);\n break;\n case 2:\n var value = /** @type {string} */ (reader.readString());\n msg.setRpchost(value);\n break;\n case 3:\n var value = /** @type {string} */ (reader.readString());\n msg.setWshost(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.AddChainClientRequest.prototype.serializeBinary = function () {\n var writer = new jspb.BinaryWriter();\n proto.AddChainClientRequest.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.AddChainClientRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.AddChainClientRequest.serializeBinaryToWriter = function (\n message,\n writer\n) {\n var f = undefined;\n f = message.getChain();\n if (f != null) {\n writer.writeMessage(1, f, query_pb.Chain.serializeBinaryToWriter);\n }\n f = message.getRpchost();\n if (f.length > 0) {\n writer.writeString(2, f);\n }\n f = message.getWshost();\n if (f.length > 0) {\n writer.writeString(3, f);\n }\n};\n\n/**\n * optional Chain chain = 1;\n * @return {?proto.Chain}\n */\nproto.AddChainClientRequest.prototype.getChain = function () {\n return /** @type{?proto.Chain} */ (\n jspb.Message.getWrapperField(this, query_pb.Chain, 1)\n );\n};\n\n/**\n * @param {?proto.Chain|undefined} value\n * @return {!proto.AddChainClientRequest} returns this\n */\nproto.AddChainClientRequest.prototype.setChain = function (value) {\n return jspb.Message.setWrapperField(this, 1, value);\n};\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.AddChainClientRequest} returns this\n */\nproto.AddChainClientRequest.prototype.clearChain = function () {\n return this.setChain(undefined);\n};\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.AddChainClientRequest.prototype.hasChain = function () {\n return jspb.Message.getField(this, 1) != null;\n};\n\n/**\n * optional string rpcHost = 2;\n * @return {string}\n */\nproto.AddChainClientRequest.prototype.getRpchost = function () {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n/**\n * @param {string} value\n * @return {!proto.AddChainClientRequest} returns this\n */\nproto.AddChainClientRequest.prototype.setRpchost = function (value) {\n return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n/**\n * optional string wsHost = 3;\n * @return {string}\n */\nproto.AddChainClientRequest.prototype.getWshost = function () {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n/**\n * @param {string} value\n * @return {!proto.AddChainClientRequest} returns this\n */\nproto.AddChainClientRequest.prototype.setWshost = function (value) {\n return jspb.Message.setProto3StringField(this, 3, value);\n};\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n /**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\n proto.AddChainClientResponse.prototype.toObject = function (\n opt_includeInstance\n ) {\n return proto.AddChainClientResponse.toObject(opt_includeInstance, this);\n };\n\n /**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.AddChainClientResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\n proto.AddChainClientResponse.toObject = function (includeInstance, msg) {\n var f,\n obj = {};\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n };\n}\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.AddChainClientResponse}\n */\nproto.AddChainClientResponse.deserializeBinary = function (bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.AddChainClientResponse();\n return proto.AddChainClientResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.AddChainClientResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.AddChainClientResponse}\n */\nproto.AddChainClientResponse.deserializeBinaryFromReader = function (\n msg,\n reader\n) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.AddChainClientResponse.prototype.serializeBinary = function () {\n var writer = new jspb.BinaryWriter();\n proto.AddChainClientResponse.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.AddChainClientResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.AddChainClientResponse.serializeBinaryToWriter = function (\n message,\n writer\n) {\n var f = undefined;\n};\n\ngoog.object.extend(exports, proto);\n\n\n//# sourceURL=webpack://@dojima-wallet/operator-gateway/./lib/proto/operator_pb.js?"); /***/ }), /***/ "./lib/proto/query_pb.js": /*!*******************************!*\ !*** ./lib/proto/query_pb.js ***! \*******************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("// source: query.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n * field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = __webpack_require__(/*! google-protobuf */ \"google-protobuf\");\nvar goog = jspb;\nvar global = function () {\n if (this) {\n return this;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n return Function(\"return this\")();\n}.call(null);\n\ngoog.exportSymbol(\"proto.BlockRequest\", null, global);\ngoog.exportSymbol(\"proto.BlockResponse\", null, global);\ngoog.exportSymbol(\"proto.BroadcastRequest\", null, global);\ngoog.exportSymbol(\"proto.BroadcastResponse\", null, global);\ngoog.exportSymbol(\"proto.Chain\", null, global);\ngoog.exportSymbol(\"proto.ChainRPCMethodRequest\", null, global);\ngoog.exportSymbol(\"proto.ChainRPCMethodResponse\", null, global);\ngoog.exportSymbol(\"proto.SOLDataRequest\", null, global);\ngoog.exportSymbol(\"proto.TestRequest\", null, global);\ngoog.exportSymbol(\"proto.TestResponse\", null, global);\ngoog.exportSymbol(\"proto.TransactionRequest\", null, global);\ngoog.exportSymbol(\"proto.TransactionResponse\", null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.ChainRPCMethodRequest = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.ChainRPCMethodRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.ChainRPCMethodRequest.displayName = \"proto.ChainRPCMethodRequest\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.ChainRPCMethodResponse = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.ChainRPCMethodResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.ChainRPCMethodResponse.displayName = \"proto.ChainRPCMethodResponse\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.BroadcastRequest = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.BroadcastRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.BroadcastRequest.displayName = \"proto.BroadcastRequest\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.BroadcastResponse = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.BroadcastResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.BroadcastResponse.displayName = \"proto.BroadcastResponse\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Chain = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Chain, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Chain.displayName = \"proto.Chain\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.BlockRequest = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.BlockRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.BlockRequest.displayName = \"proto.BlockRequest\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.BlockResponse = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.BlockResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.BlockResponse.displayName = \"proto.BlockResponse\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TransactionRequest = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.TransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TransactionRequest.displayName = \"proto.TransactionRequest\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TransactionResponse = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.TransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TransactionResponse.displayName = \"proto.TransactionResponse\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.SOLDataRequest = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.SOLDataRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.SOLDataRequest.displayName = \"proto.SOLDataRequest\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TestRequest = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.TestRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TestRequest.displayName = \"proto.TestRequest\";\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TestResponse = function (opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.TestResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TestResponse.displayName = \"proto.TestResponse\";\n}\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n /**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\n proto.ChainRPCMethodRequest.prototype.toObject = function (\n opt_includeInstance\n ) {\n return proto.ChainRPCMethodRequest.toObject(opt_includeInstance, this);\n };\n\n /**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.ChainRPCMethodRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\n proto.ChainRPCMethodRequest.toObject = function (includeInstance, msg) {\n var f,\n obj = {\n chain: (f = msg.getChain()) && proto.Chain.toObject(includeInstance, f),\n methodname: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\n methoddata: msg.getMethoddata_asB64(),\n pubkey: msg.getPubkey_asB64(),\n signature: msg.getSignature_asB64(),\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n };\n}\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.ChainRPCMethodRequest}\n */\nproto.ChainRPCMethodRequest.deserializeBinary = function (bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.ChainRPCMethodRequest();\n return proto.ChainRPCMethodRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.ChainRPCMethodRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.ChainRPCMethodRequest}\n */\nproto.ChainRPCMethodRequest.deserializeBinaryFromReader = function (\n msg,\n reader\n) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = new proto.Chain();\n reader.readMessage(value, proto.Chain.deserializeBinaryFromReader);\n msg.setChain(value);\n break;\n case 2:\n var value = /** @type {string} */ (reader.readString());\n msg.setMethodname(value);\n break;\n case 3:\n var value = /** @type {!Uint8Array} */ (reader.readBytes());\n msg.setMethoddata(value);\n break;\n case 4:\n var value = /** @type {!Uint8Array} */ (reader.readBytes());\n msg.setPubkey(value);\n break;\n case 5:\n var value = /** @type {!Uint8Array} */ (reader.readBytes());\n msg.setSignature(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.ChainRPCMethodRequest.prototype.serializeBinary = function () {\n var writer = new jspb.BinaryWriter();\n proto.ChainRPCMethodRequest.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.ChainRPCMethodRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.ChainRPCMethodRequest.serializeBinaryToWriter = function (\n message,\n writer\n) {\n var f = undefined;\n f = message.getChain();\n if (f != null) {\n writer.writeMessage(1, f, proto.Chain.serializeBinaryToWriter);\n }\n f = message.getMethodname();\n if (f.length > 0) {\n writer.writeString(2, f);\n }\n f = message.getMethoddata_asU8();\n if (f.length > 0) {\n writer.writeBytes(3, f);\n }\n f = message.getPubkey_asU8();\n if (f.length > 0) {\n writer.writeBytes(4, f);\n }\n f = message.getSignature_asU8();\n if (f.length > 0) {\n writer.writeBytes(5, f);\n }\n};\n\n/**\n * optional Chain chain = 1;\n * @return {?proto.Chain}\n */\nproto.ChainRPCMethodRequest.prototype.getChain = function () {\n return /** @type{?proto.Chain} */ (\n jspb.Message.getWrapperField(this, proto.Chain, 1)\n );\n};\n\n/**\n * @param {?proto.Chain|undefined} value\n * @return {!proto.ChainRPCMethodRequest} returns this\n */\nproto.ChainRPCMethodRequest.prototype.setChain = function (value) {\n return jspb.Message.setWrapperField(this, 1, value);\n};\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.ChainRPCMethodRequest} returns this\n */\nproto.ChainRPCMethodRequest.prototype.clearChain = function () {\n return this.setChain(undefined);\n};\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.ChainRPCMethodRequest.prototype.hasChain = function () {\n return jspb.Message.getField(this, 1) != null;\n};\n\n/**\n * optional string MethodName = 2;\n * @return {string}\n */\nproto.ChainRPCMethodRequest.prototype.getMethodname = function () {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n/**\n * @param {string} value\n * @return {!proto.ChainRPCMethodRequest} returns this\n */\nproto.ChainRPCMethodRequest.prototype.setMethodname = function (value) {\n return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n/**\n * optional bytes MethodData = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.ChainRPCMethodRequest.prototype.getMethoddata = function () {\n return /** @type {!(string|Uint8Array)} */ (\n jspb.Message.getFieldWithDefault(this, 3, \"\")\n );\n};\n\n/**\n * optional bytes MethodData = 3;\n * This is a type-conversion wrapper around `getMethoddata()`\n * @return {string}\n */\nproto.ChainRPCMethodRequest.prototype.getMethoddata_asB64 = function () {\n return /** @type {string} */ (jspb.Message.bytesAsB64(this.getMethoddata()));\n};\n\n/**\n * optional bytes MethodData = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getMethoddata()`\n * @return {!Uint8Array}\n */\nproto.ChainRPCMethodRequest.prototype.getMethoddata_asU8 = function () {\n return /** @type {!Uint8Array} */ (\n jspb.Message.bytesAsU8(this.getMethoddata())\n );\n};\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.ChainRPCMethodRequest} returns this\n */\nproto.ChainRPCMethodRequest.prototype.setMethoddata = function (value) {\n return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n/**\n * optional bytes pubkey = 4;\n * @return {!(string|Uint8Array)}\n */\nproto.ChainRPCMethodRequest.prototype.getPubkey = function () {\n return /** @type {!(string|Uint8Array)} */ (\n jspb.Message.getFieldWithDefault(this, 4, \"\")\n );\n};\n\n/**\n * optional bytes pubkey = 4;\n * This is a type-conversion wrapper around `getPubkey()`\n * @return {string}\n */\nproto.ChainRPCMethodRequest.prototype.getPubkey_asB64 = function () {\n return /** @type {string} */ (jspb.Message.bytesAsB64(this.getPubkey()));\n};\n\n/**\n * optional bytes pubkey = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPubkey()`\n * @return {!Uint8Array}\n */\nproto.ChainRPCMethodRequest.prototype.getPubkey_asU8 = function () {\n return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getPubkey()));\n};\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.ChainRPCMethodRequest} returns this\n */\nproto.ChainRPCMethodRequest.prototype.setPubkey = function (value) {\n return jspb.Message.setProto3BytesField(this, 4, value);\n};\n\n/**\n * optional bytes signature = 5;\n * @return {!(string|Uint8Array)}\n */\nproto.ChainRPCMethodRequest.prototype.getSignature = function () {\n return /** @type {!(string|Uint8Array)} */ (\n jspb.Message.getFieldWithDefault(this, 5, \"\")\n );\n};\n\n/**\n * optional bytes signature = 5;\n * This is a type-conversion wrapper around `getSignature()`\n * @return {string}\n */\nproto.ChainRPCMethodRequest.prototype.getSignature_asB64 = function () {\n return /** @type {string} */ (jspb.Message.bytesAsB64(this.getSignature()));\n};\n\n/**\n * optional bytes signature = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignature()`\n * @return {!Uint8Array}\n */\nproto.ChainRPCMethodRequest.prototype.getSignature_asU8 = function () {\n return /** @type {!Uint8Array} */ (\n jspb.Message.bytesAsU8(this.getSignature())\n );\n};\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.ChainRPCMethodRequest} returns this\n */\nproto.ChainRPCMethodRequest.prototype.setSignature = function (value) {\n return jspb.Message.setProto3BytesField(this, 5, value);\n};\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n /**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\n proto.ChainRPCMethodResponse.prototype.toObject = function (\n opt_includeInstance\n ) {\n return proto.ChainRPCMethodResponse.toObject(opt_includeInstance, this);\n };\n\n /**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.ChainRPCMethodResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\n proto.ChainRPCMethodResponse.toObject = function (includeInstance, msg) {\n var f,\n obj = {\n result: msg.getResult_asB64(),\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n };\n}\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.ChainRPCMethodResponse}\n */\nproto.ChainRPCMethodResponse.deserializeBinary = function (bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.ChainRPCMethodResponse();\n return proto.ChainRPCMethodResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.ChainRPCMethodResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.ChainRPCMethodResponse}\n */\nproto.ChainRPCMethodResponse.deserializeBinaryFromReader = function (\n msg,\n reader\n) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = /** @type {!Uint8Array} */ (reader.readBytes());\n msg.setResult(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.ChainRPCMethodResponse.prototype.serializeBinary = function () {\n var writer = new jspb.BinaryWriter();\n proto.ChainRPCMethodResponse.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.ChainRPCMethodResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.ChainRPCMethodResponse.serializeBinaryToWriter = function (\n message,\n writer\n) {\n var f = undefined;\n f = message.getResult_asU8();\n if (f.length > 0) {\n writer.writeBytes(1, f);\n }\n};\n\n/**\n * optional bytes result = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.ChainRPCMethodResponse.prototype.getResult = function () {\n return /** @type {!(string|Uint8Array)} */ (\n jspb.Message.getFieldWithDefault(this, 1, \"\")\n );\n};\n\n/**\n * optional bytes result = 1;\n * This is a type-conversion wrapper around `getResult()`\n * @return {string}\n */\nproto.ChainRPCMethodResponse.prototype.getResult_asB64 = function () {\n return /** @type {string} */ (jspb.Message.bytesAsB64(this.getResult()));\n};\n\n/**\n * optional bytes result = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getResult()`\n * @return {!Uint8Array}\n */\nproto.ChainRPCMethodResponse.prototype.getResult_asU8 = function () {\n return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getResult()));\n};\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.ChainRPCMethodResponse} returns this\n */\nproto.ChainRPCMethodResponse.prototype.setResult = function (value) {\n return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n /**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\n proto.BroadcastRequest.prototype.toObject = function (opt_includeInstance) {\n return proto.BroadcastRequest.toObject(opt_includeInstance, this);\n };\n\n /**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.BroadcastRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\n proto.BroadcastRequest.toObject = function (includeInstance, msg) {\n var f,\n obj = {\n chain: (f = msg.getChain()) && proto.Chain.toObject(includeInstance, f),\n payload: msg.getPayload_asB64(),\n pubkey: msg.getPubkey_asB64(),\n signature: msg.getSignature_asB64(),\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n };\n}\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.BroadcastRequest}\n */\nproto.BroadcastRequest.deserializeBinary = function (bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.BroadcastRequest();\n return proto.BroadcastRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.BroadcastRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.BroadcastRequest}\n */\nproto.BroadcastRequest.deserializeBinaryFromReader = function (msg, reader) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = new proto.Chain();\n reader.readMessage(value, proto.Chain.deserializeBinaryFromReader);\n msg.setChain(value);\n break;\n case 2:\n var value = /** @type {!Uint8Array} */ (reader.readBytes());\n msg.setPayload(value);\n break;\n case 3:\n var value = /** @type {!Uint8Array} */ (reader.readBytes());\n msg.setPubkey(value);\n break;\n case 4:\n var value = /** @type {!Uint8Array} */ (reader.readBytes());\n msg.setSignature(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uin