@sentio/protos 2.34.1 → 2.35.0-rc.2

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 (36) hide show
  1. package/lib/chainquery/protos/chainquery.d.ts +2 -2
  2. package/lib/chainquery/protos/chainquery.d.ts.map +1 -1
  3. package/lib/chainquery/protos/chainquery.js +588 -275
  4. package/lib/chainquery/protos/chainquery.js.map +1 -1
  5. package/lib/google/protobuf/empty.d.ts +2 -2
  6. package/lib/google/protobuf/empty.d.ts.map +1 -1
  7. package/lib/google/protobuf/empty.js +5 -4
  8. package/lib/google/protobuf/empty.js.map +1 -1
  9. package/lib/google/protobuf/struct.d.ts +2 -2
  10. package/lib/google/protobuf/struct.d.ts.map +1 -1
  11. package/lib/google/protobuf/struct.js +109 -57
  12. package/lib/google/protobuf/struct.js.map +1 -1
  13. package/lib/google/protobuf/timestamp.d.ts +2 -2
  14. package/lib/google/protobuf/timestamp.d.ts.map +1 -1
  15. package/lib/google/protobuf/timestamp.js +23 -9
  16. package/lib/google/protobuf/timestamp.js.map +1 -1
  17. package/lib/processor/protos/processor.d.ts +28 -2
  18. package/lib/processor/protos/processor.d.ts.map +1 -1
  19. package/lib/processor/protos/processor.js +2253 -1102
  20. package/lib/processor/protos/processor.js.map +1 -1
  21. package/lib/service/common/protos/common.d.ts +18 -2
  22. package/lib/service/common/protos/common.d.ts.map +1 -1
  23. package/lib/service/common/protos/common.js +3498 -1588
  24. package/lib/service/common/protos/common.js.map +1 -1
  25. package/lib/service/price/protos/price.d.ts +27 -7
  26. package/lib/service/price/protos/price.d.ts.map +1 -1
  27. package/lib/service/price/protos/price.js +547 -214
  28. package/lib/service/price/protos/price.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/chainquery/protos/chainquery.ts +666 -294
  31. package/src/google/protobuf/empty.ts +8 -7
  32. package/src/google/protobuf/struct.ts +123 -62
  33. package/src/google/protobuf/timestamp.ts +28 -12
  34. package/src/processor/protos/processor.ts +2565 -1175
  35. package/src/service/common/protos/common.ts +3916 -1671
  36. package/src/service/price/protos/price.ts +594 -227
@@ -107,45 +107,56 @@ export const CoinID = {
107
107
  },
108
108
 
109
109
  decode(input: _m0.Reader | Uint8Array, length?: number): CoinID {
110
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
110
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
111
111
  let end = length === undefined ? reader.len : reader.pos + length;
112
112
  const message = createBaseCoinID();
113
113
  while (reader.pos < end) {
114
114
  const tag = reader.uint32();
115
115
  switch (tag >>> 3) {
116
116
  case 2:
117
+ if (tag !== 18) {
118
+ break;
119
+ }
120
+
117
121
  message.symbol = reader.string();
118
- break;
122
+ continue;
119
123
  case 3:
124
+ if (tag !== 26) {
125
+ break;
126
+ }
127
+
120
128
  message.address = CoinID_AddressIdentifier.decode(reader, reader.uint32());
121
- break;
122
- default:
123
- reader.skipType(tag & 7);
124
- break;
129
+ continue;
125
130
  }
131
+ if ((tag & 7) === 4 || tag === 0) {
132
+ break;
133
+ }
134
+ reader.skipType(tag & 7);
126
135
  }
127
136
  return message;
128
137
  },
129
138
 
130
139
  fromJSON(object: any): CoinID {
131
140
  return {
132
- symbol: isSet(object.symbol) ? String(object.symbol) : undefined,
141
+ symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : undefined,
133
142
  address: isSet(object.address) ? CoinID_AddressIdentifier.fromJSON(object.address) : undefined,
134
143
  };
135
144
  },
136
145
 
137
146
  toJSON(message: CoinID): unknown {
138
147
  const obj: any = {};
139
- message.symbol !== undefined && (obj.symbol = message.symbol);
140
- message.address !== undefined &&
141
- (obj.address = message.address ? CoinID_AddressIdentifier.toJSON(message.address) : undefined);
148
+ if (message.symbol !== undefined) {
149
+ obj.symbol = message.symbol;
150
+ }
151
+ if (message.address !== undefined) {
152
+ obj.address = CoinID_AddressIdentifier.toJSON(message.address);
153
+ }
142
154
  return obj;
143
155
  },
144
156
 
145
157
  create(base?: DeepPartial<CoinID>): CoinID {
146
158
  return CoinID.fromPartial(base ?? {});
147
159
  },
148
-
149
160
  fromPartial(object: DeepPartial<CoinID>): CoinID {
150
161
  const message = createBaseCoinID();
151
162
  message.symbol = object.symbol ?? undefined;
@@ -172,44 +183,56 @@ export const CoinID_AddressIdentifier = {
172
183
  },
173
184
 
174
185
  decode(input: _m0.Reader | Uint8Array, length?: number): CoinID_AddressIdentifier {
175
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
186
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
176
187
  let end = length === undefined ? reader.len : reader.pos + length;
177
188
  const message = createBaseCoinID_AddressIdentifier();
178
189
  while (reader.pos < end) {
179
190
  const tag = reader.uint32();
180
191
  switch (tag >>> 3) {
181
192
  case 1:
193
+ if (tag !== 10) {
194
+ break;
195
+ }
196
+
182
197
  message.address = reader.string();
183
- break;
198
+ continue;
184
199
  case 2:
200
+ if (tag !== 18) {
201
+ break;
202
+ }
203
+
185
204
  message.chain = reader.string();
186
- break;
187
- default:
188
- reader.skipType(tag & 7);
189
- break;
205
+ continue;
206
+ }
207
+ if ((tag & 7) === 4 || tag === 0) {
208
+ break;
190
209
  }
210
+ reader.skipType(tag & 7);
191
211
  }
192
212
  return message;
193
213
  },
194
214
 
195
215
  fromJSON(object: any): CoinID_AddressIdentifier {
196
216
  return {
197
- address: isSet(object.address) ? String(object.address) : "",
198
- chain: isSet(object.chain) ? String(object.chain) : "",
217
+ address: isSet(object.address) ? globalThis.String(object.address) : "",
218
+ chain: isSet(object.chain) ? globalThis.String(object.chain) : "",
199
219
  };
200
220
  },
201
221
 
202
222
  toJSON(message: CoinID_AddressIdentifier): unknown {
203
223
  const obj: any = {};
204
- message.address !== undefined && (obj.address = message.address);
205
- message.chain !== undefined && (obj.chain = message.chain);
224
+ if (message.address !== "") {
225
+ obj.address = message.address;
226
+ }
227
+ if (message.chain !== "") {
228
+ obj.chain = message.chain;
229
+ }
206
230
  return obj;
207
231
  },
208
232
 
209
233
  create(base?: DeepPartial<CoinID_AddressIdentifier>): CoinID_AddressIdentifier {
210
234
  return CoinID_AddressIdentifier.fromPartial(base ?? {});
211
235
  },
212
-
213
236
  fromPartial(object: DeepPartial<CoinID_AddressIdentifier>): CoinID_AddressIdentifier {
214
237
  const message = createBaseCoinID_AddressIdentifier();
215
238
  message.address = object.address ?? "";
@@ -237,25 +260,38 @@ export const GetPriceRequest = {
237
260
  },
238
261
 
239
262
  decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceRequest {
240
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
263
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
241
264
  let end = length === undefined ? reader.len : reader.pos + length;
242
265
  const message = createBaseGetPriceRequest();
243
266
  while (reader.pos < end) {
244
267
  const tag = reader.uint32();
245
268
  switch (tag >>> 3) {
246
269
  case 1:
270
+ if (tag !== 10) {
271
+ break;
272
+ }
273
+
247
274
  message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
248
- break;
275
+ continue;
249
276
  case 2:
277
+ if (tag !== 18) {
278
+ break;
279
+ }
280
+
250
281
  message.coinId = CoinID.decode(reader, reader.uint32());
251
- break;
282
+ continue;
252
283
  case 3:
284
+ if (tag !== 26) {
285
+ break;
286
+ }
287
+
253
288
  message.source = reader.string();
254
- break;
255
- default:
256
- reader.skipType(tag & 7);
257
- break;
289
+ continue;
290
+ }
291
+ if ((tag & 7) === 4 || tag === 0) {
292
+ break;
258
293
  }
294
+ reader.skipType(tag & 7);
259
295
  }
260
296
  return message;
261
297
  },
@@ -264,22 +300,27 @@ export const GetPriceRequest = {
264
300
  return {
265
301
  timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
266
302
  coinId: isSet(object.coinId) ? CoinID.fromJSON(object.coinId) : undefined,
267
- source: isSet(object.source) ? String(object.source) : "",
303
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
268
304
  };
269
305
  },
270
306
 
271
307
  toJSON(message: GetPriceRequest): unknown {
272
308
  const obj: any = {};
273
- message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
274
- message.coinId !== undefined && (obj.coinId = message.coinId ? CoinID.toJSON(message.coinId) : undefined);
275
- message.source !== undefined && (obj.source = message.source);
309
+ if (message.timestamp !== undefined) {
310
+ obj.timestamp = message.timestamp.toISOString();
311
+ }
312
+ if (message.coinId !== undefined) {
313
+ obj.coinId = CoinID.toJSON(message.coinId);
314
+ }
315
+ if (message.source !== "") {
316
+ obj.source = message.source;
317
+ }
276
318
  return obj;
277
319
  },
278
320
 
279
321
  create(base?: DeepPartial<GetPriceRequest>): GetPriceRequest {
280
322
  return GetPriceRequest.fromPartial(base ?? {});
281
323
  },
282
-
283
324
  fromPartial(object: DeepPartial<GetPriceRequest>): GetPriceRequest {
284
325
  const message = createBaseGetPriceRequest();
285
326
  message.timestamp = object.timestamp ?? undefined;
@@ -307,44 +348,56 @@ export const GetPriceResponse = {
307
348
  },
308
349
 
309
350
  decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceResponse {
310
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
351
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
311
352
  let end = length === undefined ? reader.len : reader.pos + length;
312
353
  const message = createBaseGetPriceResponse();
313
354
  while (reader.pos < end) {
314
355
  const tag = reader.uint32();
315
356
  switch (tag >>> 3) {
316
357
  case 1:
358
+ if (tag !== 9) {
359
+ break;
360
+ }
361
+
317
362
  message.price = reader.double();
318
- break;
363
+ continue;
319
364
  case 2:
365
+ if (tag !== 18) {
366
+ break;
367
+ }
368
+
320
369
  message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
321
- break;
322
- default:
323
- reader.skipType(tag & 7);
324
- break;
370
+ continue;
371
+ }
372
+ if ((tag & 7) === 4 || tag === 0) {
373
+ break;
325
374
  }
375
+ reader.skipType(tag & 7);
326
376
  }
327
377
  return message;
328
378
  },
329
379
 
330
380
  fromJSON(object: any): GetPriceResponse {
331
381
  return {
332
- price: isSet(object.price) ? Number(object.price) : 0,
382
+ price: isSet(object.price) ? globalThis.Number(object.price) : 0,
333
383
  timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
334
384
  };
335
385
  },
336
386
 
337
387
  toJSON(message: GetPriceResponse): unknown {
338
388
  const obj: any = {};
339
- message.price !== undefined && (obj.price = message.price);
340
- message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
389
+ if (message.price !== 0) {
390
+ obj.price = message.price;
391
+ }
392
+ if (message.timestamp !== undefined) {
393
+ obj.timestamp = message.timestamp.toISOString();
394
+ }
341
395
  return obj;
342
396
  },
343
397
 
344
398
  create(base?: DeepPartial<GetPriceResponse>): GetPriceResponse {
345
399
  return GetPriceResponse.fromPartial(base ?? {});
346
400
  },
347
-
348
401
  fromPartial(object: DeepPartial<GetPriceResponse>): GetPriceResponse {
349
402
  const message = createBaseGetPriceResponse();
350
403
  message.price = object.price ?? 0;
@@ -369,44 +422,51 @@ export const BatchGetPricesRequest = {
369
422
  },
370
423
 
371
424
  decode(input: _m0.Reader | Uint8Array, length?: number): BatchGetPricesRequest {
372
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
425
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
373
426
  let end = length === undefined ? reader.len : reader.pos + length;
374
427
  const message = createBaseBatchGetPricesRequest();
375
428
  while (reader.pos < end) {
376
429
  const tag = reader.uint32();
377
430
  switch (tag >>> 3) {
378
431
  case 1:
432
+ if (tag !== 10) {
433
+ break;
434
+ }
435
+
379
436
  message.timestamps.push(fromTimestamp(Timestamp.decode(reader, reader.uint32())));
380
- break;
437
+ continue;
381
438
  case 2:
439
+ if (tag !== 18) {
440
+ break;
441
+ }
442
+
382
443
  message.coinIds.push(CoinID.decode(reader, reader.uint32()));
383
- break;
384
- default:
385
- reader.skipType(tag & 7);
386
- break;
444
+ continue;
445
+ }
446
+ if ((tag & 7) === 4 || tag === 0) {
447
+ break;
387
448
  }
449
+ reader.skipType(tag & 7);
388
450
  }
389
451
  return message;
390
452
  },
391
453
 
392
454
  fromJSON(object: any): BatchGetPricesRequest {
393
455
  return {
394
- timestamps: Array.isArray(object?.timestamps) ? object.timestamps.map((e: any) => fromJsonTimestamp(e)) : [],
395
- coinIds: Array.isArray(object?.coinIds) ? object.coinIds.map((e: any) => CoinID.fromJSON(e)) : [],
456
+ timestamps: globalThis.Array.isArray(object?.timestamps)
457
+ ? object.timestamps.map((e: any) => fromJsonTimestamp(e))
458
+ : [],
459
+ coinIds: globalThis.Array.isArray(object?.coinIds) ? object.coinIds.map((e: any) => CoinID.fromJSON(e)) : [],
396
460
  };
397
461
  },
398
462
 
399
463
  toJSON(message: BatchGetPricesRequest): unknown {
400
464
  const obj: any = {};
401
- if (message.timestamps) {
465
+ if (message.timestamps?.length) {
402
466
  obj.timestamps = message.timestamps.map((e) => e.toISOString());
403
- } else {
404
- obj.timestamps = [];
405
467
  }
406
- if (message.coinIds) {
407
- obj.coinIds = message.coinIds.map((e) => e ? CoinID.toJSON(e) : undefined);
408
- } else {
409
- obj.coinIds = [];
468
+ if (message.coinIds?.length) {
469
+ obj.coinIds = message.coinIds.map((e) => CoinID.toJSON(e));
410
470
  }
411
471
  return obj;
412
472
  },
@@ -414,7 +474,6 @@ export const BatchGetPricesRequest = {
414
474
  create(base?: DeepPartial<BatchGetPricesRequest>): BatchGetPricesRequest {
415
475
  return BatchGetPricesRequest.fromPartial(base ?? {});
416
476
  },
417
-
418
477
  fromPartial(object: DeepPartial<BatchGetPricesRequest>): BatchGetPricesRequest {
419
478
  const message = createBaseBatchGetPricesRequest();
420
479
  message.timestamps = object.timestamps?.map((e) => e) || [];
@@ -436,26 +495,31 @@ export const BatchGetPricesResponse = {
436
495
  },
437
496
 
438
497
  decode(input: _m0.Reader | Uint8Array, length?: number): BatchGetPricesResponse {
439
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
498
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
440
499
  let end = length === undefined ? reader.len : reader.pos + length;
441
500
  const message = createBaseBatchGetPricesResponse();
442
501
  while (reader.pos < end) {
443
502
  const tag = reader.uint32();
444
503
  switch (tag >>> 3) {
445
504
  case 1:
505
+ if (tag !== 10) {
506
+ break;
507
+ }
508
+
446
509
  message.prices.push(BatchGetPricesResponse_CoinPrice.decode(reader, reader.uint32()));
447
- break;
448
- default:
449
- reader.skipType(tag & 7);
450
- break;
510
+ continue;
511
+ }
512
+ if ((tag & 7) === 4 || tag === 0) {
513
+ break;
451
514
  }
515
+ reader.skipType(tag & 7);
452
516
  }
453
517
  return message;
454
518
  },
455
519
 
456
520
  fromJSON(object: any): BatchGetPricesResponse {
457
521
  return {
458
- prices: Array.isArray(object?.prices)
522
+ prices: globalThis.Array.isArray(object?.prices)
459
523
  ? object.prices.map((e: any) => BatchGetPricesResponse_CoinPrice.fromJSON(e))
460
524
  : [],
461
525
  };
@@ -463,10 +527,8 @@ export const BatchGetPricesResponse = {
463
527
 
464
528
  toJSON(message: BatchGetPricesResponse): unknown {
465
529
  const obj: any = {};
466
- if (message.prices) {
467
- obj.prices = message.prices.map((e) => e ? BatchGetPricesResponse_CoinPrice.toJSON(e) : undefined);
468
- } else {
469
- obj.prices = [];
530
+ if (message.prices?.length) {
531
+ obj.prices = message.prices.map((e) => BatchGetPricesResponse_CoinPrice.toJSON(e));
470
532
  }
471
533
  return obj;
472
534
  },
@@ -474,7 +536,6 @@ export const BatchGetPricesResponse = {
474
536
  create(base?: DeepPartial<BatchGetPricesResponse>): BatchGetPricesResponse {
475
537
  return BatchGetPricesResponse.fromPartial(base ?? {});
476
538
  },
477
-
478
539
  fromPartial(object: DeepPartial<BatchGetPricesResponse>): BatchGetPricesResponse {
479
540
  const message = createBaseBatchGetPricesResponse();
480
541
  message.prices = object.prices?.map((e) => BatchGetPricesResponse_CoinPrice.fromPartial(e)) || [];
@@ -501,25 +562,38 @@ export const BatchGetPricesResponse_CoinPrice = {
501
562
  },
502
563
 
503
564
  decode(input: _m0.Reader | Uint8Array, length?: number): BatchGetPricesResponse_CoinPrice {
504
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
565
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
505
566
  let end = length === undefined ? reader.len : reader.pos + length;
506
567
  const message = createBaseBatchGetPricesResponse_CoinPrice();
507
568
  while (reader.pos < end) {
508
569
  const tag = reader.uint32();
509
570
  switch (tag >>> 3) {
510
571
  case 1:
572
+ if (tag !== 10) {
573
+ break;
574
+ }
575
+
511
576
  message.coinId = CoinID.decode(reader, reader.uint32());
512
- break;
577
+ continue;
513
578
  case 2:
579
+ if (tag !== 18) {
580
+ break;
581
+ }
582
+
514
583
  message.price = BatchGetPricesResponse_CoinPrice_Price.decode(reader, reader.uint32());
515
- break;
584
+ continue;
516
585
  case 3:
586
+ if (tag !== 26) {
587
+ break;
588
+ }
589
+
517
590
  message.error = reader.string();
518
- break;
519
- default:
520
- reader.skipType(tag & 7);
521
- break;
591
+ continue;
522
592
  }
593
+ if ((tag & 7) === 4 || tag === 0) {
594
+ break;
595
+ }
596
+ reader.skipType(tag & 7);
523
597
  }
524
598
  return message;
525
599
  },
@@ -528,23 +602,27 @@ export const BatchGetPricesResponse_CoinPrice = {
528
602
  return {
529
603
  coinId: isSet(object.coinId) ? CoinID.fromJSON(object.coinId) : undefined,
530
604
  price: isSet(object.price) ? BatchGetPricesResponse_CoinPrice_Price.fromJSON(object.price) : undefined,
531
- error: isSet(object.error) ? String(object.error) : undefined,
605
+ error: isSet(object.error) ? globalThis.String(object.error) : undefined,
532
606
  };
533
607
  },
534
608
 
535
609
  toJSON(message: BatchGetPricesResponse_CoinPrice): unknown {
536
610
  const obj: any = {};
537
- message.coinId !== undefined && (obj.coinId = message.coinId ? CoinID.toJSON(message.coinId) : undefined);
538
- message.price !== undefined &&
539
- (obj.price = message.price ? BatchGetPricesResponse_CoinPrice_Price.toJSON(message.price) : undefined);
540
- message.error !== undefined && (obj.error = message.error);
611
+ if (message.coinId !== undefined) {
612
+ obj.coinId = CoinID.toJSON(message.coinId);
613
+ }
614
+ if (message.price !== undefined) {
615
+ obj.price = BatchGetPricesResponse_CoinPrice_Price.toJSON(message.price);
616
+ }
617
+ if (message.error !== undefined) {
618
+ obj.error = message.error;
619
+ }
541
620
  return obj;
542
621
  },
543
622
 
544
623
  create(base?: DeepPartial<BatchGetPricesResponse_CoinPrice>): BatchGetPricesResponse_CoinPrice {
545
624
  return BatchGetPricesResponse_CoinPrice.fromPartial(base ?? {});
546
625
  },
547
-
548
626
  fromPartial(object: DeepPartial<BatchGetPricesResponse_CoinPrice>): BatchGetPricesResponse_CoinPrice {
549
627
  const message = createBaseBatchGetPricesResponse_CoinPrice();
550
628
  message.coinId = (object.coinId !== undefined && object.coinId !== null)
@@ -571,35 +649,40 @@ export const BatchGetPricesResponse_CoinPrice_Price = {
571
649
  },
572
650
 
573
651
  decode(input: _m0.Reader | Uint8Array, length?: number): BatchGetPricesResponse_CoinPrice_Price {
574
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
652
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
575
653
  let end = length === undefined ? reader.len : reader.pos + length;
576
654
  const message = createBaseBatchGetPricesResponse_CoinPrice_Price();
577
655
  while (reader.pos < end) {
578
656
  const tag = reader.uint32();
579
657
  switch (tag >>> 3) {
580
658
  case 1:
659
+ if (tag !== 10) {
660
+ break;
661
+ }
662
+
581
663
  message.results.push(GetPriceResponse.decode(reader, reader.uint32()));
582
- break;
583
- default:
584
- reader.skipType(tag & 7);
585
- break;
664
+ continue;
665
+ }
666
+ if ((tag & 7) === 4 || tag === 0) {
667
+ break;
586
668
  }
669
+ reader.skipType(tag & 7);
587
670
  }
588
671
  return message;
589
672
  },
590
673
 
591
674
  fromJSON(object: any): BatchGetPricesResponse_CoinPrice_Price {
592
675
  return {
593
- results: Array.isArray(object?.results) ? object.results.map((e: any) => GetPriceResponse.fromJSON(e)) : [],
676
+ results: globalThis.Array.isArray(object?.results)
677
+ ? object.results.map((e: any) => GetPriceResponse.fromJSON(e))
678
+ : [],
594
679
  };
595
680
  },
596
681
 
597
682
  toJSON(message: BatchGetPricesResponse_CoinPrice_Price): unknown {
598
683
  const obj: any = {};
599
- if (message.results) {
600
- obj.results = message.results.map((e) => e ? GetPriceResponse.toJSON(e) : undefined);
601
- } else {
602
- obj.results = [];
684
+ if (message.results?.length) {
685
+ obj.results = message.results.map((e) => GetPriceResponse.toJSON(e));
603
686
  }
604
687
  return obj;
605
688
  },
@@ -607,7 +690,6 @@ export const BatchGetPricesResponse_CoinPrice_Price = {
607
690
  create(base?: DeepPartial<BatchGetPricesResponse_CoinPrice_Price>): BatchGetPricesResponse_CoinPrice_Price {
608
691
  return BatchGetPricesResponse_CoinPrice_Price.fromPartial(base ?? {});
609
692
  },
610
-
611
693
  fromPartial(object: DeepPartial<BatchGetPricesResponse_CoinPrice_Price>): BatchGetPricesResponse_CoinPrice_Price {
612
694
  const message = createBaseBatchGetPricesResponse_CoinPrice_Price();
613
695
  message.results = object.results?.map((e) => GetPriceResponse.fromPartial(e)) || [];
@@ -637,54 +719,78 @@ export const ListCoinsRequest = {
637
719
  },
638
720
 
639
721
  decode(input: _m0.Reader | Uint8Array, length?: number): ListCoinsRequest {
640
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
722
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
641
723
  let end = length === undefined ? reader.len : reader.pos + length;
642
724
  const message = createBaseListCoinsRequest();
643
725
  while (reader.pos < end) {
644
726
  const tag = reader.uint32();
645
727
  switch (tag >>> 3) {
646
728
  case 1:
729
+ if (tag !== 8) {
730
+ break;
731
+ }
732
+
647
733
  message.limit = reader.int32();
648
- break;
734
+ continue;
649
735
  case 2:
736
+ if (tag !== 16) {
737
+ break;
738
+ }
739
+
650
740
  message.offset = reader.int32();
651
- break;
741
+ continue;
652
742
  case 3:
743
+ if (tag !== 26) {
744
+ break;
745
+ }
746
+
653
747
  message.searchQuery = reader.string();
654
- break;
748
+ continue;
655
749
  case 4:
750
+ if (tag !== 34) {
751
+ break;
752
+ }
753
+
656
754
  message.chain = reader.string();
657
- break;
658
- default:
659
- reader.skipType(tag & 7);
660
- break;
755
+ continue;
661
756
  }
757
+ if ((tag & 7) === 4 || tag === 0) {
758
+ break;
759
+ }
760
+ reader.skipType(tag & 7);
662
761
  }
663
762
  return message;
664
763
  },
665
764
 
666
765
  fromJSON(object: any): ListCoinsRequest {
667
766
  return {
668
- limit: isSet(object.limit) ? Number(object.limit) : 0,
669
- offset: isSet(object.offset) ? Number(object.offset) : 0,
670
- searchQuery: isSet(object.searchQuery) ? String(object.searchQuery) : "",
671
- chain: isSet(object.chain) ? String(object.chain) : "",
767
+ limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
768
+ offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
769
+ searchQuery: isSet(object.searchQuery) ? globalThis.String(object.searchQuery) : "",
770
+ chain: isSet(object.chain) ? globalThis.String(object.chain) : "",
672
771
  };
673
772
  },
674
773
 
675
774
  toJSON(message: ListCoinsRequest): unknown {
676
775
  const obj: any = {};
677
- message.limit !== undefined && (obj.limit = Math.round(message.limit));
678
- message.offset !== undefined && (obj.offset = Math.round(message.offset));
679
- message.searchQuery !== undefined && (obj.searchQuery = message.searchQuery);
680
- message.chain !== undefined && (obj.chain = message.chain);
776
+ if (message.limit !== 0) {
777
+ obj.limit = Math.round(message.limit);
778
+ }
779
+ if (message.offset !== 0) {
780
+ obj.offset = Math.round(message.offset);
781
+ }
782
+ if (message.searchQuery !== "") {
783
+ obj.searchQuery = message.searchQuery;
784
+ }
785
+ if (message.chain !== "") {
786
+ obj.chain = message.chain;
787
+ }
681
788
  return obj;
682
789
  },
683
790
 
684
791
  create(base?: DeepPartial<ListCoinsRequest>): ListCoinsRequest {
685
792
  return ListCoinsRequest.fromPartial(base ?? {});
686
793
  },
687
-
688
794
  fromPartial(object: DeepPartial<ListCoinsRequest>): ListCoinsRequest {
689
795
  const message = createBaseListCoinsRequest();
690
796
  message.limit = object.limit ?? 0;
@@ -711,32 +817,41 @@ export const ListCoinsResponse = {
711
817
  },
712
818
 
713
819
  decode(input: _m0.Reader | Uint8Array, length?: number): ListCoinsResponse {
714
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
820
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
715
821
  let end = length === undefined ? reader.len : reader.pos + length;
716
822
  const message = createBaseListCoinsResponse();
717
823
  while (reader.pos < end) {
718
824
  const tag = reader.uint32();
719
825
  switch (tag >>> 3) {
720
826
  case 1:
827
+ if (tag !== 10) {
828
+ break;
829
+ }
830
+
721
831
  message.coins.push(CoinID.decode(reader, reader.uint32()));
722
- break;
832
+ continue;
723
833
  case 2:
834
+ if (tag !== 18) {
835
+ break;
836
+ }
837
+
724
838
  const entry2 = ListCoinsResponse_CoinAddressesInChainEntry.decode(reader, reader.uint32());
725
839
  if (entry2.value !== undefined) {
726
840
  message.coinAddressesInChain[entry2.key] = entry2.value;
727
841
  }
728
- break;
729
- default:
730
- reader.skipType(tag & 7);
731
- break;
842
+ continue;
843
+ }
844
+ if ((tag & 7) === 4 || tag === 0) {
845
+ break;
732
846
  }
847
+ reader.skipType(tag & 7);
733
848
  }
734
849
  return message;
735
850
  },
736
851
 
737
852
  fromJSON(object: any): ListCoinsResponse {
738
853
  return {
739
- coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => CoinID.fromJSON(e)) : [],
854
+ coins: globalThis.Array.isArray(object?.coins) ? object.coins.map((e: any) => CoinID.fromJSON(e)) : [],
740
855
  coinAddressesInChain: isObject(object.coinAddressesInChain)
741
856
  ? Object.entries(object.coinAddressesInChain).reduce<{ [key: string]: CoinID }>((acc, [key, value]) => {
742
857
  acc[key] = CoinID.fromJSON(value);
@@ -748,16 +863,17 @@ export const ListCoinsResponse = {
748
863
 
749
864
  toJSON(message: ListCoinsResponse): unknown {
750
865
  const obj: any = {};
751
- if (message.coins) {
752
- obj.coins = message.coins.map((e) => e ? CoinID.toJSON(e) : undefined);
753
- } else {
754
- obj.coins = [];
866
+ if (message.coins?.length) {
867
+ obj.coins = message.coins.map((e) => CoinID.toJSON(e));
755
868
  }
756
- obj.coinAddressesInChain = {};
757
869
  if (message.coinAddressesInChain) {
758
- Object.entries(message.coinAddressesInChain).forEach(([k, v]) => {
759
- obj.coinAddressesInChain[k] = CoinID.toJSON(v);
760
- });
870
+ const entries = Object.entries(message.coinAddressesInChain);
871
+ if (entries.length > 0) {
872
+ obj.coinAddressesInChain = {};
873
+ entries.forEach(([k, v]) => {
874
+ obj.coinAddressesInChain[k] = CoinID.toJSON(v);
875
+ });
876
+ }
761
877
  }
762
878
  return obj;
763
879
  },
@@ -765,7 +881,6 @@ export const ListCoinsResponse = {
765
881
  create(base?: DeepPartial<ListCoinsResponse>): ListCoinsResponse {
766
882
  return ListCoinsResponse.fromPartial(base ?? {});
767
883
  },
768
-
769
884
  fromPartial(object: DeepPartial<ListCoinsResponse>): ListCoinsResponse {
770
885
  const message = createBaseListCoinsResponse();
771
886
  message.coins = object.coins?.map((e) => CoinID.fromPartial(e)) || [];
@@ -798,44 +913,56 @@ export const ListCoinsResponse_CoinAddressesInChainEntry = {
798
913
  },
799
914
 
800
915
  decode(input: _m0.Reader | Uint8Array, length?: number): ListCoinsResponse_CoinAddressesInChainEntry {
801
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
916
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
802
917
  let end = length === undefined ? reader.len : reader.pos + length;
803
918
  const message = createBaseListCoinsResponse_CoinAddressesInChainEntry();
804
919
  while (reader.pos < end) {
805
920
  const tag = reader.uint32();
806
921
  switch (tag >>> 3) {
807
922
  case 1:
923
+ if (tag !== 10) {
924
+ break;
925
+ }
926
+
808
927
  message.key = reader.string();
809
- break;
928
+ continue;
810
929
  case 2:
930
+ if (tag !== 18) {
931
+ break;
932
+ }
933
+
811
934
  message.value = CoinID.decode(reader, reader.uint32());
812
- break;
813
- default:
814
- reader.skipType(tag & 7);
815
- break;
935
+ continue;
816
936
  }
937
+ if ((tag & 7) === 4 || tag === 0) {
938
+ break;
939
+ }
940
+ reader.skipType(tag & 7);
817
941
  }
818
942
  return message;
819
943
  },
820
944
 
821
945
  fromJSON(object: any): ListCoinsResponse_CoinAddressesInChainEntry {
822
946
  return {
823
- key: isSet(object.key) ? String(object.key) : "",
947
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
824
948
  value: isSet(object.value) ? CoinID.fromJSON(object.value) : undefined,
825
949
  };
826
950
  },
827
951
 
828
952
  toJSON(message: ListCoinsResponse_CoinAddressesInChainEntry): unknown {
829
953
  const obj: any = {};
830
- message.key !== undefined && (obj.key = message.key);
831
- message.value !== undefined && (obj.value = message.value ? CoinID.toJSON(message.value) : undefined);
954
+ if (message.key !== "") {
955
+ obj.key = message.key;
956
+ }
957
+ if (message.value !== undefined) {
958
+ obj.value = CoinID.toJSON(message.value);
959
+ }
832
960
  return obj;
833
961
  },
834
962
 
835
963
  create(base?: DeepPartial<ListCoinsResponse_CoinAddressesInChainEntry>): ListCoinsResponse_CoinAddressesInChainEntry {
836
964
  return ListCoinsResponse_CoinAddressesInChainEntry.fromPartial(base ?? {});
837
965
  },
838
-
839
966
  fromPartial(
840
967
  object: DeepPartial<ListCoinsResponse_CoinAddressesInChainEntry>,
841
968
  ): ListCoinsResponse_CoinAddressesInChainEntry {
@@ -864,29 +991,38 @@ export const CheckLatestPriceResponse = {
864
991
  },
865
992
 
866
993
  decode(input: _m0.Reader | Uint8Array, length?: number): CheckLatestPriceResponse {
867
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
994
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
868
995
  let end = length === undefined ? reader.len : reader.pos + length;
869
996
  const message = createBaseCheckLatestPriceResponse();
870
997
  while (reader.pos < end) {
871
998
  const tag = reader.uint32();
872
999
  switch (tag >>> 3) {
873
1000
  case 1:
1001
+ if (tag !== 10) {
1002
+ break;
1003
+ }
1004
+
874
1005
  message.prices.push(CheckLatestPriceResponse_CoinPrice.decode(reader, reader.uint32()));
875
- break;
1006
+ continue;
876
1007
  case 2:
1008
+ if (tag !== 18) {
1009
+ break;
1010
+ }
1011
+
877
1012
  message.latestPrice = CheckLatestPriceResponse_CoinPrice.decode(reader, reader.uint32());
878
- break;
879
- default:
880
- reader.skipType(tag & 7);
881
- break;
1013
+ continue;
1014
+ }
1015
+ if ((tag & 7) === 4 || tag === 0) {
1016
+ break;
882
1017
  }
1018
+ reader.skipType(tag & 7);
883
1019
  }
884
1020
  return message;
885
1021
  },
886
1022
 
887
1023
  fromJSON(object: any): CheckLatestPriceResponse {
888
1024
  return {
889
- prices: Array.isArray(object?.prices)
1025
+ prices: globalThis.Array.isArray(object?.prices)
890
1026
  ? object.prices.map((e: any) => CheckLatestPriceResponse_CoinPrice.fromJSON(e))
891
1027
  : [],
892
1028
  latestPrice: isSet(object.latestPrice)
@@ -897,21 +1033,18 @@ export const CheckLatestPriceResponse = {
897
1033
 
898
1034
  toJSON(message: CheckLatestPriceResponse): unknown {
899
1035
  const obj: any = {};
900
- if (message.prices) {
901
- obj.prices = message.prices.map((e) => e ? CheckLatestPriceResponse_CoinPrice.toJSON(e) : undefined);
902
- } else {
903
- obj.prices = [];
904
- }
905
- message.latestPrice !== undefined && (obj.latestPrice = message.latestPrice
906
- ? CheckLatestPriceResponse_CoinPrice.toJSON(message.latestPrice)
907
- : undefined);
1036
+ if (message.prices?.length) {
1037
+ obj.prices = message.prices.map((e) => CheckLatestPriceResponse_CoinPrice.toJSON(e));
1038
+ }
1039
+ if (message.latestPrice !== undefined) {
1040
+ obj.latestPrice = CheckLatestPriceResponse_CoinPrice.toJSON(message.latestPrice);
1041
+ }
908
1042
  return obj;
909
1043
  },
910
1044
 
911
1045
  create(base?: DeepPartial<CheckLatestPriceResponse>): CheckLatestPriceResponse {
912
1046
  return CheckLatestPriceResponse.fromPartial(base ?? {});
913
1047
  },
914
-
915
1048
  fromPartial(object: DeepPartial<CheckLatestPriceResponse>): CheckLatestPriceResponse {
916
1049
  const message = createBaseCheckLatestPriceResponse();
917
1050
  message.prices = object.prices?.map((e) => CheckLatestPriceResponse_CoinPrice.fromPartial(e)) || [];
@@ -941,25 +1074,38 @@ export const CheckLatestPriceResponse_CoinPrice = {
941
1074
  },
942
1075
 
943
1076
  decode(input: _m0.Reader | Uint8Array, length?: number): CheckLatestPriceResponse_CoinPrice {
944
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1077
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
945
1078
  let end = length === undefined ? reader.len : reader.pos + length;
946
1079
  const message = createBaseCheckLatestPriceResponse_CoinPrice();
947
1080
  while (reader.pos < end) {
948
1081
  const tag = reader.uint32();
949
1082
  switch (tag >>> 3) {
950
1083
  case 1:
1084
+ if (tag !== 10) {
1085
+ break;
1086
+ }
1087
+
951
1088
  message.coinId = CoinID.decode(reader, reader.uint32());
952
- break;
1089
+ continue;
953
1090
  case 2:
1091
+ if (tag !== 17) {
1092
+ break;
1093
+ }
1094
+
954
1095
  message.price = reader.double();
955
- break;
1096
+ continue;
956
1097
  case 3:
1098
+ if (tag !== 26) {
1099
+ break;
1100
+ }
1101
+
957
1102
  message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
958
- break;
959
- default:
960
- reader.skipType(tag & 7);
961
- break;
1103
+ continue;
962
1104
  }
1105
+ if ((tag & 7) === 4 || tag === 0) {
1106
+ break;
1107
+ }
1108
+ reader.skipType(tag & 7);
963
1109
  }
964
1110
  return message;
965
1111
  },
@@ -967,23 +1113,28 @@ export const CheckLatestPriceResponse_CoinPrice = {
967
1113
  fromJSON(object: any): CheckLatestPriceResponse_CoinPrice {
968
1114
  return {
969
1115
  coinId: isSet(object.coinId) ? CoinID.fromJSON(object.coinId) : undefined,
970
- price: isSet(object.price) ? Number(object.price) : 0,
1116
+ price: isSet(object.price) ? globalThis.Number(object.price) : 0,
971
1117
  timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
972
1118
  };
973
1119
  },
974
1120
 
975
1121
  toJSON(message: CheckLatestPriceResponse_CoinPrice): unknown {
976
1122
  const obj: any = {};
977
- message.coinId !== undefined && (obj.coinId = message.coinId ? CoinID.toJSON(message.coinId) : undefined);
978
- message.price !== undefined && (obj.price = message.price);
979
- message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
1123
+ if (message.coinId !== undefined) {
1124
+ obj.coinId = CoinID.toJSON(message.coinId);
1125
+ }
1126
+ if (message.price !== 0) {
1127
+ obj.price = message.price;
1128
+ }
1129
+ if (message.timestamp !== undefined) {
1130
+ obj.timestamp = message.timestamp.toISOString();
1131
+ }
980
1132
  return obj;
981
1133
  },
982
1134
 
983
1135
  create(base?: DeepPartial<CheckLatestPriceResponse_CoinPrice>): CheckLatestPriceResponse_CoinPrice {
984
1136
  return CheckLatestPriceResponse_CoinPrice.fromPartial(base ?? {});
985
1137
  },
986
-
987
1138
  fromPartial(object: DeepPartial<CheckLatestPriceResponse_CoinPrice>): CheckLatestPriceResponse_CoinPrice {
988
1139
  const message = createBaseCheckLatestPriceResponse_CoinPrice();
989
1140
  message.coinId = (object.coinId !== undefined && object.coinId !== null)
@@ -1050,89 +1201,155 @@ export const BackfillCoinRequest = {
1050
1201
  },
1051
1202
 
1052
1203
  decode(input: _m0.Reader | Uint8Array, length?: number): BackfillCoinRequest {
1053
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1204
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1054
1205
  let end = length === undefined ? reader.len : reader.pos + length;
1055
1206
  const message = createBaseBackfillCoinRequest();
1056
1207
  while (reader.pos < end) {
1057
1208
  const tag = reader.uint32();
1058
1209
  switch (tag >>> 3) {
1059
1210
  case 1:
1211
+ if (tag !== 10) {
1212
+ break;
1213
+ }
1214
+
1060
1215
  message.name = reader.string();
1061
- break;
1216
+ continue;
1062
1217
  case 2:
1218
+ if (tag !== 18) {
1219
+ break;
1220
+ }
1221
+
1063
1222
  message.symbol = reader.string();
1064
- break;
1223
+ continue;
1065
1224
  case 3:
1225
+ if (tag !== 26) {
1226
+ break;
1227
+ }
1228
+
1066
1229
  message.chain = reader.string();
1067
- break;
1230
+ continue;
1068
1231
  case 4:
1232
+ if (tag !== 34) {
1233
+ break;
1234
+ }
1235
+
1069
1236
  message.address = reader.string();
1070
- break;
1237
+ continue;
1071
1238
  case 5:
1239
+ if (tag !== 42) {
1240
+ break;
1241
+ }
1242
+
1072
1243
  message.coingeckoId = reader.string();
1073
- break;
1244
+ continue;
1074
1245
  case 6:
1246
+ if (tag !== 48) {
1247
+ break;
1248
+ }
1249
+
1075
1250
  message.decimals = reader.uint32();
1076
- break;
1251
+ continue;
1077
1252
  case 7:
1253
+ if (tag !== 58) {
1254
+ break;
1255
+ }
1256
+
1078
1257
  message.logoUrl = reader.string();
1079
- break;
1258
+ continue;
1080
1259
  case 8:
1260
+ if (tag !== 66) {
1261
+ break;
1262
+ }
1263
+
1081
1264
  message.projectUrl = reader.string();
1082
- break;
1265
+ continue;
1083
1266
  case 9:
1267
+ if (tag !== 74) {
1268
+ break;
1269
+ }
1270
+
1084
1271
  message.accountAddress = reader.string();
1085
- break;
1272
+ continue;
1086
1273
  case 10:
1274
+ if (tag !== 82) {
1275
+ break;
1276
+ }
1277
+
1087
1278
  message.moduleName = reader.string();
1088
- break;
1279
+ continue;
1089
1280
  case 11:
1281
+ if (tag !== 90) {
1282
+ break;
1283
+ }
1284
+
1090
1285
  message.structName = reader.string();
1091
- break;
1092
- default:
1093
- reader.skipType(tag & 7);
1094
- break;
1286
+ continue;
1095
1287
  }
1288
+ if ((tag & 7) === 4 || tag === 0) {
1289
+ break;
1290
+ }
1291
+ reader.skipType(tag & 7);
1096
1292
  }
1097
1293
  return message;
1098
1294
  },
1099
1295
 
1100
1296
  fromJSON(object: any): BackfillCoinRequest {
1101
1297
  return {
1102
- name: isSet(object.name) ? String(object.name) : "",
1103
- symbol: isSet(object.symbol) ? String(object.symbol) : "",
1104
- chain: isSet(object.chain) ? String(object.chain) : "",
1105
- address: isSet(object.address) ? String(object.address) : "",
1106
- coingeckoId: isSet(object.coingeckoId) ? String(object.coingeckoId) : "",
1107
- decimals: isSet(object.decimals) ? Number(object.decimals) : 0,
1108
- logoUrl: isSet(object.logoUrl) ? String(object.logoUrl) : "",
1109
- projectUrl: isSet(object.projectUrl) ? String(object.projectUrl) : "",
1110
- accountAddress: isSet(object.accountAddress) ? String(object.accountAddress) : "",
1111
- moduleName: isSet(object.moduleName) ? String(object.moduleName) : "",
1112
- structName: isSet(object.structName) ? String(object.structName) : "",
1298
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1299
+ symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "",
1300
+ chain: isSet(object.chain) ? globalThis.String(object.chain) : "",
1301
+ address: isSet(object.address) ? globalThis.String(object.address) : "",
1302
+ coingeckoId: isSet(object.coingeckoId) ? globalThis.String(object.coingeckoId) : "",
1303
+ decimals: isSet(object.decimals) ? globalThis.Number(object.decimals) : 0,
1304
+ logoUrl: isSet(object.logoUrl) ? globalThis.String(object.logoUrl) : "",
1305
+ projectUrl: isSet(object.projectUrl) ? globalThis.String(object.projectUrl) : "",
1306
+ accountAddress: isSet(object.accountAddress) ? globalThis.String(object.accountAddress) : "",
1307
+ moduleName: isSet(object.moduleName) ? globalThis.String(object.moduleName) : "",
1308
+ structName: isSet(object.structName) ? globalThis.String(object.structName) : "",
1113
1309
  };
1114
1310
  },
1115
1311
 
1116
1312
  toJSON(message: BackfillCoinRequest): unknown {
1117
1313
  const obj: any = {};
1118
- message.name !== undefined && (obj.name = message.name);
1119
- message.symbol !== undefined && (obj.symbol = message.symbol);
1120
- message.chain !== undefined && (obj.chain = message.chain);
1121
- message.address !== undefined && (obj.address = message.address);
1122
- message.coingeckoId !== undefined && (obj.coingeckoId = message.coingeckoId);
1123
- message.decimals !== undefined && (obj.decimals = Math.round(message.decimals));
1124
- message.logoUrl !== undefined && (obj.logoUrl = message.logoUrl);
1125
- message.projectUrl !== undefined && (obj.projectUrl = message.projectUrl);
1126
- message.accountAddress !== undefined && (obj.accountAddress = message.accountAddress);
1127
- message.moduleName !== undefined && (obj.moduleName = message.moduleName);
1128
- message.structName !== undefined && (obj.structName = message.structName);
1314
+ if (message.name !== "") {
1315
+ obj.name = message.name;
1316
+ }
1317
+ if (message.symbol !== "") {
1318
+ obj.symbol = message.symbol;
1319
+ }
1320
+ if (message.chain !== "") {
1321
+ obj.chain = message.chain;
1322
+ }
1323
+ if (message.address !== "") {
1324
+ obj.address = message.address;
1325
+ }
1326
+ if (message.coingeckoId !== "") {
1327
+ obj.coingeckoId = message.coingeckoId;
1328
+ }
1329
+ if (message.decimals !== 0) {
1330
+ obj.decimals = Math.round(message.decimals);
1331
+ }
1332
+ if (message.logoUrl !== "") {
1333
+ obj.logoUrl = message.logoUrl;
1334
+ }
1335
+ if (message.projectUrl !== "") {
1336
+ obj.projectUrl = message.projectUrl;
1337
+ }
1338
+ if (message.accountAddress !== "") {
1339
+ obj.accountAddress = message.accountAddress;
1340
+ }
1341
+ if (message.moduleName !== "") {
1342
+ obj.moduleName = message.moduleName;
1343
+ }
1344
+ if (message.structName !== "") {
1345
+ obj.structName = message.structName;
1346
+ }
1129
1347
  return obj;
1130
1348
  },
1131
1349
 
1132
1350
  create(base?: DeepPartial<BackfillCoinRequest>): BackfillCoinRequest {
1133
1351
  return BackfillCoinRequest.fromPartial(base ?? {});
1134
1352
  },
1135
-
1136
1353
  fromPartial(object: DeepPartial<BackfillCoinRequest>): BackfillCoinRequest {
1137
1354
  const message = createBaseBackfillCoinRequest();
1138
1355
  message.name = object.name ?? "";
@@ -1166,44 +1383,56 @@ export const BackfillCoinResponse = {
1166
1383
  },
1167
1384
 
1168
1385
  decode(input: _m0.Reader | Uint8Array, length?: number): BackfillCoinResponse {
1169
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1386
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1170
1387
  let end = length === undefined ? reader.len : reader.pos + length;
1171
1388
  const message = createBaseBackfillCoinResponse();
1172
1389
  while (reader.pos < end) {
1173
1390
  const tag = reader.uint32();
1174
1391
  switch (tag >>> 3) {
1175
1392
  case 1:
1393
+ if (tag !== 10) {
1394
+ break;
1395
+ }
1396
+
1176
1397
  message.symbol = reader.string();
1177
- break;
1398
+ continue;
1178
1399
  case 2:
1400
+ if (tag !== 18) {
1401
+ break;
1402
+ }
1403
+
1179
1404
  message.message = reader.string();
1180
- break;
1181
- default:
1182
- reader.skipType(tag & 7);
1183
- break;
1405
+ continue;
1406
+ }
1407
+ if ((tag & 7) === 4 || tag === 0) {
1408
+ break;
1184
1409
  }
1410
+ reader.skipType(tag & 7);
1185
1411
  }
1186
1412
  return message;
1187
1413
  },
1188
1414
 
1189
1415
  fromJSON(object: any): BackfillCoinResponse {
1190
1416
  return {
1191
- symbol: isSet(object.symbol) ? String(object.symbol) : "",
1192
- message: isSet(object.message) ? String(object.message) : "",
1417
+ symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "",
1418
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
1193
1419
  };
1194
1420
  },
1195
1421
 
1196
1422
  toJSON(message: BackfillCoinResponse): unknown {
1197
1423
  const obj: any = {};
1198
- message.symbol !== undefined && (obj.symbol = message.symbol);
1199
- message.message !== undefined && (obj.message = message.message);
1424
+ if (message.symbol !== "") {
1425
+ obj.symbol = message.symbol;
1426
+ }
1427
+ if (message.message !== "") {
1428
+ obj.message = message.message;
1429
+ }
1200
1430
  return obj;
1201
1431
  },
1202
1432
 
1203
1433
  create(base?: DeepPartial<BackfillCoinResponse>): BackfillCoinResponse {
1204
1434
  return BackfillCoinResponse.fromPartial(base ?? {});
1205
1435
  },
1206
-
1207
1436
  fromPartial(object: DeepPartial<BackfillCoinResponse>): BackfillCoinResponse {
1208
1437
  const message = createBaseBackfillCoinResponse();
1209
1438
  message.symbol = object.symbol ?? "";
@@ -1223,7 +1452,11 @@ export const PriceServiceDefinition = {
1223
1452
  requestStream: false,
1224
1453
  responseType: GetPriceResponse,
1225
1454
  responseStream: false,
1226
- options: {},
1455
+ options: {
1456
+ _unknownFields: {
1457
+ 578365826: [new Uint8Array([16, 18, 14, 47, 97, 112, 105, 47, 118, 49, 47, 112, 114, 105, 99, 101, 115])],
1458
+ },
1459
+ },
1227
1460
  },
1228
1461
  batchGetPrices: {
1229
1462
  name: "BatchGetPrices",
@@ -1231,7 +1464,37 @@ export const PriceServiceDefinition = {
1231
1464
  requestStream: false,
1232
1465
  responseType: BatchGetPricesResponse,
1233
1466
  responseStream: false,
1234
- options: {},
1467
+ options: {
1468
+ _unknownFields: {
1469
+ 578365826: [
1470
+ new Uint8Array([
1471
+ 22,
1472
+ 18,
1473
+ 20,
1474
+ 47,
1475
+ 97,
1476
+ 112,
1477
+ 105,
1478
+ 47,
1479
+ 118,
1480
+ 49,
1481
+ 47,
1482
+ 112,
1483
+ 114,
1484
+ 105,
1485
+ 99,
1486
+ 101,
1487
+ 115,
1488
+ 47,
1489
+ 98,
1490
+ 97,
1491
+ 116,
1492
+ 99,
1493
+ 104,
1494
+ ]),
1495
+ ],
1496
+ },
1497
+ },
1235
1498
  },
1236
1499
  listCoins: {
1237
1500
  name: "ListCoins",
@@ -1239,7 +1502,37 @@ export const PriceServiceDefinition = {
1239
1502
  requestStream: false,
1240
1503
  responseType: ListCoinsResponse,
1241
1504
  responseStream: false,
1242
- options: {},
1505
+ options: {
1506
+ _unknownFields: {
1507
+ 578365826: [
1508
+ new Uint8Array([
1509
+ 22,
1510
+ 18,
1511
+ 20,
1512
+ 47,
1513
+ 97,
1514
+ 112,
1515
+ 105,
1516
+ 47,
1517
+ 118,
1518
+ 49,
1519
+ 47,
1520
+ 112,
1521
+ 114,
1522
+ 105,
1523
+ 99,
1524
+ 101,
1525
+ 115,
1526
+ 47,
1527
+ 99,
1528
+ 111,
1529
+ 105,
1530
+ 110,
1531
+ 115,
1532
+ ]),
1533
+ ],
1534
+ },
1535
+ },
1243
1536
  },
1244
1537
  checkLatestPrice: {
1245
1538
  name: "CheckLatestPrice",
@@ -1247,7 +1540,44 @@ export const PriceServiceDefinition = {
1247
1540
  requestStream: false,
1248
1541
  responseType: CheckLatestPriceResponse,
1249
1542
  responseStream: false,
1250
- options: {},
1543
+ options: {
1544
+ _unknownFields: {
1545
+ 578365826: [
1546
+ new Uint8Array([
1547
+ 29,
1548
+ 18,
1549
+ 27,
1550
+ 47,
1551
+ 97,
1552
+ 112,
1553
+ 105,
1554
+ 47,
1555
+ 118,
1556
+ 49,
1557
+ 47,
1558
+ 112,
1559
+ 114,
1560
+ 105,
1561
+ 99,
1562
+ 101,
1563
+ 115,
1564
+ 47,
1565
+ 99,
1566
+ 104,
1567
+ 101,
1568
+ 99,
1569
+ 107,
1570
+ 95,
1571
+ 108,
1572
+ 97,
1573
+ 116,
1574
+ 101,
1575
+ 115,
1576
+ 116,
1577
+ ]),
1578
+ ],
1579
+ },
1580
+ },
1251
1581
  },
1252
1582
  backfillCoin: {
1253
1583
  name: "BackfillCoin",
@@ -1255,7 +1585,43 @@ export const PriceServiceDefinition = {
1255
1585
  requestStream: false,
1256
1586
  responseType: BackfillCoinResponse,
1257
1587
  responseStream: false,
1258
- options: {},
1588
+ options: {
1589
+ _unknownFields: {
1590
+ 578365826: [
1591
+ new Uint8Array([
1592
+ 28,
1593
+ 34,
1594
+ 23,
1595
+ 47,
1596
+ 97,
1597
+ 112,
1598
+ 105,
1599
+ 47,
1600
+ 118,
1601
+ 49,
1602
+ 47,
1603
+ 112,
1604
+ 114,
1605
+ 105,
1606
+ 99,
1607
+ 101,
1608
+ 115,
1609
+ 47,
1610
+ 98,
1611
+ 97,
1612
+ 99,
1613
+ 107,
1614
+ 102,
1615
+ 105,
1616
+ 108,
1617
+ 108,
1618
+ 58,
1619
+ 1,
1620
+ 42,
1621
+ ]),
1622
+ ],
1623
+ },
1624
+ },
1259
1625
  },
1260
1626
  },
1261
1627
  } as const;
@@ -1294,10 +1660,11 @@ export interface PriceServiceClient<CallOptionsExt = {}> {
1294
1660
  ): Promise<BackfillCoinResponse>;
1295
1661
  }
1296
1662
 
1297
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1663
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
1298
1664
 
1299
1665
  type DeepPartial<T> = T extends Builtin ? T
1300
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1666
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
1667
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1301
1668
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1302
1669
  : Partial<T>;
1303
1670
 
@@ -1308,16 +1675,16 @@ function toTimestamp(date: Date): Timestamp {
1308
1675
  }
1309
1676
 
1310
1677
  function fromTimestamp(t: Timestamp): Date {
1311
- let millis = Number(t.seconds.toString()) * 1_000;
1312
- millis += t.nanos / 1_000_000;
1313
- return new Date(millis);
1678
+ let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1_000;
1679
+ millis += (t.nanos || 0) / 1_000_000;
1680
+ return new globalThis.Date(millis);
1314
1681
  }
1315
1682
 
1316
1683
  function fromJsonTimestamp(o: any): Date {
1317
- if (o instanceof Date) {
1684
+ if (o instanceof globalThis.Date) {
1318
1685
  return o;
1319
1686
  } else if (typeof o === "string") {
1320
- return new Date(o);
1687
+ return new globalThis.Date(o);
1321
1688
  } else {
1322
1689
  return fromTimestamp(Timestamp.fromJSON(o));
1323
1690
  }