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