@injectivelabs/indexer-proto-ts-v2 1.0.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 (79) hide show
  1. package/generated/event_provider_api_pb.client.d.ts +156 -0
  2. package/generated/event_provider_api_pb.client.js +76 -0
  3. package/generated/event_provider_api_pb.d.ts +1980 -0
  4. package/generated/event_provider_api_pb.js +1776 -0
  5. package/generated/health_pb.client.d.ts +53 -0
  6. package/generated/health_pb.client.js +22 -0
  7. package/generated/health_pb.d.ts +309 -0
  8. package/generated/health_pb.js +265 -0
  9. package/generated/injective_accounts_rpc_pb.client.d.ts +211 -0
  10. package/generated/injective_accounts_rpc_pb.client.js +105 -0
  11. package/generated/injective_accounts_rpc_pb.d.ts +5307 -0
  12. package/generated/injective_accounts_rpc_pb.js +4784 -0
  13. package/generated/injective_archiver_rpc_pb.client.d.ts +224 -0
  14. package/generated/injective_archiver_rpc_pb.client.js +112 -0
  15. package/generated/injective_archiver_rpc_pb.d.ts +2944 -0
  16. package/generated/injective_archiver_rpc_pb.js +2603 -0
  17. package/generated/injective_auction_rpc_pb.client.d.ts +190 -0
  18. package/generated/injective_auction_rpc_pb.client.js +94 -0
  19. package/generated/injective_auction_rpc_pb.d.ts +2131 -0
  20. package/generated/injective_auction_rpc_pb.js +1917 -0
  21. package/generated/injective_campaign_rpc_pb.client.d.ts +138 -0
  22. package/generated/injective_campaign_rpc_pb.client.js +67 -0
  23. package/generated/injective_campaign_rpc_pb.d.ts +2766 -0
  24. package/generated/injective_campaign_rpc_pb.js +2542 -0
  25. package/generated/injective_chart_rpc_pb.client.d.ts +159 -0
  26. package/generated/injective_chart_rpc_pb.client.js +78 -0
  27. package/generated/injective_chart_rpc_pb.d.ts +1840 -0
  28. package/generated/injective_chart_rpc_pb.js +1690 -0
  29. package/generated/injective_derivative_exchange_rpc_pb.client.d.ts +504 -0
  30. package/generated/injective_derivative_exchange_rpc_pb.client.js +259 -0
  31. package/generated/injective_derivative_exchange_rpc_pb.d.ts +9214 -0
  32. package/generated/injective_derivative_exchange_rpc_pb.js +8407 -0
  33. package/generated/injective_exchange_rpc_pb.client.d.ts +155 -0
  34. package/generated/injective_exchange_rpc_pb.client.js +76 -0
  35. package/generated/injective_exchange_rpc_pb.d.ts +1925 -0
  36. package/generated/injective_exchange_rpc_pb.js +1740 -0
  37. package/generated/injective_explorer_rpc_pb.client.d.ts +495 -0
  38. package/generated/injective_explorer_rpc_pb.client.js +255 -0
  39. package/generated/injective_explorer_rpc_pb.d.ts +9394 -0
  40. package/generated/injective_explorer_rpc_pb.js +8921 -0
  41. package/generated/injective_insurance_rpc_pb.client.d.ts +87 -0
  42. package/generated/injective_insurance_rpc_pb.client.js +40 -0
  43. package/generated/injective_insurance_rpc_pb.d.ts +904 -0
  44. package/generated/injective_insurance_rpc_pb.js +807 -0
  45. package/generated/injective_megavault_rpc_pb.client.d.ts +155 -0
  46. package/generated/injective_megavault_rpc_pb.client.js +76 -0
  47. package/generated/injective_megavault_rpc_pb.d.ts +3408 -0
  48. package/generated/injective_megavault_rpc_pb.js +3019 -0
  49. package/generated/injective_meta_rpc_pb.client.d.ts +124 -0
  50. package/generated/injective_meta_rpc_pb.client.js +59 -0
  51. package/generated/injective_meta_rpc_pb.d.ts +825 -0
  52. package/generated/injective_meta_rpc_pb.js +716 -0
  53. package/generated/injective_oracle_rpc_pb.client.d.ts +124 -0
  54. package/generated/injective_oracle_rpc_pb.client.js +59 -0
  55. package/generated/injective_oracle_rpc_pb.d.ts +1117 -0
  56. package/generated/injective_oracle_rpc_pb.js +987 -0
  57. package/generated/injective_portfolio_rpc_pb.client.d.ts +105 -0
  58. package/generated/injective_portfolio_rpc_pb.client.js +49 -0
  59. package/generated/injective_portfolio_rpc_pb.d.ts +1492 -0
  60. package/generated/injective_portfolio_rpc_pb.js +1314 -0
  61. package/generated/injective_referral_rpc_pb.client.d.ts +89 -0
  62. package/generated/injective_referral_rpc_pb.client.js +41 -0
  63. package/generated/injective_referral_rpc_pb.d.ts +575 -0
  64. package/generated/injective_referral_rpc_pb.js +497 -0
  65. package/generated/injective_rfqrpc_pb.client.d.ts +208 -0
  66. package/generated/injective_rfqrpc_pb.client.js +103 -0
  67. package/generated/injective_rfqrpc_pb.d.ts +2241 -0
  68. package/generated/injective_rfqrpc_pb.js +1940 -0
  69. package/generated/injective_spot_exchange_rpc_pb.client.d.ts +343 -0
  70. package/generated/injective_spot_exchange_rpc_pb.client.js +175 -0
  71. package/generated/injective_spot_exchange_rpc_pb.d.ts +5958 -0
  72. package/generated/injective_spot_exchange_rpc_pb.js +5426 -0
  73. package/generated/injective_trading_rpc_pb.client.d.ts +90 -0
  74. package/generated/injective_trading_rpc_pb.client.js +40 -0
  75. package/generated/injective_trading_rpc_pb.d.ts +1882 -0
  76. package/generated/injective_trading_rpc_pb.js +1754 -0
  77. package/index.d.ts +43 -0
  78. package/index.js +78 -0
  79. package/package.json +37 -0
@@ -0,0 +1,904 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix
2
+ // @generated from protobuf file "injective_insurance_rpc.proto" (package "injective_insurance_rpc", syntax proto3)
3
+ // tslint:disable
4
+ //
5
+ // Code generated with goa v3.7.0, DO NOT EDIT.
6
+ //
7
+ // InjectiveInsuranceRPC protocol buffer definition
8
+ //
9
+ // Command:
10
+ // $ goa gen github.com/InjectiveLabs/injective-indexer/api/design -o ../
11
+ //
12
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
13
+ import { WireType } from "@protobuf-ts/runtime";
14
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
15
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
16
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
17
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
18
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
19
+ import type { PartialMessage } from "@protobuf-ts/runtime";
20
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
21
+ import { MessageType } from "@protobuf-ts/runtime";
22
+ /**
23
+ * @generated from protobuf message injective_insurance_rpc.FundsRequest
24
+ */
25
+ export interface FundsRequest {
26
+ }
27
+ /**
28
+ * @generated from protobuf message injective_insurance_rpc.FundsResponse
29
+ */
30
+ export interface FundsResponse {
31
+ /**
32
+ * @generated from protobuf field: repeated injective_insurance_rpc.InsuranceFund funds = 1
33
+ */
34
+ funds: InsuranceFund[];
35
+ }
36
+ /**
37
+ * @generated from protobuf message injective_insurance_rpc.InsuranceFund
38
+ */
39
+ export interface InsuranceFund {
40
+ /**
41
+ * Ticker of the derivative market.
42
+ *
43
+ * @generated from protobuf field: string market_ticker = 1
44
+ */
45
+ marketTicker: string;
46
+ /**
47
+ * Derivative Market ID
48
+ *
49
+ * @generated from protobuf field: string market_id = 2
50
+ */
51
+ marketId: string;
52
+ /**
53
+ * Coin denom used for the underwriting of the insurance fund.
54
+ *
55
+ * @generated from protobuf field: string deposit_denom = 3
56
+ */
57
+ depositDenom: string;
58
+ /**
59
+ * Pool token denom
60
+ *
61
+ * @generated from protobuf field: string pool_token_denom = 4
62
+ */
63
+ poolTokenDenom: string;
64
+ /**
65
+ * Redemption notice period duration in seconds.
66
+ *
67
+ * @generated from protobuf field: sint64 redemption_notice_period_duration = 5
68
+ */
69
+ redemptionNoticePeriodDuration: bigint;
70
+ /**
71
+ * @generated from protobuf field: string balance = 6
72
+ */
73
+ balance: string;
74
+ /**
75
+ * @generated from protobuf field: string total_share = 7
76
+ */
77
+ totalShare: string;
78
+ /**
79
+ * Oracle base currency
80
+ *
81
+ * @generated from protobuf field: string oracle_base = 8
82
+ */
83
+ oracleBase: string;
84
+ /**
85
+ * Oracle quote currency
86
+ *
87
+ * @generated from protobuf field: string oracle_quote = 9
88
+ */
89
+ oracleQuote: string;
90
+ /**
91
+ * Oracle Type
92
+ *
93
+ * @generated from protobuf field: string oracle_type = 10
94
+ */
95
+ oracleType: string;
96
+ /**
97
+ * Defines the expiry, if any
98
+ *
99
+ * @generated from protobuf field: sint64 expiry = 11
100
+ */
101
+ expiry: bigint;
102
+ /**
103
+ * Token metadata for the deposit asset
104
+ *
105
+ * @generated from protobuf field: injective_insurance_rpc.TokenMeta deposit_token_meta = 12
106
+ */
107
+ depositTokenMeta?: TokenMeta;
108
+ }
109
+ /**
110
+ * @generated from protobuf message injective_insurance_rpc.TokenMeta
111
+ */
112
+ export interface TokenMeta {
113
+ /**
114
+ * Token full name
115
+ *
116
+ * @generated from protobuf field: string name = 1
117
+ */
118
+ name: string;
119
+ /**
120
+ * Token contract address (native or not)
121
+ *
122
+ * @generated from protobuf field: string address = 2
123
+ */
124
+ address: string;
125
+ /**
126
+ * Token symbol short name
127
+ *
128
+ * @generated from protobuf field: string symbol = 3
129
+ */
130
+ symbol: string;
131
+ /**
132
+ * URL to the logo image
133
+ *
134
+ * @generated from protobuf field: string logo = 4
135
+ */
136
+ logo: string;
137
+ /**
138
+ * Token decimals
139
+ *
140
+ * @generated from protobuf field: sint32 decimals = 5
141
+ */
142
+ decimals: number;
143
+ /**
144
+ * Token metadata fetched timestamp in UNIX millis.
145
+ *
146
+ * @generated from protobuf field: sint64 updated_at = 6
147
+ */
148
+ updatedAt: bigint;
149
+ }
150
+ /**
151
+ * @generated from protobuf message injective_insurance_rpc.FundRequest
152
+ */
153
+ export interface FundRequest {
154
+ /**
155
+ * denom of insurance fund
156
+ *
157
+ * @generated from protobuf field: string denom = 1
158
+ */
159
+ denom: string;
160
+ }
161
+ /**
162
+ * @generated from protobuf message injective_insurance_rpc.FundResponse
163
+ */
164
+ export interface FundResponse {
165
+ /**
166
+ * The insurance fund corresponding to the provided token denom
167
+ *
168
+ * @generated from protobuf field: injective_insurance_rpc.InsuranceFund fund = 1
169
+ */
170
+ fund?: InsuranceFund;
171
+ }
172
+ /**
173
+ * @generated from protobuf message injective_insurance_rpc.RedemptionsRequest
174
+ */
175
+ export interface RedemptionsRequest {
176
+ /**
177
+ * Account address of the redemption owner
178
+ *
179
+ * @generated from protobuf field: string redeemer = 1
180
+ */
181
+ redeemer: string;
182
+ /**
183
+ * Denom of the insurance pool token.
184
+ *
185
+ * @generated from protobuf field: string redemption_denom = 2
186
+ */
187
+ redemptionDenom: string;
188
+ /**
189
+ * Status of the redemption. Either pending or disbursed.
190
+ *
191
+ * @generated from protobuf field: string status = 3
192
+ */
193
+ status: string;
194
+ }
195
+ /**
196
+ * @generated from protobuf message injective_insurance_rpc.RedemptionsResponse
197
+ */
198
+ export interface RedemptionsResponse {
199
+ /**
200
+ * @generated from protobuf field: repeated injective_insurance_rpc.RedemptionSchedule redemption_schedules = 1
201
+ */
202
+ redemptionSchedules: RedemptionSchedule[];
203
+ }
204
+ /**
205
+ * @generated from protobuf message injective_insurance_rpc.RedemptionSchedule
206
+ */
207
+ export interface RedemptionSchedule {
208
+ /**
209
+ * Redemption ID.
210
+ *
211
+ * @generated from protobuf field: uint64 redemption_id = 1
212
+ */
213
+ redemptionId: bigint;
214
+ /**
215
+ * Status of the redemption. Either pending or disbursed.
216
+ *
217
+ * @generated from protobuf field: string status = 2
218
+ */
219
+ status: string;
220
+ /**
221
+ * Account address of the redemption owner
222
+ *
223
+ * @generated from protobuf field: string redeemer = 3
224
+ */
225
+ redeemer: string;
226
+ /**
227
+ * Claimable redemption time in seconds
228
+ *
229
+ * @generated from protobuf field: sint64 claimable_redemption_time = 4
230
+ */
231
+ claimableRedemptionTime: bigint;
232
+ /**
233
+ * Amount of pool tokens being redeemed.
234
+ *
235
+ * @generated from protobuf field: string redemption_amount = 5
236
+ */
237
+ redemptionAmount: string;
238
+ /**
239
+ * Pool token denom being redeemed.
240
+ *
241
+ * @generated from protobuf field: string redemption_denom = 6
242
+ */
243
+ redemptionDenom: string;
244
+ /**
245
+ * Redemption request time in unix milliseconds.
246
+ *
247
+ * @generated from protobuf field: sint64 requested_at = 7
248
+ */
249
+ requestedAt: bigint;
250
+ /**
251
+ * Amount of quote tokens disbursed
252
+ *
253
+ * @generated from protobuf field: string disbursed_amount = 8
254
+ */
255
+ disbursedAmount: string;
256
+ /**
257
+ * Denom of the quote tokens disbursed
258
+ *
259
+ * @generated from protobuf field: string disbursed_denom = 9
260
+ */
261
+ disbursedDenom: string;
262
+ /**
263
+ * Redemption disbursement time in unix milliseconds.
264
+ *
265
+ * @generated from protobuf field: sint64 disbursed_at = 10
266
+ */
267
+ disbursedAt: bigint;
268
+ }
269
+ // @generated message type with reflection information, may provide speed optimized methods
270
+ class FundsRequest$Type extends MessageType<FundsRequest> {
271
+ constructor() {
272
+ super("injective_insurance_rpc.FundsRequest", []);
273
+ }
274
+ create(value?: PartialMessage<FundsRequest>): FundsRequest {
275
+ const message = globalThis.Object.create((this.messagePrototype!));
276
+ if (value !== undefined)
277
+ reflectionMergePartial<FundsRequest>(this, message, value);
278
+ return message;
279
+ }
280
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FundsRequest): FundsRequest {
281
+ let message = target ?? this.create(), end = reader.pos + length;
282
+ while (reader.pos < end) {
283
+ let [fieldNo, wireType] = reader.tag();
284
+ switch (fieldNo) {
285
+ default:
286
+ let u = options.readUnknownField;
287
+ if (u === "throw")
288
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
289
+ let d = reader.skip(wireType);
290
+ if (u !== false)
291
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
292
+ }
293
+ }
294
+ return message;
295
+ }
296
+ internalBinaryWrite(message: FundsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
297
+ let u = options.writeUnknownFields;
298
+ if (u !== false)
299
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
300
+ return writer;
301
+ }
302
+ }
303
+ /**
304
+ * @generated MessageType for protobuf message injective_insurance_rpc.FundsRequest
305
+ */
306
+ export const FundsRequest = new FundsRequest$Type();
307
+ // @generated message type with reflection information, may provide speed optimized methods
308
+ class FundsResponse$Type extends MessageType<FundsResponse> {
309
+ constructor() {
310
+ super("injective_insurance_rpc.FundsResponse", [
311
+ { no: 1, name: "funds", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => InsuranceFund }
312
+ ]);
313
+ }
314
+ create(value?: PartialMessage<FundsResponse>): FundsResponse {
315
+ const message = globalThis.Object.create((this.messagePrototype!));
316
+ message.funds = [];
317
+ if (value !== undefined)
318
+ reflectionMergePartial<FundsResponse>(this, message, value);
319
+ return message;
320
+ }
321
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FundsResponse): FundsResponse {
322
+ let message = target ?? this.create(), end = reader.pos + length;
323
+ while (reader.pos < end) {
324
+ let [fieldNo, wireType] = reader.tag();
325
+ switch (fieldNo) {
326
+ case /* repeated injective_insurance_rpc.InsuranceFund funds */ 1:
327
+ message.funds.push(InsuranceFund.internalBinaryRead(reader, reader.uint32(), options));
328
+ break;
329
+ default:
330
+ let u = options.readUnknownField;
331
+ if (u === "throw")
332
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
333
+ let d = reader.skip(wireType);
334
+ if (u !== false)
335
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
336
+ }
337
+ }
338
+ return message;
339
+ }
340
+ internalBinaryWrite(message: FundsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
341
+ /* repeated injective_insurance_rpc.InsuranceFund funds = 1; */
342
+ for (let i = 0; i < message.funds.length; i++)
343
+ InsuranceFund.internalBinaryWrite(message.funds[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
344
+ let u = options.writeUnknownFields;
345
+ if (u !== false)
346
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
347
+ return writer;
348
+ }
349
+ }
350
+ /**
351
+ * @generated MessageType for protobuf message injective_insurance_rpc.FundsResponse
352
+ */
353
+ export const FundsResponse = new FundsResponse$Type();
354
+ // @generated message type with reflection information, may provide speed optimized methods
355
+ class InsuranceFund$Type extends MessageType<InsuranceFund> {
356
+ constructor() {
357
+ super("injective_insurance_rpc.InsuranceFund", [
358
+ { no: 1, name: "market_ticker", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
359
+ { no: 2, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
360
+ { no: 3, name: "deposit_denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
361
+ { no: 4, name: "pool_token_denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
362
+ { no: 5, name: "redemption_notice_period_duration", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
363
+ { no: 6, name: "balance", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
364
+ { no: 7, name: "total_share", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
365
+ { no: 8, name: "oracle_base", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
366
+ { no: 9, name: "oracle_quote", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
367
+ { no: 10, name: "oracle_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
368
+ { no: 11, name: "expiry", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
369
+ { no: 12, name: "deposit_token_meta", kind: "message", T: () => TokenMeta }
370
+ ]);
371
+ }
372
+ create(value?: PartialMessage<InsuranceFund>): InsuranceFund {
373
+ const message = globalThis.Object.create((this.messagePrototype!));
374
+ message.marketTicker = "";
375
+ message.marketId = "";
376
+ message.depositDenom = "";
377
+ message.poolTokenDenom = "";
378
+ message.redemptionNoticePeriodDuration = 0n;
379
+ message.balance = "";
380
+ message.totalShare = "";
381
+ message.oracleBase = "";
382
+ message.oracleQuote = "";
383
+ message.oracleType = "";
384
+ message.expiry = 0n;
385
+ if (value !== undefined)
386
+ reflectionMergePartial<InsuranceFund>(this, message, value);
387
+ return message;
388
+ }
389
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InsuranceFund): InsuranceFund {
390
+ let message = target ?? this.create(), end = reader.pos + length;
391
+ while (reader.pos < end) {
392
+ let [fieldNo, wireType] = reader.tag();
393
+ switch (fieldNo) {
394
+ case /* string market_ticker */ 1:
395
+ message.marketTicker = reader.string();
396
+ break;
397
+ case /* string market_id */ 2:
398
+ message.marketId = reader.string();
399
+ break;
400
+ case /* string deposit_denom */ 3:
401
+ message.depositDenom = reader.string();
402
+ break;
403
+ case /* string pool_token_denom */ 4:
404
+ message.poolTokenDenom = reader.string();
405
+ break;
406
+ case /* sint64 redemption_notice_period_duration */ 5:
407
+ message.redemptionNoticePeriodDuration = reader.sint64().toBigInt();
408
+ break;
409
+ case /* string balance */ 6:
410
+ message.balance = reader.string();
411
+ break;
412
+ case /* string total_share */ 7:
413
+ message.totalShare = reader.string();
414
+ break;
415
+ case /* string oracle_base */ 8:
416
+ message.oracleBase = reader.string();
417
+ break;
418
+ case /* string oracle_quote */ 9:
419
+ message.oracleQuote = reader.string();
420
+ break;
421
+ case /* string oracle_type */ 10:
422
+ message.oracleType = reader.string();
423
+ break;
424
+ case /* sint64 expiry */ 11:
425
+ message.expiry = reader.sint64().toBigInt();
426
+ break;
427
+ case /* injective_insurance_rpc.TokenMeta deposit_token_meta */ 12:
428
+ message.depositTokenMeta = TokenMeta.internalBinaryRead(reader, reader.uint32(), options, message.depositTokenMeta);
429
+ break;
430
+ default:
431
+ let u = options.readUnknownField;
432
+ if (u === "throw")
433
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
434
+ let d = reader.skip(wireType);
435
+ if (u !== false)
436
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
437
+ }
438
+ }
439
+ return message;
440
+ }
441
+ internalBinaryWrite(message: InsuranceFund, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
442
+ /* string market_ticker = 1; */
443
+ if (message.marketTicker !== "")
444
+ writer.tag(1, WireType.LengthDelimited).string(message.marketTicker);
445
+ /* string market_id = 2; */
446
+ if (message.marketId !== "")
447
+ writer.tag(2, WireType.LengthDelimited).string(message.marketId);
448
+ /* string deposit_denom = 3; */
449
+ if (message.depositDenom !== "")
450
+ writer.tag(3, WireType.LengthDelimited).string(message.depositDenom);
451
+ /* string pool_token_denom = 4; */
452
+ if (message.poolTokenDenom !== "")
453
+ writer.tag(4, WireType.LengthDelimited).string(message.poolTokenDenom);
454
+ /* sint64 redemption_notice_period_duration = 5; */
455
+ if (message.redemptionNoticePeriodDuration !== 0n)
456
+ writer.tag(5, WireType.Varint).sint64(message.redemptionNoticePeriodDuration);
457
+ /* string balance = 6; */
458
+ if (message.balance !== "")
459
+ writer.tag(6, WireType.LengthDelimited).string(message.balance);
460
+ /* string total_share = 7; */
461
+ if (message.totalShare !== "")
462
+ writer.tag(7, WireType.LengthDelimited).string(message.totalShare);
463
+ /* string oracle_base = 8; */
464
+ if (message.oracleBase !== "")
465
+ writer.tag(8, WireType.LengthDelimited).string(message.oracleBase);
466
+ /* string oracle_quote = 9; */
467
+ if (message.oracleQuote !== "")
468
+ writer.tag(9, WireType.LengthDelimited).string(message.oracleQuote);
469
+ /* string oracle_type = 10; */
470
+ if (message.oracleType !== "")
471
+ writer.tag(10, WireType.LengthDelimited).string(message.oracleType);
472
+ /* sint64 expiry = 11; */
473
+ if (message.expiry !== 0n)
474
+ writer.tag(11, WireType.Varint).sint64(message.expiry);
475
+ /* injective_insurance_rpc.TokenMeta deposit_token_meta = 12; */
476
+ if (message.depositTokenMeta)
477
+ TokenMeta.internalBinaryWrite(message.depositTokenMeta, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
478
+ let u = options.writeUnknownFields;
479
+ if (u !== false)
480
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
481
+ return writer;
482
+ }
483
+ }
484
+ /**
485
+ * @generated MessageType for protobuf message injective_insurance_rpc.InsuranceFund
486
+ */
487
+ export const InsuranceFund = new InsuranceFund$Type();
488
+ // @generated message type with reflection information, may provide speed optimized methods
489
+ class TokenMeta$Type extends MessageType<TokenMeta> {
490
+ constructor() {
491
+ super("injective_insurance_rpc.TokenMeta", [
492
+ { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
493
+ { no: 2, name: "address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
494
+ { no: 3, name: "symbol", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
495
+ { no: 4, name: "logo", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
496
+ { no: 5, name: "decimals", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
497
+ { no: 6, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
498
+ ]);
499
+ }
500
+ create(value?: PartialMessage<TokenMeta>): TokenMeta {
501
+ const message = globalThis.Object.create((this.messagePrototype!));
502
+ message.name = "";
503
+ message.address = "";
504
+ message.symbol = "";
505
+ message.logo = "";
506
+ message.decimals = 0;
507
+ message.updatedAt = 0n;
508
+ if (value !== undefined)
509
+ reflectionMergePartial<TokenMeta>(this, message, value);
510
+ return message;
511
+ }
512
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TokenMeta): TokenMeta {
513
+ let message = target ?? this.create(), end = reader.pos + length;
514
+ while (reader.pos < end) {
515
+ let [fieldNo, wireType] = reader.tag();
516
+ switch (fieldNo) {
517
+ case /* string name */ 1:
518
+ message.name = reader.string();
519
+ break;
520
+ case /* string address */ 2:
521
+ message.address = reader.string();
522
+ break;
523
+ case /* string symbol */ 3:
524
+ message.symbol = reader.string();
525
+ break;
526
+ case /* string logo */ 4:
527
+ message.logo = reader.string();
528
+ break;
529
+ case /* sint32 decimals */ 5:
530
+ message.decimals = reader.sint32();
531
+ break;
532
+ case /* sint64 updated_at */ 6:
533
+ message.updatedAt = reader.sint64().toBigInt();
534
+ break;
535
+ default:
536
+ let u = options.readUnknownField;
537
+ if (u === "throw")
538
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
539
+ let d = reader.skip(wireType);
540
+ if (u !== false)
541
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
542
+ }
543
+ }
544
+ return message;
545
+ }
546
+ internalBinaryWrite(message: TokenMeta, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
547
+ /* string name = 1; */
548
+ if (message.name !== "")
549
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
550
+ /* string address = 2; */
551
+ if (message.address !== "")
552
+ writer.tag(2, WireType.LengthDelimited).string(message.address);
553
+ /* string symbol = 3; */
554
+ if (message.symbol !== "")
555
+ writer.tag(3, WireType.LengthDelimited).string(message.symbol);
556
+ /* string logo = 4; */
557
+ if (message.logo !== "")
558
+ writer.tag(4, WireType.LengthDelimited).string(message.logo);
559
+ /* sint32 decimals = 5; */
560
+ if (message.decimals !== 0)
561
+ writer.tag(5, WireType.Varint).sint32(message.decimals);
562
+ /* sint64 updated_at = 6; */
563
+ if (message.updatedAt !== 0n)
564
+ writer.tag(6, WireType.Varint).sint64(message.updatedAt);
565
+ let u = options.writeUnknownFields;
566
+ if (u !== false)
567
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
568
+ return writer;
569
+ }
570
+ }
571
+ /**
572
+ * @generated MessageType for protobuf message injective_insurance_rpc.TokenMeta
573
+ */
574
+ export const TokenMeta = new TokenMeta$Type();
575
+ // @generated message type with reflection information, may provide speed optimized methods
576
+ class FundRequest$Type extends MessageType<FundRequest> {
577
+ constructor() {
578
+ super("injective_insurance_rpc.FundRequest", [
579
+ { no: 1, name: "denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
580
+ ]);
581
+ }
582
+ create(value?: PartialMessage<FundRequest>): FundRequest {
583
+ const message = globalThis.Object.create((this.messagePrototype!));
584
+ message.denom = "";
585
+ if (value !== undefined)
586
+ reflectionMergePartial<FundRequest>(this, message, value);
587
+ return message;
588
+ }
589
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FundRequest): FundRequest {
590
+ let message = target ?? this.create(), end = reader.pos + length;
591
+ while (reader.pos < end) {
592
+ let [fieldNo, wireType] = reader.tag();
593
+ switch (fieldNo) {
594
+ case /* string denom */ 1:
595
+ message.denom = reader.string();
596
+ break;
597
+ default:
598
+ let u = options.readUnknownField;
599
+ if (u === "throw")
600
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
601
+ let d = reader.skip(wireType);
602
+ if (u !== false)
603
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
604
+ }
605
+ }
606
+ return message;
607
+ }
608
+ internalBinaryWrite(message: FundRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
609
+ /* string denom = 1; */
610
+ if (message.denom !== "")
611
+ writer.tag(1, WireType.LengthDelimited).string(message.denom);
612
+ let u = options.writeUnknownFields;
613
+ if (u !== false)
614
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
615
+ return writer;
616
+ }
617
+ }
618
+ /**
619
+ * @generated MessageType for protobuf message injective_insurance_rpc.FundRequest
620
+ */
621
+ export const FundRequest = new FundRequest$Type();
622
+ // @generated message type with reflection information, may provide speed optimized methods
623
+ class FundResponse$Type extends MessageType<FundResponse> {
624
+ constructor() {
625
+ super("injective_insurance_rpc.FundResponse", [
626
+ { no: 1, name: "fund", kind: "message", T: () => InsuranceFund }
627
+ ]);
628
+ }
629
+ create(value?: PartialMessage<FundResponse>): FundResponse {
630
+ const message = globalThis.Object.create((this.messagePrototype!));
631
+ if (value !== undefined)
632
+ reflectionMergePartial<FundResponse>(this, message, value);
633
+ return message;
634
+ }
635
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FundResponse): FundResponse {
636
+ let message = target ?? this.create(), end = reader.pos + length;
637
+ while (reader.pos < end) {
638
+ let [fieldNo, wireType] = reader.tag();
639
+ switch (fieldNo) {
640
+ case /* injective_insurance_rpc.InsuranceFund fund */ 1:
641
+ message.fund = InsuranceFund.internalBinaryRead(reader, reader.uint32(), options, message.fund);
642
+ break;
643
+ default:
644
+ let u = options.readUnknownField;
645
+ if (u === "throw")
646
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
647
+ let d = reader.skip(wireType);
648
+ if (u !== false)
649
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
650
+ }
651
+ }
652
+ return message;
653
+ }
654
+ internalBinaryWrite(message: FundResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
655
+ /* injective_insurance_rpc.InsuranceFund fund = 1; */
656
+ if (message.fund)
657
+ InsuranceFund.internalBinaryWrite(message.fund, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
658
+ let u = options.writeUnknownFields;
659
+ if (u !== false)
660
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
661
+ return writer;
662
+ }
663
+ }
664
+ /**
665
+ * @generated MessageType for protobuf message injective_insurance_rpc.FundResponse
666
+ */
667
+ export const FundResponse = new FundResponse$Type();
668
+ // @generated message type with reflection information, may provide speed optimized methods
669
+ class RedemptionsRequest$Type extends MessageType<RedemptionsRequest> {
670
+ constructor() {
671
+ super("injective_insurance_rpc.RedemptionsRequest", [
672
+ { no: 1, name: "redeemer", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
673
+ { no: 2, name: "redemption_denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
674
+ { no: 3, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
675
+ ]);
676
+ }
677
+ create(value?: PartialMessage<RedemptionsRequest>): RedemptionsRequest {
678
+ const message = globalThis.Object.create((this.messagePrototype!));
679
+ message.redeemer = "";
680
+ message.redemptionDenom = "";
681
+ message.status = "";
682
+ if (value !== undefined)
683
+ reflectionMergePartial<RedemptionsRequest>(this, message, value);
684
+ return message;
685
+ }
686
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RedemptionsRequest): RedemptionsRequest {
687
+ let message = target ?? this.create(), end = reader.pos + length;
688
+ while (reader.pos < end) {
689
+ let [fieldNo, wireType] = reader.tag();
690
+ switch (fieldNo) {
691
+ case /* string redeemer */ 1:
692
+ message.redeemer = reader.string();
693
+ break;
694
+ case /* string redemption_denom */ 2:
695
+ message.redemptionDenom = reader.string();
696
+ break;
697
+ case /* string status */ 3:
698
+ message.status = reader.string();
699
+ break;
700
+ default:
701
+ let u = options.readUnknownField;
702
+ if (u === "throw")
703
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
704
+ let d = reader.skip(wireType);
705
+ if (u !== false)
706
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
707
+ }
708
+ }
709
+ return message;
710
+ }
711
+ internalBinaryWrite(message: RedemptionsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
712
+ /* string redeemer = 1; */
713
+ if (message.redeemer !== "")
714
+ writer.tag(1, WireType.LengthDelimited).string(message.redeemer);
715
+ /* string redemption_denom = 2; */
716
+ if (message.redemptionDenom !== "")
717
+ writer.tag(2, WireType.LengthDelimited).string(message.redemptionDenom);
718
+ /* string status = 3; */
719
+ if (message.status !== "")
720
+ writer.tag(3, WireType.LengthDelimited).string(message.status);
721
+ let u = options.writeUnknownFields;
722
+ if (u !== false)
723
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
724
+ return writer;
725
+ }
726
+ }
727
+ /**
728
+ * @generated MessageType for protobuf message injective_insurance_rpc.RedemptionsRequest
729
+ */
730
+ export const RedemptionsRequest = new RedemptionsRequest$Type();
731
+ // @generated message type with reflection information, may provide speed optimized methods
732
+ class RedemptionsResponse$Type extends MessageType<RedemptionsResponse> {
733
+ constructor() {
734
+ super("injective_insurance_rpc.RedemptionsResponse", [
735
+ { no: 1, name: "redemption_schedules", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RedemptionSchedule }
736
+ ]);
737
+ }
738
+ create(value?: PartialMessage<RedemptionsResponse>): RedemptionsResponse {
739
+ const message = globalThis.Object.create((this.messagePrototype!));
740
+ message.redemptionSchedules = [];
741
+ if (value !== undefined)
742
+ reflectionMergePartial<RedemptionsResponse>(this, message, value);
743
+ return message;
744
+ }
745
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RedemptionsResponse): RedemptionsResponse {
746
+ let message = target ?? this.create(), end = reader.pos + length;
747
+ while (reader.pos < end) {
748
+ let [fieldNo, wireType] = reader.tag();
749
+ switch (fieldNo) {
750
+ case /* repeated injective_insurance_rpc.RedemptionSchedule redemption_schedules */ 1:
751
+ message.redemptionSchedules.push(RedemptionSchedule.internalBinaryRead(reader, reader.uint32(), options));
752
+ break;
753
+ default:
754
+ let u = options.readUnknownField;
755
+ if (u === "throw")
756
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
757
+ let d = reader.skip(wireType);
758
+ if (u !== false)
759
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
760
+ }
761
+ }
762
+ return message;
763
+ }
764
+ internalBinaryWrite(message: RedemptionsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
765
+ /* repeated injective_insurance_rpc.RedemptionSchedule redemption_schedules = 1; */
766
+ for (let i = 0; i < message.redemptionSchedules.length; i++)
767
+ RedemptionSchedule.internalBinaryWrite(message.redemptionSchedules[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
768
+ let u = options.writeUnknownFields;
769
+ if (u !== false)
770
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
771
+ return writer;
772
+ }
773
+ }
774
+ /**
775
+ * @generated MessageType for protobuf message injective_insurance_rpc.RedemptionsResponse
776
+ */
777
+ export const RedemptionsResponse = new RedemptionsResponse$Type();
778
+ // @generated message type with reflection information, may provide speed optimized methods
779
+ class RedemptionSchedule$Type extends MessageType<RedemptionSchedule> {
780
+ constructor() {
781
+ super("injective_insurance_rpc.RedemptionSchedule", [
782
+ { no: 1, name: "redemption_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
783
+ { no: 2, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
784
+ { no: 3, name: "redeemer", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
785
+ { no: 4, name: "claimable_redemption_time", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
786
+ { no: 5, name: "redemption_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
787
+ { no: 6, name: "redemption_denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
788
+ { no: 7, name: "requested_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
789
+ { no: 8, name: "disbursed_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
790
+ { no: 9, name: "disbursed_denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
791
+ { no: 10, name: "disbursed_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
792
+ ]);
793
+ }
794
+ create(value?: PartialMessage<RedemptionSchedule>): RedemptionSchedule {
795
+ const message = globalThis.Object.create((this.messagePrototype!));
796
+ message.redemptionId = 0n;
797
+ message.status = "";
798
+ message.redeemer = "";
799
+ message.claimableRedemptionTime = 0n;
800
+ message.redemptionAmount = "";
801
+ message.redemptionDenom = "";
802
+ message.requestedAt = 0n;
803
+ message.disbursedAmount = "";
804
+ message.disbursedDenom = "";
805
+ message.disbursedAt = 0n;
806
+ if (value !== undefined)
807
+ reflectionMergePartial<RedemptionSchedule>(this, message, value);
808
+ return message;
809
+ }
810
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RedemptionSchedule): RedemptionSchedule {
811
+ let message = target ?? this.create(), end = reader.pos + length;
812
+ while (reader.pos < end) {
813
+ let [fieldNo, wireType] = reader.tag();
814
+ switch (fieldNo) {
815
+ case /* uint64 redemption_id */ 1:
816
+ message.redemptionId = reader.uint64().toBigInt();
817
+ break;
818
+ case /* string status */ 2:
819
+ message.status = reader.string();
820
+ break;
821
+ case /* string redeemer */ 3:
822
+ message.redeemer = reader.string();
823
+ break;
824
+ case /* sint64 claimable_redemption_time */ 4:
825
+ message.claimableRedemptionTime = reader.sint64().toBigInt();
826
+ break;
827
+ case /* string redemption_amount */ 5:
828
+ message.redemptionAmount = reader.string();
829
+ break;
830
+ case /* string redemption_denom */ 6:
831
+ message.redemptionDenom = reader.string();
832
+ break;
833
+ case /* sint64 requested_at */ 7:
834
+ message.requestedAt = reader.sint64().toBigInt();
835
+ break;
836
+ case /* string disbursed_amount */ 8:
837
+ message.disbursedAmount = reader.string();
838
+ break;
839
+ case /* string disbursed_denom */ 9:
840
+ message.disbursedDenom = reader.string();
841
+ break;
842
+ case /* sint64 disbursed_at */ 10:
843
+ message.disbursedAt = reader.sint64().toBigInt();
844
+ break;
845
+ default:
846
+ let u = options.readUnknownField;
847
+ if (u === "throw")
848
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
849
+ let d = reader.skip(wireType);
850
+ if (u !== false)
851
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
852
+ }
853
+ }
854
+ return message;
855
+ }
856
+ internalBinaryWrite(message: RedemptionSchedule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
857
+ /* uint64 redemption_id = 1; */
858
+ if (message.redemptionId !== 0n)
859
+ writer.tag(1, WireType.Varint).uint64(message.redemptionId);
860
+ /* string status = 2; */
861
+ if (message.status !== "")
862
+ writer.tag(2, WireType.LengthDelimited).string(message.status);
863
+ /* string redeemer = 3; */
864
+ if (message.redeemer !== "")
865
+ writer.tag(3, WireType.LengthDelimited).string(message.redeemer);
866
+ /* sint64 claimable_redemption_time = 4; */
867
+ if (message.claimableRedemptionTime !== 0n)
868
+ writer.tag(4, WireType.Varint).sint64(message.claimableRedemptionTime);
869
+ /* string redemption_amount = 5; */
870
+ if (message.redemptionAmount !== "")
871
+ writer.tag(5, WireType.LengthDelimited).string(message.redemptionAmount);
872
+ /* string redemption_denom = 6; */
873
+ if (message.redemptionDenom !== "")
874
+ writer.tag(6, WireType.LengthDelimited).string(message.redemptionDenom);
875
+ /* sint64 requested_at = 7; */
876
+ if (message.requestedAt !== 0n)
877
+ writer.tag(7, WireType.Varint).sint64(message.requestedAt);
878
+ /* string disbursed_amount = 8; */
879
+ if (message.disbursedAmount !== "")
880
+ writer.tag(8, WireType.LengthDelimited).string(message.disbursedAmount);
881
+ /* string disbursed_denom = 9; */
882
+ if (message.disbursedDenom !== "")
883
+ writer.tag(9, WireType.LengthDelimited).string(message.disbursedDenom);
884
+ /* sint64 disbursed_at = 10; */
885
+ if (message.disbursedAt !== 0n)
886
+ writer.tag(10, WireType.Varint).sint64(message.disbursedAt);
887
+ let u = options.writeUnknownFields;
888
+ if (u !== false)
889
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
890
+ return writer;
891
+ }
892
+ }
893
+ /**
894
+ * @generated MessageType for protobuf message injective_insurance_rpc.RedemptionSchedule
895
+ */
896
+ export const RedemptionSchedule = new RedemptionSchedule$Type();
897
+ /**
898
+ * @generated ServiceType for protobuf service injective_insurance_rpc.InjectiveInsuranceRPC
899
+ */
900
+ export const InjectiveInsuranceRPC = new ServiceType("injective_insurance_rpc.InjectiveInsuranceRPC", [
901
+ { name: "Funds", options: {}, I: FundsRequest, O: FundsResponse },
902
+ { name: "Fund", options: {}, I: FundRequest, O: FundResponse },
903
+ { name: "Redemptions", options: {}, I: RedemptionsRequest, O: RedemptionsResponse }
904
+ ]);