@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.
- package/generated/event_provider_api_pb.client.d.ts +156 -0
- package/generated/event_provider_api_pb.client.js +76 -0
- package/generated/event_provider_api_pb.d.ts +1980 -0
- package/generated/event_provider_api_pb.js +1776 -0
- package/generated/health_pb.client.d.ts +53 -0
- package/generated/health_pb.client.js +22 -0
- package/generated/health_pb.d.ts +309 -0
- package/generated/health_pb.js +265 -0
- package/generated/injective_accounts_rpc_pb.client.d.ts +211 -0
- package/generated/injective_accounts_rpc_pb.client.js +105 -0
- package/generated/injective_accounts_rpc_pb.d.ts +5307 -0
- package/generated/injective_accounts_rpc_pb.js +4784 -0
- package/generated/injective_archiver_rpc_pb.client.d.ts +224 -0
- package/generated/injective_archiver_rpc_pb.client.js +112 -0
- package/generated/injective_archiver_rpc_pb.d.ts +2944 -0
- package/generated/injective_archiver_rpc_pb.js +2603 -0
- package/generated/injective_auction_rpc_pb.client.d.ts +190 -0
- package/generated/injective_auction_rpc_pb.client.js +94 -0
- package/generated/injective_auction_rpc_pb.d.ts +2131 -0
- package/generated/injective_auction_rpc_pb.js +1917 -0
- package/generated/injective_campaign_rpc_pb.client.d.ts +138 -0
- package/generated/injective_campaign_rpc_pb.client.js +67 -0
- package/generated/injective_campaign_rpc_pb.d.ts +2766 -0
- package/generated/injective_campaign_rpc_pb.js +2542 -0
- package/generated/injective_chart_rpc_pb.client.d.ts +159 -0
- package/generated/injective_chart_rpc_pb.client.js +78 -0
- package/generated/injective_chart_rpc_pb.d.ts +1840 -0
- package/generated/injective_chart_rpc_pb.js +1690 -0
- package/generated/injective_derivative_exchange_rpc_pb.client.d.ts +504 -0
- package/generated/injective_derivative_exchange_rpc_pb.client.js +259 -0
- package/generated/injective_derivative_exchange_rpc_pb.d.ts +9214 -0
- package/generated/injective_derivative_exchange_rpc_pb.js +8407 -0
- package/generated/injective_exchange_rpc_pb.client.d.ts +155 -0
- package/generated/injective_exchange_rpc_pb.client.js +76 -0
- package/generated/injective_exchange_rpc_pb.d.ts +1925 -0
- package/generated/injective_exchange_rpc_pb.js +1740 -0
- package/generated/injective_explorer_rpc_pb.client.d.ts +495 -0
- package/generated/injective_explorer_rpc_pb.client.js +255 -0
- package/generated/injective_explorer_rpc_pb.d.ts +9394 -0
- package/generated/injective_explorer_rpc_pb.js +8921 -0
- package/generated/injective_insurance_rpc_pb.client.d.ts +87 -0
- package/generated/injective_insurance_rpc_pb.client.js +40 -0
- package/generated/injective_insurance_rpc_pb.d.ts +904 -0
- package/generated/injective_insurance_rpc_pb.js +807 -0
- package/generated/injective_megavault_rpc_pb.client.d.ts +155 -0
- package/generated/injective_megavault_rpc_pb.client.js +76 -0
- package/generated/injective_megavault_rpc_pb.d.ts +3408 -0
- package/generated/injective_megavault_rpc_pb.js +3019 -0
- package/generated/injective_meta_rpc_pb.client.d.ts +124 -0
- package/generated/injective_meta_rpc_pb.client.js +59 -0
- package/generated/injective_meta_rpc_pb.d.ts +825 -0
- package/generated/injective_meta_rpc_pb.js +716 -0
- package/generated/injective_oracle_rpc_pb.client.d.ts +124 -0
- package/generated/injective_oracle_rpc_pb.client.js +59 -0
- package/generated/injective_oracle_rpc_pb.d.ts +1117 -0
- package/generated/injective_oracle_rpc_pb.js +987 -0
- package/generated/injective_portfolio_rpc_pb.client.d.ts +105 -0
- package/generated/injective_portfolio_rpc_pb.client.js +49 -0
- package/generated/injective_portfolio_rpc_pb.d.ts +1492 -0
- package/generated/injective_portfolio_rpc_pb.js +1314 -0
- package/generated/injective_referral_rpc_pb.client.d.ts +89 -0
- package/generated/injective_referral_rpc_pb.client.js +41 -0
- package/generated/injective_referral_rpc_pb.d.ts +575 -0
- package/generated/injective_referral_rpc_pb.js +497 -0
- package/generated/injective_rfqrpc_pb.client.d.ts +208 -0
- package/generated/injective_rfqrpc_pb.client.js +103 -0
- package/generated/injective_rfqrpc_pb.d.ts +2241 -0
- package/generated/injective_rfqrpc_pb.js +1940 -0
- package/generated/injective_spot_exchange_rpc_pb.client.d.ts +343 -0
- package/generated/injective_spot_exchange_rpc_pb.client.js +175 -0
- package/generated/injective_spot_exchange_rpc_pb.d.ts +5958 -0
- package/generated/injective_spot_exchange_rpc_pb.js +5426 -0
- package/generated/injective_trading_rpc_pb.client.d.ts +90 -0
- package/generated/injective_trading_rpc_pb.client.js +40 -0
- package/generated/injective_trading_rpc_pb.d.ts +1882 -0
- package/generated/injective_trading_rpc_pb.js +1754 -0
- package/index.d.ts +43 -0
- package/index.js +78 -0
- package/package.json +37 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix
|
|
2
|
+
// @generated from protobuf file "health.proto" (package "api.v1", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
// Code generated with goa v3.7.0, DO NOT EDIT.
|
|
6
|
+
//
|
|
7
|
+
// health protocol buffer definition
|
|
8
|
+
//
|
|
9
|
+
// Command:
|
|
10
|
+
// $ goa gen github.com/InjectiveLabs/injective-indexer/api/design -o ../
|
|
11
|
+
//
|
|
12
|
+
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
13
|
+
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
14
|
+
import { Health } from "./health_pb";
|
|
15
|
+
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
16
|
+
import type { GetStatusResponse } from "./health_pb";
|
|
17
|
+
import type { GetStatusRequest } from "./health_pb";
|
|
18
|
+
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
19
|
+
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
20
|
+
/**
|
|
21
|
+
* HealthAPI allows to check if backend data is up-to-date and reliable or not.
|
|
22
|
+
*
|
|
23
|
+
* @generated from protobuf service api.v1.Health
|
|
24
|
+
*/
|
|
25
|
+
export interface IHealthClient {
|
|
26
|
+
/**
|
|
27
|
+
* Get current backend health status
|
|
28
|
+
*
|
|
29
|
+
* @generated from protobuf rpc: GetStatus
|
|
30
|
+
*/
|
|
31
|
+
getStatus(input: GetStatusRequest, options?: RpcOptions): UnaryCall<GetStatusRequest, GetStatusResponse>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* HealthAPI allows to check if backend data is up-to-date and reliable or not.
|
|
35
|
+
*
|
|
36
|
+
* @generated from protobuf service api.v1.Health
|
|
37
|
+
*/
|
|
38
|
+
export class HealthClient implements IHealthClient, ServiceInfo {
|
|
39
|
+
typeName = Health.typeName;
|
|
40
|
+
methods = Health.methods;
|
|
41
|
+
options = Health.options;
|
|
42
|
+
constructor(private readonly _transport: RpcTransport) {
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get current backend health status
|
|
46
|
+
*
|
|
47
|
+
* @generated from protobuf rpc: GetStatus
|
|
48
|
+
*/
|
|
49
|
+
getStatus(input: GetStatusRequest, options?: RpcOptions): UnaryCall<GetStatusRequest, GetStatusResponse> {
|
|
50
|
+
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
51
|
+
return stackIntercept<GetStatusRequest, GetStatusResponse>("unary", this._transport, method, opt, input);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Health } from "./health_pb.js";
|
|
2
|
+
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
3
|
+
class HealthClient {
|
|
4
|
+
constructor(_transport) {
|
|
5
|
+
this._transport = _transport;
|
|
6
|
+
this.typeName = Health.typeName;
|
|
7
|
+
this.methods = Health.methods;
|
|
8
|
+
this.options = Health.options;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get current backend health status
|
|
12
|
+
*
|
|
13
|
+
* @generated from protobuf rpc: GetStatus
|
|
14
|
+
*/
|
|
15
|
+
getStatus(input, options) {
|
|
16
|
+
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
17
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
HealthClient
|
|
22
|
+
};
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix
|
|
2
|
+
// @generated from protobuf file "health.proto" (package "api.v1", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
// Code generated with goa v3.7.0, DO NOT EDIT.
|
|
6
|
+
//
|
|
7
|
+
// health 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 api.v1.GetStatusRequest
|
|
24
|
+
*/
|
|
25
|
+
export interface GetStatusRequest {
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @generated from protobuf message api.v1.GetStatusResponse
|
|
29
|
+
*/
|
|
30
|
+
export interface GetStatusResponse {
|
|
31
|
+
/**
|
|
32
|
+
* Status of the response.
|
|
33
|
+
*
|
|
34
|
+
* @generated from protobuf field: string s = 1
|
|
35
|
+
*/
|
|
36
|
+
s: string;
|
|
37
|
+
/**
|
|
38
|
+
* Error message.
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf field: string errmsg = 2
|
|
41
|
+
*/
|
|
42
|
+
errmsg: string;
|
|
43
|
+
/**
|
|
44
|
+
* @generated from protobuf field: api.v1.HealthStatus data = 3
|
|
45
|
+
*/
|
|
46
|
+
data?: HealthStatus;
|
|
47
|
+
/**
|
|
48
|
+
* @generated from protobuf field: string status = 4
|
|
49
|
+
*/
|
|
50
|
+
status: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Status defines the structure for health information
|
|
54
|
+
*
|
|
55
|
+
* @generated from protobuf message api.v1.HealthStatus
|
|
56
|
+
*/
|
|
57
|
+
export interface HealthStatus {
|
|
58
|
+
/**
|
|
59
|
+
* Block height from local mongo exchange db.
|
|
60
|
+
*
|
|
61
|
+
* @generated from protobuf field: sint32 local_height = 1
|
|
62
|
+
*/
|
|
63
|
+
localHeight: number;
|
|
64
|
+
/**
|
|
65
|
+
* block timestamp from local mongo exchange db.
|
|
66
|
+
*
|
|
67
|
+
* @generated from protobuf field: sint32 local_timestamp = 2
|
|
68
|
+
*/
|
|
69
|
+
localTimestamp: number;
|
|
70
|
+
/**
|
|
71
|
+
* block height from Horacle service.
|
|
72
|
+
*
|
|
73
|
+
* @generated from protobuf field: sint32 horacle_height = 3
|
|
74
|
+
*/
|
|
75
|
+
horacleHeight: number;
|
|
76
|
+
/**
|
|
77
|
+
* block timestamp from Horacle service.
|
|
78
|
+
*
|
|
79
|
+
* @generated from protobuf field: sint32 horacle_timestamp = 4
|
|
80
|
+
*/
|
|
81
|
+
horacleTimestamp: number;
|
|
82
|
+
/**
|
|
83
|
+
* Migration version of the database.
|
|
84
|
+
*
|
|
85
|
+
* @generated from protobuf field: sint32 migration_last_version = 5
|
|
86
|
+
*/
|
|
87
|
+
migrationLastVersion: number;
|
|
88
|
+
/**
|
|
89
|
+
* Block height from event provider service.
|
|
90
|
+
*
|
|
91
|
+
* @generated from protobuf field: sint32 ep_height = 6
|
|
92
|
+
*/
|
|
93
|
+
epHeight: number;
|
|
94
|
+
/**
|
|
95
|
+
* Block UNIX timestamp from event provider service.
|
|
96
|
+
*
|
|
97
|
+
* @generated from protobuf field: sint32 ep_timestamp = 7
|
|
98
|
+
*/
|
|
99
|
+
epTimestamp: number;
|
|
100
|
+
}
|
|
101
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
102
|
+
class GetStatusRequest$Type extends MessageType<GetStatusRequest> {
|
|
103
|
+
constructor() {
|
|
104
|
+
super("api.v1.GetStatusRequest", []);
|
|
105
|
+
}
|
|
106
|
+
create(value?: PartialMessage<GetStatusRequest>): GetStatusRequest {
|
|
107
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
108
|
+
if (value !== undefined)
|
|
109
|
+
reflectionMergePartial<GetStatusRequest>(this, message, value);
|
|
110
|
+
return message;
|
|
111
|
+
}
|
|
112
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetStatusRequest): GetStatusRequest {
|
|
113
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
114
|
+
while (reader.pos < end) {
|
|
115
|
+
let [fieldNo, wireType] = reader.tag();
|
|
116
|
+
switch (fieldNo) {
|
|
117
|
+
default:
|
|
118
|
+
let u = options.readUnknownField;
|
|
119
|
+
if (u === "throw")
|
|
120
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
121
|
+
let d = reader.skip(wireType);
|
|
122
|
+
if (u !== false)
|
|
123
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return message;
|
|
127
|
+
}
|
|
128
|
+
internalBinaryWrite(message: GetStatusRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
129
|
+
let u = options.writeUnknownFields;
|
|
130
|
+
if (u !== false)
|
|
131
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
132
|
+
return writer;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @generated MessageType for protobuf message api.v1.GetStatusRequest
|
|
137
|
+
*/
|
|
138
|
+
export const GetStatusRequest = new GetStatusRequest$Type();
|
|
139
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
140
|
+
class GetStatusResponse$Type extends MessageType<GetStatusResponse> {
|
|
141
|
+
constructor() {
|
|
142
|
+
super("api.v1.GetStatusResponse", [
|
|
143
|
+
{ no: 1, name: "s", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
144
|
+
{ no: 2, name: "errmsg", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
145
|
+
{ no: 3, name: "data", kind: "message", T: () => HealthStatus },
|
|
146
|
+
{ no: 4, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
create(value?: PartialMessage<GetStatusResponse>): GetStatusResponse {
|
|
150
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
151
|
+
message.s = "";
|
|
152
|
+
message.errmsg = "";
|
|
153
|
+
message.status = "";
|
|
154
|
+
if (value !== undefined)
|
|
155
|
+
reflectionMergePartial<GetStatusResponse>(this, message, value);
|
|
156
|
+
return message;
|
|
157
|
+
}
|
|
158
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetStatusResponse): GetStatusResponse {
|
|
159
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
160
|
+
while (reader.pos < end) {
|
|
161
|
+
let [fieldNo, wireType] = reader.tag();
|
|
162
|
+
switch (fieldNo) {
|
|
163
|
+
case /* string s */ 1:
|
|
164
|
+
message.s = reader.string();
|
|
165
|
+
break;
|
|
166
|
+
case /* string errmsg */ 2:
|
|
167
|
+
message.errmsg = reader.string();
|
|
168
|
+
break;
|
|
169
|
+
case /* api.v1.HealthStatus data */ 3:
|
|
170
|
+
message.data = HealthStatus.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
171
|
+
break;
|
|
172
|
+
case /* string status */ 4:
|
|
173
|
+
message.status = reader.string();
|
|
174
|
+
break;
|
|
175
|
+
default:
|
|
176
|
+
let u = options.readUnknownField;
|
|
177
|
+
if (u === "throw")
|
|
178
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
179
|
+
let d = reader.skip(wireType);
|
|
180
|
+
if (u !== false)
|
|
181
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return message;
|
|
185
|
+
}
|
|
186
|
+
internalBinaryWrite(message: GetStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
187
|
+
/* string s = 1; */
|
|
188
|
+
if (message.s !== "")
|
|
189
|
+
writer.tag(1, WireType.LengthDelimited).string(message.s);
|
|
190
|
+
/* string errmsg = 2; */
|
|
191
|
+
if (message.errmsg !== "")
|
|
192
|
+
writer.tag(2, WireType.LengthDelimited).string(message.errmsg);
|
|
193
|
+
/* api.v1.HealthStatus data = 3; */
|
|
194
|
+
if (message.data)
|
|
195
|
+
HealthStatus.internalBinaryWrite(message.data, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
196
|
+
/* string status = 4; */
|
|
197
|
+
if (message.status !== "")
|
|
198
|
+
writer.tag(4, WireType.LengthDelimited).string(message.status);
|
|
199
|
+
let u = options.writeUnknownFields;
|
|
200
|
+
if (u !== false)
|
|
201
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
202
|
+
return writer;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* @generated MessageType for protobuf message api.v1.GetStatusResponse
|
|
207
|
+
*/
|
|
208
|
+
export const GetStatusResponse = new GetStatusResponse$Type();
|
|
209
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
210
|
+
class HealthStatus$Type extends MessageType<HealthStatus> {
|
|
211
|
+
constructor() {
|
|
212
|
+
super("api.v1.HealthStatus", [
|
|
213
|
+
{ no: 1, name: "local_height", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
214
|
+
{ no: 2, name: "local_timestamp", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
215
|
+
{ no: 3, name: "horacle_height", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
216
|
+
{ no: 4, name: "horacle_timestamp", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
217
|
+
{ no: 5, name: "migration_last_version", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
218
|
+
{ no: 6, name: "ep_height", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
219
|
+
{ no: 7, name: "ep_timestamp", kind: "scalar", T: 17 /*ScalarType.SINT32*/ }
|
|
220
|
+
]);
|
|
221
|
+
}
|
|
222
|
+
create(value?: PartialMessage<HealthStatus>): HealthStatus {
|
|
223
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
224
|
+
message.localHeight = 0;
|
|
225
|
+
message.localTimestamp = 0;
|
|
226
|
+
message.horacleHeight = 0;
|
|
227
|
+
message.horacleTimestamp = 0;
|
|
228
|
+
message.migrationLastVersion = 0;
|
|
229
|
+
message.epHeight = 0;
|
|
230
|
+
message.epTimestamp = 0;
|
|
231
|
+
if (value !== undefined)
|
|
232
|
+
reflectionMergePartial<HealthStatus>(this, message, value);
|
|
233
|
+
return message;
|
|
234
|
+
}
|
|
235
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HealthStatus): HealthStatus {
|
|
236
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
237
|
+
while (reader.pos < end) {
|
|
238
|
+
let [fieldNo, wireType] = reader.tag();
|
|
239
|
+
switch (fieldNo) {
|
|
240
|
+
case /* sint32 local_height */ 1:
|
|
241
|
+
message.localHeight = reader.sint32();
|
|
242
|
+
break;
|
|
243
|
+
case /* sint32 local_timestamp */ 2:
|
|
244
|
+
message.localTimestamp = reader.sint32();
|
|
245
|
+
break;
|
|
246
|
+
case /* sint32 horacle_height */ 3:
|
|
247
|
+
message.horacleHeight = reader.sint32();
|
|
248
|
+
break;
|
|
249
|
+
case /* sint32 horacle_timestamp */ 4:
|
|
250
|
+
message.horacleTimestamp = reader.sint32();
|
|
251
|
+
break;
|
|
252
|
+
case /* sint32 migration_last_version */ 5:
|
|
253
|
+
message.migrationLastVersion = reader.sint32();
|
|
254
|
+
break;
|
|
255
|
+
case /* sint32 ep_height */ 6:
|
|
256
|
+
message.epHeight = reader.sint32();
|
|
257
|
+
break;
|
|
258
|
+
case /* sint32 ep_timestamp */ 7:
|
|
259
|
+
message.epTimestamp = reader.sint32();
|
|
260
|
+
break;
|
|
261
|
+
default:
|
|
262
|
+
let u = options.readUnknownField;
|
|
263
|
+
if (u === "throw")
|
|
264
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
265
|
+
let d = reader.skip(wireType);
|
|
266
|
+
if (u !== false)
|
|
267
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return message;
|
|
271
|
+
}
|
|
272
|
+
internalBinaryWrite(message: HealthStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
273
|
+
/* sint32 local_height = 1; */
|
|
274
|
+
if (message.localHeight !== 0)
|
|
275
|
+
writer.tag(1, WireType.Varint).sint32(message.localHeight);
|
|
276
|
+
/* sint32 local_timestamp = 2; */
|
|
277
|
+
if (message.localTimestamp !== 0)
|
|
278
|
+
writer.tag(2, WireType.Varint).sint32(message.localTimestamp);
|
|
279
|
+
/* sint32 horacle_height = 3; */
|
|
280
|
+
if (message.horacleHeight !== 0)
|
|
281
|
+
writer.tag(3, WireType.Varint).sint32(message.horacleHeight);
|
|
282
|
+
/* sint32 horacle_timestamp = 4; */
|
|
283
|
+
if (message.horacleTimestamp !== 0)
|
|
284
|
+
writer.tag(4, WireType.Varint).sint32(message.horacleTimestamp);
|
|
285
|
+
/* sint32 migration_last_version = 5; */
|
|
286
|
+
if (message.migrationLastVersion !== 0)
|
|
287
|
+
writer.tag(5, WireType.Varint).sint32(message.migrationLastVersion);
|
|
288
|
+
/* sint32 ep_height = 6; */
|
|
289
|
+
if (message.epHeight !== 0)
|
|
290
|
+
writer.tag(6, WireType.Varint).sint32(message.epHeight);
|
|
291
|
+
/* sint32 ep_timestamp = 7; */
|
|
292
|
+
if (message.epTimestamp !== 0)
|
|
293
|
+
writer.tag(7, WireType.Varint).sint32(message.epTimestamp);
|
|
294
|
+
let u = options.writeUnknownFields;
|
|
295
|
+
if (u !== false)
|
|
296
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
297
|
+
return writer;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* @generated MessageType for protobuf message api.v1.HealthStatus
|
|
302
|
+
*/
|
|
303
|
+
export const HealthStatus = new HealthStatus$Type();
|
|
304
|
+
/**
|
|
305
|
+
* @generated ServiceType for protobuf service api.v1.Health
|
|
306
|
+
*/
|
|
307
|
+
export const Health = new ServiceType("api.v1.Health", [
|
|
308
|
+
{ name: "GetStatus", options: {}, I: GetStatusRequest, O: GetStatusResponse }
|
|
309
|
+
]);
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
2
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
3
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
4
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
5
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
6
|
+
class GetStatusRequest$Type extends MessageType {
|
|
7
|
+
constructor() {
|
|
8
|
+
super("api.v1.GetStatusRequest", []);
|
|
9
|
+
}
|
|
10
|
+
create(value) {
|
|
11
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
12
|
+
if (value !== void 0)
|
|
13
|
+
reflectionMergePartial(this, message, value);
|
|
14
|
+
return message;
|
|
15
|
+
}
|
|
16
|
+
internalBinaryRead(reader, length, options, target) {
|
|
17
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
18
|
+
while (reader.pos < end) {
|
|
19
|
+
let [fieldNo, wireType] = reader.tag();
|
|
20
|
+
switch (fieldNo) {
|
|
21
|
+
default:
|
|
22
|
+
let u = options.readUnknownField;
|
|
23
|
+
if (u === "throw")
|
|
24
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
25
|
+
let d = reader.skip(wireType);
|
|
26
|
+
if (u !== false)
|
|
27
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return message;
|
|
31
|
+
}
|
|
32
|
+
internalBinaryWrite(message, writer, options) {
|
|
33
|
+
let u = options.writeUnknownFields;
|
|
34
|
+
if (u !== false)
|
|
35
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
36
|
+
return writer;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const GetStatusRequest = new GetStatusRequest$Type();
|
|
40
|
+
class GetStatusResponse$Type extends MessageType {
|
|
41
|
+
constructor() {
|
|
42
|
+
super("api.v1.GetStatusResponse", [
|
|
43
|
+
{
|
|
44
|
+
no: 1,
|
|
45
|
+
name: "s",
|
|
46
|
+
kind: "scalar",
|
|
47
|
+
T: 9
|
|
48
|
+
/*ScalarType.STRING*/
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
no: 2,
|
|
52
|
+
name: "errmsg",
|
|
53
|
+
kind: "scalar",
|
|
54
|
+
T: 9
|
|
55
|
+
/*ScalarType.STRING*/
|
|
56
|
+
},
|
|
57
|
+
{ no: 3, name: "data", kind: "message", T: () => HealthStatus },
|
|
58
|
+
{
|
|
59
|
+
no: 4,
|
|
60
|
+
name: "status",
|
|
61
|
+
kind: "scalar",
|
|
62
|
+
T: 9
|
|
63
|
+
/*ScalarType.STRING*/
|
|
64
|
+
}
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
create(value) {
|
|
68
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
69
|
+
message.s = "";
|
|
70
|
+
message.errmsg = "";
|
|
71
|
+
message.status = "";
|
|
72
|
+
if (value !== void 0)
|
|
73
|
+
reflectionMergePartial(this, message, value);
|
|
74
|
+
return message;
|
|
75
|
+
}
|
|
76
|
+
internalBinaryRead(reader, length, options, target) {
|
|
77
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
let [fieldNo, wireType] = reader.tag();
|
|
80
|
+
switch (fieldNo) {
|
|
81
|
+
case /* string s */
|
|
82
|
+
1:
|
|
83
|
+
message.s = reader.string();
|
|
84
|
+
break;
|
|
85
|
+
case /* string errmsg */
|
|
86
|
+
2:
|
|
87
|
+
message.errmsg = reader.string();
|
|
88
|
+
break;
|
|
89
|
+
case /* api.v1.HealthStatus data */
|
|
90
|
+
3:
|
|
91
|
+
message.data = HealthStatus.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
92
|
+
break;
|
|
93
|
+
case /* string status */
|
|
94
|
+
4:
|
|
95
|
+
message.status = reader.string();
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
let u = options.readUnknownField;
|
|
99
|
+
if (u === "throw")
|
|
100
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
101
|
+
let d = reader.skip(wireType);
|
|
102
|
+
if (u !== false)
|
|
103
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return message;
|
|
107
|
+
}
|
|
108
|
+
internalBinaryWrite(message, writer, options) {
|
|
109
|
+
if (message.s !== "")
|
|
110
|
+
writer.tag(1, WireType.LengthDelimited).string(message.s);
|
|
111
|
+
if (message.errmsg !== "")
|
|
112
|
+
writer.tag(2, WireType.LengthDelimited).string(message.errmsg);
|
|
113
|
+
if (message.data)
|
|
114
|
+
HealthStatus.internalBinaryWrite(message.data, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
115
|
+
if (message.status !== "")
|
|
116
|
+
writer.tag(4, WireType.LengthDelimited).string(message.status);
|
|
117
|
+
let u = options.writeUnknownFields;
|
|
118
|
+
if (u !== false)
|
|
119
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
120
|
+
return writer;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const GetStatusResponse = new GetStatusResponse$Type();
|
|
124
|
+
class HealthStatus$Type extends MessageType {
|
|
125
|
+
constructor() {
|
|
126
|
+
super("api.v1.HealthStatus", [
|
|
127
|
+
{
|
|
128
|
+
no: 1,
|
|
129
|
+
name: "local_height",
|
|
130
|
+
kind: "scalar",
|
|
131
|
+
T: 17
|
|
132
|
+
/*ScalarType.SINT32*/
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
no: 2,
|
|
136
|
+
name: "local_timestamp",
|
|
137
|
+
kind: "scalar",
|
|
138
|
+
T: 17
|
|
139
|
+
/*ScalarType.SINT32*/
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
no: 3,
|
|
143
|
+
name: "horacle_height",
|
|
144
|
+
kind: "scalar",
|
|
145
|
+
T: 17
|
|
146
|
+
/*ScalarType.SINT32*/
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
no: 4,
|
|
150
|
+
name: "horacle_timestamp",
|
|
151
|
+
kind: "scalar",
|
|
152
|
+
T: 17
|
|
153
|
+
/*ScalarType.SINT32*/
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
no: 5,
|
|
157
|
+
name: "migration_last_version",
|
|
158
|
+
kind: "scalar",
|
|
159
|
+
T: 17
|
|
160
|
+
/*ScalarType.SINT32*/
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
no: 6,
|
|
164
|
+
name: "ep_height",
|
|
165
|
+
kind: "scalar",
|
|
166
|
+
T: 17
|
|
167
|
+
/*ScalarType.SINT32*/
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
no: 7,
|
|
171
|
+
name: "ep_timestamp",
|
|
172
|
+
kind: "scalar",
|
|
173
|
+
T: 17
|
|
174
|
+
/*ScalarType.SINT32*/
|
|
175
|
+
}
|
|
176
|
+
]);
|
|
177
|
+
}
|
|
178
|
+
create(value) {
|
|
179
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
180
|
+
message.localHeight = 0;
|
|
181
|
+
message.localTimestamp = 0;
|
|
182
|
+
message.horacleHeight = 0;
|
|
183
|
+
message.horacleTimestamp = 0;
|
|
184
|
+
message.migrationLastVersion = 0;
|
|
185
|
+
message.epHeight = 0;
|
|
186
|
+
message.epTimestamp = 0;
|
|
187
|
+
if (value !== void 0)
|
|
188
|
+
reflectionMergePartial(this, message, value);
|
|
189
|
+
return message;
|
|
190
|
+
}
|
|
191
|
+
internalBinaryRead(reader, length, options, target) {
|
|
192
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
193
|
+
while (reader.pos < end) {
|
|
194
|
+
let [fieldNo, wireType] = reader.tag();
|
|
195
|
+
switch (fieldNo) {
|
|
196
|
+
case /* sint32 local_height */
|
|
197
|
+
1:
|
|
198
|
+
message.localHeight = reader.sint32();
|
|
199
|
+
break;
|
|
200
|
+
case /* sint32 local_timestamp */
|
|
201
|
+
2:
|
|
202
|
+
message.localTimestamp = reader.sint32();
|
|
203
|
+
break;
|
|
204
|
+
case /* sint32 horacle_height */
|
|
205
|
+
3:
|
|
206
|
+
message.horacleHeight = reader.sint32();
|
|
207
|
+
break;
|
|
208
|
+
case /* sint32 horacle_timestamp */
|
|
209
|
+
4:
|
|
210
|
+
message.horacleTimestamp = reader.sint32();
|
|
211
|
+
break;
|
|
212
|
+
case /* sint32 migration_last_version */
|
|
213
|
+
5:
|
|
214
|
+
message.migrationLastVersion = reader.sint32();
|
|
215
|
+
break;
|
|
216
|
+
case /* sint32 ep_height */
|
|
217
|
+
6:
|
|
218
|
+
message.epHeight = reader.sint32();
|
|
219
|
+
break;
|
|
220
|
+
case /* sint32 ep_timestamp */
|
|
221
|
+
7:
|
|
222
|
+
message.epTimestamp = reader.sint32();
|
|
223
|
+
break;
|
|
224
|
+
default:
|
|
225
|
+
let u = options.readUnknownField;
|
|
226
|
+
if (u === "throw")
|
|
227
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
228
|
+
let d = reader.skip(wireType);
|
|
229
|
+
if (u !== false)
|
|
230
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return message;
|
|
234
|
+
}
|
|
235
|
+
internalBinaryWrite(message, writer, options) {
|
|
236
|
+
if (message.localHeight !== 0)
|
|
237
|
+
writer.tag(1, WireType.Varint).sint32(message.localHeight);
|
|
238
|
+
if (message.localTimestamp !== 0)
|
|
239
|
+
writer.tag(2, WireType.Varint).sint32(message.localTimestamp);
|
|
240
|
+
if (message.horacleHeight !== 0)
|
|
241
|
+
writer.tag(3, WireType.Varint).sint32(message.horacleHeight);
|
|
242
|
+
if (message.horacleTimestamp !== 0)
|
|
243
|
+
writer.tag(4, WireType.Varint).sint32(message.horacleTimestamp);
|
|
244
|
+
if (message.migrationLastVersion !== 0)
|
|
245
|
+
writer.tag(5, WireType.Varint).sint32(message.migrationLastVersion);
|
|
246
|
+
if (message.epHeight !== 0)
|
|
247
|
+
writer.tag(6, WireType.Varint).sint32(message.epHeight);
|
|
248
|
+
if (message.epTimestamp !== 0)
|
|
249
|
+
writer.tag(7, WireType.Varint).sint32(message.epTimestamp);
|
|
250
|
+
let u = options.writeUnknownFields;
|
|
251
|
+
if (u !== false)
|
|
252
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
253
|
+
return writer;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const HealthStatus = new HealthStatus$Type();
|
|
257
|
+
const Health = new ServiceType("api.v1.Health", [
|
|
258
|
+
{ name: "GetStatus", options: {}, I: GetStatusRequest, O: GetStatusResponse }
|
|
259
|
+
]);
|
|
260
|
+
export {
|
|
261
|
+
GetStatusRequest,
|
|
262
|
+
GetStatusResponse,
|
|
263
|
+
Health,
|
|
264
|
+
HealthStatus
|
|
265
|
+
};
|