@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,3380 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix
2
+ // @generated from protobuf file "injective_megavault_rpc.proto" (package "injective_megavault_rpc", syntax proto3)
3
+ // tslint:disable
4
+ //
5
+ // Code generated with goa v3.7.0, DO NOT EDIT.
6
+ //
7
+ // InjectiveMegavaultRPC 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 type { BinaryWriteOptions } from "@protobuf-ts/runtime";
14
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
15
+ import { WireType } 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_megavault_rpc.GetVaultRequest
24
+ */
25
+ export interface GetVaultRequest {
26
+ /**
27
+ * Vault address
28
+ *
29
+ * @generated from protobuf field: string vault_address = 1
30
+ */
31
+ vaultAddress: string;
32
+ }
33
+ /**
34
+ * @generated from protobuf message injective_megavault_rpc.GetVaultResponse
35
+ */
36
+ export interface GetVaultResponse {
37
+ /**
38
+ * The vault
39
+ *
40
+ * @generated from protobuf field: injective_megavault_rpc.Vault vault = 1
41
+ */
42
+ vault?: Vault;
43
+ }
44
+ /**
45
+ * @generated from protobuf message injective_megavault_rpc.Vault
46
+ */
47
+ export interface Vault {
48
+ /**
49
+ * Contract address
50
+ *
51
+ * @generated from protobuf field: string contract_address = 1
52
+ */
53
+ contractAddress: string;
54
+ /**
55
+ * Contract name
56
+ *
57
+ * @generated from protobuf field: string contract_name = 2
58
+ */
59
+ contractName: string;
60
+ /**
61
+ * Contract version
62
+ *
63
+ * @generated from protobuf field: string contract_version = 3
64
+ */
65
+ contractVersion: string;
66
+ /**
67
+ * Admin
68
+ *
69
+ * @generated from protobuf field: string admin = 4
70
+ */
71
+ admin: string;
72
+ /**
73
+ * LP denom
74
+ *
75
+ * @generated from protobuf field: string lp_denom = 5
76
+ */
77
+ lpDenom: string;
78
+ /**
79
+ * Quote denom
80
+ *
81
+ * @generated from protobuf field: string quote_denom = 6
82
+ */
83
+ quoteDenom: string;
84
+ /**
85
+ * Operators
86
+ *
87
+ * @generated from protobuf field: repeated injective_megavault_rpc.Operator operators = 7
88
+ */
89
+ operators: Operator[];
90
+ /**
91
+ * Incentives
92
+ *
93
+ * @generated from protobuf field: injective_megavault_rpc.Incentives incentives = 8
94
+ */
95
+ incentives?: Incentives;
96
+ /**
97
+ * TargetApr
98
+ *
99
+ * @generated from protobuf field: injective_megavault_rpc.TargetApr target_apr = 9
100
+ */
101
+ targetApr?: TargetApr;
102
+ /**
103
+ * Operators
104
+ *
105
+ * @generated from protobuf field: injective_megavault_rpc.VaultStats stats = 10
106
+ */
107
+ stats?: VaultStats;
108
+ /**
109
+ * Block height when the vault was created.
110
+ *
111
+ * @generated from protobuf field: sint64 created_height = 11
112
+ */
113
+ createdHeight: bigint;
114
+ /**
115
+ * CreatedAt timestamp in UNIX millis.
116
+ *
117
+ * @generated from protobuf field: sint64 created_at = 12
118
+ */
119
+ createdAt: bigint;
120
+ /**
121
+ * Block height when the vault was updated.
122
+ *
123
+ * @generated from protobuf field: sint64 updated_height = 13
124
+ */
125
+ updatedHeight: bigint;
126
+ /**
127
+ * UpdatedAt timestamp in UNIX millis.
128
+ *
129
+ * @generated from protobuf field: sint64 updated_at = 14
130
+ */
131
+ updatedAt: bigint;
132
+ }
133
+ /**
134
+ * @generated from protobuf message injective_megavault_rpc.Operator
135
+ */
136
+ export interface Operator {
137
+ /**
138
+ * Operator address
139
+ *
140
+ * @generated from protobuf field: string address = 1
141
+ */
142
+ address: string;
143
+ /**
144
+ * Total amount
145
+ *
146
+ * @generated from protobuf field: string total_amount = 2
147
+ */
148
+ totalAmount: string;
149
+ /**
150
+ * Total liquid amount
151
+ *
152
+ * @generated from protobuf field: string total_liquid_amount = 3
153
+ */
154
+ totalLiquidAmount: string;
155
+ /**
156
+ * Block height when the operator was updated.
157
+ *
158
+ * @generated from protobuf field: sint64 updated_height = 4
159
+ */
160
+ updatedHeight: bigint;
161
+ /**
162
+ * UpdatedAt timestamp in UNIX millis.
163
+ *
164
+ * @generated from protobuf field: sint64 updated_at = 5
165
+ */
166
+ updatedAt: bigint;
167
+ /**
168
+ * Percentage of the operator
169
+ *
170
+ * @generated from protobuf field: string percentage = 6
171
+ */
172
+ percentage: string;
173
+ /**
174
+ * Subaccount ID of the operator
175
+ *
176
+ * @generated from protobuf field: string subaccount_id = 7
177
+ */
178
+ subaccountId: string;
179
+ }
180
+ /**
181
+ * @generated from protobuf message injective_megavault_rpc.Incentives
182
+ */
183
+ export interface Incentives {
184
+ /**
185
+ * Operator address
186
+ *
187
+ * @generated from protobuf field: string address = 1
188
+ */
189
+ address: string;
190
+ /**
191
+ * Amount
192
+ *
193
+ * @generated from protobuf field: string amount = 2
194
+ */
195
+ amount: string;
196
+ /**
197
+ * Block height when the target APR was updated.
198
+ *
199
+ * @generated from protobuf field: sint64 updated_height = 3
200
+ */
201
+ updatedHeight: bigint;
202
+ /**
203
+ * UpdatedAt timestamp in UNIX millis.
204
+ *
205
+ * @generated from protobuf field: sint64 updated_at = 4
206
+ */
207
+ updatedAt: bigint;
208
+ }
209
+ /**
210
+ * @generated from protobuf message injective_megavault_rpc.TargetApr
211
+ */
212
+ export interface TargetApr {
213
+ /**
214
+ * APR
215
+ *
216
+ * @generated from protobuf field: string apr = 1
217
+ */
218
+ apr: string;
219
+ /**
220
+ * Upper threshold
221
+ *
222
+ * @generated from protobuf field: string upper_threshold = 2
223
+ */
224
+ upperThreshold: string;
225
+ /**
226
+ * Lower threshold
227
+ *
228
+ * @generated from protobuf field: string lower_threshold = 3
229
+ */
230
+ lowerThreshold: string;
231
+ /**
232
+ * Block height when the target APR was updated.
233
+ *
234
+ * @generated from protobuf field: sint64 updated_height = 4
235
+ */
236
+ updatedHeight: bigint;
237
+ /**
238
+ * UpdatedAt timestamp in UNIX millis.
239
+ *
240
+ * @generated from protobuf field: sint64 updated_at = 5
241
+ */
242
+ updatedAt: bigint;
243
+ }
244
+ /**
245
+ * @generated from protobuf message injective_megavault_rpc.VaultStats
246
+ */
247
+ export interface VaultStats {
248
+ /**
249
+ * Total subscribed amount in the vault
250
+ *
251
+ * @generated from protobuf field: string total_subscribed_amount = 1
252
+ */
253
+ totalSubscribedAmount: string;
254
+ /**
255
+ * Total redeemed amount in the vault
256
+ *
257
+ * @generated from protobuf field: string total_redeemed_amount = 2
258
+ */
259
+ totalRedeemedAmount: string;
260
+ /**
261
+ * Current amount in the vault
262
+ *
263
+ * @generated from protobuf field: string current_amount = 3
264
+ */
265
+ currentAmount: string;
266
+ /**
267
+ * Current amount in the vault without taking into account the incentives
268
+ *
269
+ * @generated from protobuf field: string current_amount_without_incentives = 4
270
+ */
271
+ currentAmountWithoutIncentives: string;
272
+ /**
273
+ * Current amount of LP tokens in the vault
274
+ *
275
+ * @generated from protobuf field: string current_lp_amount = 5
276
+ */
277
+ currentLpAmount: string;
278
+ /**
279
+ * Current LP price
280
+ *
281
+ * @generated from protobuf field: string current_lp_price = 6
282
+ */
283
+ currentLpPrice: string;
284
+ /**
285
+ * PnL statistics
286
+ *
287
+ * @generated from protobuf field: injective_megavault_rpc.PnlStats pnl = 7
288
+ */
289
+ pnl?: PnlStats;
290
+ /**
291
+ * Volatility statistics
292
+ *
293
+ * @generated from protobuf field: injective_megavault_rpc.VolatilityStats volatility = 8
294
+ */
295
+ volatility?: VolatilityStats;
296
+ /**
297
+ * APR statistics
298
+ *
299
+ * @generated from protobuf field: injective_megavault_rpc.AprStats apr = 9
300
+ */
301
+ apr?: AprStats;
302
+ /**
303
+ * Max drawdown
304
+ *
305
+ * @generated from protobuf field: injective_megavault_rpc.MaxDrawdown max_drawdown = 10
306
+ */
307
+ maxDrawdown?: MaxDrawdown;
308
+ }
309
+ /**
310
+ * @generated from protobuf message injective_megavault_rpc.PnlStats
311
+ */
312
+ export interface PnlStats {
313
+ /**
314
+ * Unrealized PnL
315
+ *
316
+ * @generated from protobuf field: injective_megavault_rpc.UnrealizedPnl unrealized = 1
317
+ */
318
+ unrealized?: UnrealizedPnl;
319
+ /**
320
+ * All-time PnL
321
+ *
322
+ * @generated from protobuf field: injective_megavault_rpc.Pnl all_time = 2
323
+ */
324
+ allTime?: Pnl;
325
+ }
326
+ /**
327
+ * @generated from protobuf message injective_megavault_rpc.UnrealizedPnl
328
+ */
329
+ export interface UnrealizedPnl {
330
+ /**
331
+ * Unrealized PnL value
332
+ *
333
+ * @generated from protobuf field: string value = 1
334
+ */
335
+ value: string;
336
+ /**
337
+ * Unrealized PnL percentage
338
+ *
339
+ * @generated from protobuf field: string percentage = 2
340
+ */
341
+ percentage: string;
342
+ }
343
+ /**
344
+ * @generated from protobuf message injective_megavault_rpc.Pnl
345
+ */
346
+ export interface Pnl {
347
+ /**
348
+ * PnL value
349
+ *
350
+ * @generated from protobuf field: string value = 1
351
+ */
352
+ value: string;
353
+ /**
354
+ * PnL percentage
355
+ *
356
+ * @generated from protobuf field: string percentage = 2
357
+ */
358
+ percentage: string;
359
+ /**
360
+ * Total amount subscribed
361
+ *
362
+ * @generated from protobuf field: string total_amount_subscribed = 3
363
+ */
364
+ totalAmountSubscribed: string;
365
+ /**
366
+ * Total amount redeemed
367
+ *
368
+ * @generated from protobuf field: string total_amount_redeemed = 4
369
+ */
370
+ totalAmountRedeemed: string;
371
+ /**
372
+ * Current amount
373
+ *
374
+ * @generated from protobuf field: string current_amount = 5
375
+ */
376
+ currentAmount: string;
377
+ }
378
+ /**
379
+ * @generated from protobuf message injective_megavault_rpc.VolatilityStats
380
+ */
381
+ export interface VolatilityStats {
382
+ /**
383
+ * 30-days volatility
384
+ *
385
+ * @generated from protobuf field: injective_megavault_rpc.Volatility thirty_days = 1
386
+ */
387
+ thirtyDays?: Volatility;
388
+ }
389
+ /**
390
+ * @generated from protobuf message injective_megavault_rpc.Volatility
391
+ */
392
+ export interface Volatility {
393
+ /**
394
+ * Volatility value
395
+ *
396
+ * @generated from protobuf field: string value = 1
397
+ */
398
+ value: string;
399
+ }
400
+ /**
401
+ * @generated from protobuf message injective_megavault_rpc.AprStats
402
+ */
403
+ export interface AprStats {
404
+ /**
405
+ * 30-day APR
406
+ *
407
+ * @generated from protobuf field: injective_megavault_rpc.Apr thirty_days = 1
408
+ */
409
+ thirtyDays?: Apr;
410
+ }
411
+ /**
412
+ * @generated from protobuf message injective_megavault_rpc.Apr
413
+ */
414
+ export interface Apr {
415
+ /**
416
+ * APR value
417
+ *
418
+ * @generated from protobuf field: string value = 1
419
+ */
420
+ value: string;
421
+ /**
422
+ * Original LP price
423
+ *
424
+ * @generated from protobuf field: string original_lp_price = 2
425
+ */
426
+ originalLpPrice: string;
427
+ /**
428
+ * Current LP price
429
+ *
430
+ * @generated from protobuf field: string current_lp_price = 3
431
+ */
432
+ currentLpPrice: string;
433
+ }
434
+ /**
435
+ * @generated from protobuf message injective_megavault_rpc.MaxDrawdown
436
+ */
437
+ export interface MaxDrawdown {
438
+ /**
439
+ * Max drawdown value
440
+ *
441
+ * @generated from protobuf field: string value = 1
442
+ */
443
+ value: string;
444
+ /**
445
+ * Latest PnL peak
446
+ *
447
+ * @generated from protobuf field: string latest_pn_l_peak = 2
448
+ */
449
+ latestPnLPeak: string;
450
+ }
451
+ /**
452
+ * @generated from protobuf message injective_megavault_rpc.GetUserRequest
453
+ */
454
+ export interface GetUserRequest {
455
+ /**
456
+ * Vault address
457
+ *
458
+ * @generated from protobuf field: string vault_address = 1
459
+ */
460
+ vaultAddress: string;
461
+ /**
462
+ * User address
463
+ *
464
+ * @generated from protobuf field: string user_address = 2
465
+ */
466
+ userAddress: string;
467
+ }
468
+ /**
469
+ * @generated from protobuf message injective_megavault_rpc.GetUserResponse
470
+ */
471
+ export interface GetUserResponse {
472
+ /**
473
+ * The user
474
+ *
475
+ * @generated from protobuf field: injective_megavault_rpc.User user = 1
476
+ */
477
+ user?: User;
478
+ }
479
+ /**
480
+ * @generated from protobuf message injective_megavault_rpc.User
481
+ */
482
+ export interface User {
483
+ /**
484
+ * User address
485
+ *
486
+ * @generated from protobuf field: string address = 1
487
+ */
488
+ address: string;
489
+ /**
490
+ * Contract address
491
+ *
492
+ * @generated from protobuf field: string contract_address = 2
493
+ */
494
+ contractAddress: string;
495
+ /**
496
+ * User stats
497
+ *
498
+ * @generated from protobuf field: injective_megavault_rpc.UserStats stats = 3
499
+ */
500
+ stats?: UserStats;
501
+ /**
502
+ * Block height when the vault was updated.
503
+ *
504
+ * @generated from protobuf field: sint64 updated_height = 4
505
+ */
506
+ updatedHeight: bigint;
507
+ /**
508
+ * UpdatedAt timestamp in UNIX millis.
509
+ *
510
+ * @generated from protobuf field: sint64 updated_at = 5
511
+ */
512
+ updatedAt: bigint;
513
+ }
514
+ /**
515
+ * @generated from protobuf message injective_megavault_rpc.UserStats
516
+ */
517
+ export interface UserStats {
518
+ /**
519
+ * Current subscribed amount in the vault
520
+ *
521
+ * @generated from protobuf field: string current_amount = 1
522
+ */
523
+ currentAmount: string;
524
+ /**
525
+ * Current amount of LP tokens in the vault
526
+ *
527
+ * @generated from protobuf field: string current_lp_amount = 2
528
+ */
529
+ currentLpAmount: string;
530
+ /**
531
+ * PnL statistics
532
+ *
533
+ * @generated from protobuf field: injective_megavault_rpc.PnlStats pnl = 3
534
+ */
535
+ pnl?: PnlStats;
536
+ /**
537
+ * Current deposisted value
538
+ *
539
+ * @generated from protobuf field: string deposited_value = 4
540
+ */
541
+ depositedValue: string;
542
+ }
543
+ /**
544
+ * @generated from protobuf message injective_megavault_rpc.ListSubscriptionsRequest
545
+ */
546
+ export interface ListSubscriptionsRequest {
547
+ /**
548
+ * Vault address
549
+ *
550
+ * @generated from protobuf field: string vault_address = 1
551
+ */
552
+ vaultAddress: string;
553
+ /**
554
+ * User address
555
+ *
556
+ * @generated from protobuf field: string user_address = 2
557
+ */
558
+ userAddress: string;
559
+ /**
560
+ * Status of the redemption
561
+ *
562
+ * @generated from protobuf field: string status = 3
563
+ */
564
+ status: string;
565
+ /**
566
+ * @generated from protobuf field: sint32 per_page = 4
567
+ */
568
+ perPage: number;
569
+ /**
570
+ * @generated from protobuf field: string token = 5
571
+ */
572
+ token: string;
573
+ }
574
+ /**
575
+ * @generated from protobuf message injective_megavault_rpc.ListSubscriptionsResponse
576
+ */
577
+ export interface ListSubscriptionsResponse {
578
+ /**
579
+ * List of subscriptions
580
+ *
581
+ * @generated from protobuf field: repeated injective_megavault_rpc.Subscription subscriptions = 1
582
+ */
583
+ subscriptions: Subscription[];
584
+ /**
585
+ * Next tokens for pagination
586
+ *
587
+ * @generated from protobuf field: repeated string next = 2
588
+ */
589
+ next: string[];
590
+ }
591
+ /**
592
+ * @generated from protobuf message injective_megavault_rpc.Subscription
593
+ */
594
+ export interface Subscription {
595
+ /**
596
+ * Contract address
597
+ *
598
+ * @generated from protobuf field: string contract_address = 1
599
+ */
600
+ contractAddress: string;
601
+ /**
602
+ * User
603
+ *
604
+ * @generated from protobuf field: string user = 2
605
+ */
606
+ user: string;
607
+ /**
608
+ * Index number of the subscription
609
+ *
610
+ * @generated from protobuf field: sint64 index = 3
611
+ */
612
+ index: bigint;
613
+ /**
614
+ * Amount of LP tokens given to the user for the subscription
615
+ *
616
+ * @generated from protobuf field: string lp_amount = 4
617
+ */
618
+ lpAmount: string;
619
+ /**
620
+ * Amount in USDT the user gave for the subscription
621
+ *
622
+ * @generated from protobuf field: string amount = 5
623
+ */
624
+ amount: string;
625
+ /**
626
+ * Status of the subscription
627
+ *
628
+ * @generated from protobuf field: string status = 6
629
+ */
630
+ status: string;
631
+ /**
632
+ * Block height when the subscription was created.
633
+ *
634
+ * @generated from protobuf field: sint64 created_height = 7
635
+ */
636
+ createdHeight: bigint;
637
+ /**
638
+ * CreatedAt timestamp in UNIX millis.
639
+ *
640
+ * @generated from protobuf field: sint64 created_at = 8
641
+ */
642
+ createdAt: bigint;
643
+ /**
644
+ * Block height when the subscription was executed.
645
+ *
646
+ * @generated from protobuf field: sint64 executed_height = 9
647
+ */
648
+ executedHeight: bigint;
649
+ /**
650
+ * ExecutedAt timestamp in UNIX millis.
651
+ *
652
+ * @generated from protobuf field: sint64 executed_at = 10
653
+ */
654
+ executedAt: bigint;
655
+ /**
656
+ * Subscription status log
657
+ *
658
+ * @generated from protobuf field: repeated injective_megavault_rpc.OperationStatusLogEntry log = 11
659
+ */
660
+ log: OperationStatusLogEntry[];
661
+ }
662
+ /**
663
+ * @generated from protobuf message injective_megavault_rpc.OperationStatusLogEntry
664
+ */
665
+ export interface OperationStatusLogEntry {
666
+ /**
667
+ * Status of the subscription at this log entry
668
+ *
669
+ * @generated from protobuf field: string status = 1
670
+ */
671
+ status: string;
672
+ /**
673
+ * Transaction hash associated with this log entry
674
+ *
675
+ * @generated from protobuf field: string tx_hash = 2
676
+ */
677
+ txHash: string;
678
+ /**
679
+ * Block height when this log entry occurred
680
+ *
681
+ * @generated from protobuf field: sint64 block_height = 3
682
+ */
683
+ blockHeight: bigint;
684
+ /**
685
+ * Timestamp when this log entry occurred in UNIX millis.
686
+ *
687
+ * @generated from protobuf field: sint64 block_time = 4
688
+ */
689
+ blockTime: bigint;
690
+ }
691
+ /**
692
+ * @generated from protobuf message injective_megavault_rpc.ListRedemptionsRequest
693
+ */
694
+ export interface ListRedemptionsRequest {
695
+ /**
696
+ * Vault address
697
+ *
698
+ * @generated from protobuf field: string vault_address = 1
699
+ */
700
+ vaultAddress: string;
701
+ /**
702
+ * User address
703
+ *
704
+ * @generated from protobuf field: string user_address = 2
705
+ */
706
+ userAddress: string;
707
+ /**
708
+ * Status of the redemption
709
+ *
710
+ * @generated from protobuf field: string status = 3
711
+ */
712
+ status: string;
713
+ /**
714
+ * @generated from protobuf field: sint32 per_page = 4
715
+ */
716
+ perPage: number;
717
+ /**
718
+ * @generated from protobuf field: string token = 5
719
+ */
720
+ token: string;
721
+ }
722
+ /**
723
+ * @generated from protobuf message injective_megavault_rpc.ListRedemptionsResponse
724
+ */
725
+ export interface ListRedemptionsResponse {
726
+ /**
727
+ * List of subscriptions
728
+ *
729
+ * @generated from protobuf field: repeated injective_megavault_rpc.Redemption redemptions = 1
730
+ */
731
+ redemptions: Redemption[];
732
+ /**
733
+ * Next tokens for pagination
734
+ *
735
+ * @generated from protobuf field: repeated string next = 2
736
+ */
737
+ next: string[];
738
+ }
739
+ /**
740
+ * @generated from protobuf message injective_megavault_rpc.Redemption
741
+ */
742
+ export interface Redemption {
743
+ /**
744
+ * Contract address
745
+ *
746
+ * @generated from protobuf field: string contract_address = 1
747
+ */
748
+ contractAddress: string;
749
+ /**
750
+ * User
751
+ *
752
+ * @generated from protobuf field: string user = 2
753
+ */
754
+ user: string;
755
+ /**
756
+ * Index number of the redemption
757
+ *
758
+ * @generated from protobuf field: sint64 index = 3
759
+ */
760
+ index: bigint;
761
+ /**
762
+ * Amount of LP tokens given to the user for the redemption
763
+ *
764
+ * @generated from protobuf field: string lp_amount = 4
765
+ */
766
+ lpAmount: string;
767
+ /**
768
+ * Amount in USDT the user gave for the redemption
769
+ *
770
+ * @generated from protobuf field: string amount = 5
771
+ */
772
+ amount: string;
773
+ /**
774
+ * Status of the subscription
775
+ *
776
+ * @generated from protobuf field: string status = 6
777
+ */
778
+ status: string;
779
+ /**
780
+ * DueAt timestamp in UNIX millis.
781
+ *
782
+ * @generated from protobuf field: sint64 due_at = 7
783
+ */
784
+ dueAt: bigint;
785
+ /**
786
+ * Block height when the subscription was created.
787
+ *
788
+ * @generated from protobuf field: sint64 created_height = 8
789
+ */
790
+ createdHeight: bigint;
791
+ /**
792
+ * CreatedAt timestamp in UNIX millis.
793
+ *
794
+ * @generated from protobuf field: sint64 created_at = 9
795
+ */
796
+ createdAt: bigint;
797
+ /**
798
+ * Block height when the subscription was executed.
799
+ *
800
+ * @generated from protobuf field: sint64 executed_height = 10
801
+ */
802
+ executedHeight: bigint;
803
+ /**
804
+ * ExecutedAt timestamp in UNIX millis.
805
+ *
806
+ * @generated from protobuf field: sint64 executed_at = 11
807
+ */
808
+ executedAt: bigint;
809
+ /**
810
+ * Redemption status log
811
+ *
812
+ * @generated from protobuf field: repeated injective_megavault_rpc.OperationStatusLogEntry log = 12
813
+ */
814
+ log: OperationStatusLogEntry[];
815
+ }
816
+ /**
817
+ * @generated from protobuf message injective_megavault_rpc.GetOperatorRedemptionBucketsRequest
818
+ */
819
+ export interface GetOperatorRedemptionBucketsRequest {
820
+ /**
821
+ * Vault address
822
+ *
823
+ * @generated from protobuf field: string vault_address = 1
824
+ */
825
+ vaultAddress: string;
826
+ /**
827
+ * Operator address
828
+ *
829
+ * @generated from protobuf field: string operator_address = 2
830
+ */
831
+ operatorAddress: string;
832
+ }
833
+ /**
834
+ * @generated from protobuf message injective_megavault_rpc.GetOperatorRedemptionBucketsResponse
835
+ */
836
+ export interface GetOperatorRedemptionBucketsResponse {
837
+ /**
838
+ * The redemption buckets
839
+ *
840
+ * @generated from protobuf field: repeated injective_megavault_rpc.RedemptionBucket buckets = 1
841
+ */
842
+ buckets: RedemptionBucket[];
843
+ }
844
+ /**
845
+ * @generated from protobuf message injective_megavault_rpc.RedemptionBucket
846
+ */
847
+ export interface RedemptionBucket {
848
+ /**
849
+ * Bucket
850
+ *
851
+ * @generated from protobuf field: string bucket = 1
852
+ */
853
+ bucket: string;
854
+ /**
855
+ * Amount of LP tokens to redeem
856
+ *
857
+ * @generated from protobuf field: string lp_amount_to_redeem = 2
858
+ */
859
+ lpAmountToRedeem: string;
860
+ /**
861
+ * Amount needed to cover all the redemptions in the bucket
862
+ *
863
+ * @generated from protobuf field: string needed_amount = 3
864
+ */
865
+ neededAmount: string;
866
+ /**
867
+ * Amount of liquidity missing needed to cover all the redemptions in the bucket
868
+ *
869
+ * @generated from protobuf field: string missing_liquidity = 4
870
+ */
871
+ missingLiquidity: string;
872
+ }
873
+ /**
874
+ * @generated from protobuf message injective_megavault_rpc.TvlHistoryRequest
875
+ */
876
+ export interface TvlHistoryRequest {
877
+ /**
878
+ * Vault address
879
+ *
880
+ * @generated from protobuf field: string vault_address = 1
881
+ */
882
+ vaultAddress: string;
883
+ /**
884
+ * timestamp from which to start the query in milliseconds (UTC)
885
+ *
886
+ * @generated from protobuf field: sint64 since = 2
887
+ */
888
+ since: bigint;
889
+ /**
890
+ * amount of data points to return
891
+ *
892
+ * @generated from protobuf field: sint32 max_data_points = 3
893
+ */
894
+ maxDataPoints: number;
895
+ }
896
+ /**
897
+ * @generated from protobuf message injective_megavault_rpc.TvlHistoryResponse
898
+ */
899
+ export interface TvlHistoryResponse {
900
+ /**
901
+ * @generated from protobuf field: repeated injective_megavault_rpc.HistoricalTVL history = 1
902
+ */
903
+ history: HistoricalTVL[];
904
+ }
905
+ /**
906
+ * @generated from protobuf message injective_megavault_rpc.HistoricalTVL
907
+ */
908
+ export interface HistoricalTVL {
909
+ /**
910
+ * Time, Unix timestamp in milliseconds (UTC)
911
+ *
912
+ * @generated from protobuf field: sint32 t = 1
913
+ */
914
+ t: number;
915
+ /**
916
+ * TVL Value
917
+ *
918
+ * @generated from protobuf field: string v = 2
919
+ */
920
+ v: string;
921
+ }
922
+ /**
923
+ * @generated from protobuf message injective_megavault_rpc.PnlHistoryRequest
924
+ */
925
+ export interface PnlHistoryRequest {
926
+ /**
927
+ * Vault address
928
+ *
929
+ * @generated from protobuf field: string vault_address = 1
930
+ */
931
+ vaultAddress: string;
932
+ /**
933
+ * timestamp from which to start the query in milliseconds (UTC)
934
+ *
935
+ * @generated from protobuf field: sint64 since = 2
936
+ */
937
+ since: bigint;
938
+ /**
939
+ * amount of data points to return
940
+ *
941
+ * @generated from protobuf field: sint32 max_data_points = 3
942
+ */
943
+ maxDataPoints: number;
944
+ }
945
+ /**
946
+ * @generated from protobuf message injective_megavault_rpc.PnlHistoryResponse
947
+ */
948
+ export interface PnlHistoryResponse {
949
+ /**
950
+ * @generated from protobuf field: repeated injective_megavault_rpc.HistoricalPnL history = 1
951
+ */
952
+ history: HistoricalPnL[];
953
+ }
954
+ /**
955
+ * @generated from protobuf message injective_megavault_rpc.HistoricalPnL
956
+ */
957
+ export interface HistoricalPnL {
958
+ /**
959
+ * Time, Unix timestamp in milliseconds (UTC)
960
+ *
961
+ * @generated from protobuf field: sint32 t = 1
962
+ */
963
+ t: number;
964
+ /**
965
+ * PnL Value
966
+ *
967
+ * @generated from protobuf field: string v = 2
968
+ */
969
+ v: string;
970
+ }
971
+ // @generated message type with reflection information, may provide speed optimized methods
972
+ class GetVaultRequest$Type extends MessageType<GetVaultRequest> {
973
+ constructor() {
974
+ super("injective_megavault_rpc.GetVaultRequest", [
975
+ { no: 1, name: "vault_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
976
+ ]);
977
+ }
978
+ create(value?: PartialMessage<GetVaultRequest>): GetVaultRequest {
979
+ const message = globalThis.Object.create((this.messagePrototype!));
980
+ message.vaultAddress = "";
981
+ if (value !== undefined)
982
+ reflectionMergePartial<GetVaultRequest>(this, message, value);
983
+ return message;
984
+ }
985
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetVaultRequest): GetVaultRequest {
986
+ let message = target ?? this.create(), end = reader.pos + length;
987
+ while (reader.pos < end) {
988
+ let [fieldNo, wireType] = reader.tag();
989
+ switch (fieldNo) {
990
+ case /* string vault_address */ 1:
991
+ message.vaultAddress = reader.string();
992
+ break;
993
+ default:
994
+ let u = options.readUnknownField;
995
+ if (u === "throw")
996
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
997
+ let d = reader.skip(wireType);
998
+ if (u !== false)
999
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1000
+ }
1001
+ }
1002
+ return message;
1003
+ }
1004
+ internalBinaryWrite(message: GetVaultRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1005
+ /* string vault_address = 1; */
1006
+ if (message.vaultAddress !== "")
1007
+ writer.tag(1, WireType.LengthDelimited).string(message.vaultAddress);
1008
+ let u = options.writeUnknownFields;
1009
+ if (u !== false)
1010
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1011
+ return writer;
1012
+ }
1013
+ }
1014
+ /**
1015
+ * @generated MessageType for protobuf message injective_megavault_rpc.GetVaultRequest
1016
+ */
1017
+ export const GetVaultRequest = new GetVaultRequest$Type();
1018
+ // @generated message type with reflection information, may provide speed optimized methods
1019
+ class GetVaultResponse$Type extends MessageType<GetVaultResponse> {
1020
+ constructor() {
1021
+ super("injective_megavault_rpc.GetVaultResponse", [
1022
+ { no: 1, name: "vault", kind: "message", T: () => Vault }
1023
+ ]);
1024
+ }
1025
+ create(value?: PartialMessage<GetVaultResponse>): GetVaultResponse {
1026
+ const message = globalThis.Object.create((this.messagePrototype!));
1027
+ if (value !== undefined)
1028
+ reflectionMergePartial<GetVaultResponse>(this, message, value);
1029
+ return message;
1030
+ }
1031
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetVaultResponse): GetVaultResponse {
1032
+ let message = target ?? this.create(), end = reader.pos + length;
1033
+ while (reader.pos < end) {
1034
+ let [fieldNo, wireType] = reader.tag();
1035
+ switch (fieldNo) {
1036
+ case /* injective_megavault_rpc.Vault vault */ 1:
1037
+ message.vault = Vault.internalBinaryRead(reader, reader.uint32(), options, message.vault);
1038
+ break;
1039
+ default:
1040
+ let u = options.readUnknownField;
1041
+ if (u === "throw")
1042
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1043
+ let d = reader.skip(wireType);
1044
+ if (u !== false)
1045
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1046
+ }
1047
+ }
1048
+ return message;
1049
+ }
1050
+ internalBinaryWrite(message: GetVaultResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1051
+ /* injective_megavault_rpc.Vault vault = 1; */
1052
+ if (message.vault)
1053
+ Vault.internalBinaryWrite(message.vault, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1054
+ let u = options.writeUnknownFields;
1055
+ if (u !== false)
1056
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1057
+ return writer;
1058
+ }
1059
+ }
1060
+ /**
1061
+ * @generated MessageType for protobuf message injective_megavault_rpc.GetVaultResponse
1062
+ */
1063
+ export const GetVaultResponse = new GetVaultResponse$Type();
1064
+ // @generated message type with reflection information, may provide speed optimized methods
1065
+ class Vault$Type extends MessageType<Vault> {
1066
+ constructor() {
1067
+ super("injective_megavault_rpc.Vault", [
1068
+ { no: 1, name: "contract_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1069
+ { no: 2, name: "contract_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1070
+ { no: 3, name: "contract_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1071
+ { no: 4, name: "admin", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1072
+ { no: 5, name: "lp_denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1073
+ { no: 6, name: "quote_denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1074
+ { no: 7, name: "operators", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Operator },
1075
+ { no: 8, name: "incentives", kind: "message", T: () => Incentives },
1076
+ { no: 9, name: "target_apr", kind: "message", T: () => TargetApr },
1077
+ { no: 10, name: "stats", kind: "message", T: () => VaultStats },
1078
+ { no: 11, name: "created_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
1079
+ { no: 12, name: "created_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
1080
+ { no: 13, name: "updated_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
1081
+ { no: 14, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
1082
+ ]);
1083
+ }
1084
+ create(value?: PartialMessage<Vault>): Vault {
1085
+ const message = globalThis.Object.create((this.messagePrototype!));
1086
+ message.contractAddress = "";
1087
+ message.contractName = "";
1088
+ message.contractVersion = "";
1089
+ message.admin = "";
1090
+ message.lpDenom = "";
1091
+ message.quoteDenom = "";
1092
+ message.operators = [];
1093
+ message.createdHeight = 0n;
1094
+ message.createdAt = 0n;
1095
+ message.updatedHeight = 0n;
1096
+ message.updatedAt = 0n;
1097
+ if (value !== undefined)
1098
+ reflectionMergePartial<Vault>(this, message, value);
1099
+ return message;
1100
+ }
1101
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Vault): Vault {
1102
+ let message = target ?? this.create(), end = reader.pos + length;
1103
+ while (reader.pos < end) {
1104
+ let [fieldNo, wireType] = reader.tag();
1105
+ switch (fieldNo) {
1106
+ case /* string contract_address */ 1:
1107
+ message.contractAddress = reader.string();
1108
+ break;
1109
+ case /* string contract_name */ 2:
1110
+ message.contractName = reader.string();
1111
+ break;
1112
+ case /* string contract_version */ 3:
1113
+ message.contractVersion = reader.string();
1114
+ break;
1115
+ case /* string admin */ 4:
1116
+ message.admin = reader.string();
1117
+ break;
1118
+ case /* string lp_denom */ 5:
1119
+ message.lpDenom = reader.string();
1120
+ break;
1121
+ case /* string quote_denom */ 6:
1122
+ message.quoteDenom = reader.string();
1123
+ break;
1124
+ case /* repeated injective_megavault_rpc.Operator operators */ 7:
1125
+ message.operators.push(Operator.internalBinaryRead(reader, reader.uint32(), options));
1126
+ break;
1127
+ case /* injective_megavault_rpc.Incentives incentives */ 8:
1128
+ message.incentives = Incentives.internalBinaryRead(reader, reader.uint32(), options, message.incentives);
1129
+ break;
1130
+ case /* injective_megavault_rpc.TargetApr target_apr */ 9:
1131
+ message.targetApr = TargetApr.internalBinaryRead(reader, reader.uint32(), options, message.targetApr);
1132
+ break;
1133
+ case /* injective_megavault_rpc.VaultStats stats */ 10:
1134
+ message.stats = VaultStats.internalBinaryRead(reader, reader.uint32(), options, message.stats);
1135
+ break;
1136
+ case /* sint64 created_height */ 11:
1137
+ message.createdHeight = reader.sint64().toBigInt();
1138
+ break;
1139
+ case /* sint64 created_at */ 12:
1140
+ message.createdAt = reader.sint64().toBigInt();
1141
+ break;
1142
+ case /* sint64 updated_height */ 13:
1143
+ message.updatedHeight = reader.sint64().toBigInt();
1144
+ break;
1145
+ case /* sint64 updated_at */ 14:
1146
+ message.updatedAt = reader.sint64().toBigInt();
1147
+ break;
1148
+ default:
1149
+ let u = options.readUnknownField;
1150
+ if (u === "throw")
1151
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1152
+ let d = reader.skip(wireType);
1153
+ if (u !== false)
1154
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1155
+ }
1156
+ }
1157
+ return message;
1158
+ }
1159
+ internalBinaryWrite(message: Vault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1160
+ /* string contract_address = 1; */
1161
+ if (message.contractAddress !== "")
1162
+ writer.tag(1, WireType.LengthDelimited).string(message.contractAddress);
1163
+ /* string contract_name = 2; */
1164
+ if (message.contractName !== "")
1165
+ writer.tag(2, WireType.LengthDelimited).string(message.contractName);
1166
+ /* string contract_version = 3; */
1167
+ if (message.contractVersion !== "")
1168
+ writer.tag(3, WireType.LengthDelimited).string(message.contractVersion);
1169
+ /* string admin = 4; */
1170
+ if (message.admin !== "")
1171
+ writer.tag(4, WireType.LengthDelimited).string(message.admin);
1172
+ /* string lp_denom = 5; */
1173
+ if (message.lpDenom !== "")
1174
+ writer.tag(5, WireType.LengthDelimited).string(message.lpDenom);
1175
+ /* string quote_denom = 6; */
1176
+ if (message.quoteDenom !== "")
1177
+ writer.tag(6, WireType.LengthDelimited).string(message.quoteDenom);
1178
+ /* repeated injective_megavault_rpc.Operator operators = 7; */
1179
+ for (let i = 0; i < message.operators.length; i++)
1180
+ Operator.internalBinaryWrite(message.operators[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1181
+ /* injective_megavault_rpc.Incentives incentives = 8; */
1182
+ if (message.incentives)
1183
+ Incentives.internalBinaryWrite(message.incentives, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
1184
+ /* injective_megavault_rpc.TargetApr target_apr = 9; */
1185
+ if (message.targetApr)
1186
+ TargetApr.internalBinaryWrite(message.targetApr, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
1187
+ /* injective_megavault_rpc.VaultStats stats = 10; */
1188
+ if (message.stats)
1189
+ VaultStats.internalBinaryWrite(message.stats, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
1190
+ /* sint64 created_height = 11; */
1191
+ if (message.createdHeight !== 0n)
1192
+ writer.tag(11, WireType.Varint).sint64(message.createdHeight);
1193
+ /* sint64 created_at = 12; */
1194
+ if (message.createdAt !== 0n)
1195
+ writer.tag(12, WireType.Varint).sint64(message.createdAt);
1196
+ /* sint64 updated_height = 13; */
1197
+ if (message.updatedHeight !== 0n)
1198
+ writer.tag(13, WireType.Varint).sint64(message.updatedHeight);
1199
+ /* sint64 updated_at = 14; */
1200
+ if (message.updatedAt !== 0n)
1201
+ writer.tag(14, WireType.Varint).sint64(message.updatedAt);
1202
+ let u = options.writeUnknownFields;
1203
+ if (u !== false)
1204
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1205
+ return writer;
1206
+ }
1207
+ }
1208
+ /**
1209
+ * @generated MessageType for protobuf message injective_megavault_rpc.Vault
1210
+ */
1211
+ export const Vault = new Vault$Type();
1212
+ // @generated message type with reflection information, may provide speed optimized methods
1213
+ class Operator$Type extends MessageType<Operator> {
1214
+ constructor() {
1215
+ super("injective_megavault_rpc.Operator", [
1216
+ { no: 1, name: "address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1217
+ { no: 2, name: "total_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1218
+ { no: 3, name: "total_liquid_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1219
+ { no: 4, name: "updated_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
1220
+ { no: 5, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
1221
+ { no: 6, name: "percentage", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1222
+ { no: 7, name: "subaccount_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1223
+ ]);
1224
+ }
1225
+ create(value?: PartialMessage<Operator>): Operator {
1226
+ const message = globalThis.Object.create((this.messagePrototype!));
1227
+ message.address = "";
1228
+ message.totalAmount = "";
1229
+ message.totalLiquidAmount = "";
1230
+ message.updatedHeight = 0n;
1231
+ message.updatedAt = 0n;
1232
+ message.percentage = "";
1233
+ message.subaccountId = "";
1234
+ if (value !== undefined)
1235
+ reflectionMergePartial<Operator>(this, message, value);
1236
+ return message;
1237
+ }
1238
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Operator): Operator {
1239
+ let message = target ?? this.create(), end = reader.pos + length;
1240
+ while (reader.pos < end) {
1241
+ let [fieldNo, wireType] = reader.tag();
1242
+ switch (fieldNo) {
1243
+ case /* string address */ 1:
1244
+ message.address = reader.string();
1245
+ break;
1246
+ case /* string total_amount */ 2:
1247
+ message.totalAmount = reader.string();
1248
+ break;
1249
+ case /* string total_liquid_amount */ 3:
1250
+ message.totalLiquidAmount = reader.string();
1251
+ break;
1252
+ case /* sint64 updated_height */ 4:
1253
+ message.updatedHeight = reader.sint64().toBigInt();
1254
+ break;
1255
+ case /* sint64 updated_at */ 5:
1256
+ message.updatedAt = reader.sint64().toBigInt();
1257
+ break;
1258
+ case /* string percentage */ 6:
1259
+ message.percentage = reader.string();
1260
+ break;
1261
+ case /* string subaccount_id */ 7:
1262
+ message.subaccountId = reader.string();
1263
+ break;
1264
+ default:
1265
+ let u = options.readUnknownField;
1266
+ if (u === "throw")
1267
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1268
+ let d = reader.skip(wireType);
1269
+ if (u !== false)
1270
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1271
+ }
1272
+ }
1273
+ return message;
1274
+ }
1275
+ internalBinaryWrite(message: Operator, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1276
+ /* string address = 1; */
1277
+ if (message.address !== "")
1278
+ writer.tag(1, WireType.LengthDelimited).string(message.address);
1279
+ /* string total_amount = 2; */
1280
+ if (message.totalAmount !== "")
1281
+ writer.tag(2, WireType.LengthDelimited).string(message.totalAmount);
1282
+ /* string total_liquid_amount = 3; */
1283
+ if (message.totalLiquidAmount !== "")
1284
+ writer.tag(3, WireType.LengthDelimited).string(message.totalLiquidAmount);
1285
+ /* sint64 updated_height = 4; */
1286
+ if (message.updatedHeight !== 0n)
1287
+ writer.tag(4, WireType.Varint).sint64(message.updatedHeight);
1288
+ /* sint64 updated_at = 5; */
1289
+ if (message.updatedAt !== 0n)
1290
+ writer.tag(5, WireType.Varint).sint64(message.updatedAt);
1291
+ /* string percentage = 6; */
1292
+ if (message.percentage !== "")
1293
+ writer.tag(6, WireType.LengthDelimited).string(message.percentage);
1294
+ /* string subaccount_id = 7; */
1295
+ if (message.subaccountId !== "")
1296
+ writer.tag(7, WireType.LengthDelimited).string(message.subaccountId);
1297
+ let u = options.writeUnknownFields;
1298
+ if (u !== false)
1299
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1300
+ return writer;
1301
+ }
1302
+ }
1303
+ /**
1304
+ * @generated MessageType for protobuf message injective_megavault_rpc.Operator
1305
+ */
1306
+ export const Operator = new Operator$Type();
1307
+ // @generated message type with reflection information, may provide speed optimized methods
1308
+ class Incentives$Type extends MessageType<Incentives> {
1309
+ constructor() {
1310
+ super("injective_megavault_rpc.Incentives", [
1311
+ { no: 1, name: "address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1312
+ { no: 2, name: "amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1313
+ { no: 3, name: "updated_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
1314
+ { no: 4, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
1315
+ ]);
1316
+ }
1317
+ create(value?: PartialMessage<Incentives>): Incentives {
1318
+ const message = globalThis.Object.create((this.messagePrototype!));
1319
+ message.address = "";
1320
+ message.amount = "";
1321
+ message.updatedHeight = 0n;
1322
+ message.updatedAt = 0n;
1323
+ if (value !== undefined)
1324
+ reflectionMergePartial<Incentives>(this, message, value);
1325
+ return message;
1326
+ }
1327
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Incentives): Incentives {
1328
+ let message = target ?? this.create(), end = reader.pos + length;
1329
+ while (reader.pos < end) {
1330
+ let [fieldNo, wireType] = reader.tag();
1331
+ switch (fieldNo) {
1332
+ case /* string address */ 1:
1333
+ message.address = reader.string();
1334
+ break;
1335
+ case /* string amount */ 2:
1336
+ message.amount = reader.string();
1337
+ break;
1338
+ case /* sint64 updated_height */ 3:
1339
+ message.updatedHeight = reader.sint64().toBigInt();
1340
+ break;
1341
+ case /* sint64 updated_at */ 4:
1342
+ message.updatedAt = reader.sint64().toBigInt();
1343
+ break;
1344
+ default:
1345
+ let u = options.readUnknownField;
1346
+ if (u === "throw")
1347
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1348
+ let d = reader.skip(wireType);
1349
+ if (u !== false)
1350
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1351
+ }
1352
+ }
1353
+ return message;
1354
+ }
1355
+ internalBinaryWrite(message: Incentives, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1356
+ /* string address = 1; */
1357
+ if (message.address !== "")
1358
+ writer.tag(1, WireType.LengthDelimited).string(message.address);
1359
+ /* string amount = 2; */
1360
+ if (message.amount !== "")
1361
+ writer.tag(2, WireType.LengthDelimited).string(message.amount);
1362
+ /* sint64 updated_height = 3; */
1363
+ if (message.updatedHeight !== 0n)
1364
+ writer.tag(3, WireType.Varint).sint64(message.updatedHeight);
1365
+ /* sint64 updated_at = 4; */
1366
+ if (message.updatedAt !== 0n)
1367
+ writer.tag(4, WireType.Varint).sint64(message.updatedAt);
1368
+ let u = options.writeUnknownFields;
1369
+ if (u !== false)
1370
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1371
+ return writer;
1372
+ }
1373
+ }
1374
+ /**
1375
+ * @generated MessageType for protobuf message injective_megavault_rpc.Incentives
1376
+ */
1377
+ export const Incentives = new Incentives$Type();
1378
+ // @generated message type with reflection information, may provide speed optimized methods
1379
+ class TargetApr$Type extends MessageType<TargetApr> {
1380
+ constructor() {
1381
+ super("injective_megavault_rpc.TargetApr", [
1382
+ { no: 1, name: "apr", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1383
+ { no: 2, name: "upper_threshold", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1384
+ { no: 3, name: "lower_threshold", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1385
+ { no: 4, name: "updated_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
1386
+ { no: 5, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
1387
+ ]);
1388
+ }
1389
+ create(value?: PartialMessage<TargetApr>): TargetApr {
1390
+ const message = globalThis.Object.create((this.messagePrototype!));
1391
+ message.apr = "";
1392
+ message.upperThreshold = "";
1393
+ message.lowerThreshold = "";
1394
+ message.updatedHeight = 0n;
1395
+ message.updatedAt = 0n;
1396
+ if (value !== undefined)
1397
+ reflectionMergePartial<TargetApr>(this, message, value);
1398
+ return message;
1399
+ }
1400
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TargetApr): TargetApr {
1401
+ let message = target ?? this.create(), end = reader.pos + length;
1402
+ while (reader.pos < end) {
1403
+ let [fieldNo, wireType] = reader.tag();
1404
+ switch (fieldNo) {
1405
+ case /* string apr */ 1:
1406
+ message.apr = reader.string();
1407
+ break;
1408
+ case /* string upper_threshold */ 2:
1409
+ message.upperThreshold = reader.string();
1410
+ break;
1411
+ case /* string lower_threshold */ 3:
1412
+ message.lowerThreshold = reader.string();
1413
+ break;
1414
+ case /* sint64 updated_height */ 4:
1415
+ message.updatedHeight = reader.sint64().toBigInt();
1416
+ break;
1417
+ case /* sint64 updated_at */ 5:
1418
+ message.updatedAt = reader.sint64().toBigInt();
1419
+ break;
1420
+ default:
1421
+ let u = options.readUnknownField;
1422
+ if (u === "throw")
1423
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1424
+ let d = reader.skip(wireType);
1425
+ if (u !== false)
1426
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1427
+ }
1428
+ }
1429
+ return message;
1430
+ }
1431
+ internalBinaryWrite(message: TargetApr, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1432
+ /* string apr = 1; */
1433
+ if (message.apr !== "")
1434
+ writer.tag(1, WireType.LengthDelimited).string(message.apr);
1435
+ /* string upper_threshold = 2; */
1436
+ if (message.upperThreshold !== "")
1437
+ writer.tag(2, WireType.LengthDelimited).string(message.upperThreshold);
1438
+ /* string lower_threshold = 3; */
1439
+ if (message.lowerThreshold !== "")
1440
+ writer.tag(3, WireType.LengthDelimited).string(message.lowerThreshold);
1441
+ /* sint64 updated_height = 4; */
1442
+ if (message.updatedHeight !== 0n)
1443
+ writer.tag(4, WireType.Varint).sint64(message.updatedHeight);
1444
+ /* sint64 updated_at = 5; */
1445
+ if (message.updatedAt !== 0n)
1446
+ writer.tag(5, WireType.Varint).sint64(message.updatedAt);
1447
+ let u = options.writeUnknownFields;
1448
+ if (u !== false)
1449
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1450
+ return writer;
1451
+ }
1452
+ }
1453
+ /**
1454
+ * @generated MessageType for protobuf message injective_megavault_rpc.TargetApr
1455
+ */
1456
+ export const TargetApr = new TargetApr$Type();
1457
+ // @generated message type with reflection information, may provide speed optimized methods
1458
+ class VaultStats$Type extends MessageType<VaultStats> {
1459
+ constructor() {
1460
+ super("injective_megavault_rpc.VaultStats", [
1461
+ { no: 1, name: "total_subscribed_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1462
+ { no: 2, name: "total_redeemed_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1463
+ { no: 3, name: "current_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1464
+ { no: 4, name: "current_amount_without_incentives", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1465
+ { no: 5, name: "current_lp_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1466
+ { no: 6, name: "current_lp_price", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1467
+ { no: 7, name: "pnl", kind: "message", T: () => PnlStats },
1468
+ { no: 8, name: "volatility", kind: "message", T: () => VolatilityStats },
1469
+ { no: 9, name: "apr", kind: "message", T: () => AprStats },
1470
+ { no: 10, name: "max_drawdown", kind: "message", T: () => MaxDrawdown }
1471
+ ]);
1472
+ }
1473
+ create(value?: PartialMessage<VaultStats>): VaultStats {
1474
+ const message = globalThis.Object.create((this.messagePrototype!));
1475
+ message.totalSubscribedAmount = "";
1476
+ message.totalRedeemedAmount = "";
1477
+ message.currentAmount = "";
1478
+ message.currentAmountWithoutIncentives = "";
1479
+ message.currentLpAmount = "";
1480
+ message.currentLpPrice = "";
1481
+ if (value !== undefined)
1482
+ reflectionMergePartial<VaultStats>(this, message, value);
1483
+ return message;
1484
+ }
1485
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VaultStats): VaultStats {
1486
+ let message = target ?? this.create(), end = reader.pos + length;
1487
+ while (reader.pos < end) {
1488
+ let [fieldNo, wireType] = reader.tag();
1489
+ switch (fieldNo) {
1490
+ case /* string total_subscribed_amount */ 1:
1491
+ message.totalSubscribedAmount = reader.string();
1492
+ break;
1493
+ case /* string total_redeemed_amount */ 2:
1494
+ message.totalRedeemedAmount = reader.string();
1495
+ break;
1496
+ case /* string current_amount */ 3:
1497
+ message.currentAmount = reader.string();
1498
+ break;
1499
+ case /* string current_amount_without_incentives */ 4:
1500
+ message.currentAmountWithoutIncentives = reader.string();
1501
+ break;
1502
+ case /* string current_lp_amount */ 5:
1503
+ message.currentLpAmount = reader.string();
1504
+ break;
1505
+ case /* string current_lp_price */ 6:
1506
+ message.currentLpPrice = reader.string();
1507
+ break;
1508
+ case /* injective_megavault_rpc.PnlStats pnl */ 7:
1509
+ message.pnl = PnlStats.internalBinaryRead(reader, reader.uint32(), options, message.pnl);
1510
+ break;
1511
+ case /* injective_megavault_rpc.VolatilityStats volatility */ 8:
1512
+ message.volatility = VolatilityStats.internalBinaryRead(reader, reader.uint32(), options, message.volatility);
1513
+ break;
1514
+ case /* injective_megavault_rpc.AprStats apr */ 9:
1515
+ message.apr = AprStats.internalBinaryRead(reader, reader.uint32(), options, message.apr);
1516
+ break;
1517
+ case /* injective_megavault_rpc.MaxDrawdown max_drawdown */ 10:
1518
+ message.maxDrawdown = MaxDrawdown.internalBinaryRead(reader, reader.uint32(), options, message.maxDrawdown);
1519
+ break;
1520
+ default:
1521
+ let u = options.readUnknownField;
1522
+ if (u === "throw")
1523
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1524
+ let d = reader.skip(wireType);
1525
+ if (u !== false)
1526
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1527
+ }
1528
+ }
1529
+ return message;
1530
+ }
1531
+ internalBinaryWrite(message: VaultStats, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1532
+ /* string total_subscribed_amount = 1; */
1533
+ if (message.totalSubscribedAmount !== "")
1534
+ writer.tag(1, WireType.LengthDelimited).string(message.totalSubscribedAmount);
1535
+ /* string total_redeemed_amount = 2; */
1536
+ if (message.totalRedeemedAmount !== "")
1537
+ writer.tag(2, WireType.LengthDelimited).string(message.totalRedeemedAmount);
1538
+ /* string current_amount = 3; */
1539
+ if (message.currentAmount !== "")
1540
+ writer.tag(3, WireType.LengthDelimited).string(message.currentAmount);
1541
+ /* string current_amount_without_incentives = 4; */
1542
+ if (message.currentAmountWithoutIncentives !== "")
1543
+ writer.tag(4, WireType.LengthDelimited).string(message.currentAmountWithoutIncentives);
1544
+ /* string current_lp_amount = 5; */
1545
+ if (message.currentLpAmount !== "")
1546
+ writer.tag(5, WireType.LengthDelimited).string(message.currentLpAmount);
1547
+ /* string current_lp_price = 6; */
1548
+ if (message.currentLpPrice !== "")
1549
+ writer.tag(6, WireType.LengthDelimited).string(message.currentLpPrice);
1550
+ /* injective_megavault_rpc.PnlStats pnl = 7; */
1551
+ if (message.pnl)
1552
+ PnlStats.internalBinaryWrite(message.pnl, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1553
+ /* injective_megavault_rpc.VolatilityStats volatility = 8; */
1554
+ if (message.volatility)
1555
+ VolatilityStats.internalBinaryWrite(message.volatility, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
1556
+ /* injective_megavault_rpc.AprStats apr = 9; */
1557
+ if (message.apr)
1558
+ AprStats.internalBinaryWrite(message.apr, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
1559
+ /* injective_megavault_rpc.MaxDrawdown max_drawdown = 10; */
1560
+ if (message.maxDrawdown)
1561
+ MaxDrawdown.internalBinaryWrite(message.maxDrawdown, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
1562
+ let u = options.writeUnknownFields;
1563
+ if (u !== false)
1564
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1565
+ return writer;
1566
+ }
1567
+ }
1568
+ /**
1569
+ * @generated MessageType for protobuf message injective_megavault_rpc.VaultStats
1570
+ */
1571
+ export const VaultStats = new VaultStats$Type();
1572
+ // @generated message type with reflection information, may provide speed optimized methods
1573
+ class PnlStats$Type extends MessageType<PnlStats> {
1574
+ constructor() {
1575
+ super("injective_megavault_rpc.PnlStats", [
1576
+ { no: 1, name: "unrealized", kind: "message", T: () => UnrealizedPnl },
1577
+ { no: 2, name: "all_time", kind: "message", T: () => Pnl }
1578
+ ]);
1579
+ }
1580
+ create(value?: PartialMessage<PnlStats>): PnlStats {
1581
+ const message = globalThis.Object.create((this.messagePrototype!));
1582
+ if (value !== undefined)
1583
+ reflectionMergePartial<PnlStats>(this, message, value);
1584
+ return message;
1585
+ }
1586
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PnlStats): PnlStats {
1587
+ let message = target ?? this.create(), end = reader.pos + length;
1588
+ while (reader.pos < end) {
1589
+ let [fieldNo, wireType] = reader.tag();
1590
+ switch (fieldNo) {
1591
+ case /* injective_megavault_rpc.UnrealizedPnl unrealized */ 1:
1592
+ message.unrealized = UnrealizedPnl.internalBinaryRead(reader, reader.uint32(), options, message.unrealized);
1593
+ break;
1594
+ case /* injective_megavault_rpc.Pnl all_time */ 2:
1595
+ message.allTime = Pnl.internalBinaryRead(reader, reader.uint32(), options, message.allTime);
1596
+ break;
1597
+ default:
1598
+ let u = options.readUnknownField;
1599
+ if (u === "throw")
1600
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1601
+ let d = reader.skip(wireType);
1602
+ if (u !== false)
1603
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1604
+ }
1605
+ }
1606
+ return message;
1607
+ }
1608
+ internalBinaryWrite(message: PnlStats, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1609
+ /* injective_megavault_rpc.UnrealizedPnl unrealized = 1; */
1610
+ if (message.unrealized)
1611
+ UnrealizedPnl.internalBinaryWrite(message.unrealized, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1612
+ /* injective_megavault_rpc.Pnl all_time = 2; */
1613
+ if (message.allTime)
1614
+ Pnl.internalBinaryWrite(message.allTime, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1615
+ let u = options.writeUnknownFields;
1616
+ if (u !== false)
1617
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1618
+ return writer;
1619
+ }
1620
+ }
1621
+ /**
1622
+ * @generated MessageType for protobuf message injective_megavault_rpc.PnlStats
1623
+ */
1624
+ export const PnlStats = new PnlStats$Type();
1625
+ // @generated message type with reflection information, may provide speed optimized methods
1626
+ class UnrealizedPnl$Type extends MessageType<UnrealizedPnl> {
1627
+ constructor() {
1628
+ super("injective_megavault_rpc.UnrealizedPnl", [
1629
+ { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1630
+ { no: 2, name: "percentage", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1631
+ ]);
1632
+ }
1633
+ create(value?: PartialMessage<UnrealizedPnl>): UnrealizedPnl {
1634
+ const message = globalThis.Object.create((this.messagePrototype!));
1635
+ message.value = "";
1636
+ message.percentage = "";
1637
+ if (value !== undefined)
1638
+ reflectionMergePartial<UnrealizedPnl>(this, message, value);
1639
+ return message;
1640
+ }
1641
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnrealizedPnl): UnrealizedPnl {
1642
+ let message = target ?? this.create(), end = reader.pos + length;
1643
+ while (reader.pos < end) {
1644
+ let [fieldNo, wireType] = reader.tag();
1645
+ switch (fieldNo) {
1646
+ case /* string value */ 1:
1647
+ message.value = reader.string();
1648
+ break;
1649
+ case /* string percentage */ 2:
1650
+ message.percentage = reader.string();
1651
+ break;
1652
+ default:
1653
+ let u = options.readUnknownField;
1654
+ if (u === "throw")
1655
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1656
+ let d = reader.skip(wireType);
1657
+ if (u !== false)
1658
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1659
+ }
1660
+ }
1661
+ return message;
1662
+ }
1663
+ internalBinaryWrite(message: UnrealizedPnl, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1664
+ /* string value = 1; */
1665
+ if (message.value !== "")
1666
+ writer.tag(1, WireType.LengthDelimited).string(message.value);
1667
+ /* string percentage = 2; */
1668
+ if (message.percentage !== "")
1669
+ writer.tag(2, WireType.LengthDelimited).string(message.percentage);
1670
+ let u = options.writeUnknownFields;
1671
+ if (u !== false)
1672
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1673
+ return writer;
1674
+ }
1675
+ }
1676
+ /**
1677
+ * @generated MessageType for protobuf message injective_megavault_rpc.UnrealizedPnl
1678
+ */
1679
+ export const UnrealizedPnl = new UnrealizedPnl$Type();
1680
+ // @generated message type with reflection information, may provide speed optimized methods
1681
+ class Pnl$Type extends MessageType<Pnl> {
1682
+ constructor() {
1683
+ super("injective_megavault_rpc.Pnl", [
1684
+ { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1685
+ { no: 2, name: "percentage", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1686
+ { no: 3, name: "total_amount_subscribed", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1687
+ { no: 4, name: "total_amount_redeemed", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1688
+ { no: 5, name: "current_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1689
+ ]);
1690
+ }
1691
+ create(value?: PartialMessage<Pnl>): Pnl {
1692
+ const message = globalThis.Object.create((this.messagePrototype!));
1693
+ message.value = "";
1694
+ message.percentage = "";
1695
+ message.totalAmountSubscribed = "";
1696
+ message.totalAmountRedeemed = "";
1697
+ message.currentAmount = "";
1698
+ if (value !== undefined)
1699
+ reflectionMergePartial<Pnl>(this, message, value);
1700
+ return message;
1701
+ }
1702
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Pnl): Pnl {
1703
+ let message = target ?? this.create(), end = reader.pos + length;
1704
+ while (reader.pos < end) {
1705
+ let [fieldNo, wireType] = reader.tag();
1706
+ switch (fieldNo) {
1707
+ case /* string value */ 1:
1708
+ message.value = reader.string();
1709
+ break;
1710
+ case /* string percentage */ 2:
1711
+ message.percentage = reader.string();
1712
+ break;
1713
+ case /* string total_amount_subscribed */ 3:
1714
+ message.totalAmountSubscribed = reader.string();
1715
+ break;
1716
+ case /* string total_amount_redeemed */ 4:
1717
+ message.totalAmountRedeemed = reader.string();
1718
+ break;
1719
+ case /* string current_amount */ 5:
1720
+ message.currentAmount = reader.string();
1721
+ break;
1722
+ default:
1723
+ let u = options.readUnknownField;
1724
+ if (u === "throw")
1725
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1726
+ let d = reader.skip(wireType);
1727
+ if (u !== false)
1728
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1729
+ }
1730
+ }
1731
+ return message;
1732
+ }
1733
+ internalBinaryWrite(message: Pnl, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1734
+ /* string value = 1; */
1735
+ if (message.value !== "")
1736
+ writer.tag(1, WireType.LengthDelimited).string(message.value);
1737
+ /* string percentage = 2; */
1738
+ if (message.percentage !== "")
1739
+ writer.tag(2, WireType.LengthDelimited).string(message.percentage);
1740
+ /* string total_amount_subscribed = 3; */
1741
+ if (message.totalAmountSubscribed !== "")
1742
+ writer.tag(3, WireType.LengthDelimited).string(message.totalAmountSubscribed);
1743
+ /* string total_amount_redeemed = 4; */
1744
+ if (message.totalAmountRedeemed !== "")
1745
+ writer.tag(4, WireType.LengthDelimited).string(message.totalAmountRedeemed);
1746
+ /* string current_amount = 5; */
1747
+ if (message.currentAmount !== "")
1748
+ writer.tag(5, WireType.LengthDelimited).string(message.currentAmount);
1749
+ let u = options.writeUnknownFields;
1750
+ if (u !== false)
1751
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1752
+ return writer;
1753
+ }
1754
+ }
1755
+ /**
1756
+ * @generated MessageType for protobuf message injective_megavault_rpc.Pnl
1757
+ */
1758
+ export const Pnl = new Pnl$Type();
1759
+ // @generated message type with reflection information, may provide speed optimized methods
1760
+ class VolatilityStats$Type extends MessageType<VolatilityStats> {
1761
+ constructor() {
1762
+ super("injective_megavault_rpc.VolatilityStats", [
1763
+ { no: 1, name: "thirty_days", kind: "message", T: () => Volatility }
1764
+ ]);
1765
+ }
1766
+ create(value?: PartialMessage<VolatilityStats>): VolatilityStats {
1767
+ const message = globalThis.Object.create((this.messagePrototype!));
1768
+ if (value !== undefined)
1769
+ reflectionMergePartial<VolatilityStats>(this, message, value);
1770
+ return message;
1771
+ }
1772
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VolatilityStats): VolatilityStats {
1773
+ let message = target ?? this.create(), end = reader.pos + length;
1774
+ while (reader.pos < end) {
1775
+ let [fieldNo, wireType] = reader.tag();
1776
+ switch (fieldNo) {
1777
+ case /* injective_megavault_rpc.Volatility thirty_days */ 1:
1778
+ message.thirtyDays = Volatility.internalBinaryRead(reader, reader.uint32(), options, message.thirtyDays);
1779
+ break;
1780
+ default:
1781
+ let u = options.readUnknownField;
1782
+ if (u === "throw")
1783
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1784
+ let d = reader.skip(wireType);
1785
+ if (u !== false)
1786
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1787
+ }
1788
+ }
1789
+ return message;
1790
+ }
1791
+ internalBinaryWrite(message: VolatilityStats, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1792
+ /* injective_megavault_rpc.Volatility thirty_days = 1; */
1793
+ if (message.thirtyDays)
1794
+ Volatility.internalBinaryWrite(message.thirtyDays, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1795
+ let u = options.writeUnknownFields;
1796
+ if (u !== false)
1797
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1798
+ return writer;
1799
+ }
1800
+ }
1801
+ /**
1802
+ * @generated MessageType for protobuf message injective_megavault_rpc.VolatilityStats
1803
+ */
1804
+ export const VolatilityStats = new VolatilityStats$Type();
1805
+ // @generated message type with reflection information, may provide speed optimized methods
1806
+ class Volatility$Type extends MessageType<Volatility> {
1807
+ constructor() {
1808
+ super("injective_megavault_rpc.Volatility", [
1809
+ { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1810
+ ]);
1811
+ }
1812
+ create(value?: PartialMessage<Volatility>): Volatility {
1813
+ const message = globalThis.Object.create((this.messagePrototype!));
1814
+ message.value = "";
1815
+ if (value !== undefined)
1816
+ reflectionMergePartial<Volatility>(this, message, value);
1817
+ return message;
1818
+ }
1819
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Volatility): Volatility {
1820
+ let message = target ?? this.create(), end = reader.pos + length;
1821
+ while (reader.pos < end) {
1822
+ let [fieldNo, wireType] = reader.tag();
1823
+ switch (fieldNo) {
1824
+ case /* string value */ 1:
1825
+ message.value = reader.string();
1826
+ break;
1827
+ default:
1828
+ let u = options.readUnknownField;
1829
+ if (u === "throw")
1830
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1831
+ let d = reader.skip(wireType);
1832
+ if (u !== false)
1833
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1834
+ }
1835
+ }
1836
+ return message;
1837
+ }
1838
+ internalBinaryWrite(message: Volatility, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1839
+ /* string value = 1; */
1840
+ if (message.value !== "")
1841
+ writer.tag(1, WireType.LengthDelimited).string(message.value);
1842
+ let u = options.writeUnknownFields;
1843
+ if (u !== false)
1844
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1845
+ return writer;
1846
+ }
1847
+ }
1848
+ /**
1849
+ * @generated MessageType for protobuf message injective_megavault_rpc.Volatility
1850
+ */
1851
+ export const Volatility = new Volatility$Type();
1852
+ // @generated message type with reflection information, may provide speed optimized methods
1853
+ class AprStats$Type extends MessageType<AprStats> {
1854
+ constructor() {
1855
+ super("injective_megavault_rpc.AprStats", [
1856
+ { no: 1, name: "thirty_days", kind: "message", T: () => Apr }
1857
+ ]);
1858
+ }
1859
+ create(value?: PartialMessage<AprStats>): AprStats {
1860
+ const message = globalThis.Object.create((this.messagePrototype!));
1861
+ if (value !== undefined)
1862
+ reflectionMergePartial<AprStats>(this, message, value);
1863
+ return message;
1864
+ }
1865
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AprStats): AprStats {
1866
+ let message = target ?? this.create(), end = reader.pos + length;
1867
+ while (reader.pos < end) {
1868
+ let [fieldNo, wireType] = reader.tag();
1869
+ switch (fieldNo) {
1870
+ case /* injective_megavault_rpc.Apr thirty_days */ 1:
1871
+ message.thirtyDays = Apr.internalBinaryRead(reader, reader.uint32(), options, message.thirtyDays);
1872
+ break;
1873
+ default:
1874
+ let u = options.readUnknownField;
1875
+ if (u === "throw")
1876
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1877
+ let d = reader.skip(wireType);
1878
+ if (u !== false)
1879
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1880
+ }
1881
+ }
1882
+ return message;
1883
+ }
1884
+ internalBinaryWrite(message: AprStats, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1885
+ /* injective_megavault_rpc.Apr thirty_days = 1; */
1886
+ if (message.thirtyDays)
1887
+ Apr.internalBinaryWrite(message.thirtyDays, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1888
+ let u = options.writeUnknownFields;
1889
+ if (u !== false)
1890
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1891
+ return writer;
1892
+ }
1893
+ }
1894
+ /**
1895
+ * @generated MessageType for protobuf message injective_megavault_rpc.AprStats
1896
+ */
1897
+ export const AprStats = new AprStats$Type();
1898
+ // @generated message type with reflection information, may provide speed optimized methods
1899
+ class Apr$Type extends MessageType<Apr> {
1900
+ constructor() {
1901
+ super("injective_megavault_rpc.Apr", [
1902
+ { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1903
+ { no: 2, name: "original_lp_price", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1904
+ { no: 3, name: "current_lp_price", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1905
+ ]);
1906
+ }
1907
+ create(value?: PartialMessage<Apr>): Apr {
1908
+ const message = globalThis.Object.create((this.messagePrototype!));
1909
+ message.value = "";
1910
+ message.originalLpPrice = "";
1911
+ message.currentLpPrice = "";
1912
+ if (value !== undefined)
1913
+ reflectionMergePartial<Apr>(this, message, value);
1914
+ return message;
1915
+ }
1916
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Apr): Apr {
1917
+ let message = target ?? this.create(), end = reader.pos + length;
1918
+ while (reader.pos < end) {
1919
+ let [fieldNo, wireType] = reader.tag();
1920
+ switch (fieldNo) {
1921
+ case /* string value */ 1:
1922
+ message.value = reader.string();
1923
+ break;
1924
+ case /* string original_lp_price */ 2:
1925
+ message.originalLpPrice = reader.string();
1926
+ break;
1927
+ case /* string current_lp_price */ 3:
1928
+ message.currentLpPrice = reader.string();
1929
+ break;
1930
+ default:
1931
+ let u = options.readUnknownField;
1932
+ if (u === "throw")
1933
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1934
+ let d = reader.skip(wireType);
1935
+ if (u !== false)
1936
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1937
+ }
1938
+ }
1939
+ return message;
1940
+ }
1941
+ internalBinaryWrite(message: Apr, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1942
+ /* string value = 1; */
1943
+ if (message.value !== "")
1944
+ writer.tag(1, WireType.LengthDelimited).string(message.value);
1945
+ /* string original_lp_price = 2; */
1946
+ if (message.originalLpPrice !== "")
1947
+ writer.tag(2, WireType.LengthDelimited).string(message.originalLpPrice);
1948
+ /* string current_lp_price = 3; */
1949
+ if (message.currentLpPrice !== "")
1950
+ writer.tag(3, WireType.LengthDelimited).string(message.currentLpPrice);
1951
+ let u = options.writeUnknownFields;
1952
+ if (u !== false)
1953
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1954
+ return writer;
1955
+ }
1956
+ }
1957
+ /**
1958
+ * @generated MessageType for protobuf message injective_megavault_rpc.Apr
1959
+ */
1960
+ export const Apr = new Apr$Type();
1961
+ // @generated message type with reflection information, may provide speed optimized methods
1962
+ class MaxDrawdown$Type extends MessageType<MaxDrawdown> {
1963
+ constructor() {
1964
+ super("injective_megavault_rpc.MaxDrawdown", [
1965
+ { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1966
+ { no: 2, name: "latest_pn_l_peak", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1967
+ ]);
1968
+ }
1969
+ create(value?: PartialMessage<MaxDrawdown>): MaxDrawdown {
1970
+ const message = globalThis.Object.create((this.messagePrototype!));
1971
+ message.value = "";
1972
+ message.latestPnLPeak = "";
1973
+ if (value !== undefined)
1974
+ reflectionMergePartial<MaxDrawdown>(this, message, value);
1975
+ return message;
1976
+ }
1977
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MaxDrawdown): MaxDrawdown {
1978
+ let message = target ?? this.create(), end = reader.pos + length;
1979
+ while (reader.pos < end) {
1980
+ let [fieldNo, wireType] = reader.tag();
1981
+ switch (fieldNo) {
1982
+ case /* string value */ 1:
1983
+ message.value = reader.string();
1984
+ break;
1985
+ case /* string latest_pn_l_peak */ 2:
1986
+ message.latestPnLPeak = reader.string();
1987
+ break;
1988
+ default:
1989
+ let u = options.readUnknownField;
1990
+ if (u === "throw")
1991
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1992
+ let d = reader.skip(wireType);
1993
+ if (u !== false)
1994
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1995
+ }
1996
+ }
1997
+ return message;
1998
+ }
1999
+ internalBinaryWrite(message: MaxDrawdown, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2000
+ /* string value = 1; */
2001
+ if (message.value !== "")
2002
+ writer.tag(1, WireType.LengthDelimited).string(message.value);
2003
+ /* string latest_pn_l_peak = 2; */
2004
+ if (message.latestPnLPeak !== "")
2005
+ writer.tag(2, WireType.LengthDelimited).string(message.latestPnLPeak);
2006
+ let u = options.writeUnknownFields;
2007
+ if (u !== false)
2008
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2009
+ return writer;
2010
+ }
2011
+ }
2012
+ /**
2013
+ * @generated MessageType for protobuf message injective_megavault_rpc.MaxDrawdown
2014
+ */
2015
+ export const MaxDrawdown = new MaxDrawdown$Type();
2016
+ // @generated message type with reflection information, may provide speed optimized methods
2017
+ class GetUserRequest$Type extends MessageType<GetUserRequest> {
2018
+ constructor() {
2019
+ super("injective_megavault_rpc.GetUserRequest", [
2020
+ { no: 1, name: "vault_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2021
+ { no: 2, name: "user_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2022
+ ]);
2023
+ }
2024
+ create(value?: PartialMessage<GetUserRequest>): GetUserRequest {
2025
+ const message = globalThis.Object.create((this.messagePrototype!));
2026
+ message.vaultAddress = "";
2027
+ message.userAddress = "";
2028
+ if (value !== undefined)
2029
+ reflectionMergePartial<GetUserRequest>(this, message, value);
2030
+ return message;
2031
+ }
2032
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserRequest): GetUserRequest {
2033
+ let message = target ?? this.create(), end = reader.pos + length;
2034
+ while (reader.pos < end) {
2035
+ let [fieldNo, wireType] = reader.tag();
2036
+ switch (fieldNo) {
2037
+ case /* string vault_address */ 1:
2038
+ message.vaultAddress = reader.string();
2039
+ break;
2040
+ case /* string user_address */ 2:
2041
+ message.userAddress = reader.string();
2042
+ break;
2043
+ default:
2044
+ let u = options.readUnknownField;
2045
+ if (u === "throw")
2046
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2047
+ let d = reader.skip(wireType);
2048
+ if (u !== false)
2049
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2050
+ }
2051
+ }
2052
+ return message;
2053
+ }
2054
+ internalBinaryWrite(message: GetUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2055
+ /* string vault_address = 1; */
2056
+ if (message.vaultAddress !== "")
2057
+ writer.tag(1, WireType.LengthDelimited).string(message.vaultAddress);
2058
+ /* string user_address = 2; */
2059
+ if (message.userAddress !== "")
2060
+ writer.tag(2, WireType.LengthDelimited).string(message.userAddress);
2061
+ let u = options.writeUnknownFields;
2062
+ if (u !== false)
2063
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2064
+ return writer;
2065
+ }
2066
+ }
2067
+ /**
2068
+ * @generated MessageType for protobuf message injective_megavault_rpc.GetUserRequest
2069
+ */
2070
+ export const GetUserRequest = new GetUserRequest$Type();
2071
+ // @generated message type with reflection information, may provide speed optimized methods
2072
+ class GetUserResponse$Type extends MessageType<GetUserResponse> {
2073
+ constructor() {
2074
+ super("injective_megavault_rpc.GetUserResponse", [
2075
+ { no: 1, name: "user", kind: "message", T: () => User }
2076
+ ]);
2077
+ }
2078
+ create(value?: PartialMessage<GetUserResponse>): GetUserResponse {
2079
+ const message = globalThis.Object.create((this.messagePrototype!));
2080
+ if (value !== undefined)
2081
+ reflectionMergePartial<GetUserResponse>(this, message, value);
2082
+ return message;
2083
+ }
2084
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserResponse): GetUserResponse {
2085
+ let message = target ?? this.create(), end = reader.pos + length;
2086
+ while (reader.pos < end) {
2087
+ let [fieldNo, wireType] = reader.tag();
2088
+ switch (fieldNo) {
2089
+ case /* injective_megavault_rpc.User user */ 1:
2090
+ message.user = User.internalBinaryRead(reader, reader.uint32(), options, message.user);
2091
+ break;
2092
+ default:
2093
+ let u = options.readUnknownField;
2094
+ if (u === "throw")
2095
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2096
+ let d = reader.skip(wireType);
2097
+ if (u !== false)
2098
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2099
+ }
2100
+ }
2101
+ return message;
2102
+ }
2103
+ internalBinaryWrite(message: GetUserResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2104
+ /* injective_megavault_rpc.User user = 1; */
2105
+ if (message.user)
2106
+ User.internalBinaryWrite(message.user, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2107
+ let u = options.writeUnknownFields;
2108
+ if (u !== false)
2109
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2110
+ return writer;
2111
+ }
2112
+ }
2113
+ /**
2114
+ * @generated MessageType for protobuf message injective_megavault_rpc.GetUserResponse
2115
+ */
2116
+ export const GetUserResponse = new GetUserResponse$Type();
2117
+ // @generated message type with reflection information, may provide speed optimized methods
2118
+ class User$Type extends MessageType<User> {
2119
+ constructor() {
2120
+ super("injective_megavault_rpc.User", [
2121
+ { no: 1, name: "address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2122
+ { no: 2, name: "contract_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2123
+ { no: 3, name: "stats", kind: "message", T: () => UserStats },
2124
+ { no: 4, name: "updated_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2125
+ { no: 5, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
2126
+ ]);
2127
+ }
2128
+ create(value?: PartialMessage<User>): User {
2129
+ const message = globalThis.Object.create((this.messagePrototype!));
2130
+ message.address = "";
2131
+ message.contractAddress = "";
2132
+ message.updatedHeight = 0n;
2133
+ message.updatedAt = 0n;
2134
+ if (value !== undefined)
2135
+ reflectionMergePartial<User>(this, message, value);
2136
+ return message;
2137
+ }
2138
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: User): User {
2139
+ let message = target ?? this.create(), end = reader.pos + length;
2140
+ while (reader.pos < end) {
2141
+ let [fieldNo, wireType] = reader.tag();
2142
+ switch (fieldNo) {
2143
+ case /* string address */ 1:
2144
+ message.address = reader.string();
2145
+ break;
2146
+ case /* string contract_address */ 2:
2147
+ message.contractAddress = reader.string();
2148
+ break;
2149
+ case /* injective_megavault_rpc.UserStats stats */ 3:
2150
+ message.stats = UserStats.internalBinaryRead(reader, reader.uint32(), options, message.stats);
2151
+ break;
2152
+ case /* sint64 updated_height */ 4:
2153
+ message.updatedHeight = reader.sint64().toBigInt();
2154
+ break;
2155
+ case /* sint64 updated_at */ 5:
2156
+ message.updatedAt = reader.sint64().toBigInt();
2157
+ break;
2158
+ default:
2159
+ let u = options.readUnknownField;
2160
+ if (u === "throw")
2161
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2162
+ let d = reader.skip(wireType);
2163
+ if (u !== false)
2164
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2165
+ }
2166
+ }
2167
+ return message;
2168
+ }
2169
+ internalBinaryWrite(message: User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2170
+ /* string address = 1; */
2171
+ if (message.address !== "")
2172
+ writer.tag(1, WireType.LengthDelimited).string(message.address);
2173
+ /* string contract_address = 2; */
2174
+ if (message.contractAddress !== "")
2175
+ writer.tag(2, WireType.LengthDelimited).string(message.contractAddress);
2176
+ /* injective_megavault_rpc.UserStats stats = 3; */
2177
+ if (message.stats)
2178
+ UserStats.internalBinaryWrite(message.stats, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
2179
+ /* sint64 updated_height = 4; */
2180
+ if (message.updatedHeight !== 0n)
2181
+ writer.tag(4, WireType.Varint).sint64(message.updatedHeight);
2182
+ /* sint64 updated_at = 5; */
2183
+ if (message.updatedAt !== 0n)
2184
+ writer.tag(5, WireType.Varint).sint64(message.updatedAt);
2185
+ let u = options.writeUnknownFields;
2186
+ if (u !== false)
2187
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2188
+ return writer;
2189
+ }
2190
+ }
2191
+ /**
2192
+ * @generated MessageType for protobuf message injective_megavault_rpc.User
2193
+ */
2194
+ export const User = new User$Type();
2195
+ // @generated message type with reflection information, may provide speed optimized methods
2196
+ class UserStats$Type extends MessageType<UserStats> {
2197
+ constructor() {
2198
+ super("injective_megavault_rpc.UserStats", [
2199
+ { no: 1, name: "current_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2200
+ { no: 2, name: "current_lp_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2201
+ { no: 3, name: "pnl", kind: "message", T: () => PnlStats },
2202
+ { no: 4, name: "deposited_value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2203
+ ]);
2204
+ }
2205
+ create(value?: PartialMessage<UserStats>): UserStats {
2206
+ const message = globalThis.Object.create((this.messagePrototype!));
2207
+ message.currentAmount = "";
2208
+ message.currentLpAmount = "";
2209
+ message.depositedValue = "";
2210
+ if (value !== undefined)
2211
+ reflectionMergePartial<UserStats>(this, message, value);
2212
+ return message;
2213
+ }
2214
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserStats): UserStats {
2215
+ let message = target ?? this.create(), end = reader.pos + length;
2216
+ while (reader.pos < end) {
2217
+ let [fieldNo, wireType] = reader.tag();
2218
+ switch (fieldNo) {
2219
+ case /* string current_amount */ 1:
2220
+ message.currentAmount = reader.string();
2221
+ break;
2222
+ case /* string current_lp_amount */ 2:
2223
+ message.currentLpAmount = reader.string();
2224
+ break;
2225
+ case /* injective_megavault_rpc.PnlStats pnl */ 3:
2226
+ message.pnl = PnlStats.internalBinaryRead(reader, reader.uint32(), options, message.pnl);
2227
+ break;
2228
+ case /* string deposited_value */ 4:
2229
+ message.depositedValue = reader.string();
2230
+ break;
2231
+ default:
2232
+ let u = options.readUnknownField;
2233
+ if (u === "throw")
2234
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2235
+ let d = reader.skip(wireType);
2236
+ if (u !== false)
2237
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2238
+ }
2239
+ }
2240
+ return message;
2241
+ }
2242
+ internalBinaryWrite(message: UserStats, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2243
+ /* string current_amount = 1; */
2244
+ if (message.currentAmount !== "")
2245
+ writer.tag(1, WireType.LengthDelimited).string(message.currentAmount);
2246
+ /* string current_lp_amount = 2; */
2247
+ if (message.currentLpAmount !== "")
2248
+ writer.tag(2, WireType.LengthDelimited).string(message.currentLpAmount);
2249
+ /* injective_megavault_rpc.PnlStats pnl = 3; */
2250
+ if (message.pnl)
2251
+ PnlStats.internalBinaryWrite(message.pnl, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
2252
+ /* string deposited_value = 4; */
2253
+ if (message.depositedValue !== "")
2254
+ writer.tag(4, WireType.LengthDelimited).string(message.depositedValue);
2255
+ let u = options.writeUnknownFields;
2256
+ if (u !== false)
2257
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2258
+ return writer;
2259
+ }
2260
+ }
2261
+ /**
2262
+ * @generated MessageType for protobuf message injective_megavault_rpc.UserStats
2263
+ */
2264
+ export const UserStats = new UserStats$Type();
2265
+ // @generated message type with reflection information, may provide speed optimized methods
2266
+ class ListSubscriptionsRequest$Type extends MessageType<ListSubscriptionsRequest> {
2267
+ constructor() {
2268
+ super("injective_megavault_rpc.ListSubscriptionsRequest", [
2269
+ { no: 1, name: "vault_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2270
+ { no: 2, name: "user_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2271
+ { no: 3, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2272
+ { no: 4, name: "per_page", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
2273
+ { no: 5, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2274
+ ]);
2275
+ }
2276
+ create(value?: PartialMessage<ListSubscriptionsRequest>): ListSubscriptionsRequest {
2277
+ const message = globalThis.Object.create((this.messagePrototype!));
2278
+ message.vaultAddress = "";
2279
+ message.userAddress = "";
2280
+ message.status = "";
2281
+ message.perPage = 0;
2282
+ message.token = "";
2283
+ if (value !== undefined)
2284
+ reflectionMergePartial<ListSubscriptionsRequest>(this, message, value);
2285
+ return message;
2286
+ }
2287
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListSubscriptionsRequest): ListSubscriptionsRequest {
2288
+ let message = target ?? this.create(), end = reader.pos + length;
2289
+ while (reader.pos < end) {
2290
+ let [fieldNo, wireType] = reader.tag();
2291
+ switch (fieldNo) {
2292
+ case /* string vault_address */ 1:
2293
+ message.vaultAddress = reader.string();
2294
+ break;
2295
+ case /* string user_address */ 2:
2296
+ message.userAddress = reader.string();
2297
+ break;
2298
+ case /* string status */ 3:
2299
+ message.status = reader.string();
2300
+ break;
2301
+ case /* sint32 per_page */ 4:
2302
+ message.perPage = reader.sint32();
2303
+ break;
2304
+ case /* string token */ 5:
2305
+ message.token = reader.string();
2306
+ break;
2307
+ default:
2308
+ let u = options.readUnknownField;
2309
+ if (u === "throw")
2310
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2311
+ let d = reader.skip(wireType);
2312
+ if (u !== false)
2313
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2314
+ }
2315
+ }
2316
+ return message;
2317
+ }
2318
+ internalBinaryWrite(message: ListSubscriptionsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2319
+ /* string vault_address = 1; */
2320
+ if (message.vaultAddress !== "")
2321
+ writer.tag(1, WireType.LengthDelimited).string(message.vaultAddress);
2322
+ /* string user_address = 2; */
2323
+ if (message.userAddress !== "")
2324
+ writer.tag(2, WireType.LengthDelimited).string(message.userAddress);
2325
+ /* string status = 3; */
2326
+ if (message.status !== "")
2327
+ writer.tag(3, WireType.LengthDelimited).string(message.status);
2328
+ /* sint32 per_page = 4; */
2329
+ if (message.perPage !== 0)
2330
+ writer.tag(4, WireType.Varint).sint32(message.perPage);
2331
+ /* string token = 5; */
2332
+ if (message.token !== "")
2333
+ writer.tag(5, WireType.LengthDelimited).string(message.token);
2334
+ let u = options.writeUnknownFields;
2335
+ if (u !== false)
2336
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2337
+ return writer;
2338
+ }
2339
+ }
2340
+ /**
2341
+ * @generated MessageType for protobuf message injective_megavault_rpc.ListSubscriptionsRequest
2342
+ */
2343
+ export const ListSubscriptionsRequest = new ListSubscriptionsRequest$Type();
2344
+ // @generated message type with reflection information, may provide speed optimized methods
2345
+ class ListSubscriptionsResponse$Type extends MessageType<ListSubscriptionsResponse> {
2346
+ constructor() {
2347
+ super("injective_megavault_rpc.ListSubscriptionsResponse", [
2348
+ { no: 1, name: "subscriptions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Subscription },
2349
+ { no: 2, name: "next", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
2350
+ ]);
2351
+ }
2352
+ create(value?: PartialMessage<ListSubscriptionsResponse>): ListSubscriptionsResponse {
2353
+ const message = globalThis.Object.create((this.messagePrototype!));
2354
+ message.subscriptions = [];
2355
+ message.next = [];
2356
+ if (value !== undefined)
2357
+ reflectionMergePartial<ListSubscriptionsResponse>(this, message, value);
2358
+ return message;
2359
+ }
2360
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListSubscriptionsResponse): ListSubscriptionsResponse {
2361
+ let message = target ?? this.create(), end = reader.pos + length;
2362
+ while (reader.pos < end) {
2363
+ let [fieldNo, wireType] = reader.tag();
2364
+ switch (fieldNo) {
2365
+ case /* repeated injective_megavault_rpc.Subscription subscriptions */ 1:
2366
+ message.subscriptions.push(Subscription.internalBinaryRead(reader, reader.uint32(), options));
2367
+ break;
2368
+ case /* repeated string next */ 2:
2369
+ message.next.push(reader.string());
2370
+ break;
2371
+ default:
2372
+ let u = options.readUnknownField;
2373
+ if (u === "throw")
2374
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2375
+ let d = reader.skip(wireType);
2376
+ if (u !== false)
2377
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2378
+ }
2379
+ }
2380
+ return message;
2381
+ }
2382
+ internalBinaryWrite(message: ListSubscriptionsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2383
+ /* repeated injective_megavault_rpc.Subscription subscriptions = 1; */
2384
+ for (let i = 0; i < message.subscriptions.length; i++)
2385
+ Subscription.internalBinaryWrite(message.subscriptions[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2386
+ /* repeated string next = 2; */
2387
+ for (let i = 0; i < message.next.length; i++)
2388
+ writer.tag(2, WireType.LengthDelimited).string(message.next[i]);
2389
+ let u = options.writeUnknownFields;
2390
+ if (u !== false)
2391
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2392
+ return writer;
2393
+ }
2394
+ }
2395
+ /**
2396
+ * @generated MessageType for protobuf message injective_megavault_rpc.ListSubscriptionsResponse
2397
+ */
2398
+ export const ListSubscriptionsResponse = new ListSubscriptionsResponse$Type();
2399
+ // @generated message type with reflection information, may provide speed optimized methods
2400
+ class Subscription$Type extends MessageType<Subscription> {
2401
+ constructor() {
2402
+ super("injective_megavault_rpc.Subscription", [
2403
+ { no: 1, name: "contract_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2404
+ { no: 2, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2405
+ { no: 3, name: "index", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2406
+ { no: 4, name: "lp_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2407
+ { no: 5, name: "amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2408
+ { no: 6, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2409
+ { no: 7, name: "created_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2410
+ { no: 8, name: "created_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2411
+ { no: 9, name: "executed_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2412
+ { no: 10, name: "executed_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2413
+ { no: 11, name: "log", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OperationStatusLogEntry }
2414
+ ]);
2415
+ }
2416
+ create(value?: PartialMessage<Subscription>): Subscription {
2417
+ const message = globalThis.Object.create((this.messagePrototype!));
2418
+ message.contractAddress = "";
2419
+ message.user = "";
2420
+ message.index = 0n;
2421
+ message.lpAmount = "";
2422
+ message.amount = "";
2423
+ message.status = "";
2424
+ message.createdHeight = 0n;
2425
+ message.createdAt = 0n;
2426
+ message.executedHeight = 0n;
2427
+ message.executedAt = 0n;
2428
+ message.log = [];
2429
+ if (value !== undefined)
2430
+ reflectionMergePartial<Subscription>(this, message, value);
2431
+ return message;
2432
+ }
2433
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Subscription): Subscription {
2434
+ let message = target ?? this.create(), end = reader.pos + length;
2435
+ while (reader.pos < end) {
2436
+ let [fieldNo, wireType] = reader.tag();
2437
+ switch (fieldNo) {
2438
+ case /* string contract_address */ 1:
2439
+ message.contractAddress = reader.string();
2440
+ break;
2441
+ case /* string user */ 2:
2442
+ message.user = reader.string();
2443
+ break;
2444
+ case /* sint64 index */ 3:
2445
+ message.index = reader.sint64().toBigInt();
2446
+ break;
2447
+ case /* string lp_amount */ 4:
2448
+ message.lpAmount = reader.string();
2449
+ break;
2450
+ case /* string amount */ 5:
2451
+ message.amount = reader.string();
2452
+ break;
2453
+ case /* string status */ 6:
2454
+ message.status = reader.string();
2455
+ break;
2456
+ case /* sint64 created_height */ 7:
2457
+ message.createdHeight = reader.sint64().toBigInt();
2458
+ break;
2459
+ case /* sint64 created_at */ 8:
2460
+ message.createdAt = reader.sint64().toBigInt();
2461
+ break;
2462
+ case /* sint64 executed_height */ 9:
2463
+ message.executedHeight = reader.sint64().toBigInt();
2464
+ break;
2465
+ case /* sint64 executed_at */ 10:
2466
+ message.executedAt = reader.sint64().toBigInt();
2467
+ break;
2468
+ case /* repeated injective_megavault_rpc.OperationStatusLogEntry log */ 11:
2469
+ message.log.push(OperationStatusLogEntry.internalBinaryRead(reader, reader.uint32(), options));
2470
+ break;
2471
+ default:
2472
+ let u = options.readUnknownField;
2473
+ if (u === "throw")
2474
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2475
+ let d = reader.skip(wireType);
2476
+ if (u !== false)
2477
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2478
+ }
2479
+ }
2480
+ return message;
2481
+ }
2482
+ internalBinaryWrite(message: Subscription, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2483
+ /* string contract_address = 1; */
2484
+ if (message.contractAddress !== "")
2485
+ writer.tag(1, WireType.LengthDelimited).string(message.contractAddress);
2486
+ /* string user = 2; */
2487
+ if (message.user !== "")
2488
+ writer.tag(2, WireType.LengthDelimited).string(message.user);
2489
+ /* sint64 index = 3; */
2490
+ if (message.index !== 0n)
2491
+ writer.tag(3, WireType.Varint).sint64(message.index);
2492
+ /* string lp_amount = 4; */
2493
+ if (message.lpAmount !== "")
2494
+ writer.tag(4, WireType.LengthDelimited).string(message.lpAmount);
2495
+ /* string amount = 5; */
2496
+ if (message.amount !== "")
2497
+ writer.tag(5, WireType.LengthDelimited).string(message.amount);
2498
+ /* string status = 6; */
2499
+ if (message.status !== "")
2500
+ writer.tag(6, WireType.LengthDelimited).string(message.status);
2501
+ /* sint64 created_height = 7; */
2502
+ if (message.createdHeight !== 0n)
2503
+ writer.tag(7, WireType.Varint).sint64(message.createdHeight);
2504
+ /* sint64 created_at = 8; */
2505
+ if (message.createdAt !== 0n)
2506
+ writer.tag(8, WireType.Varint).sint64(message.createdAt);
2507
+ /* sint64 executed_height = 9; */
2508
+ if (message.executedHeight !== 0n)
2509
+ writer.tag(9, WireType.Varint).sint64(message.executedHeight);
2510
+ /* sint64 executed_at = 10; */
2511
+ if (message.executedAt !== 0n)
2512
+ writer.tag(10, WireType.Varint).sint64(message.executedAt);
2513
+ /* repeated injective_megavault_rpc.OperationStatusLogEntry log = 11; */
2514
+ for (let i = 0; i < message.log.length; i++)
2515
+ OperationStatusLogEntry.internalBinaryWrite(message.log[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
2516
+ let u = options.writeUnknownFields;
2517
+ if (u !== false)
2518
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2519
+ return writer;
2520
+ }
2521
+ }
2522
+ /**
2523
+ * @generated MessageType for protobuf message injective_megavault_rpc.Subscription
2524
+ */
2525
+ export const Subscription = new Subscription$Type();
2526
+ // @generated message type with reflection information, may provide speed optimized methods
2527
+ class OperationStatusLogEntry$Type extends MessageType<OperationStatusLogEntry> {
2528
+ constructor() {
2529
+ super("injective_megavault_rpc.OperationStatusLogEntry", [
2530
+ { no: 1, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2531
+ { no: 2, name: "tx_hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2532
+ { no: 3, name: "block_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2533
+ { no: 4, name: "block_time", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
2534
+ ]);
2535
+ }
2536
+ create(value?: PartialMessage<OperationStatusLogEntry>): OperationStatusLogEntry {
2537
+ const message = globalThis.Object.create((this.messagePrototype!));
2538
+ message.status = "";
2539
+ message.txHash = "";
2540
+ message.blockHeight = 0n;
2541
+ message.blockTime = 0n;
2542
+ if (value !== undefined)
2543
+ reflectionMergePartial<OperationStatusLogEntry>(this, message, value);
2544
+ return message;
2545
+ }
2546
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OperationStatusLogEntry): OperationStatusLogEntry {
2547
+ let message = target ?? this.create(), end = reader.pos + length;
2548
+ while (reader.pos < end) {
2549
+ let [fieldNo, wireType] = reader.tag();
2550
+ switch (fieldNo) {
2551
+ case /* string status */ 1:
2552
+ message.status = reader.string();
2553
+ break;
2554
+ case /* string tx_hash */ 2:
2555
+ message.txHash = reader.string();
2556
+ break;
2557
+ case /* sint64 block_height */ 3:
2558
+ message.blockHeight = reader.sint64().toBigInt();
2559
+ break;
2560
+ case /* sint64 block_time */ 4:
2561
+ message.blockTime = reader.sint64().toBigInt();
2562
+ break;
2563
+ default:
2564
+ let u = options.readUnknownField;
2565
+ if (u === "throw")
2566
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2567
+ let d = reader.skip(wireType);
2568
+ if (u !== false)
2569
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2570
+ }
2571
+ }
2572
+ return message;
2573
+ }
2574
+ internalBinaryWrite(message: OperationStatusLogEntry, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2575
+ /* string status = 1; */
2576
+ if (message.status !== "")
2577
+ writer.tag(1, WireType.LengthDelimited).string(message.status);
2578
+ /* string tx_hash = 2; */
2579
+ if (message.txHash !== "")
2580
+ writer.tag(2, WireType.LengthDelimited).string(message.txHash);
2581
+ /* sint64 block_height = 3; */
2582
+ if (message.blockHeight !== 0n)
2583
+ writer.tag(3, WireType.Varint).sint64(message.blockHeight);
2584
+ /* sint64 block_time = 4; */
2585
+ if (message.blockTime !== 0n)
2586
+ writer.tag(4, WireType.Varint).sint64(message.blockTime);
2587
+ let u = options.writeUnknownFields;
2588
+ if (u !== false)
2589
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2590
+ return writer;
2591
+ }
2592
+ }
2593
+ /**
2594
+ * @generated MessageType for protobuf message injective_megavault_rpc.OperationStatusLogEntry
2595
+ */
2596
+ export const OperationStatusLogEntry = new OperationStatusLogEntry$Type();
2597
+ // @generated message type with reflection information, may provide speed optimized methods
2598
+ class ListRedemptionsRequest$Type extends MessageType<ListRedemptionsRequest> {
2599
+ constructor() {
2600
+ super("injective_megavault_rpc.ListRedemptionsRequest", [
2601
+ { no: 1, name: "vault_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2602
+ { no: 2, name: "user_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2603
+ { no: 3, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2604
+ { no: 4, name: "per_page", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
2605
+ { no: 5, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2606
+ ]);
2607
+ }
2608
+ create(value?: PartialMessage<ListRedemptionsRequest>): ListRedemptionsRequest {
2609
+ const message = globalThis.Object.create((this.messagePrototype!));
2610
+ message.vaultAddress = "";
2611
+ message.userAddress = "";
2612
+ message.status = "";
2613
+ message.perPage = 0;
2614
+ message.token = "";
2615
+ if (value !== undefined)
2616
+ reflectionMergePartial<ListRedemptionsRequest>(this, message, value);
2617
+ return message;
2618
+ }
2619
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListRedemptionsRequest): ListRedemptionsRequest {
2620
+ let message = target ?? this.create(), end = reader.pos + length;
2621
+ while (reader.pos < end) {
2622
+ let [fieldNo, wireType] = reader.tag();
2623
+ switch (fieldNo) {
2624
+ case /* string vault_address */ 1:
2625
+ message.vaultAddress = reader.string();
2626
+ break;
2627
+ case /* string user_address */ 2:
2628
+ message.userAddress = reader.string();
2629
+ break;
2630
+ case /* string status */ 3:
2631
+ message.status = reader.string();
2632
+ break;
2633
+ case /* sint32 per_page */ 4:
2634
+ message.perPage = reader.sint32();
2635
+ break;
2636
+ case /* string token */ 5:
2637
+ message.token = reader.string();
2638
+ break;
2639
+ default:
2640
+ let u = options.readUnknownField;
2641
+ if (u === "throw")
2642
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2643
+ let d = reader.skip(wireType);
2644
+ if (u !== false)
2645
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2646
+ }
2647
+ }
2648
+ return message;
2649
+ }
2650
+ internalBinaryWrite(message: ListRedemptionsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2651
+ /* string vault_address = 1; */
2652
+ if (message.vaultAddress !== "")
2653
+ writer.tag(1, WireType.LengthDelimited).string(message.vaultAddress);
2654
+ /* string user_address = 2; */
2655
+ if (message.userAddress !== "")
2656
+ writer.tag(2, WireType.LengthDelimited).string(message.userAddress);
2657
+ /* string status = 3; */
2658
+ if (message.status !== "")
2659
+ writer.tag(3, WireType.LengthDelimited).string(message.status);
2660
+ /* sint32 per_page = 4; */
2661
+ if (message.perPage !== 0)
2662
+ writer.tag(4, WireType.Varint).sint32(message.perPage);
2663
+ /* string token = 5; */
2664
+ if (message.token !== "")
2665
+ writer.tag(5, WireType.LengthDelimited).string(message.token);
2666
+ let u = options.writeUnknownFields;
2667
+ if (u !== false)
2668
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2669
+ return writer;
2670
+ }
2671
+ }
2672
+ /**
2673
+ * @generated MessageType for protobuf message injective_megavault_rpc.ListRedemptionsRequest
2674
+ */
2675
+ export const ListRedemptionsRequest = new ListRedemptionsRequest$Type();
2676
+ // @generated message type with reflection information, may provide speed optimized methods
2677
+ class ListRedemptionsResponse$Type extends MessageType<ListRedemptionsResponse> {
2678
+ constructor() {
2679
+ super("injective_megavault_rpc.ListRedemptionsResponse", [
2680
+ { no: 1, name: "redemptions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Redemption },
2681
+ { no: 2, name: "next", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
2682
+ ]);
2683
+ }
2684
+ create(value?: PartialMessage<ListRedemptionsResponse>): ListRedemptionsResponse {
2685
+ const message = globalThis.Object.create((this.messagePrototype!));
2686
+ message.redemptions = [];
2687
+ message.next = [];
2688
+ if (value !== undefined)
2689
+ reflectionMergePartial<ListRedemptionsResponse>(this, message, value);
2690
+ return message;
2691
+ }
2692
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListRedemptionsResponse): ListRedemptionsResponse {
2693
+ let message = target ?? this.create(), end = reader.pos + length;
2694
+ while (reader.pos < end) {
2695
+ let [fieldNo, wireType] = reader.tag();
2696
+ switch (fieldNo) {
2697
+ case /* repeated injective_megavault_rpc.Redemption redemptions */ 1:
2698
+ message.redemptions.push(Redemption.internalBinaryRead(reader, reader.uint32(), options));
2699
+ break;
2700
+ case /* repeated string next */ 2:
2701
+ message.next.push(reader.string());
2702
+ break;
2703
+ default:
2704
+ let u = options.readUnknownField;
2705
+ if (u === "throw")
2706
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2707
+ let d = reader.skip(wireType);
2708
+ if (u !== false)
2709
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2710
+ }
2711
+ }
2712
+ return message;
2713
+ }
2714
+ internalBinaryWrite(message: ListRedemptionsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2715
+ /* repeated injective_megavault_rpc.Redemption redemptions = 1; */
2716
+ for (let i = 0; i < message.redemptions.length; i++)
2717
+ Redemption.internalBinaryWrite(message.redemptions[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2718
+ /* repeated string next = 2; */
2719
+ for (let i = 0; i < message.next.length; i++)
2720
+ writer.tag(2, WireType.LengthDelimited).string(message.next[i]);
2721
+ let u = options.writeUnknownFields;
2722
+ if (u !== false)
2723
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2724
+ return writer;
2725
+ }
2726
+ }
2727
+ /**
2728
+ * @generated MessageType for protobuf message injective_megavault_rpc.ListRedemptionsResponse
2729
+ */
2730
+ export const ListRedemptionsResponse = new ListRedemptionsResponse$Type();
2731
+ // @generated message type with reflection information, may provide speed optimized methods
2732
+ class Redemption$Type extends MessageType<Redemption> {
2733
+ constructor() {
2734
+ super("injective_megavault_rpc.Redemption", [
2735
+ { no: 1, name: "contract_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2736
+ { no: 2, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2737
+ { no: 3, name: "index", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2738
+ { no: 4, name: "lp_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2739
+ { no: 5, name: "amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2740
+ { no: 6, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2741
+ { no: 7, name: "due_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2742
+ { no: 8, name: "created_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2743
+ { no: 9, name: "created_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2744
+ { no: 10, name: "executed_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2745
+ { no: 11, name: "executed_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
2746
+ { no: 12, name: "log", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OperationStatusLogEntry }
2747
+ ]);
2748
+ }
2749
+ create(value?: PartialMessage<Redemption>): Redemption {
2750
+ const message = globalThis.Object.create((this.messagePrototype!));
2751
+ message.contractAddress = "";
2752
+ message.user = "";
2753
+ message.index = 0n;
2754
+ message.lpAmount = "";
2755
+ message.amount = "";
2756
+ message.status = "";
2757
+ message.dueAt = 0n;
2758
+ message.createdHeight = 0n;
2759
+ message.createdAt = 0n;
2760
+ message.executedHeight = 0n;
2761
+ message.executedAt = 0n;
2762
+ message.log = [];
2763
+ if (value !== undefined)
2764
+ reflectionMergePartial<Redemption>(this, message, value);
2765
+ return message;
2766
+ }
2767
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Redemption): Redemption {
2768
+ let message = target ?? this.create(), end = reader.pos + length;
2769
+ while (reader.pos < end) {
2770
+ let [fieldNo, wireType] = reader.tag();
2771
+ switch (fieldNo) {
2772
+ case /* string contract_address */ 1:
2773
+ message.contractAddress = reader.string();
2774
+ break;
2775
+ case /* string user */ 2:
2776
+ message.user = reader.string();
2777
+ break;
2778
+ case /* sint64 index */ 3:
2779
+ message.index = reader.sint64().toBigInt();
2780
+ break;
2781
+ case /* string lp_amount */ 4:
2782
+ message.lpAmount = reader.string();
2783
+ break;
2784
+ case /* string amount */ 5:
2785
+ message.amount = reader.string();
2786
+ break;
2787
+ case /* string status */ 6:
2788
+ message.status = reader.string();
2789
+ break;
2790
+ case /* sint64 due_at */ 7:
2791
+ message.dueAt = reader.sint64().toBigInt();
2792
+ break;
2793
+ case /* sint64 created_height */ 8:
2794
+ message.createdHeight = reader.sint64().toBigInt();
2795
+ break;
2796
+ case /* sint64 created_at */ 9:
2797
+ message.createdAt = reader.sint64().toBigInt();
2798
+ break;
2799
+ case /* sint64 executed_height */ 10:
2800
+ message.executedHeight = reader.sint64().toBigInt();
2801
+ break;
2802
+ case /* sint64 executed_at */ 11:
2803
+ message.executedAt = reader.sint64().toBigInt();
2804
+ break;
2805
+ case /* repeated injective_megavault_rpc.OperationStatusLogEntry log */ 12:
2806
+ message.log.push(OperationStatusLogEntry.internalBinaryRead(reader, reader.uint32(), options));
2807
+ break;
2808
+ default:
2809
+ let u = options.readUnknownField;
2810
+ if (u === "throw")
2811
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2812
+ let d = reader.skip(wireType);
2813
+ if (u !== false)
2814
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2815
+ }
2816
+ }
2817
+ return message;
2818
+ }
2819
+ internalBinaryWrite(message: Redemption, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2820
+ /* string contract_address = 1; */
2821
+ if (message.contractAddress !== "")
2822
+ writer.tag(1, WireType.LengthDelimited).string(message.contractAddress);
2823
+ /* string user = 2; */
2824
+ if (message.user !== "")
2825
+ writer.tag(2, WireType.LengthDelimited).string(message.user);
2826
+ /* sint64 index = 3; */
2827
+ if (message.index !== 0n)
2828
+ writer.tag(3, WireType.Varint).sint64(message.index);
2829
+ /* string lp_amount = 4; */
2830
+ if (message.lpAmount !== "")
2831
+ writer.tag(4, WireType.LengthDelimited).string(message.lpAmount);
2832
+ /* string amount = 5; */
2833
+ if (message.amount !== "")
2834
+ writer.tag(5, WireType.LengthDelimited).string(message.amount);
2835
+ /* string status = 6; */
2836
+ if (message.status !== "")
2837
+ writer.tag(6, WireType.LengthDelimited).string(message.status);
2838
+ /* sint64 due_at = 7; */
2839
+ if (message.dueAt !== 0n)
2840
+ writer.tag(7, WireType.Varint).sint64(message.dueAt);
2841
+ /* sint64 created_height = 8; */
2842
+ if (message.createdHeight !== 0n)
2843
+ writer.tag(8, WireType.Varint).sint64(message.createdHeight);
2844
+ /* sint64 created_at = 9; */
2845
+ if (message.createdAt !== 0n)
2846
+ writer.tag(9, WireType.Varint).sint64(message.createdAt);
2847
+ /* sint64 executed_height = 10; */
2848
+ if (message.executedHeight !== 0n)
2849
+ writer.tag(10, WireType.Varint).sint64(message.executedHeight);
2850
+ /* sint64 executed_at = 11; */
2851
+ if (message.executedAt !== 0n)
2852
+ writer.tag(11, WireType.Varint).sint64(message.executedAt);
2853
+ /* repeated injective_megavault_rpc.OperationStatusLogEntry log = 12; */
2854
+ for (let i = 0; i < message.log.length; i++)
2855
+ OperationStatusLogEntry.internalBinaryWrite(message.log[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
2856
+ let u = options.writeUnknownFields;
2857
+ if (u !== false)
2858
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2859
+ return writer;
2860
+ }
2861
+ }
2862
+ /**
2863
+ * @generated MessageType for protobuf message injective_megavault_rpc.Redemption
2864
+ */
2865
+ export const Redemption = new Redemption$Type();
2866
+ // @generated message type with reflection information, may provide speed optimized methods
2867
+ class GetOperatorRedemptionBucketsRequest$Type extends MessageType<GetOperatorRedemptionBucketsRequest> {
2868
+ constructor() {
2869
+ super("injective_megavault_rpc.GetOperatorRedemptionBucketsRequest", [
2870
+ { no: 1, name: "vault_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2871
+ { no: 2, name: "operator_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2872
+ ]);
2873
+ }
2874
+ create(value?: PartialMessage<GetOperatorRedemptionBucketsRequest>): GetOperatorRedemptionBucketsRequest {
2875
+ const message = globalThis.Object.create((this.messagePrototype!));
2876
+ message.vaultAddress = "";
2877
+ message.operatorAddress = "";
2878
+ if (value !== undefined)
2879
+ reflectionMergePartial<GetOperatorRedemptionBucketsRequest>(this, message, value);
2880
+ return message;
2881
+ }
2882
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetOperatorRedemptionBucketsRequest): GetOperatorRedemptionBucketsRequest {
2883
+ let message = target ?? this.create(), end = reader.pos + length;
2884
+ while (reader.pos < end) {
2885
+ let [fieldNo, wireType] = reader.tag();
2886
+ switch (fieldNo) {
2887
+ case /* string vault_address */ 1:
2888
+ message.vaultAddress = reader.string();
2889
+ break;
2890
+ case /* string operator_address */ 2:
2891
+ message.operatorAddress = reader.string();
2892
+ break;
2893
+ default:
2894
+ let u = options.readUnknownField;
2895
+ if (u === "throw")
2896
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2897
+ let d = reader.skip(wireType);
2898
+ if (u !== false)
2899
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2900
+ }
2901
+ }
2902
+ return message;
2903
+ }
2904
+ internalBinaryWrite(message: GetOperatorRedemptionBucketsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2905
+ /* string vault_address = 1; */
2906
+ if (message.vaultAddress !== "")
2907
+ writer.tag(1, WireType.LengthDelimited).string(message.vaultAddress);
2908
+ /* string operator_address = 2; */
2909
+ if (message.operatorAddress !== "")
2910
+ writer.tag(2, WireType.LengthDelimited).string(message.operatorAddress);
2911
+ let u = options.writeUnknownFields;
2912
+ if (u !== false)
2913
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2914
+ return writer;
2915
+ }
2916
+ }
2917
+ /**
2918
+ * @generated MessageType for protobuf message injective_megavault_rpc.GetOperatorRedemptionBucketsRequest
2919
+ */
2920
+ export const GetOperatorRedemptionBucketsRequest = new GetOperatorRedemptionBucketsRequest$Type();
2921
+ // @generated message type with reflection information, may provide speed optimized methods
2922
+ class GetOperatorRedemptionBucketsResponse$Type extends MessageType<GetOperatorRedemptionBucketsResponse> {
2923
+ constructor() {
2924
+ super("injective_megavault_rpc.GetOperatorRedemptionBucketsResponse", [
2925
+ { no: 1, name: "buckets", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RedemptionBucket }
2926
+ ]);
2927
+ }
2928
+ create(value?: PartialMessage<GetOperatorRedemptionBucketsResponse>): GetOperatorRedemptionBucketsResponse {
2929
+ const message = globalThis.Object.create((this.messagePrototype!));
2930
+ message.buckets = [];
2931
+ if (value !== undefined)
2932
+ reflectionMergePartial<GetOperatorRedemptionBucketsResponse>(this, message, value);
2933
+ return message;
2934
+ }
2935
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetOperatorRedemptionBucketsResponse): GetOperatorRedemptionBucketsResponse {
2936
+ let message = target ?? this.create(), end = reader.pos + length;
2937
+ while (reader.pos < end) {
2938
+ let [fieldNo, wireType] = reader.tag();
2939
+ switch (fieldNo) {
2940
+ case /* repeated injective_megavault_rpc.RedemptionBucket buckets */ 1:
2941
+ message.buckets.push(RedemptionBucket.internalBinaryRead(reader, reader.uint32(), options));
2942
+ break;
2943
+ default:
2944
+ let u = options.readUnknownField;
2945
+ if (u === "throw")
2946
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2947
+ let d = reader.skip(wireType);
2948
+ if (u !== false)
2949
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2950
+ }
2951
+ }
2952
+ return message;
2953
+ }
2954
+ internalBinaryWrite(message: GetOperatorRedemptionBucketsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2955
+ /* repeated injective_megavault_rpc.RedemptionBucket buckets = 1; */
2956
+ for (let i = 0; i < message.buckets.length; i++)
2957
+ RedemptionBucket.internalBinaryWrite(message.buckets[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2958
+ let u = options.writeUnknownFields;
2959
+ if (u !== false)
2960
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2961
+ return writer;
2962
+ }
2963
+ }
2964
+ /**
2965
+ * @generated MessageType for protobuf message injective_megavault_rpc.GetOperatorRedemptionBucketsResponse
2966
+ */
2967
+ export const GetOperatorRedemptionBucketsResponse = new GetOperatorRedemptionBucketsResponse$Type();
2968
+ // @generated message type with reflection information, may provide speed optimized methods
2969
+ class RedemptionBucket$Type extends MessageType<RedemptionBucket> {
2970
+ constructor() {
2971
+ super("injective_megavault_rpc.RedemptionBucket", [
2972
+ { no: 1, name: "bucket", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2973
+ { no: 2, name: "lp_amount_to_redeem", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2974
+ { no: 3, name: "needed_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2975
+ { no: 4, name: "missing_liquidity", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2976
+ ]);
2977
+ }
2978
+ create(value?: PartialMessage<RedemptionBucket>): RedemptionBucket {
2979
+ const message = globalThis.Object.create((this.messagePrototype!));
2980
+ message.bucket = "";
2981
+ message.lpAmountToRedeem = "";
2982
+ message.neededAmount = "";
2983
+ message.missingLiquidity = "";
2984
+ if (value !== undefined)
2985
+ reflectionMergePartial<RedemptionBucket>(this, message, value);
2986
+ return message;
2987
+ }
2988
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RedemptionBucket): RedemptionBucket {
2989
+ let message = target ?? this.create(), end = reader.pos + length;
2990
+ while (reader.pos < end) {
2991
+ let [fieldNo, wireType] = reader.tag();
2992
+ switch (fieldNo) {
2993
+ case /* string bucket */ 1:
2994
+ message.bucket = reader.string();
2995
+ break;
2996
+ case /* string lp_amount_to_redeem */ 2:
2997
+ message.lpAmountToRedeem = reader.string();
2998
+ break;
2999
+ case /* string needed_amount */ 3:
3000
+ message.neededAmount = reader.string();
3001
+ break;
3002
+ case /* string missing_liquidity */ 4:
3003
+ message.missingLiquidity = reader.string();
3004
+ break;
3005
+ default:
3006
+ let u = options.readUnknownField;
3007
+ if (u === "throw")
3008
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3009
+ let d = reader.skip(wireType);
3010
+ if (u !== false)
3011
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3012
+ }
3013
+ }
3014
+ return message;
3015
+ }
3016
+ internalBinaryWrite(message: RedemptionBucket, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3017
+ /* string bucket = 1; */
3018
+ if (message.bucket !== "")
3019
+ writer.tag(1, WireType.LengthDelimited).string(message.bucket);
3020
+ /* string lp_amount_to_redeem = 2; */
3021
+ if (message.lpAmountToRedeem !== "")
3022
+ writer.tag(2, WireType.LengthDelimited).string(message.lpAmountToRedeem);
3023
+ /* string needed_amount = 3; */
3024
+ if (message.neededAmount !== "")
3025
+ writer.tag(3, WireType.LengthDelimited).string(message.neededAmount);
3026
+ /* string missing_liquidity = 4; */
3027
+ if (message.missingLiquidity !== "")
3028
+ writer.tag(4, WireType.LengthDelimited).string(message.missingLiquidity);
3029
+ let u = options.writeUnknownFields;
3030
+ if (u !== false)
3031
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3032
+ return writer;
3033
+ }
3034
+ }
3035
+ /**
3036
+ * @generated MessageType for protobuf message injective_megavault_rpc.RedemptionBucket
3037
+ */
3038
+ export const RedemptionBucket = new RedemptionBucket$Type();
3039
+ // @generated message type with reflection information, may provide speed optimized methods
3040
+ class TvlHistoryRequest$Type extends MessageType<TvlHistoryRequest> {
3041
+ constructor() {
3042
+ super("injective_megavault_rpc.TvlHistoryRequest", [
3043
+ { no: 1, name: "vault_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
3044
+ { no: 2, name: "since", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
3045
+ { no: 3, name: "max_data_points", kind: "scalar", T: 17 /*ScalarType.SINT32*/ }
3046
+ ]);
3047
+ }
3048
+ create(value?: PartialMessage<TvlHistoryRequest>): TvlHistoryRequest {
3049
+ const message = globalThis.Object.create((this.messagePrototype!));
3050
+ message.vaultAddress = "";
3051
+ message.since = 0n;
3052
+ message.maxDataPoints = 0;
3053
+ if (value !== undefined)
3054
+ reflectionMergePartial<TvlHistoryRequest>(this, message, value);
3055
+ return message;
3056
+ }
3057
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TvlHistoryRequest): TvlHistoryRequest {
3058
+ let message = target ?? this.create(), end = reader.pos + length;
3059
+ while (reader.pos < end) {
3060
+ let [fieldNo, wireType] = reader.tag();
3061
+ switch (fieldNo) {
3062
+ case /* string vault_address */ 1:
3063
+ message.vaultAddress = reader.string();
3064
+ break;
3065
+ case /* sint64 since */ 2:
3066
+ message.since = reader.sint64().toBigInt();
3067
+ break;
3068
+ case /* sint32 max_data_points */ 3:
3069
+ message.maxDataPoints = reader.sint32();
3070
+ break;
3071
+ default:
3072
+ let u = options.readUnknownField;
3073
+ if (u === "throw")
3074
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3075
+ let d = reader.skip(wireType);
3076
+ if (u !== false)
3077
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3078
+ }
3079
+ }
3080
+ return message;
3081
+ }
3082
+ internalBinaryWrite(message: TvlHistoryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3083
+ /* string vault_address = 1; */
3084
+ if (message.vaultAddress !== "")
3085
+ writer.tag(1, WireType.LengthDelimited).string(message.vaultAddress);
3086
+ /* sint64 since = 2; */
3087
+ if (message.since !== 0n)
3088
+ writer.tag(2, WireType.Varint).sint64(message.since);
3089
+ /* sint32 max_data_points = 3; */
3090
+ if (message.maxDataPoints !== 0)
3091
+ writer.tag(3, WireType.Varint).sint32(message.maxDataPoints);
3092
+ let u = options.writeUnknownFields;
3093
+ if (u !== false)
3094
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3095
+ return writer;
3096
+ }
3097
+ }
3098
+ /**
3099
+ * @generated MessageType for protobuf message injective_megavault_rpc.TvlHistoryRequest
3100
+ */
3101
+ export const TvlHistoryRequest = new TvlHistoryRequest$Type();
3102
+ // @generated message type with reflection information, may provide speed optimized methods
3103
+ class TvlHistoryResponse$Type extends MessageType<TvlHistoryResponse> {
3104
+ constructor() {
3105
+ super("injective_megavault_rpc.TvlHistoryResponse", [
3106
+ { no: 1, name: "history", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HistoricalTVL }
3107
+ ]);
3108
+ }
3109
+ create(value?: PartialMessage<TvlHistoryResponse>): TvlHistoryResponse {
3110
+ const message = globalThis.Object.create((this.messagePrototype!));
3111
+ message.history = [];
3112
+ if (value !== undefined)
3113
+ reflectionMergePartial<TvlHistoryResponse>(this, message, value);
3114
+ return message;
3115
+ }
3116
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TvlHistoryResponse): TvlHistoryResponse {
3117
+ let message = target ?? this.create(), end = reader.pos + length;
3118
+ while (reader.pos < end) {
3119
+ let [fieldNo, wireType] = reader.tag();
3120
+ switch (fieldNo) {
3121
+ case /* repeated injective_megavault_rpc.HistoricalTVL history */ 1:
3122
+ message.history.push(HistoricalTVL.internalBinaryRead(reader, reader.uint32(), options));
3123
+ break;
3124
+ default:
3125
+ let u = options.readUnknownField;
3126
+ if (u === "throw")
3127
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3128
+ let d = reader.skip(wireType);
3129
+ if (u !== false)
3130
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3131
+ }
3132
+ }
3133
+ return message;
3134
+ }
3135
+ internalBinaryWrite(message: TvlHistoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3136
+ /* repeated injective_megavault_rpc.HistoricalTVL history = 1; */
3137
+ for (let i = 0; i < message.history.length; i++)
3138
+ HistoricalTVL.internalBinaryWrite(message.history[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3139
+ let u = options.writeUnknownFields;
3140
+ if (u !== false)
3141
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3142
+ return writer;
3143
+ }
3144
+ }
3145
+ /**
3146
+ * @generated MessageType for protobuf message injective_megavault_rpc.TvlHistoryResponse
3147
+ */
3148
+ export const TvlHistoryResponse = new TvlHistoryResponse$Type();
3149
+ // @generated message type with reflection information, may provide speed optimized methods
3150
+ class HistoricalTVL$Type extends MessageType<HistoricalTVL> {
3151
+ constructor() {
3152
+ super("injective_megavault_rpc.HistoricalTVL", [
3153
+ { no: 1, name: "t", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
3154
+ { no: 2, name: "v", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
3155
+ ]);
3156
+ }
3157
+ create(value?: PartialMessage<HistoricalTVL>): HistoricalTVL {
3158
+ const message = globalThis.Object.create((this.messagePrototype!));
3159
+ message.t = 0;
3160
+ message.v = "";
3161
+ if (value !== undefined)
3162
+ reflectionMergePartial<HistoricalTVL>(this, message, value);
3163
+ return message;
3164
+ }
3165
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HistoricalTVL): HistoricalTVL {
3166
+ let message = target ?? this.create(), end = reader.pos + length;
3167
+ while (reader.pos < end) {
3168
+ let [fieldNo, wireType] = reader.tag();
3169
+ switch (fieldNo) {
3170
+ case /* sint32 t */ 1:
3171
+ message.t = reader.sint32();
3172
+ break;
3173
+ case /* string v */ 2:
3174
+ message.v = reader.string();
3175
+ break;
3176
+ default:
3177
+ let u = options.readUnknownField;
3178
+ if (u === "throw")
3179
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3180
+ let d = reader.skip(wireType);
3181
+ if (u !== false)
3182
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3183
+ }
3184
+ }
3185
+ return message;
3186
+ }
3187
+ internalBinaryWrite(message: HistoricalTVL, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3188
+ /* sint32 t = 1; */
3189
+ if (message.t !== 0)
3190
+ writer.tag(1, WireType.Varint).sint32(message.t);
3191
+ /* string v = 2; */
3192
+ if (message.v !== "")
3193
+ writer.tag(2, WireType.LengthDelimited).string(message.v);
3194
+ let u = options.writeUnknownFields;
3195
+ if (u !== false)
3196
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3197
+ return writer;
3198
+ }
3199
+ }
3200
+ /**
3201
+ * @generated MessageType for protobuf message injective_megavault_rpc.HistoricalTVL
3202
+ */
3203
+ export const HistoricalTVL = new HistoricalTVL$Type();
3204
+ // @generated message type with reflection information, may provide speed optimized methods
3205
+ class PnlHistoryRequest$Type extends MessageType<PnlHistoryRequest> {
3206
+ constructor() {
3207
+ super("injective_megavault_rpc.PnlHistoryRequest", [
3208
+ { no: 1, name: "vault_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
3209
+ { no: 2, name: "since", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
3210
+ { no: 3, name: "max_data_points", kind: "scalar", T: 17 /*ScalarType.SINT32*/ }
3211
+ ]);
3212
+ }
3213
+ create(value?: PartialMessage<PnlHistoryRequest>): PnlHistoryRequest {
3214
+ const message = globalThis.Object.create((this.messagePrototype!));
3215
+ message.vaultAddress = "";
3216
+ message.since = 0n;
3217
+ message.maxDataPoints = 0;
3218
+ if (value !== undefined)
3219
+ reflectionMergePartial<PnlHistoryRequest>(this, message, value);
3220
+ return message;
3221
+ }
3222
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PnlHistoryRequest): PnlHistoryRequest {
3223
+ let message = target ?? this.create(), end = reader.pos + length;
3224
+ while (reader.pos < end) {
3225
+ let [fieldNo, wireType] = reader.tag();
3226
+ switch (fieldNo) {
3227
+ case /* string vault_address */ 1:
3228
+ message.vaultAddress = reader.string();
3229
+ break;
3230
+ case /* sint64 since */ 2:
3231
+ message.since = reader.sint64().toBigInt();
3232
+ break;
3233
+ case /* sint32 max_data_points */ 3:
3234
+ message.maxDataPoints = reader.sint32();
3235
+ break;
3236
+ default:
3237
+ let u = options.readUnknownField;
3238
+ if (u === "throw")
3239
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3240
+ let d = reader.skip(wireType);
3241
+ if (u !== false)
3242
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3243
+ }
3244
+ }
3245
+ return message;
3246
+ }
3247
+ internalBinaryWrite(message: PnlHistoryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3248
+ /* string vault_address = 1; */
3249
+ if (message.vaultAddress !== "")
3250
+ writer.tag(1, WireType.LengthDelimited).string(message.vaultAddress);
3251
+ /* sint64 since = 2; */
3252
+ if (message.since !== 0n)
3253
+ writer.tag(2, WireType.Varint).sint64(message.since);
3254
+ /* sint32 max_data_points = 3; */
3255
+ if (message.maxDataPoints !== 0)
3256
+ writer.tag(3, WireType.Varint).sint32(message.maxDataPoints);
3257
+ let u = options.writeUnknownFields;
3258
+ if (u !== false)
3259
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3260
+ return writer;
3261
+ }
3262
+ }
3263
+ /**
3264
+ * @generated MessageType for protobuf message injective_megavault_rpc.PnlHistoryRequest
3265
+ */
3266
+ export const PnlHistoryRequest = new PnlHistoryRequest$Type();
3267
+ // @generated message type with reflection information, may provide speed optimized methods
3268
+ class PnlHistoryResponse$Type extends MessageType<PnlHistoryResponse> {
3269
+ constructor() {
3270
+ super("injective_megavault_rpc.PnlHistoryResponse", [
3271
+ { no: 1, name: "history", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HistoricalPnL }
3272
+ ]);
3273
+ }
3274
+ create(value?: PartialMessage<PnlHistoryResponse>): PnlHistoryResponse {
3275
+ const message = globalThis.Object.create((this.messagePrototype!));
3276
+ message.history = [];
3277
+ if (value !== undefined)
3278
+ reflectionMergePartial<PnlHistoryResponse>(this, message, value);
3279
+ return message;
3280
+ }
3281
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PnlHistoryResponse): PnlHistoryResponse {
3282
+ let message = target ?? this.create(), end = reader.pos + length;
3283
+ while (reader.pos < end) {
3284
+ let [fieldNo, wireType] = reader.tag();
3285
+ switch (fieldNo) {
3286
+ case /* repeated injective_megavault_rpc.HistoricalPnL history */ 1:
3287
+ message.history.push(HistoricalPnL.internalBinaryRead(reader, reader.uint32(), options));
3288
+ break;
3289
+ default:
3290
+ let u = options.readUnknownField;
3291
+ if (u === "throw")
3292
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3293
+ let d = reader.skip(wireType);
3294
+ if (u !== false)
3295
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3296
+ }
3297
+ }
3298
+ return message;
3299
+ }
3300
+ internalBinaryWrite(message: PnlHistoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3301
+ /* repeated injective_megavault_rpc.HistoricalPnL history = 1; */
3302
+ for (let i = 0; i < message.history.length; i++)
3303
+ HistoricalPnL.internalBinaryWrite(message.history[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3304
+ let u = options.writeUnknownFields;
3305
+ if (u !== false)
3306
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3307
+ return writer;
3308
+ }
3309
+ }
3310
+ /**
3311
+ * @generated MessageType for protobuf message injective_megavault_rpc.PnlHistoryResponse
3312
+ */
3313
+ export const PnlHistoryResponse = new PnlHistoryResponse$Type();
3314
+ // @generated message type with reflection information, may provide speed optimized methods
3315
+ class HistoricalPnL$Type extends MessageType<HistoricalPnL> {
3316
+ constructor() {
3317
+ super("injective_megavault_rpc.HistoricalPnL", [
3318
+ { no: 1, name: "t", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
3319
+ { no: 2, name: "v", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
3320
+ ]);
3321
+ }
3322
+ create(value?: PartialMessage<HistoricalPnL>): HistoricalPnL {
3323
+ const message = globalThis.Object.create((this.messagePrototype!));
3324
+ message.t = 0;
3325
+ message.v = "";
3326
+ if (value !== undefined)
3327
+ reflectionMergePartial<HistoricalPnL>(this, message, value);
3328
+ return message;
3329
+ }
3330
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HistoricalPnL): HistoricalPnL {
3331
+ let message = target ?? this.create(), end = reader.pos + length;
3332
+ while (reader.pos < end) {
3333
+ let [fieldNo, wireType] = reader.tag();
3334
+ switch (fieldNo) {
3335
+ case /* sint32 t */ 1:
3336
+ message.t = reader.sint32();
3337
+ break;
3338
+ case /* string v */ 2:
3339
+ message.v = reader.string();
3340
+ break;
3341
+ default:
3342
+ let u = options.readUnknownField;
3343
+ if (u === "throw")
3344
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3345
+ let d = reader.skip(wireType);
3346
+ if (u !== false)
3347
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3348
+ }
3349
+ }
3350
+ return message;
3351
+ }
3352
+ internalBinaryWrite(message: HistoricalPnL, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3353
+ /* sint32 t = 1; */
3354
+ if (message.t !== 0)
3355
+ writer.tag(1, WireType.Varint).sint32(message.t);
3356
+ /* string v = 2; */
3357
+ if (message.v !== "")
3358
+ writer.tag(2, WireType.LengthDelimited).string(message.v);
3359
+ let u = options.writeUnknownFields;
3360
+ if (u !== false)
3361
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3362
+ return writer;
3363
+ }
3364
+ }
3365
+ /**
3366
+ * @generated MessageType for protobuf message injective_megavault_rpc.HistoricalPnL
3367
+ */
3368
+ export const HistoricalPnL = new HistoricalPnL$Type();
3369
+ /**
3370
+ * @generated ServiceType for protobuf service injective_megavault_rpc.InjectiveMegavaultRPC
3371
+ */
3372
+ export const InjectiveMegavaultRPC = new ServiceType("injective_megavault_rpc.InjectiveMegavaultRPC", [
3373
+ { name: "GetVault", options: {}, I: GetVaultRequest, O: GetVaultResponse },
3374
+ { name: "GetUser", options: {}, I: GetUserRequest, O: GetUserResponse },
3375
+ { name: "ListSubscriptions", options: {}, I: ListSubscriptionsRequest, O: ListSubscriptionsResponse },
3376
+ { name: "ListRedemptions", options: {}, I: ListRedemptionsRequest, O: ListRedemptionsResponse },
3377
+ { name: "GetOperatorRedemptionBuckets", options: {}, I: GetOperatorRedemptionBucketsRequest, O: GetOperatorRedemptionBucketsResponse },
3378
+ { name: "TvlHistory", options: {}, I: TvlHistoryRequest, O: TvlHistoryResponse },
3379
+ { name: "PnlHistory", options: {}, I: PnlHistoryRequest, O: PnlHistoryResponse }
3380
+ ]);