@injectivelabs/indexer-proto-ts-v2 1.17.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.
Files changed (75) hide show
  1. package/esm/generated/event_provider_api_pb.client.d.ts +156 -0
  2. package/esm/generated/event_provider_api_pb.client.mjs +76 -0
  3. package/esm/generated/event_provider_api_pb.d.ts +1966 -0
  4. package/esm/generated/event_provider_api_pb.mjs +1761 -0
  5. package/esm/generated/health_pb.client.d.ts +53 -0
  6. package/esm/generated/health_pb.client.mjs +22 -0
  7. package/esm/generated/health_pb.d.ts +309 -0
  8. package/esm/generated/health_pb.mjs +265 -0
  9. package/esm/generated/injective_accounts_rpc_pb.client.d.ts +211 -0
  10. package/esm/generated/injective_accounts_rpc_pb.client.mjs +105 -0
  11. package/esm/generated/injective_accounts_rpc_pb.d.ts +5307 -0
  12. package/esm/generated/injective_accounts_rpc_pb.mjs +4784 -0
  13. package/esm/generated/injective_archiver_rpc_pb.client.d.ts +224 -0
  14. package/esm/generated/injective_archiver_rpc_pb.client.mjs +112 -0
  15. package/esm/generated/injective_archiver_rpc_pb.d.ts +2902 -0
  16. package/esm/generated/injective_archiver_rpc_pb.mjs +2561 -0
  17. package/esm/generated/injective_auction_rpc_pb.client.d.ts +173 -0
  18. package/esm/generated/injective_auction_rpc_pb.client.mjs +85 -0
  19. package/esm/generated/injective_auction_rpc_pb.d.ts +1986 -0
  20. package/esm/generated/injective_auction_rpc_pb.mjs +1787 -0
  21. package/esm/generated/injective_campaign_rpc_pb.client.d.ts +138 -0
  22. package/esm/generated/injective_campaign_rpc_pb.client.mjs +67 -0
  23. package/esm/generated/injective_campaign_rpc_pb.d.ts +2766 -0
  24. package/esm/generated/injective_campaign_rpc_pb.mjs +2542 -0
  25. package/esm/generated/injective_chart_rpc_pb.client.d.ts +159 -0
  26. package/esm/generated/injective_chart_rpc_pb.client.mjs +78 -0
  27. package/esm/generated/injective_chart_rpc_pb.d.ts +1840 -0
  28. package/esm/generated/injective_chart_rpc_pb.mjs +1690 -0
  29. package/esm/generated/injective_derivative_exchange_rpc_pb.client.d.ts +504 -0
  30. package/esm/generated/injective_derivative_exchange_rpc_pb.client.mjs +259 -0
  31. package/esm/generated/injective_derivative_exchange_rpc_pb.d.ts +9158 -0
  32. package/esm/generated/injective_derivative_exchange_rpc_pb.mjs +8351 -0
  33. package/esm/generated/injective_exchange_rpc_pb.client.d.ts +155 -0
  34. package/esm/generated/injective_exchange_rpc_pb.client.mjs +76 -0
  35. package/esm/generated/injective_exchange_rpc_pb.d.ts +1925 -0
  36. package/esm/generated/injective_exchange_rpc_pb.mjs +1740 -0
  37. package/esm/generated/injective_explorer_rpc_pb.client.d.ts +495 -0
  38. package/esm/generated/injective_explorer_rpc_pb.client.mjs +255 -0
  39. package/esm/generated/injective_explorer_rpc_pb.d.ts +9394 -0
  40. package/esm/generated/injective_explorer_rpc_pb.mjs +8921 -0
  41. package/esm/generated/injective_insurance_rpc_pb.client.d.ts +87 -0
  42. package/esm/generated/injective_insurance_rpc_pb.client.mjs +40 -0
  43. package/esm/generated/injective_insurance_rpc_pb.d.ts +904 -0
  44. package/esm/generated/injective_insurance_rpc_pb.mjs +807 -0
  45. package/esm/generated/injective_megavault_rpc_pb.client.d.ts +155 -0
  46. package/esm/generated/injective_megavault_rpc_pb.client.mjs +76 -0
  47. package/esm/generated/injective_megavault_rpc_pb.d.ts +3380 -0
  48. package/esm/generated/injective_megavault_rpc_pb.mjs +2987 -0
  49. package/esm/generated/injective_meta_rpc_pb.client.d.ts +124 -0
  50. package/esm/generated/injective_meta_rpc_pb.client.mjs +59 -0
  51. package/esm/generated/injective_meta_rpc_pb.d.ts +825 -0
  52. package/esm/generated/injective_meta_rpc_pb.mjs +716 -0
  53. package/esm/generated/injective_oracle_rpc_pb.client.d.ts +124 -0
  54. package/esm/generated/injective_oracle_rpc_pb.client.mjs +59 -0
  55. package/esm/generated/injective_oracle_rpc_pb.d.ts +1044 -0
  56. package/esm/generated/injective_oracle_rpc_pb.mjs +915 -0
  57. package/esm/generated/injective_portfolio_rpc_pb.client.d.ts +105 -0
  58. package/esm/generated/injective_portfolio_rpc_pb.client.mjs +49 -0
  59. package/esm/generated/injective_portfolio_rpc_pb.d.ts +1464 -0
  60. package/esm/generated/injective_portfolio_rpc_pb.mjs +1286 -0
  61. package/esm/generated/injective_referral_rpc_pb.client.d.ts +89 -0
  62. package/esm/generated/injective_referral_rpc_pb.client.mjs +41 -0
  63. package/esm/generated/injective_referral_rpc_pb.d.ts +575 -0
  64. package/esm/generated/injective_referral_rpc_pb.mjs +497 -0
  65. package/esm/generated/injective_spot_exchange_rpc_pb.client.d.ts +343 -0
  66. package/esm/generated/injective_spot_exchange_rpc_pb.client.mjs +175 -0
  67. package/esm/generated/injective_spot_exchange_rpc_pb.d.ts +5958 -0
  68. package/esm/generated/injective_spot_exchange_rpc_pb.mjs +5426 -0
  69. package/esm/generated/injective_trading_rpc_pb.client.d.ts +90 -0
  70. package/esm/generated/injective_trading_rpc_pb.client.mjs +40 -0
  71. package/esm/generated/injective_trading_rpc_pb.d.ts +1882 -0
  72. package/esm/generated/injective_trading_rpc_pb.mjs +1754 -0
  73. package/esm/index.d.ts +42 -0
  74. package/esm/index.mjs +74 -0
  75. package/package.json +48 -0
@@ -0,0 +1,1044 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix
2
+ // @generated from protobuf file "injective_oracle_rpc.proto" (package "injective_oracle_rpc", syntax proto3)
3
+ // tslint:disable
4
+ //
5
+ // Code generated with goa v3.7.0, DO NOT EDIT.
6
+ //
7
+ // InjectiveOracleRPC protocol buffer definition
8
+ //
9
+ // Command:
10
+ // $ goa gen github.com/InjectiveLabs/injective-indexer/api/design -o ../
11
+ //
12
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
13
+ import { WireType } from "@protobuf-ts/runtime";
14
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
15
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
16
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
17
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
18
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
19
+ import type { PartialMessage } from "@protobuf-ts/runtime";
20
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
21
+ import { MessageType } from "@protobuf-ts/runtime";
22
+ /**
23
+ * @generated from protobuf message injective_oracle_rpc.OracleListRequest
24
+ */
25
+ export interface OracleListRequest {
26
+ }
27
+ /**
28
+ * @generated from protobuf message injective_oracle_rpc.OracleListResponse
29
+ */
30
+ export interface OracleListResponse {
31
+ /**
32
+ * @generated from protobuf field: repeated injective_oracle_rpc.Oracle oracles = 1
33
+ */
34
+ oracles: Oracle[];
35
+ }
36
+ /**
37
+ * @generated from protobuf message injective_oracle_rpc.Oracle
38
+ */
39
+ export interface Oracle {
40
+ /**
41
+ * The symbol of the oracle asset.
42
+ *
43
+ * @generated from protobuf field: string symbol = 1
44
+ */
45
+ symbol: string;
46
+ /**
47
+ * Oracle base currency
48
+ *
49
+ * @generated from protobuf field: string base_symbol = 2
50
+ */
51
+ baseSymbol: string;
52
+ /**
53
+ * Oracle quote currency
54
+ *
55
+ * @generated from protobuf field: string quote_symbol = 3
56
+ */
57
+ quoteSymbol: string;
58
+ /**
59
+ * Oracle Type
60
+ *
61
+ * @generated from protobuf field: string oracle_type = 4
62
+ */
63
+ oracleType: string;
64
+ /**
65
+ * The price of the oracle asset
66
+ *
67
+ * @generated from protobuf field: string price = 5
68
+ */
69
+ price: string;
70
+ }
71
+ /**
72
+ * @generated from protobuf message injective_oracle_rpc.PriceRequest
73
+ */
74
+ export interface PriceRequest {
75
+ /**
76
+ * Oracle base currency
77
+ *
78
+ * @generated from protobuf field: string base_symbol = 1
79
+ */
80
+ baseSymbol: string;
81
+ /**
82
+ * Oracle quote currency
83
+ *
84
+ * @generated from protobuf field: string quote_symbol = 2
85
+ */
86
+ quoteSymbol: string;
87
+ /**
88
+ * Oracle Type
89
+ *
90
+ * @generated from protobuf field: string oracle_type = 3
91
+ */
92
+ oracleType: string;
93
+ /**
94
+ * OracleScaleFactor
95
+ *
96
+ * @generated from protobuf field: uint32 oracle_scale_factor = 4
97
+ */
98
+ oracleScaleFactor: number;
99
+ }
100
+ /**
101
+ * @generated from protobuf message injective_oracle_rpc.PriceResponse
102
+ */
103
+ export interface PriceResponse {
104
+ /**
105
+ * The price of the oracle asset
106
+ *
107
+ * @generated from protobuf field: string price = 1
108
+ */
109
+ price: string;
110
+ }
111
+ /**
112
+ * @generated from protobuf message injective_oracle_rpc.PriceV2Request
113
+ */
114
+ export interface PriceV2Request {
115
+ /**
116
+ * @generated from protobuf field: repeated injective_oracle_rpc.PricePayloadV2 filters = 1
117
+ */
118
+ filters: PricePayloadV2[];
119
+ }
120
+ /**
121
+ * @generated from protobuf message injective_oracle_rpc.PricePayloadV2
122
+ */
123
+ export interface PricePayloadV2 {
124
+ /**
125
+ * Oracle base currency
126
+ *
127
+ * @generated from protobuf field: string base_symbol = 1
128
+ */
129
+ baseSymbol: string;
130
+ /**
131
+ * Oracle quote currency
132
+ *
133
+ * @generated from protobuf field: string quote_symbol = 2
134
+ */
135
+ quoteSymbol: string;
136
+ /**
137
+ * Oracle Type
138
+ *
139
+ * @generated from protobuf field: string oracle_type = 3
140
+ */
141
+ oracleType: string;
142
+ /**
143
+ * OracleScaleFactor
144
+ *
145
+ * @generated from protobuf field: uint32 oracle_scale_factor = 4
146
+ */
147
+ oracleScaleFactor: number;
148
+ }
149
+ /**
150
+ * @generated from protobuf message injective_oracle_rpc.PriceV2Response
151
+ */
152
+ export interface PriceV2Response {
153
+ /**
154
+ * @generated from protobuf field: repeated injective_oracle_rpc.PriceV2Result prices = 1
155
+ */
156
+ prices: PriceV2Result[];
157
+ }
158
+ /**
159
+ * @generated from protobuf message injective_oracle_rpc.PriceV2Result
160
+ */
161
+ export interface PriceV2Result {
162
+ /**
163
+ * Oracle base currency
164
+ *
165
+ * @generated from protobuf field: string base_symbol = 1
166
+ */
167
+ baseSymbol: string;
168
+ /**
169
+ * Oracle quote currency
170
+ *
171
+ * @generated from protobuf field: string quote_symbol = 2
172
+ */
173
+ quoteSymbol: string;
174
+ /**
175
+ * Oracle Type
176
+ *
177
+ * @generated from protobuf field: string oracle_type = 3
178
+ */
179
+ oracleType: string;
180
+ /**
181
+ * OracleScaleFactor
182
+ *
183
+ * @generated from protobuf field: uint32 oracle_scale_factor = 4
184
+ */
185
+ oracleScaleFactor: number;
186
+ /**
187
+ * The price of the oracle asset
188
+ *
189
+ * @generated from protobuf field: string price = 5
190
+ */
191
+ price: string;
192
+ /**
193
+ * marketID
194
+ *
195
+ * @generated from protobuf field: string market_id = 6
196
+ */
197
+ marketId: string;
198
+ }
199
+ /**
200
+ * @generated from protobuf message injective_oracle_rpc.StreamPricesRequest
201
+ */
202
+ export interface StreamPricesRequest {
203
+ /**
204
+ * Oracle base currency
205
+ *
206
+ * @generated from protobuf field: string base_symbol = 1
207
+ */
208
+ baseSymbol: string;
209
+ /**
210
+ * Oracle quote currency
211
+ *
212
+ * @generated from protobuf field: string quote_symbol = 2
213
+ */
214
+ quoteSymbol: string;
215
+ /**
216
+ * Oracle Type
217
+ *
218
+ * @generated from protobuf field: string oracle_type = 3
219
+ */
220
+ oracleType: string;
221
+ }
222
+ /**
223
+ * @generated from protobuf message injective_oracle_rpc.StreamPricesResponse
224
+ */
225
+ export interface StreamPricesResponse {
226
+ /**
227
+ * The price of the oracle asset
228
+ *
229
+ * @generated from protobuf field: string price = 1
230
+ */
231
+ price: string;
232
+ /**
233
+ * Operation timestamp in UNIX millis.
234
+ *
235
+ * @generated from protobuf field: sint64 timestamp = 2
236
+ */
237
+ timestamp: bigint;
238
+ }
239
+ /**
240
+ * @generated from protobuf message injective_oracle_rpc.StreamPricesByMarketsRequest
241
+ */
242
+ export interface StreamPricesByMarketsRequest {
243
+ /**
244
+ * marketIDs to stream price for, empty to listen for all prices
245
+ *
246
+ * @generated from protobuf field: repeated string market_ids = 1
247
+ */
248
+ marketIds: string[];
249
+ }
250
+ /**
251
+ * @generated from protobuf message injective_oracle_rpc.StreamPricesByMarketsResponse
252
+ */
253
+ export interface StreamPricesByMarketsResponse {
254
+ /**
255
+ * The price of the oracle asset
256
+ *
257
+ * @generated from protobuf field: string price = 1
258
+ */
259
+ price: string;
260
+ /**
261
+ * Operation timestamp in UNIX millis.
262
+ *
263
+ * @generated from protobuf field: sint64 timestamp = 2
264
+ */
265
+ timestamp: bigint;
266
+ /**
267
+ * marketID that the price has been updated
268
+ *
269
+ * @generated from protobuf field: string market_id = 3
270
+ */
271
+ marketId: string;
272
+ }
273
+ // @generated message type with reflection information, may provide speed optimized methods
274
+ class OracleListRequest$Type extends MessageType<OracleListRequest> {
275
+ constructor() {
276
+ super("injective_oracle_rpc.OracleListRequest", []);
277
+ }
278
+ create(value?: PartialMessage<OracleListRequest>): OracleListRequest {
279
+ const message = globalThis.Object.create((this.messagePrototype!));
280
+ if (value !== undefined)
281
+ reflectionMergePartial<OracleListRequest>(this, message, value);
282
+ return message;
283
+ }
284
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OracleListRequest): OracleListRequest {
285
+ let message = target ?? this.create(), end = reader.pos + length;
286
+ while (reader.pos < end) {
287
+ let [fieldNo, wireType] = reader.tag();
288
+ switch (fieldNo) {
289
+ default:
290
+ let u = options.readUnknownField;
291
+ if (u === "throw")
292
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
293
+ let d = reader.skip(wireType);
294
+ if (u !== false)
295
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
296
+ }
297
+ }
298
+ return message;
299
+ }
300
+ internalBinaryWrite(message: OracleListRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
301
+ let u = options.writeUnknownFields;
302
+ if (u !== false)
303
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
304
+ return writer;
305
+ }
306
+ }
307
+ /**
308
+ * @generated MessageType for protobuf message injective_oracle_rpc.OracleListRequest
309
+ */
310
+ export const OracleListRequest = new OracleListRequest$Type();
311
+ // @generated message type with reflection information, may provide speed optimized methods
312
+ class OracleListResponse$Type extends MessageType<OracleListResponse> {
313
+ constructor() {
314
+ super("injective_oracle_rpc.OracleListResponse", [
315
+ { no: 1, name: "oracles", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Oracle }
316
+ ]);
317
+ }
318
+ create(value?: PartialMessage<OracleListResponse>): OracleListResponse {
319
+ const message = globalThis.Object.create((this.messagePrototype!));
320
+ message.oracles = [];
321
+ if (value !== undefined)
322
+ reflectionMergePartial<OracleListResponse>(this, message, value);
323
+ return message;
324
+ }
325
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OracleListResponse): OracleListResponse {
326
+ let message = target ?? this.create(), end = reader.pos + length;
327
+ while (reader.pos < end) {
328
+ let [fieldNo, wireType] = reader.tag();
329
+ switch (fieldNo) {
330
+ case /* repeated injective_oracle_rpc.Oracle oracles */ 1:
331
+ message.oracles.push(Oracle.internalBinaryRead(reader, reader.uint32(), options));
332
+ break;
333
+ default:
334
+ let u = options.readUnknownField;
335
+ if (u === "throw")
336
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
337
+ let d = reader.skip(wireType);
338
+ if (u !== false)
339
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
340
+ }
341
+ }
342
+ return message;
343
+ }
344
+ internalBinaryWrite(message: OracleListResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
345
+ /* repeated injective_oracle_rpc.Oracle oracles = 1; */
346
+ for (let i = 0; i < message.oracles.length; i++)
347
+ Oracle.internalBinaryWrite(message.oracles[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
348
+ let u = options.writeUnknownFields;
349
+ if (u !== false)
350
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
351
+ return writer;
352
+ }
353
+ }
354
+ /**
355
+ * @generated MessageType for protobuf message injective_oracle_rpc.OracleListResponse
356
+ */
357
+ export const OracleListResponse = new OracleListResponse$Type();
358
+ // @generated message type with reflection information, may provide speed optimized methods
359
+ class Oracle$Type extends MessageType<Oracle> {
360
+ constructor() {
361
+ super("injective_oracle_rpc.Oracle", [
362
+ { no: 1, name: "symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
363
+ { no: 2, name: "base_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
364
+ { no: 3, name: "quote_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
365
+ { no: 4, name: "oracle_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
366
+ { no: 5, name: "price", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
367
+ ]);
368
+ }
369
+ create(value?: PartialMessage<Oracle>): Oracle {
370
+ const message = globalThis.Object.create((this.messagePrototype!));
371
+ message.symbol = "";
372
+ message.baseSymbol = "";
373
+ message.quoteSymbol = "";
374
+ message.oracleType = "";
375
+ message.price = "";
376
+ if (value !== undefined)
377
+ reflectionMergePartial<Oracle>(this, message, value);
378
+ return message;
379
+ }
380
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Oracle): Oracle {
381
+ let message = target ?? this.create(), end = reader.pos + length;
382
+ while (reader.pos < end) {
383
+ let [fieldNo, wireType] = reader.tag();
384
+ switch (fieldNo) {
385
+ case /* string symbol */ 1:
386
+ message.symbol = reader.string();
387
+ break;
388
+ case /* string base_symbol */ 2:
389
+ message.baseSymbol = reader.string();
390
+ break;
391
+ case /* string quote_symbol */ 3:
392
+ message.quoteSymbol = reader.string();
393
+ break;
394
+ case /* string oracle_type */ 4:
395
+ message.oracleType = reader.string();
396
+ break;
397
+ case /* string price */ 5:
398
+ message.price = reader.string();
399
+ break;
400
+ default:
401
+ let u = options.readUnknownField;
402
+ if (u === "throw")
403
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
404
+ let d = reader.skip(wireType);
405
+ if (u !== false)
406
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
407
+ }
408
+ }
409
+ return message;
410
+ }
411
+ internalBinaryWrite(message: Oracle, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
412
+ /* string symbol = 1; */
413
+ if (message.symbol !== "")
414
+ writer.tag(1, WireType.LengthDelimited).string(message.symbol);
415
+ /* string base_symbol = 2; */
416
+ if (message.baseSymbol !== "")
417
+ writer.tag(2, WireType.LengthDelimited).string(message.baseSymbol);
418
+ /* string quote_symbol = 3; */
419
+ if (message.quoteSymbol !== "")
420
+ writer.tag(3, WireType.LengthDelimited).string(message.quoteSymbol);
421
+ /* string oracle_type = 4; */
422
+ if (message.oracleType !== "")
423
+ writer.tag(4, WireType.LengthDelimited).string(message.oracleType);
424
+ /* string price = 5; */
425
+ if (message.price !== "")
426
+ writer.tag(5, WireType.LengthDelimited).string(message.price);
427
+ let u = options.writeUnknownFields;
428
+ if (u !== false)
429
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
430
+ return writer;
431
+ }
432
+ }
433
+ /**
434
+ * @generated MessageType for protobuf message injective_oracle_rpc.Oracle
435
+ */
436
+ export const Oracle = new Oracle$Type();
437
+ // @generated message type with reflection information, may provide speed optimized methods
438
+ class PriceRequest$Type extends MessageType<PriceRequest> {
439
+ constructor() {
440
+ super("injective_oracle_rpc.PriceRequest", [
441
+ { no: 1, name: "base_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
442
+ { no: 2, name: "quote_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
443
+ { no: 3, name: "oracle_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
444
+ { no: 4, name: "oracle_scale_factor", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
445
+ ]);
446
+ }
447
+ create(value?: PartialMessage<PriceRequest>): PriceRequest {
448
+ const message = globalThis.Object.create((this.messagePrototype!));
449
+ message.baseSymbol = "";
450
+ message.quoteSymbol = "";
451
+ message.oracleType = "";
452
+ message.oracleScaleFactor = 0;
453
+ if (value !== undefined)
454
+ reflectionMergePartial<PriceRequest>(this, message, value);
455
+ return message;
456
+ }
457
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PriceRequest): PriceRequest {
458
+ let message = target ?? this.create(), end = reader.pos + length;
459
+ while (reader.pos < end) {
460
+ let [fieldNo, wireType] = reader.tag();
461
+ switch (fieldNo) {
462
+ case /* string base_symbol */ 1:
463
+ message.baseSymbol = reader.string();
464
+ break;
465
+ case /* string quote_symbol */ 2:
466
+ message.quoteSymbol = reader.string();
467
+ break;
468
+ case /* string oracle_type */ 3:
469
+ message.oracleType = reader.string();
470
+ break;
471
+ case /* uint32 oracle_scale_factor */ 4:
472
+ message.oracleScaleFactor = reader.uint32();
473
+ break;
474
+ default:
475
+ let u = options.readUnknownField;
476
+ if (u === "throw")
477
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
478
+ let d = reader.skip(wireType);
479
+ if (u !== false)
480
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
481
+ }
482
+ }
483
+ return message;
484
+ }
485
+ internalBinaryWrite(message: PriceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
486
+ /* string base_symbol = 1; */
487
+ if (message.baseSymbol !== "")
488
+ writer.tag(1, WireType.LengthDelimited).string(message.baseSymbol);
489
+ /* string quote_symbol = 2; */
490
+ if (message.quoteSymbol !== "")
491
+ writer.tag(2, WireType.LengthDelimited).string(message.quoteSymbol);
492
+ /* string oracle_type = 3; */
493
+ if (message.oracleType !== "")
494
+ writer.tag(3, WireType.LengthDelimited).string(message.oracleType);
495
+ /* uint32 oracle_scale_factor = 4; */
496
+ if (message.oracleScaleFactor !== 0)
497
+ writer.tag(4, WireType.Varint).uint32(message.oracleScaleFactor);
498
+ let u = options.writeUnknownFields;
499
+ if (u !== false)
500
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
501
+ return writer;
502
+ }
503
+ }
504
+ /**
505
+ * @generated MessageType for protobuf message injective_oracle_rpc.PriceRequest
506
+ */
507
+ export const PriceRequest = new PriceRequest$Type();
508
+ // @generated message type with reflection information, may provide speed optimized methods
509
+ class PriceResponse$Type extends MessageType<PriceResponse> {
510
+ constructor() {
511
+ super("injective_oracle_rpc.PriceResponse", [
512
+ { no: 1, name: "price", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
513
+ ]);
514
+ }
515
+ create(value?: PartialMessage<PriceResponse>): PriceResponse {
516
+ const message = globalThis.Object.create((this.messagePrototype!));
517
+ message.price = "";
518
+ if (value !== undefined)
519
+ reflectionMergePartial<PriceResponse>(this, message, value);
520
+ return message;
521
+ }
522
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PriceResponse): PriceResponse {
523
+ let message = target ?? this.create(), end = reader.pos + length;
524
+ while (reader.pos < end) {
525
+ let [fieldNo, wireType] = reader.tag();
526
+ switch (fieldNo) {
527
+ case /* string price */ 1:
528
+ message.price = reader.string();
529
+ break;
530
+ default:
531
+ let u = options.readUnknownField;
532
+ if (u === "throw")
533
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
534
+ let d = reader.skip(wireType);
535
+ if (u !== false)
536
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
537
+ }
538
+ }
539
+ return message;
540
+ }
541
+ internalBinaryWrite(message: PriceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
542
+ /* string price = 1; */
543
+ if (message.price !== "")
544
+ writer.tag(1, WireType.LengthDelimited).string(message.price);
545
+ let u = options.writeUnknownFields;
546
+ if (u !== false)
547
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
548
+ return writer;
549
+ }
550
+ }
551
+ /**
552
+ * @generated MessageType for protobuf message injective_oracle_rpc.PriceResponse
553
+ */
554
+ export const PriceResponse = new PriceResponse$Type();
555
+ // @generated message type with reflection information, may provide speed optimized methods
556
+ class PriceV2Request$Type extends MessageType<PriceV2Request> {
557
+ constructor() {
558
+ super("injective_oracle_rpc.PriceV2Request", [
559
+ { no: 1, name: "filters", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PricePayloadV2 }
560
+ ]);
561
+ }
562
+ create(value?: PartialMessage<PriceV2Request>): PriceV2Request {
563
+ const message = globalThis.Object.create((this.messagePrototype!));
564
+ message.filters = [];
565
+ if (value !== undefined)
566
+ reflectionMergePartial<PriceV2Request>(this, message, value);
567
+ return message;
568
+ }
569
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PriceV2Request): PriceV2Request {
570
+ let message = target ?? this.create(), end = reader.pos + length;
571
+ while (reader.pos < end) {
572
+ let [fieldNo, wireType] = reader.tag();
573
+ switch (fieldNo) {
574
+ case /* repeated injective_oracle_rpc.PricePayloadV2 filters */ 1:
575
+ message.filters.push(PricePayloadV2.internalBinaryRead(reader, reader.uint32(), options));
576
+ break;
577
+ default:
578
+ let u = options.readUnknownField;
579
+ if (u === "throw")
580
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
581
+ let d = reader.skip(wireType);
582
+ if (u !== false)
583
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
584
+ }
585
+ }
586
+ return message;
587
+ }
588
+ internalBinaryWrite(message: PriceV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
589
+ /* repeated injective_oracle_rpc.PricePayloadV2 filters = 1; */
590
+ for (let i = 0; i < message.filters.length; i++)
591
+ PricePayloadV2.internalBinaryWrite(message.filters[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
592
+ let u = options.writeUnknownFields;
593
+ if (u !== false)
594
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
595
+ return writer;
596
+ }
597
+ }
598
+ /**
599
+ * @generated MessageType for protobuf message injective_oracle_rpc.PriceV2Request
600
+ */
601
+ export const PriceV2Request = new PriceV2Request$Type();
602
+ // @generated message type with reflection information, may provide speed optimized methods
603
+ class PricePayloadV2$Type extends MessageType<PricePayloadV2> {
604
+ constructor() {
605
+ super("injective_oracle_rpc.PricePayloadV2", [
606
+ { no: 1, name: "base_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
607
+ { no: 2, name: "quote_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
608
+ { no: 3, name: "oracle_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
609
+ { no: 4, name: "oracle_scale_factor", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
610
+ ]);
611
+ }
612
+ create(value?: PartialMessage<PricePayloadV2>): PricePayloadV2 {
613
+ const message = globalThis.Object.create((this.messagePrototype!));
614
+ message.baseSymbol = "";
615
+ message.quoteSymbol = "";
616
+ message.oracleType = "";
617
+ message.oracleScaleFactor = 0;
618
+ if (value !== undefined)
619
+ reflectionMergePartial<PricePayloadV2>(this, message, value);
620
+ return message;
621
+ }
622
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PricePayloadV2): PricePayloadV2 {
623
+ let message = target ?? this.create(), end = reader.pos + length;
624
+ while (reader.pos < end) {
625
+ let [fieldNo, wireType] = reader.tag();
626
+ switch (fieldNo) {
627
+ case /* string base_symbol */ 1:
628
+ message.baseSymbol = reader.string();
629
+ break;
630
+ case /* string quote_symbol */ 2:
631
+ message.quoteSymbol = reader.string();
632
+ break;
633
+ case /* string oracle_type */ 3:
634
+ message.oracleType = reader.string();
635
+ break;
636
+ case /* uint32 oracle_scale_factor */ 4:
637
+ message.oracleScaleFactor = reader.uint32();
638
+ break;
639
+ default:
640
+ let u = options.readUnknownField;
641
+ if (u === "throw")
642
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
643
+ let d = reader.skip(wireType);
644
+ if (u !== false)
645
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
646
+ }
647
+ }
648
+ return message;
649
+ }
650
+ internalBinaryWrite(message: PricePayloadV2, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
651
+ /* string base_symbol = 1; */
652
+ if (message.baseSymbol !== "")
653
+ writer.tag(1, WireType.LengthDelimited).string(message.baseSymbol);
654
+ /* string quote_symbol = 2; */
655
+ if (message.quoteSymbol !== "")
656
+ writer.tag(2, WireType.LengthDelimited).string(message.quoteSymbol);
657
+ /* string oracle_type = 3; */
658
+ if (message.oracleType !== "")
659
+ writer.tag(3, WireType.LengthDelimited).string(message.oracleType);
660
+ /* uint32 oracle_scale_factor = 4; */
661
+ if (message.oracleScaleFactor !== 0)
662
+ writer.tag(4, WireType.Varint).uint32(message.oracleScaleFactor);
663
+ let u = options.writeUnknownFields;
664
+ if (u !== false)
665
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
666
+ return writer;
667
+ }
668
+ }
669
+ /**
670
+ * @generated MessageType for protobuf message injective_oracle_rpc.PricePayloadV2
671
+ */
672
+ export const PricePayloadV2 = new PricePayloadV2$Type();
673
+ // @generated message type with reflection information, may provide speed optimized methods
674
+ class PriceV2Response$Type extends MessageType<PriceV2Response> {
675
+ constructor() {
676
+ super("injective_oracle_rpc.PriceV2Response", [
677
+ { no: 1, name: "prices", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PriceV2Result }
678
+ ]);
679
+ }
680
+ create(value?: PartialMessage<PriceV2Response>): PriceV2Response {
681
+ const message = globalThis.Object.create((this.messagePrototype!));
682
+ message.prices = [];
683
+ if (value !== undefined)
684
+ reflectionMergePartial<PriceV2Response>(this, message, value);
685
+ return message;
686
+ }
687
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PriceV2Response): PriceV2Response {
688
+ let message = target ?? this.create(), end = reader.pos + length;
689
+ while (reader.pos < end) {
690
+ let [fieldNo, wireType] = reader.tag();
691
+ switch (fieldNo) {
692
+ case /* repeated injective_oracle_rpc.PriceV2Result prices */ 1:
693
+ message.prices.push(PriceV2Result.internalBinaryRead(reader, reader.uint32(), options));
694
+ break;
695
+ default:
696
+ let u = options.readUnknownField;
697
+ if (u === "throw")
698
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
699
+ let d = reader.skip(wireType);
700
+ if (u !== false)
701
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
702
+ }
703
+ }
704
+ return message;
705
+ }
706
+ internalBinaryWrite(message: PriceV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
707
+ /* repeated injective_oracle_rpc.PriceV2Result prices = 1; */
708
+ for (let i = 0; i < message.prices.length; i++)
709
+ PriceV2Result.internalBinaryWrite(message.prices[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
710
+ let u = options.writeUnknownFields;
711
+ if (u !== false)
712
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
713
+ return writer;
714
+ }
715
+ }
716
+ /**
717
+ * @generated MessageType for protobuf message injective_oracle_rpc.PriceV2Response
718
+ */
719
+ export const PriceV2Response = new PriceV2Response$Type();
720
+ // @generated message type with reflection information, may provide speed optimized methods
721
+ class PriceV2Result$Type extends MessageType<PriceV2Result> {
722
+ constructor() {
723
+ super("injective_oracle_rpc.PriceV2Result", [
724
+ { no: 1, name: "base_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
725
+ { no: 2, name: "quote_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
726
+ { no: 3, name: "oracle_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
727
+ { no: 4, name: "oracle_scale_factor", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
728
+ { no: 5, name: "price", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
729
+ { no: 6, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
730
+ ]);
731
+ }
732
+ create(value?: PartialMessage<PriceV2Result>): PriceV2Result {
733
+ const message = globalThis.Object.create((this.messagePrototype!));
734
+ message.baseSymbol = "";
735
+ message.quoteSymbol = "";
736
+ message.oracleType = "";
737
+ message.oracleScaleFactor = 0;
738
+ message.price = "";
739
+ message.marketId = "";
740
+ if (value !== undefined)
741
+ reflectionMergePartial<PriceV2Result>(this, message, value);
742
+ return message;
743
+ }
744
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PriceV2Result): PriceV2Result {
745
+ let message = target ?? this.create(), end = reader.pos + length;
746
+ while (reader.pos < end) {
747
+ let [fieldNo, wireType] = reader.tag();
748
+ switch (fieldNo) {
749
+ case /* string base_symbol */ 1:
750
+ message.baseSymbol = reader.string();
751
+ break;
752
+ case /* string quote_symbol */ 2:
753
+ message.quoteSymbol = reader.string();
754
+ break;
755
+ case /* string oracle_type */ 3:
756
+ message.oracleType = reader.string();
757
+ break;
758
+ case /* uint32 oracle_scale_factor */ 4:
759
+ message.oracleScaleFactor = reader.uint32();
760
+ break;
761
+ case /* string price */ 5:
762
+ message.price = reader.string();
763
+ break;
764
+ case /* string market_id */ 6:
765
+ message.marketId = reader.string();
766
+ break;
767
+ default:
768
+ let u = options.readUnknownField;
769
+ if (u === "throw")
770
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
771
+ let d = reader.skip(wireType);
772
+ if (u !== false)
773
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
774
+ }
775
+ }
776
+ return message;
777
+ }
778
+ internalBinaryWrite(message: PriceV2Result, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
779
+ /* string base_symbol = 1; */
780
+ if (message.baseSymbol !== "")
781
+ writer.tag(1, WireType.LengthDelimited).string(message.baseSymbol);
782
+ /* string quote_symbol = 2; */
783
+ if (message.quoteSymbol !== "")
784
+ writer.tag(2, WireType.LengthDelimited).string(message.quoteSymbol);
785
+ /* string oracle_type = 3; */
786
+ if (message.oracleType !== "")
787
+ writer.tag(3, WireType.LengthDelimited).string(message.oracleType);
788
+ /* uint32 oracle_scale_factor = 4; */
789
+ if (message.oracleScaleFactor !== 0)
790
+ writer.tag(4, WireType.Varint).uint32(message.oracleScaleFactor);
791
+ /* string price = 5; */
792
+ if (message.price !== "")
793
+ writer.tag(5, WireType.LengthDelimited).string(message.price);
794
+ /* string market_id = 6; */
795
+ if (message.marketId !== "")
796
+ writer.tag(6, WireType.LengthDelimited).string(message.marketId);
797
+ let u = options.writeUnknownFields;
798
+ if (u !== false)
799
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
800
+ return writer;
801
+ }
802
+ }
803
+ /**
804
+ * @generated MessageType for protobuf message injective_oracle_rpc.PriceV2Result
805
+ */
806
+ export const PriceV2Result = new PriceV2Result$Type();
807
+ // @generated message type with reflection information, may provide speed optimized methods
808
+ class StreamPricesRequest$Type extends MessageType<StreamPricesRequest> {
809
+ constructor() {
810
+ super("injective_oracle_rpc.StreamPricesRequest", [
811
+ { no: 1, name: "base_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
812
+ { no: 2, name: "quote_symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
813
+ { no: 3, name: "oracle_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
814
+ ]);
815
+ }
816
+ create(value?: PartialMessage<StreamPricesRequest>): StreamPricesRequest {
817
+ const message = globalThis.Object.create((this.messagePrototype!));
818
+ message.baseSymbol = "";
819
+ message.quoteSymbol = "";
820
+ message.oracleType = "";
821
+ if (value !== undefined)
822
+ reflectionMergePartial<StreamPricesRequest>(this, message, value);
823
+ return message;
824
+ }
825
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamPricesRequest): StreamPricesRequest {
826
+ let message = target ?? this.create(), end = reader.pos + length;
827
+ while (reader.pos < end) {
828
+ let [fieldNo, wireType] = reader.tag();
829
+ switch (fieldNo) {
830
+ case /* string base_symbol */ 1:
831
+ message.baseSymbol = reader.string();
832
+ break;
833
+ case /* string quote_symbol */ 2:
834
+ message.quoteSymbol = reader.string();
835
+ break;
836
+ case /* string oracle_type */ 3:
837
+ message.oracleType = reader.string();
838
+ break;
839
+ default:
840
+ let u = options.readUnknownField;
841
+ if (u === "throw")
842
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
843
+ let d = reader.skip(wireType);
844
+ if (u !== false)
845
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
846
+ }
847
+ }
848
+ return message;
849
+ }
850
+ internalBinaryWrite(message: StreamPricesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
851
+ /* string base_symbol = 1; */
852
+ if (message.baseSymbol !== "")
853
+ writer.tag(1, WireType.LengthDelimited).string(message.baseSymbol);
854
+ /* string quote_symbol = 2; */
855
+ if (message.quoteSymbol !== "")
856
+ writer.tag(2, WireType.LengthDelimited).string(message.quoteSymbol);
857
+ /* string oracle_type = 3; */
858
+ if (message.oracleType !== "")
859
+ writer.tag(3, WireType.LengthDelimited).string(message.oracleType);
860
+ let u = options.writeUnknownFields;
861
+ if (u !== false)
862
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
863
+ return writer;
864
+ }
865
+ }
866
+ /**
867
+ * @generated MessageType for protobuf message injective_oracle_rpc.StreamPricesRequest
868
+ */
869
+ export const StreamPricesRequest = new StreamPricesRequest$Type();
870
+ // @generated message type with reflection information, may provide speed optimized methods
871
+ class StreamPricesResponse$Type extends MessageType<StreamPricesResponse> {
872
+ constructor() {
873
+ super("injective_oracle_rpc.StreamPricesResponse", [
874
+ { no: 1, name: "price", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
875
+ { no: 2, name: "timestamp", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
876
+ ]);
877
+ }
878
+ create(value?: PartialMessage<StreamPricesResponse>): StreamPricesResponse {
879
+ const message = globalThis.Object.create((this.messagePrototype!));
880
+ message.price = "";
881
+ message.timestamp = 0n;
882
+ if (value !== undefined)
883
+ reflectionMergePartial<StreamPricesResponse>(this, message, value);
884
+ return message;
885
+ }
886
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamPricesResponse): StreamPricesResponse {
887
+ let message = target ?? this.create(), end = reader.pos + length;
888
+ while (reader.pos < end) {
889
+ let [fieldNo, wireType] = reader.tag();
890
+ switch (fieldNo) {
891
+ case /* string price */ 1:
892
+ message.price = reader.string();
893
+ break;
894
+ case /* sint64 timestamp */ 2:
895
+ message.timestamp = reader.sint64().toBigInt();
896
+ break;
897
+ default:
898
+ let u = options.readUnknownField;
899
+ if (u === "throw")
900
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
901
+ let d = reader.skip(wireType);
902
+ if (u !== false)
903
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
904
+ }
905
+ }
906
+ return message;
907
+ }
908
+ internalBinaryWrite(message: StreamPricesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
909
+ /* string price = 1; */
910
+ if (message.price !== "")
911
+ writer.tag(1, WireType.LengthDelimited).string(message.price);
912
+ /* sint64 timestamp = 2; */
913
+ if (message.timestamp !== 0n)
914
+ writer.tag(2, WireType.Varint).sint64(message.timestamp);
915
+ let u = options.writeUnknownFields;
916
+ if (u !== false)
917
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
918
+ return writer;
919
+ }
920
+ }
921
+ /**
922
+ * @generated MessageType for protobuf message injective_oracle_rpc.StreamPricesResponse
923
+ */
924
+ export const StreamPricesResponse = new StreamPricesResponse$Type();
925
+ // @generated message type with reflection information, may provide speed optimized methods
926
+ class StreamPricesByMarketsRequest$Type extends MessageType<StreamPricesByMarketsRequest> {
927
+ constructor() {
928
+ super("injective_oracle_rpc.StreamPricesByMarketsRequest", [
929
+ { no: 1, name: "market_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
930
+ ]);
931
+ }
932
+ create(value?: PartialMessage<StreamPricesByMarketsRequest>): StreamPricesByMarketsRequest {
933
+ const message = globalThis.Object.create((this.messagePrototype!));
934
+ message.marketIds = [];
935
+ if (value !== undefined)
936
+ reflectionMergePartial<StreamPricesByMarketsRequest>(this, message, value);
937
+ return message;
938
+ }
939
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamPricesByMarketsRequest): StreamPricesByMarketsRequest {
940
+ let message = target ?? this.create(), end = reader.pos + length;
941
+ while (reader.pos < end) {
942
+ let [fieldNo, wireType] = reader.tag();
943
+ switch (fieldNo) {
944
+ case /* repeated string market_ids */ 1:
945
+ message.marketIds.push(reader.string());
946
+ break;
947
+ default:
948
+ let u = options.readUnknownField;
949
+ if (u === "throw")
950
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
951
+ let d = reader.skip(wireType);
952
+ if (u !== false)
953
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
954
+ }
955
+ }
956
+ return message;
957
+ }
958
+ internalBinaryWrite(message: StreamPricesByMarketsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
959
+ /* repeated string market_ids = 1; */
960
+ for (let i = 0; i < message.marketIds.length; i++)
961
+ writer.tag(1, WireType.LengthDelimited).string(message.marketIds[i]);
962
+ let u = options.writeUnknownFields;
963
+ if (u !== false)
964
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
965
+ return writer;
966
+ }
967
+ }
968
+ /**
969
+ * @generated MessageType for protobuf message injective_oracle_rpc.StreamPricesByMarketsRequest
970
+ */
971
+ export const StreamPricesByMarketsRequest = new StreamPricesByMarketsRequest$Type();
972
+ // @generated message type with reflection information, may provide speed optimized methods
973
+ class StreamPricesByMarketsResponse$Type extends MessageType<StreamPricesByMarketsResponse> {
974
+ constructor() {
975
+ super("injective_oracle_rpc.StreamPricesByMarketsResponse", [
976
+ { no: 1, name: "price", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
977
+ { no: 2, name: "timestamp", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
978
+ { no: 3, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
979
+ ]);
980
+ }
981
+ create(value?: PartialMessage<StreamPricesByMarketsResponse>): StreamPricesByMarketsResponse {
982
+ const message = globalThis.Object.create((this.messagePrototype!));
983
+ message.price = "";
984
+ message.timestamp = 0n;
985
+ message.marketId = "";
986
+ if (value !== undefined)
987
+ reflectionMergePartial<StreamPricesByMarketsResponse>(this, message, value);
988
+ return message;
989
+ }
990
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamPricesByMarketsResponse): StreamPricesByMarketsResponse {
991
+ let message = target ?? this.create(), end = reader.pos + length;
992
+ while (reader.pos < end) {
993
+ let [fieldNo, wireType] = reader.tag();
994
+ switch (fieldNo) {
995
+ case /* string price */ 1:
996
+ message.price = reader.string();
997
+ break;
998
+ case /* sint64 timestamp */ 2:
999
+ message.timestamp = reader.sint64().toBigInt();
1000
+ break;
1001
+ case /* string market_id */ 3:
1002
+ message.marketId = reader.string();
1003
+ break;
1004
+ default:
1005
+ let u = options.readUnknownField;
1006
+ if (u === "throw")
1007
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1008
+ let d = reader.skip(wireType);
1009
+ if (u !== false)
1010
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1011
+ }
1012
+ }
1013
+ return message;
1014
+ }
1015
+ internalBinaryWrite(message: StreamPricesByMarketsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1016
+ /* string price = 1; */
1017
+ if (message.price !== "")
1018
+ writer.tag(1, WireType.LengthDelimited).string(message.price);
1019
+ /* sint64 timestamp = 2; */
1020
+ if (message.timestamp !== 0n)
1021
+ writer.tag(2, WireType.Varint).sint64(message.timestamp);
1022
+ /* string market_id = 3; */
1023
+ if (message.marketId !== "")
1024
+ writer.tag(3, WireType.LengthDelimited).string(message.marketId);
1025
+ let u = options.writeUnknownFields;
1026
+ if (u !== false)
1027
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1028
+ return writer;
1029
+ }
1030
+ }
1031
+ /**
1032
+ * @generated MessageType for protobuf message injective_oracle_rpc.StreamPricesByMarketsResponse
1033
+ */
1034
+ export const StreamPricesByMarketsResponse = new StreamPricesByMarketsResponse$Type();
1035
+ /**
1036
+ * @generated ServiceType for protobuf service injective_oracle_rpc.InjectiveOracleRPC
1037
+ */
1038
+ export const InjectiveOracleRPC = new ServiceType("injective_oracle_rpc.InjectiveOracleRPC", [
1039
+ { name: "OracleList", options: {}, I: OracleListRequest, O: OracleListResponse },
1040
+ { name: "Price", options: {}, I: PriceRequest, O: PriceResponse },
1041
+ { name: "PriceV2", options: {}, I: PriceV2Request, O: PriceV2Response },
1042
+ { name: "StreamPrices", serverStreaming: true, options: {}, I: StreamPricesRequest, O: StreamPricesResponse },
1043
+ { name: "StreamPricesByMarkets", serverStreaming: true, options: {}, I: StreamPricesByMarketsRequest, O: StreamPricesByMarketsResponse }
1044
+ ]);