@miradorlabs/parallax-web 2.0.1 → 2.2.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/dist/index.esm.js CHANGED
@@ -761,11 +761,37 @@ function requireParallax_gateway_pb () {
761
761
  goog.object.extend(proto, google_protobuf_timestamp_pb);
762
762
  var proto_common_v1_status_pb = requireStatus_pb();
763
763
  goog.object.extend(proto, proto_common_v1_status_pb);
764
+ goog.exportSymbol('proto.gateway.parallax.v1.Attributes', null, global);
764
765
  goog.exportSymbol('proto.gateway.parallax.v1.Chain', null, global);
765
766
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest', null, global);
766
767
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceResponse', null, global);
767
768
  goog.exportSymbol('proto.gateway.parallax.v1.Event', null, global);
769
+ goog.exportSymbol('proto.gateway.parallax.v1.Tags', null, global);
770
+ goog.exportSymbol('proto.gateway.parallax.v1.TraceData', null, global);
768
771
  goog.exportSymbol('proto.gateway.parallax.v1.TxHashHint', null, global);
772
+ goog.exportSymbol('proto.gateway.parallax.v1.UpdateTraceRequest', null, global);
773
+ goog.exportSymbol('proto.gateway.parallax.v1.UpdateTraceResponse', null, global);
774
+ /**
775
+ * Generated by JsPbCodeGenerator.
776
+ * @param {Array=} opt_data Optional initial data array, typically from a
777
+ * server response, or constructed directly in Javascript. The array is used
778
+ * in place and becomes part of the constructed object. It is not cloned.
779
+ * If no data is provided, the constructed object will be empty, but still
780
+ * valid.
781
+ * @extends {jspb.Message}
782
+ * @constructor
783
+ */
784
+ proto.gateway.parallax.v1.TraceData = function(opt_data) {
785
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.parallax.v1.TraceData.repeatedFields_, null);
786
+ };
787
+ goog.inherits(proto.gateway.parallax.v1.TraceData, jspb.Message);
788
+ if (goog.DEBUG && !COMPILED) {
789
+ /**
790
+ * @public
791
+ * @override
792
+ */
793
+ proto.gateway.parallax.v1.TraceData.displayName = 'proto.gateway.parallax.v1.TraceData';
794
+ }
769
795
  /**
770
796
  * Generated by JsPbCodeGenerator.
771
797
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -777,7 +803,7 @@ function requireParallax_gateway_pb () {
777
803
  * @constructor
778
804
  */
779
805
  proto.gateway.parallax.v1.CreateTraceRequest = function(opt_data) {
780
- jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_, null);
806
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
781
807
  };
782
808
  goog.inherits(proto.gateway.parallax.v1.CreateTraceRequest, jspb.Message);
783
809
  if (goog.DEBUG && !COMPILED) {
@@ -808,6 +834,48 @@ function requireParallax_gateway_pb () {
808
834
  */
809
835
  proto.gateway.parallax.v1.CreateTraceResponse.displayName = 'proto.gateway.parallax.v1.CreateTraceResponse';
810
836
  }
837
+ /**
838
+ * Generated by JsPbCodeGenerator.
839
+ * @param {Array=} opt_data Optional initial data array, typically from a
840
+ * server response, or constructed directly in Javascript. The array is used
841
+ * in place and becomes part of the constructed object. It is not cloned.
842
+ * If no data is provided, the constructed object will be empty, but still
843
+ * valid.
844
+ * @extends {jspb.Message}
845
+ * @constructor
846
+ */
847
+ proto.gateway.parallax.v1.UpdateTraceRequest = function(opt_data) {
848
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
849
+ };
850
+ goog.inherits(proto.gateway.parallax.v1.UpdateTraceRequest, jspb.Message);
851
+ if (goog.DEBUG && !COMPILED) {
852
+ /**
853
+ * @public
854
+ * @override
855
+ */
856
+ proto.gateway.parallax.v1.UpdateTraceRequest.displayName = 'proto.gateway.parallax.v1.UpdateTraceRequest';
857
+ }
858
+ /**
859
+ * Generated by JsPbCodeGenerator.
860
+ * @param {Array=} opt_data Optional initial data array, typically from a
861
+ * server response, or constructed directly in Javascript. The array is used
862
+ * in place and becomes part of the constructed object. It is not cloned.
863
+ * If no data is provided, the constructed object will be empty, but still
864
+ * valid.
865
+ * @extends {jspb.Message}
866
+ * @constructor
867
+ */
868
+ proto.gateway.parallax.v1.UpdateTraceResponse = function(opt_data) {
869
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
870
+ };
871
+ goog.inherits(proto.gateway.parallax.v1.UpdateTraceResponse, jspb.Message);
872
+ if (goog.DEBUG && !COMPILED) {
873
+ /**
874
+ * @public
875
+ * @override
876
+ */
877
+ proto.gateway.parallax.v1.UpdateTraceResponse.displayName = 'proto.gateway.parallax.v1.UpdateTraceResponse';
878
+ }
811
879
  /**
812
880
  * Generated by JsPbCodeGenerator.
813
881
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -850,13 +918,55 @@ function requireParallax_gateway_pb () {
850
918
  */
851
919
  proto.gateway.parallax.v1.Event.displayName = 'proto.gateway.parallax.v1.Event';
852
920
  }
921
+ /**
922
+ * Generated by JsPbCodeGenerator.
923
+ * @param {Array=} opt_data Optional initial data array, typically from a
924
+ * server response, or constructed directly in Javascript. The array is used
925
+ * in place and becomes part of the constructed object. It is not cloned.
926
+ * If no data is provided, the constructed object will be empty, but still
927
+ * valid.
928
+ * @extends {jspb.Message}
929
+ * @constructor
930
+ */
931
+ proto.gateway.parallax.v1.Attributes = function(opt_data) {
932
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
933
+ };
934
+ goog.inherits(proto.gateway.parallax.v1.Attributes, jspb.Message);
935
+ if (goog.DEBUG && !COMPILED) {
936
+ /**
937
+ * @public
938
+ * @override
939
+ */
940
+ proto.gateway.parallax.v1.Attributes.displayName = 'proto.gateway.parallax.v1.Attributes';
941
+ }
942
+ /**
943
+ * Generated by JsPbCodeGenerator.
944
+ * @param {Array=} opt_data Optional initial data array, typically from a
945
+ * server response, or constructed directly in Javascript. The array is used
946
+ * in place and becomes part of the constructed object. It is not cloned.
947
+ * If no data is provided, the constructed object will be empty, but still
948
+ * valid.
949
+ * @extends {jspb.Message}
950
+ * @constructor
951
+ */
952
+ proto.gateway.parallax.v1.Tags = function(opt_data) {
953
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.parallax.v1.Tags.repeatedFields_, null);
954
+ };
955
+ goog.inherits(proto.gateway.parallax.v1.Tags, jspb.Message);
956
+ if (goog.DEBUG && !COMPILED) {
957
+ /**
958
+ * @public
959
+ * @override
960
+ */
961
+ proto.gateway.parallax.v1.Tags.displayName = 'proto.gateway.parallax.v1.Tags';
962
+ }
853
963
 
854
964
  /**
855
965
  * List of repeated fields within this message type.
856
966
  * @private {!Array<number>}
857
967
  * @const
858
968
  */
859
- proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_ = [3,4];
969
+ proto.gateway.parallax.v1.TraceData.repeatedFields_ = [1,2,3,4];
860
970
 
861
971
 
862
972
 
@@ -873,8 +983,8 @@ function requireParallax_gateway_pb () {
873
983
  * http://goto/soy-param-migration
874
984
  * @return {!Object}
875
985
  */
876
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.toObject = function(opt_includeInstance) {
877
- return proto.gateway.parallax.v1.CreateTraceRequest.toObject(opt_includeInstance, this);
986
+ proto.gateway.parallax.v1.TraceData.prototype.toObject = function(opt_includeInstance) {
987
+ return proto.gateway.parallax.v1.TraceData.toObject(opt_includeInstance, this);
878
988
  };
879
989
 
880
990
 
@@ -883,18 +993,20 @@ function requireParallax_gateway_pb () {
883
993
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
884
994
  * the JSPB instance for transitional soy proto support:
885
995
  * http://goto/soy-param-migration
886
- * @param {!proto.gateway.parallax.v1.CreateTraceRequest} msg The msg instance to transform.
996
+ * @param {!proto.gateway.parallax.v1.TraceData} msg The msg instance to transform.
887
997
  * @return {!Object}
888
998
  * @suppress {unusedLocalVariables} f is only used for nested messages
889
999
  */
890
- proto.gateway.parallax.v1.CreateTraceRequest.toObject = function(includeInstance, msg) {
891
- var f, obj = {
892
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
893
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
894
- tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
1000
+ proto.gateway.parallax.v1.TraceData.toObject = function(includeInstance, msg) {
1001
+ var obj = {
895
1002
  eventsList: jspb.Message.toObjectList(msg.getEventsList(),
896
1003
  proto.gateway.parallax.v1.Event.toObject, includeInstance),
897
- txHashHint: (f = msg.getTxHashHint()) && proto.gateway.parallax.v1.TxHashHint.toObject(includeInstance, f)
1004
+ txHashHintsList: jspb.Message.toObjectList(msg.getTxHashHintsList(),
1005
+ proto.gateway.parallax.v1.TxHashHint.toObject, includeInstance),
1006
+ attributesList: jspb.Message.toObjectList(msg.getAttributesList(),
1007
+ proto.gateway.parallax.v1.Attributes.toObject, includeInstance),
1008
+ tagsList: jspb.Message.toObjectList(msg.getTagsList(),
1009
+ proto.gateway.parallax.v1.Tags.toObject, includeInstance)
898
1010
  };
899
1011
 
900
1012
  if (includeInstance) {
@@ -908,23 +1020,23 @@ function requireParallax_gateway_pb () {
908
1020
  /**
909
1021
  * Deserializes binary data (in protobuf wire format).
910
1022
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
911
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest}
1023
+ * @return {!proto.gateway.parallax.v1.TraceData}
912
1024
  */
913
- proto.gateway.parallax.v1.CreateTraceRequest.deserializeBinary = function(bytes) {
1025
+ proto.gateway.parallax.v1.TraceData.deserializeBinary = function(bytes) {
914
1026
  var reader = new jspb.BinaryReader(bytes);
915
- var msg = new proto.gateway.parallax.v1.CreateTraceRequest;
916
- return proto.gateway.parallax.v1.CreateTraceRequest.deserializeBinaryFromReader(msg, reader);
1027
+ var msg = new proto.gateway.parallax.v1.TraceData;
1028
+ return proto.gateway.parallax.v1.TraceData.deserializeBinaryFromReader(msg, reader);
917
1029
  };
918
1030
 
919
1031
 
920
1032
  /**
921
1033
  * Deserializes binary data (in protobuf wire format) from the
922
1034
  * given reader into the given message object.
923
- * @param {!proto.gateway.parallax.v1.CreateTraceRequest} msg The message object to deserialize into.
1035
+ * @param {!proto.gateway.parallax.v1.TraceData} msg The message object to deserialize into.
924
1036
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
925
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest}
1037
+ * @return {!proto.gateway.parallax.v1.TraceData}
926
1038
  */
927
- proto.gateway.parallax.v1.CreateTraceRequest.deserializeBinaryFromReader = function(msg, reader) {
1039
+ proto.gateway.parallax.v1.TraceData.deserializeBinaryFromReader = function(msg, reader) {
928
1040
  while (reader.nextField()) {
929
1041
  if (reader.isEndGroup()) {
930
1042
  break;
@@ -932,28 +1044,24 @@ function requireParallax_gateway_pb () {
932
1044
  var field = reader.getFieldNumber();
933
1045
  switch (field) {
934
1046
  case 1:
935
- var value = /** @type {string} */ (reader.readString());
936
- msg.setName(value);
937
- break;
938
- case 2:
939
- var value = msg.getAttributesMap();
940
- reader.readMessage(value, function(message, reader) {
941
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
942
- });
943
- break;
944
- case 3:
945
- var value = /** @type {string} */ (reader.readString());
946
- msg.addTags(value);
947
- break;
948
- case 4:
949
1047
  var value = new proto.gateway.parallax.v1.Event;
950
1048
  reader.readMessage(value,proto.gateway.parallax.v1.Event.deserializeBinaryFromReader);
951
1049
  msg.addEvents(value);
952
1050
  break;
953
- case 5:
1051
+ case 2:
954
1052
  var value = new proto.gateway.parallax.v1.TxHashHint;
955
1053
  reader.readMessage(value,proto.gateway.parallax.v1.TxHashHint.deserializeBinaryFromReader);
956
- msg.setTxHashHint(value);
1054
+ msg.addTxHashHints(value);
1055
+ break;
1056
+ case 3:
1057
+ var value = new proto.gateway.parallax.v1.Attributes;
1058
+ reader.readMessage(value,proto.gateway.parallax.v1.Attributes.deserializeBinaryFromReader);
1059
+ msg.addAttributes(value);
1060
+ break;
1061
+ case 4:
1062
+ var value = new proto.gateway.parallax.v1.Tags;
1063
+ reader.readMessage(value,proto.gateway.parallax.v1.Tags.deserializeBinaryFromReader);
1064
+ msg.addTags(value);
957
1065
  break;
958
1066
  default:
959
1067
  reader.skipField();
@@ -968,9 +1076,9 @@ function requireParallax_gateway_pb () {
968
1076
  * Serializes the message to binary data (in protobuf wire format).
969
1077
  * @return {!Uint8Array}
970
1078
  */
971
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.serializeBinary = function() {
1079
+ proto.gateway.parallax.v1.TraceData.prototype.serializeBinary = function() {
972
1080
  var writer = new jspb.BinaryWriter();
973
- proto.gateway.parallax.v1.CreateTraceRequest.serializeBinaryToWriter(this, writer);
1081
+ proto.gateway.parallax.v1.TraceData.serializeBinaryToWriter(this, writer);
974
1082
  return writer.getResultBuffer();
975
1083
  };
976
1084
 
@@ -978,199 +1086,196 @@ function requireParallax_gateway_pb () {
978
1086
  /**
979
1087
  * Serializes the given message to binary data (in protobuf wire
980
1088
  * format), writing to the given BinaryWriter.
981
- * @param {!proto.gateway.parallax.v1.CreateTraceRequest} message
1089
+ * @param {!proto.gateway.parallax.v1.TraceData} message
982
1090
  * @param {!jspb.BinaryWriter} writer
983
1091
  * @suppress {unusedLocalVariables} f is only used for nested messages
984
1092
  */
985
- proto.gateway.parallax.v1.CreateTraceRequest.serializeBinaryToWriter = function(message, writer) {
1093
+ proto.gateway.parallax.v1.TraceData.serializeBinaryToWriter = function(message, writer) {
986
1094
  var f = undefined;
987
- f = message.getName();
1095
+ f = message.getEventsList();
988
1096
  if (f.length > 0) {
989
- writer.writeString(
1097
+ writer.writeRepeatedMessage(
990
1098
  1,
991
- f
1099
+ f,
1100
+ proto.gateway.parallax.v1.Event.serializeBinaryToWriter
992
1101
  );
993
1102
  }
994
- f = message.getAttributesMap(true);
995
- if (f && f.getLength() > 0) {
996
- f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
997
- }
998
- f = message.getTagsList();
1103
+ f = message.getTxHashHintsList();
999
1104
  if (f.length > 0) {
1000
- writer.writeRepeatedString(
1001
- 3,
1002
- f
1105
+ writer.writeRepeatedMessage(
1106
+ 2,
1107
+ f,
1108
+ proto.gateway.parallax.v1.TxHashHint.serializeBinaryToWriter
1003
1109
  );
1004
1110
  }
1005
- f = message.getEventsList();
1111
+ f = message.getAttributesList();
1006
1112
  if (f.length > 0) {
1007
1113
  writer.writeRepeatedMessage(
1008
- 4,
1114
+ 3,
1009
1115
  f,
1010
- proto.gateway.parallax.v1.Event.serializeBinaryToWriter
1116
+ proto.gateway.parallax.v1.Attributes.serializeBinaryToWriter
1011
1117
  );
1012
1118
  }
1013
- f = message.getTxHashHint();
1014
- if (f != null) {
1015
- writer.writeMessage(
1016
- 5,
1119
+ f = message.getTagsList();
1120
+ if (f.length > 0) {
1121
+ writer.writeRepeatedMessage(
1122
+ 4,
1017
1123
  f,
1018
- proto.gateway.parallax.v1.TxHashHint.serializeBinaryToWriter
1124
+ proto.gateway.parallax.v1.Tags.serializeBinaryToWriter
1019
1125
  );
1020
1126
  }
1021
1127
  };
1022
1128
 
1023
1129
 
1024
1130
  /**
1025
- * optional string name = 1;
1026
- * @return {string}
1131
+ * repeated Event events = 1;
1132
+ * @return {!Array<!proto.gateway.parallax.v1.Event>}
1027
1133
  */
1028
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
1029
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1134
+ proto.gateway.parallax.v1.TraceData.prototype.getEventsList = function() {
1135
+ return /** @type{!Array<!proto.gateway.parallax.v1.Event>} */ (
1136
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.Event, 1));
1030
1137
  };
1031
1138
 
1032
1139
 
1033
1140
  /**
1034
- * @param {string} value
1035
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1036
- */
1037
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
1038
- return jspb.Message.setProto3StringField(this, 1, value);
1141
+ * @param {!Array<!proto.gateway.parallax.v1.Event>} value
1142
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1143
+ */
1144
+ proto.gateway.parallax.v1.TraceData.prototype.setEventsList = function(value) {
1145
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1039
1146
  };
1040
1147
 
1041
1148
 
1042
1149
  /**
1043
- * map<string, string> attributes = 2;
1044
- * @param {boolean=} opt_noLazyCreate Do not create the map if
1045
- * empty, instead returning `undefined`
1046
- * @return {!jspb.Map<string,string>}
1150
+ * @param {!proto.gateway.parallax.v1.Event=} opt_value
1151
+ * @param {number=} opt_index
1152
+ * @return {!proto.gateway.parallax.v1.Event}
1047
1153
  */
1048
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1049
- return /** @type {!jspb.Map<string,string>} */ (
1050
- jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1051
- null));
1154
+ proto.gateway.parallax.v1.TraceData.prototype.addEvents = function(opt_value, opt_index) {
1155
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.gateway.parallax.v1.Event, opt_index);
1052
1156
  };
1053
1157
 
1054
1158
 
1055
1159
  /**
1056
- * Clears values from the map. The map will be non-null.
1057
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1160
+ * Clears the list making it empty but non-null.
1161
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1058
1162
  */
1059
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearAttributesMap = function() {
1060
- this.getAttributesMap().clear();
1061
- return this;
1163
+ proto.gateway.parallax.v1.TraceData.prototype.clearEventsList = function() {
1164
+ return this.setEventsList([]);
1062
1165
  };
1063
1166
 
1064
1167
 
1065
1168
  /**
1066
- * repeated string tags = 3;
1067
- * @return {!Array<string>}
1169
+ * repeated TxHashHint tx_hash_hints = 2;
1170
+ * @return {!Array<!proto.gateway.parallax.v1.TxHashHint>}
1068
1171
  */
1069
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTagsList = function() {
1070
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
1172
+ proto.gateway.parallax.v1.TraceData.prototype.getTxHashHintsList = function() {
1173
+ return /** @type{!Array<!proto.gateway.parallax.v1.TxHashHint>} */ (
1174
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.TxHashHint, 2));
1071
1175
  };
1072
1176
 
1073
1177
 
1074
1178
  /**
1075
- * @param {!Array<string>} value
1076
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1077
- */
1078
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTagsList = function(value) {
1079
- return jspb.Message.setField(this, 3, value || []);
1179
+ * @param {!Array<!proto.gateway.parallax.v1.TxHashHint>} value
1180
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1181
+ */
1182
+ proto.gateway.parallax.v1.TraceData.prototype.setTxHashHintsList = function(value) {
1183
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
1080
1184
  };
1081
1185
 
1082
1186
 
1083
1187
  /**
1084
- * @param {string} value
1188
+ * @param {!proto.gateway.parallax.v1.TxHashHint=} opt_value
1085
1189
  * @param {number=} opt_index
1086
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1190
+ * @return {!proto.gateway.parallax.v1.TxHashHint}
1087
1191
  */
1088
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.addTags = function(value, opt_index) {
1089
- return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
1192
+ proto.gateway.parallax.v1.TraceData.prototype.addTxHashHints = function(opt_value, opt_index) {
1193
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.parallax.v1.TxHashHint, opt_index);
1090
1194
  };
1091
1195
 
1092
1196
 
1093
1197
  /**
1094
1198
  * Clears the list making it empty but non-null.
1095
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1199
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1096
1200
  */
1097
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTagsList = function() {
1098
- return this.setTagsList([]);
1201
+ proto.gateway.parallax.v1.TraceData.prototype.clearTxHashHintsList = function() {
1202
+ return this.setTxHashHintsList([]);
1099
1203
  };
1100
1204
 
1101
1205
 
1102
1206
  /**
1103
- * repeated Event events = 4;
1104
- * @return {!Array<!proto.gateway.parallax.v1.Event>}
1207
+ * repeated Attributes attributes = 3;
1208
+ * @return {!Array<!proto.gateway.parallax.v1.Attributes>}
1105
1209
  */
1106
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getEventsList = function() {
1107
- return /** @type{!Array<!proto.gateway.parallax.v1.Event>} */ (
1108
- jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.Event, 4));
1210
+ proto.gateway.parallax.v1.TraceData.prototype.getAttributesList = function() {
1211
+ return /** @type{!Array<!proto.gateway.parallax.v1.Attributes>} */ (
1212
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.Attributes, 3));
1109
1213
  };
1110
1214
 
1111
1215
 
1112
1216
  /**
1113
- * @param {!Array<!proto.gateway.parallax.v1.Event>} value
1114
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1217
+ * @param {!Array<!proto.gateway.parallax.v1.Attributes>} value
1218
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1115
1219
  */
1116
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setEventsList = function(value) {
1117
- return jspb.Message.setRepeatedWrapperField(this, 4, value);
1220
+ proto.gateway.parallax.v1.TraceData.prototype.setAttributesList = function(value) {
1221
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
1118
1222
  };
1119
1223
 
1120
1224
 
1121
1225
  /**
1122
- * @param {!proto.gateway.parallax.v1.Event=} opt_value
1226
+ * @param {!proto.gateway.parallax.v1.Attributes=} opt_value
1123
1227
  * @param {number=} opt_index
1124
- * @return {!proto.gateway.parallax.v1.Event}
1228
+ * @return {!proto.gateway.parallax.v1.Attributes}
1125
1229
  */
1126
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.addEvents = function(opt_value, opt_index) {
1127
- return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.gateway.parallax.v1.Event, opt_index);
1230
+ proto.gateway.parallax.v1.TraceData.prototype.addAttributes = function(opt_value, opt_index) {
1231
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.gateway.parallax.v1.Attributes, opt_index);
1128
1232
  };
1129
1233
 
1130
1234
 
1131
1235
  /**
1132
1236
  * Clears the list making it empty but non-null.
1133
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1237
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1134
1238
  */
1135
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearEventsList = function() {
1136
- return this.setEventsList([]);
1239
+ proto.gateway.parallax.v1.TraceData.prototype.clearAttributesList = function() {
1240
+ return this.setAttributesList([]);
1137
1241
  };
1138
1242
 
1139
1243
 
1140
1244
  /**
1141
- * optional TxHashHint tx_hash_hint = 5;
1142
- * @return {?proto.gateway.parallax.v1.TxHashHint}
1245
+ * repeated Tags tags = 4;
1246
+ * @return {!Array<!proto.gateway.parallax.v1.Tags>}
1143
1247
  */
1144
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTxHashHint = function() {
1145
- return /** @type{?proto.gateway.parallax.v1.TxHashHint} */ (
1146
- jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.TxHashHint, 5));
1248
+ proto.gateway.parallax.v1.TraceData.prototype.getTagsList = function() {
1249
+ return /** @type{!Array<!proto.gateway.parallax.v1.Tags>} */ (
1250
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.Tags, 4));
1147
1251
  };
1148
1252
 
1149
1253
 
1150
1254
  /**
1151
- * @param {?proto.gateway.parallax.v1.TxHashHint|undefined} value
1152
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1255
+ * @param {!Array<!proto.gateway.parallax.v1.Tags>} value
1256
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1153
1257
  */
1154
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTxHashHint = function(value) {
1155
- return jspb.Message.setWrapperField(this, 5, value);
1258
+ proto.gateway.parallax.v1.TraceData.prototype.setTagsList = function(value) {
1259
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
1156
1260
  };
1157
1261
 
1158
1262
 
1159
1263
  /**
1160
- * Clears the message field making it undefined.
1161
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1264
+ * @param {!proto.gateway.parallax.v1.Tags=} opt_value
1265
+ * @param {number=} opt_index
1266
+ * @return {!proto.gateway.parallax.v1.Tags}
1162
1267
  */
1163
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTxHashHint = function() {
1164
- return this.setTxHashHint(undefined);
1268
+ proto.gateway.parallax.v1.TraceData.prototype.addTags = function(opt_value, opt_index) {
1269
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.gateway.parallax.v1.Tags, opt_index);
1165
1270
  };
1166
1271
 
1167
1272
 
1168
1273
  /**
1169
- * Returns whether this field is set.
1170
- * @return {boolean}
1274
+ * Clears the list making it empty but non-null.
1275
+ * @return {!proto.gateway.parallax.v1.TraceData} returns this
1171
1276
  */
1172
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasTxHashHint = function() {
1173
- return jspb.Message.getField(this, 5) != null;
1277
+ proto.gateway.parallax.v1.TraceData.prototype.clearTagsList = function() {
1278
+ return this.setTagsList([]);
1174
1279
  };
1175
1280
 
1176
1281
 
@@ -1190,8 +1295,8 @@ function requireParallax_gateway_pb () {
1190
1295
  * http://goto/soy-param-migration
1191
1296
  * @return {!Object}
1192
1297
  */
1193
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1194
- return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
1298
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.toObject = function(opt_includeInstance) {
1299
+ return proto.gateway.parallax.v1.CreateTraceRequest.toObject(opt_includeInstance, this);
1195
1300
  };
1196
1301
 
1197
1302
 
@@ -1200,14 +1305,14 @@ function requireParallax_gateway_pb () {
1200
1305
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1201
1306
  * the JSPB instance for transitional soy proto support:
1202
1307
  * http://goto/soy-param-migration
1203
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
1308
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest} msg The msg instance to transform.
1204
1309
  * @return {!Object}
1205
1310
  * @suppress {unusedLocalVariables} f is only used for nested messages
1206
1311
  */
1207
- proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
1312
+ proto.gateway.parallax.v1.CreateTraceRequest.toObject = function(includeInstance, msg) {
1208
1313
  var f, obj = {
1209
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1210
- traceId: jspb.Message.getFieldWithDefault(msg, 2, "")
1314
+ name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
1315
+ data: (f = msg.getData()) && proto.gateway.parallax.v1.TraceData.toObject(includeInstance, f)
1211
1316
  };
1212
1317
 
1213
1318
  if (includeInstance) {
@@ -1221,23 +1326,23 @@ function requireParallax_gateway_pb () {
1221
1326
  /**
1222
1327
  * Deserializes binary data (in protobuf wire format).
1223
1328
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
1224
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1329
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest}
1225
1330
  */
1226
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
1331
+ proto.gateway.parallax.v1.CreateTraceRequest.deserializeBinary = function(bytes) {
1227
1332
  var reader = new jspb.BinaryReader(bytes);
1228
- var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1229
- return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
1333
+ var msg = new proto.gateway.parallax.v1.CreateTraceRequest;
1334
+ return proto.gateway.parallax.v1.CreateTraceRequest.deserializeBinaryFromReader(msg, reader);
1230
1335
  };
1231
1336
 
1232
1337
 
1233
1338
  /**
1234
1339
  * Deserializes binary data (in protobuf wire format) from the
1235
1340
  * given reader into the given message object.
1236
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
1341
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest} msg The message object to deserialize into.
1237
1342
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1238
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1343
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest}
1239
1344
  */
1240
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
1345
+ proto.gateway.parallax.v1.CreateTraceRequest.deserializeBinaryFromReader = function(msg, reader) {
1241
1346
  while (reader.nextField()) {
1242
1347
  if (reader.isEndGroup()) {
1243
1348
  break;
@@ -1245,13 +1350,13 @@ function requireParallax_gateway_pb () {
1245
1350
  var field = reader.getFieldNumber();
1246
1351
  switch (field) {
1247
1352
  case 1:
1248
- var value = new proto_common_v1_status_pb.ResponseStatus;
1249
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1250
- msg.setStatus(value);
1353
+ var value = /** @type {string} */ (reader.readString());
1354
+ msg.setName(value);
1251
1355
  break;
1252
1356
  case 2:
1253
- var value = /** @type {string} */ (reader.readString());
1254
- msg.setTraceId(value);
1357
+ var value = new proto.gateway.parallax.v1.TraceData;
1358
+ reader.readMessage(value,proto.gateway.parallax.v1.TraceData.deserializeBinaryFromReader);
1359
+ msg.setData(value);
1255
1360
  break;
1256
1361
  default:
1257
1362
  reader.skipField();
@@ -1266,9 +1371,9 @@ function requireParallax_gateway_pb () {
1266
1371
  * Serializes the message to binary data (in protobuf wire format).
1267
1372
  * @return {!Uint8Array}
1268
1373
  */
1269
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
1374
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.serializeBinary = function() {
1270
1375
  var writer = new jspb.BinaryWriter();
1271
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
1376
+ proto.gateway.parallax.v1.CreateTraceRequest.serializeBinaryToWriter(this, writer);
1272
1377
  return writer.getResultBuffer();
1273
1378
  };
1274
1379
 
@@ -1276,18 +1381,217 @@ function requireParallax_gateway_pb () {
1276
1381
  /**
1277
1382
  * Serializes the given message to binary data (in protobuf wire
1278
1383
  * format), writing to the given BinaryWriter.
1279
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
1384
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest} message
1280
1385
  * @param {!jspb.BinaryWriter} writer
1281
1386
  * @suppress {unusedLocalVariables} f is only used for nested messages
1282
1387
  */
1283
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
1388
+ proto.gateway.parallax.v1.CreateTraceRequest.serializeBinaryToWriter = function(message, writer) {
1284
1389
  var f = undefined;
1285
- f = message.getStatus();
1390
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1286
1391
  if (f != null) {
1287
- writer.writeMessage(
1392
+ writer.writeString(
1288
1393
  1,
1289
- f,
1290
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1394
+ f
1395
+ );
1396
+ }
1397
+ f = message.getData();
1398
+ if (f != null) {
1399
+ writer.writeMessage(
1400
+ 2,
1401
+ f,
1402
+ proto.gateway.parallax.v1.TraceData.serializeBinaryToWriter
1403
+ );
1404
+ }
1405
+ };
1406
+
1407
+
1408
+ /**
1409
+ * optional string name = 1;
1410
+ * @return {string}
1411
+ */
1412
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
1413
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1414
+ };
1415
+
1416
+
1417
+ /**
1418
+ * @param {string} value
1419
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1420
+ */
1421
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
1422
+ return jspb.Message.setField(this, 1, value);
1423
+ };
1424
+
1425
+
1426
+ /**
1427
+ * Clears the field making it undefined.
1428
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1429
+ */
1430
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearName = function() {
1431
+ return jspb.Message.setField(this, 1, undefined);
1432
+ };
1433
+
1434
+
1435
+ /**
1436
+ * Returns whether this field is set.
1437
+ * @return {boolean}
1438
+ */
1439
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasName = function() {
1440
+ return jspb.Message.getField(this, 1) != null;
1441
+ };
1442
+
1443
+
1444
+ /**
1445
+ * optional TraceData data = 2;
1446
+ * @return {?proto.gateway.parallax.v1.TraceData}
1447
+ */
1448
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getData = function() {
1449
+ return /** @type{?proto.gateway.parallax.v1.TraceData} */ (
1450
+ jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.TraceData, 2));
1451
+ };
1452
+
1453
+
1454
+ /**
1455
+ * @param {?proto.gateway.parallax.v1.TraceData|undefined} value
1456
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1457
+ */
1458
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setData = function(value) {
1459
+ return jspb.Message.setWrapperField(this, 2, value);
1460
+ };
1461
+
1462
+
1463
+ /**
1464
+ * Clears the message field making it undefined.
1465
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1466
+ */
1467
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearData = function() {
1468
+ return this.setData(undefined);
1469
+ };
1470
+
1471
+
1472
+ /**
1473
+ * Returns whether this field is set.
1474
+ * @return {boolean}
1475
+ */
1476
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasData = function() {
1477
+ return jspb.Message.getField(this, 2) != null;
1478
+ };
1479
+
1480
+
1481
+
1482
+
1483
+
1484
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1485
+ /**
1486
+ * Creates an object representation of this proto.
1487
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1488
+ * Optional fields that are not set will be set to undefined.
1489
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1490
+ * For the list of reserved names please see:
1491
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1492
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1493
+ * JSPB instance for transitional soy proto support:
1494
+ * http://goto/soy-param-migration
1495
+ * @return {!Object}
1496
+ */
1497
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1498
+ return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
1499
+ };
1500
+
1501
+
1502
+ /**
1503
+ * Static version of the {@see toObject} method.
1504
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1505
+ * the JSPB instance for transitional soy proto support:
1506
+ * http://goto/soy-param-migration
1507
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
1508
+ * @return {!Object}
1509
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1510
+ */
1511
+ proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
1512
+ var f, obj = {
1513
+ status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1514
+ traceId: jspb.Message.getFieldWithDefault(msg, 2, "")
1515
+ };
1516
+
1517
+ if (includeInstance) {
1518
+ obj.$jspbMessageInstance = msg;
1519
+ }
1520
+ return obj;
1521
+ };
1522
+ }
1523
+
1524
+
1525
+ /**
1526
+ * Deserializes binary data (in protobuf wire format).
1527
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1528
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1529
+ */
1530
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
1531
+ var reader = new jspb.BinaryReader(bytes);
1532
+ var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1533
+ return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
1534
+ };
1535
+
1536
+
1537
+ /**
1538
+ * Deserializes binary data (in protobuf wire format) from the
1539
+ * given reader into the given message object.
1540
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
1541
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1542
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1543
+ */
1544
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
1545
+ while (reader.nextField()) {
1546
+ if (reader.isEndGroup()) {
1547
+ break;
1548
+ }
1549
+ var field = reader.getFieldNumber();
1550
+ switch (field) {
1551
+ case 1:
1552
+ var value = new proto_common_v1_status_pb.ResponseStatus;
1553
+ reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1554
+ msg.setStatus(value);
1555
+ break;
1556
+ case 2:
1557
+ var value = /** @type {string} */ (reader.readString());
1558
+ msg.setTraceId(value);
1559
+ break;
1560
+ default:
1561
+ reader.skipField();
1562
+ break;
1563
+ }
1564
+ }
1565
+ return msg;
1566
+ };
1567
+
1568
+
1569
+ /**
1570
+ * Serializes the message to binary data (in protobuf wire format).
1571
+ * @return {!Uint8Array}
1572
+ */
1573
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
1574
+ var writer = new jspb.BinaryWriter();
1575
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
1576
+ return writer.getResultBuffer();
1577
+ };
1578
+
1579
+
1580
+ /**
1581
+ * Serializes the given message to binary data (in protobuf wire
1582
+ * format), writing to the given BinaryWriter.
1583
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
1584
+ * @param {!jspb.BinaryWriter} writer
1585
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1586
+ */
1587
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
1588
+ var f = undefined;
1589
+ f = message.getStatus();
1590
+ if (f != null) {
1591
+ writer.writeMessage(
1592
+ 1,
1593
+ f,
1594
+ proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1291
1595
  );
1292
1596
  }
1293
1597
  f = message.getTraceId();
@@ -1371,8 +1675,8 @@ function requireParallax_gateway_pb () {
1371
1675
  * http://goto/soy-param-migration
1372
1676
  * @return {!Object}
1373
1677
  */
1374
- proto.gateway.parallax.v1.TxHashHint.prototype.toObject = function(opt_includeInstance) {
1375
- return proto.gateway.parallax.v1.TxHashHint.toObject(opt_includeInstance, this);
1678
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.toObject = function(opt_includeInstance) {
1679
+ return proto.gateway.parallax.v1.UpdateTraceRequest.toObject(opt_includeInstance, this);
1376
1680
  };
1377
1681
 
1378
1682
 
@@ -1381,16 +1685,14 @@ function requireParallax_gateway_pb () {
1381
1685
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1382
1686
  * the JSPB instance for transitional soy proto support:
1383
1687
  * http://goto/soy-param-migration
1384
- * @param {!proto.gateway.parallax.v1.TxHashHint} msg The msg instance to transform.
1688
+ * @param {!proto.gateway.parallax.v1.UpdateTraceRequest} msg The msg instance to transform.
1385
1689
  * @return {!Object}
1386
1690
  * @suppress {unusedLocalVariables} f is only used for nested messages
1387
1691
  */
1388
- proto.gateway.parallax.v1.TxHashHint.toObject = function(includeInstance, msg) {
1692
+ proto.gateway.parallax.v1.UpdateTraceRequest.toObject = function(includeInstance, msg) {
1389
1693
  var f, obj = {
1390
- chain: jspb.Message.getFieldWithDefault(msg, 1, 0),
1391
- txHash: jspb.Message.getFieldWithDefault(msg, 2, ""),
1392
- details: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
1393
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1694
+ traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1695
+ data: (f = msg.getData()) && proto.gateway.parallax.v1.TraceData.toObject(includeInstance, f)
1394
1696
  };
1395
1697
 
1396
1698
  if (includeInstance) {
@@ -1404,23 +1706,23 @@ function requireParallax_gateway_pb () {
1404
1706
  /**
1405
1707
  * Deserializes binary data (in protobuf wire format).
1406
1708
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
1407
- * @return {!proto.gateway.parallax.v1.TxHashHint}
1709
+ * @return {!proto.gateway.parallax.v1.UpdateTraceRequest}
1408
1710
  */
1409
- proto.gateway.parallax.v1.TxHashHint.deserializeBinary = function(bytes) {
1711
+ proto.gateway.parallax.v1.UpdateTraceRequest.deserializeBinary = function(bytes) {
1410
1712
  var reader = new jspb.BinaryReader(bytes);
1411
- var msg = new proto.gateway.parallax.v1.TxHashHint;
1412
- return proto.gateway.parallax.v1.TxHashHint.deserializeBinaryFromReader(msg, reader);
1713
+ var msg = new proto.gateway.parallax.v1.UpdateTraceRequest;
1714
+ return proto.gateway.parallax.v1.UpdateTraceRequest.deserializeBinaryFromReader(msg, reader);
1413
1715
  };
1414
1716
 
1415
1717
 
1416
1718
  /**
1417
1719
  * Deserializes binary data (in protobuf wire format) from the
1418
1720
  * given reader into the given message object.
1419
- * @param {!proto.gateway.parallax.v1.TxHashHint} msg The message object to deserialize into.
1721
+ * @param {!proto.gateway.parallax.v1.UpdateTraceRequest} msg The message object to deserialize into.
1420
1722
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1421
- * @return {!proto.gateway.parallax.v1.TxHashHint}
1723
+ * @return {!proto.gateway.parallax.v1.UpdateTraceRequest}
1422
1724
  */
1423
- proto.gateway.parallax.v1.TxHashHint.deserializeBinaryFromReader = function(msg, reader) {
1725
+ proto.gateway.parallax.v1.UpdateTraceRequest.deserializeBinaryFromReader = function(msg, reader) {
1424
1726
  while (reader.nextField()) {
1425
1727
  if (reader.isEndGroup()) {
1426
1728
  break;
@@ -1428,21 +1730,13 @@ function requireParallax_gateway_pb () {
1428
1730
  var field = reader.getFieldNumber();
1429
1731
  switch (field) {
1430
1732
  case 1:
1431
- var value = /** @type {!proto.gateway.parallax.v1.Chain} */ (reader.readEnum());
1432
- msg.setChain(value);
1433
- break;
1434
- case 2:
1435
- var value = /** @type {string} */ (reader.readString());
1436
- msg.setTxHash(value);
1437
- break;
1438
- case 3:
1439
1733
  var value = /** @type {string} */ (reader.readString());
1440
- msg.setDetails(value);
1734
+ msg.setTraceId(value);
1441
1735
  break;
1442
- case 4:
1443
- var value = new google_protobuf_timestamp_pb.Timestamp;
1444
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1445
- msg.setTimestamp(value);
1736
+ case 2:
1737
+ var value = new proto.gateway.parallax.v1.TraceData;
1738
+ reader.readMessage(value,proto.gateway.parallax.v1.TraceData.deserializeBinaryFromReader);
1739
+ msg.setData(value);
1446
1740
  break;
1447
1741
  default:
1448
1742
  reader.skipField();
@@ -1457,9 +1751,9 @@ function requireParallax_gateway_pb () {
1457
1751
  * Serializes the message to binary data (in protobuf wire format).
1458
1752
  * @return {!Uint8Array}
1459
1753
  */
1460
- proto.gateway.parallax.v1.TxHashHint.prototype.serializeBinary = function() {
1754
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.serializeBinary = function() {
1461
1755
  var writer = new jspb.BinaryWriter();
1462
- proto.gateway.parallax.v1.TxHashHint.serializeBinaryToWriter(this, writer);
1756
+ proto.gateway.parallax.v1.UpdateTraceRequest.serializeBinaryToWriter(this, writer);
1463
1757
  return writer.getResultBuffer();
1464
1758
  };
1465
1759
 
@@ -1467,140 +1761,896 @@ function requireParallax_gateway_pb () {
1467
1761
  /**
1468
1762
  * Serializes the given message to binary data (in protobuf wire
1469
1763
  * format), writing to the given BinaryWriter.
1470
- * @param {!proto.gateway.parallax.v1.TxHashHint} message
1764
+ * @param {!proto.gateway.parallax.v1.UpdateTraceRequest} message
1471
1765
  * @param {!jspb.BinaryWriter} writer
1472
1766
  * @suppress {unusedLocalVariables} f is only used for nested messages
1473
1767
  */
1474
- proto.gateway.parallax.v1.TxHashHint.serializeBinaryToWriter = function(message, writer) {
1768
+ proto.gateway.parallax.v1.UpdateTraceRequest.serializeBinaryToWriter = function(message, writer) {
1475
1769
  var f = undefined;
1476
- f = message.getChain();
1477
- if (f !== 0.0) {
1478
- writer.writeEnum(
1479
- 1,
1480
- f
1481
- );
1482
- }
1483
- f = message.getTxHash();
1770
+ f = message.getTraceId();
1484
1771
  if (f.length > 0) {
1485
1772
  writer.writeString(
1486
- 2,
1487
- f
1488
- );
1489
- }
1490
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
1491
- if (f != null) {
1492
- writer.writeString(
1493
- 3,
1773
+ 1,
1494
1774
  f
1495
1775
  );
1496
1776
  }
1497
- f = message.getTimestamp();
1777
+ f = message.getData();
1498
1778
  if (f != null) {
1499
1779
  writer.writeMessage(
1500
- 4,
1780
+ 2,
1501
1781
  f,
1502
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1782
+ proto.gateway.parallax.v1.TraceData.serializeBinaryToWriter
1503
1783
  );
1504
1784
  }
1505
1785
  };
1506
1786
 
1507
1787
 
1508
1788
  /**
1509
- * optional Chain chain = 1;
1510
- * @return {!proto.gateway.parallax.v1.Chain}
1789
+ * optional string trace_id = 1;
1790
+ * @return {string}
1511
1791
  */
1512
- proto.gateway.parallax.v1.TxHashHint.prototype.getChain = function() {
1513
- return /** @type {!proto.gateway.parallax.v1.Chain} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1792
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.getTraceId = function() {
1793
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1514
1794
  };
1515
1795
 
1516
1796
 
1517
1797
  /**
1518
- * @param {!proto.gateway.parallax.v1.Chain} value
1519
- * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
1798
+ * @param {string} value
1799
+ * @return {!proto.gateway.parallax.v1.UpdateTraceRequest} returns this
1520
1800
  */
1521
- proto.gateway.parallax.v1.TxHashHint.prototype.setChain = function(value) {
1522
- return jspb.Message.setProto3EnumField(this, 1, value);
1801
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.setTraceId = function(value) {
1802
+ return jspb.Message.setProto3StringField(this, 1, value);
1523
1803
  };
1524
1804
 
1525
1805
 
1526
1806
  /**
1527
- * optional string tx_hash = 2;
1528
- * @return {string}
1807
+ * optional TraceData data = 2;
1808
+ * @return {?proto.gateway.parallax.v1.TraceData}
1529
1809
  */
1530
- proto.gateway.parallax.v1.TxHashHint.prototype.getTxHash = function() {
1531
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1810
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.getData = function() {
1811
+ return /** @type{?proto.gateway.parallax.v1.TraceData} */ (
1812
+ jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.TraceData, 2));
1813
+ };
1814
+
1815
+
1816
+ /**
1817
+ * @param {?proto.gateway.parallax.v1.TraceData|undefined} value
1818
+ * @return {!proto.gateway.parallax.v1.UpdateTraceRequest} returns this
1819
+ */
1820
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.setData = function(value) {
1821
+ return jspb.Message.setWrapperField(this, 2, value);
1822
+ };
1823
+
1824
+
1825
+ /**
1826
+ * Clears the message field making it undefined.
1827
+ * @return {!proto.gateway.parallax.v1.UpdateTraceRequest} returns this
1828
+ */
1829
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.clearData = function() {
1830
+ return this.setData(undefined);
1831
+ };
1832
+
1833
+
1834
+ /**
1835
+ * Returns whether this field is set.
1836
+ * @return {boolean}
1837
+ */
1838
+ proto.gateway.parallax.v1.UpdateTraceRequest.prototype.hasData = function() {
1839
+ return jspb.Message.getField(this, 2) != null;
1840
+ };
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1847
+ /**
1848
+ * Creates an object representation of this proto.
1849
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1850
+ * Optional fields that are not set will be set to undefined.
1851
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1852
+ * For the list of reserved names please see:
1853
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1854
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1855
+ * JSPB instance for transitional soy proto support:
1856
+ * http://goto/soy-param-migration
1857
+ * @return {!Object}
1858
+ */
1859
+ proto.gateway.parallax.v1.UpdateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1860
+ return proto.gateway.parallax.v1.UpdateTraceResponse.toObject(opt_includeInstance, this);
1861
+ };
1862
+
1863
+
1864
+ /**
1865
+ * Static version of the {@see toObject} method.
1866
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1867
+ * the JSPB instance for transitional soy proto support:
1868
+ * http://goto/soy-param-migration
1869
+ * @param {!proto.gateway.parallax.v1.UpdateTraceResponse} msg The msg instance to transform.
1870
+ * @return {!Object}
1871
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1872
+ */
1873
+ proto.gateway.parallax.v1.UpdateTraceResponse.toObject = function(includeInstance, msg) {
1874
+ var f, obj = {
1875
+ status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
1876
+ };
1877
+
1878
+ if (includeInstance) {
1879
+ obj.$jspbMessageInstance = msg;
1880
+ }
1881
+ return obj;
1882
+ };
1883
+ }
1884
+
1885
+
1886
+ /**
1887
+ * Deserializes binary data (in protobuf wire format).
1888
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1889
+ * @return {!proto.gateway.parallax.v1.UpdateTraceResponse}
1890
+ */
1891
+ proto.gateway.parallax.v1.UpdateTraceResponse.deserializeBinary = function(bytes) {
1892
+ var reader = new jspb.BinaryReader(bytes);
1893
+ var msg = new proto.gateway.parallax.v1.UpdateTraceResponse;
1894
+ return proto.gateway.parallax.v1.UpdateTraceResponse.deserializeBinaryFromReader(msg, reader);
1895
+ };
1896
+
1897
+
1898
+ /**
1899
+ * Deserializes binary data (in protobuf wire format) from the
1900
+ * given reader into the given message object.
1901
+ * @param {!proto.gateway.parallax.v1.UpdateTraceResponse} msg The message object to deserialize into.
1902
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1903
+ * @return {!proto.gateway.parallax.v1.UpdateTraceResponse}
1904
+ */
1905
+ proto.gateway.parallax.v1.UpdateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
1906
+ while (reader.nextField()) {
1907
+ if (reader.isEndGroup()) {
1908
+ break;
1909
+ }
1910
+ var field = reader.getFieldNumber();
1911
+ switch (field) {
1912
+ case 1:
1913
+ var value = new proto_common_v1_status_pb.ResponseStatus;
1914
+ reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1915
+ msg.setStatus(value);
1916
+ break;
1917
+ default:
1918
+ reader.skipField();
1919
+ break;
1920
+ }
1921
+ }
1922
+ return msg;
1923
+ };
1924
+
1925
+
1926
+ /**
1927
+ * Serializes the message to binary data (in protobuf wire format).
1928
+ * @return {!Uint8Array}
1929
+ */
1930
+ proto.gateway.parallax.v1.UpdateTraceResponse.prototype.serializeBinary = function() {
1931
+ var writer = new jspb.BinaryWriter();
1932
+ proto.gateway.parallax.v1.UpdateTraceResponse.serializeBinaryToWriter(this, writer);
1933
+ return writer.getResultBuffer();
1934
+ };
1935
+
1936
+
1937
+ /**
1938
+ * Serializes the given message to binary data (in protobuf wire
1939
+ * format), writing to the given BinaryWriter.
1940
+ * @param {!proto.gateway.parallax.v1.UpdateTraceResponse} message
1941
+ * @param {!jspb.BinaryWriter} writer
1942
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1943
+ */
1944
+ proto.gateway.parallax.v1.UpdateTraceResponse.serializeBinaryToWriter = function(message, writer) {
1945
+ var f = undefined;
1946
+ f = message.getStatus();
1947
+ if (f != null) {
1948
+ writer.writeMessage(
1949
+ 1,
1950
+ f,
1951
+ proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1952
+ );
1953
+ }
1954
+ };
1955
+
1956
+
1957
+ /**
1958
+ * optional common.v1.ResponseStatus status = 1;
1959
+ * @return {?proto.common.v1.ResponseStatus}
1960
+ */
1961
+ proto.gateway.parallax.v1.UpdateTraceResponse.prototype.getStatus = function() {
1962
+ return /** @type{?proto.common.v1.ResponseStatus} */ (
1963
+ jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1964
+ };
1965
+
1966
+
1967
+ /**
1968
+ * @param {?proto.common.v1.ResponseStatus|undefined} value
1969
+ * @return {!proto.gateway.parallax.v1.UpdateTraceResponse} returns this
1970
+ */
1971
+ proto.gateway.parallax.v1.UpdateTraceResponse.prototype.setStatus = function(value) {
1972
+ return jspb.Message.setWrapperField(this, 1, value);
1973
+ };
1974
+
1975
+
1976
+ /**
1977
+ * Clears the message field making it undefined.
1978
+ * @return {!proto.gateway.parallax.v1.UpdateTraceResponse} returns this
1979
+ */
1980
+ proto.gateway.parallax.v1.UpdateTraceResponse.prototype.clearStatus = function() {
1981
+ return this.setStatus(undefined);
1982
+ };
1983
+
1984
+
1985
+ /**
1986
+ * Returns whether this field is set.
1987
+ * @return {boolean}
1988
+ */
1989
+ proto.gateway.parallax.v1.UpdateTraceResponse.prototype.hasStatus = function() {
1990
+ return jspb.Message.getField(this, 1) != null;
1991
+ };
1992
+
1993
+
1994
+
1995
+
1996
+
1997
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1998
+ /**
1999
+ * Creates an object representation of this proto.
2000
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2001
+ * Optional fields that are not set will be set to undefined.
2002
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2003
+ * For the list of reserved names please see:
2004
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2005
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2006
+ * JSPB instance for transitional soy proto support:
2007
+ * http://goto/soy-param-migration
2008
+ * @return {!Object}
2009
+ */
2010
+ proto.gateway.parallax.v1.TxHashHint.prototype.toObject = function(opt_includeInstance) {
2011
+ return proto.gateway.parallax.v1.TxHashHint.toObject(opt_includeInstance, this);
2012
+ };
2013
+
2014
+
2015
+ /**
2016
+ * Static version of the {@see toObject} method.
2017
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2018
+ * the JSPB instance for transitional soy proto support:
2019
+ * http://goto/soy-param-migration
2020
+ * @param {!proto.gateway.parallax.v1.TxHashHint} msg The msg instance to transform.
2021
+ * @return {!Object}
2022
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2023
+ */
2024
+ proto.gateway.parallax.v1.TxHashHint.toObject = function(includeInstance, msg) {
2025
+ var f, obj = {
2026
+ chain: jspb.Message.getFieldWithDefault(msg, 1, 0),
2027
+ txHash: jspb.Message.getFieldWithDefault(msg, 2, ""),
2028
+ details: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
2029
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2030
+ };
2031
+
2032
+ if (includeInstance) {
2033
+ obj.$jspbMessageInstance = msg;
2034
+ }
2035
+ return obj;
2036
+ };
2037
+ }
2038
+
2039
+
2040
+ /**
2041
+ * Deserializes binary data (in protobuf wire format).
2042
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2043
+ * @return {!proto.gateway.parallax.v1.TxHashHint}
2044
+ */
2045
+ proto.gateway.parallax.v1.TxHashHint.deserializeBinary = function(bytes) {
2046
+ var reader = new jspb.BinaryReader(bytes);
2047
+ var msg = new proto.gateway.parallax.v1.TxHashHint;
2048
+ return proto.gateway.parallax.v1.TxHashHint.deserializeBinaryFromReader(msg, reader);
2049
+ };
2050
+
2051
+
2052
+ /**
2053
+ * Deserializes binary data (in protobuf wire format) from the
2054
+ * given reader into the given message object.
2055
+ * @param {!proto.gateway.parallax.v1.TxHashHint} msg The message object to deserialize into.
2056
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2057
+ * @return {!proto.gateway.parallax.v1.TxHashHint}
2058
+ */
2059
+ proto.gateway.parallax.v1.TxHashHint.deserializeBinaryFromReader = function(msg, reader) {
2060
+ while (reader.nextField()) {
2061
+ if (reader.isEndGroup()) {
2062
+ break;
2063
+ }
2064
+ var field = reader.getFieldNumber();
2065
+ switch (field) {
2066
+ case 1:
2067
+ var value = /** @type {!proto.gateway.parallax.v1.Chain} */ (reader.readEnum());
2068
+ msg.setChain(value);
2069
+ break;
2070
+ case 2:
2071
+ var value = /** @type {string} */ (reader.readString());
2072
+ msg.setTxHash(value);
2073
+ break;
2074
+ case 3:
2075
+ var value = /** @type {string} */ (reader.readString());
2076
+ msg.setDetails(value);
2077
+ break;
2078
+ case 4:
2079
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2080
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2081
+ msg.setTimestamp(value);
2082
+ break;
2083
+ default:
2084
+ reader.skipField();
2085
+ break;
2086
+ }
2087
+ }
2088
+ return msg;
2089
+ };
2090
+
2091
+
2092
+ /**
2093
+ * Serializes the message to binary data (in protobuf wire format).
2094
+ * @return {!Uint8Array}
2095
+ */
2096
+ proto.gateway.parallax.v1.TxHashHint.prototype.serializeBinary = function() {
2097
+ var writer = new jspb.BinaryWriter();
2098
+ proto.gateway.parallax.v1.TxHashHint.serializeBinaryToWriter(this, writer);
2099
+ return writer.getResultBuffer();
2100
+ };
2101
+
2102
+
2103
+ /**
2104
+ * Serializes the given message to binary data (in protobuf wire
2105
+ * format), writing to the given BinaryWriter.
2106
+ * @param {!proto.gateway.parallax.v1.TxHashHint} message
2107
+ * @param {!jspb.BinaryWriter} writer
2108
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2109
+ */
2110
+ proto.gateway.parallax.v1.TxHashHint.serializeBinaryToWriter = function(message, writer) {
2111
+ var f = undefined;
2112
+ f = message.getChain();
2113
+ if (f !== 0.0) {
2114
+ writer.writeEnum(
2115
+ 1,
2116
+ f
2117
+ );
2118
+ }
2119
+ f = message.getTxHash();
2120
+ if (f.length > 0) {
2121
+ writer.writeString(
2122
+ 2,
2123
+ f
2124
+ );
2125
+ }
2126
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
2127
+ if (f != null) {
2128
+ writer.writeString(
2129
+ 3,
2130
+ f
2131
+ );
2132
+ }
2133
+ f = message.getTimestamp();
2134
+ if (f != null) {
2135
+ writer.writeMessage(
2136
+ 4,
2137
+ f,
2138
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2139
+ );
2140
+ }
2141
+ };
2142
+
2143
+
2144
+ /**
2145
+ * optional Chain chain = 1;
2146
+ * @return {!proto.gateway.parallax.v1.Chain}
2147
+ */
2148
+ proto.gateway.parallax.v1.TxHashHint.prototype.getChain = function() {
2149
+ return /** @type {!proto.gateway.parallax.v1.Chain} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2150
+ };
2151
+
2152
+
2153
+ /**
2154
+ * @param {!proto.gateway.parallax.v1.Chain} value
2155
+ * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2156
+ */
2157
+ proto.gateway.parallax.v1.TxHashHint.prototype.setChain = function(value) {
2158
+ return jspb.Message.setProto3EnumField(this, 1, value);
2159
+ };
2160
+
2161
+
2162
+ /**
2163
+ * optional string tx_hash = 2;
2164
+ * @return {string}
2165
+ */
2166
+ proto.gateway.parallax.v1.TxHashHint.prototype.getTxHash = function() {
2167
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2168
+ };
2169
+
2170
+
2171
+ /**
2172
+ * @param {string} value
2173
+ * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2174
+ */
2175
+ proto.gateway.parallax.v1.TxHashHint.prototype.setTxHash = function(value) {
2176
+ return jspb.Message.setProto3StringField(this, 2, value);
2177
+ };
2178
+
2179
+
2180
+ /**
2181
+ * optional string details = 3;
2182
+ * @return {string}
2183
+ */
2184
+ proto.gateway.parallax.v1.TxHashHint.prototype.getDetails = function() {
2185
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2186
+ };
2187
+
2188
+
2189
+ /**
2190
+ * @param {string} value
2191
+ * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2192
+ */
2193
+ proto.gateway.parallax.v1.TxHashHint.prototype.setDetails = function(value) {
2194
+ return jspb.Message.setField(this, 3, value);
2195
+ };
2196
+
2197
+
2198
+ /**
2199
+ * Clears the field making it undefined.
2200
+ * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2201
+ */
2202
+ proto.gateway.parallax.v1.TxHashHint.prototype.clearDetails = function() {
2203
+ return jspb.Message.setField(this, 3, undefined);
2204
+ };
2205
+
2206
+
2207
+ /**
2208
+ * Returns whether this field is set.
2209
+ * @return {boolean}
2210
+ */
2211
+ proto.gateway.parallax.v1.TxHashHint.prototype.hasDetails = function() {
2212
+ return jspb.Message.getField(this, 3) != null;
2213
+ };
2214
+
2215
+
2216
+ /**
2217
+ * optional google.protobuf.Timestamp timestamp = 4;
2218
+ * @return {?proto.google.protobuf.Timestamp}
2219
+ */
2220
+ proto.gateway.parallax.v1.TxHashHint.prototype.getTimestamp = function() {
2221
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2222
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
2223
+ };
2224
+
2225
+
2226
+ /**
2227
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2228
+ * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2229
+ */
2230
+ proto.gateway.parallax.v1.TxHashHint.prototype.setTimestamp = function(value) {
2231
+ return jspb.Message.setWrapperField(this, 4, value);
2232
+ };
2233
+
2234
+
2235
+ /**
2236
+ * Clears the message field making it undefined.
2237
+ * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2238
+ */
2239
+ proto.gateway.parallax.v1.TxHashHint.prototype.clearTimestamp = function() {
2240
+ return this.setTimestamp(undefined);
2241
+ };
2242
+
2243
+
2244
+ /**
2245
+ * Returns whether this field is set.
2246
+ * @return {boolean}
2247
+ */
2248
+ proto.gateway.parallax.v1.TxHashHint.prototype.hasTimestamp = function() {
2249
+ return jspb.Message.getField(this, 4) != null;
2250
+ };
2251
+
2252
+
2253
+
2254
+
2255
+
2256
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2257
+ /**
2258
+ * Creates an object representation of this proto.
2259
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2260
+ * Optional fields that are not set will be set to undefined.
2261
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2262
+ * For the list of reserved names please see:
2263
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2264
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2265
+ * JSPB instance for transitional soy proto support:
2266
+ * http://goto/soy-param-migration
2267
+ * @return {!Object}
2268
+ */
2269
+ proto.gateway.parallax.v1.Event.prototype.toObject = function(opt_includeInstance) {
2270
+ return proto.gateway.parallax.v1.Event.toObject(opt_includeInstance, this);
2271
+ };
2272
+
2273
+
2274
+ /**
2275
+ * Static version of the {@see toObject} method.
2276
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2277
+ * the JSPB instance for transitional soy proto support:
2278
+ * http://goto/soy-param-migration
2279
+ * @param {!proto.gateway.parallax.v1.Event} msg The msg instance to transform.
2280
+ * @return {!Object}
2281
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2282
+ */
2283
+ proto.gateway.parallax.v1.Event.toObject = function(includeInstance, msg) {
2284
+ var f, obj = {
2285
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
2286
+ details: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
2287
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2288
+ };
2289
+
2290
+ if (includeInstance) {
2291
+ obj.$jspbMessageInstance = msg;
2292
+ }
2293
+ return obj;
2294
+ };
2295
+ }
2296
+
2297
+
2298
+ /**
2299
+ * Deserializes binary data (in protobuf wire format).
2300
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2301
+ * @return {!proto.gateway.parallax.v1.Event}
2302
+ */
2303
+ proto.gateway.parallax.v1.Event.deserializeBinary = function(bytes) {
2304
+ var reader = new jspb.BinaryReader(bytes);
2305
+ var msg = new proto.gateway.parallax.v1.Event;
2306
+ return proto.gateway.parallax.v1.Event.deserializeBinaryFromReader(msg, reader);
2307
+ };
2308
+
2309
+
2310
+ /**
2311
+ * Deserializes binary data (in protobuf wire format) from the
2312
+ * given reader into the given message object.
2313
+ * @param {!proto.gateway.parallax.v1.Event} msg The message object to deserialize into.
2314
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2315
+ * @return {!proto.gateway.parallax.v1.Event}
2316
+ */
2317
+ proto.gateway.parallax.v1.Event.deserializeBinaryFromReader = function(msg, reader) {
2318
+ while (reader.nextField()) {
2319
+ if (reader.isEndGroup()) {
2320
+ break;
2321
+ }
2322
+ var field = reader.getFieldNumber();
2323
+ switch (field) {
2324
+ case 1:
2325
+ var value = /** @type {string} */ (reader.readString());
2326
+ msg.setName(value);
2327
+ break;
2328
+ case 2:
2329
+ var value = /** @type {string} */ (reader.readString());
2330
+ msg.setDetails(value);
2331
+ break;
2332
+ case 3:
2333
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2334
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2335
+ msg.setTimestamp(value);
2336
+ break;
2337
+ default:
2338
+ reader.skipField();
2339
+ break;
2340
+ }
2341
+ }
2342
+ return msg;
2343
+ };
2344
+
2345
+
2346
+ /**
2347
+ * Serializes the message to binary data (in protobuf wire format).
2348
+ * @return {!Uint8Array}
2349
+ */
2350
+ proto.gateway.parallax.v1.Event.prototype.serializeBinary = function() {
2351
+ var writer = new jspb.BinaryWriter();
2352
+ proto.gateway.parallax.v1.Event.serializeBinaryToWriter(this, writer);
2353
+ return writer.getResultBuffer();
2354
+ };
2355
+
2356
+
2357
+ /**
2358
+ * Serializes the given message to binary data (in protobuf wire
2359
+ * format), writing to the given BinaryWriter.
2360
+ * @param {!proto.gateway.parallax.v1.Event} message
2361
+ * @param {!jspb.BinaryWriter} writer
2362
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2363
+ */
2364
+ proto.gateway.parallax.v1.Event.serializeBinaryToWriter = function(message, writer) {
2365
+ var f = undefined;
2366
+ f = message.getName();
2367
+ if (f.length > 0) {
2368
+ writer.writeString(
2369
+ 1,
2370
+ f
2371
+ );
2372
+ }
2373
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
2374
+ if (f != null) {
2375
+ writer.writeString(
2376
+ 2,
2377
+ f
2378
+ );
2379
+ }
2380
+ f = message.getTimestamp();
2381
+ if (f != null) {
2382
+ writer.writeMessage(
2383
+ 3,
2384
+ f,
2385
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2386
+ );
2387
+ }
2388
+ };
2389
+
2390
+
2391
+ /**
2392
+ * optional string name = 1;
2393
+ * @return {string}
2394
+ */
2395
+ proto.gateway.parallax.v1.Event.prototype.getName = function() {
2396
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1532
2397
  };
1533
2398
 
1534
2399
 
1535
2400
  /**
1536
2401
  * @param {string} value
1537
- * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2402
+ * @return {!proto.gateway.parallax.v1.Event} returns this
1538
2403
  */
1539
- proto.gateway.parallax.v1.TxHashHint.prototype.setTxHash = function(value) {
1540
- return jspb.Message.setProto3StringField(this, 2, value);
2404
+ proto.gateway.parallax.v1.Event.prototype.setName = function(value) {
2405
+ return jspb.Message.setProto3StringField(this, 1, value);
2406
+ };
2407
+
2408
+
2409
+ /**
2410
+ * optional string details = 2;
2411
+ * @return {string}
2412
+ */
2413
+ proto.gateway.parallax.v1.Event.prototype.getDetails = function() {
2414
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2415
+ };
2416
+
2417
+
2418
+ /**
2419
+ * @param {string} value
2420
+ * @return {!proto.gateway.parallax.v1.Event} returns this
2421
+ */
2422
+ proto.gateway.parallax.v1.Event.prototype.setDetails = function(value) {
2423
+ return jspb.Message.setField(this, 2, value);
2424
+ };
2425
+
2426
+
2427
+ /**
2428
+ * Clears the field making it undefined.
2429
+ * @return {!proto.gateway.parallax.v1.Event} returns this
2430
+ */
2431
+ proto.gateway.parallax.v1.Event.prototype.clearDetails = function() {
2432
+ return jspb.Message.setField(this, 2, undefined);
2433
+ };
2434
+
2435
+
2436
+ /**
2437
+ * Returns whether this field is set.
2438
+ * @return {boolean}
2439
+ */
2440
+ proto.gateway.parallax.v1.Event.prototype.hasDetails = function() {
2441
+ return jspb.Message.getField(this, 2) != null;
2442
+ };
2443
+
2444
+
2445
+ /**
2446
+ * optional google.protobuf.Timestamp timestamp = 3;
2447
+ * @return {?proto.google.protobuf.Timestamp}
2448
+ */
2449
+ proto.gateway.parallax.v1.Event.prototype.getTimestamp = function() {
2450
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2451
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
2452
+ };
2453
+
2454
+
2455
+ /**
2456
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2457
+ * @return {!proto.gateway.parallax.v1.Event} returns this
2458
+ */
2459
+ proto.gateway.parallax.v1.Event.prototype.setTimestamp = function(value) {
2460
+ return jspb.Message.setWrapperField(this, 3, value);
2461
+ };
2462
+
2463
+
2464
+ /**
2465
+ * Clears the message field making it undefined.
2466
+ * @return {!proto.gateway.parallax.v1.Event} returns this
2467
+ */
2468
+ proto.gateway.parallax.v1.Event.prototype.clearTimestamp = function() {
2469
+ return this.setTimestamp(undefined);
2470
+ };
2471
+
2472
+
2473
+ /**
2474
+ * Returns whether this field is set.
2475
+ * @return {boolean}
2476
+ */
2477
+ proto.gateway.parallax.v1.Event.prototype.hasTimestamp = function() {
2478
+ return jspb.Message.getField(this, 3) != null;
2479
+ };
2480
+
2481
+
2482
+
2483
+
2484
+
2485
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2486
+ /**
2487
+ * Creates an object representation of this proto.
2488
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2489
+ * Optional fields that are not set will be set to undefined.
2490
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2491
+ * For the list of reserved names please see:
2492
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2493
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2494
+ * JSPB instance for transitional soy proto support:
2495
+ * http://goto/soy-param-migration
2496
+ * @return {!Object}
2497
+ */
2498
+ proto.gateway.parallax.v1.Attributes.prototype.toObject = function(opt_includeInstance) {
2499
+ return proto.gateway.parallax.v1.Attributes.toObject(opt_includeInstance, this);
2500
+ };
2501
+
2502
+
2503
+ /**
2504
+ * Static version of the {@see toObject} method.
2505
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2506
+ * the JSPB instance for transitional soy proto support:
2507
+ * http://goto/soy-param-migration
2508
+ * @param {!proto.gateway.parallax.v1.Attributes} msg The msg instance to transform.
2509
+ * @return {!Object}
2510
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2511
+ */
2512
+ proto.gateway.parallax.v1.Attributes.toObject = function(includeInstance, msg) {
2513
+ var f, obj = {
2514
+ attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
2515
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2516
+ };
2517
+
2518
+ if (includeInstance) {
2519
+ obj.$jspbMessageInstance = msg;
2520
+ }
2521
+ return obj;
2522
+ };
2523
+ }
2524
+
2525
+
2526
+ /**
2527
+ * Deserializes binary data (in protobuf wire format).
2528
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2529
+ * @return {!proto.gateway.parallax.v1.Attributes}
2530
+ */
2531
+ proto.gateway.parallax.v1.Attributes.deserializeBinary = function(bytes) {
2532
+ var reader = new jspb.BinaryReader(bytes);
2533
+ var msg = new proto.gateway.parallax.v1.Attributes;
2534
+ return proto.gateway.parallax.v1.Attributes.deserializeBinaryFromReader(msg, reader);
2535
+ };
2536
+
2537
+
2538
+ /**
2539
+ * Deserializes binary data (in protobuf wire format) from the
2540
+ * given reader into the given message object.
2541
+ * @param {!proto.gateway.parallax.v1.Attributes} msg The message object to deserialize into.
2542
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2543
+ * @return {!proto.gateway.parallax.v1.Attributes}
2544
+ */
2545
+ proto.gateway.parallax.v1.Attributes.deserializeBinaryFromReader = function(msg, reader) {
2546
+ while (reader.nextField()) {
2547
+ if (reader.isEndGroup()) {
2548
+ break;
2549
+ }
2550
+ var field = reader.getFieldNumber();
2551
+ switch (field) {
2552
+ case 1:
2553
+ var value = msg.getAttributesMap();
2554
+ reader.readMessage(value, function(message, reader) {
2555
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
2556
+ });
2557
+ break;
2558
+ case 2:
2559
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2560
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2561
+ msg.setTimestamp(value);
2562
+ break;
2563
+ default:
2564
+ reader.skipField();
2565
+ break;
2566
+ }
2567
+ }
2568
+ return msg;
1541
2569
  };
1542
2570
 
1543
2571
 
1544
2572
  /**
1545
- * optional string details = 3;
1546
- * @return {string}
2573
+ * Serializes the message to binary data (in protobuf wire format).
2574
+ * @return {!Uint8Array}
1547
2575
  */
1548
- proto.gateway.parallax.v1.TxHashHint.prototype.getDetails = function() {
1549
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2576
+ proto.gateway.parallax.v1.Attributes.prototype.serializeBinary = function() {
2577
+ var writer = new jspb.BinaryWriter();
2578
+ proto.gateway.parallax.v1.Attributes.serializeBinaryToWriter(this, writer);
2579
+ return writer.getResultBuffer();
1550
2580
  };
1551
2581
 
1552
2582
 
1553
2583
  /**
1554
- * @param {string} value
1555
- * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2584
+ * Serializes the given message to binary data (in protobuf wire
2585
+ * format), writing to the given BinaryWriter.
2586
+ * @param {!proto.gateway.parallax.v1.Attributes} message
2587
+ * @param {!jspb.BinaryWriter} writer
2588
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1556
2589
  */
1557
- proto.gateway.parallax.v1.TxHashHint.prototype.setDetails = function(value) {
1558
- return jspb.Message.setField(this, 3, value);
2590
+ proto.gateway.parallax.v1.Attributes.serializeBinaryToWriter = function(message, writer) {
2591
+ var f = undefined;
2592
+ f = message.getAttributesMap(true);
2593
+ if (f && f.getLength() > 0) {
2594
+ f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
2595
+ }
2596
+ f = message.getTimestamp();
2597
+ if (f != null) {
2598
+ writer.writeMessage(
2599
+ 2,
2600
+ f,
2601
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2602
+ );
2603
+ }
1559
2604
  };
1560
2605
 
1561
2606
 
1562
2607
  /**
1563
- * Clears the field making it undefined.
1564
- * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2608
+ * map<string, string> attributes = 1;
2609
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
2610
+ * empty, instead returning `undefined`
2611
+ * @return {!jspb.Map<string,string>}
1565
2612
  */
1566
- proto.gateway.parallax.v1.TxHashHint.prototype.clearDetails = function() {
1567
- return jspb.Message.setField(this, 3, undefined);
2613
+ proto.gateway.parallax.v1.Attributes.prototype.getAttributesMap = function(opt_noLazyCreate) {
2614
+ return /** @type {!jspb.Map<string,string>} */ (
2615
+ jspb.Message.getMapField(this, 1, opt_noLazyCreate,
2616
+ null));
1568
2617
  };
1569
2618
 
1570
2619
 
1571
2620
  /**
1572
- * Returns whether this field is set.
1573
- * @return {boolean}
2621
+ * Clears values from the map. The map will be non-null.
2622
+ * @return {!proto.gateway.parallax.v1.Attributes} returns this
1574
2623
  */
1575
- proto.gateway.parallax.v1.TxHashHint.prototype.hasDetails = function() {
1576
- return jspb.Message.getField(this, 3) != null;
2624
+ proto.gateway.parallax.v1.Attributes.prototype.clearAttributesMap = function() {
2625
+ this.getAttributesMap().clear();
2626
+ return this;
1577
2627
  };
1578
2628
 
1579
2629
 
1580
2630
  /**
1581
- * optional google.protobuf.Timestamp timestamp = 4;
2631
+ * optional google.protobuf.Timestamp timestamp = 2;
1582
2632
  * @return {?proto.google.protobuf.Timestamp}
1583
2633
  */
1584
- proto.gateway.parallax.v1.TxHashHint.prototype.getTimestamp = function() {
2634
+ proto.gateway.parallax.v1.Attributes.prototype.getTimestamp = function() {
1585
2635
  return /** @type{?proto.google.protobuf.Timestamp} */ (
1586
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
2636
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
1587
2637
  };
1588
2638
 
1589
2639
 
1590
2640
  /**
1591
2641
  * @param {?proto.google.protobuf.Timestamp|undefined} value
1592
- * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2642
+ * @return {!proto.gateway.parallax.v1.Attributes} returns this
1593
2643
  */
1594
- proto.gateway.parallax.v1.TxHashHint.prototype.setTimestamp = function(value) {
1595
- return jspb.Message.setWrapperField(this, 4, value);
2644
+ proto.gateway.parallax.v1.Attributes.prototype.setTimestamp = function(value) {
2645
+ return jspb.Message.setWrapperField(this, 2, value);
1596
2646
  };
1597
2647
 
1598
2648
 
1599
2649
  /**
1600
2650
  * Clears the message field making it undefined.
1601
- * @return {!proto.gateway.parallax.v1.TxHashHint} returns this
2651
+ * @return {!proto.gateway.parallax.v1.Attributes} returns this
1602
2652
  */
1603
- proto.gateway.parallax.v1.TxHashHint.prototype.clearTimestamp = function() {
2653
+ proto.gateway.parallax.v1.Attributes.prototype.clearTimestamp = function() {
1604
2654
  return this.setTimestamp(undefined);
1605
2655
  };
1606
2656
 
@@ -1609,12 +2659,19 @@ function requireParallax_gateway_pb () {
1609
2659
  * Returns whether this field is set.
1610
2660
  * @return {boolean}
1611
2661
  */
1612
- proto.gateway.parallax.v1.TxHashHint.prototype.hasTimestamp = function() {
1613
- return jspb.Message.getField(this, 4) != null;
2662
+ proto.gateway.parallax.v1.Attributes.prototype.hasTimestamp = function() {
2663
+ return jspb.Message.getField(this, 2) != null;
1614
2664
  };
1615
2665
 
1616
2666
 
1617
2667
 
2668
+ /**
2669
+ * List of repeated fields within this message type.
2670
+ * @private {!Array<number>}
2671
+ * @const
2672
+ */
2673
+ proto.gateway.parallax.v1.Tags.repeatedFields_ = [1];
2674
+
1618
2675
 
1619
2676
 
1620
2677
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -1630,8 +2687,8 @@ function requireParallax_gateway_pb () {
1630
2687
  * http://goto/soy-param-migration
1631
2688
  * @return {!Object}
1632
2689
  */
1633
- proto.gateway.parallax.v1.Event.prototype.toObject = function(opt_includeInstance) {
1634
- return proto.gateway.parallax.v1.Event.toObject(opt_includeInstance, this);
2690
+ proto.gateway.parallax.v1.Tags.prototype.toObject = function(opt_includeInstance) {
2691
+ return proto.gateway.parallax.v1.Tags.toObject(opt_includeInstance, this);
1635
2692
  };
1636
2693
 
1637
2694
 
@@ -1640,14 +2697,13 @@ function requireParallax_gateway_pb () {
1640
2697
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1641
2698
  * the JSPB instance for transitional soy proto support:
1642
2699
  * http://goto/soy-param-migration
1643
- * @param {!proto.gateway.parallax.v1.Event} msg The msg instance to transform.
2700
+ * @param {!proto.gateway.parallax.v1.Tags} msg The msg instance to transform.
1644
2701
  * @return {!Object}
1645
2702
  * @suppress {unusedLocalVariables} f is only used for nested messages
1646
2703
  */
1647
- proto.gateway.parallax.v1.Event.toObject = function(includeInstance, msg) {
2704
+ proto.gateway.parallax.v1.Tags.toObject = function(includeInstance, msg) {
1648
2705
  var f, obj = {
1649
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1650
- details: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
2706
+ tagsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
1651
2707
  timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1652
2708
  };
1653
2709
 
@@ -1662,23 +2718,23 @@ function requireParallax_gateway_pb () {
1662
2718
  /**
1663
2719
  * Deserializes binary data (in protobuf wire format).
1664
2720
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
1665
- * @return {!proto.gateway.parallax.v1.Event}
2721
+ * @return {!proto.gateway.parallax.v1.Tags}
1666
2722
  */
1667
- proto.gateway.parallax.v1.Event.deserializeBinary = function(bytes) {
2723
+ proto.gateway.parallax.v1.Tags.deserializeBinary = function(bytes) {
1668
2724
  var reader = new jspb.BinaryReader(bytes);
1669
- var msg = new proto.gateway.parallax.v1.Event;
1670
- return proto.gateway.parallax.v1.Event.deserializeBinaryFromReader(msg, reader);
2725
+ var msg = new proto.gateway.parallax.v1.Tags;
2726
+ return proto.gateway.parallax.v1.Tags.deserializeBinaryFromReader(msg, reader);
1671
2727
  };
1672
2728
 
1673
2729
 
1674
2730
  /**
1675
2731
  * Deserializes binary data (in protobuf wire format) from the
1676
2732
  * given reader into the given message object.
1677
- * @param {!proto.gateway.parallax.v1.Event} msg The message object to deserialize into.
2733
+ * @param {!proto.gateway.parallax.v1.Tags} msg The message object to deserialize into.
1678
2734
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1679
- * @return {!proto.gateway.parallax.v1.Event}
2735
+ * @return {!proto.gateway.parallax.v1.Tags}
1680
2736
  */
1681
- proto.gateway.parallax.v1.Event.deserializeBinaryFromReader = function(msg, reader) {
2737
+ proto.gateway.parallax.v1.Tags.deserializeBinaryFromReader = function(msg, reader) {
1682
2738
  while (reader.nextField()) {
1683
2739
  if (reader.isEndGroup()) {
1684
2740
  break;
@@ -1687,13 +2743,9 @@ function requireParallax_gateway_pb () {
1687
2743
  switch (field) {
1688
2744
  case 1:
1689
2745
  var value = /** @type {string} */ (reader.readString());
1690
- msg.setName(value);
2746
+ msg.addTags(value);
1691
2747
  break;
1692
2748
  case 2:
1693
- var value = /** @type {string} */ (reader.readString());
1694
- msg.setDetails(value);
1695
- break;
1696
- case 3:
1697
2749
  var value = new google_protobuf_timestamp_pb.Timestamp;
1698
2750
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1699
2751
  msg.setTimestamp(value);
@@ -1711,9 +2763,9 @@ function requireParallax_gateway_pb () {
1711
2763
  * Serializes the message to binary data (in protobuf wire format).
1712
2764
  * @return {!Uint8Array}
1713
2765
  */
1714
- proto.gateway.parallax.v1.Event.prototype.serializeBinary = function() {
2766
+ proto.gateway.parallax.v1.Tags.prototype.serializeBinary = function() {
1715
2767
  var writer = new jspb.BinaryWriter();
1716
- proto.gateway.parallax.v1.Event.serializeBinaryToWriter(this, writer);
2768
+ proto.gateway.parallax.v1.Tags.serializeBinaryToWriter(this, writer);
1717
2769
  return writer.getResultBuffer();
1718
2770
  };
1719
2771
 
@@ -1721,30 +2773,23 @@ function requireParallax_gateway_pb () {
1721
2773
  /**
1722
2774
  * Serializes the given message to binary data (in protobuf wire
1723
2775
  * format), writing to the given BinaryWriter.
1724
- * @param {!proto.gateway.parallax.v1.Event} message
2776
+ * @param {!proto.gateway.parallax.v1.Tags} message
1725
2777
  * @param {!jspb.BinaryWriter} writer
1726
2778
  * @suppress {unusedLocalVariables} f is only used for nested messages
1727
2779
  */
1728
- proto.gateway.parallax.v1.Event.serializeBinaryToWriter = function(message, writer) {
2780
+ proto.gateway.parallax.v1.Tags.serializeBinaryToWriter = function(message, writer) {
1729
2781
  var f = undefined;
1730
- f = message.getName();
2782
+ f = message.getTagsList();
1731
2783
  if (f.length > 0) {
1732
- writer.writeString(
2784
+ writer.writeRepeatedString(
1733
2785
  1,
1734
2786
  f
1735
2787
  );
1736
2788
  }
1737
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
1738
- if (f != null) {
1739
- writer.writeString(
1740
- 2,
1741
- f
1742
- );
1743
- }
1744
2789
  f = message.getTimestamp();
1745
2790
  if (f != null) {
1746
2791
  writer.writeMessage(
1747
- 3,
2792
+ 2,
1748
2793
  f,
1749
2794
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1750
2795
  );
@@ -1753,83 +2798,66 @@ function requireParallax_gateway_pb () {
1753
2798
 
1754
2799
 
1755
2800
  /**
1756
- * optional string name = 1;
1757
- * @return {string}
1758
- */
1759
- proto.gateway.parallax.v1.Event.prototype.getName = function() {
1760
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1761
- };
1762
-
1763
-
1764
- /**
1765
- * @param {string} value
1766
- * @return {!proto.gateway.parallax.v1.Event} returns this
2801
+ * repeated string tags = 1;
2802
+ * @return {!Array<string>}
1767
2803
  */
1768
- proto.gateway.parallax.v1.Event.prototype.setName = function(value) {
1769
- return jspb.Message.setProto3StringField(this, 1, value);
2804
+ proto.gateway.parallax.v1.Tags.prototype.getTagsList = function() {
2805
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
1770
2806
  };
1771
2807
 
1772
2808
 
1773
2809
  /**
1774
- * optional string details = 2;
1775
- * @return {string}
2810
+ * @param {!Array<string>} value
2811
+ * @return {!proto.gateway.parallax.v1.Tags} returns this
1776
2812
  */
1777
- proto.gateway.parallax.v1.Event.prototype.getDetails = function() {
1778
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2813
+ proto.gateway.parallax.v1.Tags.prototype.setTagsList = function(value) {
2814
+ return jspb.Message.setField(this, 1, value || []);
1779
2815
  };
1780
2816
 
1781
2817
 
1782
2818
  /**
1783
2819
  * @param {string} value
1784
- * @return {!proto.gateway.parallax.v1.Event} returns this
1785
- */
1786
- proto.gateway.parallax.v1.Event.prototype.setDetails = function(value) {
1787
- return jspb.Message.setField(this, 2, value);
1788
- };
1789
-
1790
-
1791
- /**
1792
- * Clears the field making it undefined.
1793
- * @return {!proto.gateway.parallax.v1.Event} returns this
2820
+ * @param {number=} opt_index
2821
+ * @return {!proto.gateway.parallax.v1.Tags} returns this
1794
2822
  */
1795
- proto.gateway.parallax.v1.Event.prototype.clearDetails = function() {
1796
- return jspb.Message.setField(this, 2, undefined);
2823
+ proto.gateway.parallax.v1.Tags.prototype.addTags = function(value, opt_index) {
2824
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1797
2825
  };
1798
2826
 
1799
2827
 
1800
2828
  /**
1801
- * Returns whether this field is set.
1802
- * @return {boolean}
2829
+ * Clears the list making it empty but non-null.
2830
+ * @return {!proto.gateway.parallax.v1.Tags} returns this
1803
2831
  */
1804
- proto.gateway.parallax.v1.Event.prototype.hasDetails = function() {
1805
- return jspb.Message.getField(this, 2) != null;
2832
+ proto.gateway.parallax.v1.Tags.prototype.clearTagsList = function() {
2833
+ return this.setTagsList([]);
1806
2834
  };
1807
2835
 
1808
2836
 
1809
2837
  /**
1810
- * optional google.protobuf.Timestamp timestamp = 3;
2838
+ * optional google.protobuf.Timestamp timestamp = 2;
1811
2839
  * @return {?proto.google.protobuf.Timestamp}
1812
2840
  */
1813
- proto.gateway.parallax.v1.Event.prototype.getTimestamp = function() {
2841
+ proto.gateway.parallax.v1.Tags.prototype.getTimestamp = function() {
1814
2842
  return /** @type{?proto.google.protobuf.Timestamp} */ (
1815
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
2843
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
1816
2844
  };
1817
2845
 
1818
2846
 
1819
2847
  /**
1820
2848
  * @param {?proto.google.protobuf.Timestamp|undefined} value
1821
- * @return {!proto.gateway.parallax.v1.Event} returns this
2849
+ * @return {!proto.gateway.parallax.v1.Tags} returns this
1822
2850
  */
1823
- proto.gateway.parallax.v1.Event.prototype.setTimestamp = function(value) {
1824
- return jspb.Message.setWrapperField(this, 3, value);
2851
+ proto.gateway.parallax.v1.Tags.prototype.setTimestamp = function(value) {
2852
+ return jspb.Message.setWrapperField(this, 2, value);
1825
2853
  };
1826
2854
 
1827
2855
 
1828
2856
  /**
1829
2857
  * Clears the message field making it undefined.
1830
- * @return {!proto.gateway.parallax.v1.Event} returns this
2858
+ * @return {!proto.gateway.parallax.v1.Tags} returns this
1831
2859
  */
1832
- proto.gateway.parallax.v1.Event.prototype.clearTimestamp = function() {
2860
+ proto.gateway.parallax.v1.Tags.prototype.clearTimestamp = function() {
1833
2861
  return this.setTimestamp(undefined);
1834
2862
  };
1835
2863
 
@@ -1838,8 +2866,8 @@ function requireParallax_gateway_pb () {
1838
2866
  * Returns whether this field is set.
1839
2867
  * @return {boolean}
1840
2868
  */
1841
- proto.gateway.parallax.v1.Event.prototype.hasTimestamp = function() {
1842
- return jspb.Message.getField(this, 3) != null;
2869
+ proto.gateway.parallax.v1.Tags.prototype.hasTimestamp = function() {
2870
+ return jspb.Message.getField(this, 2) != null;
1843
2871
  };
1844
2872
 
1845
2873
 
@@ -1909,6 +2937,14 @@ class ParallaxGatewayServiceClient {
1909
2937
  return request.serializeBinary();
1910
2938
  }, parallax_gateway_pbExports.CreateTraceResponse.deserializeBinary)
1911
2939
  });
2940
+ Object.defineProperty(this, "methodDescriptorUpdateTrace", {
2941
+ enumerable: true,
2942
+ configurable: true,
2943
+ writable: true,
2944
+ value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/UpdateTrace', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.UpdateTraceRequest, parallax_gateway_pbExports.UpdateTraceResponse, (request) => {
2945
+ return request.serializeBinary();
2946
+ }, parallax_gateway_pbExports.UpdateTraceResponse.deserializeBinary)
2947
+ });
1912
2948
  if (!options)
1913
2949
  options = {};
1914
2950
  if (!credentials)
@@ -1927,6 +2963,14 @@ class ParallaxGatewayServiceClient {
1927
2963
  return this.client_.unaryCall(this.hostname_ +
1928
2964
  '/gateway.parallax.v1.ParallaxGatewayService/CreateTrace', request, metadata || {}, this.methodDescriptorCreateTrace);
1929
2965
  }
2966
+ updateTrace(request, metadata, callback) {
2967
+ if (callback !== undefined) {
2968
+ return this.client_.rpcCall(this.hostname_ +
2969
+ '/gateway.parallax.v1.ParallaxGatewayService/UpdateTrace', request, metadata || {}, this.methodDescriptorUpdateTrace, callback);
2970
+ }
2971
+ return this.client_.unaryCall(this.hostname_ +
2972
+ '/gateway.parallax.v1.ParallaxGatewayService/UpdateTrace', request, metadata || {}, this.methodDescriptorUpdateTrace);
2973
+ }
1930
2974
  }
1931
2975
 
1932
2976
  var status_pbExports = requireStatus_pb();
@@ -2089,56 +3133,127 @@ const CHAIN_MAP = {
2089
3133
  bsc: parallax_gateway_pbExports.Chain.CHAIN_BSC,
2090
3134
  };
2091
3135
  /**
2092
- * Builder class for constructing traces with method chaining
2093
- * Automatically handles web-specific features like client metadata
3136
+ * Builder class for constructing traces with method chaining.
3137
+ * Supports auto-flush mode (default) where data is automatically sent after a period of inactivity,
3138
+ * or manual flush mode where you explicitly call flush().
2094
3139
  */
2095
3140
  class ParallaxTrace {
2096
- constructor(client, name = '', includeClientMeta = true) {
3141
+ constructor(client, options) {
2097
3142
  Object.defineProperty(this, "name", {
2098
3143
  enumerable: true,
2099
3144
  configurable: true,
2100
3145
  writable: true,
2101
3146
  value: void 0
2102
3147
  });
2103
- Object.defineProperty(this, "attributes", {
3148
+ Object.defineProperty(this, "client", {
2104
3149
  enumerable: true,
2105
3150
  configurable: true,
2106
3151
  writable: true,
2107
- value: {}
3152
+ value: void 0
2108
3153
  });
2109
- Object.defineProperty(this, "tags", {
3154
+ Object.defineProperty(this, "includeClientMeta", {
2110
3155
  enumerable: true,
2111
3156
  configurable: true,
2112
3157
  writable: true,
2113
- value: []
3158
+ value: void 0
2114
3159
  });
2115
- Object.defineProperty(this, "events", {
3160
+ // Flush configuration
3161
+ Object.defineProperty(this, "autoFlush", {
2116
3162
  enumerable: true,
2117
3163
  configurable: true,
2118
3164
  writable: true,
2119
- value: []
3165
+ value: void 0
2120
3166
  });
2121
- Object.defineProperty(this, "txHashHint", {
3167
+ Object.defineProperty(this, "flushPeriodMs", {
2122
3168
  enumerable: true,
2123
3169
  configurable: true,
2124
3170
  writable: true,
2125
3171
  value: void 0
2126
3172
  });
2127
- Object.defineProperty(this, "client", {
3173
+ Object.defineProperty(this, "flushTimer", {
3174
+ enumerable: true,
3175
+ configurable: true,
3176
+ writable: true,
3177
+ value: null
3178
+ });
3179
+ // Retry configuration
3180
+ Object.defineProperty(this, "maxRetries", {
2128
3181
  enumerable: true,
2129
3182
  configurable: true,
2130
3183
  writable: true,
2131
3184
  value: void 0
2132
3185
  });
2133
- Object.defineProperty(this, "includeClientMeta", {
3186
+ Object.defineProperty(this, "retryBackoff", {
2134
3187
  enumerable: true,
2135
3188
  configurable: true,
2136
3189
  writable: true,
2137
3190
  value: void 0
2138
3191
  });
3192
+ // State tracking
3193
+ Object.defineProperty(this, "traceId", {
3194
+ enumerable: true,
3195
+ configurable: true,
3196
+ writable: true,
3197
+ value: null
3198
+ });
3199
+ Object.defineProperty(this, "pendingAttributes", {
3200
+ enumerable: true,
3201
+ configurable: true,
3202
+ writable: true,
3203
+ value: {}
3204
+ });
3205
+ Object.defineProperty(this, "pendingTags", {
3206
+ enumerable: true,
3207
+ configurable: true,
3208
+ writable: true,
3209
+ value: []
3210
+ });
3211
+ Object.defineProperty(this, "pendingEvents", {
3212
+ enumerable: true,
3213
+ configurable: true,
3214
+ writable: true,
3215
+ value: []
3216
+ });
3217
+ Object.defineProperty(this, "pendingTxHashHints", {
3218
+ enumerable: true,
3219
+ configurable: true,
3220
+ writable: true,
3221
+ value: []
3222
+ });
3223
+ // Queue for maintaining strict ordering of flushes
3224
+ Object.defineProperty(this, "flushQueue", {
3225
+ enumerable: true,
3226
+ configurable: true,
3227
+ writable: true,
3228
+ value: Promise.resolve()
3229
+ });
2139
3230
  this.client = client;
2140
- this.name = name;
2141
- this.includeClientMeta = includeClientMeta;
3231
+ this.name = options.name;
3232
+ this.autoFlush = options.autoFlush;
3233
+ this.flushPeriodMs = options.flushPeriodMs;
3234
+ this.includeClientMeta = options.includeClientMeta;
3235
+ this.maxRetries = options.maxRetries;
3236
+ this.retryBackoff = options.retryBackoff;
3237
+ }
3238
+ /**
3239
+ * Schedule an auto-flush after the configured period.
3240
+ * Resets the timer on each call.
3241
+ * If flushPeriodMs is 0, flushes immediately on every call.
3242
+ */
3243
+ scheduleFlush() {
3244
+ if (!this.autoFlush)
3245
+ return;
3246
+ // flushPeriodMs === 0 means flush immediately on every call
3247
+ if (this.flushPeriodMs === 0) {
3248
+ this.flush();
3249
+ return;
3250
+ }
3251
+ if (this.flushTimer) {
3252
+ clearTimeout(this.flushTimer);
3253
+ }
3254
+ this.flushTimer = setTimeout(() => {
3255
+ this.flush();
3256
+ }, this.flushPeriodMs);
2142
3257
  }
2143
3258
  /**
2144
3259
  * Add an attribute to the trace
@@ -2147,10 +3262,11 @@ class ParallaxTrace {
2147
3262
  * @returns This trace builder for chaining
2148
3263
  */
2149
3264
  addAttribute(key, value) {
2150
- this.attributes[key] =
3265
+ this.pendingAttributes[key] =
2151
3266
  typeof value === 'object' && value !== null
2152
3267
  ? JSON.stringify(value)
2153
3268
  : String(value);
3269
+ this.scheduleFlush();
2154
3270
  return this;
2155
3271
  }
2156
3272
  /**
@@ -2160,11 +3276,12 @@ class ParallaxTrace {
2160
3276
  */
2161
3277
  addAttributes(attributes) {
2162
3278
  for (const [key, value] of Object.entries(attributes)) {
2163
- this.attributes[key] =
3279
+ this.pendingAttributes[key] =
2164
3280
  typeof value === 'object' && value !== null
2165
3281
  ? JSON.stringify(value)
2166
3282
  : String(value);
2167
3283
  }
3284
+ this.scheduleFlush();
2168
3285
  return this;
2169
3286
  }
2170
3287
  /**
@@ -2173,7 +3290,8 @@ class ParallaxTrace {
2173
3290
  * @returns This trace builder for chaining
2174
3291
  */
2175
3292
  addTag(tag) {
2176
- this.tags.push(tag);
3293
+ this.pendingTags.push(tag);
3294
+ this.scheduleFlush();
2177
3295
  return this;
2178
3296
  }
2179
3297
  /**
@@ -2182,7 +3300,8 @@ class ParallaxTrace {
2182
3300
  * @returns This trace builder for chaining
2183
3301
  */
2184
3302
  addTags(tags) {
2185
- this.tags.push(...tags);
3303
+ this.pendingTags.push(...tags);
3304
+ this.scheduleFlush();
2186
3305
  return this;
2187
3306
  }
2188
3307
  /**
@@ -2196,94 +3315,217 @@ class ParallaxTrace {
2196
3315
  const detailsString = typeof details === 'object' && details !== null
2197
3316
  ? JSON.stringify(details)
2198
3317
  : details;
2199
- this.events.push({
3318
+ this.pendingEvents.push({
2200
3319
  eventName,
2201
3320
  details: detailsString,
2202
3321
  timestamp: timestamp || new Date(),
2203
3322
  });
3323
+ this.scheduleFlush();
2204
3324
  return this;
2205
3325
  }
2206
3326
  /**
2207
- * Set the transaction hash hint for blockchain correlation
3327
+ * Add a transaction hash hint for blockchain correlation.
3328
+ * Multiple hints can be added to the same trace.
2208
3329
  * @param txHash Transaction hash
2209
3330
  * @param chain Chain name (e.g., "ethereum", "polygon", "base")
2210
3331
  * @param details Optional details about the transaction
2211
3332
  * @returns This trace builder for chaining
2212
3333
  */
2213
- setTxHint(txHash, chain, details) {
2214
- this.txHashHint = {
3334
+ addTxHint(txHash, chain, details) {
3335
+ this.pendingTxHashHints.push({
2215
3336
  txHash,
2216
3337
  chain,
2217
3338
  details,
2218
3339
  timestamp: new Date(),
2219
- };
3340
+ });
3341
+ this.scheduleFlush();
2220
3342
  return this;
2221
3343
  }
2222
3344
  /**
2223
- * Create and submit the trace to the gateway
2224
- * @returns The trace ID if successful, undefined if failed
3345
+ * Flush pending data to the gateway.
3346
+ * Fire-and-forget - returns immediately but maintains strict ordering of requests.
3347
+ * First flush calls CreateTrace, subsequent flushes call UpdateTrace.
2225
3348
  */
2226
- async create() {
2227
- // Build the CreateTraceRequest
2228
- const request = new parallax_gateway_pbExports.CreateTraceRequest();
2229
- request.setName(this.name);
2230
- request.setTagsList(this.tags);
2231
- // Add attributes
2232
- const attrsMap = request.getAttributesMap();
2233
- for (const [key, value] of Object.entries(this.attributes)) {
2234
- attrsMap.set(key, value);
3349
+ flush() {
3350
+ // Cancel any pending auto-flush timer
3351
+ if (this.flushTimer) {
3352
+ clearTimeout(this.flushTimer);
3353
+ this.flushTimer = null;
3354
+ }
3355
+ // Check if there's anything to flush
3356
+ const hasPendingData = Object.keys(this.pendingAttributes).length > 0 ||
3357
+ this.pendingTags.length > 0 ||
3358
+ this.pendingEvents.length > 0 ||
3359
+ this.pendingTxHashHints.length > 0;
3360
+ if (!hasPendingData && this.traceId !== null) {
3361
+ return; // Nothing to flush
3362
+ }
3363
+ // Capture pending data NOW (before it changes)
3364
+ const traceData = this.buildTraceData();
3365
+ // Capture context for error reporting
3366
+ const isCreateOp = this.traceId === null;
3367
+ const traceName = this.name;
3368
+ // Clear pending immediately so next flush doesn't re-send
3369
+ this.clearPending();
3370
+ // Chain onto the queue for strict ordering
3371
+ // Check traceId inside the queue to ensure proper ordering
3372
+ this.flushQueue = this.flushQueue.then(async () => {
3373
+ if (this.traceId === null) {
3374
+ await this.createTrace(traceData);
3375
+ }
3376
+ else {
3377
+ await this.updateTrace(traceData);
3378
+ }
3379
+ }).catch(err => {
3380
+ const operation = isCreateOp ? 'CreateTrace' : 'UpdateTrace';
3381
+ const context = traceName ? ` (trace: ${traceName})` : '';
3382
+ console.error(`[ParallaxTrace] Flush error during ${operation}${context}:`, err);
3383
+ });
3384
+ }
3385
+ /**
3386
+ * Build TraceData from pending state
3387
+ */
3388
+ buildTraceData() {
3389
+ const traceData = new parallax_gateway_pbExports.TraceData();
3390
+ // Add pending attributes (+ client metadata on first flush)
3391
+ const allAttrs = { ...this.pendingAttributes };
3392
+ if (this.traceId === null && this.includeClientMeta) {
3393
+ const clientMeta = getClientMetadata();
3394
+ for (const [key, value] of Object.entries(clientMeta)) {
3395
+ allAttrs[`client.${key}`] = value;
3396
+ }
2235
3397
  }
2236
- // Add client metadata if requested
2237
- if (this.includeClientMeta) {
2238
- const clientMetadata = getClientMetadata();
2239
- for (const [key, value] of Object.entries(clientMetadata)) {
2240
- attrsMap.set(`client.${key}`, value);
3398
+ if (Object.keys(allAttrs).length > 0) {
3399
+ const attrsMsg = new parallax_gateway_pbExports.Attributes();
3400
+ const attrsMap = attrsMsg.getAttributesMap();
3401
+ for (const [key, value] of Object.entries(allAttrs)) {
3402
+ attrsMap.set(key, value);
2241
3403
  }
3404
+ traceData.addAttributes(attrsMsg);
3405
+ }
3406
+ // Add pending tags
3407
+ if (this.pendingTags.length > 0) {
3408
+ const tagsMsg = new parallax_gateway_pbExports.Tags();
3409
+ tagsMsg.setTagsList(this.pendingTags);
3410
+ traceData.addTags(tagsMsg);
2242
3411
  }
2243
- // Add events
2244
- const eventsList = [];
2245
- for (const event of this.events) {
3412
+ // Add pending events
3413
+ for (const event of this.pendingEvents) {
2246
3414
  const eventMsg = new parallax_gateway_pbExports.Event();
2247
3415
  eventMsg.setName(event.eventName);
2248
3416
  if (event.details) {
2249
3417
  eventMsg.setDetails(event.details);
2250
3418
  }
2251
- const timestamp = new timestamp_pbExports.Timestamp();
2252
- timestamp.fromDate(event.timestamp);
2253
- eventMsg.setTimestamp(timestamp);
2254
- eventsList.push(eventMsg);
3419
+ const ts = new timestamp_pbExports.Timestamp();
3420
+ ts.fromDate(event.timestamp);
3421
+ eventMsg.setTimestamp(ts);
3422
+ traceData.addEvents(eventMsg);
3423
+ }
3424
+ // Add pending tx hints
3425
+ for (const hint of this.pendingTxHashHints) {
3426
+ const hintMsg = new parallax_gateway_pbExports.TxHashHint();
3427
+ hintMsg.setTxHash(hint.txHash);
3428
+ hintMsg.setChain(CHAIN_MAP[hint.chain]);
3429
+ if (hint.details) {
3430
+ hintMsg.setDetails(hint.details);
3431
+ }
3432
+ const ts = new timestamp_pbExports.Timestamp();
3433
+ ts.fromDate(hint.timestamp);
3434
+ hintMsg.setTimestamp(ts);
3435
+ traceData.addTxHashHints(hintMsg);
2255
3436
  }
2256
- request.setEventsList(eventsList);
2257
- // Add transaction hash hint if present
2258
- if (this.txHashHint) {
2259
- const txHint = new parallax_gateway_pbExports.TxHashHint();
2260
- txHint.setTxHash(this.txHashHint.txHash);
2261
- txHint.setChain(CHAIN_MAP[this.txHashHint.chain]);
2262
- if (this.txHashHint.details) {
2263
- txHint.setDetails(this.txHashHint.details);
3437
+ return traceData;
3438
+ }
3439
+ /**
3440
+ * Sleep for the specified duration
3441
+ */
3442
+ sleep(ms) {
3443
+ return new Promise(resolve => setTimeout(resolve, ms));
3444
+ }
3445
+ /**
3446
+ * Execute an operation with exponential backoff retry
3447
+ */
3448
+ async retryWithBackoff(operation, operationName) {
3449
+ let lastError;
3450
+ for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
3451
+ try {
3452
+ return await operation();
3453
+ }
3454
+ catch (err) {
3455
+ lastError = err;
3456
+ if (attempt < this.maxRetries) {
3457
+ const delay = this.retryBackoff * Math.pow(2, attempt);
3458
+ console.warn(`[ParallaxTrace] ${operationName} failed, retrying in ${delay}ms (attempt ${attempt + 1}/${this.maxRetries})`);
3459
+ await this.sleep(delay);
3460
+ }
3461
+ }
3462
+ }
3463
+ throw lastError;
3464
+ }
3465
+ /**
3466
+ * Send CreateTrace request
3467
+ */
3468
+ async createTrace(traceData) {
3469
+ const request = new parallax_gateway_pbExports.CreateTraceRequest();
3470
+ if (this.name) {
3471
+ request.setName(this.name);
3472
+ }
3473
+ request.setData(traceData);
3474
+ try {
3475
+ const response = await this.retryWithBackoff(() => this.client._sendTrace(request), 'CreateTrace');
3476
+ if (response.getStatus()?.getCode() === status_pbExports.ResponseStatus.StatusCode.STATUS_CODE_SUCCESS) {
3477
+ this.traceId = response.getTraceId();
3478
+ }
3479
+ else {
3480
+ console.error('[ParallaxTrace] CreateTrace failed:', response.getStatus()?.getErrorMessage());
2264
3481
  }
2265
- const timestamp = new timestamp_pbExports.Timestamp();
2266
- timestamp.fromDate(this.txHashHint.timestamp);
2267
- txHint.setTimestamp(timestamp);
2268
- request.setTxHashHint(txHint);
2269
3482
  }
3483
+ catch (err) {
3484
+ console.error('[ParallaxTrace] CreateTrace error after retries:', err);
3485
+ }
3486
+ }
3487
+ /**
3488
+ * Send UpdateTrace request
3489
+ */
3490
+ async updateTrace(traceData) {
3491
+ const request = new parallax_gateway_pbExports.UpdateTraceRequest();
3492
+ request.setTraceId(this.traceId);
3493
+ request.setData(traceData);
2270
3494
  try {
2271
- const response = await this.client._sendTrace(request);
2272
- const responseStatus = response.getStatus();
2273
- if (responseStatus?.getCode() !== status_pbExports.ResponseStatus.StatusCode.STATUS_CODE_SUCCESS) {
2274
- console.log('[ParallaxTrace] Error:', responseStatus?.getErrorMessage() || 'Unknown error');
2275
- return undefined;
3495
+ const response = await this.retryWithBackoff(() => this.client._updateTrace(request), 'UpdateTrace');
3496
+ if (response.getStatus()?.getCode() !== status_pbExports.ResponseStatus.StatusCode.STATUS_CODE_SUCCESS) {
3497
+ console.error('[ParallaxTrace] UpdateTrace failed:', response.getStatus()?.getErrorMessage());
2276
3498
  }
2277
- return response.getTraceId();
2278
3499
  }
2279
- catch (error) {
2280
- console.log('[ParallaxTrace] Error creating trace:', error);
2281
- return undefined;
3500
+ catch (err) {
3501
+ console.error('[ParallaxTrace] UpdateTrace error after retries:', err);
2282
3502
  }
2283
3503
  }
3504
+ /**
3505
+ * Clear all pending data
3506
+ */
3507
+ clearPending() {
3508
+ this.pendingAttributes = {};
3509
+ this.pendingTags = [];
3510
+ this.pendingEvents = [];
3511
+ this.pendingTxHashHints = [];
3512
+ }
3513
+ /**
3514
+ * Get the trace ID (available after first flush completes)
3515
+ * @returns The trace ID or null if not yet created
3516
+ */
3517
+ getTraceId() {
3518
+ return this.traceId;
3519
+ }
2284
3520
  }
2285
3521
 
2286
- const DEFAULT_API_URL = 'https://parallax-gateway.dev.mirador.org:443';
3522
+ // Default configuration values
3523
+ const DEFAULT_API_URL = 'https://parallax-gateway-dev.mirador.org:443';
3524
+ const DEFAULT_AUTO_FLUSH = true;
3525
+ const DEFAULT_FLUSH_PERIOD_MS = 50;
3526
+ const DEFAULT_INCLUDE_CLIENT_META = true;
3527
+ const DEFAULT_MAX_RETRIES = 3;
3528
+ const DEFAULT_RETRY_BACKOFF = 1000;
2287
3529
  /**
2288
3530
  * Main client for interacting with the Parallax Gateway API
2289
3531
  */
@@ -2291,9 +3533,9 @@ class ParallaxClient {
2291
3533
  /**
2292
3534
  * Create a new ParallaxClient instance
2293
3535
  * @param apiKey Required API key for authentication (sent as x-parallax-api-key header)
2294
- * @param apiUrl Optional gateway URL (defaults to parallax-gateway.dev.mirador.org:443)
3536
+ * @param options Optional configuration options
2295
3537
  */
2296
- constructor(apiKey, apiUrl) {
3538
+ constructor(apiKey, options) {
2297
3539
  Object.defineProperty(this, "apiUrl", {
2298
3540
  enumerable: true,
2299
3541
  configurable: true,
@@ -2313,42 +3555,35 @@ class ParallaxClient {
2313
3555
  value: void 0
2314
3556
  });
2315
3557
  this.apiKey = apiKey;
2316
- this.apiUrl = apiUrl || DEFAULT_API_URL;
2317
- // API key is required - always include in credentials
3558
+ this.apiUrl = options?.apiUrl || DEFAULT_API_URL;
2318
3559
  const credentials = { 'x-parallax-api-key': apiKey };
2319
- // Initialize the gRPC-Web client
2320
3560
  this.client = new ParallaxGatewayServiceClient(this.apiUrl, credentials);
2321
3561
  }
2322
- /**
2323
- * Internal method to send trace to gateway
2324
- * @internal
2325
- */
3562
+ /** @internal */
2326
3563
  async _sendTrace(request) {
2327
3564
  const metadata = { 'x-parallax-api-key': this.apiKey };
2328
3565
  return await this.client.createTrace(request, metadata);
2329
3566
  }
3567
+ /** @internal */
3568
+ async _updateTrace(request) {
3569
+ const metadata = { 'x-parallax-api-key': this.apiKey };
3570
+ return await this.client.updateTrace(request, metadata);
3571
+ }
2330
3572
  /**
2331
3573
  * Create a new trace builder
2332
3574
  *
2333
- * Example usage:
2334
- * ```typescript
2335
- * const response = await client.trace("swap_execution")
2336
- * .addAttribute("user", "0xabc...")
2337
- * .addAttribute("slippage_bps", 25)
2338
- * .addTag("dex")
2339
- * .addTag("swap")
2340
- * .addEvent("wallet_connected", { wallet: "MetaMask" })
2341
- * .addEvent("quote_received")
2342
- * .setTxHint("0x123...", "ethereum")
2343
- * .create();
2344
- * ```
2345
- *
2346
- * @param name Optional name of the trace (defaults to empty string)
2347
- * @param includeClientMeta Optional flag to automatically include client metadata
3575
+ * @param options Trace configuration options
2348
3576
  * @returns A ParallaxTrace builder instance
2349
3577
  */
2350
- trace(name = '', includeClientMeta = true) {
2351
- return new ParallaxTrace(this, name, includeClientMeta);
3578
+ trace(options) {
3579
+ return new ParallaxTrace(this, {
3580
+ name: options?.name,
3581
+ autoFlush: options?.autoFlush ?? DEFAULT_AUTO_FLUSH,
3582
+ flushPeriodMs: options?.flushPeriodMs ?? DEFAULT_FLUSH_PERIOD_MS,
3583
+ includeClientMeta: options?.includeClientMeta ?? DEFAULT_INCLUDE_CLIENT_META,
3584
+ maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES,
3585
+ retryBackoff: options?.retryBackoff ?? DEFAULT_RETRY_BACKOFF,
3586
+ });
2352
3587
  }
2353
3588
  }
2354
3589