@miradorlabs/parallax-web 1.0.4 → 1.0.7

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
@@ -702,22 +702,10 @@ function requireParallax_gateway_pb () {
702
702
  goog.object.extend(proto, google_protobuf_timestamp_pb);
703
703
  var proto_common_v1_status_pb = requireStatus_pb();
704
704
  goog.object.extend(proto, proto_common_v1_status_pb);
705
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanErrorRequest', null, global);
706
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanErrorResponse', null, global);
707
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanEventRequest', null, global);
708
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanEventResponse', null, global);
709
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest', null, global);
710
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction', null, global);
711
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase', null, global);
712
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintResponse', null, global);
713
705
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest', null, global);
706
+ goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest.Event', null, global);
707
+ goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint', null, global);
714
708
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceResponse', null, global);
715
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest', null, global);
716
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus', null, global);
717
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode', null, global);
718
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanResponse', null, global);
719
- goog.exportSymbol('proto.gateway.parallax.v1.StartSpanRequest', null, global);
720
- goog.exportSymbol('proto.gateway.parallax.v1.StartSpanResponse', null, global);
721
709
  /**
722
710
  * Generated by JsPbCodeGenerator.
723
711
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -749,226 +737,16 @@ function requireParallax_gateway_pb () {
749
737
  * @extends {jspb.Message}
750
738
  * @constructor
751
739
  */
752
- proto.gateway.parallax.v1.CreateTraceResponse = function(opt_data) {
753
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
754
- };
755
- goog.inherits(proto.gateway.parallax.v1.CreateTraceResponse, jspb.Message);
756
- if (goog.DEBUG && !COMPILED) {
757
- /**
758
- * @public
759
- * @override
760
- */
761
- proto.gateway.parallax.v1.CreateTraceResponse.displayName = 'proto.gateway.parallax.v1.CreateTraceResponse';
762
- }
763
- /**
764
- * Generated by JsPbCodeGenerator.
765
- * @param {Array=} opt_data Optional initial data array, typically from a
766
- * server response, or constructed directly in Javascript. The array is used
767
- * in place and becomes part of the constructed object. It is not cloned.
768
- * If no data is provided, the constructed object will be empty, but still
769
- * valid.
770
- * @extends {jspb.Message}
771
- * @constructor
772
- */
773
- proto.gateway.parallax.v1.StartSpanRequest = function(opt_data) {
774
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
775
- };
776
- goog.inherits(proto.gateway.parallax.v1.StartSpanRequest, jspb.Message);
777
- if (goog.DEBUG && !COMPILED) {
778
- /**
779
- * @public
780
- * @override
781
- */
782
- proto.gateway.parallax.v1.StartSpanRequest.displayName = 'proto.gateway.parallax.v1.StartSpanRequest';
783
- }
784
- /**
785
- * Generated by JsPbCodeGenerator.
786
- * @param {Array=} opt_data Optional initial data array, typically from a
787
- * server response, or constructed directly in Javascript. The array is used
788
- * in place and becomes part of the constructed object. It is not cloned.
789
- * If no data is provided, the constructed object will be empty, but still
790
- * valid.
791
- * @extends {jspb.Message}
792
- * @constructor
793
- */
794
- proto.gateway.parallax.v1.StartSpanResponse = function(opt_data) {
795
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
796
- };
797
- goog.inherits(proto.gateway.parallax.v1.StartSpanResponse, jspb.Message);
798
- if (goog.DEBUG && !COMPILED) {
799
- /**
800
- * @public
801
- * @override
802
- */
803
- proto.gateway.parallax.v1.StartSpanResponse.displayName = 'proto.gateway.parallax.v1.StartSpanResponse';
804
- }
805
- /**
806
- * Generated by JsPbCodeGenerator.
807
- * @param {Array=} opt_data Optional initial data array, typically from a
808
- * server response, or constructed directly in Javascript. The array is used
809
- * in place and becomes part of the constructed object. It is not cloned.
810
- * If no data is provided, the constructed object will be empty, but still
811
- * valid.
812
- * @extends {jspb.Message}
813
- * @constructor
814
- */
815
- proto.gateway.parallax.v1.FinishSpanRequest = function(opt_data) {
816
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
817
- };
818
- goog.inherits(proto.gateway.parallax.v1.FinishSpanRequest, jspb.Message);
819
- if (goog.DEBUG && !COMPILED) {
820
- /**
821
- * @public
822
- * @override
823
- */
824
- proto.gateway.parallax.v1.FinishSpanRequest.displayName = 'proto.gateway.parallax.v1.FinishSpanRequest';
825
- }
826
- /**
827
- * Generated by JsPbCodeGenerator.
828
- * @param {Array=} opt_data Optional initial data array, typically from a
829
- * server response, or constructed directly in Javascript. The array is used
830
- * in place and becomes part of the constructed object. It is not cloned.
831
- * If no data is provided, the constructed object will be empty, but still
832
- * valid.
833
- * @extends {jspb.Message}
834
- * @constructor
835
- */
836
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus = function(opt_data) {
837
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
838
- };
839
- goog.inherits(proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus, jspb.Message);
840
- if (goog.DEBUG && !COMPILED) {
841
- /**
842
- * @public
843
- * @override
844
- */
845
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.displayName = 'proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus';
846
- }
847
- /**
848
- * Generated by JsPbCodeGenerator.
849
- * @param {Array=} opt_data Optional initial data array, typically from a
850
- * server response, or constructed directly in Javascript. The array is used
851
- * in place and becomes part of the constructed object. It is not cloned.
852
- * If no data is provided, the constructed object will be empty, but still
853
- * valid.
854
- * @extends {jspb.Message}
855
- * @constructor
856
- */
857
- proto.gateway.parallax.v1.FinishSpanResponse = function(opt_data) {
858
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
859
- };
860
- goog.inherits(proto.gateway.parallax.v1.FinishSpanResponse, jspb.Message);
861
- if (goog.DEBUG && !COMPILED) {
862
- /**
863
- * @public
864
- * @override
865
- */
866
- proto.gateway.parallax.v1.FinishSpanResponse.displayName = 'proto.gateway.parallax.v1.FinishSpanResponse';
867
- }
868
- /**
869
- * Generated by JsPbCodeGenerator.
870
- * @param {Array=} opt_data Optional initial data array, typically from a
871
- * server response, or constructed directly in Javascript. The array is used
872
- * in place and becomes part of the constructed object. It is not cloned.
873
- * If no data is provided, the constructed object will be empty, but still
874
- * valid.
875
- * @extends {jspb.Message}
876
- * @constructor
877
- */
878
- proto.gateway.parallax.v1.AddSpanEventRequest = function(opt_data) {
879
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
880
- };
881
- goog.inherits(proto.gateway.parallax.v1.AddSpanEventRequest, jspb.Message);
882
- if (goog.DEBUG && !COMPILED) {
883
- /**
884
- * @public
885
- * @override
886
- */
887
- proto.gateway.parallax.v1.AddSpanEventRequest.displayName = 'proto.gateway.parallax.v1.AddSpanEventRequest';
888
- }
889
- /**
890
- * Generated by JsPbCodeGenerator.
891
- * @param {Array=} opt_data Optional initial data array, typically from a
892
- * server response, or constructed directly in Javascript. The array is used
893
- * in place and becomes part of the constructed object. It is not cloned.
894
- * If no data is provided, the constructed object will be empty, but still
895
- * valid.
896
- * @extends {jspb.Message}
897
- * @constructor
898
- */
899
- proto.gateway.parallax.v1.AddSpanEventResponse = function(opt_data) {
900
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
901
- };
902
- goog.inherits(proto.gateway.parallax.v1.AddSpanEventResponse, jspb.Message);
903
- if (goog.DEBUG && !COMPILED) {
904
- /**
905
- * @public
906
- * @override
907
- */
908
- proto.gateway.parallax.v1.AddSpanEventResponse.displayName = 'proto.gateway.parallax.v1.AddSpanEventResponse';
909
- }
910
- /**
911
- * Generated by JsPbCodeGenerator.
912
- * @param {Array=} opt_data Optional initial data array, typically from a
913
- * server response, or constructed directly in Javascript. The array is used
914
- * in place and becomes part of the constructed object. It is not cloned.
915
- * If no data is provided, the constructed object will be empty, but still
916
- * valid.
917
- * @extends {jspb.Message}
918
- * @constructor
919
- */
920
- proto.gateway.parallax.v1.AddSpanErrorRequest = function(opt_data) {
921
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
922
- };
923
- goog.inherits(proto.gateway.parallax.v1.AddSpanErrorRequest, jspb.Message);
924
- if (goog.DEBUG && !COMPILED) {
925
- /**
926
- * @public
927
- * @override
928
- */
929
- proto.gateway.parallax.v1.AddSpanErrorRequest.displayName = 'proto.gateway.parallax.v1.AddSpanErrorRequest';
930
- }
931
- /**
932
- * Generated by JsPbCodeGenerator.
933
- * @param {Array=} opt_data Optional initial data array, typically from a
934
- * server response, or constructed directly in Javascript. The array is used
935
- * in place and becomes part of the constructed object. It is not cloned.
936
- * If no data is provided, the constructed object will be empty, but still
937
- * valid.
938
- * @extends {jspb.Message}
939
- * @constructor
940
- */
941
- proto.gateway.parallax.v1.AddSpanErrorResponse = function(opt_data) {
740
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint = function(opt_data) {
942
741
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
943
742
  };
944
- goog.inherits(proto.gateway.parallax.v1.AddSpanErrorResponse, jspb.Message);
945
- if (goog.DEBUG && !COMPILED) {
946
- /**
947
- * @public
948
- * @override
949
- */
950
- proto.gateway.parallax.v1.AddSpanErrorResponse.displayName = 'proto.gateway.parallax.v1.AddSpanErrorResponse';
951
- }
952
- /**
953
- * Generated by JsPbCodeGenerator.
954
- * @param {Array=} opt_data Optional initial data array, typically from a
955
- * server response, or constructed directly in Javascript. The array is used
956
- * in place and becomes part of the constructed object. It is not cloned.
957
- * If no data is provided, the constructed object will be empty, but still
958
- * valid.
959
- * @extends {jspb.Message}
960
- * @constructor
961
- */
962
- proto.gateway.parallax.v1.AddSpanHintRequest = function(opt_data) {
963
- jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_);
964
- };
965
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintRequest, jspb.Message);
743
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint, jspb.Message);
966
744
  if (goog.DEBUG && !COMPILED) {
967
745
  /**
968
746
  * @public
969
747
  * @override
970
748
  */
971
- proto.gateway.parallax.v1.AddSpanHintRequest.displayName = 'proto.gateway.parallax.v1.AddSpanHintRequest';
749
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.displayName = 'proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint';
972
750
  }
973
751
  /**
974
752
  * Generated by JsPbCodeGenerator.
@@ -980,16 +758,16 @@ function requireParallax_gateway_pb () {
980
758
  * @extends {jspb.Message}
981
759
  * @constructor
982
760
  */
983
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction = function(opt_data) {
761
+ proto.gateway.parallax.v1.CreateTraceRequest.Event = function(opt_data) {
984
762
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
985
763
  };
986
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction, jspb.Message);
764
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceRequest.Event, jspb.Message);
987
765
  if (goog.DEBUG && !COMPILED) {
988
766
  /**
989
767
  * @public
990
768
  * @override
991
769
  */
992
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.displayName = 'proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction';
770
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.displayName = 'proto.gateway.parallax.v1.CreateTraceRequest.Event';
993
771
  }
994
772
  /**
995
773
  * Generated by JsPbCodeGenerator.
@@ -1001,16 +779,16 @@ function requireParallax_gateway_pb () {
1001
779
  * @extends {jspb.Message}
1002
780
  * @constructor
1003
781
  */
1004
- proto.gateway.parallax.v1.AddSpanHintResponse = function(opt_data) {
782
+ proto.gateway.parallax.v1.CreateTraceResponse = function(opt_data) {
1005
783
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1006
784
  };
1007
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintResponse, jspb.Message);
785
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceResponse, jspb.Message);
1008
786
  if (goog.DEBUG && !COMPILED) {
1009
787
  /**
1010
788
  * @public
1011
789
  * @override
1012
790
  */
1013
- proto.gateway.parallax.v1.AddSpanHintResponse.displayName = 'proto.gateway.parallax.v1.AddSpanHintResponse';
791
+ proto.gateway.parallax.v1.CreateTraceResponse.displayName = 'proto.gateway.parallax.v1.CreateTraceResponse';
1014
792
  }
1015
793
 
1016
794
  /**
@@ -1018,7 +796,7 @@ function requireParallax_gateway_pb () {
1018
796
  * @private {!Array<number>}
1019
797
  * @const
1020
798
  */
1021
- proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_ = [3];
799
+ proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_ = [3,4];
1022
800
 
1023
801
 
1024
802
 
@@ -1053,7 +831,10 @@ function requireParallax_gateway_pb () {
1053
831
  var f, obj = {
1054
832
  name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1055
833
  attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
1056
- tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f
834
+ tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
835
+ eventsList: jspb.Message.toObjectList(msg.getEventsList(),
836
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject, includeInstance),
837
+ txHashHint: (f = msg.getTxHashHint()) && proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject(includeInstance, f)
1057
838
  };
1058
839
 
1059
840
  if (includeInstance) {
@@ -1104,6 +885,16 @@ function requireParallax_gateway_pb () {
1104
885
  var value = /** @type {string} */ (reader.readString());
1105
886
  msg.addTags(value);
1106
887
  break;
888
+ case 4:
889
+ var value = new proto.gateway.parallax.v1.CreateTraceRequest.Event;
890
+ reader.readMessage(value,proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader);
891
+ msg.addEvents(value);
892
+ break;
893
+ case 5:
894
+ var value = new proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint;
895
+ reader.readMessage(value,proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader);
896
+ msg.setTxHashHint(value);
897
+ break;
1107
898
  default:
1108
899
  reader.skipField();
1109
900
  break;
@@ -1151,1837 +942,91 @@ function requireParallax_gateway_pb () {
1151
942
  f
1152
943
  );
1153
944
  }
945
+ f = message.getEventsList();
946
+ if (f.length > 0) {
947
+ writer.writeRepeatedMessage(
948
+ 4,
949
+ f,
950
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter
951
+ );
952
+ }
953
+ f = message.getTxHashHint();
954
+ if (f != null) {
955
+ writer.writeMessage(
956
+ 5,
957
+ f,
958
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter
959
+ );
960
+ }
1154
961
  };
1155
962
 
1156
963
 
1157
- /**
1158
- * optional string name = 1;
1159
- * @return {string}
1160
- */
1161
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
1162
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1163
- };
1164
964
 
1165
965
 
966
+
967
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1166
968
  /**
1167
- * @param {string} value
1168
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
969
+ * Creates an object representation of this proto.
970
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
971
+ * Optional fields that are not set will be set to undefined.
972
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
973
+ * For the list of reserved names please see:
974
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
975
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
976
+ * JSPB instance for transitional soy proto support:
977
+ * http://goto/soy-param-migration
978
+ * @return {!Object}
1169
979
  */
1170
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
1171
- return jspb.Message.setProto3StringField(this, 1, value);
980
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.toObject = function(opt_includeInstance) {
981
+ return proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject(opt_includeInstance, this);
1172
982
  };
1173
983
 
1174
984
 
1175
985
  /**
1176
- * map<string, string> attributes = 2;
1177
- * @param {boolean=} opt_noLazyCreate Do not create the map if
1178
- * empty, instead returning `undefined`
1179
- * @return {!jspb.Map<string,string>}
986
+ * Static version of the {@see toObject} method.
987
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
988
+ * the JSPB instance for transitional soy proto support:
989
+ * http://goto/soy-param-migration
990
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} msg The msg instance to transform.
991
+ * @return {!Object}
992
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1180
993
  */
1181
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1182
- return /** @type {!jspb.Map<string,string>} */ (
1183
- jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1184
- null));
994
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject = function(includeInstance, msg) {
995
+ var f, obj = {
996
+ chainId: jspb.Message.getFieldWithDefault(msg, 1, ""),
997
+ txHash: jspb.Message.getFieldWithDefault(msg, 2, ""),
998
+ details: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
999
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1000
+ };
1001
+
1002
+ if (includeInstance) {
1003
+ obj.$jspbMessageInstance = msg;
1004
+ }
1005
+ return obj;
1185
1006
  };
1007
+ }
1186
1008
 
1187
1009
 
1188
1010
  /**
1189
- * Clears values from the map. The map will be non-null.
1190
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1011
+ * Deserializes binary data (in protobuf wire format).
1012
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1013
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
1191
1014
  */
1192
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearAttributesMap = function() {
1193
- this.getAttributesMap().clear();
1194
- return this;
1195
- };
1196
-
1197
-
1198
- /**
1199
- * repeated string tags = 3;
1200
- * @return {!Array<string>}
1201
- */
1202
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTagsList = function() {
1203
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
1204
- };
1205
-
1206
-
1207
- /**
1208
- * @param {!Array<string>} value
1209
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1210
- */
1211
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTagsList = function(value) {
1212
- return jspb.Message.setField(this, 3, value || []);
1213
- };
1214
-
1215
-
1216
- /**
1217
- * @param {string} value
1218
- * @param {number=} opt_index
1219
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1220
- */
1221
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.addTags = function(value, opt_index) {
1222
- return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
1223
- };
1224
-
1225
-
1226
- /**
1227
- * Clears the list making it empty but non-null.
1228
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1229
- */
1230
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTagsList = function() {
1231
- return this.setTagsList([]);
1232
- };
1233
-
1234
-
1235
-
1236
-
1237
-
1238
- if (jspb.Message.GENERATE_TO_OBJECT) {
1239
- /**
1240
- * Creates an object representation of this proto.
1241
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1242
- * Optional fields that are not set will be set to undefined.
1243
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1244
- * For the list of reserved names please see:
1245
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1246
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1247
- * JSPB instance for transitional soy proto support:
1248
- * http://goto/soy-param-migration
1249
- * @return {!Object}
1250
- */
1251
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1252
- return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
1253
- };
1254
-
1255
-
1256
- /**
1257
- * Static version of the {@see toObject} method.
1258
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1259
- * the JSPB instance for transitional soy proto support:
1260
- * http://goto/soy-param-migration
1261
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
1262
- * @return {!Object}
1263
- * @suppress {unusedLocalVariables} f is only used for nested messages
1264
- */
1265
- proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
1266
- var f, obj = {
1267
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1268
- traceId: jspb.Message.getFieldWithDefault(msg, 2, "")
1269
- };
1270
-
1271
- if (includeInstance) {
1272
- obj.$jspbMessageInstance = msg;
1273
- }
1274
- return obj;
1275
- };
1276
- }
1277
-
1278
-
1279
- /**
1280
- * Deserializes binary data (in protobuf wire format).
1281
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1282
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1283
- */
1284
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
1285
- var reader = new jspb.BinaryReader(bytes);
1286
- var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1287
- return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
1288
- };
1289
-
1290
-
1291
- /**
1292
- * Deserializes binary data (in protobuf wire format) from the
1293
- * given reader into the given message object.
1294
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
1295
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1296
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1297
- */
1298
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
1299
- while (reader.nextField()) {
1300
- if (reader.isEndGroup()) {
1301
- break;
1302
- }
1303
- var field = reader.getFieldNumber();
1304
- switch (field) {
1305
- case 1:
1306
- var value = new proto_common_v1_status_pb.ResponseStatus;
1307
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1308
- msg.setStatus(value);
1309
- break;
1310
- case 2:
1311
- var value = /** @type {string} */ (reader.readString());
1312
- msg.setTraceId(value);
1313
- break;
1314
- default:
1315
- reader.skipField();
1316
- break;
1317
- }
1318
- }
1319
- return msg;
1320
- };
1321
-
1322
-
1323
- /**
1324
- * Serializes the message to binary data (in protobuf wire format).
1325
- * @return {!Uint8Array}
1326
- */
1327
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
1328
- var writer = new jspb.BinaryWriter();
1329
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
1330
- return writer.getResultBuffer();
1331
- };
1332
-
1333
-
1334
- /**
1335
- * Serializes the given message to binary data (in protobuf wire
1336
- * format), writing to the given BinaryWriter.
1337
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
1338
- * @param {!jspb.BinaryWriter} writer
1339
- * @suppress {unusedLocalVariables} f is only used for nested messages
1340
- */
1341
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
1342
- var f = undefined;
1343
- f = message.getStatus();
1344
- if (f != null) {
1345
- writer.writeMessage(
1346
- 1,
1347
- f,
1348
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1349
- );
1350
- }
1351
- f = message.getTraceId();
1352
- if (f.length > 0) {
1353
- writer.writeString(
1354
- 2,
1355
- f
1356
- );
1357
- }
1358
- };
1359
-
1360
-
1361
- /**
1362
- * optional common.v1.ResponseStatus status = 1;
1363
- * @return {?proto.common.v1.ResponseStatus}
1364
- */
1365
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getStatus = function() {
1366
- return /** @type{?proto.common.v1.ResponseStatus} */ (
1367
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1368
- };
1369
-
1370
-
1371
- /**
1372
- * @param {?proto.common.v1.ResponseStatus|undefined} value
1373
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1374
- */
1375
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setStatus = function(value) {
1376
- return jspb.Message.setWrapperField(this, 1, value);
1377
- };
1378
-
1379
-
1380
- /**
1381
- * Clears the message field making it undefined.
1382
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1383
- */
1384
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.clearStatus = function() {
1385
- return this.setStatus(undefined);
1386
- };
1387
-
1388
-
1389
- /**
1390
- * Returns whether this field is set.
1391
- * @return {boolean}
1392
- */
1393
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.hasStatus = function() {
1394
- return jspb.Message.getField(this, 1) != null;
1395
- };
1396
-
1397
-
1398
- /**
1399
- * optional string trace_id = 2;
1400
- * @return {string}
1401
- */
1402
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getTraceId = function() {
1403
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1404
- };
1405
-
1406
-
1407
- /**
1408
- * @param {string} value
1409
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1410
- */
1411
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setTraceId = function(value) {
1412
- return jspb.Message.setProto3StringField(this, 2, value);
1413
- };
1414
-
1415
-
1416
-
1417
-
1418
-
1419
- if (jspb.Message.GENERATE_TO_OBJECT) {
1420
- /**
1421
- * Creates an object representation of this proto.
1422
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1423
- * Optional fields that are not set will be set to undefined.
1424
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1425
- * For the list of reserved names please see:
1426
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1427
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1428
- * JSPB instance for transitional soy proto support:
1429
- * http://goto/soy-param-migration
1430
- * @return {!Object}
1431
- */
1432
- proto.gateway.parallax.v1.StartSpanRequest.prototype.toObject = function(opt_includeInstance) {
1433
- return proto.gateway.parallax.v1.StartSpanRequest.toObject(opt_includeInstance, this);
1434
- };
1435
-
1436
-
1437
- /**
1438
- * Static version of the {@see toObject} method.
1439
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1440
- * the JSPB instance for transitional soy proto support:
1441
- * http://goto/soy-param-migration
1442
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} msg The msg instance to transform.
1443
- * @return {!Object}
1444
- * @suppress {unusedLocalVariables} f is only used for nested messages
1445
- */
1446
- proto.gateway.parallax.v1.StartSpanRequest.toObject = function(includeInstance, msg) {
1447
- var f, obj = {
1448
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1449
- traceId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1450
- parentSpanId: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
1451
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
1452
- startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1453
- };
1454
-
1455
- if (includeInstance) {
1456
- obj.$jspbMessageInstance = msg;
1457
- }
1458
- return obj;
1459
- };
1460
- }
1461
-
1462
-
1463
- /**
1464
- * Deserializes binary data (in protobuf wire format).
1465
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1466
- * @return {!proto.gateway.parallax.v1.StartSpanRequest}
1467
- */
1468
- proto.gateway.parallax.v1.StartSpanRequest.deserializeBinary = function(bytes) {
1469
- var reader = new jspb.BinaryReader(bytes);
1470
- var msg = new proto.gateway.parallax.v1.StartSpanRequest;
1471
- return proto.gateway.parallax.v1.StartSpanRequest.deserializeBinaryFromReader(msg, reader);
1472
- };
1473
-
1474
-
1475
- /**
1476
- * Deserializes binary data (in protobuf wire format) from the
1477
- * given reader into the given message object.
1478
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} msg The message object to deserialize into.
1479
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1480
- * @return {!proto.gateway.parallax.v1.StartSpanRequest}
1481
- */
1482
- proto.gateway.parallax.v1.StartSpanRequest.deserializeBinaryFromReader = function(msg, reader) {
1483
- while (reader.nextField()) {
1484
- if (reader.isEndGroup()) {
1485
- break;
1486
- }
1487
- var field = reader.getFieldNumber();
1488
- switch (field) {
1489
- case 1:
1490
- var value = /** @type {string} */ (reader.readString());
1491
- msg.setName(value);
1492
- break;
1493
- case 2:
1494
- var value = /** @type {string} */ (reader.readString());
1495
- msg.setTraceId(value);
1496
- break;
1497
- case 3:
1498
- var value = /** @type {string} */ (reader.readString());
1499
- msg.setParentSpanId(value);
1500
- break;
1501
- case 4:
1502
- var value = msg.getAttributesMap();
1503
- reader.readMessage(value, function(message, reader) {
1504
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
1505
- });
1506
- break;
1507
- case 5:
1508
- var value = new google_protobuf_timestamp_pb.Timestamp;
1509
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1510
- msg.setStartTime(value);
1511
- break;
1512
- default:
1513
- reader.skipField();
1514
- break;
1515
- }
1516
- }
1517
- return msg;
1518
- };
1519
-
1520
-
1521
- /**
1522
- * Serializes the message to binary data (in protobuf wire format).
1523
- * @return {!Uint8Array}
1524
- */
1525
- proto.gateway.parallax.v1.StartSpanRequest.prototype.serializeBinary = function() {
1526
- var writer = new jspb.BinaryWriter();
1527
- proto.gateway.parallax.v1.StartSpanRequest.serializeBinaryToWriter(this, writer);
1528
- return writer.getResultBuffer();
1529
- };
1530
-
1531
-
1532
- /**
1533
- * Serializes the given message to binary data (in protobuf wire
1534
- * format), writing to the given BinaryWriter.
1535
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} message
1536
- * @param {!jspb.BinaryWriter} writer
1537
- * @suppress {unusedLocalVariables} f is only used for nested messages
1538
- */
1539
- proto.gateway.parallax.v1.StartSpanRequest.serializeBinaryToWriter = function(message, writer) {
1540
- var f = undefined;
1541
- f = message.getName();
1542
- if (f.length > 0) {
1543
- writer.writeString(
1544
- 1,
1545
- f
1546
- );
1547
- }
1548
- f = message.getTraceId();
1549
- if (f.length > 0) {
1550
- writer.writeString(
1551
- 2,
1552
- f
1553
- );
1554
- }
1555
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
1556
- if (f != null) {
1557
- writer.writeString(
1558
- 3,
1559
- f
1560
- );
1561
- }
1562
- f = message.getAttributesMap(true);
1563
- if (f && f.getLength() > 0) {
1564
- f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
1565
- }
1566
- f = message.getStartTime();
1567
- if (f != null) {
1568
- writer.writeMessage(
1569
- 5,
1570
- f,
1571
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1572
- );
1573
- }
1574
- };
1575
-
1576
-
1577
- /**
1578
- * optional string name = 1;
1579
- * @return {string}
1580
- */
1581
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getName = function() {
1582
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1583
- };
1584
-
1585
-
1586
- /**
1587
- * @param {string} value
1588
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1589
- */
1590
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setName = function(value) {
1591
- return jspb.Message.setProto3StringField(this, 1, value);
1592
- };
1593
-
1594
-
1595
- /**
1596
- * optional string trace_id = 2;
1597
- * @return {string}
1598
- */
1599
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getTraceId = function() {
1600
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1601
- };
1602
-
1603
-
1604
- /**
1605
- * @param {string} value
1606
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1607
- */
1608
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setTraceId = function(value) {
1609
- return jspb.Message.setProto3StringField(this, 2, value);
1610
- };
1611
-
1612
-
1613
- /**
1614
- * optional string parent_span_id = 3;
1615
- * @return {string}
1616
- */
1617
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getParentSpanId = function() {
1618
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1619
- };
1620
-
1621
-
1622
- /**
1623
- * @param {string} value
1624
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1625
- */
1626
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setParentSpanId = function(value) {
1627
- return jspb.Message.setField(this, 3, value);
1628
- };
1629
-
1630
-
1631
- /**
1632
- * Clears the field making it undefined.
1633
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1634
- */
1635
- proto.gateway.parallax.v1.StartSpanRequest.prototype.clearParentSpanId = function() {
1636
- return jspb.Message.setField(this, 3, undefined);
1637
- };
1638
-
1639
-
1640
- /**
1641
- * Returns whether this field is set.
1642
- * @return {boolean}
1643
- */
1644
- proto.gateway.parallax.v1.StartSpanRequest.prototype.hasParentSpanId = function() {
1645
- return jspb.Message.getField(this, 3) != null;
1646
- };
1647
-
1648
-
1649
- /**
1650
- * map<string, string> attributes = 4;
1651
- * @param {boolean=} opt_noLazyCreate Do not create the map if
1652
- * empty, instead returning `undefined`
1653
- * @return {!jspb.Map<string,string>}
1654
- */
1655
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1656
- return /** @type {!jspb.Map<string,string>} */ (
1657
- jspb.Message.getMapField(this, 4, opt_noLazyCreate,
1658
- null));
1659
- };
1660
-
1661
-
1662
- /**
1663
- * Clears values from the map. The map will be non-null.
1664
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1665
- */
1666
- proto.gateway.parallax.v1.StartSpanRequest.prototype.clearAttributesMap = function() {
1667
- this.getAttributesMap().clear();
1668
- return this;
1669
- };
1670
-
1671
-
1672
- /**
1673
- * optional google.protobuf.Timestamp start_time = 5;
1674
- * @return {?proto.google.protobuf.Timestamp}
1675
- */
1676
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getStartTime = function() {
1677
- return /** @type{?proto.google.protobuf.Timestamp} */ (
1678
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
1679
- };
1680
-
1681
-
1682
- /**
1683
- * @param {?proto.google.protobuf.Timestamp|undefined} value
1684
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1685
- */
1686
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setStartTime = function(value) {
1687
- return jspb.Message.setWrapperField(this, 5, value);
1688
- };
1689
-
1690
-
1691
- /**
1692
- * Clears the message field making it undefined.
1693
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1694
- */
1695
- proto.gateway.parallax.v1.StartSpanRequest.prototype.clearStartTime = function() {
1696
- return this.setStartTime(undefined);
1697
- };
1698
-
1699
-
1700
- /**
1701
- * Returns whether this field is set.
1702
- * @return {boolean}
1703
- */
1704
- proto.gateway.parallax.v1.StartSpanRequest.prototype.hasStartTime = function() {
1705
- return jspb.Message.getField(this, 5) != null;
1706
- };
1707
-
1708
-
1709
-
1710
-
1711
-
1712
- if (jspb.Message.GENERATE_TO_OBJECT) {
1713
- /**
1714
- * Creates an object representation of this proto.
1715
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1716
- * Optional fields that are not set will be set to undefined.
1717
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1718
- * For the list of reserved names please see:
1719
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1720
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1721
- * JSPB instance for transitional soy proto support:
1722
- * http://goto/soy-param-migration
1723
- * @return {!Object}
1724
- */
1725
- proto.gateway.parallax.v1.StartSpanResponse.prototype.toObject = function(opt_includeInstance) {
1726
- return proto.gateway.parallax.v1.StartSpanResponse.toObject(opt_includeInstance, this);
1727
- };
1728
-
1729
-
1730
- /**
1731
- * Static version of the {@see toObject} method.
1732
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1733
- * the JSPB instance for transitional soy proto support:
1734
- * http://goto/soy-param-migration
1735
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} msg The msg instance to transform.
1736
- * @return {!Object}
1737
- * @suppress {unusedLocalVariables} f is only used for nested messages
1738
- */
1739
- proto.gateway.parallax.v1.StartSpanResponse.toObject = function(includeInstance, msg) {
1740
- var f, obj = {
1741
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1742
- spanId: jspb.Message.getFieldWithDefault(msg, 2, "")
1743
- };
1744
-
1745
- if (includeInstance) {
1746
- obj.$jspbMessageInstance = msg;
1747
- }
1748
- return obj;
1749
- };
1750
- }
1751
-
1752
-
1753
- /**
1754
- * Deserializes binary data (in protobuf wire format).
1755
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1756
- * @return {!proto.gateway.parallax.v1.StartSpanResponse}
1757
- */
1758
- proto.gateway.parallax.v1.StartSpanResponse.deserializeBinary = function(bytes) {
1759
- var reader = new jspb.BinaryReader(bytes);
1760
- var msg = new proto.gateway.parallax.v1.StartSpanResponse;
1761
- return proto.gateway.parallax.v1.StartSpanResponse.deserializeBinaryFromReader(msg, reader);
1762
- };
1763
-
1764
-
1765
- /**
1766
- * Deserializes binary data (in protobuf wire format) from the
1767
- * given reader into the given message object.
1768
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} msg The message object to deserialize into.
1769
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1770
- * @return {!proto.gateway.parallax.v1.StartSpanResponse}
1771
- */
1772
- proto.gateway.parallax.v1.StartSpanResponse.deserializeBinaryFromReader = function(msg, reader) {
1773
- while (reader.nextField()) {
1774
- if (reader.isEndGroup()) {
1775
- break;
1776
- }
1777
- var field = reader.getFieldNumber();
1778
- switch (field) {
1779
- case 1:
1780
- var value = new proto_common_v1_status_pb.ResponseStatus;
1781
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1782
- msg.setStatus(value);
1783
- break;
1784
- case 2:
1785
- var value = /** @type {string} */ (reader.readString());
1786
- msg.setSpanId(value);
1787
- break;
1788
- default:
1789
- reader.skipField();
1790
- break;
1791
- }
1792
- }
1793
- return msg;
1794
- };
1795
-
1796
-
1797
- /**
1798
- * Serializes the message to binary data (in protobuf wire format).
1799
- * @return {!Uint8Array}
1800
- */
1801
- proto.gateway.parallax.v1.StartSpanResponse.prototype.serializeBinary = function() {
1802
- var writer = new jspb.BinaryWriter();
1803
- proto.gateway.parallax.v1.StartSpanResponse.serializeBinaryToWriter(this, writer);
1804
- return writer.getResultBuffer();
1805
- };
1806
-
1807
-
1808
- /**
1809
- * Serializes the given message to binary data (in protobuf wire
1810
- * format), writing to the given BinaryWriter.
1811
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} message
1812
- * @param {!jspb.BinaryWriter} writer
1813
- * @suppress {unusedLocalVariables} f is only used for nested messages
1814
- */
1815
- proto.gateway.parallax.v1.StartSpanResponse.serializeBinaryToWriter = function(message, writer) {
1816
- var f = undefined;
1817
- f = message.getStatus();
1818
- if (f != null) {
1819
- writer.writeMessage(
1820
- 1,
1821
- f,
1822
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1823
- );
1824
- }
1825
- f = message.getSpanId();
1826
- if (f.length > 0) {
1827
- writer.writeString(
1828
- 2,
1829
- f
1830
- );
1831
- }
1832
- };
1833
-
1834
-
1835
- /**
1836
- * optional common.v1.ResponseStatus status = 1;
1837
- * @return {?proto.common.v1.ResponseStatus}
1838
- */
1839
- proto.gateway.parallax.v1.StartSpanResponse.prototype.getStatus = function() {
1840
- return /** @type{?proto.common.v1.ResponseStatus} */ (
1841
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1842
- };
1843
-
1844
-
1845
- /**
1846
- * @param {?proto.common.v1.ResponseStatus|undefined} value
1847
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1848
- */
1849
- proto.gateway.parallax.v1.StartSpanResponse.prototype.setStatus = function(value) {
1850
- return jspb.Message.setWrapperField(this, 1, value);
1851
- };
1852
-
1853
-
1854
- /**
1855
- * Clears the message field making it undefined.
1856
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1857
- */
1858
- proto.gateway.parallax.v1.StartSpanResponse.prototype.clearStatus = function() {
1859
- return this.setStatus(undefined);
1860
- };
1861
-
1862
-
1863
- /**
1864
- * Returns whether this field is set.
1865
- * @return {boolean}
1866
- */
1867
- proto.gateway.parallax.v1.StartSpanResponse.prototype.hasStatus = function() {
1868
- return jspb.Message.getField(this, 1) != null;
1869
- };
1870
-
1871
-
1872
- /**
1873
- * optional string span_id = 2;
1874
- * @return {string}
1875
- */
1876
- proto.gateway.parallax.v1.StartSpanResponse.prototype.getSpanId = function() {
1877
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1878
- };
1879
-
1880
-
1881
- /**
1882
- * @param {string} value
1883
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1884
- */
1885
- proto.gateway.parallax.v1.StartSpanResponse.prototype.setSpanId = function(value) {
1886
- return jspb.Message.setProto3StringField(this, 2, value);
1887
- };
1888
-
1889
-
1890
-
1891
-
1892
-
1893
- if (jspb.Message.GENERATE_TO_OBJECT) {
1894
- /**
1895
- * Creates an object representation of this proto.
1896
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1897
- * Optional fields that are not set will be set to undefined.
1898
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1899
- * For the list of reserved names please see:
1900
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1901
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1902
- * JSPB instance for transitional soy proto support:
1903
- * http://goto/soy-param-migration
1904
- * @return {!Object}
1905
- */
1906
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.toObject = function(opt_includeInstance) {
1907
- return proto.gateway.parallax.v1.FinishSpanRequest.toObject(opt_includeInstance, this);
1908
- };
1909
-
1910
-
1911
- /**
1912
- * Static version of the {@see toObject} method.
1913
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1914
- * the JSPB instance for transitional soy proto support:
1915
- * http://goto/soy-param-migration
1916
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} msg The msg instance to transform.
1917
- * @return {!Object}
1918
- * @suppress {unusedLocalVariables} f is only used for nested messages
1919
- */
1920
- proto.gateway.parallax.v1.FinishSpanRequest.toObject = function(includeInstance, msg) {
1921
- var f, obj = {
1922
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1923
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1924
- endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1925
- status: (f = msg.getStatus()) && proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject(includeInstance, f)
1926
- };
1927
-
1928
- if (includeInstance) {
1929
- obj.$jspbMessageInstance = msg;
1930
- }
1931
- return obj;
1932
- };
1933
- }
1934
-
1935
-
1936
- /**
1937
- * Deserializes binary data (in protobuf wire format).
1938
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1939
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest}
1940
- */
1941
- proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinary = function(bytes) {
1942
- var reader = new jspb.BinaryReader(bytes);
1943
- var msg = new proto.gateway.parallax.v1.FinishSpanRequest;
1944
- return proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinaryFromReader(msg, reader);
1945
- };
1946
-
1947
-
1948
- /**
1949
- * Deserializes binary data (in protobuf wire format) from the
1950
- * given reader into the given message object.
1951
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} msg The message object to deserialize into.
1952
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1953
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest}
1954
- */
1955
- proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinaryFromReader = function(msg, reader) {
1956
- while (reader.nextField()) {
1957
- if (reader.isEndGroup()) {
1958
- break;
1959
- }
1960
- var field = reader.getFieldNumber();
1961
- switch (field) {
1962
- case 1:
1963
- var value = /** @type {string} */ (reader.readString());
1964
- msg.setTraceId(value);
1965
- break;
1966
- case 2:
1967
- var value = /** @type {string} */ (reader.readString());
1968
- msg.setSpanId(value);
1969
- break;
1970
- case 3:
1971
- var value = new google_protobuf_timestamp_pb.Timestamp;
1972
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1973
- msg.setEndTime(value);
1974
- break;
1975
- case 4:
1976
- var value = new proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus;
1977
- reader.readMessage(value,proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader);
1978
- msg.setStatus(value);
1979
- break;
1980
- default:
1981
- reader.skipField();
1982
- break;
1983
- }
1984
- }
1985
- return msg;
1986
- };
1987
-
1988
-
1989
- /**
1990
- * Serializes the message to binary data (in protobuf wire format).
1991
- * @return {!Uint8Array}
1992
- */
1993
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.serializeBinary = function() {
1994
- var writer = new jspb.BinaryWriter();
1995
- proto.gateway.parallax.v1.FinishSpanRequest.serializeBinaryToWriter(this, writer);
1996
- return writer.getResultBuffer();
1997
- };
1998
-
1999
-
2000
- /**
2001
- * Serializes the given message to binary data (in protobuf wire
2002
- * format), writing to the given BinaryWriter.
2003
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} message
2004
- * @param {!jspb.BinaryWriter} writer
2005
- * @suppress {unusedLocalVariables} f is only used for nested messages
2006
- */
2007
- proto.gateway.parallax.v1.FinishSpanRequest.serializeBinaryToWriter = function(message, writer) {
2008
- var f = undefined;
2009
- f = message.getTraceId();
2010
- if (f.length > 0) {
2011
- writer.writeString(
2012
- 1,
2013
- f
2014
- );
2015
- }
2016
- f = message.getSpanId();
2017
- if (f.length > 0) {
2018
- writer.writeString(
2019
- 2,
2020
- f
2021
- );
2022
- }
2023
- f = message.getEndTime();
2024
- if (f != null) {
2025
- writer.writeMessage(
2026
- 3,
2027
- f,
2028
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2029
- );
2030
- }
2031
- f = message.getStatus();
2032
- if (f != null) {
2033
- writer.writeMessage(
2034
- 4,
2035
- f,
2036
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter
2037
- );
2038
- }
2039
- };
2040
-
2041
-
2042
-
2043
-
2044
-
2045
- if (jspb.Message.GENERATE_TO_OBJECT) {
2046
- /**
2047
- * Creates an object representation of this proto.
2048
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2049
- * Optional fields that are not set will be set to undefined.
2050
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2051
- * For the list of reserved names please see:
2052
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2053
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2054
- * JSPB instance for transitional soy proto support:
2055
- * http://goto/soy-param-migration
2056
- * @return {!Object}
2057
- */
2058
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.toObject = function(opt_includeInstance) {
2059
- return proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject(opt_includeInstance, this);
2060
- };
2061
-
2062
-
2063
- /**
2064
- * Static version of the {@see toObject} method.
2065
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2066
- * the JSPB instance for transitional soy proto support:
2067
- * http://goto/soy-param-migration
2068
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} msg The msg instance to transform.
2069
- * @return {!Object}
2070
- * @suppress {unusedLocalVariables} f is only used for nested messages
2071
- */
2072
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject = function(includeInstance, msg) {
2073
- var f, obj = {
2074
- code: jspb.Message.getFieldWithDefault(msg, 1, 0),
2075
- message: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f
2076
- };
2077
-
2078
- if (includeInstance) {
2079
- obj.$jspbMessageInstance = msg;
2080
- }
2081
- return obj;
2082
- };
2083
- }
2084
-
2085
-
2086
- /**
2087
- * Deserializes binary data (in protobuf wire format).
2088
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2089
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2090
- */
2091
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinary = function(bytes) {
2092
- var reader = new jspb.BinaryReader(bytes);
2093
- var msg = new proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus;
2094
- return proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader(msg, reader);
2095
- };
2096
-
2097
-
2098
- /**
2099
- * Deserializes binary data (in protobuf wire format) from the
2100
- * given reader into the given message object.
2101
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} msg The message object to deserialize into.
2102
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2103
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2104
- */
2105
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader = function(msg, reader) {
2106
- while (reader.nextField()) {
2107
- if (reader.isEndGroup()) {
2108
- break;
2109
- }
2110
- var field = reader.getFieldNumber();
2111
- switch (field) {
2112
- case 1:
2113
- var value = /** @type {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} */ (reader.readEnum());
2114
- msg.setCode(value);
2115
- break;
2116
- case 2:
2117
- var value = /** @type {string} */ (reader.readString());
2118
- msg.setMessage(value);
2119
- break;
2120
- default:
2121
- reader.skipField();
2122
- break;
2123
- }
2124
- }
2125
- return msg;
2126
- };
2127
-
2128
-
2129
- /**
2130
- * Serializes the message to binary data (in protobuf wire format).
2131
- * @return {!Uint8Array}
2132
- */
2133
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.serializeBinary = function() {
2134
- var writer = new jspb.BinaryWriter();
2135
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter(this, writer);
2136
- return writer.getResultBuffer();
2137
- };
2138
-
2139
-
2140
- /**
2141
- * Serializes the given message to binary data (in protobuf wire
2142
- * format), writing to the given BinaryWriter.
2143
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} message
2144
- * @param {!jspb.BinaryWriter} writer
2145
- * @suppress {unusedLocalVariables} f is only used for nested messages
2146
- */
2147
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter = function(message, writer) {
2148
- var f = undefined;
2149
- f = message.getCode();
2150
- if (f !== 0.0) {
2151
- writer.writeEnum(
2152
- 1,
2153
- f
2154
- );
2155
- }
2156
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
2157
- if (f != null) {
2158
- writer.writeString(
2159
- 2,
2160
- f
2161
- );
2162
- }
2163
- };
2164
-
2165
-
2166
- /**
2167
- * @enum {number}
2168
- */
2169
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode = {
2170
- STATUS_CODE_UNSPECIFIED: 0,
2171
- STATUS_CODE_OK: 1,
2172
- STATUS_CODE_ERROR: 2
2173
- };
2174
-
2175
- /**
2176
- * optional StatusCode code = 1;
2177
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode}
2178
- */
2179
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.getCode = function() {
2180
- return /** @type {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2181
- };
2182
-
2183
-
2184
- /**
2185
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} value
2186
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2187
- */
2188
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.setCode = function(value) {
2189
- return jspb.Message.setProto3EnumField(this, 1, value);
2190
- };
2191
-
2192
-
2193
- /**
2194
- * optional string message = 2;
2195
- * @return {string}
2196
- */
2197
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.getMessage = function() {
2198
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2199
- };
2200
-
2201
-
2202
- /**
2203
- * @param {string} value
2204
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2205
- */
2206
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.setMessage = function(value) {
2207
- return jspb.Message.setField(this, 2, value);
2208
- };
2209
-
2210
-
2211
- /**
2212
- * Clears the field making it undefined.
2213
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2214
- */
2215
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.clearMessage = function() {
2216
- return jspb.Message.setField(this, 2, undefined);
2217
- };
2218
-
2219
-
2220
- /**
2221
- * Returns whether this field is set.
2222
- * @return {boolean}
2223
- */
2224
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.hasMessage = function() {
2225
- return jspb.Message.getField(this, 2) != null;
2226
- };
2227
-
2228
-
2229
- /**
2230
- * optional string trace_id = 1;
2231
- * @return {string}
2232
- */
2233
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getTraceId = function() {
2234
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2235
- };
2236
-
2237
-
2238
- /**
2239
- * @param {string} value
2240
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2241
- */
2242
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setTraceId = function(value) {
2243
- return jspb.Message.setProto3StringField(this, 1, value);
2244
- };
2245
-
2246
-
2247
- /**
2248
- * optional string span_id = 2;
2249
- * @return {string}
2250
- */
2251
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getSpanId = function() {
2252
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2253
- };
2254
-
2255
-
2256
- /**
2257
- * @param {string} value
2258
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2259
- */
2260
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setSpanId = function(value) {
2261
- return jspb.Message.setProto3StringField(this, 2, value);
2262
- };
2263
-
2264
-
2265
- /**
2266
- * optional google.protobuf.Timestamp end_time = 3;
2267
- * @return {?proto.google.protobuf.Timestamp}
2268
- */
2269
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getEndTime = function() {
2270
- return /** @type{?proto.google.protobuf.Timestamp} */ (
2271
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
2272
- };
2273
-
2274
-
2275
- /**
2276
- * @param {?proto.google.protobuf.Timestamp|undefined} value
2277
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2278
- */
2279
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setEndTime = function(value) {
2280
- return jspb.Message.setWrapperField(this, 3, value);
2281
- };
2282
-
2283
-
2284
- /**
2285
- * Clears the message field making it undefined.
2286
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2287
- */
2288
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.clearEndTime = function() {
2289
- return this.setEndTime(undefined);
2290
- };
2291
-
2292
-
2293
- /**
2294
- * Returns whether this field is set.
2295
- * @return {boolean}
2296
- */
2297
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.hasEndTime = function() {
2298
- return jspb.Message.getField(this, 3) != null;
2299
- };
2300
-
2301
-
2302
- /**
2303
- * optional SpanStatus status = 4;
2304
- * @return {?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2305
- */
2306
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getStatus = function() {
2307
- return /** @type{?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} */ (
2308
- jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus, 4));
2309
- };
2310
-
2311
-
2312
- /**
2313
- * @param {?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus|undefined} value
2314
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2315
- */
2316
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setStatus = function(value) {
2317
- return jspb.Message.setWrapperField(this, 4, value);
2318
- };
2319
-
2320
-
2321
- /**
2322
- * Clears the message field making it undefined.
2323
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2324
- */
2325
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.clearStatus = function() {
2326
- return this.setStatus(undefined);
2327
- };
2328
-
2329
-
2330
- /**
2331
- * Returns whether this field is set.
2332
- * @return {boolean}
2333
- */
2334
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.hasStatus = function() {
2335
- return jspb.Message.getField(this, 4) != null;
2336
- };
2337
-
2338
-
2339
-
2340
-
2341
-
2342
- if (jspb.Message.GENERATE_TO_OBJECT) {
2343
- /**
2344
- * Creates an object representation of this proto.
2345
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2346
- * Optional fields that are not set will be set to undefined.
2347
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2348
- * For the list of reserved names please see:
2349
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2350
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2351
- * JSPB instance for transitional soy proto support:
2352
- * http://goto/soy-param-migration
2353
- * @return {!Object}
2354
- */
2355
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.toObject = function(opt_includeInstance) {
2356
- return proto.gateway.parallax.v1.FinishSpanResponse.toObject(opt_includeInstance, this);
2357
- };
2358
-
2359
-
2360
- /**
2361
- * Static version of the {@see toObject} method.
2362
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2363
- * the JSPB instance for transitional soy proto support:
2364
- * http://goto/soy-param-migration
2365
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} msg The msg instance to transform.
2366
- * @return {!Object}
2367
- * @suppress {unusedLocalVariables} f is only used for nested messages
2368
- */
2369
- proto.gateway.parallax.v1.FinishSpanResponse.toObject = function(includeInstance, msg) {
2370
- var f, obj = {
2371
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
2372
- };
2373
-
2374
- if (includeInstance) {
2375
- obj.$jspbMessageInstance = msg;
2376
- }
2377
- return obj;
2378
- };
2379
- }
2380
-
2381
-
2382
- /**
2383
- * Deserializes binary data (in protobuf wire format).
2384
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2385
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse}
2386
- */
2387
- proto.gateway.parallax.v1.FinishSpanResponse.deserializeBinary = function(bytes) {
2388
- var reader = new jspb.BinaryReader(bytes);
2389
- var msg = new proto.gateway.parallax.v1.FinishSpanResponse;
2390
- return proto.gateway.parallax.v1.FinishSpanResponse.deserializeBinaryFromReader(msg, reader);
2391
- };
2392
-
2393
-
2394
- /**
2395
- * Deserializes binary data (in protobuf wire format) from the
2396
- * given reader into the given message object.
2397
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} msg The message object to deserialize into.
2398
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2399
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse}
2400
- */
2401
- proto.gateway.parallax.v1.FinishSpanResponse.deserializeBinaryFromReader = function(msg, reader) {
2402
- while (reader.nextField()) {
2403
- if (reader.isEndGroup()) {
2404
- break;
2405
- }
2406
- var field = reader.getFieldNumber();
2407
- switch (field) {
2408
- case 1:
2409
- var value = new proto_common_v1_status_pb.ResponseStatus;
2410
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2411
- msg.setStatus(value);
2412
- break;
2413
- default:
2414
- reader.skipField();
2415
- break;
2416
- }
2417
- }
2418
- return msg;
2419
- };
2420
-
2421
-
2422
- /**
2423
- * Serializes the message to binary data (in protobuf wire format).
2424
- * @return {!Uint8Array}
2425
- */
2426
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.serializeBinary = function() {
2427
- var writer = new jspb.BinaryWriter();
2428
- proto.gateway.parallax.v1.FinishSpanResponse.serializeBinaryToWriter(this, writer);
2429
- return writer.getResultBuffer();
2430
- };
2431
-
2432
-
2433
- /**
2434
- * Serializes the given message to binary data (in protobuf wire
2435
- * format), writing to the given BinaryWriter.
2436
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} message
2437
- * @param {!jspb.BinaryWriter} writer
2438
- * @suppress {unusedLocalVariables} f is only used for nested messages
2439
- */
2440
- proto.gateway.parallax.v1.FinishSpanResponse.serializeBinaryToWriter = function(message, writer) {
2441
- var f = undefined;
2442
- f = message.getStatus();
2443
- if (f != null) {
2444
- writer.writeMessage(
2445
- 1,
2446
- f,
2447
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2448
- );
2449
- }
2450
- };
2451
-
2452
-
2453
- /**
2454
- * optional common.v1.ResponseStatus status = 1;
2455
- * @return {?proto.common.v1.ResponseStatus}
2456
- */
2457
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.getStatus = function() {
2458
- return /** @type{?proto.common.v1.ResponseStatus} */ (
2459
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
2460
- };
2461
-
2462
-
2463
- /**
2464
- * @param {?proto.common.v1.ResponseStatus|undefined} value
2465
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse} returns this
2466
- */
2467
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.setStatus = function(value) {
2468
- return jspb.Message.setWrapperField(this, 1, value);
2469
- };
2470
-
2471
-
2472
- /**
2473
- * Clears the message field making it undefined.
2474
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse} returns this
2475
- */
2476
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.clearStatus = function() {
2477
- return this.setStatus(undefined);
2478
- };
2479
-
2480
-
2481
- /**
2482
- * Returns whether this field is set.
2483
- * @return {boolean}
2484
- */
2485
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.hasStatus = function() {
2486
- return jspb.Message.getField(this, 1) != null;
2487
- };
2488
-
2489
-
2490
-
2491
-
2492
-
2493
- if (jspb.Message.GENERATE_TO_OBJECT) {
2494
- /**
2495
- * Creates an object representation of this proto.
2496
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2497
- * Optional fields that are not set will be set to undefined.
2498
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2499
- * For the list of reserved names please see:
2500
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2501
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2502
- * JSPB instance for transitional soy proto support:
2503
- * http://goto/soy-param-migration
2504
- * @return {!Object}
2505
- */
2506
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.toObject = function(opt_includeInstance) {
2507
- return proto.gateway.parallax.v1.AddSpanEventRequest.toObject(opt_includeInstance, this);
2508
- };
2509
-
2510
-
2511
- /**
2512
- * Static version of the {@see toObject} method.
2513
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2514
- * the JSPB instance for transitional soy proto support:
2515
- * http://goto/soy-param-migration
2516
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} msg The msg instance to transform.
2517
- * @return {!Object}
2518
- * @suppress {unusedLocalVariables} f is only used for nested messages
2519
- */
2520
- proto.gateway.parallax.v1.AddSpanEventRequest.toObject = function(includeInstance, msg) {
2521
- var f, obj = {
2522
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2523
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
2524
- eventName: jspb.Message.getFieldWithDefault(msg, 3, ""),
2525
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
2526
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2527
- };
2528
-
2529
- if (includeInstance) {
2530
- obj.$jspbMessageInstance = msg;
2531
- }
2532
- return obj;
2533
- };
2534
- }
2535
-
2536
-
2537
- /**
2538
- * Deserializes binary data (in protobuf wire format).
2539
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2540
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest}
2541
- */
2542
- proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinary = function(bytes) {
2543
- var reader = new jspb.BinaryReader(bytes);
2544
- var msg = new proto.gateway.parallax.v1.AddSpanEventRequest;
2545
- return proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinaryFromReader(msg, reader);
2546
- };
2547
-
2548
-
2549
- /**
2550
- * Deserializes binary data (in protobuf wire format) from the
2551
- * given reader into the given message object.
2552
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} msg The message object to deserialize into.
2553
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2554
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest}
2555
- */
2556
- proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinaryFromReader = function(msg, reader) {
2557
- while (reader.nextField()) {
2558
- if (reader.isEndGroup()) {
2559
- break;
2560
- }
2561
- var field = reader.getFieldNumber();
2562
- switch (field) {
2563
- case 1:
2564
- var value = /** @type {string} */ (reader.readString());
2565
- msg.setTraceId(value);
2566
- break;
2567
- case 2:
2568
- var value = /** @type {string} */ (reader.readString());
2569
- msg.setSpanId(value);
2570
- break;
2571
- case 3:
2572
- var value = /** @type {string} */ (reader.readString());
2573
- msg.setEventName(value);
2574
- break;
2575
- case 4:
2576
- var value = msg.getAttributesMap();
2577
- reader.readMessage(value, function(message, reader) {
2578
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
2579
- });
2580
- break;
2581
- case 5:
2582
- var value = new google_protobuf_timestamp_pb.Timestamp;
2583
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2584
- msg.setTimestamp(value);
2585
- break;
2586
- default:
2587
- reader.skipField();
2588
- break;
2589
- }
2590
- }
2591
- return msg;
2592
- };
2593
-
2594
-
2595
- /**
2596
- * Serializes the message to binary data (in protobuf wire format).
2597
- * @return {!Uint8Array}
2598
- */
2599
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.serializeBinary = function() {
2600
- var writer = new jspb.BinaryWriter();
2601
- proto.gateway.parallax.v1.AddSpanEventRequest.serializeBinaryToWriter(this, writer);
2602
- return writer.getResultBuffer();
2603
- };
2604
-
2605
-
2606
- /**
2607
- * Serializes the given message to binary data (in protobuf wire
2608
- * format), writing to the given BinaryWriter.
2609
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} message
2610
- * @param {!jspb.BinaryWriter} writer
2611
- * @suppress {unusedLocalVariables} f is only used for nested messages
2612
- */
2613
- proto.gateway.parallax.v1.AddSpanEventRequest.serializeBinaryToWriter = function(message, writer) {
2614
- var f = undefined;
2615
- f = message.getTraceId();
2616
- if (f.length > 0) {
2617
- writer.writeString(
2618
- 1,
2619
- f
2620
- );
2621
- }
2622
- f = message.getSpanId();
2623
- if (f.length > 0) {
2624
- writer.writeString(
2625
- 2,
2626
- f
2627
- );
2628
- }
2629
- f = message.getEventName();
2630
- if (f.length > 0) {
2631
- writer.writeString(
2632
- 3,
2633
- f
2634
- );
2635
- }
2636
- f = message.getAttributesMap(true);
2637
- if (f && f.getLength() > 0) {
2638
- f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
2639
- }
2640
- f = message.getTimestamp();
2641
- if (f != null) {
2642
- writer.writeMessage(
2643
- 5,
2644
- f,
2645
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2646
- );
2647
- }
2648
- };
2649
-
2650
-
2651
- /**
2652
- * optional string trace_id = 1;
2653
- * @return {string}
2654
- */
2655
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getTraceId = function() {
2656
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2657
- };
2658
-
2659
-
2660
- /**
2661
- * @param {string} value
2662
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2663
- */
2664
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setTraceId = function(value) {
2665
- return jspb.Message.setProto3StringField(this, 1, value);
2666
- };
2667
-
2668
-
2669
- /**
2670
- * optional string span_id = 2;
2671
- * @return {string}
2672
- */
2673
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getSpanId = function() {
2674
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2675
- };
2676
-
2677
-
2678
- /**
2679
- * @param {string} value
2680
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2681
- */
2682
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setSpanId = function(value) {
2683
- return jspb.Message.setProto3StringField(this, 2, value);
2684
- };
2685
-
2686
-
2687
- /**
2688
- * optional string event_name = 3;
2689
- * @return {string}
2690
- */
2691
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getEventName = function() {
2692
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2693
- };
2694
-
2695
-
2696
- /**
2697
- * @param {string} value
2698
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2699
- */
2700
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setEventName = function(value) {
2701
- return jspb.Message.setProto3StringField(this, 3, value);
2702
- };
2703
-
2704
-
2705
- /**
2706
- * map<string, string> attributes = 4;
2707
- * @param {boolean=} opt_noLazyCreate Do not create the map if
2708
- * empty, instead returning `undefined`
2709
- * @return {!jspb.Map<string,string>}
2710
- */
2711
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
2712
- return /** @type {!jspb.Map<string,string>} */ (
2713
- jspb.Message.getMapField(this, 4, opt_noLazyCreate,
2714
- null));
2715
- };
2716
-
2717
-
2718
- /**
2719
- * Clears values from the map. The map will be non-null.
2720
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2721
- */
2722
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.clearAttributesMap = function() {
2723
- this.getAttributesMap().clear();
2724
- return this;
2725
- };
2726
-
2727
-
2728
- /**
2729
- * optional google.protobuf.Timestamp timestamp = 5;
2730
- * @return {?proto.google.protobuf.Timestamp}
2731
- */
2732
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getTimestamp = function() {
2733
- return /** @type{?proto.google.protobuf.Timestamp} */ (
2734
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
2735
- };
2736
-
2737
-
2738
- /**
2739
- * @param {?proto.google.protobuf.Timestamp|undefined} value
2740
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2741
- */
2742
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setTimestamp = function(value) {
2743
- return jspb.Message.setWrapperField(this, 5, value);
2744
- };
2745
-
2746
-
2747
- /**
2748
- * Clears the message field making it undefined.
2749
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2750
- */
2751
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.clearTimestamp = function() {
2752
- return this.setTimestamp(undefined);
2753
- };
2754
-
2755
-
2756
- /**
2757
- * Returns whether this field is set.
2758
- * @return {boolean}
2759
- */
2760
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.hasTimestamp = function() {
2761
- return jspb.Message.getField(this, 5) != null;
2762
- };
2763
-
2764
-
2765
-
2766
-
2767
-
2768
- if (jspb.Message.GENERATE_TO_OBJECT) {
2769
- /**
2770
- * Creates an object representation of this proto.
2771
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2772
- * Optional fields that are not set will be set to undefined.
2773
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2774
- * For the list of reserved names please see:
2775
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2776
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2777
- * JSPB instance for transitional soy proto support:
2778
- * http://goto/soy-param-migration
2779
- * @return {!Object}
2780
- */
2781
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.toObject = function(opt_includeInstance) {
2782
- return proto.gateway.parallax.v1.AddSpanEventResponse.toObject(opt_includeInstance, this);
2783
- };
2784
-
2785
-
2786
- /**
2787
- * Static version of the {@see toObject} method.
2788
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2789
- * the JSPB instance for transitional soy proto support:
2790
- * http://goto/soy-param-migration
2791
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} msg The msg instance to transform.
2792
- * @return {!Object}
2793
- * @suppress {unusedLocalVariables} f is only used for nested messages
2794
- */
2795
- proto.gateway.parallax.v1.AddSpanEventResponse.toObject = function(includeInstance, msg) {
2796
- var f, obj = {
2797
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
2798
- };
2799
-
2800
- if (includeInstance) {
2801
- obj.$jspbMessageInstance = msg;
2802
- }
2803
- return obj;
2804
- };
2805
- }
2806
-
2807
-
2808
- /**
2809
- * Deserializes binary data (in protobuf wire format).
2810
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2811
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse}
2812
- */
2813
- proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinary = function(bytes) {
2814
- var reader = new jspb.BinaryReader(bytes);
2815
- var msg = new proto.gateway.parallax.v1.AddSpanEventResponse;
2816
- return proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinaryFromReader(msg, reader);
2817
- };
2818
-
2819
-
2820
- /**
2821
- * Deserializes binary data (in protobuf wire format) from the
2822
- * given reader into the given message object.
2823
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} msg The message object to deserialize into.
2824
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2825
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse}
2826
- */
2827
- proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinaryFromReader = function(msg, reader) {
2828
- while (reader.nextField()) {
2829
- if (reader.isEndGroup()) {
2830
- break;
2831
- }
2832
- var field = reader.getFieldNumber();
2833
- switch (field) {
2834
- case 1:
2835
- var value = new proto_common_v1_status_pb.ResponseStatus;
2836
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2837
- msg.setStatus(value);
2838
- break;
2839
- default:
2840
- reader.skipField();
2841
- break;
2842
- }
2843
- }
2844
- return msg;
2845
- };
2846
-
2847
-
2848
- /**
2849
- * Serializes the message to binary data (in protobuf wire format).
2850
- * @return {!Uint8Array}
2851
- */
2852
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.serializeBinary = function() {
2853
- var writer = new jspb.BinaryWriter();
2854
- proto.gateway.parallax.v1.AddSpanEventResponse.serializeBinaryToWriter(this, writer);
2855
- return writer.getResultBuffer();
2856
- };
2857
-
2858
-
2859
- /**
2860
- * Serializes the given message to binary data (in protobuf wire
2861
- * format), writing to the given BinaryWriter.
2862
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} message
2863
- * @param {!jspb.BinaryWriter} writer
2864
- * @suppress {unusedLocalVariables} f is only used for nested messages
2865
- */
2866
- proto.gateway.parallax.v1.AddSpanEventResponse.serializeBinaryToWriter = function(message, writer) {
2867
- var f = undefined;
2868
- f = message.getStatus();
2869
- if (f != null) {
2870
- writer.writeMessage(
2871
- 1,
2872
- f,
2873
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2874
- );
2875
- }
2876
- };
2877
-
2878
-
2879
- /**
2880
- * optional common.v1.ResponseStatus status = 1;
2881
- * @return {?proto.common.v1.ResponseStatus}
2882
- */
2883
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.getStatus = function() {
2884
- return /** @type{?proto.common.v1.ResponseStatus} */ (
2885
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
2886
- };
2887
-
2888
-
2889
- /**
2890
- * @param {?proto.common.v1.ResponseStatus|undefined} value
2891
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse} returns this
2892
- */
2893
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.setStatus = function(value) {
2894
- return jspb.Message.setWrapperField(this, 1, value);
2895
- };
2896
-
2897
-
2898
- /**
2899
- * Clears the message field making it undefined.
2900
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse} returns this
2901
- */
2902
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.clearStatus = function() {
2903
- return this.setStatus(undefined);
2904
- };
2905
-
2906
-
2907
- /**
2908
- * Returns whether this field is set.
2909
- * @return {boolean}
2910
- */
2911
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.hasStatus = function() {
2912
- return jspb.Message.getField(this, 1) != null;
2913
- };
2914
-
2915
-
2916
-
2917
-
2918
-
2919
- if (jspb.Message.GENERATE_TO_OBJECT) {
2920
- /**
2921
- * Creates an object representation of this proto.
2922
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2923
- * Optional fields that are not set will be set to undefined.
2924
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2925
- * For the list of reserved names please see:
2926
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2927
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2928
- * JSPB instance for transitional soy proto support:
2929
- * http://goto/soy-param-migration
2930
- * @return {!Object}
2931
- */
2932
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.toObject = function(opt_includeInstance) {
2933
- return proto.gateway.parallax.v1.AddSpanErrorRequest.toObject(opt_includeInstance, this);
2934
- };
2935
-
2936
-
2937
- /**
2938
- * Static version of the {@see toObject} method.
2939
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2940
- * the JSPB instance for transitional soy proto support:
2941
- * http://goto/soy-param-migration
2942
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} msg The msg instance to transform.
2943
- * @return {!Object}
2944
- * @suppress {unusedLocalVariables} f is only used for nested messages
2945
- */
2946
- proto.gateway.parallax.v1.AddSpanErrorRequest.toObject = function(includeInstance, msg) {
2947
- var f, obj = {
2948
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2949
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
2950
- errorType: jspb.Message.getFieldWithDefault(msg, 3, ""),
2951
- message: jspb.Message.getFieldWithDefault(msg, 4, ""),
2952
- stackTrace: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
2953
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
2954
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2955
- };
2956
-
2957
- if (includeInstance) {
2958
- obj.$jspbMessageInstance = msg;
2959
- }
2960
- return obj;
2961
- };
2962
- }
2963
-
2964
-
2965
- /**
2966
- * Deserializes binary data (in protobuf wire format).
2967
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2968
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest}
2969
- */
2970
- proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinary = function(bytes) {
2971
- var reader = new jspb.BinaryReader(bytes);
2972
- var msg = new proto.gateway.parallax.v1.AddSpanErrorRequest;
2973
- return proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinaryFromReader(msg, reader);
1015
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinary = function(bytes) {
1016
+ var reader = new jspb.BinaryReader(bytes);
1017
+ var msg = new proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint;
1018
+ return proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader(msg, reader);
2974
1019
  };
2975
1020
 
2976
1021
 
2977
1022
  /**
2978
1023
  * Deserializes binary data (in protobuf wire format) from the
2979
1024
  * given reader into the given message object.
2980
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} msg The message object to deserialize into.
1025
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} msg The message object to deserialize into.
2981
1026
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2982
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest}
1027
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
2983
1028
  */
2984
- proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinaryFromReader = function(msg, reader) {
1029
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader = function(msg, reader) {
2985
1030
  while (reader.nextField()) {
2986
1031
  if (reader.isEndGroup()) {
2987
1032
  break;
@@ -2990,31 +1035,17 @@ function requireParallax_gateway_pb () {
2990
1035
  switch (field) {
2991
1036
  case 1:
2992
1037
  var value = /** @type {string} */ (reader.readString());
2993
- msg.setTraceId(value);
1038
+ msg.setChainId(value);
2994
1039
  break;
2995
1040
  case 2:
2996
1041
  var value = /** @type {string} */ (reader.readString());
2997
- msg.setSpanId(value);
1042
+ msg.setTxHash(value);
2998
1043
  break;
2999
1044
  case 3:
3000
1045
  var value = /** @type {string} */ (reader.readString());
3001
- msg.setErrorType(value);
1046
+ msg.setDetails(value);
3002
1047
  break;
3003
1048
  case 4:
3004
- var value = /** @type {string} */ (reader.readString());
3005
- msg.setMessage(value);
3006
- break;
3007
- case 5:
3008
- var value = /** @type {string} */ (reader.readString());
3009
- msg.setStackTrace(value);
3010
- break;
3011
- case 6:
3012
- var value = msg.getAttributesMap();
3013
- reader.readMessage(value, function(message, reader) {
3014
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
3015
- });
3016
- break;
3017
- case 7:
3018
1049
  var value = new google_protobuf_timestamp_pb.Timestamp;
3019
1050
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3020
1051
  msg.setTimestamp(value);
@@ -3032,9 +1063,9 @@ function requireParallax_gateway_pb () {
3032
1063
  * Serializes the message to binary data (in protobuf wire format).
3033
1064
  * @return {!Uint8Array}
3034
1065
  */
3035
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.serializeBinary = function() {
1066
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.serializeBinary = function() {
3036
1067
  var writer = new jspb.BinaryWriter();
3037
- proto.gateway.parallax.v1.AddSpanErrorRequest.serializeBinaryToWriter(this, writer);
1068
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter(this, writer);
3038
1069
  return writer.getResultBuffer();
3039
1070
  };
3040
1071
 
@@ -3042,55 +1073,37 @@ function requireParallax_gateway_pb () {
3042
1073
  /**
3043
1074
  * Serializes the given message to binary data (in protobuf wire
3044
1075
  * format), writing to the given BinaryWriter.
3045
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} message
1076
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} message
3046
1077
  * @param {!jspb.BinaryWriter} writer
3047
1078
  * @suppress {unusedLocalVariables} f is only used for nested messages
3048
1079
  */
3049
- proto.gateway.parallax.v1.AddSpanErrorRequest.serializeBinaryToWriter = function(message, writer) {
1080
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter = function(message, writer) {
3050
1081
  var f = undefined;
3051
- f = message.getTraceId();
1082
+ f = message.getChainId();
3052
1083
  if (f.length > 0) {
3053
1084
  writer.writeString(
3054
1085
  1,
3055
1086
  f
3056
1087
  );
3057
1088
  }
3058
- f = message.getSpanId();
1089
+ f = message.getTxHash();
3059
1090
  if (f.length > 0) {
3060
1091
  writer.writeString(
3061
1092
  2,
3062
1093
  f
3063
1094
  );
3064
1095
  }
3065
- f = message.getErrorType();
3066
- if (f.length > 0) {
3067
- writer.writeString(
3068
- 3,
3069
- f
3070
- );
3071
- }
3072
- f = message.getMessage();
3073
- if (f.length > 0) {
3074
- writer.writeString(
3075
- 4,
3076
- f
3077
- );
3078
- }
3079
- f = /** @type {string} */ (jspb.Message.getField(message, 5));
1096
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
3080
1097
  if (f != null) {
3081
1098
  writer.writeString(
3082
- 5,
1099
+ 3,
3083
1100
  f
3084
1101
  );
3085
1102
  }
3086
- f = message.getAttributesMap(true);
3087
- if (f && f.getLength() > 0) {
3088
- f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
3089
- }
3090
1103
  f = message.getTimestamp();
3091
1104
  if (f != null) {
3092
1105
  writer.writeMessage(
3093
- 7,
1106
+ 4,
3094
1107
  f,
3095
1108
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3096
1109
  );
@@ -3099,312 +1112,65 @@ function requireParallax_gateway_pb () {
3099
1112
 
3100
1113
 
3101
1114
  /**
3102
- * optional string trace_id = 1;
1115
+ * optional string chain_id = 1;
3103
1116
  * @return {string}
3104
1117
  */
3105
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getTraceId = function() {
1118
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getChainId = function() {
3106
1119
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3107
1120
  };
3108
1121
 
3109
1122
 
3110
1123
  /**
3111
- * @param {string} value
3112
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3113
- */
3114
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setTraceId = function(value) {
3115
- return jspb.Message.setProto3StringField(this, 1, value);
3116
- };
3117
-
3118
-
3119
- /**
3120
- * optional string span_id = 2;
3121
- * @return {string}
3122
- */
3123
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getSpanId = function() {
3124
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3125
- };
3126
-
3127
-
3128
- /**
3129
- * @param {string} value
3130
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3131
- */
3132
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setSpanId = function(value) {
3133
- return jspb.Message.setProto3StringField(this, 2, value);
3134
- };
3135
-
3136
-
3137
- /**
3138
- * optional string error_type = 3;
3139
- * @return {string}
3140
- */
3141
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getErrorType = function() {
3142
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3143
- };
3144
-
3145
-
3146
- /**
3147
- * @param {string} value
3148
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3149
- */
3150
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setErrorType = function(value) {
3151
- return jspb.Message.setProto3StringField(this, 3, value);
3152
- };
3153
-
3154
-
3155
- /**
3156
- * optional string message = 4;
3157
- * @return {string}
3158
- */
3159
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getMessage = function() {
3160
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3161
- };
3162
-
3163
-
3164
- /**
3165
- * @param {string} value
3166
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3167
- */
3168
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setMessage = function(value) {
3169
- return jspb.Message.setProto3StringField(this, 4, value);
3170
- };
3171
-
3172
-
3173
- /**
3174
- * optional string stack_trace = 5;
3175
- * @return {string}
3176
- */
3177
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getStackTrace = function() {
3178
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3179
- };
3180
-
3181
-
3182
- /**
3183
- * @param {string} value
3184
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3185
- */
3186
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setStackTrace = function(value) {
3187
- return jspb.Message.setField(this, 5, value);
3188
- };
3189
-
3190
-
3191
- /**
3192
- * Clears the field making it undefined.
3193
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3194
- */
3195
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearStackTrace = function() {
3196
- return jspb.Message.setField(this, 5, undefined);
3197
- };
3198
-
3199
-
3200
- /**
3201
- * Returns whether this field is set.
3202
- * @return {boolean}
3203
- */
3204
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.hasStackTrace = function() {
3205
- return jspb.Message.getField(this, 5) != null;
3206
- };
3207
-
3208
-
3209
- /**
3210
- * map<string, string> attributes = 6;
3211
- * @param {boolean=} opt_noLazyCreate Do not create the map if
3212
- * empty, instead returning `undefined`
3213
- * @return {!jspb.Map<string,string>}
3214
- */
3215
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
3216
- return /** @type {!jspb.Map<string,string>} */ (
3217
- jspb.Message.getMapField(this, 6, opt_noLazyCreate,
3218
- null));
3219
- };
3220
-
3221
-
3222
- /**
3223
- * Clears values from the map. The map will be non-null.
3224
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3225
- */
3226
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearAttributesMap = function() {
3227
- this.getAttributesMap().clear();
3228
- return this;
3229
- };
3230
-
3231
-
3232
- /**
3233
- * optional google.protobuf.Timestamp timestamp = 7;
3234
- * @return {?proto.google.protobuf.Timestamp}
3235
- */
3236
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getTimestamp = function() {
3237
- return /** @type{?proto.google.protobuf.Timestamp} */ (
3238
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
3239
- };
3240
-
3241
-
3242
- /**
3243
- * @param {?proto.google.protobuf.Timestamp|undefined} value
3244
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3245
- */
3246
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setTimestamp = function(value) {
3247
- return jspb.Message.setWrapperField(this, 7, value);
3248
- };
3249
-
3250
-
3251
- /**
3252
- * Clears the message field making it undefined.
3253
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3254
- */
3255
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearTimestamp = function() {
3256
- return this.setTimestamp(undefined);
3257
- };
3258
-
3259
-
3260
- /**
3261
- * Returns whether this field is set.
3262
- * @return {boolean}
3263
- */
3264
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.hasTimestamp = function() {
3265
- return jspb.Message.getField(this, 7) != null;
3266
- };
3267
-
3268
-
3269
-
3270
-
3271
-
3272
- if (jspb.Message.GENERATE_TO_OBJECT) {
3273
- /**
3274
- * Creates an object representation of this proto.
3275
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3276
- * Optional fields that are not set will be set to undefined.
3277
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3278
- * For the list of reserved names please see:
3279
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3280
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3281
- * JSPB instance for transitional soy proto support:
3282
- * http://goto/soy-param-migration
3283
- * @return {!Object}
3284
- */
3285
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.toObject = function(opt_includeInstance) {
3286
- return proto.gateway.parallax.v1.AddSpanErrorResponse.toObject(opt_includeInstance, this);
3287
- };
3288
-
3289
-
3290
- /**
3291
- * Static version of the {@see toObject} method.
3292
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3293
- * the JSPB instance for transitional soy proto support:
3294
- * http://goto/soy-param-migration
3295
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} msg The msg instance to transform.
3296
- * @return {!Object}
3297
- * @suppress {unusedLocalVariables} f is only used for nested messages
3298
- */
3299
- proto.gateway.parallax.v1.AddSpanErrorResponse.toObject = function(includeInstance, msg) {
3300
- var f, obj = {
3301
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
3302
- };
3303
-
3304
- if (includeInstance) {
3305
- obj.$jspbMessageInstance = msg;
3306
- }
3307
- return obj;
3308
- };
3309
- }
3310
-
3311
-
3312
- /**
3313
- * Deserializes binary data (in protobuf wire format).
3314
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3315
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse}
3316
- */
3317
- proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinary = function(bytes) {
3318
- var reader = new jspb.BinaryReader(bytes);
3319
- var msg = new proto.gateway.parallax.v1.AddSpanErrorResponse;
3320
- return proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinaryFromReader(msg, reader);
3321
- };
3322
-
3323
-
3324
- /**
3325
- * Deserializes binary data (in protobuf wire format) from the
3326
- * given reader into the given message object.
3327
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} msg The message object to deserialize into.
3328
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3329
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse}
3330
- */
3331
- proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinaryFromReader = function(msg, reader) {
3332
- while (reader.nextField()) {
3333
- if (reader.isEndGroup()) {
3334
- break;
3335
- }
3336
- var field = reader.getFieldNumber();
3337
- switch (field) {
3338
- case 1:
3339
- var value = new proto_common_v1_status_pb.ResponseStatus;
3340
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
3341
- msg.setStatus(value);
3342
- break;
3343
- default:
3344
- reader.skipField();
3345
- break;
3346
- }
3347
- }
3348
- return msg;
1124
+ * @param {string} value
1125
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
1126
+ */
1127
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setChainId = function(value) {
1128
+ return jspb.Message.setProto3StringField(this, 1, value);
3349
1129
  };
3350
1130
 
3351
1131
 
3352
1132
  /**
3353
- * Serializes the message to binary data (in protobuf wire format).
3354
- * @return {!Uint8Array}
1133
+ * optional string tx_hash = 2;
1134
+ * @return {string}
3355
1135
  */
3356
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.serializeBinary = function() {
3357
- var writer = new jspb.BinaryWriter();
3358
- proto.gateway.parallax.v1.AddSpanErrorResponse.serializeBinaryToWriter(this, writer);
3359
- return writer.getResultBuffer();
1136
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getTxHash = function() {
1137
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3360
1138
  };
3361
1139
 
3362
1140
 
3363
1141
  /**
3364
- * Serializes the given message to binary data (in protobuf wire
3365
- * format), writing to the given BinaryWriter.
3366
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} message
3367
- * @param {!jspb.BinaryWriter} writer
3368
- * @suppress {unusedLocalVariables} f is only used for nested messages
1142
+ * @param {string} value
1143
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3369
1144
  */
3370
- proto.gateway.parallax.v1.AddSpanErrorResponse.serializeBinaryToWriter = function(message, writer) {
3371
- var f = undefined;
3372
- f = message.getStatus();
3373
- if (f != null) {
3374
- writer.writeMessage(
3375
- 1,
3376
- f,
3377
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
3378
- );
3379
- }
1145
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setTxHash = function(value) {
1146
+ return jspb.Message.setProto3StringField(this, 2, value);
3380
1147
  };
3381
1148
 
3382
1149
 
3383
1150
  /**
3384
- * optional common.v1.ResponseStatus status = 1;
3385
- * @return {?proto.common.v1.ResponseStatus}
1151
+ * optional string details = 3;
1152
+ * @return {string}
3386
1153
  */
3387
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.getStatus = function() {
3388
- return /** @type{?proto.common.v1.ResponseStatus} */ (
3389
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1154
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getDetails = function() {
1155
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3390
1156
  };
3391
1157
 
3392
1158
 
3393
1159
  /**
3394
- * @param {?proto.common.v1.ResponseStatus|undefined} value
3395
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse} returns this
3396
- */
3397
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.setStatus = function(value) {
3398
- return jspb.Message.setWrapperField(this, 1, value);
1160
+ * @param {string} value
1161
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
1162
+ */
1163
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setDetails = function(value) {
1164
+ return jspb.Message.setField(this, 3, value);
3399
1165
  };
3400
1166
 
3401
1167
 
3402
1168
  /**
3403
- * Clears the message field making it undefined.
3404
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse} returns this
1169
+ * Clears the field making it undefined.
1170
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3405
1171
  */
3406
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.clearStatus = function() {
3407
- return this.setStatus(undefined);
1172
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.clearDetails = function() {
1173
+ return jspb.Message.setField(this, 3, undefined);
3408
1174
  };
3409
1175
 
3410
1176
 
@@ -3412,39 +1178,51 @@ function requireParallax_gateway_pb () {
3412
1178
  * Returns whether this field is set.
3413
1179
  * @return {boolean}
3414
1180
  */
3415
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.hasStatus = function() {
3416
- return jspb.Message.getField(this, 1) != null;
1181
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.hasDetails = function() {
1182
+ return jspb.Message.getField(this, 3) != null;
3417
1183
  };
3418
1184
 
3419
1185
 
3420
-
3421
1186
  /**
3422
- * Oneof group definitions for this message. Each group defines the field
3423
- * numbers belonging to that group. When of these fields' value is set, all
3424
- * other fields in the group are cleared. During deserialization, if multiple
3425
- * fields are encountered for a group, only the last value seen will be kept.
3426
- * @private {!Array<!Array<number>>}
3427
- * @const
1187
+ * optional google.protobuf.Timestamp timestamp = 4;
1188
+ * @return {?proto.google.protobuf.Timestamp}
3428
1189
  */
3429
- proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_ = [[10]];
1190
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getTimestamp = function() {
1191
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1192
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
1193
+ };
1194
+
3430
1195
 
3431
1196
  /**
3432
- * @enum {number}
1197
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1198
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
1199
+ */
1200
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setTimestamp = function(value) {
1201
+ return jspb.Message.setWrapperField(this, 4, value);
1202
+ };
1203
+
1204
+
1205
+ /**
1206
+ * Clears the message field making it undefined.
1207
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3433
1208
  */
3434
- proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase = {
3435
- HINT_TYPE_NOT_SET: 0,
3436
- CHAIN_TRANSACTION: 10
1209
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.clearTimestamp = function() {
1210
+ return this.setTimestamp(undefined);
3437
1211
  };
3438
1212
 
1213
+
3439
1214
  /**
3440
- * @return {proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase}
1215
+ * Returns whether this field is set.
1216
+ * @return {boolean}
3441
1217
  */
3442
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getHintTypeCase = function() {
3443
- return /** @type {proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase} */(jspb.Message.computeOneofCase(this, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_[0]));
1218
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.hasTimestamp = function() {
1219
+ return jspb.Message.getField(this, 4) != null;
3444
1220
  };
3445
1221
 
3446
1222
 
3447
1223
 
1224
+
1225
+
3448
1226
  if (jspb.Message.GENERATE_TO_OBJECT) {
3449
1227
  /**
3450
1228
  * Creates an object representation of this proto.
@@ -3458,8 +1236,8 @@ function requireParallax_gateway_pb () {
3458
1236
  * http://goto/soy-param-migration
3459
1237
  * @return {!Object}
3460
1238
  */
3461
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.toObject = function(opt_includeInstance) {
3462
- return proto.gateway.parallax.v1.AddSpanHintRequest.toObject(opt_includeInstance, this);
1239
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.toObject = function(opt_includeInstance) {
1240
+ return proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject(opt_includeInstance, this);
3463
1241
  };
3464
1242
 
3465
1243
 
@@ -3468,16 +1246,15 @@ function requireParallax_gateway_pb () {
3468
1246
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3469
1247
  * the JSPB instance for transitional soy proto support:
3470
1248
  * http://goto/soy-param-migration
3471
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} msg The msg instance to transform.
1249
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} msg The msg instance to transform.
3472
1250
  * @return {!Object}
3473
1251
  * @suppress {unusedLocalVariables} f is only used for nested messages
3474
1252
  */
3475
- proto.gateway.parallax.v1.AddSpanHintRequest.toObject = function(includeInstance, msg) {
1253
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject = function(includeInstance, msg) {
3476
1254
  var f, obj = {
3477
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3478
- parentSpanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3479
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3480
- chainTransaction: (f = msg.getChainTransaction()) && proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject(includeInstance, f)
1255
+ eventName: jspb.Message.getFieldWithDefault(msg, 1, ""),
1256
+ details: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
1257
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
3481
1258
  };
3482
1259
 
3483
1260
  if (includeInstance) {
@@ -3491,23 +1268,23 @@ function requireParallax_gateway_pb () {
3491
1268
  /**
3492
1269
  * Deserializes binary data (in protobuf wire format).
3493
1270
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
3494
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest}
1271
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3495
1272
  */
3496
- proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinary = function(bytes) {
1273
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinary = function(bytes) {
3497
1274
  var reader = new jspb.BinaryReader(bytes);
3498
- var msg = new proto.gateway.parallax.v1.AddSpanHintRequest;
3499
- return proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinaryFromReader(msg, reader);
1275
+ var msg = new proto.gateway.parallax.v1.CreateTraceRequest.Event;
1276
+ return proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader(msg, reader);
3500
1277
  };
3501
1278
 
3502
1279
 
3503
1280
  /**
3504
1281
  * Deserializes binary data (in protobuf wire format) from the
3505
1282
  * given reader into the given message object.
3506
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} msg The message object to deserialize into.
1283
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} msg The message object to deserialize into.
3507
1284
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3508
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest}
1285
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3509
1286
  */
3510
- proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinaryFromReader = function(msg, reader) {
1287
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader = function(msg, reader) {
3511
1288
  while (reader.nextField()) {
3512
1289
  if (reader.isEndGroup()) {
3513
1290
  break;
@@ -3516,22 +1293,17 @@ function requireParallax_gateway_pb () {
3516
1293
  switch (field) {
3517
1294
  case 1:
3518
1295
  var value = /** @type {string} */ (reader.readString());
3519
- msg.setTraceId(value);
1296
+ msg.setEventName(value);
3520
1297
  break;
3521
1298
  case 2:
3522
1299
  var value = /** @type {string} */ (reader.readString());
3523
- msg.setParentSpanId(value);
1300
+ msg.setDetails(value);
3524
1301
  break;
3525
1302
  case 3:
3526
1303
  var value = new google_protobuf_timestamp_pb.Timestamp;
3527
1304
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3528
1305
  msg.setTimestamp(value);
3529
1306
  break;
3530
- case 10:
3531
- var value = new proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction;
3532
- reader.readMessage(value,proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader);
3533
- msg.setChainTransaction(value);
3534
- break;
3535
1307
  default:
3536
1308
  reader.skipField();
3537
1309
  break;
@@ -3545,9 +1317,9 @@ function requireParallax_gateway_pb () {
3545
1317
  * Serializes the message to binary data (in protobuf wire format).
3546
1318
  * @return {!Uint8Array}
3547
1319
  */
3548
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.serializeBinary = function() {
1320
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.serializeBinary = function() {
3549
1321
  var writer = new jspb.BinaryWriter();
3550
- proto.gateway.parallax.v1.AddSpanHintRequest.serializeBinaryToWriter(this, writer);
1322
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter(this, writer);
3551
1323
  return writer.getResultBuffer();
3552
1324
  };
3553
1325
 
@@ -3555,21 +1327,21 @@ function requireParallax_gateway_pb () {
3555
1327
  /**
3556
1328
  * Serializes the given message to binary data (in protobuf wire
3557
1329
  * format), writing to the given BinaryWriter.
3558
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} message
1330
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} message
3559
1331
  * @param {!jspb.BinaryWriter} writer
3560
1332
  * @suppress {unusedLocalVariables} f is only used for nested messages
3561
1333
  */
3562
- proto.gateway.parallax.v1.AddSpanHintRequest.serializeBinaryToWriter = function(message, writer) {
1334
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter = function(message, writer) {
3563
1335
  var f = undefined;
3564
- f = message.getTraceId();
1336
+ f = message.getEventName();
3565
1337
  if (f.length > 0) {
3566
1338
  writer.writeString(
3567
1339
  1,
3568
1340
  f
3569
1341
  );
3570
1342
  }
3571
- f = message.getParentSpanId();
3572
- if (f.length > 0) {
1343
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1344
+ if (f != null) {
3573
1345
  writer.writeString(
3574
1346
  2,
3575
1347
  f
@@ -3583,275 +1355,241 @@ function requireParallax_gateway_pb () {
3583
1355
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3584
1356
  );
3585
1357
  }
3586
- f = message.getChainTransaction();
3587
- if (f != null) {
3588
- writer.writeMessage(
3589
- 10,
3590
- f,
3591
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter
3592
- );
3593
- }
3594
1358
  };
3595
1359
 
3596
1360
 
1361
+ /**
1362
+ * optional string event_name = 1;
1363
+ * @return {string}
1364
+ */
1365
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getEventName = function() {
1366
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1367
+ };
1368
+
3597
1369
 
1370
+ /**
1371
+ * @param {string} value
1372
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1373
+ */
1374
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setEventName = function(value) {
1375
+ return jspb.Message.setProto3StringField(this, 1, value);
1376
+ };
3598
1377
 
3599
1378
 
3600
- if (jspb.Message.GENERATE_TO_OBJECT) {
3601
1379
  /**
3602
- * Creates an object representation of this proto.
3603
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3604
- * Optional fields that are not set will be set to undefined.
3605
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3606
- * For the list of reserved names please see:
3607
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3608
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3609
- * JSPB instance for transitional soy proto support:
3610
- * http://goto/soy-param-migration
3611
- * @return {!Object}
1380
+ * optional string details = 2;
1381
+ * @return {string}
3612
1382
  */
3613
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.toObject = function(opt_includeInstance) {
3614
- return proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject(opt_includeInstance, this);
1383
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getDetails = function() {
1384
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3615
1385
  };
3616
1386
 
3617
1387
 
3618
1388
  /**
3619
- * Static version of the {@see toObject} method.
3620
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3621
- * the JSPB instance for transitional soy proto support:
3622
- * http://goto/soy-param-migration
3623
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} msg The msg instance to transform.
3624
- * @return {!Object}
3625
- * @suppress {unusedLocalVariables} f is only used for nested messages
1389
+ * @param {string} value
1390
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
3626
1391
  */
3627
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject = function(includeInstance, msg) {
3628
- var obj = {
3629
- txHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
3630
- chainId: jspb.Message.getFieldWithDefault(msg, 2, 0)
3631
- };
1392
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setDetails = function(value) {
1393
+ return jspb.Message.setField(this, 2, value);
1394
+ };
3632
1395
 
3633
- if (includeInstance) {
3634
- obj.$jspbMessageInstance = msg;
3635
- }
3636
- return obj;
1396
+
1397
+ /**
1398
+ * Clears the field making it undefined.
1399
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1400
+ */
1401
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.clearDetails = function() {
1402
+ return jspb.Message.setField(this, 2, undefined);
3637
1403
  };
3638
- }
3639
1404
 
3640
1405
 
3641
1406
  /**
3642
- * Deserializes binary data (in protobuf wire format).
3643
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3644
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1407
+ * Returns whether this field is set.
1408
+ * @return {boolean}
3645
1409
  */
3646
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinary = function(bytes) {
3647
- var reader = new jspb.BinaryReader(bytes);
3648
- var msg = new proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction;
3649
- return proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader(msg, reader);
1410
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.hasDetails = function() {
1411
+ return jspb.Message.getField(this, 2) != null;
3650
1412
  };
3651
1413
 
3652
1414
 
3653
1415
  /**
3654
- * Deserializes binary data (in protobuf wire format) from the
3655
- * given reader into the given message object.
3656
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} msg The message object to deserialize into.
3657
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3658
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1416
+ * optional google.protobuf.Timestamp timestamp = 3;
1417
+ * @return {?proto.google.protobuf.Timestamp}
3659
1418
  */
3660
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader = function(msg, reader) {
3661
- while (reader.nextField()) {
3662
- if (reader.isEndGroup()) {
3663
- break;
3664
- }
3665
- var field = reader.getFieldNumber();
3666
- switch (field) {
3667
- case 1:
3668
- var value = /** @type {string} */ (reader.readString());
3669
- msg.setTxHash(value);
3670
- break;
3671
- case 2:
3672
- var value = /** @type {number} */ (reader.readUint64());
3673
- msg.setChainId(value);
3674
- break;
3675
- default:
3676
- reader.skipField();
3677
- break;
3678
- }
3679
- }
3680
- return msg;
1419
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getTimestamp = function() {
1420
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1421
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
3681
1422
  };
3682
1423
 
3683
1424
 
3684
1425
  /**
3685
- * Serializes the message to binary data (in protobuf wire format).
3686
- * @return {!Uint8Array}
1426
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1427
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1428
+ */
1429
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setTimestamp = function(value) {
1430
+ return jspb.Message.setWrapperField(this, 3, value);
1431
+ };
1432
+
1433
+
1434
+ /**
1435
+ * Clears the message field making it undefined.
1436
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
3687
1437
  */
3688
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.serializeBinary = function() {
3689
- var writer = new jspb.BinaryWriter();
3690
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter(this, writer);
3691
- return writer.getResultBuffer();
1438
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.clearTimestamp = function() {
1439
+ return this.setTimestamp(undefined);
3692
1440
  };
3693
1441
 
3694
1442
 
3695
1443
  /**
3696
- * Serializes the given message to binary data (in protobuf wire
3697
- * format), writing to the given BinaryWriter.
3698
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} message
3699
- * @param {!jspb.BinaryWriter} writer
3700
- * @suppress {unusedLocalVariables} f is only used for nested messages
1444
+ * Returns whether this field is set.
1445
+ * @return {boolean}
3701
1446
  */
3702
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter = function(message, writer) {
3703
- var f = undefined;
3704
- f = message.getTxHash();
3705
- if (f.length > 0) {
3706
- writer.writeString(
3707
- 1,
3708
- f
3709
- );
3710
- }
3711
- f = message.getChainId();
3712
- if (f !== 0) {
3713
- writer.writeUint64(
3714
- 2,
3715
- f
3716
- );
3717
- }
1447
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.hasTimestamp = function() {
1448
+ return jspb.Message.getField(this, 3) != null;
3718
1449
  };
3719
1450
 
3720
1451
 
3721
1452
  /**
3722
- * optional string tx_hash = 1;
1453
+ * optional string name = 1;
3723
1454
  * @return {string}
3724
1455
  */
3725
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.getTxHash = function() {
1456
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
3726
1457
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3727
1458
  };
3728
1459
 
3729
1460
 
3730
1461
  /**
3731
1462
  * @param {string} value
3732
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} returns this
1463
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3733
1464
  */
3734
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.setTxHash = function(value) {
1465
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
3735
1466
  return jspb.Message.setProto3StringField(this, 1, value);
3736
1467
  };
3737
1468
 
3738
1469
 
3739
1470
  /**
3740
- * optional uint64 chain_id = 2;
3741
- * @return {number}
1471
+ * map<string, string> attributes = 2;
1472
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1473
+ * empty, instead returning `undefined`
1474
+ * @return {!jspb.Map<string,string>}
3742
1475
  */
3743
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.getChainId = function() {
3744
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1476
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1477
+ return /** @type {!jspb.Map<string,string>} */ (
1478
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1479
+ null));
3745
1480
  };
3746
1481
 
3747
1482
 
3748
1483
  /**
3749
- * @param {number} value
3750
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} returns this
1484
+ * Clears values from the map. The map will be non-null.
1485
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3751
1486
  */
3752
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.setChainId = function(value) {
3753
- return jspb.Message.setProto3IntField(this, 2, value);
1487
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearAttributesMap = function() {
1488
+ this.getAttributesMap().clear();
1489
+ return this;
3754
1490
  };
3755
1491
 
3756
1492
 
3757
1493
  /**
3758
- * optional string trace_id = 1;
3759
- * @return {string}
1494
+ * repeated string tags = 3;
1495
+ * @return {!Array<string>}
3760
1496
  */
3761
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getTraceId = function() {
3762
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1497
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTagsList = function() {
1498
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
3763
1499
  };
3764
1500
 
3765
1501
 
3766
1502
  /**
3767
- * @param {string} value
3768
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1503
+ * @param {!Array<string>} value
1504
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3769
1505
  */
3770
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setTraceId = function(value) {
3771
- return jspb.Message.setProto3StringField(this, 1, value);
1506
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTagsList = function(value) {
1507
+ return jspb.Message.setField(this, 3, value || []);
3772
1508
  };
3773
1509
 
3774
1510
 
3775
1511
  /**
3776
- * optional string parent_span_id = 2;
3777
- * @return {string}
1512
+ * @param {string} value
1513
+ * @param {number=} opt_index
1514
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3778
1515
  */
3779
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getParentSpanId = function() {
3780
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1516
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.addTags = function(value, opt_index) {
1517
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
3781
1518
  };
3782
1519
 
3783
1520
 
3784
1521
  /**
3785
- * @param {string} value
3786
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1522
+ * Clears the list making it empty but non-null.
1523
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3787
1524
  */
3788
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setParentSpanId = function(value) {
3789
- return jspb.Message.setProto3StringField(this, 2, value);
1525
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTagsList = function() {
1526
+ return this.setTagsList([]);
3790
1527
  };
3791
1528
 
3792
1529
 
3793
1530
  /**
3794
- * optional google.protobuf.Timestamp timestamp = 3;
3795
- * @return {?proto.google.protobuf.Timestamp}
1531
+ * repeated Event events = 4;
1532
+ * @return {!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>}
3796
1533
  */
3797
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getTimestamp = function() {
3798
- return /** @type{?proto.google.protobuf.Timestamp} */ (
3799
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
1534
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getEventsList = function() {
1535
+ return /** @type{!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>} */ (
1536
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.CreateTraceRequest.Event, 4));
3800
1537
  };
3801
1538
 
3802
1539
 
3803
1540
  /**
3804
- * @param {?proto.google.protobuf.Timestamp|undefined} value
3805
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1541
+ * @param {!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>} value
1542
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3806
1543
  */
3807
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setTimestamp = function(value) {
3808
- return jspb.Message.setWrapperField(this, 3, value);
1544
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setEventsList = function(value) {
1545
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
3809
1546
  };
3810
1547
 
3811
1548
 
3812
1549
  /**
3813
- * Clears the message field making it undefined.
3814
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1550
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event=} opt_value
1551
+ * @param {number=} opt_index
1552
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3815
1553
  */
3816
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.clearTimestamp = function() {
3817
- return this.setTimestamp(undefined);
1554
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.addEvents = function(opt_value, opt_index) {
1555
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.gateway.parallax.v1.CreateTraceRequest.Event, opt_index);
3818
1556
  };
3819
1557
 
3820
1558
 
3821
1559
  /**
3822
- * Returns whether this field is set.
3823
- * @return {boolean}
1560
+ * Clears the list making it empty but non-null.
1561
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3824
1562
  */
3825
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.hasTimestamp = function() {
3826
- return jspb.Message.getField(this, 3) != null;
1563
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearEventsList = function() {
1564
+ return this.setEventsList([]);
3827
1565
  };
3828
1566
 
3829
1567
 
3830
1568
  /**
3831
- * optional ChainTransaction chain_transaction = 10;
3832
- * @return {?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1569
+ * optional TxHashHint tx_hash_hint = 5;
1570
+ * @return {?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
3833
1571
  */
3834
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getChainTransaction = function() {
3835
- return /** @type{?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} */ (
3836
- jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction, 10));
1572
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTxHashHint = function() {
1573
+ return /** @type{?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} */ (
1574
+ jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint, 5));
3837
1575
  };
3838
1576
 
3839
1577
 
3840
1578
  /**
3841
- * @param {?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction|undefined} value
3842
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1579
+ * @param {?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint|undefined} value
1580
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3843
1581
  */
3844
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setChainTransaction = function(value) {
3845
- return jspb.Message.setOneofWrapperField(this, 10, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_[0], value);
1582
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTxHashHint = function(value) {
1583
+ return jspb.Message.setWrapperField(this, 5, value);
3846
1584
  };
3847
1585
 
3848
1586
 
3849
1587
  /**
3850
1588
  * Clears the message field making it undefined.
3851
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1589
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3852
1590
  */
3853
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.clearChainTransaction = function() {
3854
- return this.setChainTransaction(undefined);
1591
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTxHashHint = function() {
1592
+ return this.setTxHashHint(undefined);
3855
1593
  };
3856
1594
 
3857
1595
 
@@ -3859,8 +1597,8 @@ function requireParallax_gateway_pb () {
3859
1597
  * Returns whether this field is set.
3860
1598
  * @return {boolean}
3861
1599
  */
3862
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.hasChainTransaction = function() {
3863
- return jspb.Message.getField(this, 10) != null;
1600
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasTxHashHint = function() {
1601
+ return jspb.Message.getField(this, 5) != null;
3864
1602
  };
3865
1603
 
3866
1604
 
@@ -3880,8 +1618,8 @@ function requireParallax_gateway_pb () {
3880
1618
  * http://goto/soy-param-migration
3881
1619
  * @return {!Object}
3882
1620
  */
3883
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.toObject = function(opt_includeInstance) {
3884
- return proto.gateway.parallax.v1.AddSpanHintResponse.toObject(opt_includeInstance, this);
1621
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1622
+ return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
3885
1623
  };
3886
1624
 
3887
1625
 
@@ -3890,13 +1628,14 @@ function requireParallax_gateway_pb () {
3890
1628
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3891
1629
  * the JSPB instance for transitional soy proto support:
3892
1630
  * http://goto/soy-param-migration
3893
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} msg The msg instance to transform.
1631
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
3894
1632
  * @return {!Object}
3895
1633
  * @suppress {unusedLocalVariables} f is only used for nested messages
3896
1634
  */
3897
- proto.gateway.parallax.v1.AddSpanHintResponse.toObject = function(includeInstance, msg) {
1635
+ proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
3898
1636
  var f, obj = {
3899
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
1637
+ status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1638
+ traceId: jspb.Message.getFieldWithDefault(msg, 2, "")
3900
1639
  };
3901
1640
 
3902
1641
  if (includeInstance) {
@@ -3910,23 +1649,23 @@ function requireParallax_gateway_pb () {
3910
1649
  /**
3911
1650
  * Deserializes binary data (in protobuf wire format).
3912
1651
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
3913
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse}
1652
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
3914
1653
  */
3915
- proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinary = function(bytes) {
1654
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
3916
1655
  var reader = new jspb.BinaryReader(bytes);
3917
- var msg = new proto.gateway.parallax.v1.AddSpanHintResponse;
3918
- return proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinaryFromReader(msg, reader);
1656
+ var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1657
+ return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
3919
1658
  };
3920
1659
 
3921
1660
 
3922
1661
  /**
3923
1662
  * Deserializes binary data (in protobuf wire format) from the
3924
1663
  * given reader into the given message object.
3925
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} msg The message object to deserialize into.
1664
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
3926
1665
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3927
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse}
1666
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
3928
1667
  */
3929
- proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinaryFromReader = function(msg, reader) {
1668
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
3930
1669
  while (reader.nextField()) {
3931
1670
  if (reader.isEndGroup()) {
3932
1671
  break;
@@ -3938,6 +1677,10 @@ function requireParallax_gateway_pb () {
3938
1677
  reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
3939
1678
  msg.setStatus(value);
3940
1679
  break;
1680
+ case 2:
1681
+ var value = /** @type {string} */ (reader.readString());
1682
+ msg.setTraceId(value);
1683
+ break;
3941
1684
  default:
3942
1685
  reader.skipField();
3943
1686
  break;
@@ -3951,9 +1694,9 @@ function requireParallax_gateway_pb () {
3951
1694
  * Serializes the message to binary data (in protobuf wire format).
3952
1695
  * @return {!Uint8Array}
3953
1696
  */
3954
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.serializeBinary = function() {
1697
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
3955
1698
  var writer = new jspb.BinaryWriter();
3956
- proto.gateway.parallax.v1.AddSpanHintResponse.serializeBinaryToWriter(this, writer);
1699
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
3957
1700
  return writer.getResultBuffer();
3958
1701
  };
3959
1702
 
@@ -3961,11 +1704,11 @@ function requireParallax_gateway_pb () {
3961
1704
  /**
3962
1705
  * Serializes the given message to binary data (in protobuf wire
3963
1706
  * format), writing to the given BinaryWriter.
3964
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} message
1707
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
3965
1708
  * @param {!jspb.BinaryWriter} writer
3966
1709
  * @suppress {unusedLocalVariables} f is only used for nested messages
3967
1710
  */
3968
- proto.gateway.parallax.v1.AddSpanHintResponse.serializeBinaryToWriter = function(message, writer) {
1711
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
3969
1712
  var f = undefined;
3970
1713
  f = message.getStatus();
3971
1714
  if (f != null) {
@@ -3975,6 +1718,13 @@ function requireParallax_gateway_pb () {
3975
1718
  proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
3976
1719
  );
3977
1720
  }
1721
+ f = message.getTraceId();
1722
+ if (f.length > 0) {
1723
+ writer.writeString(
1724
+ 2,
1725
+ f
1726
+ );
1727
+ }
3978
1728
  };
3979
1729
 
3980
1730
 
@@ -3982,7 +1732,7 @@ function requireParallax_gateway_pb () {
3982
1732
  * optional common.v1.ResponseStatus status = 1;
3983
1733
  * @return {?proto.common.v1.ResponseStatus}
3984
1734
  */
3985
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.getStatus = function() {
1735
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.getStatus = function() {
3986
1736
  return /** @type{?proto.common.v1.ResponseStatus} */ (
3987
1737
  jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
3988
1738
  };
@@ -3990,18 +1740,18 @@ function requireParallax_gateway_pb () {
3990
1740
 
3991
1741
  /**
3992
1742
  * @param {?proto.common.v1.ResponseStatus|undefined} value
3993
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse} returns this
1743
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
3994
1744
  */
3995
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.setStatus = function(value) {
1745
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.setStatus = function(value) {
3996
1746
  return jspb.Message.setWrapperField(this, 1, value);
3997
1747
  };
3998
1748
 
3999
1749
 
4000
1750
  /**
4001
1751
  * Clears the message field making it undefined.
4002
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse} returns this
1752
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
4003
1753
  */
4004
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.clearStatus = function() {
1754
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.clearStatus = function() {
4005
1755
  return this.setStatus(undefined);
4006
1756
  };
4007
1757
 
@@ -4010,11 +1760,29 @@ function requireParallax_gateway_pb () {
4010
1760
  * Returns whether this field is set.
4011
1761
  * @return {boolean}
4012
1762
  */
4013
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.hasStatus = function() {
1763
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.hasStatus = function() {
4014
1764
  return jspb.Message.getField(this, 1) != null;
4015
1765
  };
4016
1766
 
4017
1767
 
1768
+ /**
1769
+ * optional string trace_id = 2;
1770
+ * @return {string}
1771
+ */
1772
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.getTraceId = function() {
1773
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1774
+ };
1775
+
1776
+
1777
+ /**
1778
+ * @param {string} value
1779
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1780
+ */
1781
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.setTraceId = function(value) {
1782
+ return jspb.Message.setProto3StringField(this, 2, value);
1783
+ };
1784
+
1785
+
4018
1786
  goog.object.extend(exports$1, proto.gateway.parallax.v1);
4019
1787
  } (parallax_gateway_pb));
4020
1788
  return parallax_gateway_pb;
@@ -4129,46 +1897,6 @@ class ParallaxGatewayServiceClient {
4129
1897
  return request.serializeBinary();
4130
1898
  }, parallax_gateway_pbExports.CreateTraceResponse.deserializeBinary)
4131
1899
  });
4132
- Object.defineProperty(this, "methodDescriptorStartSpan", {
4133
- enumerable: true,
4134
- configurable: true,
4135
- writable: true,
4136
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/StartSpan', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.StartSpanRequest, parallax_gateway_pbExports.StartSpanResponse, (request) => {
4137
- return request.serializeBinary();
4138
- }, parallax_gateway_pbExports.StartSpanResponse.deserializeBinary)
4139
- });
4140
- Object.defineProperty(this, "methodDescriptorFinishSpan", {
4141
- enumerable: true,
4142
- configurable: true,
4143
- writable: true,
4144
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.FinishSpanRequest, parallax_gateway_pbExports.FinishSpanResponse, (request) => {
4145
- return request.serializeBinary();
4146
- }, parallax_gateway_pbExports.FinishSpanResponse.deserializeBinary)
4147
- });
4148
- Object.defineProperty(this, "methodDescriptorAddSpanEvent", {
4149
- enumerable: true,
4150
- configurable: true,
4151
- writable: true,
4152
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanEventRequest, parallax_gateway_pbExports.AddSpanEventResponse, (request) => {
4153
- return request.serializeBinary();
4154
- }, parallax_gateway_pbExports.AddSpanEventResponse.deserializeBinary)
4155
- });
4156
- Object.defineProperty(this, "methodDescriptorAddSpanError", {
4157
- enumerable: true,
4158
- configurable: true,
4159
- writable: true,
4160
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanErrorRequest, parallax_gateway_pbExports.AddSpanErrorResponse, (request) => {
4161
- return request.serializeBinary();
4162
- }, parallax_gateway_pbExports.AddSpanErrorResponse.deserializeBinary)
4163
- });
4164
- Object.defineProperty(this, "methodDescriptorAddSpanHint", {
4165
- enumerable: true,
4166
- configurable: true,
4167
- writable: true,
4168
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanHintRequest, parallax_gateway_pbExports.AddSpanHintResponse, (request) => {
4169
- return request.serializeBinary();
4170
- }, parallax_gateway_pbExports.AddSpanHintResponse.deserializeBinary)
4171
- });
4172
1900
  if (!options)
4173
1901
  options = {};
4174
1902
  if (!credentials)
@@ -4187,50 +1915,12 @@ class ParallaxGatewayServiceClient {
4187
1915
  return this.client_.unaryCall(this.hostname_ +
4188
1916
  '/gateway.parallax.v1.ParallaxGatewayService/CreateTrace', request, metadata || {}, this.methodDescriptorCreateTrace);
4189
1917
  }
4190
- startSpan(request, metadata, callback) {
4191
- if (callback !== undefined) {
4192
- return this.client_.rpcCall(this.hostname_ +
4193
- '/gateway.parallax.v1.ParallaxGatewayService/StartSpan', request, metadata || {}, this.methodDescriptorStartSpan, callback);
4194
- }
4195
- return this.client_.unaryCall(this.hostname_ +
4196
- '/gateway.parallax.v1.ParallaxGatewayService/StartSpan', request, metadata || {}, this.methodDescriptorStartSpan);
4197
- }
4198
- finishSpan(request, metadata, callback) {
4199
- if (callback !== undefined) {
4200
- return this.client_.rpcCall(this.hostname_ +
4201
- '/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', request, metadata || {}, this.methodDescriptorFinishSpan, callback);
4202
- }
4203
- return this.client_.unaryCall(this.hostname_ +
4204
- '/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', request, metadata || {}, this.methodDescriptorFinishSpan);
4205
- }
4206
- addSpanEvent(request, metadata, callback) {
4207
- if (callback !== undefined) {
4208
- return this.client_.rpcCall(this.hostname_ +
4209
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', request, metadata || {}, this.methodDescriptorAddSpanEvent, callback);
4210
- }
4211
- return this.client_.unaryCall(this.hostname_ +
4212
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', request, metadata || {}, this.methodDescriptorAddSpanEvent);
4213
- }
4214
- addSpanError(request, metadata, callback) {
4215
- if (callback !== undefined) {
4216
- return this.client_.rpcCall(this.hostname_ +
4217
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', request, metadata || {}, this.methodDescriptorAddSpanError, callback);
4218
- }
4219
- return this.client_.unaryCall(this.hostname_ +
4220
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', request, metadata || {}, this.methodDescriptorAddSpanError);
4221
- }
4222
- addSpanHint(request, metadata, callback) {
4223
- if (callback !== undefined) {
4224
- return this.client_.rpcCall(this.hostname_ +
4225
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', request, metadata || {}, this.methodDescriptorAddSpanHint, callback);
4226
- }
4227
- return this.client_.unaryCall(this.hostname_ +
4228
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', request, metadata || {}, this.methodDescriptorAddSpanHint);
4229
- }
4230
1918
  }
4231
1919
 
1920
+ var timestamp_pbExports = requireTimestamp_pb();
1921
+
4232
1922
  // Parallax SDK Web Client
4233
- const GRPC_GATEWAY_API_URL = "https://gateway-parallax-dev.platform.svc.cluster.local:50053";
1923
+ const GRPC_GATEWAY_API_URL = "https://parallax-gateway.dev.mirador.org:443";
4234
1924
  const debugIssue = (trace, error) => {
4235
1925
  // Handle our own debugging / logging here
4236
1926
  console.error(`[ParallaxClient][${trace}] Error:`, error);
@@ -4403,182 +2093,206 @@ class ParallaxClient {
4403
2093
  }
4404
2094
  }
4405
2095
  /**
4406
- * Create a StartSpanRequest with optional attributes and client metadata
4407
- * @param traceId trace id to associate the span with
4408
- * @param name name of the span
4409
- * @param parentSpanId (optional) create a span off a parent span id
4410
- * @param attr (optional) attributes to add to the span
4411
- * @param includeClientMeta (optional) flag to include client metadata (ip, browser, os, etc)
4412
- * @returns
2096
+ * Create a new trace builder
2097
+ *
2098
+ * Example usage:
2099
+ * ```typescript
2100
+ * const response = await client.trace("swap_execution")
2101
+ * .addAttribute("user", "0xabc...")
2102
+ * .addAttribute("slippage_bps", 25)
2103
+ * .addTag("dex")
2104
+ * .addTag("swap")
2105
+ * .addEvent("wallet_connected", { wallet: "MetaMask" })
2106
+ * .addEvent("quote_received")
2107
+ * .submit("0x123...", "ethereum");
2108
+ * ```
2109
+ *
2110
+ * @param name The name of the trace
2111
+ * @param includeClientMeta Optional flag to automatically include client metadata
2112
+ * @returns A ParallaxTrace builder instance
4413
2113
  */
4414
- async createStartSpanRequest({ traceId, name, parentSpanId, attr, includeClientMeta = false }) {
4415
- const startSpanReq = new parallax_gateway_pbExports.StartSpanRequest();
4416
- startSpanReq.setTraceId(traceId);
4417
- startSpanReq.setName(name);
4418
- if (parentSpanId) {
4419
- startSpanReq.setParentSpanId(parentSpanId);
4420
- }
4421
- const spanAttrs = startSpanReq.getAttributesMap();
4422
- if (attr) {
4423
- Object.entries(attr).forEach(([key, value]) => {
4424
- if (key.includes('client.')) {
4425
- console.warn(`Attribute key "${key}" is reserved for client metadata. It will be prefixed with "custom."`);
4426
- }
4427
- else {
4428
- spanAttrs.set(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4429
- }
4430
- });
4431
- }
4432
- try {
4433
- if (includeClientMeta) {
4434
- const clientMetadata = await this.getClientMetadata();
4435
- Object.entries(clientMetadata).forEach(([key, value]) => {
4436
- spanAttrs.set(`client.${key}`, value);
4437
- });
4438
- }
4439
- }
4440
- catch (error) {
4441
- console.error('Error gathering client metadata for span:', error);
4442
- }
4443
- return startSpanReq;
2114
+ trace(name, includeClientMeta = false) {
2115
+ return new ParallaxTrace(this, name, includeClientMeta);
4444
2116
  }
4445
- /**
4446
- * Start a new span within a trace
4447
- * @param params Parameters to start a new span
4448
- */
4449
- async startSpan(params) {
4450
- try {
4451
- return await this.client.startSpan(params, null);
4452
- }
4453
- catch (_error) {
4454
- debugIssue("startSpan", new Error('Error starting span'));
4455
- throw _error;
4456
- }
2117
+ }
2118
+ /**
2119
+ * Builder class for constructing traces with method chaining
2120
+ * Automatically handles web-specific features like client metadata
2121
+ */
2122
+ class ParallaxTrace {
2123
+ constructor(client, name, includeClientMeta = false) {
2124
+ Object.defineProperty(this, "name", {
2125
+ enumerable: true,
2126
+ configurable: true,
2127
+ writable: true,
2128
+ value: void 0
2129
+ });
2130
+ Object.defineProperty(this, "attributes", {
2131
+ enumerable: true,
2132
+ configurable: true,
2133
+ writable: true,
2134
+ value: {}
2135
+ });
2136
+ Object.defineProperty(this, "tags", {
2137
+ enumerable: true,
2138
+ configurable: true,
2139
+ writable: true,
2140
+ value: []
2141
+ });
2142
+ Object.defineProperty(this, "events", {
2143
+ enumerable: true,
2144
+ configurable: true,
2145
+ writable: true,
2146
+ value: []
2147
+ });
2148
+ Object.defineProperty(this, "txHashHint", {
2149
+ enumerable: true,
2150
+ configurable: true,
2151
+ writable: true,
2152
+ value: void 0
2153
+ });
2154
+ Object.defineProperty(this, "client", {
2155
+ enumerable: true,
2156
+ configurable: true,
2157
+ writable: true,
2158
+ value: void 0
2159
+ });
2160
+ Object.defineProperty(this, "includeClientMeta", {
2161
+ enumerable: true,
2162
+ configurable: true,
2163
+ writable: true,
2164
+ value: void 0
2165
+ });
2166
+ this.client = client;
2167
+ this.name = name;
2168
+ this.includeClientMeta = includeClientMeta;
4457
2169
  }
4458
2170
  /**
4459
- * Create a FinishSpanRequest
4460
- * @param params Parameters to finish a span - traceId, spanId, status (optional) (success, errorMessage)
4461
- * @returns FinishSpanRequest
2171
+ * Add an attribute to the trace
2172
+ * @param key Attribute key
2173
+ * @param value Attribute value (will be converted to string)
2174
+ * @returns This trace builder for chaining
4462
2175
  */
4463
- createFinishSpanRequest({ traceId, spanId, status }) {
4464
- const request = new parallax_gateway_pbExports.FinishSpanRequest();
4465
- request.setTraceId(traceId);
4466
- request.setSpanId(spanId);
4467
- if (status !== undefined) {
4468
- const spanStatus = new parallax_gateway_pbExports.FinishSpanRequest.SpanStatus();
4469
- spanStatus.setCode(status.success ? parallax_gateway_pbExports.FinishSpanRequest.SpanStatus.StatusCode.STATUS_CODE_OK : parallax_gateway_pbExports.FinishSpanRequest.SpanStatus.StatusCode.STATUS_CODE_ERROR);
4470
- if (status.errorMessage) {
4471
- spanStatus.setMessage(status.errorMessage);
4472
- }
4473
- request.setStatus(spanStatus);
4474
- }
4475
- return request;
2176
+ addAttribute(key, value) {
2177
+ this.attributes[key] = String(value);
2178
+ return this;
4476
2179
  }
4477
2180
  /**
4478
- * Finish a span within a trace
4479
- * @param params Parameters to finish a span
2181
+ * Add multiple attributes to the trace
2182
+ * @param attributes Object containing key-value pairs
2183
+ * @returns This trace builder for chaining
4480
2184
  */
4481
- async finishSpan(params) {
4482
- try {
4483
- return await this.client.finishSpan(params, null);
4484
- }
4485
- catch (_error) {
4486
- debugIssue("finishSpan", new Error('Error finishing span'));
4487
- throw _error;
2185
+ addAttributes(attributes) {
2186
+ for (const [key, value] of Object.entries(attributes)) {
2187
+ this.attributes[key] = String(value);
4488
2188
  }
2189
+ return this;
4489
2190
  }
4490
2191
  /**
4491
- * Creates the add span event request
4492
- * @param params - Parameters to create an AddSpanEventRequest - traceId, spanId, eventName, attr (optional)
4493
- * @returns AddSpanEventRequest
2192
+ * Add a tag to the trace
2193
+ * @param tag Tag to add
2194
+ * @returns This trace builder for chaining
4494
2195
  */
4495
- createAddSpanEventRequest({ traceId, spanId, eventName, attr }) {
4496
- const request = new parallax_gateway_pbExports.AddSpanEventRequest();
4497
- request.setTraceId(traceId);
4498
- request.setSpanId(spanId);
4499
- request.setEventName(eventName);
4500
- const eventAttrs = request.getAttributesMap();
4501
- if (attr) {
4502
- Object.entries(attr).forEach(([key, value]) => {
4503
- eventAttrs.set(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4504
- });
4505
- }
4506
- eventAttrs.set('timestamp', new Date().toISOString());
4507
- return request;
2196
+ addTag(tag) {
2197
+ this.tags.push(tag);
2198
+ return this;
4508
2199
  }
4509
2200
  /**
4510
- * Add an event to a span
4511
- * @param params Parameters to add an event to a span
2201
+ * Add multiple tags to the trace
2202
+ * @param tags Array of tags to add
2203
+ * @returns This trace builder for chaining
4512
2204
  */
4513
- async addSpanEvent(params) {
4514
- try {
4515
- return await this.client.addSpanEvent(params, null);
4516
- }
4517
- catch (_error) {
4518
- debugIssue("addSpanEvent", new Error('Error adding span event'));
4519
- throw _error;
4520
- }
2205
+ addTags(tags) {
2206
+ this.tags.push(...tags);
2207
+ return this;
4521
2208
  }
4522
2209
  /**
4523
- * Creates the add span error request
4524
- * @param params - params used to generate the error request ( traceid, span id, error message, error type, stack trace)
4525
- * @returns AddSpanErrorRequest
2210
+ * Add an event to the trace
2211
+ * @param eventName Name of the event
2212
+ * @param details Optional details (can be a JSON string or object that will be stringified)
2213
+ * @param timestamp Optional timestamp (defaults to current time)
2214
+ * @returns This trace builder for chaining
4526
2215
  */
4527
- createAddSpanErrorRequest({ traceId, spanId, errorMessage, errorType, stackTrace }) {
4528
- const request = new parallax_gateway_pbExports.AddSpanErrorRequest();
4529
- request.setTraceId(traceId);
4530
- request.setSpanId(spanId);
4531
- request.setMessage(errorMessage);
4532
- if (errorType) {
4533
- request.setErrorType(errorType);
4534
- }
4535
- if (stackTrace) {
4536
- request.setStackTrace(stackTrace);
4537
- }
4538
- return request;
2216
+ addEvent(eventName, details, timestamp) {
2217
+ const detailsString = typeof details === 'object' && details !== null
2218
+ ? JSON.stringify(details)
2219
+ : details;
2220
+ this.events.push({
2221
+ eventName,
2222
+ details: detailsString,
2223
+ timestamp: timestamp || new Date(),
2224
+ });
2225
+ return this;
4539
2226
  }
4540
2227
  /**
4541
- * Add an error to a span
4542
- * @param params Parameters to add an error to a span
2228
+ * Set or update the transaction hash hint
2229
+ * @param txHash Transaction hash
2230
+ * @param chainId Chain ID (e.g., "ethereum", "polygon")
2231
+ * @param details Optional details about the transaction
2232
+ * @param timestamp Optional timestamp (defaults to current time)
2233
+ * @returns This trace builder for chaining
4543
2234
  */
4544
- async addSpanError(params) {
4545
- try {
4546
- return await this.client.addSpanError(params, null);
4547
- }
4548
- catch (_error) {
4549
- debugIssue("addSpanError", new Error('Error adding span error'));
4550
- throw _error;
4551
- }
2235
+ setTxHash(txHash, chainId, details, timestamp) {
2236
+ this.txHashHint = {
2237
+ txHash,
2238
+ chainId,
2239
+ details,
2240
+ timestamp: timestamp || new Date(),
2241
+ };
2242
+ return this;
4552
2243
  }
4553
- /**
4554
- * Creates the add span hint request
4555
- * @param params - params used to generate the span hint (trace id, parentSpanId, txHash and chainId)
4556
- * @returns AddSpanHintRequest
4557
- */
4558
- createAddSpanHintRequest({ traceId, parentSpanId, txHash, chainId }) {
4559
- const hintReq = new parallax_gateway_pbExports.AddSpanHintRequest();
4560
- hintReq.setTraceId(traceId);
4561
- hintReq.setParentSpanId(parentSpanId);
4562
- if (txHash && chainId !== undefined) {
4563
- const chainTxReq = new parallax_gateway_pbExports.AddSpanHintRequest.ChainTransaction();
4564
- chainTxReq.setTxHash(txHash);
4565
- chainTxReq.setChainId(chainId);
4566
- hintReq.setChainTransaction(chainTxReq);
2244
+ async submit(txHash, chainId, details) {
2245
+ // If txHash and chainId are provided in submit(), they override any previously set txHashHint
2246
+ const finalTxHashHint = txHash && chainId ? {
2247
+ txHash,
2248
+ chainId,
2249
+ details,
2250
+ timestamp: new Date(),
2251
+ } : this.txHashHint;
2252
+ // Build the CreateTraceRequest
2253
+ const request = new parallax_gateway_pbExports.CreateTraceRequest();
2254
+ request.setName(this.name);
2255
+ request.setTagsList(this.tags);
2256
+ // Add attributes
2257
+ const attrsMap = request.getAttributesMap();
2258
+ for (const [key, value] of Object.entries(this.attributes)) {
2259
+ attrsMap.set(key, value);
4567
2260
  }
4568
- return hintReq;
4569
- }
4570
- /**
4571
- * Add a hint to a span
4572
- * @param params Parameters to add a hint to a span
4573
- */
4574
- async addSpanHint(params) {
4575
- try {
4576
- return await this.client.addSpanHint(params, null);
2261
+ // Add client metadata if requested
2262
+ if (this.includeClientMeta) {
2263
+ const clientMetadata = await this.client.getClientMetadata();
2264
+ for (const [key, value] of Object.entries(clientMetadata)) {
2265
+ attrsMap.set(`client.${key}`, value);
2266
+ }
4577
2267
  }
4578
- catch (_error) {
4579
- debugIssue("addSpanHint", new Error('Error adding span hint'));
4580
- throw _error;
2268
+ // Add events
2269
+ const eventsList = [];
2270
+ for (const event of this.events) {
2271
+ const eventMsg = new parallax_gateway_pbExports.CreateTraceRequest.Event();
2272
+ eventMsg.setEventName(event.eventName);
2273
+ if (event.details) {
2274
+ eventMsg.setDetails(event.details);
2275
+ }
2276
+ const timestamp = new timestamp_pbExports.Timestamp();
2277
+ timestamp.fromDate(event.timestamp);
2278
+ eventMsg.setTimestamp(timestamp);
2279
+ eventsList.push(eventMsg);
2280
+ }
2281
+ request.setEventsList(eventsList);
2282
+ // Add transaction hash hint if present
2283
+ if (finalTxHashHint) {
2284
+ const txHint = new parallax_gateway_pbExports.CreateTraceRequest.TxHashHint();
2285
+ txHint.setTxHash(finalTxHashHint.txHash);
2286
+ txHint.setChainId(finalTxHashHint.chainId);
2287
+ if (finalTxHashHint.details) {
2288
+ txHint.setDetails(finalTxHashHint.details);
2289
+ }
2290
+ const timestamp = new timestamp_pbExports.Timestamp();
2291
+ timestamp.fromDate(finalTxHashHint.timestamp);
2292
+ txHint.setTimestamp(timestamp);
2293
+ request.setTxHashHint(txHint);
4581
2294
  }
2295
+ return this.client.createTrace(request);
4582
2296
  }
4583
2297
  }
4584
2298
 
@@ -4689,17 +2403,245 @@ class GrpcWebRpc {
4689
2403
  }
4690
2404
  }
4691
2405
 
4692
- var AddSpanErrorRequest = parallax_gateway_pbExports.AddSpanErrorRequest;
4693
- var AddSpanErrorResponse = parallax_gateway_pbExports.AddSpanErrorResponse;
4694
- var AddSpanEventRequest = parallax_gateway_pbExports.AddSpanEventRequest;
4695
- var AddSpanEventResponse = parallax_gateway_pbExports.AddSpanEventResponse;
4696
- var AddSpanHintRequest = parallax_gateway_pbExports.AddSpanHintRequest;
4697
- var AddSpanHintResponse = parallax_gateway_pbExports.AddSpanHintResponse;
2406
+ /**
2407
+ * Parallax Service - Transaction Tracing for Web Applications
2408
+ * Creates individual traces for each transaction and tracks them through their lifecycle
2409
+ *
2410
+ * This service provides a simplified interface for tracking transactions with automatic
2411
+ * client metadata collection and lifecycle management.
2412
+ */
2413
+ class ParallaxService {
2414
+ constructor() {
2415
+ Object.defineProperty(this, "client", {
2416
+ enumerable: true,
2417
+ configurable: true,
2418
+ writable: true,
2419
+ value: null
2420
+ });
2421
+ Object.defineProperty(this, "activeTransactions", {
2422
+ enumerable: true,
2423
+ configurable: true,
2424
+ writable: true,
2425
+ value: new Map()
2426
+ });
2427
+ // Client will be initialized lazily
2428
+ }
2429
+ /**
2430
+ * Initialize the Parallax client (lazy initialization)
2431
+ * @param apiKey - Optional API key for authentication
2432
+ * @param gatewayUrl - Optional custom gateway URL
2433
+ */
2434
+ _ensureClient(apiKey, gatewayUrl) {
2435
+ if (this.client)
2436
+ return;
2437
+ // Determine gateway URL based on environment if not provided
2438
+ let url = gatewayUrl;
2439
+ if (!url && typeof window !== 'undefined') {
2440
+ const isDevelopment = window.location.hostname === 'localhost' ||
2441
+ window.location.hostname === '127.0.0.1';
2442
+ url = isDevelopment
2443
+ ? `${window.location.protocol}//${window.location.host}/parallax-gateway`
2444
+ : 'https://gateway-parallax-dev.mirador.org';
2445
+ }
2446
+ this.client = new ParallaxClient(apiKey || '', url);
2447
+ console.log('[ParallaxService] Client initialized with URL:', url);
2448
+ }
2449
+ /**
2450
+ * Start a new transaction trace
2451
+ * Called when user initiates a transaction
2452
+ *
2453
+ * Uses the builder pattern to create a trace with events
2454
+ *
2455
+ * @param txData - Transaction data
2456
+ * @param name - Name for the trace (e.g., 'SendingTrace', 'SwappingTrace')
2457
+ * @param options - Optional configuration (apiKey, gatewayUrl, includeClientMeta)
2458
+ * @returns Promise with traceId, rootSpanId, and txId
2459
+ */
2460
+ async startTransactionTrace(txData, name = 'WalletTransaction', options) {
2461
+ this._ensureClient(options?.apiKey, options?.gatewayUrl);
2462
+ if (!this.client) {
2463
+ throw new Error('Failed to initialize Parallax client');
2464
+ }
2465
+ try {
2466
+ const txId = `tx_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
2467
+ const timestamp = new Date();
2468
+ // Build the trace using the builder pattern
2469
+ const builder = this.client
2470
+ .trace(name, options?.includeClientMeta ?? true)
2471
+ .addAttribute('transactionId', txId)
2472
+ .addAttribute('walletAddress', txData.walletAddress || txData.from)
2473
+ .addAttribute('network', txData.network || 'Unknown')
2474
+ .addAttribute('transactionStart', timestamp.toISOString())
2475
+ .addAttribute('from', txData.from)
2476
+ .addAttribute('to', txData.to)
2477
+ .addAttribute('value', txData.value)
2478
+ .addTags(['transaction', 'wallet', txData.network || 'unknown'])
2479
+ .addEvent('transaction_initiated', {
2480
+ from: txData.from,
2481
+ to: txData.to,
2482
+ value: txData.value,
2483
+ timestamp: timestamp.toISOString(),
2484
+ });
2485
+ // Add any additional transaction data as attributes
2486
+ if (txData.additionalData) {
2487
+ Object.entries(txData.additionalData).forEach(([key, value]) => {
2488
+ builder.addAttribute(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
2489
+ });
2490
+ }
2491
+ // Submit the trace
2492
+ const traceResponse = await builder.submit();
2493
+ const traceId = traceResponse.getTraceId();
2494
+ // Store transaction info
2495
+ this.activeTransactions.set(txId, {
2496
+ traceId,
2497
+ timestamp: timestamp.toISOString(),
2498
+ txHash: null,
2499
+ from: txData.from,
2500
+ to: txData.to,
2501
+ network: txData.network,
2502
+ });
2503
+ console.log('[ParallaxService] Transaction trace started:', {
2504
+ txId,
2505
+ traceId,
2506
+ from: txData.from,
2507
+ to: txData.to,
2508
+ });
2509
+ return { traceId, rootSpanId: traceId, txId };
2510
+ }
2511
+ catch (error) {
2512
+ console.error('[ParallaxService] Failed to start transaction trace:', error);
2513
+ throw error;
2514
+ }
2515
+ }
2516
+ /**
2517
+ * Associate a transaction hash with an existing trace
2518
+ * Called when the transaction hash is available after signing/sending
2519
+ *
2520
+ * NOTE: This method is deprecated as the new API does not support adding hints to existing traces.
2521
+ * Transaction hashes should be provided at trace creation time via the builder's submit(txHash, chainId) method.
2522
+ *
2523
+ * @param txId - Transaction identifier returned from startTransactionTrace
2524
+ * @param txHash - Blockchain transaction hash
2525
+ * @param chainId - Chain ID
2526
+ * @deprecated Use submit(txHash, chainId) when creating the trace instead
2527
+ */
2528
+ async associateTransactionHash(txId, txHash, chainId) {
2529
+ const txInfo = this.activeTransactions.get(txId);
2530
+ if (!txInfo) {
2531
+ console.warn(`[ParallaxService] Transaction ${txId} not found in active transactions`);
2532
+ return;
2533
+ }
2534
+ // Update stored tx info
2535
+ txInfo.txHash = txHash;
2536
+ this.activeTransactions.set(txId, txInfo);
2537
+ console.warn('[ParallaxService] associateTransactionHash is deprecated. The new API does not support adding transaction hashes after trace creation. Please provide the txHash when creating the trace using submit(txHash, chainId).');
2538
+ console.log('[ParallaxService] Transaction hash updated in local cache:', {
2539
+ txId,
2540
+ txHash,
2541
+ traceId: txInfo.traceId,
2542
+ });
2543
+ }
2544
+ /**
2545
+ * Add an event to a transaction trace
2546
+ *
2547
+ * NOTE: This method is deprecated as the new API does not support adding events to existing traces.
2548
+ * Events should be added to the trace builder before calling submit().
2549
+ *
2550
+ * @param txId - Transaction identifier
2551
+ * @param eventName - Event name
2552
+ * @param attributes - Event attributes
2553
+ * @deprecated Use the trace builder's addEvent() method before calling submit() instead
2554
+ */
2555
+ async addTransactionEvent(txId, eventName, attributes = {}) {
2556
+ const txInfo = this.activeTransactions.get(txId);
2557
+ if (!txInfo) {
2558
+ console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot add event '${eventName}'`);
2559
+ return;
2560
+ }
2561
+ console.warn('[ParallaxService] addTransactionEvent is deprecated. The new API does not support adding events after trace creation. Events should be added using the builder pattern before calling submit().');
2562
+ }
2563
+ /**
2564
+ * Add an error to a transaction trace
2565
+ *
2566
+ * NOTE: This method is deprecated as the new API does not support adding errors to existing traces.
2567
+ * Errors should be added as events to the trace builder before calling submit().
2568
+ *
2569
+ * @param txId - Transaction identifier
2570
+ * @param error - Error object or message
2571
+ * @param errorType - Type/category of error (e.g., 'TransactionError', 'NetworkError', 'UserRejection')
2572
+ * @deprecated Use the trace builder's addEvent() method to add error events before calling submit() instead
2573
+ */
2574
+ async addTransactionError(txId, error, errorType = 'TransactionError') {
2575
+ const txInfo = this.activeTransactions.get(txId);
2576
+ if (!txInfo) {
2577
+ console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot add error.`);
2578
+ return;
2579
+ }
2580
+ console.warn('[ParallaxService] addTransactionError is deprecated. The new API does not support adding errors after trace creation. Add error events using the builder pattern before calling submit().');
2581
+ }
2582
+ /**
2583
+ * Finish a transaction trace
2584
+ *
2585
+ * NOTE: This method is deprecated as the new API does not support span lifecycle management.
2586
+ * Traces are completed when submit() is called on the builder.
2587
+ *
2588
+ * @param txId - Transaction identifier
2589
+ * @param options - Finish options (success, error message)
2590
+ * @deprecated Traces are automatically completed when submit() is called
2591
+ */
2592
+ async finishTransactionTrace(txId, options = { success: true }) {
2593
+ const txInfo = this.activeTransactions.get(txId);
2594
+ if (!txInfo) {
2595
+ console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot finish.`);
2596
+ return;
2597
+ }
2598
+ console.warn('[ParallaxService] finishTransactionTrace is deprecated. The new API does not support span lifecycle. Traces are completed when submit() is called.');
2599
+ console.log('[ParallaxService] Transaction trace marked as finished (local only):', {
2600
+ txId,
2601
+ traceId: txInfo.traceId,
2602
+ success: options.success,
2603
+ txHash: txInfo.txHash,
2604
+ });
2605
+ // Remove from active transactions
2606
+ this.activeTransactions.delete(txId);
2607
+ }
2608
+ /**
2609
+ * Get info about an active transaction
2610
+ *
2611
+ * @param txId - Transaction identifier
2612
+ * @returns Transaction info or null if not found
2613
+ */
2614
+ getTransactionInfo(txId) {
2615
+ return this.activeTransactions.get(txId) || null;
2616
+ }
2617
+ /**
2618
+ * Get all active transactions
2619
+ *
2620
+ * @returns Array of active transaction info
2621
+ */
2622
+ getAllActiveTransactions() {
2623
+ return Array.from(this.activeTransactions.entries()).map(([txId, info]) => ({
2624
+ txId,
2625
+ ...info,
2626
+ }));
2627
+ }
2628
+ /**
2629
+ * Get the ParallaxClient instance for advanced usage
2630
+ * @param apiKey - Optional API key
2631
+ * @param gatewayUrl - Optional gateway URL
2632
+ */
2633
+ getClient(apiKey, gatewayUrl) {
2634
+ this._ensureClient(apiKey, gatewayUrl);
2635
+ if (!this.client) {
2636
+ throw new Error('Failed to initialize Parallax client');
2637
+ }
2638
+ return this.client;
2639
+ }
2640
+ }
2641
+ // Export singleton instance
2642
+ const parallaxService = new ParallaxService();
2643
+
4698
2644
  var CreateTraceRequest = parallax_gateway_pbExports.CreateTraceRequest;
4699
2645
  var CreateTraceResponse = parallax_gateway_pbExports.CreateTraceResponse;
4700
- var FinishSpanRequest = parallax_gateway_pbExports.FinishSpanRequest;
4701
- var FinishSpanResponse = parallax_gateway_pbExports.FinishSpanResponse;
4702
- var StartSpanRequest = parallax_gateway_pbExports.StartSpanRequest;
4703
- var StartSpanResponse = parallax_gateway_pbExports.StartSpanResponse;
4704
- export { AddSpanErrorRequest, AddSpanErrorResponse, AddSpanEventRequest, AddSpanEventResponse, AddSpanHintRequest, AddSpanHintResponse, CreateTraceRequest, CreateTraceResponse, FinishSpanRequest, FinishSpanResponse, GrpcWebRpc, ParallaxClient, StartSpanRequest, StartSpanResponse };
2646
+ export { CreateTraceRequest, CreateTraceResponse, GrpcWebRpc, ParallaxClient, ParallaxService, ParallaxTrace, parallaxService };
4705
2647
  //# sourceMappingURL=index.esm.js.map