@caict/bop-typescript-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +112 -0
- package/package.json +90 -0
- package/src/bop/bop-base/README.md +5 -0
- package/src/bop/bop-base/base.ts +366 -0
- package/src/bop/bop-base/index.ts +83 -0
- package/src/bop/bop-base/permit.ts +116 -0
- package/src/bop/bop-base/test/base.test.ts +867 -0
- package/src/bop/bop-base/test/index.test.ts +69 -0
- package/src/bop/bop-base/test/permit.test.ts +125 -0
- package/src/bop/bop-base/tsconfig.json +8 -0
- package/src/bop/bop-proto/README.md +2 -0
- package/src/bop/bop-proto/bop-ws.proto +266 -0
- package/src/bop/bop-proto/bop-ws.ts +4447 -0
- package/src/bop/bop-proto/bop.proto +898 -0
- package/src/bop/bop-proto/bop.ts +12890 -0
- package/src/bop/bop-proto/tsconfig.json +8 -0
- package/src/bop/bop-ws/index.ts +315 -0
- package/src/bop/bop-ws/sample/sample.ts +107 -0
- package/src/bop/bop-ws/tsconfig.json +8 -0
- package/src/bop/index.ts +14 -0
- package/src/bop-sdk/index.ts +22 -0
- package/src/bop-sdk/interface/abstract-service/abstract-account.ts +23 -0
- package/src/bop-sdk/interface/abstract-service/abstract-chain.ts +9 -0
- package/src/bop-sdk/interface/abstract-service/abstract-contract.ts +16 -0
- package/src/bop-sdk/interface/abstract-service/abstract-ledger.ts +15 -0
- package/src/bop-sdk/interface/abstract-service/abstract-provider.ts +13 -0
- package/src/bop-sdk/interface/abstract-service/abstract-signer.ts +133 -0
- package/src/bop-sdk/interface/abstract-service/abstract-transaction.ts +86 -0
- package/src/bop-sdk/interface/provider-ws.ts +10 -0
- package/src/bop-sdk/interface/provider.ts +22 -0
- package/src/bop-sdk/interface/service/3rd.ts +54 -0
- package/src/bop-sdk/interface/service/account.ts +86 -0
- package/src/bop-sdk/interface/service/chain.ts +27 -0
- package/src/bop-sdk/interface/service/contract.ts +51 -0
- package/src/bop-sdk/interface/service/helper.ts +426 -0
- package/src/bop-sdk/interface/service/ledger.ts +75 -0
- package/src/bop-sdk/interface/service/offline/check/index.js +138 -0
- package/src/bop-sdk/interface/service/offline/common/constant.js +6 -0
- package/src/bop-sdk/interface/service/offline/common/snowFlakeUtils.js +192 -0
- package/src/bop-sdk/interface/service/offline/common/util.js +511 -0
- package/src/bop-sdk/interface/service/offline/exception/customErrors.js +29 -0
- package/src/bop-sdk/interface/service/offline/exception/errors.js +90 -0
- package/src/bop-sdk/interface/service/offline/exception/index.js +5 -0
- package/src/bop-sdk/interface/service/offline/operation/accountCreateOperation.js +28 -0
- package/src/bop-sdk/interface/service/offline/operation/accountSetMetadataOperation.js +44 -0
- package/src/bop-sdk/interface/service/offline/operation/accountSetPrivilegeOperation.js +49 -0
- package/src/bop-sdk/interface/service/offline/operation/contractCreateOperation.js +43 -0
- package/src/bop-sdk/interface/service/offline/operation/contractInvokeOperation.js +42 -0
- package/src/bop-sdk/interface/service/offline/operation/contractInvokeRequestOperation.js +69 -0
- package/src/bop-sdk/interface/service/offline/operation/gasSendOperation.js +29 -0
- package/src/bop-sdk/interface/service/offline/operation/gasSendRequestOperation.js +61 -0
- package/src/bop-sdk/interface/service/offline/operation/index.js +20 -0
- package/src/bop-sdk/interface/service/offline/proto/chain_pb.js +12079 -0
- package/src/bop-sdk/interface/service/offline/proto/common_pb.js +2867 -0
- package/src/bop-sdk/interface/service/offline/transaction/index.js +988 -0
- package/src/bop-sdk/interface/service/offline/transaction/operations.js +188 -0
- package/src/bop-sdk/interface/service/offline/validate/account.js +152 -0
- package/src/bop-sdk/interface/service/offline/validate/contract.js +101 -0
- package/src/bop-sdk/interface/service/offline/validate/index.js +10 -0
- package/src/bop-sdk/interface/service/offline/validate/transaction.js +51 -0
- package/src/bop-sdk/interface/service/transaction.ts +731 -0
- package/src/bop-sdk/interface/signer.ts +46 -0
- package/src/bop-sdk/interface/test/3rd.test.ts +1571 -0
- package/src/bop-sdk/interface/test/account.test.ts +284 -0
- package/src/bop-sdk/interface/test/chain.test.ts +45 -0
- package/src/bop-sdk/interface/test/contract.test.ts +283 -0
- package/src/bop-sdk/interface/test/ledger.test.ts +166 -0
- package/src/bop-sdk/interface/test/provider.test.ts +407 -0
- package/src/bop-sdk/interface/test/signer.test.ts +105 -0
- package/src/bop-sdk/interface/test/transaction.test.ts +713 -0
- package/src/bop-sdk/proto/bop-sdk-common.proto +159 -0
- package/src/bop-sdk/proto/bop-sdk-common.ts +829 -0
- package/src/bop-sdk/proto/bop-sdk-interface.proto +581 -0
- package/src/bop-sdk/proto/bop-sdk-interface.ts +10839 -0
- package/src/bop-sdk/proto/bop-sdk-utils.proto +86 -0
- package/src/bop-sdk/proto/bop-sdk-utils.ts +1495 -0
- package/src/bop-sdk/utils/abi/abi-coder.ts +147 -0
- package/src/bop-sdk/utils/abi/address.ts +109 -0
- package/src/bop-sdk/utils/abi/bignumber.ts +403 -0
- package/src/bop-sdk/utils/abi/bytes.ts +565 -0
- package/src/bop-sdk/utils/abi/coders/abstract-coder.ts +239 -0
- package/src/bop-sdk/utils/abi/coders/address.ts +58 -0
- package/src/bop-sdk/utils/abi/coders/anonymous.ts +25 -0
- package/src/bop-sdk/utils/abi/coders/array.ts +275 -0
- package/src/bop-sdk/utils/abi/coders/boolean.ts +21 -0
- package/src/bop-sdk/utils/abi/coders/bytes.ts +36 -0
- package/src/bop-sdk/utils/abi/coders/fixed-bytes.ts +35 -0
- package/src/bop-sdk/utils/abi/coders/null.ts +25 -0
- package/src/bop-sdk/utils/abi/coders/number.ts +56 -0
- package/src/bop-sdk/utils/abi/coders/string.ts +24 -0
- package/src/bop-sdk/utils/abi/coders/tuple.ts +73 -0
- package/src/bop-sdk/utils/abi/constants/addresses.ts +1 -0
- package/src/bop-sdk/utils/abi/constants/bignumbers.ts +30 -0
- package/src/bop-sdk/utils/abi/constants/hashes.ts +2 -0
- package/src/bop-sdk/utils/abi/constants/index.ts +15 -0
- package/src/bop-sdk/utils/abi/constants/strings.ts +2 -0
- package/src/bop-sdk/utils/abi/fragments.ts +1243 -0
- package/src/bop-sdk/utils/abi/id.ts +6 -0
- package/src/bop-sdk/utils/abi/index.ts +46 -0
- package/src/bop-sdk/utils/abi/interface.ts +921 -0
- package/src/bop-sdk/utils/abi/keccak256.ts +9 -0
- package/src/bop-sdk/utils/abi/properties.ts +172 -0
- package/src/bop-sdk/utils/abi/strings/bytes32.ts +40 -0
- package/src/bop-sdk/utils/abi/strings/idna.ts +258 -0
- package/src/bop-sdk/utils/abi/strings/index.ts +28 -0
- package/src/bop-sdk/utils/abi/strings/utf8.ts +373 -0
- package/src/bop-sdk/utils/encryption-address.ts +501 -0
- package/src/bop-sdk/utils/encryption-crypto.ts +427 -0
- package/src/bop-sdk/utils/encryption-mnemonics.ts +120 -0
- package/src/bop-sdk/utils/index.ts +27 -0
- package/src/bop-sdk/utils/logger.ts +480 -0
- package/src/index.ts +35 -0
|
@@ -0,0 +1,2867 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview
|
|
3
|
+
* @enhanceable
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
7
|
+
|
|
8
|
+
var jspb = require("google-protobuf");
|
|
9
|
+
var goog = jspb;
|
|
10
|
+
var global = Function("return this")();
|
|
11
|
+
|
|
12
|
+
goog.exportSymbol("proto.protocol.BoolValue", null, global);
|
|
13
|
+
goog.exportSymbol("proto.protocol.ERRORCODE", null, global);
|
|
14
|
+
goog.exportSymbol("proto.protocol.FeeConfig", null, global);
|
|
15
|
+
goog.exportSymbol("proto.protocol.FeeConfig.Type", null, global);
|
|
16
|
+
goog.exportSymbol("proto.protocol.Int32Value", null, global);
|
|
17
|
+
goog.exportSymbol("proto.protocol.KeyPair", null, global);
|
|
18
|
+
goog.exportSymbol("proto.protocol.LedgerUpgrade", null, global);
|
|
19
|
+
goog.exportSymbol("proto.protocol.ModifyKey", null, global);
|
|
20
|
+
goog.exportSymbol("proto.protocol.NewKey", null, global);
|
|
21
|
+
goog.exportSymbol("proto.protocol.Ping", null, global);
|
|
22
|
+
goog.exportSymbol("proto.protocol.Pong", null, global);
|
|
23
|
+
goog.exportSymbol("proto.protocol.Signature", null, global);
|
|
24
|
+
goog.exportSymbol("proto.protocol.Snapshot", null, global);
|
|
25
|
+
goog.exportSymbol("proto.protocol.StringValue", null, global);
|
|
26
|
+
goog.exportSymbol("proto.protocol.Validator", null, global);
|
|
27
|
+
goog.exportSymbol("proto.protocol.ValidatorSet", null, global);
|
|
28
|
+
goog.exportSymbol("proto.protocol.WsMessage", null, global);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Generated by JsPbCodeGenerator.
|
|
32
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
33
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
34
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
35
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
36
|
+
* valid.
|
|
37
|
+
* @extends {jspb.Message}
|
|
38
|
+
* @constructor
|
|
39
|
+
*/
|
|
40
|
+
proto.protocol.KeyPair = function (opt_data) {
|
|
41
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
42
|
+
};
|
|
43
|
+
goog.inherits(proto.protocol.KeyPair, jspb.Message);
|
|
44
|
+
if (goog.DEBUG && !COMPILED) {
|
|
45
|
+
proto.protocol.KeyPair.displayName = "proto.protocol.KeyPair";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
49
|
+
/**
|
|
50
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
51
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
52
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
53
|
+
* For the list of reserved names please see:
|
|
54
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
55
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
56
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
57
|
+
* @return {!Object}
|
|
58
|
+
*/
|
|
59
|
+
proto.protocol.KeyPair.prototype.toObject = function (opt_includeInstance) {
|
|
60
|
+
return proto.protocol.KeyPair.toObject(opt_includeInstance, this);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Static version of the {@see toObject} method.
|
|
65
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
66
|
+
* instance for transitional soy proto support:
|
|
67
|
+
* http://goto/soy-param-migration
|
|
68
|
+
* @param {!proto.protocol.KeyPair} msg The msg instance to transform.
|
|
69
|
+
* @return {!Object}
|
|
70
|
+
*/
|
|
71
|
+
proto.protocol.KeyPair.toObject = function (includeInstance, msg) {
|
|
72
|
+
var f,
|
|
73
|
+
obj = {
|
|
74
|
+
key: msg.getKey(),
|
|
75
|
+
value: msg.getValue(),
|
|
76
|
+
version: msg.getVersion(),
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
if (includeInstance) {
|
|
80
|
+
obj.$jspbMessageInstance = msg;
|
|
81
|
+
}
|
|
82
|
+
return obj;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Deserializes binary data (in protobuf wire format).
|
|
88
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
89
|
+
* @return {!proto.protocol.KeyPair}
|
|
90
|
+
*/
|
|
91
|
+
proto.protocol.KeyPair.deserializeBinary = function (bytes) {
|
|
92
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
93
|
+
var msg = new proto.protocol.KeyPair();
|
|
94
|
+
return proto.protocol.KeyPair.deserializeBinaryFromReader(msg, reader);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
99
|
+
* given reader into the given message object.
|
|
100
|
+
* @param {!proto.protocol.KeyPair} msg The message object to deserialize into.
|
|
101
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
102
|
+
* @return {!proto.protocol.KeyPair}
|
|
103
|
+
*/
|
|
104
|
+
proto.protocol.KeyPair.deserializeBinaryFromReader = function (msg, reader) {
|
|
105
|
+
while (reader.nextField()) {
|
|
106
|
+
if (reader.isEndGroup()) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
var field = reader.getFieldNumber();
|
|
110
|
+
switch (field) {
|
|
111
|
+
case 1:
|
|
112
|
+
var value = /** @type {string} */ (reader.readString());
|
|
113
|
+
msg.setKey(value);
|
|
114
|
+
break;
|
|
115
|
+
case 2:
|
|
116
|
+
var value = /** @type {string} */ (reader.readString());
|
|
117
|
+
msg.setValue(value);
|
|
118
|
+
break;
|
|
119
|
+
case 3:
|
|
120
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
121
|
+
msg.setVersion(value);
|
|
122
|
+
break;
|
|
123
|
+
default:
|
|
124
|
+
reader.skipField();
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return msg;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Class method variant: serializes the given message to binary data
|
|
133
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
134
|
+
* @param {!proto.protocol.KeyPair} message
|
|
135
|
+
* @param {!jspb.BinaryWriter} writer
|
|
136
|
+
*/
|
|
137
|
+
proto.protocol.KeyPair.serializeBinaryToWriter = function (message, writer) {
|
|
138
|
+
message.serializeBinaryToWriter(writer);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
143
|
+
* @return {!Uint8Array}
|
|
144
|
+
*/
|
|
145
|
+
proto.protocol.KeyPair.prototype.serializeBinary = function () {
|
|
146
|
+
var writer = new jspb.BinaryWriter();
|
|
147
|
+
this.serializeBinaryToWriter(writer);
|
|
148
|
+
return writer.getResultBuffer();
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
153
|
+
* writing to the given BinaryWriter.
|
|
154
|
+
* @param {!jspb.BinaryWriter} writer
|
|
155
|
+
*/
|
|
156
|
+
proto.protocol.KeyPair.prototype.serializeBinaryToWriter = function (writer) {
|
|
157
|
+
var f = undefined;
|
|
158
|
+
f = this.getKey();
|
|
159
|
+
if (f.length > 0) {
|
|
160
|
+
writer.writeString(1, f);
|
|
161
|
+
}
|
|
162
|
+
f = this.getValue();
|
|
163
|
+
if (f.length > 0) {
|
|
164
|
+
writer.writeString(2, f);
|
|
165
|
+
}
|
|
166
|
+
f = this.getVersion();
|
|
167
|
+
if (f !== 0) {
|
|
168
|
+
writer.writeInt64(3, f);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
174
|
+
* @return {!proto.protocol.KeyPair} The clone.
|
|
175
|
+
*/
|
|
176
|
+
proto.protocol.KeyPair.prototype.cloneMessage = function () {
|
|
177
|
+
return /** @type {!proto.protocol.KeyPair} */ (
|
|
178
|
+
jspb.Message.cloneMessage(this)
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* optional string key = 1;
|
|
184
|
+
* @return {string}
|
|
185
|
+
*/
|
|
186
|
+
proto.protocol.KeyPair.prototype.getKey = function () {
|
|
187
|
+
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/** @param {string} value */
|
|
191
|
+
proto.protocol.KeyPair.prototype.setKey = function (value) {
|
|
192
|
+
jspb.Message.setField(this, 1, value);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* optional string value = 2;
|
|
197
|
+
* @return {string}
|
|
198
|
+
*/
|
|
199
|
+
proto.protocol.KeyPair.prototype.getValue = function () {
|
|
200
|
+
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/** @param {string} value */
|
|
204
|
+
proto.protocol.KeyPair.prototype.setValue = function (value) {
|
|
205
|
+
jspb.Message.setField(this, 2, value);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* optional int64 version = 3;
|
|
210
|
+
* @return {number}
|
|
211
|
+
*/
|
|
212
|
+
proto.protocol.KeyPair.prototype.getVersion = function () {
|
|
213
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/** @param {number} value */
|
|
217
|
+
proto.protocol.KeyPair.prototype.setVersion = function (value) {
|
|
218
|
+
jspb.Message.setField(this, 3, value);
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Generated by JsPbCodeGenerator.
|
|
223
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
224
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
225
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
226
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
227
|
+
* valid.
|
|
228
|
+
* @extends {jspb.Message}
|
|
229
|
+
* @constructor
|
|
230
|
+
*/
|
|
231
|
+
proto.protocol.Signature = function (opt_data) {
|
|
232
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
233
|
+
};
|
|
234
|
+
goog.inherits(proto.protocol.Signature, jspb.Message);
|
|
235
|
+
if (goog.DEBUG && !COMPILED) {
|
|
236
|
+
proto.protocol.Signature.displayName = "proto.protocol.Signature";
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
240
|
+
/**
|
|
241
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
242
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
243
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
244
|
+
* For the list of reserved names please see:
|
|
245
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
246
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
247
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
248
|
+
* @return {!Object}
|
|
249
|
+
*/
|
|
250
|
+
proto.protocol.Signature.prototype.toObject = function (opt_includeInstance) {
|
|
251
|
+
return proto.protocol.Signature.toObject(opt_includeInstance, this);
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Static version of the {@see toObject} method.
|
|
256
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
257
|
+
* instance for transitional soy proto support:
|
|
258
|
+
* http://goto/soy-param-migration
|
|
259
|
+
* @param {!proto.protocol.Signature} msg The msg instance to transform.
|
|
260
|
+
* @return {!Object}
|
|
261
|
+
*/
|
|
262
|
+
proto.protocol.Signature.toObject = function (includeInstance, msg) {
|
|
263
|
+
var f,
|
|
264
|
+
obj = {
|
|
265
|
+
publicKey: msg.getPublicKey(),
|
|
266
|
+
signData: msg.getSignData_asB64(),
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
if (includeInstance) {
|
|
270
|
+
obj.$jspbMessageInstance = msg;
|
|
271
|
+
}
|
|
272
|
+
return obj;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Deserializes binary data (in protobuf wire format).
|
|
278
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
279
|
+
* @return {!proto.protocol.Signature}
|
|
280
|
+
*/
|
|
281
|
+
proto.protocol.Signature.deserializeBinary = function (bytes) {
|
|
282
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
283
|
+
var msg = new proto.protocol.Signature();
|
|
284
|
+
return proto.protocol.Signature.deserializeBinaryFromReader(msg, reader);
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
289
|
+
* given reader into the given message object.
|
|
290
|
+
* @param {!proto.protocol.Signature} msg The message object to deserialize into.
|
|
291
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
292
|
+
* @return {!proto.protocol.Signature}
|
|
293
|
+
*/
|
|
294
|
+
proto.protocol.Signature.deserializeBinaryFromReader = function (msg, reader) {
|
|
295
|
+
while (reader.nextField()) {
|
|
296
|
+
if (reader.isEndGroup()) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
var field = reader.getFieldNumber();
|
|
300
|
+
switch (field) {
|
|
301
|
+
case 1:
|
|
302
|
+
var value = /** @type {string} */ (reader.readString());
|
|
303
|
+
msg.setPublicKey(value);
|
|
304
|
+
break;
|
|
305
|
+
case 2:
|
|
306
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
307
|
+
msg.setSignData(value);
|
|
308
|
+
break;
|
|
309
|
+
default:
|
|
310
|
+
reader.skipField();
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return msg;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Class method variant: serializes the given message to binary data
|
|
319
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
320
|
+
* @param {!proto.protocol.Signature} message
|
|
321
|
+
* @param {!jspb.BinaryWriter} writer
|
|
322
|
+
*/
|
|
323
|
+
proto.protocol.Signature.serializeBinaryToWriter = function (message, writer) {
|
|
324
|
+
message.serializeBinaryToWriter(writer);
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
329
|
+
* @return {!Uint8Array}
|
|
330
|
+
*/
|
|
331
|
+
proto.protocol.Signature.prototype.serializeBinary = function () {
|
|
332
|
+
var writer = new jspb.BinaryWriter();
|
|
333
|
+
this.serializeBinaryToWriter(writer);
|
|
334
|
+
return writer.getResultBuffer();
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
339
|
+
* writing to the given BinaryWriter.
|
|
340
|
+
* @param {!jspb.BinaryWriter} writer
|
|
341
|
+
*/
|
|
342
|
+
proto.protocol.Signature.prototype.serializeBinaryToWriter = function (writer) {
|
|
343
|
+
var f = undefined;
|
|
344
|
+
f = this.getPublicKey();
|
|
345
|
+
if (f.length > 0) {
|
|
346
|
+
writer.writeString(1, f);
|
|
347
|
+
}
|
|
348
|
+
f = this.getSignData_asU8();
|
|
349
|
+
if (f.length > 0) {
|
|
350
|
+
writer.writeBytes(2, f);
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
356
|
+
* @return {!proto.protocol.Signature} The clone.
|
|
357
|
+
*/
|
|
358
|
+
proto.protocol.Signature.prototype.cloneMessage = function () {
|
|
359
|
+
return /** @type {!proto.protocol.Signature} */ (
|
|
360
|
+
jspb.Message.cloneMessage(this)
|
|
361
|
+
);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* optional string public_key = 1;
|
|
366
|
+
* @return {string}
|
|
367
|
+
*/
|
|
368
|
+
proto.protocol.Signature.prototype.getPublicKey = function () {
|
|
369
|
+
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
/** @param {string} value */
|
|
373
|
+
proto.protocol.Signature.prototype.setPublicKey = function (value) {
|
|
374
|
+
jspb.Message.setField(this, 1, value);
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* optional bytes sign_data = 2;
|
|
379
|
+
* @return {!(string|Uint8Array)}
|
|
380
|
+
*/
|
|
381
|
+
proto.protocol.Signature.prototype.getSignData = function () {
|
|
382
|
+
return /** @type {!(string|Uint8Array)} */ (
|
|
383
|
+
jspb.Message.getFieldProto3(this, 2, "")
|
|
384
|
+
);
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* optional bytes sign_data = 2;
|
|
389
|
+
* This is a type-conversion wrapper around `getSignData()`
|
|
390
|
+
* @return {string}
|
|
391
|
+
*/
|
|
392
|
+
proto.protocol.Signature.prototype.getSignData_asB64 = function () {
|
|
393
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getSignData()));
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* optional bytes sign_data = 2;
|
|
398
|
+
* Note that Uint8Array is not supported on all browsers.
|
|
399
|
+
* @see http://caniuse.com/Uint8Array
|
|
400
|
+
* This is a type-conversion wrapper around `getSignData()`
|
|
401
|
+
* @return {!Uint8Array}
|
|
402
|
+
*/
|
|
403
|
+
proto.protocol.Signature.prototype.getSignData_asU8 = function () {
|
|
404
|
+
return /** @type {!Uint8Array} */ (
|
|
405
|
+
jspb.Message.bytesAsU8(this.getSignData())
|
|
406
|
+
);
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
/** @param {!(string|Uint8Array)} value */
|
|
410
|
+
proto.protocol.Signature.prototype.setSignData = function (value) {
|
|
411
|
+
jspb.Message.setField(this, 2, value);
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Generated by JsPbCodeGenerator.
|
|
416
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
417
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
418
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
419
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
420
|
+
* valid.
|
|
421
|
+
* @extends {jspb.Message}
|
|
422
|
+
* @constructor
|
|
423
|
+
*/
|
|
424
|
+
proto.protocol.LedgerUpgrade = function (opt_data) {
|
|
425
|
+
jspb.Message.initialize(
|
|
426
|
+
this,
|
|
427
|
+
opt_data,
|
|
428
|
+
0,
|
|
429
|
+
-1,
|
|
430
|
+
proto.protocol.LedgerUpgrade.repeatedFields_,
|
|
431
|
+
null,
|
|
432
|
+
);
|
|
433
|
+
};
|
|
434
|
+
goog.inherits(proto.protocol.LedgerUpgrade, jspb.Message);
|
|
435
|
+
if (goog.DEBUG && !COMPILED) {
|
|
436
|
+
proto.protocol.LedgerUpgrade.displayName = "proto.protocol.LedgerUpgrade";
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* List of repeated fields within this message type.
|
|
440
|
+
* @private {!Array<number>}
|
|
441
|
+
* @const
|
|
442
|
+
*/
|
|
443
|
+
proto.protocol.LedgerUpgrade.repeatedFields_ = [2];
|
|
444
|
+
|
|
445
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
446
|
+
/**
|
|
447
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
448
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
449
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
450
|
+
* For the list of reserved names please see:
|
|
451
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
452
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
453
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
454
|
+
* @return {!Object}
|
|
455
|
+
*/
|
|
456
|
+
proto.protocol.LedgerUpgrade.prototype.toObject = function (
|
|
457
|
+
opt_includeInstance,
|
|
458
|
+
) {
|
|
459
|
+
return proto.protocol.LedgerUpgrade.toObject(opt_includeInstance, this);
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Static version of the {@see toObject} method.
|
|
464
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
465
|
+
* instance for transitional soy proto support:
|
|
466
|
+
* http://goto/soy-param-migration
|
|
467
|
+
* @param {!proto.protocol.LedgerUpgrade} msg The msg instance to transform.
|
|
468
|
+
* @return {!Object}
|
|
469
|
+
*/
|
|
470
|
+
proto.protocol.LedgerUpgrade.toObject = function (includeInstance, msg) {
|
|
471
|
+
var f,
|
|
472
|
+
obj = {
|
|
473
|
+
newLedgerVersion: msg.getNewLedgerVersion(),
|
|
474
|
+
newValidatorListList: jspb.Message.getField(msg, 2),
|
|
475
|
+
chainCode: msg.getChainCode(),
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
if (includeInstance) {
|
|
479
|
+
obj.$jspbMessageInstance = msg;
|
|
480
|
+
}
|
|
481
|
+
return obj;
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Deserializes binary data (in protobuf wire format).
|
|
487
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
488
|
+
* @return {!proto.protocol.LedgerUpgrade}
|
|
489
|
+
*/
|
|
490
|
+
proto.protocol.LedgerUpgrade.deserializeBinary = function (bytes) {
|
|
491
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
492
|
+
var msg = new proto.protocol.LedgerUpgrade();
|
|
493
|
+
return proto.protocol.LedgerUpgrade.deserializeBinaryFromReader(msg, reader);
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
498
|
+
* given reader into the given message object.
|
|
499
|
+
* @param {!proto.protocol.LedgerUpgrade} msg The message object to deserialize into.
|
|
500
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
501
|
+
* @return {!proto.protocol.LedgerUpgrade}
|
|
502
|
+
*/
|
|
503
|
+
proto.protocol.LedgerUpgrade.deserializeBinaryFromReader = function (
|
|
504
|
+
msg,
|
|
505
|
+
reader,
|
|
506
|
+
) {
|
|
507
|
+
while (reader.nextField()) {
|
|
508
|
+
if (reader.isEndGroup()) {
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
var field = reader.getFieldNumber();
|
|
512
|
+
switch (field) {
|
|
513
|
+
case 1:
|
|
514
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
515
|
+
msg.setNewLedgerVersion(value);
|
|
516
|
+
break;
|
|
517
|
+
case 2:
|
|
518
|
+
var value = /** @type {string} */ (reader.readString());
|
|
519
|
+
msg.getNewValidatorListList().push(value);
|
|
520
|
+
msg.setNewValidatorListList(msg.getNewValidatorListList());
|
|
521
|
+
break;
|
|
522
|
+
case 3:
|
|
523
|
+
var value = /** @type {string} */ (reader.readString());
|
|
524
|
+
msg.setChainCode(value);
|
|
525
|
+
break;
|
|
526
|
+
default:
|
|
527
|
+
reader.skipField();
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
return msg;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Class method variant: serializes the given message to binary data
|
|
536
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
537
|
+
* @param {!proto.protocol.LedgerUpgrade} message
|
|
538
|
+
* @param {!jspb.BinaryWriter} writer
|
|
539
|
+
*/
|
|
540
|
+
proto.protocol.LedgerUpgrade.serializeBinaryToWriter = function (
|
|
541
|
+
message,
|
|
542
|
+
writer,
|
|
543
|
+
) {
|
|
544
|
+
message.serializeBinaryToWriter(writer);
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
549
|
+
* @return {!Uint8Array}
|
|
550
|
+
*/
|
|
551
|
+
proto.protocol.LedgerUpgrade.prototype.serializeBinary = function () {
|
|
552
|
+
var writer = new jspb.BinaryWriter();
|
|
553
|
+
this.serializeBinaryToWriter(writer);
|
|
554
|
+
return writer.getResultBuffer();
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
559
|
+
* writing to the given BinaryWriter.
|
|
560
|
+
* @param {!jspb.BinaryWriter} writer
|
|
561
|
+
*/
|
|
562
|
+
proto.protocol.LedgerUpgrade.prototype.serializeBinaryToWriter = function (
|
|
563
|
+
writer,
|
|
564
|
+
) {
|
|
565
|
+
var f = undefined;
|
|
566
|
+
f = this.getNewLedgerVersion();
|
|
567
|
+
if (f !== 0) {
|
|
568
|
+
writer.writeInt64(1, f);
|
|
569
|
+
}
|
|
570
|
+
f = this.getNewValidatorListList();
|
|
571
|
+
if (f.length > 0) {
|
|
572
|
+
writer.writeRepeatedString(2, f);
|
|
573
|
+
}
|
|
574
|
+
f = this.getChainCode();
|
|
575
|
+
if (f.length > 0) {
|
|
576
|
+
writer.writeString(3, f);
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
582
|
+
* @return {!proto.protocol.LedgerUpgrade} The clone.
|
|
583
|
+
*/
|
|
584
|
+
proto.protocol.LedgerUpgrade.prototype.cloneMessage = function () {
|
|
585
|
+
return /** @type {!proto.protocol.LedgerUpgrade} */ (
|
|
586
|
+
jspb.Message.cloneMessage(this)
|
|
587
|
+
);
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* optional int64 new_ledger_version = 1;
|
|
592
|
+
* @return {number}
|
|
593
|
+
*/
|
|
594
|
+
proto.protocol.LedgerUpgrade.prototype.getNewLedgerVersion = function () {
|
|
595
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
/** @param {number} value */
|
|
599
|
+
proto.protocol.LedgerUpgrade.prototype.setNewLedgerVersion = function (value) {
|
|
600
|
+
jspb.Message.setField(this, 1, value);
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* repeated string new_validator_list = 2;
|
|
605
|
+
* If you change this array by adding, removing or replacing elements, or if you
|
|
606
|
+
* replace the array itself, then you must call the setter to update it.
|
|
607
|
+
* @return {!Array.<string>}
|
|
608
|
+
*/
|
|
609
|
+
proto.protocol.LedgerUpgrade.prototype.getNewValidatorListList = function () {
|
|
610
|
+
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2));
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
/** @param {Array.<string>} value */
|
|
614
|
+
proto.protocol.LedgerUpgrade.prototype.setNewValidatorListList = function (
|
|
615
|
+
value,
|
|
616
|
+
) {
|
|
617
|
+
jspb.Message.setField(this, 2, value || []);
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
proto.protocol.LedgerUpgrade.prototype.clearNewValidatorListList = function () {
|
|
621
|
+
jspb.Message.setField(this, 2, []);
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* optional string chain_code = 3;
|
|
626
|
+
* @return {string}
|
|
627
|
+
*/
|
|
628
|
+
proto.protocol.LedgerUpgrade.prototype.getChainCode = function () {
|
|
629
|
+
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
/** @param {string} value */
|
|
633
|
+
proto.protocol.LedgerUpgrade.prototype.setChainCode = function (value) {
|
|
634
|
+
jspb.Message.setField(this, 3, value);
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Generated by JsPbCodeGenerator.
|
|
639
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
640
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
641
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
642
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
643
|
+
* valid.
|
|
644
|
+
* @extends {jspb.Message}
|
|
645
|
+
* @constructor
|
|
646
|
+
*/
|
|
647
|
+
proto.protocol.WsMessage = function (opt_data) {
|
|
648
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
649
|
+
};
|
|
650
|
+
goog.inherits(proto.protocol.WsMessage, jspb.Message);
|
|
651
|
+
if (goog.DEBUG && !COMPILED) {
|
|
652
|
+
proto.protocol.WsMessage.displayName = "proto.protocol.WsMessage";
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
656
|
+
/**
|
|
657
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
658
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
659
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
660
|
+
* For the list of reserved names please see:
|
|
661
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
662
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
663
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
664
|
+
* @return {!Object}
|
|
665
|
+
*/
|
|
666
|
+
proto.protocol.WsMessage.prototype.toObject = function (opt_includeInstance) {
|
|
667
|
+
return proto.protocol.WsMessage.toObject(opt_includeInstance, this);
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Static version of the {@see toObject} method.
|
|
672
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
673
|
+
* instance for transitional soy proto support:
|
|
674
|
+
* http://goto/soy-param-migration
|
|
675
|
+
* @param {!proto.protocol.WsMessage} msg The msg instance to transform.
|
|
676
|
+
* @return {!Object}
|
|
677
|
+
*/
|
|
678
|
+
proto.protocol.WsMessage.toObject = function (includeInstance, msg) {
|
|
679
|
+
var f,
|
|
680
|
+
obj = {
|
|
681
|
+
type: msg.getType(),
|
|
682
|
+
request: msg.getRequest(),
|
|
683
|
+
sequence: msg.getSequence(),
|
|
684
|
+
data: msg.getData_asB64(),
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
if (includeInstance) {
|
|
688
|
+
obj.$jspbMessageInstance = msg;
|
|
689
|
+
}
|
|
690
|
+
return obj;
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Deserializes binary data (in protobuf wire format).
|
|
696
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
697
|
+
* @return {!proto.protocol.WsMessage}
|
|
698
|
+
*/
|
|
699
|
+
proto.protocol.WsMessage.deserializeBinary = function (bytes) {
|
|
700
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
701
|
+
var msg = new proto.protocol.WsMessage();
|
|
702
|
+
return proto.protocol.WsMessage.deserializeBinaryFromReader(msg, reader);
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
707
|
+
* given reader into the given message object.
|
|
708
|
+
* @param {!proto.protocol.WsMessage} msg The message object to deserialize into.
|
|
709
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
710
|
+
* @return {!proto.protocol.WsMessage}
|
|
711
|
+
*/
|
|
712
|
+
proto.protocol.WsMessage.deserializeBinaryFromReader = function (msg, reader) {
|
|
713
|
+
while (reader.nextField()) {
|
|
714
|
+
if (reader.isEndGroup()) {
|
|
715
|
+
break;
|
|
716
|
+
}
|
|
717
|
+
var field = reader.getFieldNumber();
|
|
718
|
+
switch (field) {
|
|
719
|
+
case 1:
|
|
720
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
721
|
+
msg.setType(value);
|
|
722
|
+
break;
|
|
723
|
+
case 2:
|
|
724
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
725
|
+
msg.setRequest(value);
|
|
726
|
+
break;
|
|
727
|
+
case 3:
|
|
728
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
729
|
+
msg.setSequence(value);
|
|
730
|
+
break;
|
|
731
|
+
case 4:
|
|
732
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
733
|
+
msg.setData(value);
|
|
734
|
+
break;
|
|
735
|
+
default:
|
|
736
|
+
reader.skipField();
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
return msg;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Class method variant: serializes the given message to binary data
|
|
745
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
746
|
+
* @param {!proto.protocol.WsMessage} message
|
|
747
|
+
* @param {!jspb.BinaryWriter} writer
|
|
748
|
+
*/
|
|
749
|
+
proto.protocol.WsMessage.serializeBinaryToWriter = function (message, writer) {
|
|
750
|
+
message.serializeBinaryToWriter(writer);
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
755
|
+
* @return {!Uint8Array}
|
|
756
|
+
*/
|
|
757
|
+
proto.protocol.WsMessage.prototype.serializeBinary = function () {
|
|
758
|
+
var writer = new jspb.BinaryWriter();
|
|
759
|
+
this.serializeBinaryToWriter(writer);
|
|
760
|
+
return writer.getResultBuffer();
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
765
|
+
* writing to the given BinaryWriter.
|
|
766
|
+
* @param {!jspb.BinaryWriter} writer
|
|
767
|
+
*/
|
|
768
|
+
proto.protocol.WsMessage.prototype.serializeBinaryToWriter = function (writer) {
|
|
769
|
+
var f = undefined;
|
|
770
|
+
f = this.getType();
|
|
771
|
+
if (f !== 0) {
|
|
772
|
+
writer.writeInt64(1, f);
|
|
773
|
+
}
|
|
774
|
+
f = this.getRequest();
|
|
775
|
+
if (f) {
|
|
776
|
+
writer.writeBool(2, f);
|
|
777
|
+
}
|
|
778
|
+
f = this.getSequence();
|
|
779
|
+
if (f !== 0) {
|
|
780
|
+
writer.writeInt64(3, f);
|
|
781
|
+
}
|
|
782
|
+
f = this.getData_asU8();
|
|
783
|
+
if (f.length > 0) {
|
|
784
|
+
writer.writeBytes(4, f);
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
790
|
+
* @return {!proto.protocol.WsMessage} The clone.
|
|
791
|
+
*/
|
|
792
|
+
proto.protocol.WsMessage.prototype.cloneMessage = function () {
|
|
793
|
+
return /** @type {!proto.protocol.WsMessage} */ (
|
|
794
|
+
jspb.Message.cloneMessage(this)
|
|
795
|
+
);
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* optional int64 type = 1;
|
|
800
|
+
* @return {number}
|
|
801
|
+
*/
|
|
802
|
+
proto.protocol.WsMessage.prototype.getType = function () {
|
|
803
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
/** @param {number} value */
|
|
807
|
+
proto.protocol.WsMessage.prototype.setType = function (value) {
|
|
808
|
+
jspb.Message.setField(this, 1, value);
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* optional bool request = 2;
|
|
813
|
+
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
|
814
|
+
* You should avoid comparisons like {@code val === true/false} in those cases.
|
|
815
|
+
* @return {boolean}
|
|
816
|
+
*/
|
|
817
|
+
proto.protocol.WsMessage.prototype.getRequest = function () {
|
|
818
|
+
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 2, false));
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
/** @param {boolean} value */
|
|
822
|
+
proto.protocol.WsMessage.prototype.setRequest = function (value) {
|
|
823
|
+
jspb.Message.setField(this, 2, value);
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* optional int64 sequence = 3;
|
|
828
|
+
* @return {number}
|
|
829
|
+
*/
|
|
830
|
+
proto.protocol.WsMessage.prototype.getSequence = function () {
|
|
831
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
/** @param {number} value */
|
|
835
|
+
proto.protocol.WsMessage.prototype.setSequence = function (value) {
|
|
836
|
+
jspb.Message.setField(this, 3, value);
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* optional bytes data = 4;
|
|
841
|
+
* @return {!(string|Uint8Array)}
|
|
842
|
+
*/
|
|
843
|
+
proto.protocol.WsMessage.prototype.getData = function () {
|
|
844
|
+
return /** @type {!(string|Uint8Array)} */ (
|
|
845
|
+
jspb.Message.getFieldProto3(this, 4, "")
|
|
846
|
+
);
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* optional bytes data = 4;
|
|
851
|
+
* This is a type-conversion wrapper around `getData()`
|
|
852
|
+
* @return {string}
|
|
853
|
+
*/
|
|
854
|
+
proto.protocol.WsMessage.prototype.getData_asB64 = function () {
|
|
855
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData()));
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* optional bytes data = 4;
|
|
860
|
+
* Note that Uint8Array is not supported on all browsers.
|
|
861
|
+
* @see http://caniuse.com/Uint8Array
|
|
862
|
+
* This is a type-conversion wrapper around `getData()`
|
|
863
|
+
* @return {!Uint8Array}
|
|
864
|
+
*/
|
|
865
|
+
proto.protocol.WsMessage.prototype.getData_asU8 = function () {
|
|
866
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()));
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
/** @param {!(string|Uint8Array)} value */
|
|
870
|
+
proto.protocol.WsMessage.prototype.setData = function (value) {
|
|
871
|
+
jspb.Message.setField(this, 4, value);
|
|
872
|
+
};
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Generated by JsPbCodeGenerator.
|
|
876
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
877
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
878
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
879
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
880
|
+
* valid.
|
|
881
|
+
* @extends {jspb.Message}
|
|
882
|
+
* @constructor
|
|
883
|
+
*/
|
|
884
|
+
proto.protocol.Ping = function (opt_data) {
|
|
885
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
886
|
+
};
|
|
887
|
+
goog.inherits(proto.protocol.Ping, jspb.Message);
|
|
888
|
+
if (goog.DEBUG && !COMPILED) {
|
|
889
|
+
proto.protocol.Ping.displayName = "proto.protocol.Ping";
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
893
|
+
/**
|
|
894
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
895
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
896
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
897
|
+
* For the list of reserved names please see:
|
|
898
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
899
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
900
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
901
|
+
* @return {!Object}
|
|
902
|
+
*/
|
|
903
|
+
proto.protocol.Ping.prototype.toObject = function (opt_includeInstance) {
|
|
904
|
+
return proto.protocol.Ping.toObject(opt_includeInstance, this);
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Static version of the {@see toObject} method.
|
|
909
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
910
|
+
* instance for transitional soy proto support:
|
|
911
|
+
* http://goto/soy-param-migration
|
|
912
|
+
* @param {!proto.protocol.Ping} msg The msg instance to transform.
|
|
913
|
+
* @return {!Object}
|
|
914
|
+
*/
|
|
915
|
+
proto.protocol.Ping.toObject = function (includeInstance, msg) {
|
|
916
|
+
var f,
|
|
917
|
+
obj = {
|
|
918
|
+
nonce: msg.getNonce(),
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
if (includeInstance) {
|
|
922
|
+
obj.$jspbMessageInstance = msg;
|
|
923
|
+
}
|
|
924
|
+
return obj;
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* Deserializes binary data (in protobuf wire format).
|
|
930
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
931
|
+
* @return {!proto.protocol.Ping}
|
|
932
|
+
*/
|
|
933
|
+
proto.protocol.Ping.deserializeBinary = function (bytes) {
|
|
934
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
935
|
+
var msg = new proto.protocol.Ping();
|
|
936
|
+
return proto.protocol.Ping.deserializeBinaryFromReader(msg, reader);
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
941
|
+
* given reader into the given message object.
|
|
942
|
+
* @param {!proto.protocol.Ping} msg The message object to deserialize into.
|
|
943
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
944
|
+
* @return {!proto.protocol.Ping}
|
|
945
|
+
*/
|
|
946
|
+
proto.protocol.Ping.deserializeBinaryFromReader = function (msg, reader) {
|
|
947
|
+
while (reader.nextField()) {
|
|
948
|
+
if (reader.isEndGroup()) {
|
|
949
|
+
break;
|
|
950
|
+
}
|
|
951
|
+
var field = reader.getFieldNumber();
|
|
952
|
+
switch (field) {
|
|
953
|
+
case 1:
|
|
954
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
955
|
+
msg.setNonce(value);
|
|
956
|
+
break;
|
|
957
|
+
default:
|
|
958
|
+
reader.skipField();
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return msg;
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Class method variant: serializes the given message to binary data
|
|
967
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
968
|
+
* @param {!proto.protocol.Ping} message
|
|
969
|
+
* @param {!jspb.BinaryWriter} writer
|
|
970
|
+
*/
|
|
971
|
+
proto.protocol.Ping.serializeBinaryToWriter = function (message, writer) {
|
|
972
|
+
message.serializeBinaryToWriter(writer);
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
977
|
+
* @return {!Uint8Array}
|
|
978
|
+
*/
|
|
979
|
+
proto.protocol.Ping.prototype.serializeBinary = function () {
|
|
980
|
+
var writer = new jspb.BinaryWriter();
|
|
981
|
+
this.serializeBinaryToWriter(writer);
|
|
982
|
+
return writer.getResultBuffer();
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
987
|
+
* writing to the given BinaryWriter.
|
|
988
|
+
* @param {!jspb.BinaryWriter} writer
|
|
989
|
+
*/
|
|
990
|
+
proto.protocol.Ping.prototype.serializeBinaryToWriter = function (writer) {
|
|
991
|
+
var f = undefined;
|
|
992
|
+
f = this.getNonce();
|
|
993
|
+
if (f !== 0) {
|
|
994
|
+
writer.writeInt64(1, f);
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
1000
|
+
* @return {!proto.protocol.Ping} The clone.
|
|
1001
|
+
*/
|
|
1002
|
+
proto.protocol.Ping.prototype.cloneMessage = function () {
|
|
1003
|
+
return /** @type {!proto.protocol.Ping} */ (jspb.Message.cloneMessage(this));
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* optional int64 nonce = 1;
|
|
1008
|
+
* @return {number}
|
|
1009
|
+
*/
|
|
1010
|
+
proto.protocol.Ping.prototype.getNonce = function () {
|
|
1011
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
/** @param {number} value */
|
|
1015
|
+
proto.protocol.Ping.prototype.setNonce = function (value) {
|
|
1016
|
+
jspb.Message.setField(this, 1, value);
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Generated by JsPbCodeGenerator.
|
|
1021
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
1022
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
1023
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
1024
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
1025
|
+
* valid.
|
|
1026
|
+
* @extends {jspb.Message}
|
|
1027
|
+
* @constructor
|
|
1028
|
+
*/
|
|
1029
|
+
proto.protocol.Pong = function (opt_data) {
|
|
1030
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
1031
|
+
};
|
|
1032
|
+
goog.inherits(proto.protocol.Pong, jspb.Message);
|
|
1033
|
+
if (goog.DEBUG && !COMPILED) {
|
|
1034
|
+
proto.protocol.Pong.displayName = "proto.protocol.Pong";
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1038
|
+
/**
|
|
1039
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
1040
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1041
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1042
|
+
* For the list of reserved names please see:
|
|
1043
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
1044
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
1045
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
1046
|
+
* @return {!Object}
|
|
1047
|
+
*/
|
|
1048
|
+
proto.protocol.Pong.prototype.toObject = function (opt_includeInstance) {
|
|
1049
|
+
return proto.protocol.Pong.toObject(opt_includeInstance, this);
|
|
1050
|
+
};
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Static version of the {@see toObject} method.
|
|
1054
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
1055
|
+
* instance for transitional soy proto support:
|
|
1056
|
+
* http://goto/soy-param-migration
|
|
1057
|
+
* @param {!proto.protocol.Pong} msg The msg instance to transform.
|
|
1058
|
+
* @return {!Object}
|
|
1059
|
+
*/
|
|
1060
|
+
proto.protocol.Pong.toObject = function (includeInstance, msg) {
|
|
1061
|
+
var f,
|
|
1062
|
+
obj = {
|
|
1063
|
+
nonce: msg.getNonce(),
|
|
1064
|
+
};
|
|
1065
|
+
|
|
1066
|
+
if (includeInstance) {
|
|
1067
|
+
obj.$jspbMessageInstance = msg;
|
|
1068
|
+
}
|
|
1069
|
+
return obj;
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1075
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1076
|
+
* @return {!proto.protocol.Pong}
|
|
1077
|
+
*/
|
|
1078
|
+
proto.protocol.Pong.deserializeBinary = function (bytes) {
|
|
1079
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1080
|
+
var msg = new proto.protocol.Pong();
|
|
1081
|
+
return proto.protocol.Pong.deserializeBinaryFromReader(msg, reader);
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1086
|
+
* given reader into the given message object.
|
|
1087
|
+
* @param {!proto.protocol.Pong} msg The message object to deserialize into.
|
|
1088
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1089
|
+
* @return {!proto.protocol.Pong}
|
|
1090
|
+
*/
|
|
1091
|
+
proto.protocol.Pong.deserializeBinaryFromReader = function (msg, reader) {
|
|
1092
|
+
while (reader.nextField()) {
|
|
1093
|
+
if (reader.isEndGroup()) {
|
|
1094
|
+
break;
|
|
1095
|
+
}
|
|
1096
|
+
var field = reader.getFieldNumber();
|
|
1097
|
+
switch (field) {
|
|
1098
|
+
case 1:
|
|
1099
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
1100
|
+
msg.setNonce(value);
|
|
1101
|
+
break;
|
|
1102
|
+
default:
|
|
1103
|
+
reader.skipField();
|
|
1104
|
+
break;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
return msg;
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Class method variant: serializes the given message to binary data
|
|
1112
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
1113
|
+
* @param {!proto.protocol.Pong} message
|
|
1114
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1115
|
+
*/
|
|
1116
|
+
proto.protocol.Pong.serializeBinaryToWriter = function (message, writer) {
|
|
1117
|
+
message.serializeBinaryToWriter(writer);
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1122
|
+
* @return {!Uint8Array}
|
|
1123
|
+
*/
|
|
1124
|
+
proto.protocol.Pong.prototype.serializeBinary = function () {
|
|
1125
|
+
var writer = new jspb.BinaryWriter();
|
|
1126
|
+
this.serializeBinaryToWriter(writer);
|
|
1127
|
+
return writer.getResultBuffer();
|
|
1128
|
+
};
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
1132
|
+
* writing to the given BinaryWriter.
|
|
1133
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1134
|
+
*/
|
|
1135
|
+
proto.protocol.Pong.prototype.serializeBinaryToWriter = function (writer) {
|
|
1136
|
+
var f = undefined;
|
|
1137
|
+
f = this.getNonce();
|
|
1138
|
+
if (f !== 0) {
|
|
1139
|
+
writer.writeInt64(1, f);
|
|
1140
|
+
}
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
1145
|
+
* @return {!proto.protocol.Pong} The clone.
|
|
1146
|
+
*/
|
|
1147
|
+
proto.protocol.Pong.prototype.cloneMessage = function () {
|
|
1148
|
+
return /** @type {!proto.protocol.Pong} */ (jspb.Message.cloneMessage(this));
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* optional int64 nonce = 1;
|
|
1153
|
+
* @return {number}
|
|
1154
|
+
*/
|
|
1155
|
+
proto.protocol.Pong.prototype.getNonce = function () {
|
|
1156
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
/** @param {number} value */
|
|
1160
|
+
proto.protocol.Pong.prototype.setNonce = function (value) {
|
|
1161
|
+
jspb.Message.setField(this, 1, value);
|
|
1162
|
+
};
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Generated by JsPbCodeGenerator.
|
|
1166
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
1167
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
1168
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
1169
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
1170
|
+
* valid.
|
|
1171
|
+
* @extends {jspb.Message}
|
|
1172
|
+
* @constructor
|
|
1173
|
+
*/
|
|
1174
|
+
proto.protocol.NewKey = function (opt_data) {
|
|
1175
|
+
jspb.Message.initialize(
|
|
1176
|
+
this,
|
|
1177
|
+
opt_data,
|
|
1178
|
+
0,
|
|
1179
|
+
-1,
|
|
1180
|
+
proto.protocol.NewKey.repeatedFields_,
|
|
1181
|
+
null,
|
|
1182
|
+
);
|
|
1183
|
+
};
|
|
1184
|
+
goog.inherits(proto.protocol.NewKey, jspb.Message);
|
|
1185
|
+
if (goog.DEBUG && !COMPILED) {
|
|
1186
|
+
proto.protocol.NewKey.displayName = "proto.protocol.NewKey";
|
|
1187
|
+
}
|
|
1188
|
+
/**
|
|
1189
|
+
* List of repeated fields within this message type.
|
|
1190
|
+
* @private {!Array<number>}
|
|
1191
|
+
* @const
|
|
1192
|
+
*/
|
|
1193
|
+
proto.protocol.NewKey.repeatedFields_ = [1];
|
|
1194
|
+
|
|
1195
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1196
|
+
/**
|
|
1197
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
1198
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1199
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1200
|
+
* For the list of reserved names please see:
|
|
1201
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
1202
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
1203
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
1204
|
+
* @return {!Object}
|
|
1205
|
+
*/
|
|
1206
|
+
proto.protocol.NewKey.prototype.toObject = function (opt_includeInstance) {
|
|
1207
|
+
return proto.protocol.NewKey.toObject(opt_includeInstance, this);
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* Static version of the {@see toObject} method.
|
|
1212
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
1213
|
+
* instance for transitional soy proto support:
|
|
1214
|
+
* http://goto/soy-param-migration
|
|
1215
|
+
* @param {!proto.protocol.NewKey} msg The msg instance to transform.
|
|
1216
|
+
* @return {!Object}
|
|
1217
|
+
*/
|
|
1218
|
+
proto.protocol.NewKey.toObject = function (includeInstance, msg) {
|
|
1219
|
+
var f,
|
|
1220
|
+
obj = {
|
|
1221
|
+
keyList: msg.getKeyList_asB64(),
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1224
|
+
if (includeInstance) {
|
|
1225
|
+
obj.$jspbMessageInstance = msg;
|
|
1226
|
+
}
|
|
1227
|
+
return obj;
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1233
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1234
|
+
* @return {!proto.protocol.NewKey}
|
|
1235
|
+
*/
|
|
1236
|
+
proto.protocol.NewKey.deserializeBinary = function (bytes) {
|
|
1237
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1238
|
+
var msg = new proto.protocol.NewKey();
|
|
1239
|
+
return proto.protocol.NewKey.deserializeBinaryFromReader(msg, reader);
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1244
|
+
* given reader into the given message object.
|
|
1245
|
+
* @param {!proto.protocol.NewKey} msg The message object to deserialize into.
|
|
1246
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1247
|
+
* @return {!proto.protocol.NewKey}
|
|
1248
|
+
*/
|
|
1249
|
+
proto.protocol.NewKey.deserializeBinaryFromReader = function (msg, reader) {
|
|
1250
|
+
while (reader.nextField()) {
|
|
1251
|
+
if (reader.isEndGroup()) {
|
|
1252
|
+
break;
|
|
1253
|
+
}
|
|
1254
|
+
var field = reader.getFieldNumber();
|
|
1255
|
+
switch (field) {
|
|
1256
|
+
case 1:
|
|
1257
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
1258
|
+
msg.getKeyList().push(value);
|
|
1259
|
+
msg.setKeyList(msg.getKeyList());
|
|
1260
|
+
break;
|
|
1261
|
+
default:
|
|
1262
|
+
reader.skipField();
|
|
1263
|
+
break;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
return msg;
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* Class method variant: serializes the given message to binary data
|
|
1271
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
1272
|
+
* @param {!proto.protocol.NewKey} message
|
|
1273
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1274
|
+
*/
|
|
1275
|
+
proto.protocol.NewKey.serializeBinaryToWriter = function (message, writer) {
|
|
1276
|
+
message.serializeBinaryToWriter(writer);
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1281
|
+
* @return {!Uint8Array}
|
|
1282
|
+
*/
|
|
1283
|
+
proto.protocol.NewKey.prototype.serializeBinary = function () {
|
|
1284
|
+
var writer = new jspb.BinaryWriter();
|
|
1285
|
+
this.serializeBinaryToWriter(writer);
|
|
1286
|
+
return writer.getResultBuffer();
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
1291
|
+
* writing to the given BinaryWriter.
|
|
1292
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1293
|
+
*/
|
|
1294
|
+
proto.protocol.NewKey.prototype.serializeBinaryToWriter = function (writer) {
|
|
1295
|
+
var f = undefined;
|
|
1296
|
+
f = this.getKeyList_asU8();
|
|
1297
|
+
if (f.length > 0) {
|
|
1298
|
+
writer.writeRepeatedBytes(1, f);
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
1304
|
+
* @return {!proto.protocol.NewKey} The clone.
|
|
1305
|
+
*/
|
|
1306
|
+
proto.protocol.NewKey.prototype.cloneMessage = function () {
|
|
1307
|
+
return /** @type {!proto.protocol.NewKey} */ (
|
|
1308
|
+
jspb.Message.cloneMessage(this)
|
|
1309
|
+
);
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* repeated bytes key = 1;
|
|
1314
|
+
* If you change this array by adding, removing or replacing elements, or if you
|
|
1315
|
+
* replace the array itself, then you must call the setter to update it.
|
|
1316
|
+
* @return {!(Array<!Uint8Array>|Array<string>)}
|
|
1317
|
+
*/
|
|
1318
|
+
proto.protocol.NewKey.prototype.getKeyList = function () {
|
|
1319
|
+
return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (
|
|
1320
|
+
jspb.Message.getField(this, 1)
|
|
1321
|
+
);
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* repeated bytes key = 1;
|
|
1326
|
+
* If you change this array by adding, removing or replacing elements, or if you
|
|
1327
|
+
* replace the array itself, then you must call the setter to update it.
|
|
1328
|
+
* This is a type-conversion wrapper around `getKeyList()`
|
|
1329
|
+
* @return {!Array.<string>}
|
|
1330
|
+
*/
|
|
1331
|
+
proto.protocol.NewKey.prototype.getKeyList_asB64 = function () {
|
|
1332
|
+
return /** @type {!Array.<string>} */ (
|
|
1333
|
+
jspb.Message.bytesListAsB64(this.getKeyList())
|
|
1334
|
+
);
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* repeated bytes key = 1;
|
|
1339
|
+
* If you change this array by adding, removing or replacing elements, or if you
|
|
1340
|
+
* replace the array itself, then you must call the setter to update it.
|
|
1341
|
+
* Note that Uint8Array is not supported on all browsers.
|
|
1342
|
+
* @see http://caniuse.com/Uint8Array
|
|
1343
|
+
* This is a type-conversion wrapper around `getKeyList()`
|
|
1344
|
+
* @return {!Array.<!Uint8Array>}
|
|
1345
|
+
*/
|
|
1346
|
+
proto.protocol.NewKey.prototype.getKeyList_asU8 = function () {
|
|
1347
|
+
return /** @type {!Array.<!Uint8Array>} */ (
|
|
1348
|
+
jspb.Message.bytesListAsU8(this.getKeyList())
|
|
1349
|
+
);
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
/** @param {!(Array<!Uint8Array>|Array<string>)} value */
|
|
1353
|
+
proto.protocol.NewKey.prototype.setKeyList = function (value) {
|
|
1354
|
+
jspb.Message.setField(this, 1, value || []);
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
proto.protocol.NewKey.prototype.clearKeyList = function () {
|
|
1358
|
+
jspb.Message.setField(this, 1, []);
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Generated by JsPbCodeGenerator.
|
|
1363
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
1364
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
1365
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
1366
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
1367
|
+
* valid.
|
|
1368
|
+
* @extends {jspb.Message}
|
|
1369
|
+
* @constructor
|
|
1370
|
+
*/
|
|
1371
|
+
proto.protocol.ModifyKey = function (opt_data) {
|
|
1372
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
1373
|
+
};
|
|
1374
|
+
goog.inherits(proto.protocol.ModifyKey, jspb.Message);
|
|
1375
|
+
if (goog.DEBUG && !COMPILED) {
|
|
1376
|
+
proto.protocol.ModifyKey.displayName = "proto.protocol.ModifyKey";
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1380
|
+
/**
|
|
1381
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
1382
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1383
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1384
|
+
* For the list of reserved names please see:
|
|
1385
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
1386
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
1387
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
1388
|
+
* @return {!Object}
|
|
1389
|
+
*/
|
|
1390
|
+
proto.protocol.ModifyKey.prototype.toObject = function (opt_includeInstance) {
|
|
1391
|
+
return proto.protocol.ModifyKey.toObject(opt_includeInstance, this);
|
|
1392
|
+
};
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* Static version of the {@see toObject} method.
|
|
1396
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
1397
|
+
* instance for transitional soy proto support:
|
|
1398
|
+
* http://goto/soy-param-migration
|
|
1399
|
+
* @param {!proto.protocol.ModifyKey} msg The msg instance to transform.
|
|
1400
|
+
* @return {!Object}
|
|
1401
|
+
*/
|
|
1402
|
+
proto.protocol.ModifyKey.toObject = function (includeInstance, msg) {
|
|
1403
|
+
var f,
|
|
1404
|
+
obj = {
|
|
1405
|
+
key: msg.getKey_asB64(),
|
|
1406
|
+
value: msg.getValue_asB64(),
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
if (includeInstance) {
|
|
1410
|
+
obj.$jspbMessageInstance = msg;
|
|
1411
|
+
}
|
|
1412
|
+
return obj;
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1418
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1419
|
+
* @return {!proto.protocol.ModifyKey}
|
|
1420
|
+
*/
|
|
1421
|
+
proto.protocol.ModifyKey.deserializeBinary = function (bytes) {
|
|
1422
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1423
|
+
var msg = new proto.protocol.ModifyKey();
|
|
1424
|
+
return proto.protocol.ModifyKey.deserializeBinaryFromReader(msg, reader);
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1429
|
+
* given reader into the given message object.
|
|
1430
|
+
* @param {!proto.protocol.ModifyKey} msg The message object to deserialize into.
|
|
1431
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1432
|
+
* @return {!proto.protocol.ModifyKey}
|
|
1433
|
+
*/
|
|
1434
|
+
proto.protocol.ModifyKey.deserializeBinaryFromReader = function (msg, reader) {
|
|
1435
|
+
while (reader.nextField()) {
|
|
1436
|
+
if (reader.isEndGroup()) {
|
|
1437
|
+
break;
|
|
1438
|
+
}
|
|
1439
|
+
var field = reader.getFieldNumber();
|
|
1440
|
+
switch (field) {
|
|
1441
|
+
case 1:
|
|
1442
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
1443
|
+
msg.setKey(value);
|
|
1444
|
+
break;
|
|
1445
|
+
case 2:
|
|
1446
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
1447
|
+
msg.setValue(value);
|
|
1448
|
+
break;
|
|
1449
|
+
default:
|
|
1450
|
+
reader.skipField();
|
|
1451
|
+
break;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
return msg;
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Class method variant: serializes the given message to binary data
|
|
1459
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
1460
|
+
* @param {!proto.protocol.ModifyKey} message
|
|
1461
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1462
|
+
*/
|
|
1463
|
+
proto.protocol.ModifyKey.serializeBinaryToWriter = function (message, writer) {
|
|
1464
|
+
message.serializeBinaryToWriter(writer);
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1467
|
+
/**
|
|
1468
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1469
|
+
* @return {!Uint8Array}
|
|
1470
|
+
*/
|
|
1471
|
+
proto.protocol.ModifyKey.prototype.serializeBinary = function () {
|
|
1472
|
+
var writer = new jspb.BinaryWriter();
|
|
1473
|
+
this.serializeBinaryToWriter(writer);
|
|
1474
|
+
return writer.getResultBuffer();
|
|
1475
|
+
};
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
1479
|
+
* writing to the given BinaryWriter.
|
|
1480
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1481
|
+
*/
|
|
1482
|
+
proto.protocol.ModifyKey.prototype.serializeBinaryToWriter = function (writer) {
|
|
1483
|
+
var f = undefined;
|
|
1484
|
+
f = this.getKey_asU8();
|
|
1485
|
+
if (f.length > 0) {
|
|
1486
|
+
writer.writeBytes(1, f);
|
|
1487
|
+
}
|
|
1488
|
+
f = this.getValue_asU8();
|
|
1489
|
+
if (f.length > 0) {
|
|
1490
|
+
writer.writeBytes(2, f);
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
1496
|
+
* @return {!proto.protocol.ModifyKey} The clone.
|
|
1497
|
+
*/
|
|
1498
|
+
proto.protocol.ModifyKey.prototype.cloneMessage = function () {
|
|
1499
|
+
return /** @type {!proto.protocol.ModifyKey} */ (
|
|
1500
|
+
jspb.Message.cloneMessage(this)
|
|
1501
|
+
);
|
|
1502
|
+
};
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* optional bytes key = 1;
|
|
1506
|
+
* @return {!(string|Uint8Array)}
|
|
1507
|
+
*/
|
|
1508
|
+
proto.protocol.ModifyKey.prototype.getKey = function () {
|
|
1509
|
+
return /** @type {!(string|Uint8Array)} */ (
|
|
1510
|
+
jspb.Message.getFieldProto3(this, 1, "")
|
|
1511
|
+
);
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* optional bytes key = 1;
|
|
1516
|
+
* This is a type-conversion wrapper around `getKey()`
|
|
1517
|
+
* @return {string}
|
|
1518
|
+
*/
|
|
1519
|
+
proto.protocol.ModifyKey.prototype.getKey_asB64 = function () {
|
|
1520
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getKey()));
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* optional bytes key = 1;
|
|
1525
|
+
* Note that Uint8Array is not supported on all browsers.
|
|
1526
|
+
* @see http://caniuse.com/Uint8Array
|
|
1527
|
+
* This is a type-conversion wrapper around `getKey()`
|
|
1528
|
+
* @return {!Uint8Array}
|
|
1529
|
+
*/
|
|
1530
|
+
proto.protocol.ModifyKey.prototype.getKey_asU8 = function () {
|
|
1531
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getKey()));
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
/** @param {!(string|Uint8Array)} value */
|
|
1535
|
+
proto.protocol.ModifyKey.prototype.setKey = function (value) {
|
|
1536
|
+
jspb.Message.setField(this, 1, value);
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* optional bytes value = 2;
|
|
1541
|
+
* @return {!(string|Uint8Array)}
|
|
1542
|
+
*/
|
|
1543
|
+
proto.protocol.ModifyKey.prototype.getValue = function () {
|
|
1544
|
+
return /** @type {!(string|Uint8Array)} */ (
|
|
1545
|
+
jspb.Message.getFieldProto3(this, 2, "")
|
|
1546
|
+
);
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* optional bytes value = 2;
|
|
1551
|
+
* This is a type-conversion wrapper around `getValue()`
|
|
1552
|
+
* @return {string}
|
|
1553
|
+
*/
|
|
1554
|
+
proto.protocol.ModifyKey.prototype.getValue_asB64 = function () {
|
|
1555
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getValue()));
|
|
1556
|
+
};
|
|
1557
|
+
|
|
1558
|
+
/**
|
|
1559
|
+
* optional bytes value = 2;
|
|
1560
|
+
* Note that Uint8Array is not supported on all browsers.
|
|
1561
|
+
* @see http://caniuse.com/Uint8Array
|
|
1562
|
+
* This is a type-conversion wrapper around `getValue()`
|
|
1563
|
+
* @return {!Uint8Array}
|
|
1564
|
+
*/
|
|
1565
|
+
proto.protocol.ModifyKey.prototype.getValue_asU8 = function () {
|
|
1566
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getValue()));
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
/** @param {!(string|Uint8Array)} value */
|
|
1570
|
+
proto.protocol.ModifyKey.prototype.setValue = function (value) {
|
|
1571
|
+
jspb.Message.setField(this, 2, value);
|
|
1572
|
+
};
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* Generated by JsPbCodeGenerator.
|
|
1576
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
1577
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
1578
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
1579
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
1580
|
+
* valid.
|
|
1581
|
+
* @extends {jspb.Message}
|
|
1582
|
+
* @constructor
|
|
1583
|
+
*/
|
|
1584
|
+
proto.protocol.Snapshot = function (opt_data) {
|
|
1585
|
+
jspb.Message.initialize(
|
|
1586
|
+
this,
|
|
1587
|
+
opt_data,
|
|
1588
|
+
0,
|
|
1589
|
+
-1,
|
|
1590
|
+
proto.protocol.Snapshot.repeatedFields_,
|
|
1591
|
+
null,
|
|
1592
|
+
);
|
|
1593
|
+
};
|
|
1594
|
+
goog.inherits(proto.protocol.Snapshot, jspb.Message);
|
|
1595
|
+
if (goog.DEBUG && !COMPILED) {
|
|
1596
|
+
proto.protocol.Snapshot.displayName = "proto.protocol.Snapshot";
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* List of repeated fields within this message type.
|
|
1600
|
+
* @private {!Array<number>}
|
|
1601
|
+
* @const
|
|
1602
|
+
*/
|
|
1603
|
+
proto.protocol.Snapshot.repeatedFields_ = [2];
|
|
1604
|
+
|
|
1605
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1606
|
+
/**
|
|
1607
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
1608
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1609
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1610
|
+
* For the list of reserved names please see:
|
|
1611
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
1612
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
1613
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
1614
|
+
* @return {!Object}
|
|
1615
|
+
*/
|
|
1616
|
+
proto.protocol.Snapshot.prototype.toObject = function (opt_includeInstance) {
|
|
1617
|
+
return proto.protocol.Snapshot.toObject(opt_includeInstance, this);
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* Static version of the {@see toObject} method.
|
|
1622
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
1623
|
+
* instance for transitional soy proto support:
|
|
1624
|
+
* http://goto/soy-param-migration
|
|
1625
|
+
* @param {!proto.protocol.Snapshot} msg The msg instance to transform.
|
|
1626
|
+
* @return {!Object}
|
|
1627
|
+
*/
|
|
1628
|
+
proto.protocol.Snapshot.toObject = function (includeInstance, msg) {
|
|
1629
|
+
var f,
|
|
1630
|
+
obj = {
|
|
1631
|
+
newKey:
|
|
1632
|
+
(f = msg.getNewKey()) &&
|
|
1633
|
+
proto.protocol.NewKey.toObject(includeInstance, f),
|
|
1634
|
+
modifyKeyList: jspb.Message.toObjectList(
|
|
1635
|
+
msg.getModifyKeyList(),
|
|
1636
|
+
proto.protocol.ModifyKey.toObject,
|
|
1637
|
+
includeInstance,
|
|
1638
|
+
),
|
|
1639
|
+
seq: msg.getSeq(),
|
|
1640
|
+
};
|
|
1641
|
+
|
|
1642
|
+
if (includeInstance) {
|
|
1643
|
+
obj.$jspbMessageInstance = msg;
|
|
1644
|
+
}
|
|
1645
|
+
return obj;
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1651
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1652
|
+
* @return {!proto.protocol.Snapshot}
|
|
1653
|
+
*/
|
|
1654
|
+
proto.protocol.Snapshot.deserializeBinary = function (bytes) {
|
|
1655
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1656
|
+
var msg = new proto.protocol.Snapshot();
|
|
1657
|
+
return proto.protocol.Snapshot.deserializeBinaryFromReader(msg, reader);
|
|
1658
|
+
};
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1662
|
+
* given reader into the given message object.
|
|
1663
|
+
* @param {!proto.protocol.Snapshot} msg The message object to deserialize into.
|
|
1664
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1665
|
+
* @return {!proto.protocol.Snapshot}
|
|
1666
|
+
*/
|
|
1667
|
+
proto.protocol.Snapshot.deserializeBinaryFromReader = function (msg, reader) {
|
|
1668
|
+
while (reader.nextField()) {
|
|
1669
|
+
if (reader.isEndGroup()) {
|
|
1670
|
+
break;
|
|
1671
|
+
}
|
|
1672
|
+
var field = reader.getFieldNumber();
|
|
1673
|
+
switch (field) {
|
|
1674
|
+
case 1:
|
|
1675
|
+
var value = new proto.protocol.NewKey();
|
|
1676
|
+
reader.readMessage(
|
|
1677
|
+
value,
|
|
1678
|
+
proto.protocol.NewKey.deserializeBinaryFromReader,
|
|
1679
|
+
);
|
|
1680
|
+
msg.setNewKey(value);
|
|
1681
|
+
break;
|
|
1682
|
+
case 2:
|
|
1683
|
+
var value = new proto.protocol.ModifyKey();
|
|
1684
|
+
reader.readMessage(
|
|
1685
|
+
value,
|
|
1686
|
+
proto.protocol.ModifyKey.deserializeBinaryFromReader,
|
|
1687
|
+
);
|
|
1688
|
+
msg.getModifyKeyList().push(value);
|
|
1689
|
+
msg.setModifyKeyList(msg.getModifyKeyList());
|
|
1690
|
+
break;
|
|
1691
|
+
case 3:
|
|
1692
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
1693
|
+
msg.setSeq(value);
|
|
1694
|
+
break;
|
|
1695
|
+
default:
|
|
1696
|
+
reader.skipField();
|
|
1697
|
+
break;
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
return msg;
|
|
1701
|
+
};
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* Class method variant: serializes the given message to binary data
|
|
1705
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
1706
|
+
* @param {!proto.protocol.Snapshot} message
|
|
1707
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1708
|
+
*/
|
|
1709
|
+
proto.protocol.Snapshot.serializeBinaryToWriter = function (message, writer) {
|
|
1710
|
+
message.serializeBinaryToWriter(writer);
|
|
1711
|
+
};
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1715
|
+
* @return {!Uint8Array}
|
|
1716
|
+
*/
|
|
1717
|
+
proto.protocol.Snapshot.prototype.serializeBinary = function () {
|
|
1718
|
+
var writer = new jspb.BinaryWriter();
|
|
1719
|
+
this.serializeBinaryToWriter(writer);
|
|
1720
|
+
return writer.getResultBuffer();
|
|
1721
|
+
};
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
1725
|
+
* writing to the given BinaryWriter.
|
|
1726
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1727
|
+
*/
|
|
1728
|
+
proto.protocol.Snapshot.prototype.serializeBinaryToWriter = function (writer) {
|
|
1729
|
+
var f = undefined;
|
|
1730
|
+
f = this.getNewKey();
|
|
1731
|
+
if (f != null) {
|
|
1732
|
+
writer.writeMessage(1, f, proto.protocol.NewKey.serializeBinaryToWriter);
|
|
1733
|
+
}
|
|
1734
|
+
f = this.getModifyKeyList();
|
|
1735
|
+
if (f.length > 0) {
|
|
1736
|
+
writer.writeRepeatedMessage(
|
|
1737
|
+
2,
|
|
1738
|
+
f,
|
|
1739
|
+
proto.protocol.ModifyKey.serializeBinaryToWriter,
|
|
1740
|
+
);
|
|
1741
|
+
}
|
|
1742
|
+
f = this.getSeq();
|
|
1743
|
+
if (f !== 0) {
|
|
1744
|
+
writer.writeInt64(3, f);
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
1750
|
+
* @return {!proto.protocol.Snapshot} The clone.
|
|
1751
|
+
*/
|
|
1752
|
+
proto.protocol.Snapshot.prototype.cloneMessage = function () {
|
|
1753
|
+
return /** @type {!proto.protocol.Snapshot} */ (
|
|
1754
|
+
jspb.Message.cloneMessage(this)
|
|
1755
|
+
);
|
|
1756
|
+
};
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* optional NewKey new_key = 1;
|
|
1760
|
+
* @return {proto.protocol.NewKey}
|
|
1761
|
+
*/
|
|
1762
|
+
proto.protocol.Snapshot.prototype.getNewKey = function () {
|
|
1763
|
+
return /** @type{proto.protocol.NewKey} */ (
|
|
1764
|
+
jspb.Message.getWrapperField(this, proto.protocol.NewKey, 1)
|
|
1765
|
+
);
|
|
1766
|
+
};
|
|
1767
|
+
|
|
1768
|
+
/** @param {proto.protocol.NewKey|undefined} value */
|
|
1769
|
+
proto.protocol.Snapshot.prototype.setNewKey = function (value) {
|
|
1770
|
+
jspb.Message.setWrapperField(this, 1, value);
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1773
|
+
proto.protocol.Snapshot.prototype.clearNewKey = function () {
|
|
1774
|
+
this.setNewKey(undefined);
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
/**
|
|
1778
|
+
* Returns whether this field is set.
|
|
1779
|
+
* @return{!boolean}
|
|
1780
|
+
*/
|
|
1781
|
+
proto.protocol.Snapshot.prototype.hasNewKey = function () {
|
|
1782
|
+
return jspb.Message.getField(this, 1) != null;
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* repeated ModifyKey modify_key = 2;
|
|
1787
|
+
* If you change this array by adding, removing or replacing elements, or if you
|
|
1788
|
+
* replace the array itself, then you must call the setter to update it.
|
|
1789
|
+
* @return {!Array.<!proto.protocol.ModifyKey>}
|
|
1790
|
+
*/
|
|
1791
|
+
proto.protocol.Snapshot.prototype.getModifyKeyList = function () {
|
|
1792
|
+
return /** @type{!Array.<!proto.protocol.ModifyKey>} */ (
|
|
1793
|
+
jspb.Message.getRepeatedWrapperField(this, proto.protocol.ModifyKey, 2)
|
|
1794
|
+
);
|
|
1795
|
+
};
|
|
1796
|
+
|
|
1797
|
+
/** @param {Array.<!proto.protocol.ModifyKey>} value */
|
|
1798
|
+
proto.protocol.Snapshot.prototype.setModifyKeyList = function (value) {
|
|
1799
|
+
jspb.Message.setRepeatedWrapperField(this, 2, value);
|
|
1800
|
+
};
|
|
1801
|
+
|
|
1802
|
+
proto.protocol.Snapshot.prototype.clearModifyKeyList = function () {
|
|
1803
|
+
this.setModifyKeyList([]);
|
|
1804
|
+
};
|
|
1805
|
+
|
|
1806
|
+
/**
|
|
1807
|
+
* optional int64 seq = 3;
|
|
1808
|
+
* @return {number}
|
|
1809
|
+
*/
|
|
1810
|
+
proto.protocol.Snapshot.prototype.getSeq = function () {
|
|
1811
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
|
|
1812
|
+
};
|
|
1813
|
+
|
|
1814
|
+
/** @param {number} value */
|
|
1815
|
+
proto.protocol.Snapshot.prototype.setSeq = function (value) {
|
|
1816
|
+
jspb.Message.setField(this, 3, value);
|
|
1817
|
+
};
|
|
1818
|
+
|
|
1819
|
+
/**
|
|
1820
|
+
* Generated by JsPbCodeGenerator.
|
|
1821
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
1822
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
1823
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
1824
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
1825
|
+
* valid.
|
|
1826
|
+
* @extends {jspb.Message}
|
|
1827
|
+
* @constructor
|
|
1828
|
+
*/
|
|
1829
|
+
proto.protocol.Validator = function (opt_data) {
|
|
1830
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
1831
|
+
};
|
|
1832
|
+
goog.inherits(proto.protocol.Validator, jspb.Message);
|
|
1833
|
+
if (goog.DEBUG && !COMPILED) {
|
|
1834
|
+
proto.protocol.Validator.displayName = "proto.protocol.Validator";
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1838
|
+
/**
|
|
1839
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
1840
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1841
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1842
|
+
* For the list of reserved names please see:
|
|
1843
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
1844
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
1845
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
1846
|
+
* @return {!Object}
|
|
1847
|
+
*/
|
|
1848
|
+
proto.protocol.Validator.prototype.toObject = function (opt_includeInstance) {
|
|
1849
|
+
return proto.protocol.Validator.toObject(opt_includeInstance, this);
|
|
1850
|
+
};
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* Static version of the {@see toObject} method.
|
|
1854
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
1855
|
+
* instance for transitional soy proto support:
|
|
1856
|
+
* http://goto/soy-param-migration
|
|
1857
|
+
* @param {!proto.protocol.Validator} msg The msg instance to transform.
|
|
1858
|
+
* @return {!Object}
|
|
1859
|
+
*/
|
|
1860
|
+
proto.protocol.Validator.toObject = function (includeInstance, msg) {
|
|
1861
|
+
var f,
|
|
1862
|
+
obj = {
|
|
1863
|
+
address: msg.getAddress(),
|
|
1864
|
+
pledgeCoinAmount: msg.getPledgeCoinAmount(),
|
|
1865
|
+
};
|
|
1866
|
+
|
|
1867
|
+
if (includeInstance) {
|
|
1868
|
+
obj.$jspbMessageInstance = msg;
|
|
1869
|
+
}
|
|
1870
|
+
return obj;
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1876
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1877
|
+
* @return {!proto.protocol.Validator}
|
|
1878
|
+
*/
|
|
1879
|
+
proto.protocol.Validator.deserializeBinary = function (bytes) {
|
|
1880
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1881
|
+
var msg = new proto.protocol.Validator();
|
|
1882
|
+
return proto.protocol.Validator.deserializeBinaryFromReader(msg, reader);
|
|
1883
|
+
};
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1887
|
+
* given reader into the given message object.
|
|
1888
|
+
* @param {!proto.protocol.Validator} msg The message object to deserialize into.
|
|
1889
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1890
|
+
* @return {!proto.protocol.Validator}
|
|
1891
|
+
*/
|
|
1892
|
+
proto.protocol.Validator.deserializeBinaryFromReader = function (msg, reader) {
|
|
1893
|
+
while (reader.nextField()) {
|
|
1894
|
+
if (reader.isEndGroup()) {
|
|
1895
|
+
break;
|
|
1896
|
+
}
|
|
1897
|
+
var field = reader.getFieldNumber();
|
|
1898
|
+
switch (field) {
|
|
1899
|
+
case 1:
|
|
1900
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1901
|
+
msg.setAddress(value);
|
|
1902
|
+
break;
|
|
1903
|
+
case 2:
|
|
1904
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
1905
|
+
msg.setPledgeCoinAmount(value);
|
|
1906
|
+
break;
|
|
1907
|
+
default:
|
|
1908
|
+
reader.skipField();
|
|
1909
|
+
break;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
return msg;
|
|
1913
|
+
};
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* Class method variant: serializes the given message to binary data
|
|
1917
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
1918
|
+
* @param {!proto.protocol.Validator} message
|
|
1919
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1920
|
+
*/
|
|
1921
|
+
proto.protocol.Validator.serializeBinaryToWriter = function (message, writer) {
|
|
1922
|
+
message.serializeBinaryToWriter(writer);
|
|
1923
|
+
};
|
|
1924
|
+
|
|
1925
|
+
/**
|
|
1926
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1927
|
+
* @return {!Uint8Array}
|
|
1928
|
+
*/
|
|
1929
|
+
proto.protocol.Validator.prototype.serializeBinary = function () {
|
|
1930
|
+
var writer = new jspb.BinaryWriter();
|
|
1931
|
+
this.serializeBinaryToWriter(writer);
|
|
1932
|
+
return writer.getResultBuffer();
|
|
1933
|
+
};
|
|
1934
|
+
|
|
1935
|
+
/**
|
|
1936
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
1937
|
+
* writing to the given BinaryWriter.
|
|
1938
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1939
|
+
*/
|
|
1940
|
+
proto.protocol.Validator.prototype.serializeBinaryToWriter = function (writer) {
|
|
1941
|
+
var f = undefined;
|
|
1942
|
+
f = this.getAddress();
|
|
1943
|
+
if (f.length > 0) {
|
|
1944
|
+
writer.writeString(1, f);
|
|
1945
|
+
}
|
|
1946
|
+
f = this.getPledgeCoinAmount();
|
|
1947
|
+
if (f !== 0) {
|
|
1948
|
+
writer.writeInt64(2, f);
|
|
1949
|
+
}
|
|
1950
|
+
};
|
|
1951
|
+
|
|
1952
|
+
/**
|
|
1953
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
1954
|
+
* @return {!proto.protocol.Validator} The clone.
|
|
1955
|
+
*/
|
|
1956
|
+
proto.protocol.Validator.prototype.cloneMessage = function () {
|
|
1957
|
+
return /** @type {!proto.protocol.Validator} */ (
|
|
1958
|
+
jspb.Message.cloneMessage(this)
|
|
1959
|
+
);
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1962
|
+
/**
|
|
1963
|
+
* optional string address = 1;
|
|
1964
|
+
* @return {string}
|
|
1965
|
+
*/
|
|
1966
|
+
proto.protocol.Validator.prototype.getAddress = function () {
|
|
1967
|
+
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1970
|
+
/** @param {string} value */
|
|
1971
|
+
proto.protocol.Validator.prototype.setAddress = function (value) {
|
|
1972
|
+
jspb.Message.setField(this, 1, value);
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* optional int64 pledge_coin_amount = 2;
|
|
1977
|
+
* @return {number}
|
|
1978
|
+
*/
|
|
1979
|
+
proto.protocol.Validator.prototype.getPledgeCoinAmount = function () {
|
|
1980
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
|
|
1981
|
+
};
|
|
1982
|
+
|
|
1983
|
+
/** @param {number} value */
|
|
1984
|
+
proto.protocol.Validator.prototype.setPledgeCoinAmount = function (value) {
|
|
1985
|
+
jspb.Message.setField(this, 2, value);
|
|
1986
|
+
};
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Generated by JsPbCodeGenerator.
|
|
1990
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
1991
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
1992
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
1993
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
1994
|
+
* valid.
|
|
1995
|
+
* @extends {jspb.Message}
|
|
1996
|
+
* @constructor
|
|
1997
|
+
*/
|
|
1998
|
+
proto.protocol.ValidatorSet = function (opt_data) {
|
|
1999
|
+
jspb.Message.initialize(
|
|
2000
|
+
this,
|
|
2001
|
+
opt_data,
|
|
2002
|
+
0,
|
|
2003
|
+
-1,
|
|
2004
|
+
proto.protocol.ValidatorSet.repeatedFields_,
|
|
2005
|
+
null,
|
|
2006
|
+
);
|
|
2007
|
+
};
|
|
2008
|
+
goog.inherits(proto.protocol.ValidatorSet, jspb.Message);
|
|
2009
|
+
if (goog.DEBUG && !COMPILED) {
|
|
2010
|
+
proto.protocol.ValidatorSet.displayName = "proto.protocol.ValidatorSet";
|
|
2011
|
+
}
|
|
2012
|
+
/**
|
|
2013
|
+
* List of repeated fields within this message type.
|
|
2014
|
+
* @private {!Array<number>}
|
|
2015
|
+
* @const
|
|
2016
|
+
*/
|
|
2017
|
+
proto.protocol.ValidatorSet.repeatedFields_ = [1];
|
|
2018
|
+
|
|
2019
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2020
|
+
/**
|
|
2021
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
2022
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
2023
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
2024
|
+
* For the list of reserved names please see:
|
|
2025
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
2026
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
2027
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
2028
|
+
* @return {!Object}
|
|
2029
|
+
*/
|
|
2030
|
+
proto.protocol.ValidatorSet.prototype.toObject = function (
|
|
2031
|
+
opt_includeInstance,
|
|
2032
|
+
) {
|
|
2033
|
+
return proto.protocol.ValidatorSet.toObject(opt_includeInstance, this);
|
|
2034
|
+
};
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* Static version of the {@see toObject} method.
|
|
2038
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
2039
|
+
* instance for transitional soy proto support:
|
|
2040
|
+
* http://goto/soy-param-migration
|
|
2041
|
+
* @param {!proto.protocol.ValidatorSet} msg The msg instance to transform.
|
|
2042
|
+
* @return {!Object}
|
|
2043
|
+
*/
|
|
2044
|
+
proto.protocol.ValidatorSet.toObject = function (includeInstance, msg) {
|
|
2045
|
+
var f,
|
|
2046
|
+
obj = {
|
|
2047
|
+
validatorsList: jspb.Message.toObjectList(
|
|
2048
|
+
msg.getValidatorsList(),
|
|
2049
|
+
proto.protocol.Validator.toObject,
|
|
2050
|
+
includeInstance,
|
|
2051
|
+
),
|
|
2052
|
+
};
|
|
2053
|
+
|
|
2054
|
+
if (includeInstance) {
|
|
2055
|
+
obj.$jspbMessageInstance = msg;
|
|
2056
|
+
}
|
|
2057
|
+
return obj;
|
|
2058
|
+
};
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* Deserializes binary data (in protobuf wire format).
|
|
2063
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
2064
|
+
* @return {!proto.protocol.ValidatorSet}
|
|
2065
|
+
*/
|
|
2066
|
+
proto.protocol.ValidatorSet.deserializeBinary = function (bytes) {
|
|
2067
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2068
|
+
var msg = new proto.protocol.ValidatorSet();
|
|
2069
|
+
return proto.protocol.ValidatorSet.deserializeBinaryFromReader(msg, reader);
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2072
|
+
/**
|
|
2073
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
2074
|
+
* given reader into the given message object.
|
|
2075
|
+
* @param {!proto.protocol.ValidatorSet} msg The message object to deserialize into.
|
|
2076
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
2077
|
+
* @return {!proto.protocol.ValidatorSet}
|
|
2078
|
+
*/
|
|
2079
|
+
proto.protocol.ValidatorSet.deserializeBinaryFromReader = function (
|
|
2080
|
+
msg,
|
|
2081
|
+
reader,
|
|
2082
|
+
) {
|
|
2083
|
+
while (reader.nextField()) {
|
|
2084
|
+
if (reader.isEndGroup()) {
|
|
2085
|
+
break;
|
|
2086
|
+
}
|
|
2087
|
+
var field = reader.getFieldNumber();
|
|
2088
|
+
switch (field) {
|
|
2089
|
+
case 1:
|
|
2090
|
+
var value = new proto.protocol.Validator();
|
|
2091
|
+
reader.readMessage(
|
|
2092
|
+
value,
|
|
2093
|
+
proto.protocol.Validator.deserializeBinaryFromReader,
|
|
2094
|
+
);
|
|
2095
|
+
msg.getValidatorsList().push(value);
|
|
2096
|
+
msg.setValidatorsList(msg.getValidatorsList());
|
|
2097
|
+
break;
|
|
2098
|
+
default:
|
|
2099
|
+
reader.skipField();
|
|
2100
|
+
break;
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
return msg;
|
|
2104
|
+
};
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* Class method variant: serializes the given message to binary data
|
|
2108
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
2109
|
+
* @param {!proto.protocol.ValidatorSet} message
|
|
2110
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2111
|
+
*/
|
|
2112
|
+
proto.protocol.ValidatorSet.serializeBinaryToWriter = function (
|
|
2113
|
+
message,
|
|
2114
|
+
writer,
|
|
2115
|
+
) {
|
|
2116
|
+
message.serializeBinaryToWriter(writer);
|
|
2117
|
+
};
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
2121
|
+
* @return {!Uint8Array}
|
|
2122
|
+
*/
|
|
2123
|
+
proto.protocol.ValidatorSet.prototype.serializeBinary = function () {
|
|
2124
|
+
var writer = new jspb.BinaryWriter();
|
|
2125
|
+
this.serializeBinaryToWriter(writer);
|
|
2126
|
+
return writer.getResultBuffer();
|
|
2127
|
+
};
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
2131
|
+
* writing to the given BinaryWriter.
|
|
2132
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2133
|
+
*/
|
|
2134
|
+
proto.protocol.ValidatorSet.prototype.serializeBinaryToWriter = function (
|
|
2135
|
+
writer,
|
|
2136
|
+
) {
|
|
2137
|
+
var f = undefined;
|
|
2138
|
+
f = this.getValidatorsList();
|
|
2139
|
+
if (f.length > 0) {
|
|
2140
|
+
writer.writeRepeatedMessage(
|
|
2141
|
+
1,
|
|
2142
|
+
f,
|
|
2143
|
+
proto.protocol.Validator.serializeBinaryToWriter,
|
|
2144
|
+
);
|
|
2145
|
+
}
|
|
2146
|
+
};
|
|
2147
|
+
|
|
2148
|
+
/**
|
|
2149
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
2150
|
+
* @return {!proto.protocol.ValidatorSet} The clone.
|
|
2151
|
+
*/
|
|
2152
|
+
proto.protocol.ValidatorSet.prototype.cloneMessage = function () {
|
|
2153
|
+
return /** @type {!proto.protocol.ValidatorSet} */ (
|
|
2154
|
+
jspb.Message.cloneMessage(this)
|
|
2155
|
+
);
|
|
2156
|
+
};
|
|
2157
|
+
|
|
2158
|
+
/**
|
|
2159
|
+
* repeated Validator validators = 1;
|
|
2160
|
+
* If you change this array by adding, removing or replacing elements, or if you
|
|
2161
|
+
* replace the array itself, then you must call the setter to update it.
|
|
2162
|
+
* @return {!Array.<!proto.protocol.Validator>}
|
|
2163
|
+
*/
|
|
2164
|
+
proto.protocol.ValidatorSet.prototype.getValidatorsList = function () {
|
|
2165
|
+
return /** @type{!Array.<!proto.protocol.Validator>} */ (
|
|
2166
|
+
jspb.Message.getRepeatedWrapperField(this, proto.protocol.Validator, 1)
|
|
2167
|
+
);
|
|
2168
|
+
};
|
|
2169
|
+
|
|
2170
|
+
/** @param {Array.<!proto.protocol.Validator>} value */
|
|
2171
|
+
proto.protocol.ValidatorSet.prototype.setValidatorsList = function (value) {
|
|
2172
|
+
jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
2173
|
+
};
|
|
2174
|
+
|
|
2175
|
+
proto.protocol.ValidatorSet.prototype.clearValidatorsList = function () {
|
|
2176
|
+
this.setValidatorsList([]);
|
|
2177
|
+
};
|
|
2178
|
+
|
|
2179
|
+
/**
|
|
2180
|
+
* Generated by JsPbCodeGenerator.
|
|
2181
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
2182
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
2183
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
2184
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
2185
|
+
* valid.
|
|
2186
|
+
* @extends {jspb.Message}
|
|
2187
|
+
* @constructor
|
|
2188
|
+
*/
|
|
2189
|
+
proto.protocol.FeeConfig = function (opt_data) {
|
|
2190
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
2191
|
+
};
|
|
2192
|
+
goog.inherits(proto.protocol.FeeConfig, jspb.Message);
|
|
2193
|
+
if (goog.DEBUG && !COMPILED) {
|
|
2194
|
+
proto.protocol.FeeConfig.displayName = "proto.protocol.FeeConfig";
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2198
|
+
/**
|
|
2199
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
2200
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
2201
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
2202
|
+
* For the list of reserved names please see:
|
|
2203
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
2204
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
2205
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
2206
|
+
* @return {!Object}
|
|
2207
|
+
*/
|
|
2208
|
+
proto.protocol.FeeConfig.prototype.toObject = function (opt_includeInstance) {
|
|
2209
|
+
return proto.protocol.FeeConfig.toObject(opt_includeInstance, this);
|
|
2210
|
+
};
|
|
2211
|
+
|
|
2212
|
+
/**
|
|
2213
|
+
* Static version of the {@see toObject} method.
|
|
2214
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
2215
|
+
* instance for transitional soy proto support:
|
|
2216
|
+
* http://goto/soy-param-migration
|
|
2217
|
+
* @param {!proto.protocol.FeeConfig} msg The msg instance to transform.
|
|
2218
|
+
* @return {!Object}
|
|
2219
|
+
*/
|
|
2220
|
+
proto.protocol.FeeConfig.toObject = function (includeInstance, msg) {
|
|
2221
|
+
var f,
|
|
2222
|
+
obj = {
|
|
2223
|
+
gasPrice: msg.getGasPrice(),
|
|
2224
|
+
baseReserve: msg.getBaseReserve(),
|
|
2225
|
+
};
|
|
2226
|
+
|
|
2227
|
+
if (includeInstance) {
|
|
2228
|
+
obj.$jspbMessageInstance = msg;
|
|
2229
|
+
}
|
|
2230
|
+
return obj;
|
|
2231
|
+
};
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
/**
|
|
2235
|
+
* Deserializes binary data (in protobuf wire format).
|
|
2236
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
2237
|
+
* @return {!proto.protocol.FeeConfig}
|
|
2238
|
+
*/
|
|
2239
|
+
proto.protocol.FeeConfig.deserializeBinary = function (bytes) {
|
|
2240
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2241
|
+
var msg = new proto.protocol.FeeConfig();
|
|
2242
|
+
return proto.protocol.FeeConfig.deserializeBinaryFromReader(msg, reader);
|
|
2243
|
+
};
|
|
2244
|
+
|
|
2245
|
+
/**
|
|
2246
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
2247
|
+
* given reader into the given message object.
|
|
2248
|
+
* @param {!proto.protocol.FeeConfig} msg The message object to deserialize into.
|
|
2249
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
2250
|
+
* @return {!proto.protocol.FeeConfig}
|
|
2251
|
+
*/
|
|
2252
|
+
proto.protocol.FeeConfig.deserializeBinaryFromReader = function (msg, reader) {
|
|
2253
|
+
while (reader.nextField()) {
|
|
2254
|
+
if (reader.isEndGroup()) {
|
|
2255
|
+
break;
|
|
2256
|
+
}
|
|
2257
|
+
var field = reader.getFieldNumber();
|
|
2258
|
+
switch (field) {
|
|
2259
|
+
case 1:
|
|
2260
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
2261
|
+
msg.setGasPrice(value);
|
|
2262
|
+
break;
|
|
2263
|
+
case 2:
|
|
2264
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
2265
|
+
msg.setBaseReserve(value);
|
|
2266
|
+
break;
|
|
2267
|
+
default:
|
|
2268
|
+
reader.skipField();
|
|
2269
|
+
break;
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
return msg;
|
|
2273
|
+
};
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* Class method variant: serializes the given message to binary data
|
|
2277
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
2278
|
+
* @param {!proto.protocol.FeeConfig} message
|
|
2279
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2280
|
+
*/
|
|
2281
|
+
proto.protocol.FeeConfig.serializeBinaryToWriter = function (message, writer) {
|
|
2282
|
+
message.serializeBinaryToWriter(writer);
|
|
2283
|
+
};
|
|
2284
|
+
|
|
2285
|
+
/**
|
|
2286
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
2287
|
+
* @return {!Uint8Array}
|
|
2288
|
+
*/
|
|
2289
|
+
proto.protocol.FeeConfig.prototype.serializeBinary = function () {
|
|
2290
|
+
var writer = new jspb.BinaryWriter();
|
|
2291
|
+
this.serializeBinaryToWriter(writer);
|
|
2292
|
+
return writer.getResultBuffer();
|
|
2293
|
+
};
|
|
2294
|
+
|
|
2295
|
+
/**
|
|
2296
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
2297
|
+
* writing to the given BinaryWriter.
|
|
2298
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2299
|
+
*/
|
|
2300
|
+
proto.protocol.FeeConfig.prototype.serializeBinaryToWriter = function (writer) {
|
|
2301
|
+
var f = undefined;
|
|
2302
|
+
f = this.getGasPrice();
|
|
2303
|
+
if (f !== 0) {
|
|
2304
|
+
writer.writeInt64(1, f);
|
|
2305
|
+
}
|
|
2306
|
+
f = this.getBaseReserve();
|
|
2307
|
+
if (f !== 0) {
|
|
2308
|
+
writer.writeInt64(2, f);
|
|
2309
|
+
}
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
2314
|
+
* @return {!proto.protocol.FeeConfig} The clone.
|
|
2315
|
+
*/
|
|
2316
|
+
proto.protocol.FeeConfig.prototype.cloneMessage = function () {
|
|
2317
|
+
return /** @type {!proto.protocol.FeeConfig} */ (
|
|
2318
|
+
jspb.Message.cloneMessage(this)
|
|
2319
|
+
);
|
|
2320
|
+
};
|
|
2321
|
+
|
|
2322
|
+
/**
|
|
2323
|
+
* optional int64 gas_price = 1;
|
|
2324
|
+
* @return {number}
|
|
2325
|
+
*/
|
|
2326
|
+
proto.protocol.FeeConfig.prototype.getGasPrice = function () {
|
|
2327
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
|
|
2328
|
+
};
|
|
2329
|
+
|
|
2330
|
+
/** @param {number} value */
|
|
2331
|
+
proto.protocol.FeeConfig.prototype.setGasPrice = function (value) {
|
|
2332
|
+
jspb.Message.setField(this, 1, value);
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* optional int64 base_reserve = 2;
|
|
2337
|
+
* @return {number}
|
|
2338
|
+
*/
|
|
2339
|
+
proto.protocol.FeeConfig.prototype.getBaseReserve = function () {
|
|
2340
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
|
|
2341
|
+
};
|
|
2342
|
+
|
|
2343
|
+
/** @param {number} value */
|
|
2344
|
+
proto.protocol.FeeConfig.prototype.setBaseReserve = function (value) {
|
|
2345
|
+
jspb.Message.setField(this, 2, value);
|
|
2346
|
+
};
|
|
2347
|
+
|
|
2348
|
+
/**
|
|
2349
|
+
* @enum {number}
|
|
2350
|
+
*/
|
|
2351
|
+
proto.protocol.FeeConfig.Type = {
|
|
2352
|
+
UNKNOWN: 0,
|
|
2353
|
+
GAS_PRICE: 1,
|
|
2354
|
+
BASE_RESERVE: 2,
|
|
2355
|
+
};
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Generated by JsPbCodeGenerator.
|
|
2359
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
2360
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
2361
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
2362
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
2363
|
+
* valid.
|
|
2364
|
+
* @extends {jspb.Message}
|
|
2365
|
+
* @constructor
|
|
2366
|
+
*/
|
|
2367
|
+
proto.protocol.Int32Value = function (opt_data) {
|
|
2368
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
2369
|
+
};
|
|
2370
|
+
goog.inherits(proto.protocol.Int32Value, jspb.Message);
|
|
2371
|
+
if (goog.DEBUG && !COMPILED) {
|
|
2372
|
+
proto.protocol.Int32Value.displayName = "proto.protocol.Int32Value";
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2376
|
+
/**
|
|
2377
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
2378
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
2379
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
2380
|
+
* For the list of reserved names please see:
|
|
2381
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
2382
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
2383
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
2384
|
+
* @return {!Object}
|
|
2385
|
+
*/
|
|
2386
|
+
proto.protocol.Int32Value.prototype.toObject = function (
|
|
2387
|
+
opt_includeInstance,
|
|
2388
|
+
) {
|
|
2389
|
+
return proto.protocol.Int32Value.toObject(opt_includeInstance, this);
|
|
2390
|
+
};
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* Static version of the {@see toObject} method.
|
|
2394
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
2395
|
+
* instance for transitional soy proto support:
|
|
2396
|
+
* http://goto/soy-param-migration
|
|
2397
|
+
* @param {!proto.protocol.Int32Value} msg The msg instance to transform.
|
|
2398
|
+
* @return {!Object}
|
|
2399
|
+
*/
|
|
2400
|
+
proto.protocol.Int32Value.toObject = function (includeInstance, msg) {
|
|
2401
|
+
var f,
|
|
2402
|
+
obj = {
|
|
2403
|
+
value: msg.getValue(),
|
|
2404
|
+
};
|
|
2405
|
+
|
|
2406
|
+
if (includeInstance) {
|
|
2407
|
+
obj.$jspbMessageInstance = msg;
|
|
2408
|
+
}
|
|
2409
|
+
return obj;
|
|
2410
|
+
};
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* Deserializes binary data (in protobuf wire format).
|
|
2415
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
2416
|
+
* @return {!proto.protocol.Int32Value}
|
|
2417
|
+
*/
|
|
2418
|
+
proto.protocol.Int32Value.deserializeBinary = function (bytes) {
|
|
2419
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2420
|
+
var msg = new proto.protocol.Int32Value();
|
|
2421
|
+
return proto.protocol.Int32Value.deserializeBinaryFromReader(msg, reader);
|
|
2422
|
+
};
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
2426
|
+
* given reader into the given message object.
|
|
2427
|
+
* @param {!proto.protocol.Int32Value} msg The message object to deserialize into.
|
|
2428
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
2429
|
+
* @return {!proto.protocol.Int32Value}
|
|
2430
|
+
*/
|
|
2431
|
+
proto.protocol.Int32Value.deserializeBinaryFromReader = function (msg, reader) {
|
|
2432
|
+
while (reader.nextField()) {
|
|
2433
|
+
if (reader.isEndGroup()) {
|
|
2434
|
+
break;
|
|
2435
|
+
}
|
|
2436
|
+
var field = reader.getFieldNumber();
|
|
2437
|
+
switch (field) {
|
|
2438
|
+
case 1:
|
|
2439
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
2440
|
+
msg.setValue(value);
|
|
2441
|
+
break;
|
|
2442
|
+
default:
|
|
2443
|
+
reader.skipField();
|
|
2444
|
+
break;
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
return msg;
|
|
2448
|
+
};
|
|
2449
|
+
|
|
2450
|
+
/**
|
|
2451
|
+
* Class method variant: serializes the given message to binary data
|
|
2452
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
2453
|
+
* @param {!proto.protocol.Int32Value} message
|
|
2454
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2455
|
+
*/
|
|
2456
|
+
proto.protocol.Int32Value.serializeBinaryToWriter = function (message, writer) {
|
|
2457
|
+
message.serializeBinaryToWriter(writer);
|
|
2458
|
+
};
|
|
2459
|
+
|
|
2460
|
+
/**
|
|
2461
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
2462
|
+
* @return {!Uint8Array}
|
|
2463
|
+
*/
|
|
2464
|
+
proto.protocol.Int32Value.prototype.serializeBinary = function () {
|
|
2465
|
+
var writer = new jspb.BinaryWriter();
|
|
2466
|
+
this.serializeBinaryToWriter(writer);
|
|
2467
|
+
return writer.getResultBuffer();
|
|
2468
|
+
};
|
|
2469
|
+
|
|
2470
|
+
/**
|
|
2471
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
2472
|
+
* writing to the given BinaryWriter.
|
|
2473
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2474
|
+
*/
|
|
2475
|
+
proto.protocol.Int32Value.prototype.serializeBinaryToWriter = function (
|
|
2476
|
+
writer,
|
|
2477
|
+
) {
|
|
2478
|
+
var f = undefined;
|
|
2479
|
+
f = this.getValue();
|
|
2480
|
+
if (f !== 0) {
|
|
2481
|
+
writer.writeInt32(1, f);
|
|
2482
|
+
}
|
|
2483
|
+
};
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
2487
|
+
* @return {!proto.protocol.Int32Value} The clone.
|
|
2488
|
+
*/
|
|
2489
|
+
proto.protocol.Int32Value.prototype.cloneMessage = function () {
|
|
2490
|
+
return /** @type {!proto.protocol.Int32Value} */ (
|
|
2491
|
+
jspb.Message.cloneMessage(this)
|
|
2492
|
+
);
|
|
2493
|
+
};
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* optional int32 value = 1;
|
|
2497
|
+
* @return {number}
|
|
2498
|
+
*/
|
|
2499
|
+
proto.protocol.Int32Value.prototype.getValue = function () {
|
|
2500
|
+
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
|
|
2501
|
+
};
|
|
2502
|
+
|
|
2503
|
+
/** @param {number} value */
|
|
2504
|
+
proto.protocol.Int32Value.prototype.setValue = function (value) {
|
|
2505
|
+
jspb.Message.setField(this, 1, value);
|
|
2506
|
+
};
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Generated by JsPbCodeGenerator.
|
|
2510
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
2511
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
2512
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
2513
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
2514
|
+
* valid.
|
|
2515
|
+
* @extends {jspb.Message}
|
|
2516
|
+
* @constructor
|
|
2517
|
+
*/
|
|
2518
|
+
proto.protocol.BoolValue = function (opt_data) {
|
|
2519
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
2520
|
+
};
|
|
2521
|
+
goog.inherits(proto.protocol.BoolValue, jspb.Message);
|
|
2522
|
+
if (goog.DEBUG && !COMPILED) {
|
|
2523
|
+
proto.protocol.BoolValue.displayName = "proto.protocol.BoolValue";
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2527
|
+
/**
|
|
2528
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
2529
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
2530
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
2531
|
+
* For the list of reserved names please see:
|
|
2532
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
2533
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
2534
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
2535
|
+
* @return {!Object}
|
|
2536
|
+
*/
|
|
2537
|
+
proto.protocol.BoolValue.prototype.toObject = function (opt_includeInstance) {
|
|
2538
|
+
return proto.protocol.BoolValue.toObject(opt_includeInstance, this);
|
|
2539
|
+
};
|
|
2540
|
+
|
|
2541
|
+
/**
|
|
2542
|
+
* Static version of the {@see toObject} method.
|
|
2543
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
2544
|
+
* instance for transitional soy proto support:
|
|
2545
|
+
* http://goto/soy-param-migration
|
|
2546
|
+
* @param {!proto.protocol.BoolValue} msg The msg instance to transform.
|
|
2547
|
+
* @return {!Object}
|
|
2548
|
+
*/
|
|
2549
|
+
proto.protocol.BoolValue.toObject = function (includeInstance, msg) {
|
|
2550
|
+
var f,
|
|
2551
|
+
obj = {
|
|
2552
|
+
value: msg.getValue(),
|
|
2553
|
+
};
|
|
2554
|
+
|
|
2555
|
+
if (includeInstance) {
|
|
2556
|
+
obj.$jspbMessageInstance = msg;
|
|
2557
|
+
}
|
|
2558
|
+
return obj;
|
|
2559
|
+
};
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
/**
|
|
2563
|
+
* Deserializes binary data (in protobuf wire format).
|
|
2564
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
2565
|
+
* @return {!proto.protocol.BoolValue}
|
|
2566
|
+
*/
|
|
2567
|
+
proto.protocol.BoolValue.deserializeBinary = function (bytes) {
|
|
2568
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2569
|
+
var msg = new proto.protocol.BoolValue();
|
|
2570
|
+
return proto.protocol.BoolValue.deserializeBinaryFromReader(msg, reader);
|
|
2571
|
+
};
|
|
2572
|
+
|
|
2573
|
+
/**
|
|
2574
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
2575
|
+
* given reader into the given message object.
|
|
2576
|
+
* @param {!proto.protocol.BoolValue} msg The message object to deserialize into.
|
|
2577
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
2578
|
+
* @return {!proto.protocol.BoolValue}
|
|
2579
|
+
*/
|
|
2580
|
+
proto.protocol.BoolValue.deserializeBinaryFromReader = function (msg, reader) {
|
|
2581
|
+
while (reader.nextField()) {
|
|
2582
|
+
if (reader.isEndGroup()) {
|
|
2583
|
+
break;
|
|
2584
|
+
}
|
|
2585
|
+
var field = reader.getFieldNumber();
|
|
2586
|
+
switch (field) {
|
|
2587
|
+
case 1:
|
|
2588
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
2589
|
+
msg.setValue(value);
|
|
2590
|
+
break;
|
|
2591
|
+
default:
|
|
2592
|
+
reader.skipField();
|
|
2593
|
+
break;
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
return msg;
|
|
2597
|
+
};
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* Class method variant: serializes the given message to binary data
|
|
2601
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
2602
|
+
* @param {!proto.protocol.BoolValue} message
|
|
2603
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2604
|
+
*/
|
|
2605
|
+
proto.protocol.BoolValue.serializeBinaryToWriter = function (message, writer) {
|
|
2606
|
+
message.serializeBinaryToWriter(writer);
|
|
2607
|
+
};
|
|
2608
|
+
|
|
2609
|
+
/**
|
|
2610
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
2611
|
+
* @return {!Uint8Array}
|
|
2612
|
+
*/
|
|
2613
|
+
proto.protocol.BoolValue.prototype.serializeBinary = function () {
|
|
2614
|
+
var writer = new jspb.BinaryWriter();
|
|
2615
|
+
this.serializeBinaryToWriter(writer);
|
|
2616
|
+
return writer.getResultBuffer();
|
|
2617
|
+
};
|
|
2618
|
+
|
|
2619
|
+
/**
|
|
2620
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
2621
|
+
* writing to the given BinaryWriter.
|
|
2622
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2623
|
+
*/
|
|
2624
|
+
proto.protocol.BoolValue.prototype.serializeBinaryToWriter = function (writer) {
|
|
2625
|
+
var f = undefined;
|
|
2626
|
+
f = this.getValue();
|
|
2627
|
+
if (f) {
|
|
2628
|
+
writer.writeBool(1, f);
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
|
|
2632
|
+
/**
|
|
2633
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
2634
|
+
* @return {!proto.protocol.BoolValue} The clone.
|
|
2635
|
+
*/
|
|
2636
|
+
proto.protocol.BoolValue.prototype.cloneMessage = function () {
|
|
2637
|
+
return /** @type {!proto.protocol.BoolValue} */ (
|
|
2638
|
+
jspb.Message.cloneMessage(this)
|
|
2639
|
+
);
|
|
2640
|
+
};
|
|
2641
|
+
|
|
2642
|
+
/**
|
|
2643
|
+
* optional bool value = 1;
|
|
2644
|
+
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
|
2645
|
+
* You should avoid comparisons like {@code val === true/false} in those cases.
|
|
2646
|
+
* @return {boolean}
|
|
2647
|
+
*/
|
|
2648
|
+
proto.protocol.BoolValue.prototype.getValue = function () {
|
|
2649
|
+
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 1, false));
|
|
2650
|
+
};
|
|
2651
|
+
|
|
2652
|
+
/** @param {boolean} value */
|
|
2653
|
+
proto.protocol.BoolValue.prototype.setValue = function (value) {
|
|
2654
|
+
jspb.Message.setField(this, 1, value);
|
|
2655
|
+
};
|
|
2656
|
+
|
|
2657
|
+
/**
|
|
2658
|
+
* Generated by JsPbCodeGenerator.
|
|
2659
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
2660
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
2661
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
2662
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
2663
|
+
* valid.
|
|
2664
|
+
* @extends {jspb.Message}
|
|
2665
|
+
* @constructor
|
|
2666
|
+
*/
|
|
2667
|
+
proto.protocol.StringValue = function (opt_data) {
|
|
2668
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
2669
|
+
};
|
|
2670
|
+
goog.inherits(proto.protocol.StringValue, jspb.Message);
|
|
2671
|
+
if (goog.DEBUG && !COMPILED) {
|
|
2672
|
+
proto.protocol.StringValue.displayName = "proto.protocol.StringValue";
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2676
|
+
/**
|
|
2677
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
2678
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
2679
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
2680
|
+
* For the list of reserved names please see:
|
|
2681
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
2682
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
2683
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
|
2684
|
+
* @return {!Object}
|
|
2685
|
+
*/
|
|
2686
|
+
proto.protocol.StringValue.prototype.toObject = function (
|
|
2687
|
+
opt_includeInstance,
|
|
2688
|
+
) {
|
|
2689
|
+
return proto.protocol.StringValue.toObject(opt_includeInstance, this);
|
|
2690
|
+
};
|
|
2691
|
+
|
|
2692
|
+
/**
|
|
2693
|
+
* Static version of the {@see toObject} method.
|
|
2694
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
2695
|
+
* instance for transitional soy proto support:
|
|
2696
|
+
* http://goto/soy-param-migration
|
|
2697
|
+
* @param {!proto.protocol.StringValue} msg The msg instance to transform.
|
|
2698
|
+
* @return {!Object}
|
|
2699
|
+
*/
|
|
2700
|
+
proto.protocol.StringValue.toObject = function (includeInstance, msg) {
|
|
2701
|
+
var f,
|
|
2702
|
+
obj = {
|
|
2703
|
+
value: msg.getValue(),
|
|
2704
|
+
};
|
|
2705
|
+
|
|
2706
|
+
if (includeInstance) {
|
|
2707
|
+
obj.$jspbMessageInstance = msg;
|
|
2708
|
+
}
|
|
2709
|
+
return obj;
|
|
2710
|
+
};
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
/**
|
|
2714
|
+
* Deserializes binary data (in protobuf wire format).
|
|
2715
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
2716
|
+
* @return {!proto.protocol.StringValue}
|
|
2717
|
+
*/
|
|
2718
|
+
proto.protocol.StringValue.deserializeBinary = function (bytes) {
|
|
2719
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2720
|
+
var msg = new proto.protocol.StringValue();
|
|
2721
|
+
return proto.protocol.StringValue.deserializeBinaryFromReader(msg, reader);
|
|
2722
|
+
};
|
|
2723
|
+
|
|
2724
|
+
/**
|
|
2725
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
2726
|
+
* given reader into the given message object.
|
|
2727
|
+
* @param {!proto.protocol.StringValue} msg The message object to deserialize into.
|
|
2728
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
2729
|
+
* @return {!proto.protocol.StringValue}
|
|
2730
|
+
*/
|
|
2731
|
+
proto.protocol.StringValue.deserializeBinaryFromReader = function (
|
|
2732
|
+
msg,
|
|
2733
|
+
reader,
|
|
2734
|
+
) {
|
|
2735
|
+
while (reader.nextField()) {
|
|
2736
|
+
if (reader.isEndGroup()) {
|
|
2737
|
+
break;
|
|
2738
|
+
}
|
|
2739
|
+
var field = reader.getFieldNumber();
|
|
2740
|
+
switch (field) {
|
|
2741
|
+
case 1:
|
|
2742
|
+
var value = /** @type {string} */ (reader.readString());
|
|
2743
|
+
msg.setValue(value);
|
|
2744
|
+
break;
|
|
2745
|
+
default:
|
|
2746
|
+
reader.skipField();
|
|
2747
|
+
break;
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
return msg;
|
|
2751
|
+
};
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* Class method variant: serializes the given message to binary data
|
|
2755
|
+
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
2756
|
+
* @param {!proto.protocol.StringValue} message
|
|
2757
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2758
|
+
*/
|
|
2759
|
+
proto.protocol.StringValue.serializeBinaryToWriter = function (
|
|
2760
|
+
message,
|
|
2761
|
+
writer,
|
|
2762
|
+
) {
|
|
2763
|
+
message.serializeBinaryToWriter(writer);
|
|
2764
|
+
};
|
|
2765
|
+
|
|
2766
|
+
/**
|
|
2767
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
2768
|
+
* @return {!Uint8Array}
|
|
2769
|
+
*/
|
|
2770
|
+
proto.protocol.StringValue.prototype.serializeBinary = function () {
|
|
2771
|
+
var writer = new jspb.BinaryWriter();
|
|
2772
|
+
this.serializeBinaryToWriter(writer);
|
|
2773
|
+
return writer.getResultBuffer();
|
|
2774
|
+
};
|
|
2775
|
+
|
|
2776
|
+
/**
|
|
2777
|
+
* Serializes the message to binary data (in protobuf wire format),
|
|
2778
|
+
* writing to the given BinaryWriter.
|
|
2779
|
+
* @param {!jspb.BinaryWriter} writer
|
|
2780
|
+
*/
|
|
2781
|
+
proto.protocol.StringValue.prototype.serializeBinaryToWriter = function (
|
|
2782
|
+
writer,
|
|
2783
|
+
) {
|
|
2784
|
+
var f = undefined;
|
|
2785
|
+
f = this.getValue();
|
|
2786
|
+
if (f.length > 0) {
|
|
2787
|
+
writer.writeString(1, f);
|
|
2788
|
+
}
|
|
2789
|
+
};
|
|
2790
|
+
|
|
2791
|
+
/**
|
|
2792
|
+
* Creates a deep clone of this proto. No data is shared with the original.
|
|
2793
|
+
* @return {!proto.protocol.StringValue} The clone.
|
|
2794
|
+
*/
|
|
2795
|
+
proto.protocol.StringValue.prototype.cloneMessage = function () {
|
|
2796
|
+
return /** @type {!proto.protocol.StringValue} */ (
|
|
2797
|
+
jspb.Message.cloneMessage(this)
|
|
2798
|
+
);
|
|
2799
|
+
};
|
|
2800
|
+
|
|
2801
|
+
/**
|
|
2802
|
+
* optional string value = 1;
|
|
2803
|
+
* @return {string}
|
|
2804
|
+
*/
|
|
2805
|
+
proto.protocol.StringValue.prototype.getValue = function () {
|
|
2806
|
+
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
|
2807
|
+
};
|
|
2808
|
+
|
|
2809
|
+
/** @param {string} value */
|
|
2810
|
+
proto.protocol.StringValue.prototype.setValue = function (value) {
|
|
2811
|
+
jspb.Message.setField(this, 1, value);
|
|
2812
|
+
};
|
|
2813
|
+
|
|
2814
|
+
/**
|
|
2815
|
+
* @enum {number}
|
|
2816
|
+
*/
|
|
2817
|
+
proto.protocol.ERRORCODE = {
|
|
2818
|
+
ERRCODE_SUCCESS: 0,
|
|
2819
|
+
ERRCODE_INTERNAL_ERROR: 1,
|
|
2820
|
+
ERRCODE_INVALID_PARAMETER: 2,
|
|
2821
|
+
ERRCODE_ALREADY_EXIST: 3,
|
|
2822
|
+
ERRCODE_NOT_EXIST: 4,
|
|
2823
|
+
ERRCODE_TX_TIMEOUT: 5,
|
|
2824
|
+
ERRCODE_ACCESS_DENIED: 6,
|
|
2825
|
+
ERRCODE_MATH_OVERFLOW: 7,
|
|
2826
|
+
ERRCODE_EXPR_CONDITION_RESULT_FALSE: 20,
|
|
2827
|
+
ERRCODE_EXPR_CONDITION_SYNTAX_ERROR: 21,
|
|
2828
|
+
ERRCODE_DOMAIN_NOT_EXIST: 40,
|
|
2829
|
+
ERRCODE_DB_CLASS_NOT_EXIST: 41,
|
|
2830
|
+
ERRCODE_HASH_DB_NAME_ERROR: 42,
|
|
2831
|
+
ERRCODE_DB_NAME_NOT_EXIST: 43,
|
|
2832
|
+
ERRCODE_INVALID_PUBKEY: 90,
|
|
2833
|
+
ERRCODE_INVALID_PRIKEY: 91,
|
|
2834
|
+
ERRCODE_INVALID_SIGNATURE: 93,
|
|
2835
|
+
ERRCODE_INVALID_ADDRESS: 94,
|
|
2836
|
+
ERRCODE_MISSING_OPERATIONS: 97,
|
|
2837
|
+
ERRCODE_TOO_MANY_OPERATIONS: 98,
|
|
2838
|
+
ERRCODE_BAD_SEQUENCE: 99,
|
|
2839
|
+
ERRCODE_ACCOUNT_LOW_RESERVE: 100,
|
|
2840
|
+
ERRCODE_ACCOUNT_SOURCEDEST_EQUAL: 101,
|
|
2841
|
+
ERRCODE_ACCOUNT_DEST_EXIST: 102,
|
|
2842
|
+
ERRCODE_ACCOUNT_NOT_EXIST: 103,
|
|
2843
|
+
ERRCODE_ACCOUNT_INIT_LOW_RESERVE: 106,
|
|
2844
|
+
ERRCODE_FEE_NOT_ENOUGH: 111,
|
|
2845
|
+
ERRCODE_FEE_INVALID: 112,
|
|
2846
|
+
ERRCODE_OUT_OF_TXCACHE: 114,
|
|
2847
|
+
ERRCODE_WEIGHT_NOT_VALID: 120,
|
|
2848
|
+
ERRCODE_THRESHOLD_NOT_VALID: 121,
|
|
2849
|
+
ERRCODE_INVALID_DATAVERSION: 144,
|
|
2850
|
+
ERRCODE_TX_SIZE_TOO_BIG: 146,
|
|
2851
|
+
ERRCODE_CONTRACT_EXECUTE_FAIL: 151,
|
|
2852
|
+
ERRCODE_CONTRACT_SYNTAX_ERROR: 152,
|
|
2853
|
+
ERRCODE_CONTRACT_TOO_MANY_RECURSION: 153,
|
|
2854
|
+
ERRCODE_CONTRACT_TOO_MANY_TRANSACTIONS: 154,
|
|
2855
|
+
ERRCODE_CONTRACT_EXECUTE_EXPIRED: 155,
|
|
2856
|
+
ERRCODE_INVALID_CONTRACT: 156,
|
|
2857
|
+
ERRCODE_INVALID_CONTRACTVERSION: 157,
|
|
2858
|
+
ERRCODE_TX_INSERT_QUEUE_FAIL: 160,
|
|
2859
|
+
ERRCODE_TRANSFER_NO_AUTH: 161,
|
|
2860
|
+
ERROR_DOMAIN_NOT_EXIST: 170,
|
|
2861
|
+
ERROR_SNAP_SHOT_NOT_EXIST: 180,
|
|
2862
|
+
ERROR_SNAP_SHOT_DATA_ERROR: 181,
|
|
2863
|
+
ERROR_GET_DOMAINLIST_TIMEOUT: 182,
|
|
2864
|
+
ERROR_RANDOM_NONCE_IN_CACHE: 183,
|
|
2865
|
+
};
|
|
2866
|
+
|
|
2867
|
+
goog.object.extend(exports, proto.protocol);
|