@injectivelabs/indexer-proto-ts-v2 1.18.13 → 1.18.14
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/generated/injective_accounts_rpc_pb.d.ts +1 -43
- package/generated/injective_accounts_rpc_pb.js +0 -43
- package/generated/injective_derivative_exchange_rpc_pb.d.ts +1 -43
- package/generated/injective_derivative_exchange_rpc_pb.js +0 -43
- package/generated/injective_tc_derivatives_rpc_pb.d.ts +26 -24
- package/generated/injective_tc_derivatives_rpc_pb.js +12 -12
- package/package.json +1 -1
|
@@ -1023,24 +1023,6 @@ export interface DerivativeTrade {
|
|
|
1023
1023
|
* @generated from protobuf field: string pnl = 14
|
|
1024
1024
|
*/
|
|
1025
1025
|
pnl: string;
|
|
1026
|
-
/**
|
|
1027
|
-
* True if the position associated with this trade is long
|
|
1028
|
-
*
|
|
1029
|
-
* @generated from protobuf field: bool position_is_long = 15
|
|
1030
|
-
*/
|
|
1031
|
-
positionIsLong: boolean;
|
|
1032
|
-
/**
|
|
1033
|
-
* Timestamp when the position was opened in UNIX millis
|
|
1034
|
-
*
|
|
1035
|
-
* @generated from protobuf field: sint64 position_opened_at = 16
|
|
1036
|
-
*/
|
|
1037
|
-
positionOpenedAt: bigint;
|
|
1038
|
-
/**
|
|
1039
|
-
* Entry price of the position associated with this trade
|
|
1040
|
-
*
|
|
1041
|
-
* @generated from protobuf field: string position_entry_price = 17
|
|
1042
|
-
*/
|
|
1043
|
-
positionEntryPrice: string;
|
|
1044
1026
|
}
|
|
1045
1027
|
/**
|
|
1046
1028
|
* @generated from protobuf message injective_accounts_rpc.PositionDelta
|
|
@@ -4079,10 +4061,7 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
4079
4061
|
{ no: 11, name: "trade_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
4080
4062
|
{ no: 12, name: "execution_side", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
4081
4063
|
{ no: 13, name: "cid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
4082
|
-
{ no: 14, name: "pnl", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
4083
|
-
{ no: 15, name: "position_is_long", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
4084
|
-
{ no: 16, name: "position_opened_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
4085
|
-
{ no: 17, name: "position_entry_price", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
4064
|
+
{ no: 14, name: "pnl", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
4086
4065
|
]);
|
|
4087
4066
|
}
|
|
4088
4067
|
create(value?: PartialMessage<DerivativeTrade>): DerivativeTrade {
|
|
@@ -4100,9 +4079,6 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
4100
4079
|
message.executionSide = "";
|
|
4101
4080
|
message.cid = "";
|
|
4102
4081
|
message.pnl = "";
|
|
4103
|
-
message.positionIsLong = false;
|
|
4104
|
-
message.positionOpenedAt = 0n;
|
|
4105
|
-
message.positionEntryPrice = "";
|
|
4106
4082
|
if (value !== undefined)
|
|
4107
4083
|
reflectionMergePartial<DerivativeTrade>(this, message, value);
|
|
4108
4084
|
return message;
|
|
@@ -4154,15 +4130,6 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
4154
4130
|
case /* string pnl */ 14:
|
|
4155
4131
|
message.pnl = reader.string();
|
|
4156
4132
|
break;
|
|
4157
|
-
case /* bool position_is_long */ 15:
|
|
4158
|
-
message.positionIsLong = reader.bool();
|
|
4159
|
-
break;
|
|
4160
|
-
case /* sint64 position_opened_at */ 16:
|
|
4161
|
-
message.positionOpenedAt = reader.sint64().toBigInt();
|
|
4162
|
-
break;
|
|
4163
|
-
case /* string position_entry_price */ 17:
|
|
4164
|
-
message.positionEntryPrice = reader.string();
|
|
4165
|
-
break;
|
|
4166
4133
|
default:
|
|
4167
4134
|
let u = options.readUnknownField;
|
|
4168
4135
|
if (u === "throw")
|
|
@@ -4217,15 +4184,6 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
4217
4184
|
/* string pnl = 14; */
|
|
4218
4185
|
if (message.pnl !== "")
|
|
4219
4186
|
writer.tag(14, WireType.LengthDelimited).string(message.pnl);
|
|
4220
|
-
/* bool position_is_long = 15; */
|
|
4221
|
-
if (message.positionIsLong !== false)
|
|
4222
|
-
writer.tag(15, WireType.Varint).bool(message.positionIsLong);
|
|
4223
|
-
/* sint64 position_opened_at = 16; */
|
|
4224
|
-
if (message.positionOpenedAt !== 0n)
|
|
4225
|
-
writer.tag(16, WireType.Varint).sint64(message.positionOpenedAt);
|
|
4226
|
-
/* string position_entry_price = 17; */
|
|
4227
|
-
if (message.positionEntryPrice !== "")
|
|
4228
|
-
writer.tag(17, WireType.LengthDelimited).string(message.positionEntryPrice);
|
|
4229
4187
|
let u = options.writeUnknownFields;
|
|
4230
4188
|
if (u !== false)
|
|
4231
4189
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -2994,28 +2994,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
2994
2994
|
kind: "scalar",
|
|
2995
2995
|
T: 9
|
|
2996
2996
|
/*ScalarType.STRING*/
|
|
2997
|
-
},
|
|
2998
|
-
{
|
|
2999
|
-
no: 15,
|
|
3000
|
-
name: "position_is_long",
|
|
3001
|
-
kind: "scalar",
|
|
3002
|
-
T: 8
|
|
3003
|
-
/*ScalarType.BOOL*/
|
|
3004
|
-
},
|
|
3005
|
-
{
|
|
3006
|
-
no: 16,
|
|
3007
|
-
name: "position_opened_at",
|
|
3008
|
-
kind: "scalar",
|
|
3009
|
-
T: 18,
|
|
3010
|
-
L: 0
|
|
3011
|
-
/*LongType.BIGINT*/
|
|
3012
|
-
},
|
|
3013
|
-
{
|
|
3014
|
-
no: 17,
|
|
3015
|
-
name: "position_entry_price",
|
|
3016
|
-
kind: "scalar",
|
|
3017
|
-
T: 9
|
|
3018
|
-
/*ScalarType.STRING*/
|
|
3019
2997
|
}
|
|
3020
2998
|
]);
|
|
3021
2999
|
}
|
|
@@ -3034,9 +3012,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
3034
3012
|
message.executionSide = "";
|
|
3035
3013
|
message.cid = "";
|
|
3036
3014
|
message.pnl = "";
|
|
3037
|
-
message.positionIsLong = false;
|
|
3038
|
-
message.positionOpenedAt = 0n;
|
|
3039
|
-
message.positionEntryPrice = "";
|
|
3040
3015
|
if (value !== void 0)
|
|
3041
3016
|
reflectionMergePartial(this, message, value);
|
|
3042
3017
|
return message;
|
|
@@ -3102,18 +3077,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
3102
3077
|
14:
|
|
3103
3078
|
message.pnl = reader.string();
|
|
3104
3079
|
break;
|
|
3105
|
-
case /* bool position_is_long */
|
|
3106
|
-
15:
|
|
3107
|
-
message.positionIsLong = reader.bool();
|
|
3108
|
-
break;
|
|
3109
|
-
case /* sint64 position_opened_at */
|
|
3110
|
-
16:
|
|
3111
|
-
message.positionOpenedAt = reader.sint64().toBigInt();
|
|
3112
|
-
break;
|
|
3113
|
-
case /* string position_entry_price */
|
|
3114
|
-
17:
|
|
3115
|
-
message.positionEntryPrice = reader.string();
|
|
3116
|
-
break;
|
|
3117
3080
|
default:
|
|
3118
3081
|
let u = options.readUnknownField;
|
|
3119
3082
|
if (u === "throw")
|
|
@@ -3154,12 +3117,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
3154
3117
|
writer.tag(13, WireType.LengthDelimited).string(message.cid);
|
|
3155
3118
|
if (message.pnl !== "")
|
|
3156
3119
|
writer.tag(14, WireType.LengthDelimited).string(message.pnl);
|
|
3157
|
-
if (message.positionIsLong !== false)
|
|
3158
|
-
writer.tag(15, WireType.Varint).bool(message.positionIsLong);
|
|
3159
|
-
if (message.positionOpenedAt !== 0n)
|
|
3160
|
-
writer.tag(16, WireType.Varint).sint64(message.positionOpenedAt);
|
|
3161
|
-
if (message.positionEntryPrice !== "")
|
|
3162
|
-
writer.tag(17, WireType.LengthDelimited).string(message.positionEntryPrice);
|
|
3163
3120
|
let u = options.writeUnknownFields;
|
|
3164
3121
|
if (u !== false)
|
|
3165
3122
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -2090,24 +2090,6 @@ export interface DerivativeTrade {
|
|
|
2090
2090
|
* @generated from protobuf field: string pnl = 14
|
|
2091
2091
|
*/
|
|
2092
2092
|
pnl: string;
|
|
2093
|
-
/**
|
|
2094
|
-
* True if the position associated with this trade is long
|
|
2095
|
-
*
|
|
2096
|
-
* @generated from protobuf field: bool position_is_long = 15
|
|
2097
|
-
*/
|
|
2098
|
-
positionIsLong: boolean;
|
|
2099
|
-
/**
|
|
2100
|
-
* Timestamp when the position was opened in UNIX millis
|
|
2101
|
-
*
|
|
2102
|
-
* @generated from protobuf field: sint64 position_opened_at = 16
|
|
2103
|
-
*/
|
|
2104
|
-
positionOpenedAt: bigint;
|
|
2105
|
-
/**
|
|
2106
|
-
* Entry price of the position associated with this trade
|
|
2107
|
-
*
|
|
2108
|
-
* @generated from protobuf field: string position_entry_price = 17
|
|
2109
|
-
*/
|
|
2110
|
-
positionEntryPrice: string;
|
|
2111
2093
|
}
|
|
2112
2094
|
/**
|
|
2113
2095
|
* @generated from protobuf message injective_derivative_exchange_rpc.PositionDelta
|
|
@@ -7369,10 +7351,7 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
7369
7351
|
{ no: 11, name: "trade_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
7370
7352
|
{ no: 12, name: "execution_side", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
7371
7353
|
{ no: 13, name: "cid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
7372
|
-
{ no: 14, name: "pnl", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
7373
|
-
{ no: 15, name: "position_is_long", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
7374
|
-
{ no: 16, name: "position_opened_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
7375
|
-
{ no: 17, name: "position_entry_price", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
7354
|
+
{ no: 14, name: "pnl", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
7376
7355
|
]);
|
|
7377
7356
|
}
|
|
7378
7357
|
create(value?: PartialMessage<DerivativeTrade>): DerivativeTrade {
|
|
@@ -7390,9 +7369,6 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
7390
7369
|
message.executionSide = "";
|
|
7391
7370
|
message.cid = "";
|
|
7392
7371
|
message.pnl = "";
|
|
7393
|
-
message.positionIsLong = false;
|
|
7394
|
-
message.positionOpenedAt = 0n;
|
|
7395
|
-
message.positionEntryPrice = "";
|
|
7396
7372
|
if (value !== undefined)
|
|
7397
7373
|
reflectionMergePartial<DerivativeTrade>(this, message, value);
|
|
7398
7374
|
return message;
|
|
@@ -7444,15 +7420,6 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
7444
7420
|
case /* string pnl */ 14:
|
|
7445
7421
|
message.pnl = reader.string();
|
|
7446
7422
|
break;
|
|
7447
|
-
case /* bool position_is_long */ 15:
|
|
7448
|
-
message.positionIsLong = reader.bool();
|
|
7449
|
-
break;
|
|
7450
|
-
case /* sint64 position_opened_at */ 16:
|
|
7451
|
-
message.positionOpenedAt = reader.sint64().toBigInt();
|
|
7452
|
-
break;
|
|
7453
|
-
case /* string position_entry_price */ 17:
|
|
7454
|
-
message.positionEntryPrice = reader.string();
|
|
7455
|
-
break;
|
|
7456
7423
|
default:
|
|
7457
7424
|
let u = options.readUnknownField;
|
|
7458
7425
|
if (u === "throw")
|
|
@@ -7507,15 +7474,6 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
7507
7474
|
/* string pnl = 14; */
|
|
7508
7475
|
if (message.pnl !== "")
|
|
7509
7476
|
writer.tag(14, WireType.LengthDelimited).string(message.pnl);
|
|
7510
|
-
/* bool position_is_long = 15; */
|
|
7511
|
-
if (message.positionIsLong !== false)
|
|
7512
|
-
writer.tag(15, WireType.Varint).bool(message.positionIsLong);
|
|
7513
|
-
/* sint64 position_opened_at = 16; */
|
|
7514
|
-
if (message.positionOpenedAt !== 0n)
|
|
7515
|
-
writer.tag(16, WireType.Varint).sint64(message.positionOpenedAt);
|
|
7516
|
-
/* string position_entry_price = 17; */
|
|
7517
|
-
if (message.positionEntryPrice !== "")
|
|
7518
|
-
writer.tag(17, WireType.LengthDelimited).string(message.positionEntryPrice);
|
|
7519
7477
|
let u = options.writeUnknownFields;
|
|
7520
7478
|
if (u !== false)
|
|
7521
7479
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -5845,28 +5845,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
5845
5845
|
kind: "scalar",
|
|
5846
5846
|
T: 9
|
|
5847
5847
|
/*ScalarType.STRING*/
|
|
5848
|
-
},
|
|
5849
|
-
{
|
|
5850
|
-
no: 15,
|
|
5851
|
-
name: "position_is_long",
|
|
5852
|
-
kind: "scalar",
|
|
5853
|
-
T: 8
|
|
5854
|
-
/*ScalarType.BOOL*/
|
|
5855
|
-
},
|
|
5856
|
-
{
|
|
5857
|
-
no: 16,
|
|
5858
|
-
name: "position_opened_at",
|
|
5859
|
-
kind: "scalar",
|
|
5860
|
-
T: 18,
|
|
5861
|
-
L: 0
|
|
5862
|
-
/*LongType.BIGINT*/
|
|
5863
|
-
},
|
|
5864
|
-
{
|
|
5865
|
-
no: 17,
|
|
5866
|
-
name: "position_entry_price",
|
|
5867
|
-
kind: "scalar",
|
|
5868
|
-
T: 9
|
|
5869
|
-
/*ScalarType.STRING*/
|
|
5870
5848
|
}
|
|
5871
5849
|
]);
|
|
5872
5850
|
}
|
|
@@ -5885,9 +5863,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
5885
5863
|
message.executionSide = "";
|
|
5886
5864
|
message.cid = "";
|
|
5887
5865
|
message.pnl = "";
|
|
5888
|
-
message.positionIsLong = false;
|
|
5889
|
-
message.positionOpenedAt = 0n;
|
|
5890
|
-
message.positionEntryPrice = "";
|
|
5891
5866
|
if (value !== void 0)
|
|
5892
5867
|
reflectionMergePartial(this, message, value);
|
|
5893
5868
|
return message;
|
|
@@ -5953,18 +5928,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
5953
5928
|
14:
|
|
5954
5929
|
message.pnl = reader.string();
|
|
5955
5930
|
break;
|
|
5956
|
-
case /* bool position_is_long */
|
|
5957
|
-
15:
|
|
5958
|
-
message.positionIsLong = reader.bool();
|
|
5959
|
-
break;
|
|
5960
|
-
case /* sint64 position_opened_at */
|
|
5961
|
-
16:
|
|
5962
|
-
message.positionOpenedAt = reader.sint64().toBigInt();
|
|
5963
|
-
break;
|
|
5964
|
-
case /* string position_entry_price */
|
|
5965
|
-
17:
|
|
5966
|
-
message.positionEntryPrice = reader.string();
|
|
5967
|
-
break;
|
|
5968
5931
|
default:
|
|
5969
5932
|
let u = options.readUnknownField;
|
|
5970
5933
|
if (u === "throw")
|
|
@@ -6005,12 +5968,6 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
6005
5968
|
writer.tag(13, WireType.LengthDelimited).string(message.cid);
|
|
6006
5969
|
if (message.pnl !== "")
|
|
6007
5970
|
writer.tag(14, WireType.LengthDelimited).string(message.pnl);
|
|
6008
|
-
if (message.positionIsLong !== false)
|
|
6009
|
-
writer.tag(15, WireType.Varint).bool(message.positionIsLong);
|
|
6010
|
-
if (message.positionOpenedAt !== 0n)
|
|
6011
|
-
writer.tag(16, WireType.Varint).sint64(message.positionOpenedAt);
|
|
6012
|
-
if (message.positionEntryPrice !== "")
|
|
6013
|
-
writer.tag(17, WireType.LengthDelimited).string(message.positionEntryPrice);
|
|
6014
5971
|
let u = options.writeUnknownFields;
|
|
6015
5972
|
if (u !== false)
|
|
6016
5973
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -517,9 +517,9 @@ export interface TradesResponse {
|
|
|
517
517
|
/**
|
|
518
518
|
* Trades of TC Derivative Markets
|
|
519
519
|
*
|
|
520
|
-
* @generated from protobuf field: repeated injective_tc_derivatives_rpc.
|
|
520
|
+
* @generated from protobuf field: repeated injective_tc_derivatives_rpc.TCDerivativeTrade trades = 1
|
|
521
521
|
*/
|
|
522
|
-
trades:
|
|
522
|
+
trades: TCDerivativeTrade[];
|
|
523
523
|
/**
|
|
524
524
|
* Next tokens for pagination
|
|
525
525
|
*
|
|
@@ -528,9 +528,11 @@ export interface TradesResponse {
|
|
|
528
528
|
next: string[];
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
531
|
-
*
|
|
531
|
+
* TC derivative trade including position metadata fields
|
|
532
|
+
*
|
|
533
|
+
* @generated from protobuf message injective_tc_derivatives_rpc.TCDerivativeTrade
|
|
532
534
|
*/
|
|
533
|
-
export interface
|
|
535
|
+
export interface TCDerivativeTrade {
|
|
534
536
|
/**
|
|
535
537
|
* Order hash.
|
|
536
538
|
*
|
|
@@ -685,9 +687,9 @@ export interface StreamTradesResponse {
|
|
|
685
687
|
/**
|
|
686
688
|
* New TC derivative market trade
|
|
687
689
|
*
|
|
688
|
-
* @generated from protobuf field: injective_tc_derivatives_rpc.
|
|
690
|
+
* @generated from protobuf field: injective_tc_derivatives_rpc.TCDerivativeTrade trade = 1
|
|
689
691
|
*/
|
|
690
|
-
trade?:
|
|
692
|
+
trade?: TCDerivativeTrade;
|
|
691
693
|
/**
|
|
692
694
|
* Executed trades update type
|
|
693
695
|
*
|
|
@@ -1926,7 +1928,7 @@ export const TradesRequest = new TradesRequest$Type();
|
|
|
1926
1928
|
class TradesResponse$Type extends MessageType<TradesResponse> {
|
|
1927
1929
|
constructor() {
|
|
1928
1930
|
super("injective_tc_derivatives_rpc.TradesResponse", [
|
|
1929
|
-
{ no: 1, name: "trades", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () =>
|
|
1931
|
+
{ no: 1, name: "trades", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TCDerivativeTrade },
|
|
1930
1932
|
{ no: 2, name: "next", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
1931
1933
|
]);
|
|
1932
1934
|
}
|
|
@@ -1943,8 +1945,8 @@ class TradesResponse$Type extends MessageType<TradesResponse> {
|
|
|
1943
1945
|
while (reader.pos < end) {
|
|
1944
1946
|
let [fieldNo, wireType] = reader.tag();
|
|
1945
1947
|
switch (fieldNo) {
|
|
1946
|
-
case /* repeated injective_tc_derivatives_rpc.
|
|
1947
|
-
message.trades.push(
|
|
1948
|
+
case /* repeated injective_tc_derivatives_rpc.TCDerivativeTrade trades */ 1:
|
|
1949
|
+
message.trades.push(TCDerivativeTrade.internalBinaryRead(reader, reader.uint32(), options));
|
|
1948
1950
|
break;
|
|
1949
1951
|
case /* repeated string next */ 2:
|
|
1950
1952
|
message.next.push(reader.string());
|
|
@@ -1961,9 +1963,9 @@ class TradesResponse$Type extends MessageType<TradesResponse> {
|
|
|
1961
1963
|
return message;
|
|
1962
1964
|
}
|
|
1963
1965
|
internalBinaryWrite(message: TradesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1964
|
-
/* repeated injective_tc_derivatives_rpc.
|
|
1966
|
+
/* repeated injective_tc_derivatives_rpc.TCDerivativeTrade trades = 1; */
|
|
1965
1967
|
for (let i = 0; i < message.trades.length; i++)
|
|
1966
|
-
|
|
1968
|
+
TCDerivativeTrade.internalBinaryWrite(message.trades[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1967
1969
|
/* repeated string next = 2; */
|
|
1968
1970
|
for (let i = 0; i < message.next.length; i++)
|
|
1969
1971
|
writer.tag(2, WireType.LengthDelimited).string(message.next[i]);
|
|
@@ -1978,9 +1980,9 @@ class TradesResponse$Type extends MessageType<TradesResponse> {
|
|
|
1978
1980
|
*/
|
|
1979
1981
|
export const TradesResponse = new TradesResponse$Type();
|
|
1980
1982
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1981
|
-
class
|
|
1983
|
+
class TCDerivativeTrade$Type extends MessageType<TCDerivativeTrade> {
|
|
1982
1984
|
constructor() {
|
|
1983
|
-
super("injective_tc_derivatives_rpc.
|
|
1985
|
+
super("injective_tc_derivatives_rpc.TCDerivativeTrade", [
|
|
1984
1986
|
{ no: 1, name: "order_hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1985
1987
|
{ no: 2, name: "subaccount_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1986
1988
|
{ no: 3, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
@@ -2000,7 +2002,7 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
2000
2002
|
{ no: 17, name: "position_entry_price", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
2001
2003
|
]);
|
|
2002
2004
|
}
|
|
2003
|
-
create(value?: PartialMessage<
|
|
2005
|
+
create(value?: PartialMessage<TCDerivativeTrade>): TCDerivativeTrade {
|
|
2004
2006
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2005
2007
|
message.orderHash = "";
|
|
2006
2008
|
message.subaccountId = "";
|
|
@@ -2019,10 +2021,10 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
2019
2021
|
message.positionOpenedAt = 0n;
|
|
2020
2022
|
message.positionEntryPrice = "";
|
|
2021
2023
|
if (value !== undefined)
|
|
2022
|
-
reflectionMergePartial<
|
|
2024
|
+
reflectionMergePartial<TCDerivativeTrade>(this, message, value);
|
|
2023
2025
|
return message;
|
|
2024
2026
|
}
|
|
2025
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
2027
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TCDerivativeTrade): TCDerivativeTrade {
|
|
2026
2028
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
2027
2029
|
while (reader.pos < end) {
|
|
2028
2030
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -2089,7 +2091,7 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
2089
2091
|
}
|
|
2090
2092
|
return message;
|
|
2091
2093
|
}
|
|
2092
|
-
internalBinaryWrite(message:
|
|
2094
|
+
internalBinaryWrite(message: TCDerivativeTrade, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2093
2095
|
/* string order_hash = 1; */
|
|
2094
2096
|
if (message.orderHash !== "")
|
|
2095
2097
|
writer.tag(1, WireType.LengthDelimited).string(message.orderHash);
|
|
@@ -2148,9 +2150,9 @@ class DerivativeTrade$Type extends MessageType<DerivativeTrade> {
|
|
|
2148
2150
|
}
|
|
2149
2151
|
}
|
|
2150
2152
|
/**
|
|
2151
|
-
* @generated MessageType for protobuf message injective_tc_derivatives_rpc.
|
|
2153
|
+
* @generated MessageType for protobuf message injective_tc_derivatives_rpc.TCDerivativeTrade
|
|
2152
2154
|
*/
|
|
2153
|
-
export const
|
|
2155
|
+
export const TCDerivativeTrade = new TCDerivativeTrade$Type();
|
|
2154
2156
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
2155
2157
|
class PositionDelta$Type extends MessageType<PositionDelta> {
|
|
2156
2158
|
constructor() {
|
|
@@ -2281,7 +2283,7 @@ export const StreamTradesRequest = new StreamTradesRequest$Type();
|
|
|
2281
2283
|
class StreamTradesResponse$Type extends MessageType<StreamTradesResponse> {
|
|
2282
2284
|
constructor() {
|
|
2283
2285
|
super("injective_tc_derivatives_rpc.StreamTradesResponse", [
|
|
2284
|
-
{ no: 1, name: "trade", kind: "message", T: () =>
|
|
2286
|
+
{ no: 1, name: "trade", kind: "message", T: () => TCDerivativeTrade },
|
|
2285
2287
|
{ no: 2, name: "operation_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2286
2288
|
{ no: 3, name: "timestamp", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
2287
2289
|
]);
|
|
@@ -2299,8 +2301,8 @@ class StreamTradesResponse$Type extends MessageType<StreamTradesResponse> {
|
|
|
2299
2301
|
while (reader.pos < end) {
|
|
2300
2302
|
let [fieldNo, wireType] = reader.tag();
|
|
2301
2303
|
switch (fieldNo) {
|
|
2302
|
-
case /* injective_tc_derivatives_rpc.
|
|
2303
|
-
message.trade =
|
|
2304
|
+
case /* injective_tc_derivatives_rpc.TCDerivativeTrade trade */ 1:
|
|
2305
|
+
message.trade = TCDerivativeTrade.internalBinaryRead(reader, reader.uint32(), options, message.trade);
|
|
2304
2306
|
break;
|
|
2305
2307
|
case /* string operation_type */ 2:
|
|
2306
2308
|
message.operationType = reader.string();
|
|
@@ -2320,9 +2322,9 @@ class StreamTradesResponse$Type extends MessageType<StreamTradesResponse> {
|
|
|
2320
2322
|
return message;
|
|
2321
2323
|
}
|
|
2322
2324
|
internalBinaryWrite(message: StreamTradesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2323
|
-
/* injective_tc_derivatives_rpc.
|
|
2325
|
+
/* injective_tc_derivatives_rpc.TCDerivativeTrade trade = 1; */
|
|
2324
2326
|
if (message.trade)
|
|
2325
|
-
|
|
2327
|
+
TCDerivativeTrade.internalBinaryWrite(message.trade, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
2326
2328
|
/* string operation_type = 2; */
|
|
2327
2329
|
if (message.operationType !== "")
|
|
2328
2330
|
writer.tag(2, WireType.LengthDelimited).string(message.operationType);
|
|
@@ -1417,7 +1417,7 @@ const TradesRequest = new TradesRequest$Type();
|
|
|
1417
1417
|
class TradesResponse$Type extends MessageType {
|
|
1418
1418
|
constructor() {
|
|
1419
1419
|
super("injective_tc_derivatives_rpc.TradesResponse", [
|
|
1420
|
-
{ no: 1, name: "trades", kind: "message", repeat: 2, T: () =>
|
|
1420
|
+
{ no: 1, name: "trades", kind: "message", repeat: 2, T: () => TCDerivativeTrade },
|
|
1421
1421
|
{
|
|
1422
1422
|
no: 2,
|
|
1423
1423
|
name: "next",
|
|
@@ -1441,9 +1441,9 @@ class TradesResponse$Type extends MessageType {
|
|
|
1441
1441
|
while (reader.pos < end) {
|
|
1442
1442
|
let [fieldNo, wireType] = reader.tag();
|
|
1443
1443
|
switch (fieldNo) {
|
|
1444
|
-
case /* repeated injective_tc_derivatives_rpc.
|
|
1444
|
+
case /* repeated injective_tc_derivatives_rpc.TCDerivativeTrade trades */
|
|
1445
1445
|
1:
|
|
1446
|
-
message.trades.push(
|
|
1446
|
+
message.trades.push(TCDerivativeTrade.internalBinaryRead(reader, reader.uint32(), options));
|
|
1447
1447
|
break;
|
|
1448
1448
|
case /* repeated string next */
|
|
1449
1449
|
2:
|
|
@@ -1462,7 +1462,7 @@ class TradesResponse$Type extends MessageType {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
internalBinaryWrite(message, writer, options) {
|
|
1464
1464
|
for (let i = 0; i < message.trades.length; i++)
|
|
1465
|
-
|
|
1465
|
+
TCDerivativeTrade.internalBinaryWrite(message.trades[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1466
1466
|
for (let i = 0; i < message.next.length; i++)
|
|
1467
1467
|
writer.tag(2, WireType.LengthDelimited).string(message.next[i]);
|
|
1468
1468
|
let u = options.writeUnknownFields;
|
|
@@ -1472,9 +1472,9 @@ class TradesResponse$Type extends MessageType {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
1474
|
const TradesResponse = new TradesResponse$Type();
|
|
1475
|
-
class
|
|
1475
|
+
class TCDerivativeTrade$Type extends MessageType {
|
|
1476
1476
|
constructor() {
|
|
1477
|
-
super("injective_tc_derivatives_rpc.
|
|
1477
|
+
super("injective_tc_derivatives_rpc.TCDerivativeTrade", [
|
|
1478
1478
|
{
|
|
1479
1479
|
no: 1,
|
|
1480
1480
|
name: "order_hash",
|
|
@@ -1739,7 +1739,7 @@ class DerivativeTrade$Type extends MessageType {
|
|
|
1739
1739
|
return writer;
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
|
-
const
|
|
1742
|
+
const TCDerivativeTrade = new TCDerivativeTrade$Type();
|
|
1743
1743
|
class PositionDelta$Type extends MessageType {
|
|
1744
1744
|
constructor() {
|
|
1745
1745
|
super("injective_tc_derivatives_rpc.PositionDelta", [
|
|
@@ -1898,7 +1898,7 @@ const StreamTradesRequest = new StreamTradesRequest$Type();
|
|
|
1898
1898
|
class StreamTradesResponse$Type extends MessageType {
|
|
1899
1899
|
constructor() {
|
|
1900
1900
|
super("injective_tc_derivatives_rpc.StreamTradesResponse", [
|
|
1901
|
-
{ no: 1, name: "trade", kind: "message", T: () =>
|
|
1901
|
+
{ no: 1, name: "trade", kind: "message", T: () => TCDerivativeTrade },
|
|
1902
1902
|
{
|
|
1903
1903
|
no: 2,
|
|
1904
1904
|
name: "operation_type",
|
|
@@ -1929,9 +1929,9 @@ class StreamTradesResponse$Type extends MessageType {
|
|
|
1929
1929
|
while (reader.pos < end) {
|
|
1930
1930
|
let [fieldNo, wireType] = reader.tag();
|
|
1931
1931
|
switch (fieldNo) {
|
|
1932
|
-
case /* injective_tc_derivatives_rpc.
|
|
1932
|
+
case /* injective_tc_derivatives_rpc.TCDerivativeTrade trade */
|
|
1933
1933
|
1:
|
|
1934
|
-
message.trade =
|
|
1934
|
+
message.trade = TCDerivativeTrade.internalBinaryRead(reader, reader.uint32(), options, message.trade);
|
|
1935
1935
|
break;
|
|
1936
1936
|
case /* string operation_type */
|
|
1937
1937
|
2:
|
|
@@ -1954,7 +1954,7 @@ class StreamTradesResponse$Type extends MessageType {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
internalBinaryWrite(message, writer, options) {
|
|
1956
1956
|
if (message.trade)
|
|
1957
|
-
|
|
1957
|
+
TCDerivativeTrade.internalBinaryWrite(message.trade, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1958
1958
|
if (message.operationType !== "")
|
|
1959
1959
|
writer.tag(2, WireType.LengthDelimited).string(message.operationType);
|
|
1960
1960
|
if (message.timestamp !== 0n)
|
|
@@ -2567,7 +2567,6 @@ const InjectiveTCDerivativesRPC = new ServiceType("injective_tc_derivatives_rpc.
|
|
|
2567
2567
|
export {
|
|
2568
2568
|
DerivativeLimitOrder,
|
|
2569
2569
|
DerivativePositionV2,
|
|
2570
|
-
DerivativeTrade,
|
|
2571
2570
|
InjectiveTCDerivativesRPC,
|
|
2572
2571
|
OrdersHistoryRequest,
|
|
2573
2572
|
OrdersHistoryResponse,
|
|
@@ -2585,6 +2584,7 @@ export {
|
|
|
2585
2584
|
StreamTradesRequest,
|
|
2586
2585
|
StreamTradesResponse,
|
|
2587
2586
|
TCDerivativeOrderHistoryType,
|
|
2587
|
+
TCDerivativeTrade,
|
|
2588
2588
|
TradesRequest,
|
|
2589
2589
|
TradesResponse
|
|
2590
2590
|
};
|