@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,2208 @@
|
|
|
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/client/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 { MerklePath } from "../../commitment/v1/commitment";
|
|
15
|
+
import { ConsensusStateWithHeight, Height, IdentifiedClientState, Params } from "./client";
|
|
16
|
+
|
|
17
|
+
export const protobufPackage = "ibc.core.client.v1";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* QueryClientStateRequest is the request type for the Query/ClientState RPC
|
|
21
|
+
* method
|
|
22
|
+
*/
|
|
23
|
+
export interface QueryClientStateRequest {
|
|
24
|
+
/** client state unique identifier */
|
|
25
|
+
clientId: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* QueryClientStateResponse is the response type for the Query/ClientState RPC
|
|
30
|
+
* method. Besides the client state, it includes a proof and the height from
|
|
31
|
+
* which the proof was retrieved.
|
|
32
|
+
*/
|
|
33
|
+
export interface QueryClientStateResponse {
|
|
34
|
+
/** client state associated with the request identifier */
|
|
35
|
+
clientState?:
|
|
36
|
+
| Any
|
|
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
|
+
* QueryClientStatesRequest is the request type for the Query/ClientStates RPC
|
|
46
|
+
* method
|
|
47
|
+
*/
|
|
48
|
+
export interface QueryClientStatesRequest {
|
|
49
|
+
/** pagination request */
|
|
50
|
+
pagination?: PageRequest | undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* QueryClientStatesResponse is the response type for the Query/ClientStates RPC
|
|
55
|
+
* method.
|
|
56
|
+
*/
|
|
57
|
+
export interface QueryClientStatesResponse {
|
|
58
|
+
/** list of stored ClientStates of the chain. */
|
|
59
|
+
clientStates: IdentifiedClientState[];
|
|
60
|
+
/** pagination response */
|
|
61
|
+
pagination?: PageResponse | undefined;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* QueryConsensusStateRequest is the request type for the Query/ConsensusState
|
|
66
|
+
* RPC method. Besides the consensus state, it includes a proof and the height
|
|
67
|
+
* from which the proof was retrieved.
|
|
68
|
+
*/
|
|
69
|
+
export interface QueryConsensusStateRequest {
|
|
70
|
+
/** client identifier */
|
|
71
|
+
clientId: string;
|
|
72
|
+
/** consensus state revision number */
|
|
73
|
+
revisionNumber: Long;
|
|
74
|
+
/** consensus state revision height */
|
|
75
|
+
revisionHeight: Long;
|
|
76
|
+
/**
|
|
77
|
+
* latest_height overrrides the height field and queries the latest stored
|
|
78
|
+
* ConsensusState
|
|
79
|
+
*/
|
|
80
|
+
latestHeight: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* QueryConsensusStateResponse is the response type for the Query/ConsensusState
|
|
85
|
+
* RPC method
|
|
86
|
+
*/
|
|
87
|
+
export interface QueryConsensusStateResponse {
|
|
88
|
+
/** consensus state associated with the client identifier at the given height */
|
|
89
|
+
consensusState?:
|
|
90
|
+
| Any
|
|
91
|
+
| undefined;
|
|
92
|
+
/** merkle proof of existence */
|
|
93
|
+
proof: Uint8Array;
|
|
94
|
+
/** height at which the proof was retrieved */
|
|
95
|
+
proofHeight?: Height | undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* QueryConsensusStatesRequest is the request type for the Query/ConsensusStates
|
|
100
|
+
* RPC method.
|
|
101
|
+
*/
|
|
102
|
+
export interface QueryConsensusStatesRequest {
|
|
103
|
+
/** client identifier */
|
|
104
|
+
clientId: string;
|
|
105
|
+
/** pagination request */
|
|
106
|
+
pagination?: PageRequest | undefined;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* QueryConsensusStatesResponse is the response type for the
|
|
111
|
+
* Query/ConsensusStates RPC method
|
|
112
|
+
*/
|
|
113
|
+
export interface QueryConsensusStatesResponse {
|
|
114
|
+
/** consensus states associated with the identifier */
|
|
115
|
+
consensusStates: ConsensusStateWithHeight[];
|
|
116
|
+
/** pagination response */
|
|
117
|
+
pagination?: PageResponse | undefined;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights
|
|
122
|
+
* RPC method.
|
|
123
|
+
*/
|
|
124
|
+
export interface QueryConsensusStateHeightsRequest {
|
|
125
|
+
/** client identifier */
|
|
126
|
+
clientId: string;
|
|
127
|
+
/** pagination request */
|
|
128
|
+
pagination?: PageRequest | undefined;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* QueryConsensusStateHeightsResponse is the response type for the
|
|
133
|
+
* Query/ConsensusStateHeights RPC method
|
|
134
|
+
*/
|
|
135
|
+
export interface QueryConsensusStateHeightsResponse {
|
|
136
|
+
/** consensus state heights */
|
|
137
|
+
consensusStateHeights: Height[];
|
|
138
|
+
/** pagination response */
|
|
139
|
+
pagination?: PageResponse | undefined;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* QueryClientStatusRequest is the request type for the Query/ClientStatus RPC
|
|
144
|
+
* method
|
|
145
|
+
*/
|
|
146
|
+
export interface QueryClientStatusRequest {
|
|
147
|
+
/** client unique identifier */
|
|
148
|
+
clientId: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* QueryClientStatusResponse is the response type for the Query/ClientStatus RPC
|
|
153
|
+
* method. It returns the current status of the IBC client.
|
|
154
|
+
*/
|
|
155
|
+
export interface QueryClientStatusResponse {
|
|
156
|
+
status: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* QueryClientParamsRequest is the request type for the Query/ClientParams RPC
|
|
161
|
+
* method.
|
|
162
|
+
*/
|
|
163
|
+
export interface QueryClientParamsRequest {
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* QueryClientParamsResponse is the response type for the Query/ClientParams RPC
|
|
168
|
+
* method.
|
|
169
|
+
*/
|
|
170
|
+
export interface QueryClientParamsResponse {
|
|
171
|
+
/** params defines the parameters of the module. */
|
|
172
|
+
params?: Params | undefined;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* QueryUpgradedClientStateRequest is the request type for the
|
|
177
|
+
* Query/UpgradedClientState RPC method
|
|
178
|
+
*/
|
|
179
|
+
export interface QueryUpgradedClientStateRequest {
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* QueryUpgradedClientStateResponse is the response type for the
|
|
184
|
+
* Query/UpgradedClientState RPC method.
|
|
185
|
+
*/
|
|
186
|
+
export interface QueryUpgradedClientStateResponse {
|
|
187
|
+
/** client state associated with the request identifier */
|
|
188
|
+
upgradedClientState?: Any | undefined;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* QueryUpgradedConsensusStateRequest is the request type for the
|
|
193
|
+
* Query/UpgradedConsensusState RPC method
|
|
194
|
+
*/
|
|
195
|
+
export interface QueryUpgradedConsensusStateRequest {
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* QueryUpgradedConsensusStateResponse is the response type for the
|
|
200
|
+
* Query/UpgradedConsensusState RPC method.
|
|
201
|
+
*/
|
|
202
|
+
export interface QueryUpgradedConsensusStateResponse {
|
|
203
|
+
/** Consensus state associated with the request identifier */
|
|
204
|
+
upgradedConsensusState?: Any | undefined;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** QueryVerifyMembershipRequest is the request type for the Query/VerifyMembership RPC method */
|
|
208
|
+
export interface QueryVerifyMembershipRequest {
|
|
209
|
+
/** client unique identifier. */
|
|
210
|
+
clientId: string;
|
|
211
|
+
/** the proof to be verified by the client. */
|
|
212
|
+
proof: Uint8Array;
|
|
213
|
+
/** the height of the commitment root at which the proof is verified. */
|
|
214
|
+
proofHeight?:
|
|
215
|
+
| Height
|
|
216
|
+
| undefined;
|
|
217
|
+
/** the commitment key path. */
|
|
218
|
+
merklePath?:
|
|
219
|
+
| MerklePath
|
|
220
|
+
| undefined;
|
|
221
|
+
/** the value which is proven. */
|
|
222
|
+
value: Uint8Array;
|
|
223
|
+
/** optional time delay */
|
|
224
|
+
timeDelay: Long;
|
|
225
|
+
/** optional block delay */
|
|
226
|
+
blockDelay: Long;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** QueryVerifyMembershipResponse is the response type for the Query/VerifyMembership RPC method */
|
|
230
|
+
export interface QueryVerifyMembershipResponse {
|
|
231
|
+
/** boolean indicating success or failure of proof verification. */
|
|
232
|
+
success: boolean;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function createBaseQueryClientStateRequest(): QueryClientStateRequest {
|
|
236
|
+
return { clientId: "" };
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export const QueryClientStateRequest = {
|
|
240
|
+
encode(message: QueryClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
241
|
+
if (message.clientId !== "") {
|
|
242
|
+
writer.uint32(10).string(message.clientId);
|
|
243
|
+
}
|
|
244
|
+
return writer;
|
|
245
|
+
},
|
|
246
|
+
|
|
247
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStateRequest {
|
|
248
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
249
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
250
|
+
const message = createBaseQueryClientStateRequest();
|
|
251
|
+
while (reader.pos < end) {
|
|
252
|
+
const tag = reader.uint32();
|
|
253
|
+
switch (tag >>> 3) {
|
|
254
|
+
case 1:
|
|
255
|
+
if (tag !== 10) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
message.clientId = reader.string();
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
reader.skipType(tag & 7);
|
|
266
|
+
}
|
|
267
|
+
return message;
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
fromJSON(object: any): QueryClientStateRequest {
|
|
271
|
+
return { clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "" };
|
|
272
|
+
},
|
|
273
|
+
|
|
274
|
+
toJSON(message: QueryClientStateRequest): unknown {
|
|
275
|
+
const obj: any = {};
|
|
276
|
+
if (message.clientId !== "") {
|
|
277
|
+
obj.clientId = message.clientId;
|
|
278
|
+
}
|
|
279
|
+
return obj;
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
create<I extends Exact<DeepPartial<QueryClientStateRequest>, I>>(base?: I): QueryClientStateRequest {
|
|
283
|
+
return QueryClientStateRequest.fromPartial(base ?? ({} as any));
|
|
284
|
+
},
|
|
285
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientStateRequest>, I>>(object: I): QueryClientStateRequest {
|
|
286
|
+
const message = createBaseQueryClientStateRequest();
|
|
287
|
+
message.clientId = object.clientId ?? "";
|
|
288
|
+
return message;
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
function createBaseQueryClientStateResponse(): QueryClientStateResponse {
|
|
293
|
+
return { clientState: undefined, proof: new Uint8Array(0), proofHeight: undefined };
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export const QueryClientStateResponse = {
|
|
297
|
+
encode(message: QueryClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
298
|
+
if (message.clientState !== undefined) {
|
|
299
|
+
Any.encode(message.clientState, writer.uint32(10).fork()).ldelim();
|
|
300
|
+
}
|
|
301
|
+
if (message.proof.length !== 0) {
|
|
302
|
+
writer.uint32(18).bytes(message.proof);
|
|
303
|
+
}
|
|
304
|
+
if (message.proofHeight !== undefined) {
|
|
305
|
+
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
|
306
|
+
}
|
|
307
|
+
return writer;
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStateResponse {
|
|
311
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
312
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
313
|
+
const message = createBaseQueryClientStateResponse();
|
|
314
|
+
while (reader.pos < end) {
|
|
315
|
+
const tag = reader.uint32();
|
|
316
|
+
switch (tag >>> 3) {
|
|
317
|
+
case 1:
|
|
318
|
+
if (tag !== 10) {
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
message.clientState = Any.decode(reader, reader.uint32());
|
|
323
|
+
continue;
|
|
324
|
+
case 2:
|
|
325
|
+
if (tag !== 18) {
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
message.proof = reader.bytes();
|
|
330
|
+
continue;
|
|
331
|
+
case 3:
|
|
332
|
+
if (tag !== 26) {
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
message.proofHeight = Height.decode(reader, reader.uint32());
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
reader.skipType(tag & 7);
|
|
343
|
+
}
|
|
344
|
+
return message;
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
fromJSON(object: any): QueryClientStateResponse {
|
|
348
|
+
return {
|
|
349
|
+
clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined,
|
|
350
|
+
proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(0),
|
|
351
|
+
proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined,
|
|
352
|
+
};
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
toJSON(message: QueryClientStateResponse): unknown {
|
|
356
|
+
const obj: any = {};
|
|
357
|
+
if (message.clientState !== undefined) {
|
|
358
|
+
obj.clientState = Any.toJSON(message.clientState);
|
|
359
|
+
}
|
|
360
|
+
if (message.proof.length !== 0) {
|
|
361
|
+
obj.proof = base64FromBytes(message.proof);
|
|
362
|
+
}
|
|
363
|
+
if (message.proofHeight !== undefined) {
|
|
364
|
+
obj.proofHeight = Height.toJSON(message.proofHeight);
|
|
365
|
+
}
|
|
366
|
+
return obj;
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
create<I extends Exact<DeepPartial<QueryClientStateResponse>, I>>(base?: I): QueryClientStateResponse {
|
|
370
|
+
return QueryClientStateResponse.fromPartial(base ?? ({} as any));
|
|
371
|
+
},
|
|
372
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientStateResponse>, I>>(object: I): QueryClientStateResponse {
|
|
373
|
+
const message = createBaseQueryClientStateResponse();
|
|
374
|
+
message.clientState = (object.clientState !== undefined && object.clientState !== null)
|
|
375
|
+
? Any.fromPartial(object.clientState)
|
|
376
|
+
: undefined;
|
|
377
|
+
message.proof = object.proof ?? new Uint8Array(0);
|
|
378
|
+
message.proofHeight = (object.proofHeight !== undefined && object.proofHeight !== null)
|
|
379
|
+
? Height.fromPartial(object.proofHeight)
|
|
380
|
+
: undefined;
|
|
381
|
+
return message;
|
|
382
|
+
},
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
function createBaseQueryClientStatesRequest(): QueryClientStatesRequest {
|
|
386
|
+
return { pagination: undefined };
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export const QueryClientStatesRequest = {
|
|
390
|
+
encode(message: QueryClientStatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
391
|
+
if (message.pagination !== undefined) {
|
|
392
|
+
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
393
|
+
}
|
|
394
|
+
return writer;
|
|
395
|
+
},
|
|
396
|
+
|
|
397
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStatesRequest {
|
|
398
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
399
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
400
|
+
const message = createBaseQueryClientStatesRequest();
|
|
401
|
+
while (reader.pos < end) {
|
|
402
|
+
const tag = reader.uint32();
|
|
403
|
+
switch (tag >>> 3) {
|
|
404
|
+
case 1:
|
|
405
|
+
if (tag !== 10) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
reader.skipType(tag & 7);
|
|
416
|
+
}
|
|
417
|
+
return message;
|
|
418
|
+
},
|
|
419
|
+
|
|
420
|
+
fromJSON(object: any): QueryClientStatesRequest {
|
|
421
|
+
return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined };
|
|
422
|
+
},
|
|
423
|
+
|
|
424
|
+
toJSON(message: QueryClientStatesRequest): unknown {
|
|
425
|
+
const obj: any = {};
|
|
426
|
+
if (message.pagination !== undefined) {
|
|
427
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
428
|
+
}
|
|
429
|
+
return obj;
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
create<I extends Exact<DeepPartial<QueryClientStatesRequest>, I>>(base?: I): QueryClientStatesRequest {
|
|
433
|
+
return QueryClientStatesRequest.fromPartial(base ?? ({} as any));
|
|
434
|
+
},
|
|
435
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientStatesRequest>, I>>(object: I): QueryClientStatesRequest {
|
|
436
|
+
const message = createBaseQueryClientStatesRequest();
|
|
437
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
438
|
+
? PageRequest.fromPartial(object.pagination)
|
|
439
|
+
: undefined;
|
|
440
|
+
return message;
|
|
441
|
+
},
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
function createBaseQueryClientStatesResponse(): QueryClientStatesResponse {
|
|
445
|
+
return { clientStates: [], pagination: undefined };
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export const QueryClientStatesResponse = {
|
|
449
|
+
encode(message: QueryClientStatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
450
|
+
for (const v of message.clientStates) {
|
|
451
|
+
IdentifiedClientState.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
452
|
+
}
|
|
453
|
+
if (message.pagination !== undefined) {
|
|
454
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
455
|
+
}
|
|
456
|
+
return writer;
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStatesResponse {
|
|
460
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
461
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
462
|
+
const message = createBaseQueryClientStatesResponse();
|
|
463
|
+
while (reader.pos < end) {
|
|
464
|
+
const tag = reader.uint32();
|
|
465
|
+
switch (tag >>> 3) {
|
|
466
|
+
case 1:
|
|
467
|
+
if (tag !== 10) {
|
|
468
|
+
break;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
message.clientStates.push(IdentifiedClientState.decode(reader, reader.uint32()));
|
|
472
|
+
continue;
|
|
473
|
+
case 2:
|
|
474
|
+
if (tag !== 18) {
|
|
475
|
+
break;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
481
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
reader.skipType(tag & 7);
|
|
485
|
+
}
|
|
486
|
+
return message;
|
|
487
|
+
},
|
|
488
|
+
|
|
489
|
+
fromJSON(object: any): QueryClientStatesResponse {
|
|
490
|
+
return {
|
|
491
|
+
clientStates: globalThis.Array.isArray(object?.clientStates)
|
|
492
|
+
? object.clientStates.map((e: any) => IdentifiedClientState.fromJSON(e))
|
|
493
|
+
: [],
|
|
494
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
495
|
+
};
|
|
496
|
+
},
|
|
497
|
+
|
|
498
|
+
toJSON(message: QueryClientStatesResponse): unknown {
|
|
499
|
+
const obj: any = {};
|
|
500
|
+
if (message.clientStates?.length) {
|
|
501
|
+
obj.clientStates = message.clientStates.map((e) => IdentifiedClientState.toJSON(e));
|
|
502
|
+
}
|
|
503
|
+
if (message.pagination !== undefined) {
|
|
504
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
505
|
+
}
|
|
506
|
+
return obj;
|
|
507
|
+
},
|
|
508
|
+
|
|
509
|
+
create<I extends Exact<DeepPartial<QueryClientStatesResponse>, I>>(base?: I): QueryClientStatesResponse {
|
|
510
|
+
return QueryClientStatesResponse.fromPartial(base ?? ({} as any));
|
|
511
|
+
},
|
|
512
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientStatesResponse>, I>>(object: I): QueryClientStatesResponse {
|
|
513
|
+
const message = createBaseQueryClientStatesResponse();
|
|
514
|
+
message.clientStates = object.clientStates?.map((e) => IdentifiedClientState.fromPartial(e)) || [];
|
|
515
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
516
|
+
? PageResponse.fromPartial(object.pagination)
|
|
517
|
+
: undefined;
|
|
518
|
+
return message;
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
function createBaseQueryConsensusStateRequest(): QueryConsensusStateRequest {
|
|
523
|
+
return { clientId: "", revisionNumber: Long.UZERO, revisionHeight: Long.UZERO, latestHeight: false };
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export const QueryConsensusStateRequest = {
|
|
527
|
+
encode(message: QueryConsensusStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
528
|
+
if (message.clientId !== "") {
|
|
529
|
+
writer.uint32(10).string(message.clientId);
|
|
530
|
+
}
|
|
531
|
+
if (!message.revisionNumber.equals(Long.UZERO)) {
|
|
532
|
+
writer.uint32(16).uint64(message.revisionNumber);
|
|
533
|
+
}
|
|
534
|
+
if (!message.revisionHeight.equals(Long.UZERO)) {
|
|
535
|
+
writer.uint32(24).uint64(message.revisionHeight);
|
|
536
|
+
}
|
|
537
|
+
if (message.latestHeight !== false) {
|
|
538
|
+
writer.uint32(32).bool(message.latestHeight);
|
|
539
|
+
}
|
|
540
|
+
return writer;
|
|
541
|
+
},
|
|
542
|
+
|
|
543
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateRequest {
|
|
544
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
545
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
546
|
+
const message = createBaseQueryConsensusStateRequest();
|
|
547
|
+
while (reader.pos < end) {
|
|
548
|
+
const tag = reader.uint32();
|
|
549
|
+
switch (tag >>> 3) {
|
|
550
|
+
case 1:
|
|
551
|
+
if (tag !== 10) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
message.clientId = reader.string();
|
|
556
|
+
continue;
|
|
557
|
+
case 2:
|
|
558
|
+
if (tag !== 16) {
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
message.revisionNumber = reader.uint64() as Long;
|
|
563
|
+
continue;
|
|
564
|
+
case 3:
|
|
565
|
+
if (tag !== 24) {
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
message.revisionHeight = reader.uint64() as Long;
|
|
570
|
+
continue;
|
|
571
|
+
case 4:
|
|
572
|
+
if (tag !== 32) {
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
message.latestHeight = reader.bool();
|
|
577
|
+
continue;
|
|
578
|
+
}
|
|
579
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
reader.skipType(tag & 7);
|
|
583
|
+
}
|
|
584
|
+
return message;
|
|
585
|
+
},
|
|
586
|
+
|
|
587
|
+
fromJSON(object: any): QueryConsensusStateRequest {
|
|
588
|
+
return {
|
|
589
|
+
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
590
|
+
revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO,
|
|
591
|
+
revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO,
|
|
592
|
+
latestHeight: isSet(object.latestHeight) ? globalThis.Boolean(object.latestHeight) : false,
|
|
593
|
+
};
|
|
594
|
+
},
|
|
595
|
+
|
|
596
|
+
toJSON(message: QueryConsensusStateRequest): unknown {
|
|
597
|
+
const obj: any = {};
|
|
598
|
+
if (message.clientId !== "") {
|
|
599
|
+
obj.clientId = message.clientId;
|
|
600
|
+
}
|
|
601
|
+
if (!message.revisionNumber.equals(Long.UZERO)) {
|
|
602
|
+
obj.revisionNumber = (message.revisionNumber || Long.UZERO).toString();
|
|
603
|
+
}
|
|
604
|
+
if (!message.revisionHeight.equals(Long.UZERO)) {
|
|
605
|
+
obj.revisionHeight = (message.revisionHeight || Long.UZERO).toString();
|
|
606
|
+
}
|
|
607
|
+
if (message.latestHeight !== false) {
|
|
608
|
+
obj.latestHeight = message.latestHeight;
|
|
609
|
+
}
|
|
610
|
+
return obj;
|
|
611
|
+
},
|
|
612
|
+
|
|
613
|
+
create<I extends Exact<DeepPartial<QueryConsensusStateRequest>, I>>(base?: I): QueryConsensusStateRequest {
|
|
614
|
+
return QueryConsensusStateRequest.fromPartial(base ?? ({} as any));
|
|
615
|
+
},
|
|
616
|
+
fromPartial<I extends Exact<DeepPartial<QueryConsensusStateRequest>, I>>(object: I): QueryConsensusStateRequest {
|
|
617
|
+
const message = createBaseQueryConsensusStateRequest();
|
|
618
|
+
message.clientId = object.clientId ?? "";
|
|
619
|
+
message.revisionNumber = (object.revisionNumber !== undefined && object.revisionNumber !== null)
|
|
620
|
+
? Long.fromValue(object.revisionNumber)
|
|
621
|
+
: Long.UZERO;
|
|
622
|
+
message.revisionHeight = (object.revisionHeight !== undefined && object.revisionHeight !== null)
|
|
623
|
+
? Long.fromValue(object.revisionHeight)
|
|
624
|
+
: Long.UZERO;
|
|
625
|
+
message.latestHeight = object.latestHeight ?? false;
|
|
626
|
+
return message;
|
|
627
|
+
},
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
function createBaseQueryConsensusStateResponse(): QueryConsensusStateResponse {
|
|
631
|
+
return { consensusState: undefined, proof: new Uint8Array(0), proofHeight: undefined };
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export const QueryConsensusStateResponse = {
|
|
635
|
+
encode(message: QueryConsensusStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
636
|
+
if (message.consensusState !== undefined) {
|
|
637
|
+
Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim();
|
|
638
|
+
}
|
|
639
|
+
if (message.proof.length !== 0) {
|
|
640
|
+
writer.uint32(18).bytes(message.proof);
|
|
641
|
+
}
|
|
642
|
+
if (message.proofHeight !== undefined) {
|
|
643
|
+
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
|
644
|
+
}
|
|
645
|
+
return writer;
|
|
646
|
+
},
|
|
647
|
+
|
|
648
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateResponse {
|
|
649
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
650
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
651
|
+
const message = createBaseQueryConsensusStateResponse();
|
|
652
|
+
while (reader.pos < end) {
|
|
653
|
+
const tag = reader.uint32();
|
|
654
|
+
switch (tag >>> 3) {
|
|
655
|
+
case 1:
|
|
656
|
+
if (tag !== 10) {
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
message.consensusState = Any.decode(reader, reader.uint32());
|
|
661
|
+
continue;
|
|
662
|
+
case 2:
|
|
663
|
+
if (tag !== 18) {
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
message.proof = reader.bytes();
|
|
668
|
+
continue;
|
|
669
|
+
case 3:
|
|
670
|
+
if (tag !== 26) {
|
|
671
|
+
break;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
message.proofHeight = Height.decode(reader, reader.uint32());
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
678
|
+
break;
|
|
679
|
+
}
|
|
680
|
+
reader.skipType(tag & 7);
|
|
681
|
+
}
|
|
682
|
+
return message;
|
|
683
|
+
},
|
|
684
|
+
|
|
685
|
+
fromJSON(object: any): QueryConsensusStateResponse {
|
|
686
|
+
return {
|
|
687
|
+
consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined,
|
|
688
|
+
proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(0),
|
|
689
|
+
proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined,
|
|
690
|
+
};
|
|
691
|
+
},
|
|
692
|
+
|
|
693
|
+
toJSON(message: QueryConsensusStateResponse): unknown {
|
|
694
|
+
const obj: any = {};
|
|
695
|
+
if (message.consensusState !== undefined) {
|
|
696
|
+
obj.consensusState = Any.toJSON(message.consensusState);
|
|
697
|
+
}
|
|
698
|
+
if (message.proof.length !== 0) {
|
|
699
|
+
obj.proof = base64FromBytes(message.proof);
|
|
700
|
+
}
|
|
701
|
+
if (message.proofHeight !== undefined) {
|
|
702
|
+
obj.proofHeight = Height.toJSON(message.proofHeight);
|
|
703
|
+
}
|
|
704
|
+
return obj;
|
|
705
|
+
},
|
|
706
|
+
|
|
707
|
+
create<I extends Exact<DeepPartial<QueryConsensusStateResponse>, I>>(base?: I): QueryConsensusStateResponse {
|
|
708
|
+
return QueryConsensusStateResponse.fromPartial(base ?? ({} as any));
|
|
709
|
+
},
|
|
710
|
+
fromPartial<I extends Exact<DeepPartial<QueryConsensusStateResponse>, I>>(object: I): QueryConsensusStateResponse {
|
|
711
|
+
const message = createBaseQueryConsensusStateResponse();
|
|
712
|
+
message.consensusState = (object.consensusState !== undefined && object.consensusState !== null)
|
|
713
|
+
? Any.fromPartial(object.consensusState)
|
|
714
|
+
: undefined;
|
|
715
|
+
message.proof = object.proof ?? new Uint8Array(0);
|
|
716
|
+
message.proofHeight = (object.proofHeight !== undefined && object.proofHeight !== null)
|
|
717
|
+
? Height.fromPartial(object.proofHeight)
|
|
718
|
+
: undefined;
|
|
719
|
+
return message;
|
|
720
|
+
},
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
function createBaseQueryConsensusStatesRequest(): QueryConsensusStatesRequest {
|
|
724
|
+
return { clientId: "", pagination: undefined };
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export const QueryConsensusStatesRequest = {
|
|
728
|
+
encode(message: QueryConsensusStatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
729
|
+
if (message.clientId !== "") {
|
|
730
|
+
writer.uint32(10).string(message.clientId);
|
|
731
|
+
}
|
|
732
|
+
if (message.pagination !== undefined) {
|
|
733
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
734
|
+
}
|
|
735
|
+
return writer;
|
|
736
|
+
},
|
|
737
|
+
|
|
738
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStatesRequest {
|
|
739
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
740
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
741
|
+
const message = createBaseQueryConsensusStatesRequest();
|
|
742
|
+
while (reader.pos < end) {
|
|
743
|
+
const tag = reader.uint32();
|
|
744
|
+
switch (tag >>> 3) {
|
|
745
|
+
case 1:
|
|
746
|
+
if (tag !== 10) {
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
message.clientId = reader.string();
|
|
751
|
+
continue;
|
|
752
|
+
case 2:
|
|
753
|
+
if (tag !== 18) {
|
|
754
|
+
break;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
758
|
+
continue;
|
|
759
|
+
}
|
|
760
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
761
|
+
break;
|
|
762
|
+
}
|
|
763
|
+
reader.skipType(tag & 7);
|
|
764
|
+
}
|
|
765
|
+
return message;
|
|
766
|
+
},
|
|
767
|
+
|
|
768
|
+
fromJSON(object: any): QueryConsensusStatesRequest {
|
|
769
|
+
return {
|
|
770
|
+
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
771
|
+
pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
|
|
772
|
+
};
|
|
773
|
+
},
|
|
774
|
+
|
|
775
|
+
toJSON(message: QueryConsensusStatesRequest): unknown {
|
|
776
|
+
const obj: any = {};
|
|
777
|
+
if (message.clientId !== "") {
|
|
778
|
+
obj.clientId = message.clientId;
|
|
779
|
+
}
|
|
780
|
+
if (message.pagination !== undefined) {
|
|
781
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
782
|
+
}
|
|
783
|
+
return obj;
|
|
784
|
+
},
|
|
785
|
+
|
|
786
|
+
create<I extends Exact<DeepPartial<QueryConsensusStatesRequest>, I>>(base?: I): QueryConsensusStatesRequest {
|
|
787
|
+
return QueryConsensusStatesRequest.fromPartial(base ?? ({} as any));
|
|
788
|
+
},
|
|
789
|
+
fromPartial<I extends Exact<DeepPartial<QueryConsensusStatesRequest>, I>>(object: I): QueryConsensusStatesRequest {
|
|
790
|
+
const message = createBaseQueryConsensusStatesRequest();
|
|
791
|
+
message.clientId = object.clientId ?? "";
|
|
792
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
793
|
+
? PageRequest.fromPartial(object.pagination)
|
|
794
|
+
: undefined;
|
|
795
|
+
return message;
|
|
796
|
+
},
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
function createBaseQueryConsensusStatesResponse(): QueryConsensusStatesResponse {
|
|
800
|
+
return { consensusStates: [], pagination: undefined };
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export const QueryConsensusStatesResponse = {
|
|
804
|
+
encode(message: QueryConsensusStatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
805
|
+
for (const v of message.consensusStates) {
|
|
806
|
+
ConsensusStateWithHeight.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
807
|
+
}
|
|
808
|
+
if (message.pagination !== undefined) {
|
|
809
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
810
|
+
}
|
|
811
|
+
return writer;
|
|
812
|
+
},
|
|
813
|
+
|
|
814
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStatesResponse {
|
|
815
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
816
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
817
|
+
const message = createBaseQueryConsensusStatesResponse();
|
|
818
|
+
while (reader.pos < end) {
|
|
819
|
+
const tag = reader.uint32();
|
|
820
|
+
switch (tag >>> 3) {
|
|
821
|
+
case 1:
|
|
822
|
+
if (tag !== 10) {
|
|
823
|
+
break;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32()));
|
|
827
|
+
continue;
|
|
828
|
+
case 2:
|
|
829
|
+
if (tag !== 18) {
|
|
830
|
+
break;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
834
|
+
continue;
|
|
835
|
+
}
|
|
836
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
reader.skipType(tag & 7);
|
|
840
|
+
}
|
|
841
|
+
return message;
|
|
842
|
+
},
|
|
843
|
+
|
|
844
|
+
fromJSON(object: any): QueryConsensusStatesResponse {
|
|
845
|
+
return {
|
|
846
|
+
consensusStates: globalThis.Array.isArray(object?.consensusStates)
|
|
847
|
+
? object.consensusStates.map((e: any) => ConsensusStateWithHeight.fromJSON(e))
|
|
848
|
+
: [],
|
|
849
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
850
|
+
};
|
|
851
|
+
},
|
|
852
|
+
|
|
853
|
+
toJSON(message: QueryConsensusStatesResponse): unknown {
|
|
854
|
+
const obj: any = {};
|
|
855
|
+
if (message.consensusStates?.length) {
|
|
856
|
+
obj.consensusStates = message.consensusStates.map((e) => ConsensusStateWithHeight.toJSON(e));
|
|
857
|
+
}
|
|
858
|
+
if (message.pagination !== undefined) {
|
|
859
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
860
|
+
}
|
|
861
|
+
return obj;
|
|
862
|
+
},
|
|
863
|
+
|
|
864
|
+
create<I extends Exact<DeepPartial<QueryConsensusStatesResponse>, I>>(base?: I): QueryConsensusStatesResponse {
|
|
865
|
+
return QueryConsensusStatesResponse.fromPartial(base ?? ({} as any));
|
|
866
|
+
},
|
|
867
|
+
fromPartial<I extends Exact<DeepPartial<QueryConsensusStatesResponse>, I>>(object: I): QueryConsensusStatesResponse {
|
|
868
|
+
const message = createBaseQueryConsensusStatesResponse();
|
|
869
|
+
message.consensusStates = object.consensusStates?.map((e) => ConsensusStateWithHeight.fromPartial(e)) || [];
|
|
870
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
871
|
+
? PageResponse.fromPartial(object.pagination)
|
|
872
|
+
: undefined;
|
|
873
|
+
return message;
|
|
874
|
+
},
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
function createBaseQueryConsensusStateHeightsRequest(): QueryConsensusStateHeightsRequest {
|
|
878
|
+
return { clientId: "", pagination: undefined };
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export const QueryConsensusStateHeightsRequest = {
|
|
882
|
+
encode(message: QueryConsensusStateHeightsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
883
|
+
if (message.clientId !== "") {
|
|
884
|
+
writer.uint32(10).string(message.clientId);
|
|
885
|
+
}
|
|
886
|
+
if (message.pagination !== undefined) {
|
|
887
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
888
|
+
}
|
|
889
|
+
return writer;
|
|
890
|
+
},
|
|
891
|
+
|
|
892
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateHeightsRequest {
|
|
893
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
894
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
895
|
+
const message = createBaseQueryConsensusStateHeightsRequest();
|
|
896
|
+
while (reader.pos < end) {
|
|
897
|
+
const tag = reader.uint32();
|
|
898
|
+
switch (tag >>> 3) {
|
|
899
|
+
case 1:
|
|
900
|
+
if (tag !== 10) {
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
message.clientId = reader.string();
|
|
905
|
+
continue;
|
|
906
|
+
case 2:
|
|
907
|
+
if (tag !== 18) {
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
912
|
+
continue;
|
|
913
|
+
}
|
|
914
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
reader.skipType(tag & 7);
|
|
918
|
+
}
|
|
919
|
+
return message;
|
|
920
|
+
},
|
|
921
|
+
|
|
922
|
+
fromJSON(object: any): QueryConsensusStateHeightsRequest {
|
|
923
|
+
return {
|
|
924
|
+
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
925
|
+
pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
|
|
926
|
+
};
|
|
927
|
+
},
|
|
928
|
+
|
|
929
|
+
toJSON(message: QueryConsensusStateHeightsRequest): unknown {
|
|
930
|
+
const obj: any = {};
|
|
931
|
+
if (message.clientId !== "") {
|
|
932
|
+
obj.clientId = message.clientId;
|
|
933
|
+
}
|
|
934
|
+
if (message.pagination !== undefined) {
|
|
935
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
936
|
+
}
|
|
937
|
+
return obj;
|
|
938
|
+
},
|
|
939
|
+
|
|
940
|
+
create<I extends Exact<DeepPartial<QueryConsensusStateHeightsRequest>, I>>(
|
|
941
|
+
base?: I,
|
|
942
|
+
): QueryConsensusStateHeightsRequest {
|
|
943
|
+
return QueryConsensusStateHeightsRequest.fromPartial(base ?? ({} as any));
|
|
944
|
+
},
|
|
945
|
+
fromPartial<I extends Exact<DeepPartial<QueryConsensusStateHeightsRequest>, I>>(
|
|
946
|
+
object: I,
|
|
947
|
+
): QueryConsensusStateHeightsRequest {
|
|
948
|
+
const message = createBaseQueryConsensusStateHeightsRequest();
|
|
949
|
+
message.clientId = object.clientId ?? "";
|
|
950
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
951
|
+
? PageRequest.fromPartial(object.pagination)
|
|
952
|
+
: undefined;
|
|
953
|
+
return message;
|
|
954
|
+
},
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
function createBaseQueryConsensusStateHeightsResponse(): QueryConsensusStateHeightsResponse {
|
|
958
|
+
return { consensusStateHeights: [], pagination: undefined };
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export const QueryConsensusStateHeightsResponse = {
|
|
962
|
+
encode(message: QueryConsensusStateHeightsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
963
|
+
for (const v of message.consensusStateHeights) {
|
|
964
|
+
Height.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
965
|
+
}
|
|
966
|
+
if (message.pagination !== undefined) {
|
|
967
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
968
|
+
}
|
|
969
|
+
return writer;
|
|
970
|
+
},
|
|
971
|
+
|
|
972
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateHeightsResponse {
|
|
973
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
974
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
975
|
+
const message = createBaseQueryConsensusStateHeightsResponse();
|
|
976
|
+
while (reader.pos < end) {
|
|
977
|
+
const tag = reader.uint32();
|
|
978
|
+
switch (tag >>> 3) {
|
|
979
|
+
case 1:
|
|
980
|
+
if (tag !== 10) {
|
|
981
|
+
break;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
message.consensusStateHeights.push(Height.decode(reader, reader.uint32()));
|
|
985
|
+
continue;
|
|
986
|
+
case 2:
|
|
987
|
+
if (tag !== 18) {
|
|
988
|
+
break;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
992
|
+
continue;
|
|
993
|
+
}
|
|
994
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
995
|
+
break;
|
|
996
|
+
}
|
|
997
|
+
reader.skipType(tag & 7);
|
|
998
|
+
}
|
|
999
|
+
return message;
|
|
1000
|
+
},
|
|
1001
|
+
|
|
1002
|
+
fromJSON(object: any): QueryConsensusStateHeightsResponse {
|
|
1003
|
+
return {
|
|
1004
|
+
consensusStateHeights: globalThis.Array.isArray(object?.consensusStateHeights)
|
|
1005
|
+
? object.consensusStateHeights.map((e: any) => Height.fromJSON(e))
|
|
1006
|
+
: [],
|
|
1007
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
1008
|
+
};
|
|
1009
|
+
},
|
|
1010
|
+
|
|
1011
|
+
toJSON(message: QueryConsensusStateHeightsResponse): unknown {
|
|
1012
|
+
const obj: any = {};
|
|
1013
|
+
if (message.consensusStateHeights?.length) {
|
|
1014
|
+
obj.consensusStateHeights = message.consensusStateHeights.map((e) => Height.toJSON(e));
|
|
1015
|
+
}
|
|
1016
|
+
if (message.pagination !== undefined) {
|
|
1017
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
1018
|
+
}
|
|
1019
|
+
return obj;
|
|
1020
|
+
},
|
|
1021
|
+
|
|
1022
|
+
create<I extends Exact<DeepPartial<QueryConsensusStateHeightsResponse>, I>>(
|
|
1023
|
+
base?: I,
|
|
1024
|
+
): QueryConsensusStateHeightsResponse {
|
|
1025
|
+
return QueryConsensusStateHeightsResponse.fromPartial(base ?? ({} as any));
|
|
1026
|
+
},
|
|
1027
|
+
fromPartial<I extends Exact<DeepPartial<QueryConsensusStateHeightsResponse>, I>>(
|
|
1028
|
+
object: I,
|
|
1029
|
+
): QueryConsensusStateHeightsResponse {
|
|
1030
|
+
const message = createBaseQueryConsensusStateHeightsResponse();
|
|
1031
|
+
message.consensusStateHeights = object.consensusStateHeights?.map((e) => Height.fromPartial(e)) || [];
|
|
1032
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1033
|
+
? PageResponse.fromPartial(object.pagination)
|
|
1034
|
+
: undefined;
|
|
1035
|
+
return message;
|
|
1036
|
+
},
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
function createBaseQueryClientStatusRequest(): QueryClientStatusRequest {
|
|
1040
|
+
return { clientId: "" };
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
export const QueryClientStatusRequest = {
|
|
1044
|
+
encode(message: QueryClientStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1045
|
+
if (message.clientId !== "") {
|
|
1046
|
+
writer.uint32(10).string(message.clientId);
|
|
1047
|
+
}
|
|
1048
|
+
return writer;
|
|
1049
|
+
},
|
|
1050
|
+
|
|
1051
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStatusRequest {
|
|
1052
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1053
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1054
|
+
const message = createBaseQueryClientStatusRequest();
|
|
1055
|
+
while (reader.pos < end) {
|
|
1056
|
+
const tag = reader.uint32();
|
|
1057
|
+
switch (tag >>> 3) {
|
|
1058
|
+
case 1:
|
|
1059
|
+
if (tag !== 10) {
|
|
1060
|
+
break;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
message.clientId = reader.string();
|
|
1064
|
+
continue;
|
|
1065
|
+
}
|
|
1066
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1069
|
+
reader.skipType(tag & 7);
|
|
1070
|
+
}
|
|
1071
|
+
return message;
|
|
1072
|
+
},
|
|
1073
|
+
|
|
1074
|
+
fromJSON(object: any): QueryClientStatusRequest {
|
|
1075
|
+
return { clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "" };
|
|
1076
|
+
},
|
|
1077
|
+
|
|
1078
|
+
toJSON(message: QueryClientStatusRequest): unknown {
|
|
1079
|
+
const obj: any = {};
|
|
1080
|
+
if (message.clientId !== "") {
|
|
1081
|
+
obj.clientId = message.clientId;
|
|
1082
|
+
}
|
|
1083
|
+
return obj;
|
|
1084
|
+
},
|
|
1085
|
+
|
|
1086
|
+
create<I extends Exact<DeepPartial<QueryClientStatusRequest>, I>>(base?: I): QueryClientStatusRequest {
|
|
1087
|
+
return QueryClientStatusRequest.fromPartial(base ?? ({} as any));
|
|
1088
|
+
},
|
|
1089
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientStatusRequest>, I>>(object: I): QueryClientStatusRequest {
|
|
1090
|
+
const message = createBaseQueryClientStatusRequest();
|
|
1091
|
+
message.clientId = object.clientId ?? "";
|
|
1092
|
+
return message;
|
|
1093
|
+
},
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1096
|
+
function createBaseQueryClientStatusResponse(): QueryClientStatusResponse {
|
|
1097
|
+
return { status: "" };
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
export const QueryClientStatusResponse = {
|
|
1101
|
+
encode(message: QueryClientStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1102
|
+
if (message.status !== "") {
|
|
1103
|
+
writer.uint32(10).string(message.status);
|
|
1104
|
+
}
|
|
1105
|
+
return writer;
|
|
1106
|
+
},
|
|
1107
|
+
|
|
1108
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStatusResponse {
|
|
1109
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1110
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1111
|
+
const message = createBaseQueryClientStatusResponse();
|
|
1112
|
+
while (reader.pos < end) {
|
|
1113
|
+
const tag = reader.uint32();
|
|
1114
|
+
switch (tag >>> 3) {
|
|
1115
|
+
case 1:
|
|
1116
|
+
if (tag !== 10) {
|
|
1117
|
+
break;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
message.status = reader.string();
|
|
1121
|
+
continue;
|
|
1122
|
+
}
|
|
1123
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1124
|
+
break;
|
|
1125
|
+
}
|
|
1126
|
+
reader.skipType(tag & 7);
|
|
1127
|
+
}
|
|
1128
|
+
return message;
|
|
1129
|
+
},
|
|
1130
|
+
|
|
1131
|
+
fromJSON(object: any): QueryClientStatusResponse {
|
|
1132
|
+
return { status: isSet(object.status) ? globalThis.String(object.status) : "" };
|
|
1133
|
+
},
|
|
1134
|
+
|
|
1135
|
+
toJSON(message: QueryClientStatusResponse): unknown {
|
|
1136
|
+
const obj: any = {};
|
|
1137
|
+
if (message.status !== "") {
|
|
1138
|
+
obj.status = message.status;
|
|
1139
|
+
}
|
|
1140
|
+
return obj;
|
|
1141
|
+
},
|
|
1142
|
+
|
|
1143
|
+
create<I extends Exact<DeepPartial<QueryClientStatusResponse>, I>>(base?: I): QueryClientStatusResponse {
|
|
1144
|
+
return QueryClientStatusResponse.fromPartial(base ?? ({} as any));
|
|
1145
|
+
},
|
|
1146
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientStatusResponse>, I>>(object: I): QueryClientStatusResponse {
|
|
1147
|
+
const message = createBaseQueryClientStatusResponse();
|
|
1148
|
+
message.status = object.status ?? "";
|
|
1149
|
+
return message;
|
|
1150
|
+
},
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
function createBaseQueryClientParamsRequest(): QueryClientParamsRequest {
|
|
1154
|
+
return {};
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
export const QueryClientParamsRequest = {
|
|
1158
|
+
encode(_: QueryClientParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1159
|
+
return writer;
|
|
1160
|
+
},
|
|
1161
|
+
|
|
1162
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientParamsRequest {
|
|
1163
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1164
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1165
|
+
const message = createBaseQueryClientParamsRequest();
|
|
1166
|
+
while (reader.pos < end) {
|
|
1167
|
+
const tag = reader.uint32();
|
|
1168
|
+
switch (tag >>> 3) {
|
|
1169
|
+
}
|
|
1170
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1171
|
+
break;
|
|
1172
|
+
}
|
|
1173
|
+
reader.skipType(tag & 7);
|
|
1174
|
+
}
|
|
1175
|
+
return message;
|
|
1176
|
+
},
|
|
1177
|
+
|
|
1178
|
+
fromJSON(_: any): QueryClientParamsRequest {
|
|
1179
|
+
return {};
|
|
1180
|
+
},
|
|
1181
|
+
|
|
1182
|
+
toJSON(_: QueryClientParamsRequest): unknown {
|
|
1183
|
+
const obj: any = {};
|
|
1184
|
+
return obj;
|
|
1185
|
+
},
|
|
1186
|
+
|
|
1187
|
+
create<I extends Exact<DeepPartial<QueryClientParamsRequest>, I>>(base?: I): QueryClientParamsRequest {
|
|
1188
|
+
return QueryClientParamsRequest.fromPartial(base ?? ({} as any));
|
|
1189
|
+
},
|
|
1190
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientParamsRequest>, I>>(_: I): QueryClientParamsRequest {
|
|
1191
|
+
const message = createBaseQueryClientParamsRequest();
|
|
1192
|
+
return message;
|
|
1193
|
+
},
|
|
1194
|
+
};
|
|
1195
|
+
|
|
1196
|
+
function createBaseQueryClientParamsResponse(): QueryClientParamsResponse {
|
|
1197
|
+
return { params: undefined };
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
export const QueryClientParamsResponse = {
|
|
1201
|
+
encode(message: QueryClientParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1202
|
+
if (message.params !== undefined) {
|
|
1203
|
+
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
1204
|
+
}
|
|
1205
|
+
return writer;
|
|
1206
|
+
},
|
|
1207
|
+
|
|
1208
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientParamsResponse {
|
|
1209
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1210
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1211
|
+
const message = createBaseQueryClientParamsResponse();
|
|
1212
|
+
while (reader.pos < end) {
|
|
1213
|
+
const tag = reader.uint32();
|
|
1214
|
+
switch (tag >>> 3) {
|
|
1215
|
+
case 1:
|
|
1216
|
+
if (tag !== 10) {
|
|
1217
|
+
break;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
message.params = Params.decode(reader, reader.uint32());
|
|
1221
|
+
continue;
|
|
1222
|
+
}
|
|
1223
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1224
|
+
break;
|
|
1225
|
+
}
|
|
1226
|
+
reader.skipType(tag & 7);
|
|
1227
|
+
}
|
|
1228
|
+
return message;
|
|
1229
|
+
},
|
|
1230
|
+
|
|
1231
|
+
fromJSON(object: any): QueryClientParamsResponse {
|
|
1232
|
+
return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined };
|
|
1233
|
+
},
|
|
1234
|
+
|
|
1235
|
+
toJSON(message: QueryClientParamsResponse): unknown {
|
|
1236
|
+
const obj: any = {};
|
|
1237
|
+
if (message.params !== undefined) {
|
|
1238
|
+
obj.params = Params.toJSON(message.params);
|
|
1239
|
+
}
|
|
1240
|
+
return obj;
|
|
1241
|
+
},
|
|
1242
|
+
|
|
1243
|
+
create<I extends Exact<DeepPartial<QueryClientParamsResponse>, I>>(base?: I): QueryClientParamsResponse {
|
|
1244
|
+
return QueryClientParamsResponse.fromPartial(base ?? ({} as any));
|
|
1245
|
+
},
|
|
1246
|
+
fromPartial<I extends Exact<DeepPartial<QueryClientParamsResponse>, I>>(object: I): QueryClientParamsResponse {
|
|
1247
|
+
const message = createBaseQueryClientParamsResponse();
|
|
1248
|
+
message.params = (object.params !== undefined && object.params !== null)
|
|
1249
|
+
? Params.fromPartial(object.params)
|
|
1250
|
+
: undefined;
|
|
1251
|
+
return message;
|
|
1252
|
+
},
|
|
1253
|
+
};
|
|
1254
|
+
|
|
1255
|
+
function createBaseQueryUpgradedClientStateRequest(): QueryUpgradedClientStateRequest {
|
|
1256
|
+
return {};
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
export const QueryUpgradedClientStateRequest = {
|
|
1260
|
+
encode(_: QueryUpgradedClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1261
|
+
return writer;
|
|
1262
|
+
},
|
|
1263
|
+
|
|
1264
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedClientStateRequest {
|
|
1265
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1266
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1267
|
+
const message = createBaseQueryUpgradedClientStateRequest();
|
|
1268
|
+
while (reader.pos < end) {
|
|
1269
|
+
const tag = reader.uint32();
|
|
1270
|
+
switch (tag >>> 3) {
|
|
1271
|
+
}
|
|
1272
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1273
|
+
break;
|
|
1274
|
+
}
|
|
1275
|
+
reader.skipType(tag & 7);
|
|
1276
|
+
}
|
|
1277
|
+
return message;
|
|
1278
|
+
},
|
|
1279
|
+
|
|
1280
|
+
fromJSON(_: any): QueryUpgradedClientStateRequest {
|
|
1281
|
+
return {};
|
|
1282
|
+
},
|
|
1283
|
+
|
|
1284
|
+
toJSON(_: QueryUpgradedClientStateRequest): unknown {
|
|
1285
|
+
const obj: any = {};
|
|
1286
|
+
return obj;
|
|
1287
|
+
},
|
|
1288
|
+
|
|
1289
|
+
create<I extends Exact<DeepPartial<QueryUpgradedClientStateRequest>, I>>(base?: I): QueryUpgradedClientStateRequest {
|
|
1290
|
+
return QueryUpgradedClientStateRequest.fromPartial(base ?? ({} as any));
|
|
1291
|
+
},
|
|
1292
|
+
fromPartial<I extends Exact<DeepPartial<QueryUpgradedClientStateRequest>, I>>(_: I): QueryUpgradedClientStateRequest {
|
|
1293
|
+
const message = createBaseQueryUpgradedClientStateRequest();
|
|
1294
|
+
return message;
|
|
1295
|
+
},
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
function createBaseQueryUpgradedClientStateResponse(): QueryUpgradedClientStateResponse {
|
|
1299
|
+
return { upgradedClientState: undefined };
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
export const QueryUpgradedClientStateResponse = {
|
|
1303
|
+
encode(message: QueryUpgradedClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1304
|
+
if (message.upgradedClientState !== undefined) {
|
|
1305
|
+
Any.encode(message.upgradedClientState, writer.uint32(10).fork()).ldelim();
|
|
1306
|
+
}
|
|
1307
|
+
return writer;
|
|
1308
|
+
},
|
|
1309
|
+
|
|
1310
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedClientStateResponse {
|
|
1311
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1312
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1313
|
+
const message = createBaseQueryUpgradedClientStateResponse();
|
|
1314
|
+
while (reader.pos < end) {
|
|
1315
|
+
const tag = reader.uint32();
|
|
1316
|
+
switch (tag >>> 3) {
|
|
1317
|
+
case 1:
|
|
1318
|
+
if (tag !== 10) {
|
|
1319
|
+
break;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
message.upgradedClientState = Any.decode(reader, reader.uint32());
|
|
1323
|
+
continue;
|
|
1324
|
+
}
|
|
1325
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1326
|
+
break;
|
|
1327
|
+
}
|
|
1328
|
+
reader.skipType(tag & 7);
|
|
1329
|
+
}
|
|
1330
|
+
return message;
|
|
1331
|
+
},
|
|
1332
|
+
|
|
1333
|
+
fromJSON(object: any): QueryUpgradedClientStateResponse {
|
|
1334
|
+
return {
|
|
1335
|
+
upgradedClientState: isSet(object.upgradedClientState) ? Any.fromJSON(object.upgradedClientState) : undefined,
|
|
1336
|
+
};
|
|
1337
|
+
},
|
|
1338
|
+
|
|
1339
|
+
toJSON(message: QueryUpgradedClientStateResponse): unknown {
|
|
1340
|
+
const obj: any = {};
|
|
1341
|
+
if (message.upgradedClientState !== undefined) {
|
|
1342
|
+
obj.upgradedClientState = Any.toJSON(message.upgradedClientState);
|
|
1343
|
+
}
|
|
1344
|
+
return obj;
|
|
1345
|
+
},
|
|
1346
|
+
|
|
1347
|
+
create<I extends Exact<DeepPartial<QueryUpgradedClientStateResponse>, I>>(
|
|
1348
|
+
base?: I,
|
|
1349
|
+
): QueryUpgradedClientStateResponse {
|
|
1350
|
+
return QueryUpgradedClientStateResponse.fromPartial(base ?? ({} as any));
|
|
1351
|
+
},
|
|
1352
|
+
fromPartial<I extends Exact<DeepPartial<QueryUpgradedClientStateResponse>, I>>(
|
|
1353
|
+
object: I,
|
|
1354
|
+
): QueryUpgradedClientStateResponse {
|
|
1355
|
+
const message = createBaseQueryUpgradedClientStateResponse();
|
|
1356
|
+
message.upgradedClientState = (object.upgradedClientState !== undefined && object.upgradedClientState !== null)
|
|
1357
|
+
? Any.fromPartial(object.upgradedClientState)
|
|
1358
|
+
: undefined;
|
|
1359
|
+
return message;
|
|
1360
|
+
},
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
function createBaseQueryUpgradedConsensusStateRequest(): QueryUpgradedConsensusStateRequest {
|
|
1364
|
+
return {};
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
export const QueryUpgradedConsensusStateRequest = {
|
|
1368
|
+
encode(_: QueryUpgradedConsensusStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1369
|
+
return writer;
|
|
1370
|
+
},
|
|
1371
|
+
|
|
1372
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedConsensusStateRequest {
|
|
1373
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1374
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1375
|
+
const message = createBaseQueryUpgradedConsensusStateRequest();
|
|
1376
|
+
while (reader.pos < end) {
|
|
1377
|
+
const tag = reader.uint32();
|
|
1378
|
+
switch (tag >>> 3) {
|
|
1379
|
+
}
|
|
1380
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1381
|
+
break;
|
|
1382
|
+
}
|
|
1383
|
+
reader.skipType(tag & 7);
|
|
1384
|
+
}
|
|
1385
|
+
return message;
|
|
1386
|
+
},
|
|
1387
|
+
|
|
1388
|
+
fromJSON(_: any): QueryUpgradedConsensusStateRequest {
|
|
1389
|
+
return {};
|
|
1390
|
+
},
|
|
1391
|
+
|
|
1392
|
+
toJSON(_: QueryUpgradedConsensusStateRequest): unknown {
|
|
1393
|
+
const obj: any = {};
|
|
1394
|
+
return obj;
|
|
1395
|
+
},
|
|
1396
|
+
|
|
1397
|
+
create<I extends Exact<DeepPartial<QueryUpgradedConsensusStateRequest>, I>>(
|
|
1398
|
+
base?: I,
|
|
1399
|
+
): QueryUpgradedConsensusStateRequest {
|
|
1400
|
+
return QueryUpgradedConsensusStateRequest.fromPartial(base ?? ({} as any));
|
|
1401
|
+
},
|
|
1402
|
+
fromPartial<I extends Exact<DeepPartial<QueryUpgradedConsensusStateRequest>, I>>(
|
|
1403
|
+
_: I,
|
|
1404
|
+
): QueryUpgradedConsensusStateRequest {
|
|
1405
|
+
const message = createBaseQueryUpgradedConsensusStateRequest();
|
|
1406
|
+
return message;
|
|
1407
|
+
},
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
function createBaseQueryUpgradedConsensusStateResponse(): QueryUpgradedConsensusStateResponse {
|
|
1411
|
+
return { upgradedConsensusState: undefined };
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
export const QueryUpgradedConsensusStateResponse = {
|
|
1415
|
+
encode(message: QueryUpgradedConsensusStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1416
|
+
if (message.upgradedConsensusState !== undefined) {
|
|
1417
|
+
Any.encode(message.upgradedConsensusState, writer.uint32(10).fork()).ldelim();
|
|
1418
|
+
}
|
|
1419
|
+
return writer;
|
|
1420
|
+
},
|
|
1421
|
+
|
|
1422
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedConsensusStateResponse {
|
|
1423
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1424
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1425
|
+
const message = createBaseQueryUpgradedConsensusStateResponse();
|
|
1426
|
+
while (reader.pos < end) {
|
|
1427
|
+
const tag = reader.uint32();
|
|
1428
|
+
switch (tag >>> 3) {
|
|
1429
|
+
case 1:
|
|
1430
|
+
if (tag !== 10) {
|
|
1431
|
+
break;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
message.upgradedConsensusState = Any.decode(reader, reader.uint32());
|
|
1435
|
+
continue;
|
|
1436
|
+
}
|
|
1437
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1438
|
+
break;
|
|
1439
|
+
}
|
|
1440
|
+
reader.skipType(tag & 7);
|
|
1441
|
+
}
|
|
1442
|
+
return message;
|
|
1443
|
+
},
|
|
1444
|
+
|
|
1445
|
+
fromJSON(object: any): QueryUpgradedConsensusStateResponse {
|
|
1446
|
+
return {
|
|
1447
|
+
upgradedConsensusState: isSet(object.upgradedConsensusState)
|
|
1448
|
+
? Any.fromJSON(object.upgradedConsensusState)
|
|
1449
|
+
: undefined,
|
|
1450
|
+
};
|
|
1451
|
+
},
|
|
1452
|
+
|
|
1453
|
+
toJSON(message: QueryUpgradedConsensusStateResponse): unknown {
|
|
1454
|
+
const obj: any = {};
|
|
1455
|
+
if (message.upgradedConsensusState !== undefined) {
|
|
1456
|
+
obj.upgradedConsensusState = Any.toJSON(message.upgradedConsensusState);
|
|
1457
|
+
}
|
|
1458
|
+
return obj;
|
|
1459
|
+
},
|
|
1460
|
+
|
|
1461
|
+
create<I extends Exact<DeepPartial<QueryUpgradedConsensusStateResponse>, I>>(
|
|
1462
|
+
base?: I,
|
|
1463
|
+
): QueryUpgradedConsensusStateResponse {
|
|
1464
|
+
return QueryUpgradedConsensusStateResponse.fromPartial(base ?? ({} as any));
|
|
1465
|
+
},
|
|
1466
|
+
fromPartial<I extends Exact<DeepPartial<QueryUpgradedConsensusStateResponse>, I>>(
|
|
1467
|
+
object: I,
|
|
1468
|
+
): QueryUpgradedConsensusStateResponse {
|
|
1469
|
+
const message = createBaseQueryUpgradedConsensusStateResponse();
|
|
1470
|
+
message.upgradedConsensusState =
|
|
1471
|
+
(object.upgradedConsensusState !== undefined && object.upgradedConsensusState !== null)
|
|
1472
|
+
? Any.fromPartial(object.upgradedConsensusState)
|
|
1473
|
+
: undefined;
|
|
1474
|
+
return message;
|
|
1475
|
+
},
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1478
|
+
function createBaseQueryVerifyMembershipRequest(): QueryVerifyMembershipRequest {
|
|
1479
|
+
return {
|
|
1480
|
+
clientId: "",
|
|
1481
|
+
proof: new Uint8Array(0),
|
|
1482
|
+
proofHeight: undefined,
|
|
1483
|
+
merklePath: undefined,
|
|
1484
|
+
value: new Uint8Array(0),
|
|
1485
|
+
timeDelay: Long.UZERO,
|
|
1486
|
+
blockDelay: Long.UZERO,
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
export const QueryVerifyMembershipRequest = {
|
|
1491
|
+
encode(message: QueryVerifyMembershipRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1492
|
+
if (message.clientId !== "") {
|
|
1493
|
+
writer.uint32(10).string(message.clientId);
|
|
1494
|
+
}
|
|
1495
|
+
if (message.proof.length !== 0) {
|
|
1496
|
+
writer.uint32(18).bytes(message.proof);
|
|
1497
|
+
}
|
|
1498
|
+
if (message.proofHeight !== undefined) {
|
|
1499
|
+
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
|
1500
|
+
}
|
|
1501
|
+
if (message.merklePath !== undefined) {
|
|
1502
|
+
MerklePath.encode(message.merklePath, writer.uint32(34).fork()).ldelim();
|
|
1503
|
+
}
|
|
1504
|
+
if (message.value.length !== 0) {
|
|
1505
|
+
writer.uint32(42).bytes(message.value);
|
|
1506
|
+
}
|
|
1507
|
+
if (!message.timeDelay.equals(Long.UZERO)) {
|
|
1508
|
+
writer.uint32(48).uint64(message.timeDelay);
|
|
1509
|
+
}
|
|
1510
|
+
if (!message.blockDelay.equals(Long.UZERO)) {
|
|
1511
|
+
writer.uint32(56).uint64(message.blockDelay);
|
|
1512
|
+
}
|
|
1513
|
+
return writer;
|
|
1514
|
+
},
|
|
1515
|
+
|
|
1516
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryVerifyMembershipRequest {
|
|
1517
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1518
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1519
|
+
const message = createBaseQueryVerifyMembershipRequest();
|
|
1520
|
+
while (reader.pos < end) {
|
|
1521
|
+
const tag = reader.uint32();
|
|
1522
|
+
switch (tag >>> 3) {
|
|
1523
|
+
case 1:
|
|
1524
|
+
if (tag !== 10) {
|
|
1525
|
+
break;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
message.clientId = reader.string();
|
|
1529
|
+
continue;
|
|
1530
|
+
case 2:
|
|
1531
|
+
if (tag !== 18) {
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
message.proof = reader.bytes();
|
|
1536
|
+
continue;
|
|
1537
|
+
case 3:
|
|
1538
|
+
if (tag !== 26) {
|
|
1539
|
+
break;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
message.proofHeight = Height.decode(reader, reader.uint32());
|
|
1543
|
+
continue;
|
|
1544
|
+
case 4:
|
|
1545
|
+
if (tag !== 34) {
|
|
1546
|
+
break;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
message.merklePath = MerklePath.decode(reader, reader.uint32());
|
|
1550
|
+
continue;
|
|
1551
|
+
case 5:
|
|
1552
|
+
if (tag !== 42) {
|
|
1553
|
+
break;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
message.value = reader.bytes();
|
|
1557
|
+
continue;
|
|
1558
|
+
case 6:
|
|
1559
|
+
if (tag !== 48) {
|
|
1560
|
+
break;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
message.timeDelay = reader.uint64() as Long;
|
|
1564
|
+
continue;
|
|
1565
|
+
case 7:
|
|
1566
|
+
if (tag !== 56) {
|
|
1567
|
+
break;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
message.blockDelay = reader.uint64() as Long;
|
|
1571
|
+
continue;
|
|
1572
|
+
}
|
|
1573
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1574
|
+
break;
|
|
1575
|
+
}
|
|
1576
|
+
reader.skipType(tag & 7);
|
|
1577
|
+
}
|
|
1578
|
+
return message;
|
|
1579
|
+
},
|
|
1580
|
+
|
|
1581
|
+
fromJSON(object: any): QueryVerifyMembershipRequest {
|
|
1582
|
+
return {
|
|
1583
|
+
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
1584
|
+
proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(0),
|
|
1585
|
+
proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined,
|
|
1586
|
+
merklePath: isSet(object.merklePath) ? MerklePath.fromJSON(object.merklePath) : undefined,
|
|
1587
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
1588
|
+
timeDelay: isSet(object.timeDelay) ? Long.fromValue(object.timeDelay) : Long.UZERO,
|
|
1589
|
+
blockDelay: isSet(object.blockDelay) ? Long.fromValue(object.blockDelay) : Long.UZERO,
|
|
1590
|
+
};
|
|
1591
|
+
},
|
|
1592
|
+
|
|
1593
|
+
toJSON(message: QueryVerifyMembershipRequest): unknown {
|
|
1594
|
+
const obj: any = {};
|
|
1595
|
+
if (message.clientId !== "") {
|
|
1596
|
+
obj.clientId = message.clientId;
|
|
1597
|
+
}
|
|
1598
|
+
if (message.proof.length !== 0) {
|
|
1599
|
+
obj.proof = base64FromBytes(message.proof);
|
|
1600
|
+
}
|
|
1601
|
+
if (message.proofHeight !== undefined) {
|
|
1602
|
+
obj.proofHeight = Height.toJSON(message.proofHeight);
|
|
1603
|
+
}
|
|
1604
|
+
if (message.merklePath !== undefined) {
|
|
1605
|
+
obj.merklePath = MerklePath.toJSON(message.merklePath);
|
|
1606
|
+
}
|
|
1607
|
+
if (message.value.length !== 0) {
|
|
1608
|
+
obj.value = base64FromBytes(message.value);
|
|
1609
|
+
}
|
|
1610
|
+
if (!message.timeDelay.equals(Long.UZERO)) {
|
|
1611
|
+
obj.timeDelay = (message.timeDelay || Long.UZERO).toString();
|
|
1612
|
+
}
|
|
1613
|
+
if (!message.blockDelay.equals(Long.UZERO)) {
|
|
1614
|
+
obj.blockDelay = (message.blockDelay || Long.UZERO).toString();
|
|
1615
|
+
}
|
|
1616
|
+
return obj;
|
|
1617
|
+
},
|
|
1618
|
+
|
|
1619
|
+
create<I extends Exact<DeepPartial<QueryVerifyMembershipRequest>, I>>(base?: I): QueryVerifyMembershipRequest {
|
|
1620
|
+
return QueryVerifyMembershipRequest.fromPartial(base ?? ({} as any));
|
|
1621
|
+
},
|
|
1622
|
+
fromPartial<I extends Exact<DeepPartial<QueryVerifyMembershipRequest>, I>>(object: I): QueryVerifyMembershipRequest {
|
|
1623
|
+
const message = createBaseQueryVerifyMembershipRequest();
|
|
1624
|
+
message.clientId = object.clientId ?? "";
|
|
1625
|
+
message.proof = object.proof ?? new Uint8Array(0);
|
|
1626
|
+
message.proofHeight = (object.proofHeight !== undefined && object.proofHeight !== null)
|
|
1627
|
+
? Height.fromPartial(object.proofHeight)
|
|
1628
|
+
: undefined;
|
|
1629
|
+
message.merklePath = (object.merklePath !== undefined && object.merklePath !== null)
|
|
1630
|
+
? MerklePath.fromPartial(object.merklePath)
|
|
1631
|
+
: undefined;
|
|
1632
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
1633
|
+
message.timeDelay = (object.timeDelay !== undefined && object.timeDelay !== null)
|
|
1634
|
+
? Long.fromValue(object.timeDelay)
|
|
1635
|
+
: Long.UZERO;
|
|
1636
|
+
message.blockDelay = (object.blockDelay !== undefined && object.blockDelay !== null)
|
|
1637
|
+
? Long.fromValue(object.blockDelay)
|
|
1638
|
+
: Long.UZERO;
|
|
1639
|
+
return message;
|
|
1640
|
+
},
|
|
1641
|
+
};
|
|
1642
|
+
|
|
1643
|
+
function createBaseQueryVerifyMembershipResponse(): QueryVerifyMembershipResponse {
|
|
1644
|
+
return { success: false };
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
export const QueryVerifyMembershipResponse = {
|
|
1648
|
+
encode(message: QueryVerifyMembershipResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1649
|
+
if (message.success !== false) {
|
|
1650
|
+
writer.uint32(8).bool(message.success);
|
|
1651
|
+
}
|
|
1652
|
+
return writer;
|
|
1653
|
+
},
|
|
1654
|
+
|
|
1655
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryVerifyMembershipResponse {
|
|
1656
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1657
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1658
|
+
const message = createBaseQueryVerifyMembershipResponse();
|
|
1659
|
+
while (reader.pos < end) {
|
|
1660
|
+
const tag = reader.uint32();
|
|
1661
|
+
switch (tag >>> 3) {
|
|
1662
|
+
case 1:
|
|
1663
|
+
if (tag !== 8) {
|
|
1664
|
+
break;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
message.success = reader.bool();
|
|
1668
|
+
continue;
|
|
1669
|
+
}
|
|
1670
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1671
|
+
break;
|
|
1672
|
+
}
|
|
1673
|
+
reader.skipType(tag & 7);
|
|
1674
|
+
}
|
|
1675
|
+
return message;
|
|
1676
|
+
},
|
|
1677
|
+
|
|
1678
|
+
fromJSON(object: any): QueryVerifyMembershipResponse {
|
|
1679
|
+
return { success: isSet(object.success) ? globalThis.Boolean(object.success) : false };
|
|
1680
|
+
},
|
|
1681
|
+
|
|
1682
|
+
toJSON(message: QueryVerifyMembershipResponse): unknown {
|
|
1683
|
+
const obj: any = {};
|
|
1684
|
+
if (message.success !== false) {
|
|
1685
|
+
obj.success = message.success;
|
|
1686
|
+
}
|
|
1687
|
+
return obj;
|
|
1688
|
+
},
|
|
1689
|
+
|
|
1690
|
+
create<I extends Exact<DeepPartial<QueryVerifyMembershipResponse>, I>>(base?: I): QueryVerifyMembershipResponse {
|
|
1691
|
+
return QueryVerifyMembershipResponse.fromPartial(base ?? ({} as any));
|
|
1692
|
+
},
|
|
1693
|
+
fromPartial<I extends Exact<DeepPartial<QueryVerifyMembershipResponse>, I>>(
|
|
1694
|
+
object: I,
|
|
1695
|
+
): QueryVerifyMembershipResponse {
|
|
1696
|
+
const message = createBaseQueryVerifyMembershipResponse();
|
|
1697
|
+
message.success = object.success ?? false;
|
|
1698
|
+
return message;
|
|
1699
|
+
},
|
|
1700
|
+
};
|
|
1701
|
+
|
|
1702
|
+
/** Query provides defines the gRPC querier service */
|
|
1703
|
+
export interface Query {
|
|
1704
|
+
/** ClientState queries an IBC light client. */
|
|
1705
|
+
ClientState(
|
|
1706
|
+
request: DeepPartial<QueryClientStateRequest>,
|
|
1707
|
+
metadata?: grpc.Metadata,
|
|
1708
|
+
): Promise<QueryClientStateResponse>;
|
|
1709
|
+
/** ClientStates queries all the IBC light clients of a chain. */
|
|
1710
|
+
ClientStates(
|
|
1711
|
+
request: DeepPartial<QueryClientStatesRequest>,
|
|
1712
|
+
metadata?: grpc.Metadata,
|
|
1713
|
+
): Promise<QueryClientStatesResponse>;
|
|
1714
|
+
/**
|
|
1715
|
+
* ConsensusState queries a consensus state associated with a client state at
|
|
1716
|
+
* a given height.
|
|
1717
|
+
*/
|
|
1718
|
+
ConsensusState(
|
|
1719
|
+
request: DeepPartial<QueryConsensusStateRequest>,
|
|
1720
|
+
metadata?: grpc.Metadata,
|
|
1721
|
+
): Promise<QueryConsensusStateResponse>;
|
|
1722
|
+
/**
|
|
1723
|
+
* ConsensusStates queries all the consensus state associated with a given
|
|
1724
|
+
* client.
|
|
1725
|
+
*/
|
|
1726
|
+
ConsensusStates(
|
|
1727
|
+
request: DeepPartial<QueryConsensusStatesRequest>,
|
|
1728
|
+
metadata?: grpc.Metadata,
|
|
1729
|
+
): Promise<QueryConsensusStatesResponse>;
|
|
1730
|
+
/** ConsensusStateHeights queries the height of every consensus states associated with a given client. */
|
|
1731
|
+
ConsensusStateHeights(
|
|
1732
|
+
request: DeepPartial<QueryConsensusStateHeightsRequest>,
|
|
1733
|
+
metadata?: grpc.Metadata,
|
|
1734
|
+
): Promise<QueryConsensusStateHeightsResponse>;
|
|
1735
|
+
/** Status queries the status of an IBC client. */
|
|
1736
|
+
ClientStatus(
|
|
1737
|
+
request: DeepPartial<QueryClientStatusRequest>,
|
|
1738
|
+
metadata?: grpc.Metadata,
|
|
1739
|
+
): Promise<QueryClientStatusResponse>;
|
|
1740
|
+
/** ClientParams queries all parameters of the ibc client submodule. */
|
|
1741
|
+
ClientParams(
|
|
1742
|
+
request: DeepPartial<QueryClientParamsRequest>,
|
|
1743
|
+
metadata?: grpc.Metadata,
|
|
1744
|
+
): Promise<QueryClientParamsResponse>;
|
|
1745
|
+
/** UpgradedClientState queries an Upgraded IBC light client. */
|
|
1746
|
+
UpgradedClientState(
|
|
1747
|
+
request: DeepPartial<QueryUpgradedClientStateRequest>,
|
|
1748
|
+
metadata?: grpc.Metadata,
|
|
1749
|
+
): Promise<QueryUpgradedClientStateResponse>;
|
|
1750
|
+
/** UpgradedConsensusState queries an Upgraded IBC consensus state. */
|
|
1751
|
+
UpgradedConsensusState(
|
|
1752
|
+
request: DeepPartial<QueryUpgradedConsensusStateRequest>,
|
|
1753
|
+
metadata?: grpc.Metadata,
|
|
1754
|
+
): Promise<QueryUpgradedConsensusStateResponse>;
|
|
1755
|
+
/** VerifyMembership queries an IBC light client for proof verification of a value at a given key path. */
|
|
1756
|
+
VerifyMembership(
|
|
1757
|
+
request: DeepPartial<QueryVerifyMembershipRequest>,
|
|
1758
|
+
metadata?: grpc.Metadata,
|
|
1759
|
+
): Promise<QueryVerifyMembershipResponse>;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
export class QueryClientImpl implements Query {
|
|
1763
|
+
private readonly rpc: Rpc;
|
|
1764
|
+
|
|
1765
|
+
constructor(rpc: Rpc) {
|
|
1766
|
+
this.rpc = rpc;
|
|
1767
|
+
this.ClientState = this.ClientState.bind(this);
|
|
1768
|
+
this.ClientStates = this.ClientStates.bind(this);
|
|
1769
|
+
this.ConsensusState = this.ConsensusState.bind(this);
|
|
1770
|
+
this.ConsensusStates = this.ConsensusStates.bind(this);
|
|
1771
|
+
this.ConsensusStateHeights = this.ConsensusStateHeights.bind(this);
|
|
1772
|
+
this.ClientStatus = this.ClientStatus.bind(this);
|
|
1773
|
+
this.ClientParams = this.ClientParams.bind(this);
|
|
1774
|
+
this.UpgradedClientState = this.UpgradedClientState.bind(this);
|
|
1775
|
+
this.UpgradedConsensusState = this.UpgradedConsensusState.bind(this);
|
|
1776
|
+
this.VerifyMembership = this.VerifyMembership.bind(this);
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
ClientState(
|
|
1780
|
+
request: DeepPartial<QueryClientStateRequest>,
|
|
1781
|
+
metadata?: grpc.Metadata,
|
|
1782
|
+
): Promise<QueryClientStateResponse> {
|
|
1783
|
+
return this.rpc.unary(QueryClientStateDesc, QueryClientStateRequest.fromPartial(request), metadata);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
ClientStates(
|
|
1787
|
+
request: DeepPartial<QueryClientStatesRequest>,
|
|
1788
|
+
metadata?: grpc.Metadata,
|
|
1789
|
+
): Promise<QueryClientStatesResponse> {
|
|
1790
|
+
return this.rpc.unary(QueryClientStatesDesc, QueryClientStatesRequest.fromPartial(request), metadata);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
ConsensusState(
|
|
1794
|
+
request: DeepPartial<QueryConsensusStateRequest>,
|
|
1795
|
+
metadata?: grpc.Metadata,
|
|
1796
|
+
): Promise<QueryConsensusStateResponse> {
|
|
1797
|
+
return this.rpc.unary(QueryConsensusStateDesc, QueryConsensusStateRequest.fromPartial(request), metadata);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
ConsensusStates(
|
|
1801
|
+
request: DeepPartial<QueryConsensusStatesRequest>,
|
|
1802
|
+
metadata?: grpc.Metadata,
|
|
1803
|
+
): Promise<QueryConsensusStatesResponse> {
|
|
1804
|
+
return this.rpc.unary(QueryConsensusStatesDesc, QueryConsensusStatesRequest.fromPartial(request), metadata);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
ConsensusStateHeights(
|
|
1808
|
+
request: DeepPartial<QueryConsensusStateHeightsRequest>,
|
|
1809
|
+
metadata?: grpc.Metadata,
|
|
1810
|
+
): Promise<QueryConsensusStateHeightsResponse> {
|
|
1811
|
+
return this.rpc.unary(
|
|
1812
|
+
QueryConsensusStateHeightsDesc,
|
|
1813
|
+
QueryConsensusStateHeightsRequest.fromPartial(request),
|
|
1814
|
+
metadata,
|
|
1815
|
+
);
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
ClientStatus(
|
|
1819
|
+
request: DeepPartial<QueryClientStatusRequest>,
|
|
1820
|
+
metadata?: grpc.Metadata,
|
|
1821
|
+
): Promise<QueryClientStatusResponse> {
|
|
1822
|
+
return this.rpc.unary(QueryClientStatusDesc, QueryClientStatusRequest.fromPartial(request), metadata);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
ClientParams(
|
|
1826
|
+
request: DeepPartial<QueryClientParamsRequest>,
|
|
1827
|
+
metadata?: grpc.Metadata,
|
|
1828
|
+
): Promise<QueryClientParamsResponse> {
|
|
1829
|
+
return this.rpc.unary(QueryClientParamsDesc, QueryClientParamsRequest.fromPartial(request), metadata);
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
UpgradedClientState(
|
|
1833
|
+
request: DeepPartial<QueryUpgradedClientStateRequest>,
|
|
1834
|
+
metadata?: grpc.Metadata,
|
|
1835
|
+
): Promise<QueryUpgradedClientStateResponse> {
|
|
1836
|
+
return this.rpc.unary(QueryUpgradedClientStateDesc, QueryUpgradedClientStateRequest.fromPartial(request), metadata);
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
UpgradedConsensusState(
|
|
1840
|
+
request: DeepPartial<QueryUpgradedConsensusStateRequest>,
|
|
1841
|
+
metadata?: grpc.Metadata,
|
|
1842
|
+
): Promise<QueryUpgradedConsensusStateResponse> {
|
|
1843
|
+
return this.rpc.unary(
|
|
1844
|
+
QueryUpgradedConsensusStateDesc,
|
|
1845
|
+
QueryUpgradedConsensusStateRequest.fromPartial(request),
|
|
1846
|
+
metadata,
|
|
1847
|
+
);
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
VerifyMembership(
|
|
1851
|
+
request: DeepPartial<QueryVerifyMembershipRequest>,
|
|
1852
|
+
metadata?: grpc.Metadata,
|
|
1853
|
+
): Promise<QueryVerifyMembershipResponse> {
|
|
1854
|
+
return this.rpc.unary(QueryVerifyMembershipDesc, QueryVerifyMembershipRequest.fromPartial(request), metadata);
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
export const QueryDesc = { serviceName: "ibc.core.client.v1.Query" };
|
|
1859
|
+
|
|
1860
|
+
export const QueryClientStateDesc: UnaryMethodDefinitionish = {
|
|
1861
|
+
methodName: "ClientState",
|
|
1862
|
+
service: QueryDesc,
|
|
1863
|
+
requestStream: false,
|
|
1864
|
+
responseStream: false,
|
|
1865
|
+
requestType: {
|
|
1866
|
+
serializeBinary() {
|
|
1867
|
+
return QueryClientStateRequest.encode(this).finish();
|
|
1868
|
+
},
|
|
1869
|
+
} as any,
|
|
1870
|
+
responseType: {
|
|
1871
|
+
deserializeBinary(data: Uint8Array) {
|
|
1872
|
+
const value = QueryClientStateResponse.decode(data);
|
|
1873
|
+
return {
|
|
1874
|
+
...value,
|
|
1875
|
+
toObject() {
|
|
1876
|
+
return value;
|
|
1877
|
+
},
|
|
1878
|
+
};
|
|
1879
|
+
},
|
|
1880
|
+
} as any,
|
|
1881
|
+
};
|
|
1882
|
+
|
|
1883
|
+
export const QueryClientStatesDesc: UnaryMethodDefinitionish = {
|
|
1884
|
+
methodName: "ClientStates",
|
|
1885
|
+
service: QueryDesc,
|
|
1886
|
+
requestStream: false,
|
|
1887
|
+
responseStream: false,
|
|
1888
|
+
requestType: {
|
|
1889
|
+
serializeBinary() {
|
|
1890
|
+
return QueryClientStatesRequest.encode(this).finish();
|
|
1891
|
+
},
|
|
1892
|
+
} as any,
|
|
1893
|
+
responseType: {
|
|
1894
|
+
deserializeBinary(data: Uint8Array) {
|
|
1895
|
+
const value = QueryClientStatesResponse.decode(data);
|
|
1896
|
+
return {
|
|
1897
|
+
...value,
|
|
1898
|
+
toObject() {
|
|
1899
|
+
return value;
|
|
1900
|
+
},
|
|
1901
|
+
};
|
|
1902
|
+
},
|
|
1903
|
+
} as any,
|
|
1904
|
+
};
|
|
1905
|
+
|
|
1906
|
+
export const QueryConsensusStateDesc: UnaryMethodDefinitionish = {
|
|
1907
|
+
methodName: "ConsensusState",
|
|
1908
|
+
service: QueryDesc,
|
|
1909
|
+
requestStream: false,
|
|
1910
|
+
responseStream: false,
|
|
1911
|
+
requestType: {
|
|
1912
|
+
serializeBinary() {
|
|
1913
|
+
return QueryConsensusStateRequest.encode(this).finish();
|
|
1914
|
+
},
|
|
1915
|
+
} as any,
|
|
1916
|
+
responseType: {
|
|
1917
|
+
deserializeBinary(data: Uint8Array) {
|
|
1918
|
+
const value = QueryConsensusStateResponse.decode(data);
|
|
1919
|
+
return {
|
|
1920
|
+
...value,
|
|
1921
|
+
toObject() {
|
|
1922
|
+
return value;
|
|
1923
|
+
},
|
|
1924
|
+
};
|
|
1925
|
+
},
|
|
1926
|
+
} as any,
|
|
1927
|
+
};
|
|
1928
|
+
|
|
1929
|
+
export const QueryConsensusStatesDesc: UnaryMethodDefinitionish = {
|
|
1930
|
+
methodName: "ConsensusStates",
|
|
1931
|
+
service: QueryDesc,
|
|
1932
|
+
requestStream: false,
|
|
1933
|
+
responseStream: false,
|
|
1934
|
+
requestType: {
|
|
1935
|
+
serializeBinary() {
|
|
1936
|
+
return QueryConsensusStatesRequest.encode(this).finish();
|
|
1937
|
+
},
|
|
1938
|
+
} as any,
|
|
1939
|
+
responseType: {
|
|
1940
|
+
deserializeBinary(data: Uint8Array) {
|
|
1941
|
+
const value = QueryConsensusStatesResponse.decode(data);
|
|
1942
|
+
return {
|
|
1943
|
+
...value,
|
|
1944
|
+
toObject() {
|
|
1945
|
+
return value;
|
|
1946
|
+
},
|
|
1947
|
+
};
|
|
1948
|
+
},
|
|
1949
|
+
} as any,
|
|
1950
|
+
};
|
|
1951
|
+
|
|
1952
|
+
export const QueryConsensusStateHeightsDesc: UnaryMethodDefinitionish = {
|
|
1953
|
+
methodName: "ConsensusStateHeights",
|
|
1954
|
+
service: QueryDesc,
|
|
1955
|
+
requestStream: false,
|
|
1956
|
+
responseStream: false,
|
|
1957
|
+
requestType: {
|
|
1958
|
+
serializeBinary() {
|
|
1959
|
+
return QueryConsensusStateHeightsRequest.encode(this).finish();
|
|
1960
|
+
},
|
|
1961
|
+
} as any,
|
|
1962
|
+
responseType: {
|
|
1963
|
+
deserializeBinary(data: Uint8Array) {
|
|
1964
|
+
const value = QueryConsensusStateHeightsResponse.decode(data);
|
|
1965
|
+
return {
|
|
1966
|
+
...value,
|
|
1967
|
+
toObject() {
|
|
1968
|
+
return value;
|
|
1969
|
+
},
|
|
1970
|
+
};
|
|
1971
|
+
},
|
|
1972
|
+
} as any,
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
export const QueryClientStatusDesc: UnaryMethodDefinitionish = {
|
|
1976
|
+
methodName: "ClientStatus",
|
|
1977
|
+
service: QueryDesc,
|
|
1978
|
+
requestStream: false,
|
|
1979
|
+
responseStream: false,
|
|
1980
|
+
requestType: {
|
|
1981
|
+
serializeBinary() {
|
|
1982
|
+
return QueryClientStatusRequest.encode(this).finish();
|
|
1983
|
+
},
|
|
1984
|
+
} as any,
|
|
1985
|
+
responseType: {
|
|
1986
|
+
deserializeBinary(data: Uint8Array) {
|
|
1987
|
+
const value = QueryClientStatusResponse.decode(data);
|
|
1988
|
+
return {
|
|
1989
|
+
...value,
|
|
1990
|
+
toObject() {
|
|
1991
|
+
return value;
|
|
1992
|
+
},
|
|
1993
|
+
};
|
|
1994
|
+
},
|
|
1995
|
+
} as any,
|
|
1996
|
+
};
|
|
1997
|
+
|
|
1998
|
+
export const QueryClientParamsDesc: UnaryMethodDefinitionish = {
|
|
1999
|
+
methodName: "ClientParams",
|
|
2000
|
+
service: QueryDesc,
|
|
2001
|
+
requestStream: false,
|
|
2002
|
+
responseStream: false,
|
|
2003
|
+
requestType: {
|
|
2004
|
+
serializeBinary() {
|
|
2005
|
+
return QueryClientParamsRequest.encode(this).finish();
|
|
2006
|
+
},
|
|
2007
|
+
} as any,
|
|
2008
|
+
responseType: {
|
|
2009
|
+
deserializeBinary(data: Uint8Array) {
|
|
2010
|
+
const value = QueryClientParamsResponse.decode(data);
|
|
2011
|
+
return {
|
|
2012
|
+
...value,
|
|
2013
|
+
toObject() {
|
|
2014
|
+
return value;
|
|
2015
|
+
},
|
|
2016
|
+
};
|
|
2017
|
+
},
|
|
2018
|
+
} as any,
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
export const QueryUpgradedClientStateDesc: UnaryMethodDefinitionish = {
|
|
2022
|
+
methodName: "UpgradedClientState",
|
|
2023
|
+
service: QueryDesc,
|
|
2024
|
+
requestStream: false,
|
|
2025
|
+
responseStream: false,
|
|
2026
|
+
requestType: {
|
|
2027
|
+
serializeBinary() {
|
|
2028
|
+
return QueryUpgradedClientStateRequest.encode(this).finish();
|
|
2029
|
+
},
|
|
2030
|
+
} as any,
|
|
2031
|
+
responseType: {
|
|
2032
|
+
deserializeBinary(data: Uint8Array) {
|
|
2033
|
+
const value = QueryUpgradedClientStateResponse.decode(data);
|
|
2034
|
+
return {
|
|
2035
|
+
...value,
|
|
2036
|
+
toObject() {
|
|
2037
|
+
return value;
|
|
2038
|
+
},
|
|
2039
|
+
};
|
|
2040
|
+
},
|
|
2041
|
+
} as any,
|
|
2042
|
+
};
|
|
2043
|
+
|
|
2044
|
+
export const QueryUpgradedConsensusStateDesc: UnaryMethodDefinitionish = {
|
|
2045
|
+
methodName: "UpgradedConsensusState",
|
|
2046
|
+
service: QueryDesc,
|
|
2047
|
+
requestStream: false,
|
|
2048
|
+
responseStream: false,
|
|
2049
|
+
requestType: {
|
|
2050
|
+
serializeBinary() {
|
|
2051
|
+
return QueryUpgradedConsensusStateRequest.encode(this).finish();
|
|
2052
|
+
},
|
|
2053
|
+
} as any,
|
|
2054
|
+
responseType: {
|
|
2055
|
+
deserializeBinary(data: Uint8Array) {
|
|
2056
|
+
const value = QueryUpgradedConsensusStateResponse.decode(data);
|
|
2057
|
+
return {
|
|
2058
|
+
...value,
|
|
2059
|
+
toObject() {
|
|
2060
|
+
return value;
|
|
2061
|
+
},
|
|
2062
|
+
};
|
|
2063
|
+
},
|
|
2064
|
+
} as any,
|
|
2065
|
+
};
|
|
2066
|
+
|
|
2067
|
+
export const QueryVerifyMembershipDesc: UnaryMethodDefinitionish = {
|
|
2068
|
+
methodName: "VerifyMembership",
|
|
2069
|
+
service: QueryDesc,
|
|
2070
|
+
requestStream: false,
|
|
2071
|
+
responseStream: false,
|
|
2072
|
+
requestType: {
|
|
2073
|
+
serializeBinary() {
|
|
2074
|
+
return QueryVerifyMembershipRequest.encode(this).finish();
|
|
2075
|
+
},
|
|
2076
|
+
} as any,
|
|
2077
|
+
responseType: {
|
|
2078
|
+
deserializeBinary(data: Uint8Array) {
|
|
2079
|
+
const value = QueryVerifyMembershipResponse.decode(data);
|
|
2080
|
+
return {
|
|
2081
|
+
...value,
|
|
2082
|
+
toObject() {
|
|
2083
|
+
return value;
|
|
2084
|
+
},
|
|
2085
|
+
};
|
|
2086
|
+
},
|
|
2087
|
+
} as any,
|
|
2088
|
+
};
|
|
2089
|
+
|
|
2090
|
+
interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
|
|
2091
|
+
requestStream: any;
|
|
2092
|
+
responseStream: any;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
|
|
2096
|
+
|
|
2097
|
+
interface Rpc {
|
|
2098
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
2099
|
+
methodDesc: T,
|
|
2100
|
+
request: any,
|
|
2101
|
+
metadata: grpc.Metadata | undefined,
|
|
2102
|
+
): Promise<any>;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
export class GrpcWebImpl {
|
|
2106
|
+
private host: string;
|
|
2107
|
+
private options: {
|
|
2108
|
+
transport?: grpc.TransportFactory;
|
|
2109
|
+
|
|
2110
|
+
debug?: boolean;
|
|
2111
|
+
metadata?: grpc.Metadata;
|
|
2112
|
+
upStreamRetryCodes?: number[];
|
|
2113
|
+
};
|
|
2114
|
+
|
|
2115
|
+
constructor(
|
|
2116
|
+
host: string,
|
|
2117
|
+
options: {
|
|
2118
|
+
transport?: grpc.TransportFactory;
|
|
2119
|
+
|
|
2120
|
+
debug?: boolean;
|
|
2121
|
+
metadata?: grpc.Metadata;
|
|
2122
|
+
upStreamRetryCodes?: number[];
|
|
2123
|
+
},
|
|
2124
|
+
) {
|
|
2125
|
+
this.host = host;
|
|
2126
|
+
this.options = options;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
2130
|
+
methodDesc: T,
|
|
2131
|
+
_request: any,
|
|
2132
|
+
metadata: grpc.Metadata | undefined,
|
|
2133
|
+
): Promise<any> {
|
|
2134
|
+
const request = { ..._request, ...methodDesc.requestType };
|
|
2135
|
+
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
2136
|
+
? new BrowserHeaders({ ...this.options?.metadata.headersMap, ...metadata?.headersMap })
|
|
2137
|
+
: metadata ?? this.options.metadata;
|
|
2138
|
+
return new Promise((resolve, reject) => {
|
|
2139
|
+
grpc.unary(methodDesc, {
|
|
2140
|
+
request,
|
|
2141
|
+
host: this.host,
|
|
2142
|
+
metadata: maybeCombinedMetadata ?? {},
|
|
2143
|
+
...(this.options.transport !== undefined ? { transport: this.options.transport } : {}),
|
|
2144
|
+
debug: this.options.debug ?? false,
|
|
2145
|
+
onEnd: function (response) {
|
|
2146
|
+
if (response.status === grpc.Code.OK) {
|
|
2147
|
+
resolve(response.message!.toObject());
|
|
2148
|
+
} else {
|
|
2149
|
+
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
2150
|
+
reject(err);
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
});
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
2159
|
+
if ((globalThis as any).Buffer) {
|
|
2160
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
2161
|
+
} else {
|
|
2162
|
+
const bin = globalThis.atob(b64);
|
|
2163
|
+
const arr = new Uint8Array(bin.length);
|
|
2164
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
2165
|
+
arr[i] = bin.charCodeAt(i);
|
|
2166
|
+
}
|
|
2167
|
+
return arr;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
2172
|
+
if ((globalThis as any).Buffer) {
|
|
2173
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
2174
|
+
} else {
|
|
2175
|
+
const bin: string[] = [];
|
|
2176
|
+
arr.forEach((byte) => {
|
|
2177
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
2178
|
+
});
|
|
2179
|
+
return globalThis.btoa(bin.join(""));
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2184
|
+
|
|
2185
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
2186
|
+
: T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
2187
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2188
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
2189
|
+
: Partial<T>;
|
|
2190
|
+
|
|
2191
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
2192
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
2193
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
2194
|
+
|
|
2195
|
+
if (_m0.util.Long !== Long) {
|
|
2196
|
+
_m0.util.Long = Long as any;
|
|
2197
|
+
_m0.configure();
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
function isSet(value: any): boolean {
|
|
2201
|
+
return value !== null && value !== undefined;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
export class GrpcWebError extends globalThis.Error {
|
|
2205
|
+
constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) {
|
|
2206
|
+
super(message);
|
|
2207
|
+
}
|
|
2208
|
+
}
|