@burnt-labs/xion-types 16.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/README.md +111 -0
- package/package.json +26 -0
- package/types/.gitkeep +0 -0
- package/types/generated/amino/amino.ts +9 -0
- package/types/generated/cosmos/app/v1alpha1/config.ts +336 -0
- package/types/generated/cosmos/app/v1alpha1/query.ts +265 -0
- package/types/generated/cosmos/auth/v1beta1/auth.ts +520 -0
- package/types/generated/cosmos/auth/v1beta1/query.ts +1852 -0
- package/types/generated/cosmos/authz/v1beta1/authz.ts +404 -0
- package/types/generated/cosmos/authz/v1beta1/query.ts +774 -0
- package/types/generated/cosmos/autocli/v1/options.ts +1016 -0
- package/types/generated/cosmos/autocli/v1/query.ts +379 -0
- package/types/generated/cosmos/bank/v1beta1/bank.ts +752 -0
- package/types/generated/cosmos/bank/v1beta1/query.ts +2789 -0
- package/types/generated/cosmos/base/abci/v1beta1/abci.ts +1447 -0
- package/types/generated/cosmos/base/node/v1beta1/query.ts +587 -0
- package/types/generated/cosmos/base/query/v1beta1/pagination.ts +317 -0
- package/types/generated/cosmos/base/tendermint/v1beta1/query.ts +2228 -0
- package/types/generated/cosmos/base/tendermint/v1beta1/types.ts +522 -0
- package/types/generated/cosmos/base/v1beta1/coin.ts +326 -0
- package/types/generated/cosmos/circuit/v1/query.ts +606 -0
- package/types/generated/cosmos/circuit/v1/types.ts +353 -0
- package/types/generated/cosmos/consensus/v1/query.ts +271 -0
- package/types/generated/cosmos/crypto/multisig/v1beta1/multisig.ts +212 -0
- package/types/generated/cosmos/distribution/v1beta1/distribution.ts +1143 -0
- package/types/generated/cosmos/distribution/v1beta1/query.ts +2005 -0
- package/types/generated/cosmos/evidence/v1beta1/query.ts +526 -0
- package/types/generated/cosmos/feegrant/v1beta1/feegrant.ts +502 -0
- package/types/generated/cosmos/feegrant/v1beta1/query.ts +725 -0
- package/types/generated/cosmos/gov/v1/gov.ts +1656 -0
- package/types/generated/cosmos/gov/v1/query.ts +1847 -0
- package/types/generated/cosmos/gov/v1beta1/gov.ts +1239 -0
- package/types/generated/cosmos/gov/v1beta1/query.ts +1658 -0
- package/types/generated/cosmos/group/v1/query.ts +2840 -0
- package/types/generated/cosmos/group/v1/types.ts +1803 -0
- package/types/generated/cosmos/ics23/v1/proofs.ts +1685 -0
- package/types/generated/cosmos/mint/v1beta1/mint.ts +273 -0
- package/types/generated/cosmos/mint/v1beta1/query.ts +589 -0
- package/types/generated/cosmos/msg/v1/msg.ts +9 -0
- package/types/generated/cosmos/nft/v1beta1/nft.ts +333 -0
- package/types/generated/cosmos/nft/v1beta1/query.ts +1362 -0
- package/types/generated/cosmos/orm/query/v1alpha1/query.ts +1016 -0
- package/types/generated/cosmos/params/v1beta1/params.ts +227 -0
- package/types/generated/cosmos/params/v1beta1/query.ts +545 -0
- package/types/generated/cosmos/query/v1/query.ts +9 -0
- package/types/generated/cosmos/slashing/v1beta1/query.ts +626 -0
- package/types/generated/cosmos/slashing/v1beta1/slashing.ts +409 -0
- package/types/generated/cosmos/staking/v1beta1/query.ts +2912 -0
- package/types/generated/cosmos/staking/v1beta1/staking.ts +2515 -0
- package/types/generated/cosmos/tx/signing/v1beta1/signing.ts +608 -0
- package/types/generated/cosmos/tx/v1beta1/service.ts +2111 -0
- package/types/generated/cosmos/tx/v1beta1/tx.ts +1613 -0
- package/types/generated/cosmos/upgrade/v1beta1/query.ts +1007 -0
- package/types/generated/cosmos/upgrade/v1beta1/upgrade.ts +507 -0
- package/types/generated/cosmos_proto/cosmos.ts +299 -0
- package/types/generated/cosmwasm/wasm/v1/query.ts +2984 -0
- package/types/generated/cosmwasm/wasm/v1/types.ts +962 -0
- package/types/generated/gogoproto/gogo.ts +9 -0
- package/types/generated/google/api/annotations.ts +9 -0
- package/types/generated/google/api/http.ts +757 -0
- package/types/generated/google/protobuf/any.ts +253 -0
- package/types/generated/google/protobuf/descriptor.ts +4958 -0
- package/types/generated/google/protobuf/duration.ts +186 -0
- package/types/generated/google/protobuf/timestamp.ts +215 -0
- package/types/generated/ibc/applications/fee/v1/fee.ts +391 -0
- package/types/generated/ibc/applications/fee/v1/genesis.ts +553 -0
- package/types/generated/ibc/applications/fee/v1/query.ts +2056 -0
- package/types/generated/ibc/applications/interchain_accounts/controller/v1/controller.ts +100 -0
- package/types/generated/ibc/applications/interchain_accounts/controller/v1/query.ts +447 -0
- package/types/generated/ibc/applications/interchain_accounts/host/v1/host.ts +235 -0
- package/types/generated/ibc/applications/interchain_accounts/host/v1/query.ts +265 -0
- package/types/generated/ibc/applications/transfer/v1/query.ts +1135 -0
- package/types/generated/ibc/applications/transfer/v1/transfer.ts +213 -0
- package/types/generated/ibc/core/channel/v1/channel.ts +1329 -0
- package/types/generated/ibc/core/channel/v1/query.ts +4214 -0
- package/types/generated/ibc/core/channel/v1/upgrade.ts +330 -0
- package/types/generated/ibc/core/client/v1/client.ts +726 -0
- package/types/generated/ibc/core/client/v1/query.ts +2208 -0
- package/types/generated/ibc/core/commitment/v1/commitment.ts +329 -0
- package/types/generated/ibc/core/connection/v1/connection.ts +813 -0
- package/types/generated/ibc/core/connection/v1/query.ts +1442 -0
- package/types/generated/ibc/lightclients/wasm/v1/query.ts +484 -0
- package/types/generated/tendermint/abci/types.ts +6429 -0
- package/types/generated/tendermint/crypto/keys.ts +137 -0
- package/types/generated/tendermint/crypto/proof.ts +506 -0
- package/types/generated/tendermint/p2p/types.ts +514 -0
- package/types/generated/tendermint/types/block.ts +151 -0
- package/types/generated/tendermint/types/evidence.ts +493 -0
- package/types/generated/tendermint/types/params.ts +687 -0
- package/types/generated/tendermint/types/types.ts +2069 -0
- package/types/generated/tendermint/types/validator.ts +409 -0
- package/types/generated/tendermint/version/types.ts +202 -0
- package/types/generated/xion/globalfee/v1/genesis.ts +219 -0
- package/types/generated/xion/globalfee/v1/query.ts +269 -0
- package/types/generated/xion/jwk/v1/audience.ts +188 -0
- package/types/generated/xion/jwk/v1/params.ts +118 -0
- package/types/generated/xion/jwk/v1/query.ts +1061 -0
- package/types/generated/xion/mint/v1/mint.ts +273 -0
- package/types/generated/xion/mint/v1/query.ts +589 -0
- package/types/generated/xion/v1/query.ts +878 -0
|
@@ -0,0 +1,1442 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v1.181.2
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: ibc/core/connection/v1/query.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { grpc } from "@improbable-eng/grpc-web";
|
|
9
|
+
import { BrowserHeaders } from "browser-headers";
|
|
10
|
+
import Long from "long";
|
|
11
|
+
import _m0 from "protobufjs/minimal";
|
|
12
|
+
import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination";
|
|
13
|
+
import { Any } from "../../../../google/protobuf/any";
|
|
14
|
+
import { Height, IdentifiedClientState } from "../../client/v1/client";
|
|
15
|
+
import { ConnectionEnd, IdentifiedConnection, Params } from "./connection";
|
|
16
|
+
|
|
17
|
+
export const protobufPackage = "ibc.core.connection.v1";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* QueryConnectionRequest is the request type for the Query/Connection RPC
|
|
21
|
+
* method
|
|
22
|
+
*/
|
|
23
|
+
export interface QueryConnectionRequest {
|
|
24
|
+
/** connection unique identifier */
|
|
25
|
+
connectionId: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* QueryConnectionResponse is the response type for the Query/Connection RPC
|
|
30
|
+
* method. Besides the connection end, it includes a proof and the height from
|
|
31
|
+
* which the proof was retrieved.
|
|
32
|
+
*/
|
|
33
|
+
export interface QueryConnectionResponse {
|
|
34
|
+
/** connection associated with the request identifier */
|
|
35
|
+
connection?:
|
|
36
|
+
| ConnectionEnd
|
|
37
|
+
| undefined;
|
|
38
|
+
/** merkle proof of existence */
|
|
39
|
+
proof: Uint8Array;
|
|
40
|
+
/** height at which the proof was retrieved */
|
|
41
|
+
proofHeight?: Height | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* QueryConnectionsRequest is the request type for the Query/Connections RPC
|
|
46
|
+
* method
|
|
47
|
+
*/
|
|
48
|
+
export interface QueryConnectionsRequest {
|
|
49
|
+
pagination?: PageRequest | undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* QueryConnectionsResponse is the response type for the Query/Connections RPC
|
|
54
|
+
* method.
|
|
55
|
+
*/
|
|
56
|
+
export interface QueryConnectionsResponse {
|
|
57
|
+
/** list of stored connections of the chain. */
|
|
58
|
+
connections: IdentifiedConnection[];
|
|
59
|
+
/** pagination response */
|
|
60
|
+
pagination?:
|
|
61
|
+
| PageResponse
|
|
62
|
+
| undefined;
|
|
63
|
+
/** query block height */
|
|
64
|
+
height?: Height | undefined;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* QueryClientConnectionsRequest is the request type for the
|
|
69
|
+
* Query/ClientConnections RPC method
|
|
70
|
+
*/
|
|
71
|
+
export interface QueryClientConnectionsRequest {
|
|
72
|
+
/** client identifier associated with a connection */
|
|
73
|
+
clientId: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* QueryClientConnectionsResponse is the response type for the
|
|
78
|
+
* Query/ClientConnections RPC method
|
|
79
|
+
*/
|
|
80
|
+
export interface QueryClientConnectionsResponse {
|
|
81
|
+
/** slice of all the connection paths associated with a client. */
|
|
82
|
+
connectionPaths: string[];
|
|
83
|
+
/** merkle proof of existence */
|
|
84
|
+
proof: Uint8Array;
|
|
85
|
+
/** height at which the proof was generated */
|
|
86
|
+
proofHeight?: Height | undefined;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* QueryConnectionClientStateRequest is the request type for the
|
|
91
|
+
* Query/ConnectionClientState RPC method
|
|
92
|
+
*/
|
|
93
|
+
export interface QueryConnectionClientStateRequest {
|
|
94
|
+
/** connection identifier */
|
|
95
|
+
connectionId: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* QueryConnectionClientStateResponse is the response type for the
|
|
100
|
+
* Query/ConnectionClientState RPC method
|
|
101
|
+
*/
|
|
102
|
+
export interface QueryConnectionClientStateResponse {
|
|
103
|
+
/** client state associated with the channel */
|
|
104
|
+
identifiedClientState?:
|
|
105
|
+
| IdentifiedClientState
|
|
106
|
+
| undefined;
|
|
107
|
+
/** merkle proof of existence */
|
|
108
|
+
proof: Uint8Array;
|
|
109
|
+
/** height at which the proof was retrieved */
|
|
110
|
+
proofHeight?: Height | undefined;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* QueryConnectionConsensusStateRequest is the request type for the
|
|
115
|
+
* Query/ConnectionConsensusState RPC method
|
|
116
|
+
*/
|
|
117
|
+
export interface QueryConnectionConsensusStateRequest {
|
|
118
|
+
/** connection identifier */
|
|
119
|
+
connectionId: string;
|
|
120
|
+
revisionNumber: Long;
|
|
121
|
+
revisionHeight: Long;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* QueryConnectionConsensusStateResponse is the response type for the
|
|
126
|
+
* Query/ConnectionConsensusState RPC method
|
|
127
|
+
*/
|
|
128
|
+
export interface QueryConnectionConsensusStateResponse {
|
|
129
|
+
/** consensus state associated with the channel */
|
|
130
|
+
consensusState?:
|
|
131
|
+
| Any
|
|
132
|
+
| undefined;
|
|
133
|
+
/** client ID associated with the consensus state */
|
|
134
|
+
clientId: string;
|
|
135
|
+
/** merkle proof of existence */
|
|
136
|
+
proof: Uint8Array;
|
|
137
|
+
/** height at which the proof was retrieved */
|
|
138
|
+
proofHeight?: Height | undefined;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. */
|
|
142
|
+
export interface QueryConnectionParamsRequest {
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. */
|
|
146
|
+
export interface QueryConnectionParamsResponse {
|
|
147
|
+
/** params defines the parameters of the module. */
|
|
148
|
+
params?: Params | undefined;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function createBaseQueryConnectionRequest(): QueryConnectionRequest {
|
|
152
|
+
return { connectionId: "" };
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export const QueryConnectionRequest = {
|
|
156
|
+
encode(message: QueryConnectionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
157
|
+
if (message.connectionId !== "") {
|
|
158
|
+
writer.uint32(10).string(message.connectionId);
|
|
159
|
+
}
|
|
160
|
+
return writer;
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionRequest {
|
|
164
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
165
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
166
|
+
const message = createBaseQueryConnectionRequest();
|
|
167
|
+
while (reader.pos < end) {
|
|
168
|
+
const tag = reader.uint32();
|
|
169
|
+
switch (tag >>> 3) {
|
|
170
|
+
case 1:
|
|
171
|
+
if (tag !== 10) {
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
message.connectionId = reader.string();
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
reader.skipType(tag & 7);
|
|
182
|
+
}
|
|
183
|
+
return message;
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
fromJSON(object: any): QueryConnectionRequest {
|
|
187
|
+
return { connectionId: isSet(object.connectionId) ? globalThis.String(object.connectionId) : "" };
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
toJSON(message: QueryConnectionRequest): unknown {
|
|
191
|
+
const obj: any = {};
|
|
192
|
+
if (message.connectionId !== "") {
|
|
193
|
+
obj.connectionId = message.connectionId;
|
|
194
|
+
}
|
|
195
|
+
return obj;
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
create<I extends Exact<DeepPartial<QueryConnectionRequest>, I>>(base?: I): QueryConnectionRequest {
|
|
199
|
+
return QueryConnectionRequest.fromPartial(base ?? ({} as any));
|
|
200
|
+
},
|
|
201
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionRequest>, I>>(object: I): QueryConnectionRequest {
|
|
202
|
+
const message = createBaseQueryConnectionRequest();
|
|
203
|
+
message.connectionId = object.connectionId ?? "";
|
|
204
|
+
return message;
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
function createBaseQueryConnectionResponse(): QueryConnectionResponse {
|
|
209
|
+
return { connection: undefined, proof: new Uint8Array(0), proofHeight: undefined };
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export const QueryConnectionResponse = {
|
|
213
|
+
encode(message: QueryConnectionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
214
|
+
if (message.connection !== undefined) {
|
|
215
|
+
ConnectionEnd.encode(message.connection, writer.uint32(10).fork()).ldelim();
|
|
216
|
+
}
|
|
217
|
+
if (message.proof.length !== 0) {
|
|
218
|
+
writer.uint32(18).bytes(message.proof);
|
|
219
|
+
}
|
|
220
|
+
if (message.proofHeight !== undefined) {
|
|
221
|
+
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
|
222
|
+
}
|
|
223
|
+
return writer;
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionResponse {
|
|
227
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
228
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
229
|
+
const message = createBaseQueryConnectionResponse();
|
|
230
|
+
while (reader.pos < end) {
|
|
231
|
+
const tag = reader.uint32();
|
|
232
|
+
switch (tag >>> 3) {
|
|
233
|
+
case 1:
|
|
234
|
+
if (tag !== 10) {
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
message.connection = ConnectionEnd.decode(reader, reader.uint32());
|
|
239
|
+
continue;
|
|
240
|
+
case 2:
|
|
241
|
+
if (tag !== 18) {
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
message.proof = reader.bytes();
|
|
246
|
+
continue;
|
|
247
|
+
case 3:
|
|
248
|
+
if (tag !== 26) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
message.proofHeight = Height.decode(reader, reader.uint32());
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
reader.skipType(tag & 7);
|
|
259
|
+
}
|
|
260
|
+
return message;
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
fromJSON(object: any): QueryConnectionResponse {
|
|
264
|
+
return {
|
|
265
|
+
connection: isSet(object.connection) ? ConnectionEnd.fromJSON(object.connection) : undefined,
|
|
266
|
+
proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(0),
|
|
267
|
+
proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined,
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
toJSON(message: QueryConnectionResponse): unknown {
|
|
272
|
+
const obj: any = {};
|
|
273
|
+
if (message.connection !== undefined) {
|
|
274
|
+
obj.connection = ConnectionEnd.toJSON(message.connection);
|
|
275
|
+
}
|
|
276
|
+
if (message.proof.length !== 0) {
|
|
277
|
+
obj.proof = base64FromBytes(message.proof);
|
|
278
|
+
}
|
|
279
|
+
if (message.proofHeight !== undefined) {
|
|
280
|
+
obj.proofHeight = Height.toJSON(message.proofHeight);
|
|
281
|
+
}
|
|
282
|
+
return obj;
|
|
283
|
+
},
|
|
284
|
+
|
|
285
|
+
create<I extends Exact<DeepPartial<QueryConnectionResponse>, I>>(base?: I): QueryConnectionResponse {
|
|
286
|
+
return QueryConnectionResponse.fromPartial(base ?? ({} as any));
|
|
287
|
+
},
|
|
288
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionResponse>, I>>(object: I): QueryConnectionResponse {
|
|
289
|
+
const message = createBaseQueryConnectionResponse();
|
|
290
|
+
message.connection = (object.connection !== undefined && object.connection !== null)
|
|
291
|
+
? ConnectionEnd.fromPartial(object.connection)
|
|
292
|
+
: undefined;
|
|
293
|
+
message.proof = object.proof ?? new Uint8Array(0);
|
|
294
|
+
message.proofHeight = (object.proofHeight !== undefined && object.proofHeight !== null)
|
|
295
|
+
? Height.fromPartial(object.proofHeight)
|
|
296
|
+
: undefined;
|
|
297
|
+
return message;
|
|
298
|
+
},
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
function createBaseQueryConnectionsRequest(): QueryConnectionsRequest {
|
|
302
|
+
return { pagination: undefined };
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export const QueryConnectionsRequest = {
|
|
306
|
+
encode(message: QueryConnectionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
307
|
+
if (message.pagination !== undefined) {
|
|
308
|
+
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
309
|
+
}
|
|
310
|
+
return writer;
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionsRequest {
|
|
314
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
315
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
316
|
+
const message = createBaseQueryConnectionsRequest();
|
|
317
|
+
while (reader.pos < end) {
|
|
318
|
+
const tag = reader.uint32();
|
|
319
|
+
switch (tag >>> 3) {
|
|
320
|
+
case 1:
|
|
321
|
+
if (tag !== 10) {
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
reader.skipType(tag & 7);
|
|
332
|
+
}
|
|
333
|
+
return message;
|
|
334
|
+
},
|
|
335
|
+
|
|
336
|
+
fromJSON(object: any): QueryConnectionsRequest {
|
|
337
|
+
return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined };
|
|
338
|
+
},
|
|
339
|
+
|
|
340
|
+
toJSON(message: QueryConnectionsRequest): unknown {
|
|
341
|
+
const obj: any = {};
|
|
342
|
+
if (message.pagination !== undefined) {
|
|
343
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
344
|
+
}
|
|
345
|
+
return obj;
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
create<I extends Exact<DeepPartial<QueryConnectionsRequest>, I>>(base?: I): QueryConnectionsRequest {
|
|
349
|
+
return QueryConnectionsRequest.fromPartial(base ?? ({} as any));
|
|
350
|
+
},
|
|
351
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionsRequest>, I>>(object: I): QueryConnectionsRequest {
|
|
352
|
+
const message = createBaseQueryConnectionsRequest();
|
|
353
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
354
|
+
? PageRequest.fromPartial(object.pagination)
|
|
355
|
+
: undefined;
|
|
356
|
+
return message;
|
|
357
|
+
},
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
function createBaseQueryConnectionsResponse(): QueryConnectionsResponse {
|
|
361
|
+
return { connections: [], pagination: undefined, height: undefined };
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export const QueryConnectionsResponse = {
|
|
365
|
+
encode(message: QueryConnectionsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
366
|
+
for (const v of message.connections) {
|
|
367
|
+
IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
368
|
+
}
|
|
369
|
+
if (message.pagination !== undefined) {
|
|
370
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
371
|
+
}
|
|
372
|
+
if (message.height !== undefined) {
|
|
373
|
+
Height.encode(message.height, writer.uint32(26).fork()).ldelim();
|
|
374
|
+
}
|
|
375
|
+
return writer;
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionsResponse {
|
|
379
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
380
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
381
|
+
const message = createBaseQueryConnectionsResponse();
|
|
382
|
+
while (reader.pos < end) {
|
|
383
|
+
const tag = reader.uint32();
|
|
384
|
+
switch (tag >>> 3) {
|
|
385
|
+
case 1:
|
|
386
|
+
if (tag !== 10) {
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
message.connections.push(IdentifiedConnection.decode(reader, reader.uint32()));
|
|
391
|
+
continue;
|
|
392
|
+
case 2:
|
|
393
|
+
if (tag !== 18) {
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
398
|
+
continue;
|
|
399
|
+
case 3:
|
|
400
|
+
if (tag !== 26) {
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
message.height = Height.decode(reader, reader.uint32());
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
reader.skipType(tag & 7);
|
|
411
|
+
}
|
|
412
|
+
return message;
|
|
413
|
+
},
|
|
414
|
+
|
|
415
|
+
fromJSON(object: any): QueryConnectionsResponse {
|
|
416
|
+
return {
|
|
417
|
+
connections: globalThis.Array.isArray(object?.connections)
|
|
418
|
+
? object.connections.map((e: any) => IdentifiedConnection.fromJSON(e))
|
|
419
|
+
: [],
|
|
420
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
421
|
+
height: isSet(object.height) ? Height.fromJSON(object.height) : undefined,
|
|
422
|
+
};
|
|
423
|
+
},
|
|
424
|
+
|
|
425
|
+
toJSON(message: QueryConnectionsResponse): unknown {
|
|
426
|
+
const obj: any = {};
|
|
427
|
+
if (message.connections?.length) {
|
|
428
|
+
obj.connections = message.connections.map((e) => IdentifiedConnection.toJSON(e));
|
|
429
|
+
}
|
|
430
|
+
if (message.pagination !== undefined) {
|
|
431
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
432
|
+
}
|
|
433
|
+
if (message.height !== undefined) {
|
|
434
|
+
obj.height = Height.toJSON(message.height);
|
|
435
|
+
}
|
|
436
|
+
return obj;
|
|
437
|
+
},
|
|
438
|
+
|
|
439
|
+
create<I extends Exact<DeepPartial<QueryConnectionsResponse>, I>>(base?: I): QueryConnectionsResponse {
|
|
440
|
+
return QueryConnectionsResponse.fromPartial(base ?? ({} as any));
|
|
441
|
+
},
|
|
442
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionsResponse>, I>>(object: I): QueryConnectionsResponse {
|
|
443
|
+
const message = createBaseQueryConnectionsResponse();
|
|
444
|
+
message.connections = object.connections?.map((e) => IdentifiedConnection.fromPartial(e)) || [];
|
|
445
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
446
|
+
? PageResponse.fromPartial(object.pagination)
|
|
447
|
+
: undefined;
|
|
448
|
+
message.height = (object.height !== undefined && object.height !== null)
|
|
449
|
+
? Height.fromPartial(object.height)
|
|
450
|
+
: undefined;
|
|
451
|
+
return message;
|
|
452
|
+
},
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
function createBaseQueryClientConnectionsRequest(): QueryClientConnectionsRequest {
|
|
456
|
+
return { clientId: "" };
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export const QueryClientConnectionsRequest = {
|
|
460
|
+
encode(message: QueryClientConnectionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
461
|
+
if (message.clientId !== "") {
|
|
462
|
+
writer.uint32(10).string(message.clientId);
|
|
463
|
+
}
|
|
464
|
+
return writer;
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientConnectionsRequest {
|
|
468
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
469
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
470
|
+
const message = createBaseQueryClientConnectionsRequest();
|
|
471
|
+
while (reader.pos < end) {
|
|
472
|
+
const tag = reader.uint32();
|
|
473
|
+
switch (tag >>> 3) {
|
|
474
|
+
case 1:
|
|
475
|
+
if (tag !== 10) {
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
message.clientId = reader.string();
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
reader.skipType(tag & 7);
|
|
486
|
+
}
|
|
487
|
+
return message;
|
|
488
|
+
},
|
|
489
|
+
|
|
490
|
+
fromJSON(object: any): QueryClientConnectionsRequest {
|
|
491
|
+
return { clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "" };
|
|
492
|
+
},
|
|
493
|
+
|
|
494
|
+
toJSON(message: QueryClientConnectionsRequest): unknown {
|
|
495
|
+
const obj: any = {};
|
|
496
|
+
if (message.clientId !== "") {
|
|
497
|
+
obj.clientId = message.clientId;
|
|
498
|
+
}
|
|
499
|
+
return obj;
|
|
500
|
+
},
|
|
501
|
+
|
|
502
|
+
create<I extends Exact<DeepPartial<QueryClientConnectionsRequest>, I>>(base?: I): QueryClientConnectionsRequest {
|
|
503
|
+
return QueryClientConnectionsRequest.fromPartial(base ?? ({} as any));
|
|
504
|
+
},
|
|
505
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientConnectionsRequest>, I>>(
|
|
506
|
+
object: I,
|
|
507
|
+
): QueryClientConnectionsRequest {
|
|
508
|
+
const message = createBaseQueryClientConnectionsRequest();
|
|
509
|
+
message.clientId = object.clientId ?? "";
|
|
510
|
+
return message;
|
|
511
|
+
},
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
function createBaseQueryClientConnectionsResponse(): QueryClientConnectionsResponse {
|
|
515
|
+
return { connectionPaths: [], proof: new Uint8Array(0), proofHeight: undefined };
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export const QueryClientConnectionsResponse = {
|
|
519
|
+
encode(message: QueryClientConnectionsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
520
|
+
for (const v of message.connectionPaths) {
|
|
521
|
+
writer.uint32(10).string(v!);
|
|
522
|
+
}
|
|
523
|
+
if (message.proof.length !== 0) {
|
|
524
|
+
writer.uint32(18).bytes(message.proof);
|
|
525
|
+
}
|
|
526
|
+
if (message.proofHeight !== undefined) {
|
|
527
|
+
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
|
528
|
+
}
|
|
529
|
+
return writer;
|
|
530
|
+
},
|
|
531
|
+
|
|
532
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientConnectionsResponse {
|
|
533
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
534
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
535
|
+
const message = createBaseQueryClientConnectionsResponse();
|
|
536
|
+
while (reader.pos < end) {
|
|
537
|
+
const tag = reader.uint32();
|
|
538
|
+
switch (tag >>> 3) {
|
|
539
|
+
case 1:
|
|
540
|
+
if (tag !== 10) {
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
message.connectionPaths.push(reader.string());
|
|
545
|
+
continue;
|
|
546
|
+
case 2:
|
|
547
|
+
if (tag !== 18) {
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
message.proof = reader.bytes();
|
|
552
|
+
continue;
|
|
553
|
+
case 3:
|
|
554
|
+
if (tag !== 26) {
|
|
555
|
+
break;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
message.proofHeight = Height.decode(reader, reader.uint32());
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
562
|
+
break;
|
|
563
|
+
}
|
|
564
|
+
reader.skipType(tag & 7);
|
|
565
|
+
}
|
|
566
|
+
return message;
|
|
567
|
+
},
|
|
568
|
+
|
|
569
|
+
fromJSON(object: any): QueryClientConnectionsResponse {
|
|
570
|
+
return {
|
|
571
|
+
connectionPaths: globalThis.Array.isArray(object?.connectionPaths)
|
|
572
|
+
? object.connectionPaths.map((e: any) => globalThis.String(e))
|
|
573
|
+
: [],
|
|
574
|
+
proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(0),
|
|
575
|
+
proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined,
|
|
576
|
+
};
|
|
577
|
+
},
|
|
578
|
+
|
|
579
|
+
toJSON(message: QueryClientConnectionsResponse): unknown {
|
|
580
|
+
const obj: any = {};
|
|
581
|
+
if (message.connectionPaths?.length) {
|
|
582
|
+
obj.connectionPaths = message.connectionPaths;
|
|
583
|
+
}
|
|
584
|
+
if (message.proof.length !== 0) {
|
|
585
|
+
obj.proof = base64FromBytes(message.proof);
|
|
586
|
+
}
|
|
587
|
+
if (message.proofHeight !== undefined) {
|
|
588
|
+
obj.proofHeight = Height.toJSON(message.proofHeight);
|
|
589
|
+
}
|
|
590
|
+
return obj;
|
|
591
|
+
},
|
|
592
|
+
|
|
593
|
+
create<I extends Exact<DeepPartial<QueryClientConnectionsResponse>, I>>(base?: I): QueryClientConnectionsResponse {
|
|
594
|
+
return QueryClientConnectionsResponse.fromPartial(base ?? ({} as any));
|
|
595
|
+
},
|
|
596
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientConnectionsResponse>, I>>(
|
|
597
|
+
object: I,
|
|
598
|
+
): QueryClientConnectionsResponse {
|
|
599
|
+
const message = createBaseQueryClientConnectionsResponse();
|
|
600
|
+
message.connectionPaths = object.connectionPaths?.map((e) => e) || [];
|
|
601
|
+
message.proof = object.proof ?? new Uint8Array(0);
|
|
602
|
+
message.proofHeight = (object.proofHeight !== undefined && object.proofHeight !== null)
|
|
603
|
+
? Height.fromPartial(object.proofHeight)
|
|
604
|
+
: undefined;
|
|
605
|
+
return message;
|
|
606
|
+
},
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
function createBaseQueryConnectionClientStateRequest(): QueryConnectionClientStateRequest {
|
|
610
|
+
return { connectionId: "" };
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export const QueryConnectionClientStateRequest = {
|
|
614
|
+
encode(message: QueryConnectionClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
615
|
+
if (message.connectionId !== "") {
|
|
616
|
+
writer.uint32(10).string(message.connectionId);
|
|
617
|
+
}
|
|
618
|
+
return writer;
|
|
619
|
+
},
|
|
620
|
+
|
|
621
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionClientStateRequest {
|
|
622
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
623
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
624
|
+
const message = createBaseQueryConnectionClientStateRequest();
|
|
625
|
+
while (reader.pos < end) {
|
|
626
|
+
const tag = reader.uint32();
|
|
627
|
+
switch (tag >>> 3) {
|
|
628
|
+
case 1:
|
|
629
|
+
if (tag !== 10) {
|
|
630
|
+
break;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
message.connectionId = reader.string();
|
|
634
|
+
continue;
|
|
635
|
+
}
|
|
636
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
reader.skipType(tag & 7);
|
|
640
|
+
}
|
|
641
|
+
return message;
|
|
642
|
+
},
|
|
643
|
+
|
|
644
|
+
fromJSON(object: any): QueryConnectionClientStateRequest {
|
|
645
|
+
return { connectionId: isSet(object.connectionId) ? globalThis.String(object.connectionId) : "" };
|
|
646
|
+
},
|
|
647
|
+
|
|
648
|
+
toJSON(message: QueryConnectionClientStateRequest): unknown {
|
|
649
|
+
const obj: any = {};
|
|
650
|
+
if (message.connectionId !== "") {
|
|
651
|
+
obj.connectionId = message.connectionId;
|
|
652
|
+
}
|
|
653
|
+
return obj;
|
|
654
|
+
},
|
|
655
|
+
|
|
656
|
+
create<I extends Exact<DeepPartial<QueryConnectionClientStateRequest>, I>>(
|
|
657
|
+
base?: I,
|
|
658
|
+
): QueryConnectionClientStateRequest {
|
|
659
|
+
return QueryConnectionClientStateRequest.fromPartial(base ?? ({} as any));
|
|
660
|
+
},
|
|
661
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionClientStateRequest>, I>>(
|
|
662
|
+
object: I,
|
|
663
|
+
): QueryConnectionClientStateRequest {
|
|
664
|
+
const message = createBaseQueryConnectionClientStateRequest();
|
|
665
|
+
message.connectionId = object.connectionId ?? "";
|
|
666
|
+
return message;
|
|
667
|
+
},
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
function createBaseQueryConnectionClientStateResponse(): QueryConnectionClientStateResponse {
|
|
671
|
+
return { identifiedClientState: undefined, proof: new Uint8Array(0), proofHeight: undefined };
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export const QueryConnectionClientStateResponse = {
|
|
675
|
+
encode(message: QueryConnectionClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
676
|
+
if (message.identifiedClientState !== undefined) {
|
|
677
|
+
IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(10).fork()).ldelim();
|
|
678
|
+
}
|
|
679
|
+
if (message.proof.length !== 0) {
|
|
680
|
+
writer.uint32(18).bytes(message.proof);
|
|
681
|
+
}
|
|
682
|
+
if (message.proofHeight !== undefined) {
|
|
683
|
+
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
|
684
|
+
}
|
|
685
|
+
return writer;
|
|
686
|
+
},
|
|
687
|
+
|
|
688
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionClientStateResponse {
|
|
689
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
690
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
691
|
+
const message = createBaseQueryConnectionClientStateResponse();
|
|
692
|
+
while (reader.pos < end) {
|
|
693
|
+
const tag = reader.uint32();
|
|
694
|
+
switch (tag >>> 3) {
|
|
695
|
+
case 1:
|
|
696
|
+
if (tag !== 10) {
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
message.identifiedClientState = IdentifiedClientState.decode(reader, reader.uint32());
|
|
701
|
+
continue;
|
|
702
|
+
case 2:
|
|
703
|
+
if (tag !== 18) {
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
message.proof = reader.bytes();
|
|
708
|
+
continue;
|
|
709
|
+
case 3:
|
|
710
|
+
if (tag !== 26) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
message.proofHeight = Height.decode(reader, reader.uint32());
|
|
715
|
+
continue;
|
|
716
|
+
}
|
|
717
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
reader.skipType(tag & 7);
|
|
721
|
+
}
|
|
722
|
+
return message;
|
|
723
|
+
},
|
|
724
|
+
|
|
725
|
+
fromJSON(object: any): QueryConnectionClientStateResponse {
|
|
726
|
+
return {
|
|
727
|
+
identifiedClientState: isSet(object.identifiedClientState)
|
|
728
|
+
? IdentifiedClientState.fromJSON(object.identifiedClientState)
|
|
729
|
+
: undefined,
|
|
730
|
+
proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(0),
|
|
731
|
+
proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined,
|
|
732
|
+
};
|
|
733
|
+
},
|
|
734
|
+
|
|
735
|
+
toJSON(message: QueryConnectionClientStateResponse): unknown {
|
|
736
|
+
const obj: any = {};
|
|
737
|
+
if (message.identifiedClientState !== undefined) {
|
|
738
|
+
obj.identifiedClientState = IdentifiedClientState.toJSON(message.identifiedClientState);
|
|
739
|
+
}
|
|
740
|
+
if (message.proof.length !== 0) {
|
|
741
|
+
obj.proof = base64FromBytes(message.proof);
|
|
742
|
+
}
|
|
743
|
+
if (message.proofHeight !== undefined) {
|
|
744
|
+
obj.proofHeight = Height.toJSON(message.proofHeight);
|
|
745
|
+
}
|
|
746
|
+
return obj;
|
|
747
|
+
},
|
|
748
|
+
|
|
749
|
+
create<I extends Exact<DeepPartial<QueryConnectionClientStateResponse>, I>>(
|
|
750
|
+
base?: I,
|
|
751
|
+
): QueryConnectionClientStateResponse {
|
|
752
|
+
return QueryConnectionClientStateResponse.fromPartial(base ?? ({} as any));
|
|
753
|
+
},
|
|
754
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionClientStateResponse>, I>>(
|
|
755
|
+
object: I,
|
|
756
|
+
): QueryConnectionClientStateResponse {
|
|
757
|
+
const message = createBaseQueryConnectionClientStateResponse();
|
|
758
|
+
message.identifiedClientState =
|
|
759
|
+
(object.identifiedClientState !== undefined && object.identifiedClientState !== null)
|
|
760
|
+
? IdentifiedClientState.fromPartial(object.identifiedClientState)
|
|
761
|
+
: undefined;
|
|
762
|
+
message.proof = object.proof ?? new Uint8Array(0);
|
|
763
|
+
message.proofHeight = (object.proofHeight !== undefined && object.proofHeight !== null)
|
|
764
|
+
? Height.fromPartial(object.proofHeight)
|
|
765
|
+
: undefined;
|
|
766
|
+
return message;
|
|
767
|
+
},
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
function createBaseQueryConnectionConsensusStateRequest(): QueryConnectionConsensusStateRequest {
|
|
771
|
+
return { connectionId: "", revisionNumber: Long.UZERO, revisionHeight: Long.UZERO };
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
export const QueryConnectionConsensusStateRequest = {
|
|
775
|
+
encode(message: QueryConnectionConsensusStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
776
|
+
if (message.connectionId !== "") {
|
|
777
|
+
writer.uint32(10).string(message.connectionId);
|
|
778
|
+
}
|
|
779
|
+
if (!message.revisionNumber.equals(Long.UZERO)) {
|
|
780
|
+
writer.uint32(16).uint64(message.revisionNumber);
|
|
781
|
+
}
|
|
782
|
+
if (!message.revisionHeight.equals(Long.UZERO)) {
|
|
783
|
+
writer.uint32(24).uint64(message.revisionHeight);
|
|
784
|
+
}
|
|
785
|
+
return writer;
|
|
786
|
+
},
|
|
787
|
+
|
|
788
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionConsensusStateRequest {
|
|
789
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
790
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
791
|
+
const message = createBaseQueryConnectionConsensusStateRequest();
|
|
792
|
+
while (reader.pos < end) {
|
|
793
|
+
const tag = reader.uint32();
|
|
794
|
+
switch (tag >>> 3) {
|
|
795
|
+
case 1:
|
|
796
|
+
if (tag !== 10) {
|
|
797
|
+
break;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
message.connectionId = reader.string();
|
|
801
|
+
continue;
|
|
802
|
+
case 2:
|
|
803
|
+
if (tag !== 16) {
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
message.revisionNumber = reader.uint64() as Long;
|
|
808
|
+
continue;
|
|
809
|
+
case 3:
|
|
810
|
+
if (tag !== 24) {
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
message.revisionHeight = reader.uint64() as Long;
|
|
815
|
+
continue;
|
|
816
|
+
}
|
|
817
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
818
|
+
break;
|
|
819
|
+
}
|
|
820
|
+
reader.skipType(tag & 7);
|
|
821
|
+
}
|
|
822
|
+
return message;
|
|
823
|
+
},
|
|
824
|
+
|
|
825
|
+
fromJSON(object: any): QueryConnectionConsensusStateRequest {
|
|
826
|
+
return {
|
|
827
|
+
connectionId: isSet(object.connectionId) ? globalThis.String(object.connectionId) : "",
|
|
828
|
+
revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO,
|
|
829
|
+
revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO,
|
|
830
|
+
};
|
|
831
|
+
},
|
|
832
|
+
|
|
833
|
+
toJSON(message: QueryConnectionConsensusStateRequest): unknown {
|
|
834
|
+
const obj: any = {};
|
|
835
|
+
if (message.connectionId !== "") {
|
|
836
|
+
obj.connectionId = message.connectionId;
|
|
837
|
+
}
|
|
838
|
+
if (!message.revisionNumber.equals(Long.UZERO)) {
|
|
839
|
+
obj.revisionNumber = (message.revisionNumber || Long.UZERO).toString();
|
|
840
|
+
}
|
|
841
|
+
if (!message.revisionHeight.equals(Long.UZERO)) {
|
|
842
|
+
obj.revisionHeight = (message.revisionHeight || Long.UZERO).toString();
|
|
843
|
+
}
|
|
844
|
+
return obj;
|
|
845
|
+
},
|
|
846
|
+
|
|
847
|
+
create<I extends Exact<DeepPartial<QueryConnectionConsensusStateRequest>, I>>(
|
|
848
|
+
base?: I,
|
|
849
|
+
): QueryConnectionConsensusStateRequest {
|
|
850
|
+
return QueryConnectionConsensusStateRequest.fromPartial(base ?? ({} as any));
|
|
851
|
+
},
|
|
852
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionConsensusStateRequest>, I>>(
|
|
853
|
+
object: I,
|
|
854
|
+
): QueryConnectionConsensusStateRequest {
|
|
855
|
+
const message = createBaseQueryConnectionConsensusStateRequest();
|
|
856
|
+
message.connectionId = object.connectionId ?? "";
|
|
857
|
+
message.revisionNumber = (object.revisionNumber !== undefined && object.revisionNumber !== null)
|
|
858
|
+
? Long.fromValue(object.revisionNumber)
|
|
859
|
+
: Long.UZERO;
|
|
860
|
+
message.revisionHeight = (object.revisionHeight !== undefined && object.revisionHeight !== null)
|
|
861
|
+
? Long.fromValue(object.revisionHeight)
|
|
862
|
+
: Long.UZERO;
|
|
863
|
+
return message;
|
|
864
|
+
},
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
function createBaseQueryConnectionConsensusStateResponse(): QueryConnectionConsensusStateResponse {
|
|
868
|
+
return { consensusState: undefined, clientId: "", proof: new Uint8Array(0), proofHeight: undefined };
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
export const QueryConnectionConsensusStateResponse = {
|
|
872
|
+
encode(message: QueryConnectionConsensusStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
873
|
+
if (message.consensusState !== undefined) {
|
|
874
|
+
Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim();
|
|
875
|
+
}
|
|
876
|
+
if (message.clientId !== "") {
|
|
877
|
+
writer.uint32(18).string(message.clientId);
|
|
878
|
+
}
|
|
879
|
+
if (message.proof.length !== 0) {
|
|
880
|
+
writer.uint32(26).bytes(message.proof);
|
|
881
|
+
}
|
|
882
|
+
if (message.proofHeight !== undefined) {
|
|
883
|
+
Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim();
|
|
884
|
+
}
|
|
885
|
+
return writer;
|
|
886
|
+
},
|
|
887
|
+
|
|
888
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionConsensusStateResponse {
|
|
889
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
890
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
891
|
+
const message = createBaseQueryConnectionConsensusStateResponse();
|
|
892
|
+
while (reader.pos < end) {
|
|
893
|
+
const tag = reader.uint32();
|
|
894
|
+
switch (tag >>> 3) {
|
|
895
|
+
case 1:
|
|
896
|
+
if (tag !== 10) {
|
|
897
|
+
break;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
message.consensusState = Any.decode(reader, reader.uint32());
|
|
901
|
+
continue;
|
|
902
|
+
case 2:
|
|
903
|
+
if (tag !== 18) {
|
|
904
|
+
break;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
message.clientId = reader.string();
|
|
908
|
+
continue;
|
|
909
|
+
case 3:
|
|
910
|
+
if (tag !== 26) {
|
|
911
|
+
break;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
message.proof = reader.bytes();
|
|
915
|
+
continue;
|
|
916
|
+
case 4:
|
|
917
|
+
if (tag !== 34) {
|
|
918
|
+
break;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
message.proofHeight = Height.decode(reader, reader.uint32());
|
|
922
|
+
continue;
|
|
923
|
+
}
|
|
924
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
927
|
+
reader.skipType(tag & 7);
|
|
928
|
+
}
|
|
929
|
+
return message;
|
|
930
|
+
},
|
|
931
|
+
|
|
932
|
+
fromJSON(object: any): QueryConnectionConsensusStateResponse {
|
|
933
|
+
return {
|
|
934
|
+
consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined,
|
|
935
|
+
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
936
|
+
proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(0),
|
|
937
|
+
proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined,
|
|
938
|
+
};
|
|
939
|
+
},
|
|
940
|
+
|
|
941
|
+
toJSON(message: QueryConnectionConsensusStateResponse): unknown {
|
|
942
|
+
const obj: any = {};
|
|
943
|
+
if (message.consensusState !== undefined) {
|
|
944
|
+
obj.consensusState = Any.toJSON(message.consensusState);
|
|
945
|
+
}
|
|
946
|
+
if (message.clientId !== "") {
|
|
947
|
+
obj.clientId = message.clientId;
|
|
948
|
+
}
|
|
949
|
+
if (message.proof.length !== 0) {
|
|
950
|
+
obj.proof = base64FromBytes(message.proof);
|
|
951
|
+
}
|
|
952
|
+
if (message.proofHeight !== undefined) {
|
|
953
|
+
obj.proofHeight = Height.toJSON(message.proofHeight);
|
|
954
|
+
}
|
|
955
|
+
return obj;
|
|
956
|
+
},
|
|
957
|
+
|
|
958
|
+
create<I extends Exact<DeepPartial<QueryConnectionConsensusStateResponse>, I>>(
|
|
959
|
+
base?: I,
|
|
960
|
+
): QueryConnectionConsensusStateResponse {
|
|
961
|
+
return QueryConnectionConsensusStateResponse.fromPartial(base ?? ({} as any));
|
|
962
|
+
},
|
|
963
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionConsensusStateResponse>, I>>(
|
|
964
|
+
object: I,
|
|
965
|
+
): QueryConnectionConsensusStateResponse {
|
|
966
|
+
const message = createBaseQueryConnectionConsensusStateResponse();
|
|
967
|
+
message.consensusState = (object.consensusState !== undefined && object.consensusState !== null)
|
|
968
|
+
? Any.fromPartial(object.consensusState)
|
|
969
|
+
: undefined;
|
|
970
|
+
message.clientId = object.clientId ?? "";
|
|
971
|
+
message.proof = object.proof ?? new Uint8Array(0);
|
|
972
|
+
message.proofHeight = (object.proofHeight !== undefined && object.proofHeight !== null)
|
|
973
|
+
? Height.fromPartial(object.proofHeight)
|
|
974
|
+
: undefined;
|
|
975
|
+
return message;
|
|
976
|
+
},
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
function createBaseQueryConnectionParamsRequest(): QueryConnectionParamsRequest {
|
|
980
|
+
return {};
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export const QueryConnectionParamsRequest = {
|
|
984
|
+
encode(_: QueryConnectionParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
985
|
+
return writer;
|
|
986
|
+
},
|
|
987
|
+
|
|
988
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionParamsRequest {
|
|
989
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
990
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
991
|
+
const message = createBaseQueryConnectionParamsRequest();
|
|
992
|
+
while (reader.pos < end) {
|
|
993
|
+
const tag = reader.uint32();
|
|
994
|
+
switch (tag >>> 3) {
|
|
995
|
+
}
|
|
996
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
997
|
+
break;
|
|
998
|
+
}
|
|
999
|
+
reader.skipType(tag & 7);
|
|
1000
|
+
}
|
|
1001
|
+
return message;
|
|
1002
|
+
},
|
|
1003
|
+
|
|
1004
|
+
fromJSON(_: any): QueryConnectionParamsRequest {
|
|
1005
|
+
return {};
|
|
1006
|
+
},
|
|
1007
|
+
|
|
1008
|
+
toJSON(_: QueryConnectionParamsRequest): unknown {
|
|
1009
|
+
const obj: any = {};
|
|
1010
|
+
return obj;
|
|
1011
|
+
},
|
|
1012
|
+
|
|
1013
|
+
create<I extends Exact<DeepPartial<QueryConnectionParamsRequest>, I>>(base?: I): QueryConnectionParamsRequest {
|
|
1014
|
+
return QueryConnectionParamsRequest.fromPartial(base ?? ({} as any));
|
|
1015
|
+
},
|
|
1016
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionParamsRequest>, I>>(_: I): QueryConnectionParamsRequest {
|
|
1017
|
+
const message = createBaseQueryConnectionParamsRequest();
|
|
1018
|
+
return message;
|
|
1019
|
+
},
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
function createBaseQueryConnectionParamsResponse(): QueryConnectionParamsResponse {
|
|
1023
|
+
return { params: undefined };
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
export const QueryConnectionParamsResponse = {
|
|
1027
|
+
encode(message: QueryConnectionParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1028
|
+
if (message.params !== undefined) {
|
|
1029
|
+
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
1030
|
+
}
|
|
1031
|
+
return writer;
|
|
1032
|
+
},
|
|
1033
|
+
|
|
1034
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionParamsResponse {
|
|
1035
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1036
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1037
|
+
const message = createBaseQueryConnectionParamsResponse();
|
|
1038
|
+
while (reader.pos < end) {
|
|
1039
|
+
const tag = reader.uint32();
|
|
1040
|
+
switch (tag >>> 3) {
|
|
1041
|
+
case 1:
|
|
1042
|
+
if (tag !== 10) {
|
|
1043
|
+
break;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
message.params = Params.decode(reader, reader.uint32());
|
|
1047
|
+
continue;
|
|
1048
|
+
}
|
|
1049
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1050
|
+
break;
|
|
1051
|
+
}
|
|
1052
|
+
reader.skipType(tag & 7);
|
|
1053
|
+
}
|
|
1054
|
+
return message;
|
|
1055
|
+
},
|
|
1056
|
+
|
|
1057
|
+
fromJSON(object: any): QueryConnectionParamsResponse {
|
|
1058
|
+
return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined };
|
|
1059
|
+
},
|
|
1060
|
+
|
|
1061
|
+
toJSON(message: QueryConnectionParamsResponse): unknown {
|
|
1062
|
+
const obj: any = {};
|
|
1063
|
+
if (message.params !== undefined) {
|
|
1064
|
+
obj.params = Params.toJSON(message.params);
|
|
1065
|
+
}
|
|
1066
|
+
return obj;
|
|
1067
|
+
},
|
|
1068
|
+
|
|
1069
|
+
create<I extends Exact<DeepPartial<QueryConnectionParamsResponse>, I>>(base?: I): QueryConnectionParamsResponse {
|
|
1070
|
+
return QueryConnectionParamsResponse.fromPartial(base ?? ({} as any));
|
|
1071
|
+
},
|
|
1072
|
+
fromPartial<I extends Exact<DeepPartial<QueryConnectionParamsResponse>, I>>(
|
|
1073
|
+
object: I,
|
|
1074
|
+
): QueryConnectionParamsResponse {
|
|
1075
|
+
const message = createBaseQueryConnectionParamsResponse();
|
|
1076
|
+
message.params = (object.params !== undefined && object.params !== null)
|
|
1077
|
+
? Params.fromPartial(object.params)
|
|
1078
|
+
: undefined;
|
|
1079
|
+
return message;
|
|
1080
|
+
},
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
/** Query provides defines the gRPC querier service */
|
|
1084
|
+
export interface Query {
|
|
1085
|
+
/** Connection queries an IBC connection end. */
|
|
1086
|
+
Connection(request: DeepPartial<QueryConnectionRequest>, metadata?: grpc.Metadata): Promise<QueryConnectionResponse>;
|
|
1087
|
+
/** Connections queries all the IBC connections of a chain. */
|
|
1088
|
+
Connections(
|
|
1089
|
+
request: DeepPartial<QueryConnectionsRequest>,
|
|
1090
|
+
metadata?: grpc.Metadata,
|
|
1091
|
+
): Promise<QueryConnectionsResponse>;
|
|
1092
|
+
/**
|
|
1093
|
+
* ClientConnections queries the connection paths associated with a client
|
|
1094
|
+
* state.
|
|
1095
|
+
*/
|
|
1096
|
+
ClientConnections(
|
|
1097
|
+
request: DeepPartial<QueryClientConnectionsRequest>,
|
|
1098
|
+
metadata?: grpc.Metadata,
|
|
1099
|
+
): Promise<QueryClientConnectionsResponse>;
|
|
1100
|
+
/**
|
|
1101
|
+
* ConnectionClientState queries the client state associated with the
|
|
1102
|
+
* connection.
|
|
1103
|
+
*/
|
|
1104
|
+
ConnectionClientState(
|
|
1105
|
+
request: DeepPartial<QueryConnectionClientStateRequest>,
|
|
1106
|
+
metadata?: grpc.Metadata,
|
|
1107
|
+
): Promise<QueryConnectionClientStateResponse>;
|
|
1108
|
+
/**
|
|
1109
|
+
* ConnectionConsensusState queries the consensus state associated with the
|
|
1110
|
+
* connection.
|
|
1111
|
+
*/
|
|
1112
|
+
ConnectionConsensusState(
|
|
1113
|
+
request: DeepPartial<QueryConnectionConsensusStateRequest>,
|
|
1114
|
+
metadata?: grpc.Metadata,
|
|
1115
|
+
): Promise<QueryConnectionConsensusStateResponse>;
|
|
1116
|
+
/** ConnectionParams queries all parameters of the ibc connection submodule. */
|
|
1117
|
+
ConnectionParams(
|
|
1118
|
+
request: DeepPartial<QueryConnectionParamsRequest>,
|
|
1119
|
+
metadata?: grpc.Metadata,
|
|
1120
|
+
): Promise<QueryConnectionParamsResponse>;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
export class QueryClientImpl implements Query {
|
|
1124
|
+
private readonly rpc: Rpc;
|
|
1125
|
+
|
|
1126
|
+
constructor(rpc: Rpc) {
|
|
1127
|
+
this.rpc = rpc;
|
|
1128
|
+
this.Connection = this.Connection.bind(this);
|
|
1129
|
+
this.Connections = this.Connections.bind(this);
|
|
1130
|
+
this.ClientConnections = this.ClientConnections.bind(this);
|
|
1131
|
+
this.ConnectionClientState = this.ConnectionClientState.bind(this);
|
|
1132
|
+
this.ConnectionConsensusState = this.ConnectionConsensusState.bind(this);
|
|
1133
|
+
this.ConnectionParams = this.ConnectionParams.bind(this);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
Connection(request: DeepPartial<QueryConnectionRequest>, metadata?: grpc.Metadata): Promise<QueryConnectionResponse> {
|
|
1137
|
+
return this.rpc.unary(QueryConnectionDesc, QueryConnectionRequest.fromPartial(request), metadata);
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
Connections(
|
|
1141
|
+
request: DeepPartial<QueryConnectionsRequest>,
|
|
1142
|
+
metadata?: grpc.Metadata,
|
|
1143
|
+
): Promise<QueryConnectionsResponse> {
|
|
1144
|
+
return this.rpc.unary(QueryConnectionsDesc, QueryConnectionsRequest.fromPartial(request), metadata);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
ClientConnections(
|
|
1148
|
+
request: DeepPartial<QueryClientConnectionsRequest>,
|
|
1149
|
+
metadata?: grpc.Metadata,
|
|
1150
|
+
): Promise<QueryClientConnectionsResponse> {
|
|
1151
|
+
return this.rpc.unary(QueryClientConnectionsDesc, QueryClientConnectionsRequest.fromPartial(request), metadata);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
ConnectionClientState(
|
|
1155
|
+
request: DeepPartial<QueryConnectionClientStateRequest>,
|
|
1156
|
+
metadata?: grpc.Metadata,
|
|
1157
|
+
): Promise<QueryConnectionClientStateResponse> {
|
|
1158
|
+
return this.rpc.unary(
|
|
1159
|
+
QueryConnectionClientStateDesc,
|
|
1160
|
+
QueryConnectionClientStateRequest.fromPartial(request),
|
|
1161
|
+
metadata,
|
|
1162
|
+
);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
ConnectionConsensusState(
|
|
1166
|
+
request: DeepPartial<QueryConnectionConsensusStateRequest>,
|
|
1167
|
+
metadata?: grpc.Metadata,
|
|
1168
|
+
): Promise<QueryConnectionConsensusStateResponse> {
|
|
1169
|
+
return this.rpc.unary(
|
|
1170
|
+
QueryConnectionConsensusStateDesc,
|
|
1171
|
+
QueryConnectionConsensusStateRequest.fromPartial(request),
|
|
1172
|
+
metadata,
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
ConnectionParams(
|
|
1177
|
+
request: DeepPartial<QueryConnectionParamsRequest>,
|
|
1178
|
+
metadata?: grpc.Metadata,
|
|
1179
|
+
): Promise<QueryConnectionParamsResponse> {
|
|
1180
|
+
return this.rpc.unary(QueryConnectionParamsDesc, QueryConnectionParamsRequest.fromPartial(request), metadata);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
export const QueryDesc = { serviceName: "ibc.core.connection.v1.Query" };
|
|
1185
|
+
|
|
1186
|
+
export const QueryConnectionDesc: UnaryMethodDefinitionish = {
|
|
1187
|
+
methodName: "Connection",
|
|
1188
|
+
service: QueryDesc,
|
|
1189
|
+
requestStream: false,
|
|
1190
|
+
responseStream: false,
|
|
1191
|
+
requestType: {
|
|
1192
|
+
serializeBinary() {
|
|
1193
|
+
return QueryConnectionRequest.encode(this).finish();
|
|
1194
|
+
},
|
|
1195
|
+
} as any,
|
|
1196
|
+
responseType: {
|
|
1197
|
+
deserializeBinary(data: Uint8Array) {
|
|
1198
|
+
const value = QueryConnectionResponse.decode(data);
|
|
1199
|
+
return {
|
|
1200
|
+
...value,
|
|
1201
|
+
toObject() {
|
|
1202
|
+
return value;
|
|
1203
|
+
},
|
|
1204
|
+
};
|
|
1205
|
+
},
|
|
1206
|
+
} as any,
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
export const QueryConnectionsDesc: UnaryMethodDefinitionish = {
|
|
1210
|
+
methodName: "Connections",
|
|
1211
|
+
service: QueryDesc,
|
|
1212
|
+
requestStream: false,
|
|
1213
|
+
responseStream: false,
|
|
1214
|
+
requestType: {
|
|
1215
|
+
serializeBinary() {
|
|
1216
|
+
return QueryConnectionsRequest.encode(this).finish();
|
|
1217
|
+
},
|
|
1218
|
+
} as any,
|
|
1219
|
+
responseType: {
|
|
1220
|
+
deserializeBinary(data: Uint8Array) {
|
|
1221
|
+
const value = QueryConnectionsResponse.decode(data);
|
|
1222
|
+
return {
|
|
1223
|
+
...value,
|
|
1224
|
+
toObject() {
|
|
1225
|
+
return value;
|
|
1226
|
+
},
|
|
1227
|
+
};
|
|
1228
|
+
},
|
|
1229
|
+
} as any,
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1232
|
+
export const QueryClientConnectionsDesc: UnaryMethodDefinitionish = {
|
|
1233
|
+
methodName: "ClientConnections",
|
|
1234
|
+
service: QueryDesc,
|
|
1235
|
+
requestStream: false,
|
|
1236
|
+
responseStream: false,
|
|
1237
|
+
requestType: {
|
|
1238
|
+
serializeBinary() {
|
|
1239
|
+
return QueryClientConnectionsRequest.encode(this).finish();
|
|
1240
|
+
},
|
|
1241
|
+
} as any,
|
|
1242
|
+
responseType: {
|
|
1243
|
+
deserializeBinary(data: Uint8Array) {
|
|
1244
|
+
const value = QueryClientConnectionsResponse.decode(data);
|
|
1245
|
+
return {
|
|
1246
|
+
...value,
|
|
1247
|
+
toObject() {
|
|
1248
|
+
return value;
|
|
1249
|
+
},
|
|
1250
|
+
};
|
|
1251
|
+
},
|
|
1252
|
+
} as any,
|
|
1253
|
+
};
|
|
1254
|
+
|
|
1255
|
+
export const QueryConnectionClientStateDesc: UnaryMethodDefinitionish = {
|
|
1256
|
+
methodName: "ConnectionClientState",
|
|
1257
|
+
service: QueryDesc,
|
|
1258
|
+
requestStream: false,
|
|
1259
|
+
responseStream: false,
|
|
1260
|
+
requestType: {
|
|
1261
|
+
serializeBinary() {
|
|
1262
|
+
return QueryConnectionClientStateRequest.encode(this).finish();
|
|
1263
|
+
},
|
|
1264
|
+
} as any,
|
|
1265
|
+
responseType: {
|
|
1266
|
+
deserializeBinary(data: Uint8Array) {
|
|
1267
|
+
const value = QueryConnectionClientStateResponse.decode(data);
|
|
1268
|
+
return {
|
|
1269
|
+
...value,
|
|
1270
|
+
toObject() {
|
|
1271
|
+
return value;
|
|
1272
|
+
},
|
|
1273
|
+
};
|
|
1274
|
+
},
|
|
1275
|
+
} as any,
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
export const QueryConnectionConsensusStateDesc: UnaryMethodDefinitionish = {
|
|
1279
|
+
methodName: "ConnectionConsensusState",
|
|
1280
|
+
service: QueryDesc,
|
|
1281
|
+
requestStream: false,
|
|
1282
|
+
responseStream: false,
|
|
1283
|
+
requestType: {
|
|
1284
|
+
serializeBinary() {
|
|
1285
|
+
return QueryConnectionConsensusStateRequest.encode(this).finish();
|
|
1286
|
+
},
|
|
1287
|
+
} as any,
|
|
1288
|
+
responseType: {
|
|
1289
|
+
deserializeBinary(data: Uint8Array) {
|
|
1290
|
+
const value = QueryConnectionConsensusStateResponse.decode(data);
|
|
1291
|
+
return {
|
|
1292
|
+
...value,
|
|
1293
|
+
toObject() {
|
|
1294
|
+
return value;
|
|
1295
|
+
},
|
|
1296
|
+
};
|
|
1297
|
+
},
|
|
1298
|
+
} as any,
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
export const QueryConnectionParamsDesc: UnaryMethodDefinitionish = {
|
|
1302
|
+
methodName: "ConnectionParams",
|
|
1303
|
+
service: QueryDesc,
|
|
1304
|
+
requestStream: false,
|
|
1305
|
+
responseStream: false,
|
|
1306
|
+
requestType: {
|
|
1307
|
+
serializeBinary() {
|
|
1308
|
+
return QueryConnectionParamsRequest.encode(this).finish();
|
|
1309
|
+
},
|
|
1310
|
+
} as any,
|
|
1311
|
+
responseType: {
|
|
1312
|
+
deserializeBinary(data: Uint8Array) {
|
|
1313
|
+
const value = QueryConnectionParamsResponse.decode(data);
|
|
1314
|
+
return {
|
|
1315
|
+
...value,
|
|
1316
|
+
toObject() {
|
|
1317
|
+
return value;
|
|
1318
|
+
},
|
|
1319
|
+
};
|
|
1320
|
+
},
|
|
1321
|
+
} as any,
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
|
|
1325
|
+
requestStream: any;
|
|
1326
|
+
responseStream: any;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
|
|
1330
|
+
|
|
1331
|
+
interface Rpc {
|
|
1332
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
1333
|
+
methodDesc: T,
|
|
1334
|
+
request: any,
|
|
1335
|
+
metadata: grpc.Metadata | undefined,
|
|
1336
|
+
): Promise<any>;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
export class GrpcWebImpl {
|
|
1340
|
+
private host: string;
|
|
1341
|
+
private options: {
|
|
1342
|
+
transport?: grpc.TransportFactory;
|
|
1343
|
+
|
|
1344
|
+
debug?: boolean;
|
|
1345
|
+
metadata?: grpc.Metadata;
|
|
1346
|
+
upStreamRetryCodes?: number[];
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
constructor(
|
|
1350
|
+
host: string,
|
|
1351
|
+
options: {
|
|
1352
|
+
transport?: grpc.TransportFactory;
|
|
1353
|
+
|
|
1354
|
+
debug?: boolean;
|
|
1355
|
+
metadata?: grpc.Metadata;
|
|
1356
|
+
upStreamRetryCodes?: number[];
|
|
1357
|
+
},
|
|
1358
|
+
) {
|
|
1359
|
+
this.host = host;
|
|
1360
|
+
this.options = options;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
1364
|
+
methodDesc: T,
|
|
1365
|
+
_request: any,
|
|
1366
|
+
metadata: grpc.Metadata | undefined,
|
|
1367
|
+
): Promise<any> {
|
|
1368
|
+
const request = { ..._request, ...methodDesc.requestType };
|
|
1369
|
+
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
1370
|
+
? new BrowserHeaders({ ...this.options?.metadata.headersMap, ...metadata?.headersMap })
|
|
1371
|
+
: metadata ?? this.options.metadata;
|
|
1372
|
+
return new Promise((resolve, reject) => {
|
|
1373
|
+
grpc.unary(methodDesc, {
|
|
1374
|
+
request,
|
|
1375
|
+
host: this.host,
|
|
1376
|
+
metadata: maybeCombinedMetadata ?? {},
|
|
1377
|
+
...(this.options.transport !== undefined ? { transport: this.options.transport } : {}),
|
|
1378
|
+
debug: this.options.debug ?? false,
|
|
1379
|
+
onEnd: function (response) {
|
|
1380
|
+
if (response.status === grpc.Code.OK) {
|
|
1381
|
+
resolve(response.message!.toObject());
|
|
1382
|
+
} else {
|
|
1383
|
+
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
1384
|
+
reject(err);
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
});
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
1393
|
+
if ((globalThis as any).Buffer) {
|
|
1394
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
1395
|
+
} else {
|
|
1396
|
+
const bin = globalThis.atob(b64);
|
|
1397
|
+
const arr = new Uint8Array(bin.length);
|
|
1398
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
1399
|
+
arr[i] = bin.charCodeAt(i);
|
|
1400
|
+
}
|
|
1401
|
+
return arr;
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
1406
|
+
if ((globalThis as any).Buffer) {
|
|
1407
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
1408
|
+
} else {
|
|
1409
|
+
const bin: string[] = [];
|
|
1410
|
+
arr.forEach((byte) => {
|
|
1411
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
1412
|
+
});
|
|
1413
|
+
return globalThis.btoa(bin.join(""));
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1418
|
+
|
|
1419
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
1420
|
+
: T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
1421
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
1422
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
1423
|
+
: Partial<T>;
|
|
1424
|
+
|
|
1425
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
1426
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
1427
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
1428
|
+
|
|
1429
|
+
if (_m0.util.Long !== Long) {
|
|
1430
|
+
_m0.util.Long = Long as any;
|
|
1431
|
+
_m0.configure();
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
function isSet(value: any): boolean {
|
|
1435
|
+
return value !== null && value !== undefined;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
export class GrpcWebError extends globalThis.Error {
|
|
1439
|
+
constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) {
|
|
1440
|
+
super(message);
|
|
1441
|
+
}
|
|
1442
|
+
}
|