@sentio/protos 2.6.2 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/processor/protos/processor.d.ts +1 -0
- package/lib/processor/protos/processor.js +10 -0
- package/lib/processor/protos/processor.js.map +1 -1
- package/lib/service/price/protos/price.d.ts +48 -0
- package/lib/service/price/protos/price.js +121 -0
- package/lib/service/price/protos/price.js.map +1 -1
- package/package.json +2 -2
- package/src/processor/protos/processor.ts +11 -0
- package/src/service/price/protos/price.ts +146 -0
|
@@ -42,6 +42,16 @@ export interface BatchGetPricesResponse_CoinPrice_Price {
|
|
|
42
42
|
results: GetPriceResponse[];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
export interface ListCoinsRequest {
|
|
46
|
+
limit: number;
|
|
47
|
+
offset: number;
|
|
48
|
+
queryString: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ListCoinsResponse {
|
|
52
|
+
coins: CoinID[];
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
function createBaseCoinID(): CoinID {
|
|
46
56
|
return { symbol: undefined, address: undefined };
|
|
47
57
|
}
|
|
@@ -557,6 +567,132 @@ export const BatchGetPricesResponse_CoinPrice_Price = {
|
|
|
557
567
|
},
|
|
558
568
|
};
|
|
559
569
|
|
|
570
|
+
function createBaseListCoinsRequest(): ListCoinsRequest {
|
|
571
|
+
return { limit: 0, offset: 0, queryString: "" };
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export const ListCoinsRequest = {
|
|
575
|
+
encode(message: ListCoinsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
576
|
+
if (message.limit !== 0) {
|
|
577
|
+
writer.uint32(8).int32(message.limit);
|
|
578
|
+
}
|
|
579
|
+
if (message.offset !== 0) {
|
|
580
|
+
writer.uint32(16).int32(message.offset);
|
|
581
|
+
}
|
|
582
|
+
if (message.queryString !== "") {
|
|
583
|
+
writer.uint32(26).string(message.queryString);
|
|
584
|
+
}
|
|
585
|
+
return writer;
|
|
586
|
+
},
|
|
587
|
+
|
|
588
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ListCoinsRequest {
|
|
589
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
590
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
591
|
+
const message = createBaseListCoinsRequest();
|
|
592
|
+
while (reader.pos < end) {
|
|
593
|
+
const tag = reader.uint32();
|
|
594
|
+
switch (tag >>> 3) {
|
|
595
|
+
case 1:
|
|
596
|
+
message.limit = reader.int32();
|
|
597
|
+
break;
|
|
598
|
+
case 2:
|
|
599
|
+
message.offset = reader.int32();
|
|
600
|
+
break;
|
|
601
|
+
case 3:
|
|
602
|
+
message.queryString = reader.string();
|
|
603
|
+
break;
|
|
604
|
+
default:
|
|
605
|
+
reader.skipType(tag & 7);
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return message;
|
|
610
|
+
},
|
|
611
|
+
|
|
612
|
+
fromJSON(object: any): ListCoinsRequest {
|
|
613
|
+
return {
|
|
614
|
+
limit: isSet(object.limit) ? Number(object.limit) : 0,
|
|
615
|
+
offset: isSet(object.offset) ? Number(object.offset) : 0,
|
|
616
|
+
queryString: isSet(object.queryString) ? String(object.queryString) : "",
|
|
617
|
+
};
|
|
618
|
+
},
|
|
619
|
+
|
|
620
|
+
toJSON(message: ListCoinsRequest): unknown {
|
|
621
|
+
const obj: any = {};
|
|
622
|
+
message.limit !== undefined && (obj.limit = Math.round(message.limit));
|
|
623
|
+
message.offset !== undefined && (obj.offset = Math.round(message.offset));
|
|
624
|
+
message.queryString !== undefined && (obj.queryString = message.queryString);
|
|
625
|
+
return obj;
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
create(base?: DeepPartial<ListCoinsRequest>): ListCoinsRequest {
|
|
629
|
+
return ListCoinsRequest.fromPartial(base ?? {});
|
|
630
|
+
},
|
|
631
|
+
|
|
632
|
+
fromPartial(object: DeepPartial<ListCoinsRequest>): ListCoinsRequest {
|
|
633
|
+
const message = createBaseListCoinsRequest();
|
|
634
|
+
message.limit = object.limit ?? 0;
|
|
635
|
+
message.offset = object.offset ?? 0;
|
|
636
|
+
message.queryString = object.queryString ?? "";
|
|
637
|
+
return message;
|
|
638
|
+
},
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
function createBaseListCoinsResponse(): ListCoinsResponse {
|
|
642
|
+
return { coins: [] };
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export const ListCoinsResponse = {
|
|
646
|
+
encode(message: ListCoinsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
647
|
+
for (const v of message.coins) {
|
|
648
|
+
CoinID.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
649
|
+
}
|
|
650
|
+
return writer;
|
|
651
|
+
},
|
|
652
|
+
|
|
653
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ListCoinsResponse {
|
|
654
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
655
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
656
|
+
const message = createBaseListCoinsResponse();
|
|
657
|
+
while (reader.pos < end) {
|
|
658
|
+
const tag = reader.uint32();
|
|
659
|
+
switch (tag >>> 3) {
|
|
660
|
+
case 1:
|
|
661
|
+
message.coins.push(CoinID.decode(reader, reader.uint32()));
|
|
662
|
+
break;
|
|
663
|
+
default:
|
|
664
|
+
reader.skipType(tag & 7);
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
return message;
|
|
669
|
+
},
|
|
670
|
+
|
|
671
|
+
fromJSON(object: any): ListCoinsResponse {
|
|
672
|
+
return { coins: Array.isArray(object?.coins) ? object.coins.map((e: any) => CoinID.fromJSON(e)) : [] };
|
|
673
|
+
},
|
|
674
|
+
|
|
675
|
+
toJSON(message: ListCoinsResponse): unknown {
|
|
676
|
+
const obj: any = {};
|
|
677
|
+
if (message.coins) {
|
|
678
|
+
obj.coins = message.coins.map((e) => e ? CoinID.toJSON(e) : undefined);
|
|
679
|
+
} else {
|
|
680
|
+
obj.coins = [];
|
|
681
|
+
}
|
|
682
|
+
return obj;
|
|
683
|
+
},
|
|
684
|
+
|
|
685
|
+
create(base?: DeepPartial<ListCoinsResponse>): ListCoinsResponse {
|
|
686
|
+
return ListCoinsResponse.fromPartial(base ?? {});
|
|
687
|
+
},
|
|
688
|
+
|
|
689
|
+
fromPartial(object: DeepPartial<ListCoinsResponse>): ListCoinsResponse {
|
|
690
|
+
const message = createBaseListCoinsResponse();
|
|
691
|
+
message.coins = object.coins?.map((e) => CoinID.fromPartial(e)) || [];
|
|
692
|
+
return message;
|
|
693
|
+
},
|
|
694
|
+
};
|
|
695
|
+
|
|
560
696
|
export type PriceServiceDefinition = typeof PriceServiceDefinition;
|
|
561
697
|
export const PriceServiceDefinition = {
|
|
562
698
|
name: "PriceService",
|
|
@@ -578,6 +714,14 @@ export const PriceServiceDefinition = {
|
|
|
578
714
|
responseStream: false,
|
|
579
715
|
options: {},
|
|
580
716
|
},
|
|
717
|
+
listCoins: {
|
|
718
|
+
name: "ListCoins",
|
|
719
|
+
requestType: ListCoinsRequest,
|
|
720
|
+
requestStream: false,
|
|
721
|
+
responseType: ListCoinsResponse,
|
|
722
|
+
responseStream: false,
|
|
723
|
+
options: {},
|
|
724
|
+
},
|
|
581
725
|
},
|
|
582
726
|
} as const;
|
|
583
727
|
|
|
@@ -587,6 +731,7 @@ export interface PriceServiceImplementation<CallContextExt = {}> {
|
|
|
587
731
|
request: BatchGetPricesRequest,
|
|
588
732
|
context: CallContext & CallContextExt,
|
|
589
733
|
): Promise<DeepPartial<BatchGetPricesResponse>>;
|
|
734
|
+
listCoins(request: ListCoinsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ListCoinsResponse>>;
|
|
590
735
|
}
|
|
591
736
|
|
|
592
737
|
export interface PriceServiceClient<CallOptionsExt = {}> {
|
|
@@ -595,6 +740,7 @@ export interface PriceServiceClient<CallOptionsExt = {}> {
|
|
|
595
740
|
request: DeepPartial<BatchGetPricesRequest>,
|
|
596
741
|
options?: CallOptions & CallOptionsExt,
|
|
597
742
|
): Promise<BatchGetPricesResponse>;
|
|
743
|
+
listCoins(request: DeepPartial<ListCoinsRequest>, options?: CallOptions & CallOptionsExt): Promise<ListCoinsResponse>;
|
|
598
744
|
}
|
|
599
745
|
|
|
600
746
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|