@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,2984 @@
|
|
|
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: cosmwasm/wasm/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 { AccessConfig, ContractCodeHistoryEntry, ContractInfo, Model, Params } from "./types";
|
|
14
|
+
|
|
15
|
+
export const protobufPackage = "cosmwasm.wasm.v1";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* QueryContractInfoRequest is the request type for the Query/ContractInfo RPC
|
|
19
|
+
* method
|
|
20
|
+
*/
|
|
21
|
+
export interface QueryContractInfoRequest {
|
|
22
|
+
/** address is the address of the contract to query */
|
|
23
|
+
address: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* QueryContractInfoResponse is the response type for the Query/ContractInfo RPC
|
|
28
|
+
* method
|
|
29
|
+
*/
|
|
30
|
+
export interface QueryContractInfoResponse {
|
|
31
|
+
/** address is the address of the contract */
|
|
32
|
+
address: string;
|
|
33
|
+
contractInfo?: ContractInfo | undefined;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* QueryContractHistoryRequest is the request type for the Query/ContractHistory
|
|
38
|
+
* RPC method
|
|
39
|
+
*/
|
|
40
|
+
export interface QueryContractHistoryRequest {
|
|
41
|
+
/** address is the address of the contract to query */
|
|
42
|
+
address: string;
|
|
43
|
+
/** pagination defines an optional pagination for the request. */
|
|
44
|
+
pagination?: PageRequest | undefined;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* QueryContractHistoryResponse is the response type for the
|
|
49
|
+
* Query/ContractHistory RPC method
|
|
50
|
+
*/
|
|
51
|
+
export interface QueryContractHistoryResponse {
|
|
52
|
+
entries: ContractCodeHistoryEntry[];
|
|
53
|
+
/** pagination defines the pagination in the response. */
|
|
54
|
+
pagination?: PageResponse | undefined;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* QueryContractsByCodeRequest is the request type for the Query/ContractsByCode
|
|
59
|
+
* RPC method
|
|
60
|
+
*/
|
|
61
|
+
export interface QueryContractsByCodeRequest {
|
|
62
|
+
/** grpc-gateway_out does not support Go style CodeID */
|
|
63
|
+
codeId: Long;
|
|
64
|
+
/** pagination defines an optional pagination for the request. */
|
|
65
|
+
pagination?: PageRequest | undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* QueryContractsByCodeResponse is the response type for the
|
|
70
|
+
* Query/ContractsByCode RPC method
|
|
71
|
+
*/
|
|
72
|
+
export interface QueryContractsByCodeResponse {
|
|
73
|
+
/** contracts are a set of contract addresses */
|
|
74
|
+
contracts: string[];
|
|
75
|
+
/** pagination defines the pagination in the response. */
|
|
76
|
+
pagination?: PageResponse | undefined;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* QueryAllContractStateRequest is the request type for the
|
|
81
|
+
* Query/AllContractState RPC method
|
|
82
|
+
*/
|
|
83
|
+
export interface QueryAllContractStateRequest {
|
|
84
|
+
/** address is the address of the contract */
|
|
85
|
+
address: string;
|
|
86
|
+
/** pagination defines an optional pagination for the request. */
|
|
87
|
+
pagination?: PageRequest | undefined;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* QueryAllContractStateResponse is the response type for the
|
|
92
|
+
* Query/AllContractState RPC method
|
|
93
|
+
*/
|
|
94
|
+
export interface QueryAllContractStateResponse {
|
|
95
|
+
models: Model[];
|
|
96
|
+
/** pagination defines the pagination in the response. */
|
|
97
|
+
pagination?: PageResponse | undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* QueryRawContractStateRequest is the request type for the
|
|
102
|
+
* Query/RawContractState RPC method
|
|
103
|
+
*/
|
|
104
|
+
export interface QueryRawContractStateRequest {
|
|
105
|
+
/** address is the address of the contract */
|
|
106
|
+
address: string;
|
|
107
|
+
queryData: Uint8Array;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* QueryRawContractStateResponse is the response type for the
|
|
112
|
+
* Query/RawContractState RPC method
|
|
113
|
+
*/
|
|
114
|
+
export interface QueryRawContractStateResponse {
|
|
115
|
+
/** Data contains the raw store data */
|
|
116
|
+
data: Uint8Array;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* QuerySmartContractStateRequest is the request type for the
|
|
121
|
+
* Query/SmartContractState RPC method
|
|
122
|
+
*/
|
|
123
|
+
export interface QuerySmartContractStateRequest {
|
|
124
|
+
/** address is the address of the contract */
|
|
125
|
+
address: string;
|
|
126
|
+
/** QueryData contains the query data passed to the contract */
|
|
127
|
+
queryData: Uint8Array;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* QuerySmartContractStateResponse is the response type for the
|
|
132
|
+
* Query/SmartContractState RPC method
|
|
133
|
+
*/
|
|
134
|
+
export interface QuerySmartContractStateResponse {
|
|
135
|
+
/** Data contains the json data returned from the smart contract */
|
|
136
|
+
data: Uint8Array;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** QueryCodeRequest is the request type for the Query/Code RPC method */
|
|
140
|
+
export interface QueryCodeRequest {
|
|
141
|
+
/** grpc-gateway_out does not support Go style CodeID */
|
|
142
|
+
codeId: Long;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** QueryCodeInfoRequest is the request type for the Query/CodeInfo RPC method */
|
|
146
|
+
export interface QueryCodeInfoRequest {
|
|
147
|
+
/** grpc-gateway_out does not support Go style CodeID */
|
|
148
|
+
codeId: Long;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** QueryCodeInfoResponse is the response type for the Query/CodeInfo RPC method */
|
|
152
|
+
export interface QueryCodeInfoResponse {
|
|
153
|
+
codeId: Long;
|
|
154
|
+
creator: string;
|
|
155
|
+
checksum: Uint8Array;
|
|
156
|
+
instantiatePermission?: AccessConfig | undefined;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** CodeInfoResponse contains code meta data from CodeInfo */
|
|
160
|
+
export interface CodeInfoResponse {
|
|
161
|
+
/** id for legacy support */
|
|
162
|
+
codeId: Long;
|
|
163
|
+
creator: string;
|
|
164
|
+
dataHash: Uint8Array;
|
|
165
|
+
instantiatePermission?: AccessConfig | undefined;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** QueryCodeResponse is the response type for the Query/Code RPC method */
|
|
169
|
+
export interface QueryCodeResponse {
|
|
170
|
+
codeInfo?: CodeInfoResponse | undefined;
|
|
171
|
+
data: Uint8Array;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** QueryCodesRequest is the request type for the Query/Codes RPC method */
|
|
175
|
+
export interface QueryCodesRequest {
|
|
176
|
+
/** pagination defines an optional pagination for the request. */
|
|
177
|
+
pagination?: PageRequest | undefined;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** QueryCodesResponse is the response type for the Query/Codes RPC method */
|
|
181
|
+
export interface QueryCodesResponse {
|
|
182
|
+
codeInfos: CodeInfoResponse[];
|
|
183
|
+
/** pagination defines the pagination in the response. */
|
|
184
|
+
pagination?: PageResponse | undefined;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* QueryPinnedCodesRequest is the request type for the Query/PinnedCodes
|
|
189
|
+
* RPC method
|
|
190
|
+
*/
|
|
191
|
+
export interface QueryPinnedCodesRequest {
|
|
192
|
+
/** pagination defines an optional pagination for the request. */
|
|
193
|
+
pagination?: PageRequest | undefined;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* QueryPinnedCodesResponse is the response type for the
|
|
198
|
+
* Query/PinnedCodes RPC method
|
|
199
|
+
*/
|
|
200
|
+
export interface QueryPinnedCodesResponse {
|
|
201
|
+
codeIds: Long[];
|
|
202
|
+
/** pagination defines the pagination in the response. */
|
|
203
|
+
pagination?: PageResponse | undefined;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** QueryParamsRequest is the request type for the Query/Params RPC method. */
|
|
207
|
+
export interface QueryParamsRequest {
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/** QueryParamsResponse is the response type for the Query/Params RPC method. */
|
|
211
|
+
export interface QueryParamsResponse {
|
|
212
|
+
/** params defines the parameters of the module. */
|
|
213
|
+
params?: Params | undefined;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* QueryContractsByCreatorRequest is the request type for the
|
|
218
|
+
* Query/ContractsByCreator RPC method.
|
|
219
|
+
*/
|
|
220
|
+
export interface QueryContractsByCreatorRequest {
|
|
221
|
+
/** CreatorAddress is the address of contract creator */
|
|
222
|
+
creatorAddress: string;
|
|
223
|
+
/** Pagination defines an optional pagination for the request. */
|
|
224
|
+
pagination?: PageRequest | undefined;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* QueryContractsByCreatorResponse is the response type for the
|
|
229
|
+
* Query/ContractsByCreator RPC method.
|
|
230
|
+
*/
|
|
231
|
+
export interface QueryContractsByCreatorResponse {
|
|
232
|
+
/** ContractAddresses result set */
|
|
233
|
+
contractAddresses: string[];
|
|
234
|
+
/** Pagination defines the pagination in the response. */
|
|
235
|
+
pagination?: PageResponse | undefined;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* QueryWasmLimitsConfigRequest is the request type for the
|
|
240
|
+
* Query/WasmLimitsConfig RPC method.
|
|
241
|
+
*/
|
|
242
|
+
export interface QueryWasmLimitsConfigRequest {
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* QueryWasmLimitsConfigResponse is the response type for the
|
|
247
|
+
* Query/WasmLimitsConfig RPC method. It contains the JSON encoded limits for
|
|
248
|
+
* static validation of Wasm files.
|
|
249
|
+
*/
|
|
250
|
+
export interface QueryWasmLimitsConfigResponse {
|
|
251
|
+
config: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* QueryBuildAddressRequest is the request type for the Query/BuildAddress RPC
|
|
256
|
+
* method.
|
|
257
|
+
*/
|
|
258
|
+
export interface QueryBuildAddressRequest {
|
|
259
|
+
/** CodeHash is the hash of the code */
|
|
260
|
+
codeHash: string;
|
|
261
|
+
/** CreatorAddress is the address of the contract instantiator */
|
|
262
|
+
creatorAddress: string;
|
|
263
|
+
/** Salt is a hex encoded salt */
|
|
264
|
+
salt: string;
|
|
265
|
+
/**
|
|
266
|
+
* InitArgs are optional json encoded init args to be used in contract address
|
|
267
|
+
* building if provided
|
|
268
|
+
*/
|
|
269
|
+
initArgs: Uint8Array;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* QueryBuildAddressResponse is the response type for the Query/BuildAddress RPC
|
|
274
|
+
* method.
|
|
275
|
+
*/
|
|
276
|
+
export interface QueryBuildAddressResponse {
|
|
277
|
+
/** Address is the contract address */
|
|
278
|
+
address: string;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function createBaseQueryContractInfoRequest(): QueryContractInfoRequest {
|
|
282
|
+
return { address: "" };
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export const QueryContractInfoRequest = {
|
|
286
|
+
encode(message: QueryContractInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
287
|
+
if (message.address !== "") {
|
|
288
|
+
writer.uint32(10).string(message.address);
|
|
289
|
+
}
|
|
290
|
+
return writer;
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractInfoRequest {
|
|
294
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
295
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
296
|
+
const message = createBaseQueryContractInfoRequest();
|
|
297
|
+
while (reader.pos < end) {
|
|
298
|
+
const tag = reader.uint32();
|
|
299
|
+
switch (tag >>> 3) {
|
|
300
|
+
case 1:
|
|
301
|
+
if (tag !== 10) {
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
message.address = reader.string();
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
reader.skipType(tag & 7);
|
|
312
|
+
}
|
|
313
|
+
return message;
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
fromJSON(object: any): QueryContractInfoRequest {
|
|
317
|
+
return { address: isSet(object.address) ? globalThis.String(object.address) : "" };
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
toJSON(message: QueryContractInfoRequest): unknown {
|
|
321
|
+
const obj: any = {};
|
|
322
|
+
if (message.address !== "") {
|
|
323
|
+
obj.address = message.address;
|
|
324
|
+
}
|
|
325
|
+
return obj;
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
create<I extends Exact<DeepPartial<QueryContractInfoRequest>, I>>(base?: I): QueryContractInfoRequest {
|
|
329
|
+
return QueryContractInfoRequest.fromPartial(base ?? ({} as any));
|
|
330
|
+
},
|
|
331
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractInfoRequest>, I>>(object: I): QueryContractInfoRequest {
|
|
332
|
+
const message = createBaseQueryContractInfoRequest();
|
|
333
|
+
message.address = object.address ?? "";
|
|
334
|
+
return message;
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
function createBaseQueryContractInfoResponse(): QueryContractInfoResponse {
|
|
339
|
+
return { address: "", contractInfo: undefined };
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export const QueryContractInfoResponse = {
|
|
343
|
+
encode(message: QueryContractInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
344
|
+
if (message.address !== "") {
|
|
345
|
+
writer.uint32(10).string(message.address);
|
|
346
|
+
}
|
|
347
|
+
if (message.contractInfo !== undefined) {
|
|
348
|
+
ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim();
|
|
349
|
+
}
|
|
350
|
+
return writer;
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractInfoResponse {
|
|
354
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
355
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
356
|
+
const message = createBaseQueryContractInfoResponse();
|
|
357
|
+
while (reader.pos < end) {
|
|
358
|
+
const tag = reader.uint32();
|
|
359
|
+
switch (tag >>> 3) {
|
|
360
|
+
case 1:
|
|
361
|
+
if (tag !== 10) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
message.address = reader.string();
|
|
366
|
+
continue;
|
|
367
|
+
case 2:
|
|
368
|
+
if (tag !== 18) {
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
message.contractInfo = ContractInfo.decode(reader, reader.uint32());
|
|
373
|
+
continue;
|
|
374
|
+
}
|
|
375
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
reader.skipType(tag & 7);
|
|
379
|
+
}
|
|
380
|
+
return message;
|
|
381
|
+
},
|
|
382
|
+
|
|
383
|
+
fromJSON(object: any): QueryContractInfoResponse {
|
|
384
|
+
return {
|
|
385
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
386
|
+
contractInfo: isSet(object.contractInfo) ? ContractInfo.fromJSON(object.contractInfo) : undefined,
|
|
387
|
+
};
|
|
388
|
+
},
|
|
389
|
+
|
|
390
|
+
toJSON(message: QueryContractInfoResponse): unknown {
|
|
391
|
+
const obj: any = {};
|
|
392
|
+
if (message.address !== "") {
|
|
393
|
+
obj.address = message.address;
|
|
394
|
+
}
|
|
395
|
+
if (message.contractInfo !== undefined) {
|
|
396
|
+
obj.contractInfo = ContractInfo.toJSON(message.contractInfo);
|
|
397
|
+
}
|
|
398
|
+
return obj;
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
create<I extends Exact<DeepPartial<QueryContractInfoResponse>, I>>(base?: I): QueryContractInfoResponse {
|
|
402
|
+
return QueryContractInfoResponse.fromPartial(base ?? ({} as any));
|
|
403
|
+
},
|
|
404
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractInfoResponse>, I>>(object: I): QueryContractInfoResponse {
|
|
405
|
+
const message = createBaseQueryContractInfoResponse();
|
|
406
|
+
message.address = object.address ?? "";
|
|
407
|
+
message.contractInfo = (object.contractInfo !== undefined && object.contractInfo !== null)
|
|
408
|
+
? ContractInfo.fromPartial(object.contractInfo)
|
|
409
|
+
: undefined;
|
|
410
|
+
return message;
|
|
411
|
+
},
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest {
|
|
415
|
+
return { address: "", pagination: undefined };
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export const QueryContractHistoryRequest = {
|
|
419
|
+
encode(message: QueryContractHistoryRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
420
|
+
if (message.address !== "") {
|
|
421
|
+
writer.uint32(10).string(message.address);
|
|
422
|
+
}
|
|
423
|
+
if (message.pagination !== undefined) {
|
|
424
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
425
|
+
}
|
|
426
|
+
return writer;
|
|
427
|
+
},
|
|
428
|
+
|
|
429
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractHistoryRequest {
|
|
430
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
431
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
432
|
+
const message = createBaseQueryContractHistoryRequest();
|
|
433
|
+
while (reader.pos < end) {
|
|
434
|
+
const tag = reader.uint32();
|
|
435
|
+
switch (tag >>> 3) {
|
|
436
|
+
case 1:
|
|
437
|
+
if (tag !== 10) {
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
message.address = reader.string();
|
|
442
|
+
continue;
|
|
443
|
+
case 2:
|
|
444
|
+
if (tag !== 18) {
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
454
|
+
reader.skipType(tag & 7);
|
|
455
|
+
}
|
|
456
|
+
return message;
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
fromJSON(object: any): QueryContractHistoryRequest {
|
|
460
|
+
return {
|
|
461
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
462
|
+
pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
|
|
463
|
+
};
|
|
464
|
+
},
|
|
465
|
+
|
|
466
|
+
toJSON(message: QueryContractHistoryRequest): unknown {
|
|
467
|
+
const obj: any = {};
|
|
468
|
+
if (message.address !== "") {
|
|
469
|
+
obj.address = message.address;
|
|
470
|
+
}
|
|
471
|
+
if (message.pagination !== undefined) {
|
|
472
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
473
|
+
}
|
|
474
|
+
return obj;
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
create<I extends Exact<DeepPartial<QueryContractHistoryRequest>, I>>(base?: I): QueryContractHistoryRequest {
|
|
478
|
+
return QueryContractHistoryRequest.fromPartial(base ?? ({} as any));
|
|
479
|
+
},
|
|
480
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractHistoryRequest>, I>>(object: I): QueryContractHistoryRequest {
|
|
481
|
+
const message = createBaseQueryContractHistoryRequest();
|
|
482
|
+
message.address = object.address ?? "";
|
|
483
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
484
|
+
? PageRequest.fromPartial(object.pagination)
|
|
485
|
+
: undefined;
|
|
486
|
+
return message;
|
|
487
|
+
},
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse {
|
|
491
|
+
return { entries: [], pagination: undefined };
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export const QueryContractHistoryResponse = {
|
|
495
|
+
encode(message: QueryContractHistoryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
496
|
+
for (const v of message.entries) {
|
|
497
|
+
ContractCodeHistoryEntry.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
498
|
+
}
|
|
499
|
+
if (message.pagination !== undefined) {
|
|
500
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
501
|
+
}
|
|
502
|
+
return writer;
|
|
503
|
+
},
|
|
504
|
+
|
|
505
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractHistoryResponse {
|
|
506
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
507
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
508
|
+
const message = createBaseQueryContractHistoryResponse();
|
|
509
|
+
while (reader.pos < end) {
|
|
510
|
+
const tag = reader.uint32();
|
|
511
|
+
switch (tag >>> 3) {
|
|
512
|
+
case 1:
|
|
513
|
+
if (tag !== 10) {
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
message.entries.push(ContractCodeHistoryEntry.decode(reader, reader.uint32()));
|
|
518
|
+
continue;
|
|
519
|
+
case 2:
|
|
520
|
+
if (tag !== 18) {
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
525
|
+
continue;
|
|
526
|
+
}
|
|
527
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
reader.skipType(tag & 7);
|
|
531
|
+
}
|
|
532
|
+
return message;
|
|
533
|
+
},
|
|
534
|
+
|
|
535
|
+
fromJSON(object: any): QueryContractHistoryResponse {
|
|
536
|
+
return {
|
|
537
|
+
entries: globalThis.Array.isArray(object?.entries)
|
|
538
|
+
? object.entries.map((e: any) => ContractCodeHistoryEntry.fromJSON(e))
|
|
539
|
+
: [],
|
|
540
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
541
|
+
};
|
|
542
|
+
},
|
|
543
|
+
|
|
544
|
+
toJSON(message: QueryContractHistoryResponse): unknown {
|
|
545
|
+
const obj: any = {};
|
|
546
|
+
if (message.entries?.length) {
|
|
547
|
+
obj.entries = message.entries.map((e) => ContractCodeHistoryEntry.toJSON(e));
|
|
548
|
+
}
|
|
549
|
+
if (message.pagination !== undefined) {
|
|
550
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
551
|
+
}
|
|
552
|
+
return obj;
|
|
553
|
+
},
|
|
554
|
+
|
|
555
|
+
create<I extends Exact<DeepPartial<QueryContractHistoryResponse>, I>>(base?: I): QueryContractHistoryResponse {
|
|
556
|
+
return QueryContractHistoryResponse.fromPartial(base ?? ({} as any));
|
|
557
|
+
},
|
|
558
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractHistoryResponse>, I>>(object: I): QueryContractHistoryResponse {
|
|
559
|
+
const message = createBaseQueryContractHistoryResponse();
|
|
560
|
+
message.entries = object.entries?.map((e) => ContractCodeHistoryEntry.fromPartial(e)) || [];
|
|
561
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
562
|
+
? PageResponse.fromPartial(object.pagination)
|
|
563
|
+
: undefined;
|
|
564
|
+
return message;
|
|
565
|
+
},
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest {
|
|
569
|
+
return { codeId: Long.UZERO, pagination: undefined };
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export const QueryContractsByCodeRequest = {
|
|
573
|
+
encode(message: QueryContractsByCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
574
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
575
|
+
writer.uint32(8).uint64(message.codeId);
|
|
576
|
+
}
|
|
577
|
+
if (message.pagination !== undefined) {
|
|
578
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
579
|
+
}
|
|
580
|
+
return writer;
|
|
581
|
+
},
|
|
582
|
+
|
|
583
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCodeRequest {
|
|
584
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
585
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
586
|
+
const message = createBaseQueryContractsByCodeRequest();
|
|
587
|
+
while (reader.pos < end) {
|
|
588
|
+
const tag = reader.uint32();
|
|
589
|
+
switch (tag >>> 3) {
|
|
590
|
+
case 1:
|
|
591
|
+
if (tag !== 8) {
|
|
592
|
+
break;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
message.codeId = reader.uint64() as Long;
|
|
596
|
+
continue;
|
|
597
|
+
case 2:
|
|
598
|
+
if (tag !== 18) {
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
reader.skipType(tag & 7);
|
|
609
|
+
}
|
|
610
|
+
return message;
|
|
611
|
+
},
|
|
612
|
+
|
|
613
|
+
fromJSON(object: any): QueryContractsByCodeRequest {
|
|
614
|
+
return {
|
|
615
|
+
codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
|
|
616
|
+
pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
|
|
617
|
+
};
|
|
618
|
+
},
|
|
619
|
+
|
|
620
|
+
toJSON(message: QueryContractsByCodeRequest): unknown {
|
|
621
|
+
const obj: any = {};
|
|
622
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
623
|
+
obj.codeId = (message.codeId || Long.UZERO).toString();
|
|
624
|
+
}
|
|
625
|
+
if (message.pagination !== undefined) {
|
|
626
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
627
|
+
}
|
|
628
|
+
return obj;
|
|
629
|
+
},
|
|
630
|
+
|
|
631
|
+
create<I extends Exact<DeepPartial<QueryContractsByCodeRequest>, I>>(base?: I): QueryContractsByCodeRequest {
|
|
632
|
+
return QueryContractsByCodeRequest.fromPartial(base ?? ({} as any));
|
|
633
|
+
},
|
|
634
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractsByCodeRequest>, I>>(object: I): QueryContractsByCodeRequest {
|
|
635
|
+
const message = createBaseQueryContractsByCodeRequest();
|
|
636
|
+
message.codeId = (object.codeId !== undefined && object.codeId !== null)
|
|
637
|
+
? Long.fromValue(object.codeId)
|
|
638
|
+
: Long.UZERO;
|
|
639
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
640
|
+
? PageRequest.fromPartial(object.pagination)
|
|
641
|
+
: undefined;
|
|
642
|
+
return message;
|
|
643
|
+
},
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse {
|
|
647
|
+
return { contracts: [], pagination: undefined };
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export const QueryContractsByCodeResponse = {
|
|
651
|
+
encode(message: QueryContractsByCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
652
|
+
for (const v of message.contracts) {
|
|
653
|
+
writer.uint32(10).string(v!);
|
|
654
|
+
}
|
|
655
|
+
if (message.pagination !== undefined) {
|
|
656
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
657
|
+
}
|
|
658
|
+
return writer;
|
|
659
|
+
},
|
|
660
|
+
|
|
661
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCodeResponse {
|
|
662
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
663
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
664
|
+
const message = createBaseQueryContractsByCodeResponse();
|
|
665
|
+
while (reader.pos < end) {
|
|
666
|
+
const tag = reader.uint32();
|
|
667
|
+
switch (tag >>> 3) {
|
|
668
|
+
case 1:
|
|
669
|
+
if (tag !== 10) {
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
message.contracts.push(reader.string());
|
|
674
|
+
continue;
|
|
675
|
+
case 2:
|
|
676
|
+
if (tag !== 18) {
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
681
|
+
continue;
|
|
682
|
+
}
|
|
683
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
684
|
+
break;
|
|
685
|
+
}
|
|
686
|
+
reader.skipType(tag & 7);
|
|
687
|
+
}
|
|
688
|
+
return message;
|
|
689
|
+
},
|
|
690
|
+
|
|
691
|
+
fromJSON(object: any): QueryContractsByCodeResponse {
|
|
692
|
+
return {
|
|
693
|
+
contracts: globalThis.Array.isArray(object?.contracts)
|
|
694
|
+
? object.contracts.map((e: any) => globalThis.String(e))
|
|
695
|
+
: [],
|
|
696
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
697
|
+
};
|
|
698
|
+
},
|
|
699
|
+
|
|
700
|
+
toJSON(message: QueryContractsByCodeResponse): unknown {
|
|
701
|
+
const obj: any = {};
|
|
702
|
+
if (message.contracts?.length) {
|
|
703
|
+
obj.contracts = message.contracts;
|
|
704
|
+
}
|
|
705
|
+
if (message.pagination !== undefined) {
|
|
706
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
707
|
+
}
|
|
708
|
+
return obj;
|
|
709
|
+
},
|
|
710
|
+
|
|
711
|
+
create<I extends Exact<DeepPartial<QueryContractsByCodeResponse>, I>>(base?: I): QueryContractsByCodeResponse {
|
|
712
|
+
return QueryContractsByCodeResponse.fromPartial(base ?? ({} as any));
|
|
713
|
+
},
|
|
714
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractsByCodeResponse>, I>>(object: I): QueryContractsByCodeResponse {
|
|
715
|
+
const message = createBaseQueryContractsByCodeResponse();
|
|
716
|
+
message.contracts = object.contracts?.map((e) => e) || [];
|
|
717
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
718
|
+
? PageResponse.fromPartial(object.pagination)
|
|
719
|
+
: undefined;
|
|
720
|
+
return message;
|
|
721
|
+
},
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest {
|
|
725
|
+
return { address: "", pagination: undefined };
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export const QueryAllContractStateRequest = {
|
|
729
|
+
encode(message: QueryAllContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
730
|
+
if (message.address !== "") {
|
|
731
|
+
writer.uint32(10).string(message.address);
|
|
732
|
+
}
|
|
733
|
+
if (message.pagination !== undefined) {
|
|
734
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
735
|
+
}
|
|
736
|
+
return writer;
|
|
737
|
+
},
|
|
738
|
+
|
|
739
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllContractStateRequest {
|
|
740
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
741
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
742
|
+
const message = createBaseQueryAllContractStateRequest();
|
|
743
|
+
while (reader.pos < end) {
|
|
744
|
+
const tag = reader.uint32();
|
|
745
|
+
switch (tag >>> 3) {
|
|
746
|
+
case 1:
|
|
747
|
+
if (tag !== 10) {
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
message.address = reader.string();
|
|
752
|
+
continue;
|
|
753
|
+
case 2:
|
|
754
|
+
if (tag !== 18) {
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
759
|
+
continue;
|
|
760
|
+
}
|
|
761
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
762
|
+
break;
|
|
763
|
+
}
|
|
764
|
+
reader.skipType(tag & 7);
|
|
765
|
+
}
|
|
766
|
+
return message;
|
|
767
|
+
},
|
|
768
|
+
|
|
769
|
+
fromJSON(object: any): QueryAllContractStateRequest {
|
|
770
|
+
return {
|
|
771
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
772
|
+
pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
|
|
773
|
+
};
|
|
774
|
+
},
|
|
775
|
+
|
|
776
|
+
toJSON(message: QueryAllContractStateRequest): unknown {
|
|
777
|
+
const obj: any = {};
|
|
778
|
+
if (message.address !== "") {
|
|
779
|
+
obj.address = message.address;
|
|
780
|
+
}
|
|
781
|
+
if (message.pagination !== undefined) {
|
|
782
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
783
|
+
}
|
|
784
|
+
return obj;
|
|
785
|
+
},
|
|
786
|
+
|
|
787
|
+
create<I extends Exact<DeepPartial<QueryAllContractStateRequest>, I>>(base?: I): QueryAllContractStateRequest {
|
|
788
|
+
return QueryAllContractStateRequest.fromPartial(base ?? ({} as any));
|
|
789
|
+
},
|
|
790
|
+
fromPartial<I extends Exact<DeepPartial<QueryAllContractStateRequest>, I>>(object: I): QueryAllContractStateRequest {
|
|
791
|
+
const message = createBaseQueryAllContractStateRequest();
|
|
792
|
+
message.address = object.address ?? "";
|
|
793
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
794
|
+
? PageRequest.fromPartial(object.pagination)
|
|
795
|
+
: undefined;
|
|
796
|
+
return message;
|
|
797
|
+
},
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse {
|
|
801
|
+
return { models: [], pagination: undefined };
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export const QueryAllContractStateResponse = {
|
|
805
|
+
encode(message: QueryAllContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
806
|
+
for (const v of message.models) {
|
|
807
|
+
Model.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
808
|
+
}
|
|
809
|
+
if (message.pagination !== undefined) {
|
|
810
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
811
|
+
}
|
|
812
|
+
return writer;
|
|
813
|
+
},
|
|
814
|
+
|
|
815
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllContractStateResponse {
|
|
816
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
817
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
818
|
+
const message = createBaseQueryAllContractStateResponse();
|
|
819
|
+
while (reader.pos < end) {
|
|
820
|
+
const tag = reader.uint32();
|
|
821
|
+
switch (tag >>> 3) {
|
|
822
|
+
case 1:
|
|
823
|
+
if (tag !== 10) {
|
|
824
|
+
break;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
message.models.push(Model.decode(reader, reader.uint32()));
|
|
828
|
+
continue;
|
|
829
|
+
case 2:
|
|
830
|
+
if (tag !== 18) {
|
|
831
|
+
break;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
835
|
+
continue;
|
|
836
|
+
}
|
|
837
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
reader.skipType(tag & 7);
|
|
841
|
+
}
|
|
842
|
+
return message;
|
|
843
|
+
},
|
|
844
|
+
|
|
845
|
+
fromJSON(object: any): QueryAllContractStateResponse {
|
|
846
|
+
return {
|
|
847
|
+
models: globalThis.Array.isArray(object?.models) ? object.models.map((e: any) => Model.fromJSON(e)) : [],
|
|
848
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
849
|
+
};
|
|
850
|
+
},
|
|
851
|
+
|
|
852
|
+
toJSON(message: QueryAllContractStateResponse): unknown {
|
|
853
|
+
const obj: any = {};
|
|
854
|
+
if (message.models?.length) {
|
|
855
|
+
obj.models = message.models.map((e) => Model.toJSON(e));
|
|
856
|
+
}
|
|
857
|
+
if (message.pagination !== undefined) {
|
|
858
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
859
|
+
}
|
|
860
|
+
return obj;
|
|
861
|
+
},
|
|
862
|
+
|
|
863
|
+
create<I extends Exact<DeepPartial<QueryAllContractStateResponse>, I>>(base?: I): QueryAllContractStateResponse {
|
|
864
|
+
return QueryAllContractStateResponse.fromPartial(base ?? ({} as any));
|
|
865
|
+
},
|
|
866
|
+
fromPartial<I extends Exact<DeepPartial<QueryAllContractStateResponse>, I>>(
|
|
867
|
+
object: I,
|
|
868
|
+
): QueryAllContractStateResponse {
|
|
869
|
+
const message = createBaseQueryAllContractStateResponse();
|
|
870
|
+
message.models = object.models?.map((e) => Model.fromPartial(e)) || [];
|
|
871
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
872
|
+
? PageResponse.fromPartial(object.pagination)
|
|
873
|
+
: undefined;
|
|
874
|
+
return message;
|
|
875
|
+
},
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest {
|
|
879
|
+
return { address: "", queryData: new Uint8Array(0) };
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export const QueryRawContractStateRequest = {
|
|
883
|
+
encode(message: QueryRawContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
884
|
+
if (message.address !== "") {
|
|
885
|
+
writer.uint32(10).string(message.address);
|
|
886
|
+
}
|
|
887
|
+
if (message.queryData.length !== 0) {
|
|
888
|
+
writer.uint32(18).bytes(message.queryData);
|
|
889
|
+
}
|
|
890
|
+
return writer;
|
|
891
|
+
},
|
|
892
|
+
|
|
893
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryRawContractStateRequest {
|
|
894
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
895
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
896
|
+
const message = createBaseQueryRawContractStateRequest();
|
|
897
|
+
while (reader.pos < end) {
|
|
898
|
+
const tag = reader.uint32();
|
|
899
|
+
switch (tag >>> 3) {
|
|
900
|
+
case 1:
|
|
901
|
+
if (tag !== 10) {
|
|
902
|
+
break;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
message.address = reader.string();
|
|
906
|
+
continue;
|
|
907
|
+
case 2:
|
|
908
|
+
if (tag !== 18) {
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
message.queryData = reader.bytes();
|
|
913
|
+
continue;
|
|
914
|
+
}
|
|
915
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
reader.skipType(tag & 7);
|
|
919
|
+
}
|
|
920
|
+
return message;
|
|
921
|
+
},
|
|
922
|
+
|
|
923
|
+
fromJSON(object: any): QueryRawContractStateRequest {
|
|
924
|
+
return {
|
|
925
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
926
|
+
queryData: isSet(object.queryData) ? bytesFromBase64(object.queryData) : new Uint8Array(0),
|
|
927
|
+
};
|
|
928
|
+
},
|
|
929
|
+
|
|
930
|
+
toJSON(message: QueryRawContractStateRequest): unknown {
|
|
931
|
+
const obj: any = {};
|
|
932
|
+
if (message.address !== "") {
|
|
933
|
+
obj.address = message.address;
|
|
934
|
+
}
|
|
935
|
+
if (message.queryData.length !== 0) {
|
|
936
|
+
obj.queryData = base64FromBytes(message.queryData);
|
|
937
|
+
}
|
|
938
|
+
return obj;
|
|
939
|
+
},
|
|
940
|
+
|
|
941
|
+
create<I extends Exact<DeepPartial<QueryRawContractStateRequest>, I>>(base?: I): QueryRawContractStateRequest {
|
|
942
|
+
return QueryRawContractStateRequest.fromPartial(base ?? ({} as any));
|
|
943
|
+
},
|
|
944
|
+
fromPartial<I extends Exact<DeepPartial<QueryRawContractStateRequest>, I>>(object: I): QueryRawContractStateRequest {
|
|
945
|
+
const message = createBaseQueryRawContractStateRequest();
|
|
946
|
+
message.address = object.address ?? "";
|
|
947
|
+
message.queryData = object.queryData ?? new Uint8Array(0);
|
|
948
|
+
return message;
|
|
949
|
+
},
|
|
950
|
+
};
|
|
951
|
+
|
|
952
|
+
function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse {
|
|
953
|
+
return { data: new Uint8Array(0) };
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
export const QueryRawContractStateResponse = {
|
|
957
|
+
encode(message: QueryRawContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
958
|
+
if (message.data.length !== 0) {
|
|
959
|
+
writer.uint32(10).bytes(message.data);
|
|
960
|
+
}
|
|
961
|
+
return writer;
|
|
962
|
+
},
|
|
963
|
+
|
|
964
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryRawContractStateResponse {
|
|
965
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
966
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
967
|
+
const message = createBaseQueryRawContractStateResponse();
|
|
968
|
+
while (reader.pos < end) {
|
|
969
|
+
const tag = reader.uint32();
|
|
970
|
+
switch (tag >>> 3) {
|
|
971
|
+
case 1:
|
|
972
|
+
if (tag !== 10) {
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
message.data = reader.bytes();
|
|
977
|
+
continue;
|
|
978
|
+
}
|
|
979
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
980
|
+
break;
|
|
981
|
+
}
|
|
982
|
+
reader.skipType(tag & 7);
|
|
983
|
+
}
|
|
984
|
+
return message;
|
|
985
|
+
},
|
|
986
|
+
|
|
987
|
+
fromJSON(object: any): QueryRawContractStateResponse {
|
|
988
|
+
return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0) };
|
|
989
|
+
},
|
|
990
|
+
|
|
991
|
+
toJSON(message: QueryRawContractStateResponse): unknown {
|
|
992
|
+
const obj: any = {};
|
|
993
|
+
if (message.data.length !== 0) {
|
|
994
|
+
obj.data = base64FromBytes(message.data);
|
|
995
|
+
}
|
|
996
|
+
return obj;
|
|
997
|
+
},
|
|
998
|
+
|
|
999
|
+
create<I extends Exact<DeepPartial<QueryRawContractStateResponse>, I>>(base?: I): QueryRawContractStateResponse {
|
|
1000
|
+
return QueryRawContractStateResponse.fromPartial(base ?? ({} as any));
|
|
1001
|
+
},
|
|
1002
|
+
fromPartial<I extends Exact<DeepPartial<QueryRawContractStateResponse>, I>>(
|
|
1003
|
+
object: I,
|
|
1004
|
+
): QueryRawContractStateResponse {
|
|
1005
|
+
const message = createBaseQueryRawContractStateResponse();
|
|
1006
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
1007
|
+
return message;
|
|
1008
|
+
},
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest {
|
|
1012
|
+
return { address: "", queryData: new Uint8Array(0) };
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export const QuerySmartContractStateRequest = {
|
|
1016
|
+
encode(message: QuerySmartContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1017
|
+
if (message.address !== "") {
|
|
1018
|
+
writer.uint32(10).string(message.address);
|
|
1019
|
+
}
|
|
1020
|
+
if (message.queryData.length !== 0) {
|
|
1021
|
+
writer.uint32(18).bytes(message.queryData);
|
|
1022
|
+
}
|
|
1023
|
+
return writer;
|
|
1024
|
+
},
|
|
1025
|
+
|
|
1026
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QuerySmartContractStateRequest {
|
|
1027
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1028
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1029
|
+
const message = createBaseQuerySmartContractStateRequest();
|
|
1030
|
+
while (reader.pos < end) {
|
|
1031
|
+
const tag = reader.uint32();
|
|
1032
|
+
switch (tag >>> 3) {
|
|
1033
|
+
case 1:
|
|
1034
|
+
if (tag !== 10) {
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
message.address = reader.string();
|
|
1039
|
+
continue;
|
|
1040
|
+
case 2:
|
|
1041
|
+
if (tag !== 18) {
|
|
1042
|
+
break;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
message.queryData = reader.bytes();
|
|
1046
|
+
continue;
|
|
1047
|
+
}
|
|
1048
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1049
|
+
break;
|
|
1050
|
+
}
|
|
1051
|
+
reader.skipType(tag & 7);
|
|
1052
|
+
}
|
|
1053
|
+
return message;
|
|
1054
|
+
},
|
|
1055
|
+
|
|
1056
|
+
fromJSON(object: any): QuerySmartContractStateRequest {
|
|
1057
|
+
return {
|
|
1058
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
1059
|
+
queryData: isSet(object.queryData) ? bytesFromBase64(object.queryData) : new Uint8Array(0),
|
|
1060
|
+
};
|
|
1061
|
+
},
|
|
1062
|
+
|
|
1063
|
+
toJSON(message: QuerySmartContractStateRequest): unknown {
|
|
1064
|
+
const obj: any = {};
|
|
1065
|
+
if (message.address !== "") {
|
|
1066
|
+
obj.address = message.address;
|
|
1067
|
+
}
|
|
1068
|
+
if (message.queryData.length !== 0) {
|
|
1069
|
+
obj.queryData = base64FromBytes(message.queryData);
|
|
1070
|
+
}
|
|
1071
|
+
return obj;
|
|
1072
|
+
},
|
|
1073
|
+
|
|
1074
|
+
create<I extends Exact<DeepPartial<QuerySmartContractStateRequest>, I>>(base?: I): QuerySmartContractStateRequest {
|
|
1075
|
+
return QuerySmartContractStateRequest.fromPartial(base ?? ({} as any));
|
|
1076
|
+
},
|
|
1077
|
+
fromPartial<I extends Exact<DeepPartial<QuerySmartContractStateRequest>, I>>(
|
|
1078
|
+
object: I,
|
|
1079
|
+
): QuerySmartContractStateRequest {
|
|
1080
|
+
const message = createBaseQuerySmartContractStateRequest();
|
|
1081
|
+
message.address = object.address ?? "";
|
|
1082
|
+
message.queryData = object.queryData ?? new Uint8Array(0);
|
|
1083
|
+
return message;
|
|
1084
|
+
},
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse {
|
|
1088
|
+
return { data: new Uint8Array(0) };
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export const QuerySmartContractStateResponse = {
|
|
1092
|
+
encode(message: QuerySmartContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1093
|
+
if (message.data.length !== 0) {
|
|
1094
|
+
writer.uint32(10).bytes(message.data);
|
|
1095
|
+
}
|
|
1096
|
+
return writer;
|
|
1097
|
+
},
|
|
1098
|
+
|
|
1099
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QuerySmartContractStateResponse {
|
|
1100
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1101
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1102
|
+
const message = createBaseQuerySmartContractStateResponse();
|
|
1103
|
+
while (reader.pos < end) {
|
|
1104
|
+
const tag = reader.uint32();
|
|
1105
|
+
switch (tag >>> 3) {
|
|
1106
|
+
case 1:
|
|
1107
|
+
if (tag !== 10) {
|
|
1108
|
+
break;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
message.data = reader.bytes();
|
|
1112
|
+
continue;
|
|
1113
|
+
}
|
|
1114
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1115
|
+
break;
|
|
1116
|
+
}
|
|
1117
|
+
reader.skipType(tag & 7);
|
|
1118
|
+
}
|
|
1119
|
+
return message;
|
|
1120
|
+
},
|
|
1121
|
+
|
|
1122
|
+
fromJSON(object: any): QuerySmartContractStateResponse {
|
|
1123
|
+
return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0) };
|
|
1124
|
+
},
|
|
1125
|
+
|
|
1126
|
+
toJSON(message: QuerySmartContractStateResponse): unknown {
|
|
1127
|
+
const obj: any = {};
|
|
1128
|
+
if (message.data.length !== 0) {
|
|
1129
|
+
obj.data = base64FromBytes(message.data);
|
|
1130
|
+
}
|
|
1131
|
+
return obj;
|
|
1132
|
+
},
|
|
1133
|
+
|
|
1134
|
+
create<I extends Exact<DeepPartial<QuerySmartContractStateResponse>, I>>(base?: I): QuerySmartContractStateResponse {
|
|
1135
|
+
return QuerySmartContractStateResponse.fromPartial(base ?? ({} as any));
|
|
1136
|
+
},
|
|
1137
|
+
fromPartial<I extends Exact<DeepPartial<QuerySmartContractStateResponse>, I>>(
|
|
1138
|
+
object: I,
|
|
1139
|
+
): QuerySmartContractStateResponse {
|
|
1140
|
+
const message = createBaseQuerySmartContractStateResponse();
|
|
1141
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
1142
|
+
return message;
|
|
1143
|
+
},
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
function createBaseQueryCodeRequest(): QueryCodeRequest {
|
|
1147
|
+
return { codeId: Long.UZERO };
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
export const QueryCodeRequest = {
|
|
1151
|
+
encode(message: QueryCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1152
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1153
|
+
writer.uint32(8).uint64(message.codeId);
|
|
1154
|
+
}
|
|
1155
|
+
return writer;
|
|
1156
|
+
},
|
|
1157
|
+
|
|
1158
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeRequest {
|
|
1159
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1160
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1161
|
+
const message = createBaseQueryCodeRequest();
|
|
1162
|
+
while (reader.pos < end) {
|
|
1163
|
+
const tag = reader.uint32();
|
|
1164
|
+
switch (tag >>> 3) {
|
|
1165
|
+
case 1:
|
|
1166
|
+
if (tag !== 8) {
|
|
1167
|
+
break;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
message.codeId = reader.uint64() as Long;
|
|
1171
|
+
continue;
|
|
1172
|
+
}
|
|
1173
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1174
|
+
break;
|
|
1175
|
+
}
|
|
1176
|
+
reader.skipType(tag & 7);
|
|
1177
|
+
}
|
|
1178
|
+
return message;
|
|
1179
|
+
},
|
|
1180
|
+
|
|
1181
|
+
fromJSON(object: any): QueryCodeRequest {
|
|
1182
|
+
return { codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO };
|
|
1183
|
+
},
|
|
1184
|
+
|
|
1185
|
+
toJSON(message: QueryCodeRequest): unknown {
|
|
1186
|
+
const obj: any = {};
|
|
1187
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1188
|
+
obj.codeId = (message.codeId || Long.UZERO).toString();
|
|
1189
|
+
}
|
|
1190
|
+
return obj;
|
|
1191
|
+
},
|
|
1192
|
+
|
|
1193
|
+
create<I extends Exact<DeepPartial<QueryCodeRequest>, I>>(base?: I): QueryCodeRequest {
|
|
1194
|
+
return QueryCodeRequest.fromPartial(base ?? ({} as any));
|
|
1195
|
+
},
|
|
1196
|
+
fromPartial<I extends Exact<DeepPartial<QueryCodeRequest>, I>>(object: I): QueryCodeRequest {
|
|
1197
|
+
const message = createBaseQueryCodeRequest();
|
|
1198
|
+
message.codeId = (object.codeId !== undefined && object.codeId !== null)
|
|
1199
|
+
? Long.fromValue(object.codeId)
|
|
1200
|
+
: Long.UZERO;
|
|
1201
|
+
return message;
|
|
1202
|
+
},
|
|
1203
|
+
};
|
|
1204
|
+
|
|
1205
|
+
function createBaseQueryCodeInfoRequest(): QueryCodeInfoRequest {
|
|
1206
|
+
return { codeId: Long.UZERO };
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
export const QueryCodeInfoRequest = {
|
|
1210
|
+
encode(message: QueryCodeInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1211
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1212
|
+
writer.uint32(8).uint64(message.codeId);
|
|
1213
|
+
}
|
|
1214
|
+
return writer;
|
|
1215
|
+
},
|
|
1216
|
+
|
|
1217
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeInfoRequest {
|
|
1218
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1219
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1220
|
+
const message = createBaseQueryCodeInfoRequest();
|
|
1221
|
+
while (reader.pos < end) {
|
|
1222
|
+
const tag = reader.uint32();
|
|
1223
|
+
switch (tag >>> 3) {
|
|
1224
|
+
case 1:
|
|
1225
|
+
if (tag !== 8) {
|
|
1226
|
+
break;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
message.codeId = reader.uint64() as Long;
|
|
1230
|
+
continue;
|
|
1231
|
+
}
|
|
1232
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1233
|
+
break;
|
|
1234
|
+
}
|
|
1235
|
+
reader.skipType(tag & 7);
|
|
1236
|
+
}
|
|
1237
|
+
return message;
|
|
1238
|
+
},
|
|
1239
|
+
|
|
1240
|
+
fromJSON(object: any): QueryCodeInfoRequest {
|
|
1241
|
+
return { codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO };
|
|
1242
|
+
},
|
|
1243
|
+
|
|
1244
|
+
toJSON(message: QueryCodeInfoRequest): unknown {
|
|
1245
|
+
const obj: any = {};
|
|
1246
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1247
|
+
obj.codeId = (message.codeId || Long.UZERO).toString();
|
|
1248
|
+
}
|
|
1249
|
+
return obj;
|
|
1250
|
+
},
|
|
1251
|
+
|
|
1252
|
+
create<I extends Exact<DeepPartial<QueryCodeInfoRequest>, I>>(base?: I): QueryCodeInfoRequest {
|
|
1253
|
+
return QueryCodeInfoRequest.fromPartial(base ?? ({} as any));
|
|
1254
|
+
},
|
|
1255
|
+
fromPartial<I extends Exact<DeepPartial<QueryCodeInfoRequest>, I>>(object: I): QueryCodeInfoRequest {
|
|
1256
|
+
const message = createBaseQueryCodeInfoRequest();
|
|
1257
|
+
message.codeId = (object.codeId !== undefined && object.codeId !== null)
|
|
1258
|
+
? Long.fromValue(object.codeId)
|
|
1259
|
+
: Long.UZERO;
|
|
1260
|
+
return message;
|
|
1261
|
+
},
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
function createBaseQueryCodeInfoResponse(): QueryCodeInfoResponse {
|
|
1265
|
+
return { codeId: Long.UZERO, creator: "", checksum: new Uint8Array(0), instantiatePermission: undefined };
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
export const QueryCodeInfoResponse = {
|
|
1269
|
+
encode(message: QueryCodeInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1270
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1271
|
+
writer.uint32(8).uint64(message.codeId);
|
|
1272
|
+
}
|
|
1273
|
+
if (message.creator !== "") {
|
|
1274
|
+
writer.uint32(18).string(message.creator);
|
|
1275
|
+
}
|
|
1276
|
+
if (message.checksum.length !== 0) {
|
|
1277
|
+
writer.uint32(26).bytes(message.checksum);
|
|
1278
|
+
}
|
|
1279
|
+
if (message.instantiatePermission !== undefined) {
|
|
1280
|
+
AccessConfig.encode(message.instantiatePermission, writer.uint32(34).fork()).ldelim();
|
|
1281
|
+
}
|
|
1282
|
+
return writer;
|
|
1283
|
+
},
|
|
1284
|
+
|
|
1285
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeInfoResponse {
|
|
1286
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1287
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1288
|
+
const message = createBaseQueryCodeInfoResponse();
|
|
1289
|
+
while (reader.pos < end) {
|
|
1290
|
+
const tag = reader.uint32();
|
|
1291
|
+
switch (tag >>> 3) {
|
|
1292
|
+
case 1:
|
|
1293
|
+
if (tag !== 8) {
|
|
1294
|
+
break;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
message.codeId = reader.uint64() as Long;
|
|
1298
|
+
continue;
|
|
1299
|
+
case 2:
|
|
1300
|
+
if (tag !== 18) {
|
|
1301
|
+
break;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
message.creator = reader.string();
|
|
1305
|
+
continue;
|
|
1306
|
+
case 3:
|
|
1307
|
+
if (tag !== 26) {
|
|
1308
|
+
break;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
message.checksum = reader.bytes();
|
|
1312
|
+
continue;
|
|
1313
|
+
case 4:
|
|
1314
|
+
if (tag !== 34) {
|
|
1315
|
+
break;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
message.instantiatePermission = AccessConfig.decode(reader, reader.uint32());
|
|
1319
|
+
continue;
|
|
1320
|
+
}
|
|
1321
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1322
|
+
break;
|
|
1323
|
+
}
|
|
1324
|
+
reader.skipType(tag & 7);
|
|
1325
|
+
}
|
|
1326
|
+
return message;
|
|
1327
|
+
},
|
|
1328
|
+
|
|
1329
|
+
fromJSON(object: any): QueryCodeInfoResponse {
|
|
1330
|
+
return {
|
|
1331
|
+
codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
|
|
1332
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
1333
|
+
checksum: isSet(object.checksum) ? bytesFromBase64(object.checksum) : new Uint8Array(0),
|
|
1334
|
+
instantiatePermission: isSet(object.instantiatePermission)
|
|
1335
|
+
? AccessConfig.fromJSON(object.instantiatePermission)
|
|
1336
|
+
: undefined,
|
|
1337
|
+
};
|
|
1338
|
+
},
|
|
1339
|
+
|
|
1340
|
+
toJSON(message: QueryCodeInfoResponse): unknown {
|
|
1341
|
+
const obj: any = {};
|
|
1342
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1343
|
+
obj.codeId = (message.codeId || Long.UZERO).toString();
|
|
1344
|
+
}
|
|
1345
|
+
if (message.creator !== "") {
|
|
1346
|
+
obj.creator = message.creator;
|
|
1347
|
+
}
|
|
1348
|
+
if (message.checksum.length !== 0) {
|
|
1349
|
+
obj.checksum = base64FromBytes(message.checksum);
|
|
1350
|
+
}
|
|
1351
|
+
if (message.instantiatePermission !== undefined) {
|
|
1352
|
+
obj.instantiatePermission = AccessConfig.toJSON(message.instantiatePermission);
|
|
1353
|
+
}
|
|
1354
|
+
return obj;
|
|
1355
|
+
},
|
|
1356
|
+
|
|
1357
|
+
create<I extends Exact<DeepPartial<QueryCodeInfoResponse>, I>>(base?: I): QueryCodeInfoResponse {
|
|
1358
|
+
return QueryCodeInfoResponse.fromPartial(base ?? ({} as any));
|
|
1359
|
+
},
|
|
1360
|
+
fromPartial<I extends Exact<DeepPartial<QueryCodeInfoResponse>, I>>(object: I): QueryCodeInfoResponse {
|
|
1361
|
+
const message = createBaseQueryCodeInfoResponse();
|
|
1362
|
+
message.codeId = (object.codeId !== undefined && object.codeId !== null)
|
|
1363
|
+
? Long.fromValue(object.codeId)
|
|
1364
|
+
: Long.UZERO;
|
|
1365
|
+
message.creator = object.creator ?? "";
|
|
1366
|
+
message.checksum = object.checksum ?? new Uint8Array(0);
|
|
1367
|
+
message.instantiatePermission =
|
|
1368
|
+
(object.instantiatePermission !== undefined && object.instantiatePermission !== null)
|
|
1369
|
+
? AccessConfig.fromPartial(object.instantiatePermission)
|
|
1370
|
+
: undefined;
|
|
1371
|
+
return message;
|
|
1372
|
+
},
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
function createBaseCodeInfoResponse(): CodeInfoResponse {
|
|
1376
|
+
return { codeId: Long.UZERO, creator: "", dataHash: new Uint8Array(0), instantiatePermission: undefined };
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
export const CodeInfoResponse = {
|
|
1380
|
+
encode(message: CodeInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1381
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1382
|
+
writer.uint32(8).uint64(message.codeId);
|
|
1383
|
+
}
|
|
1384
|
+
if (message.creator !== "") {
|
|
1385
|
+
writer.uint32(18).string(message.creator);
|
|
1386
|
+
}
|
|
1387
|
+
if (message.dataHash.length !== 0) {
|
|
1388
|
+
writer.uint32(26).bytes(message.dataHash);
|
|
1389
|
+
}
|
|
1390
|
+
if (message.instantiatePermission !== undefined) {
|
|
1391
|
+
AccessConfig.encode(message.instantiatePermission, writer.uint32(50).fork()).ldelim();
|
|
1392
|
+
}
|
|
1393
|
+
return writer;
|
|
1394
|
+
},
|
|
1395
|
+
|
|
1396
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): CodeInfoResponse {
|
|
1397
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1398
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1399
|
+
const message = createBaseCodeInfoResponse();
|
|
1400
|
+
while (reader.pos < end) {
|
|
1401
|
+
const tag = reader.uint32();
|
|
1402
|
+
switch (tag >>> 3) {
|
|
1403
|
+
case 1:
|
|
1404
|
+
if (tag !== 8) {
|
|
1405
|
+
break;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
message.codeId = reader.uint64() as Long;
|
|
1409
|
+
continue;
|
|
1410
|
+
case 2:
|
|
1411
|
+
if (tag !== 18) {
|
|
1412
|
+
break;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
message.creator = reader.string();
|
|
1416
|
+
continue;
|
|
1417
|
+
case 3:
|
|
1418
|
+
if (tag !== 26) {
|
|
1419
|
+
break;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
message.dataHash = reader.bytes();
|
|
1423
|
+
continue;
|
|
1424
|
+
case 6:
|
|
1425
|
+
if (tag !== 50) {
|
|
1426
|
+
break;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
message.instantiatePermission = AccessConfig.decode(reader, reader.uint32());
|
|
1430
|
+
continue;
|
|
1431
|
+
}
|
|
1432
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1433
|
+
break;
|
|
1434
|
+
}
|
|
1435
|
+
reader.skipType(tag & 7);
|
|
1436
|
+
}
|
|
1437
|
+
return message;
|
|
1438
|
+
},
|
|
1439
|
+
|
|
1440
|
+
fromJSON(object: any): CodeInfoResponse {
|
|
1441
|
+
return {
|
|
1442
|
+
codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
|
|
1443
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
1444
|
+
dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(0),
|
|
1445
|
+
instantiatePermission: isSet(object.instantiatePermission)
|
|
1446
|
+
? AccessConfig.fromJSON(object.instantiatePermission)
|
|
1447
|
+
: undefined,
|
|
1448
|
+
};
|
|
1449
|
+
},
|
|
1450
|
+
|
|
1451
|
+
toJSON(message: CodeInfoResponse): unknown {
|
|
1452
|
+
const obj: any = {};
|
|
1453
|
+
if (!message.codeId.equals(Long.UZERO)) {
|
|
1454
|
+
obj.codeId = (message.codeId || Long.UZERO).toString();
|
|
1455
|
+
}
|
|
1456
|
+
if (message.creator !== "") {
|
|
1457
|
+
obj.creator = message.creator;
|
|
1458
|
+
}
|
|
1459
|
+
if (message.dataHash.length !== 0) {
|
|
1460
|
+
obj.dataHash = base64FromBytes(message.dataHash);
|
|
1461
|
+
}
|
|
1462
|
+
if (message.instantiatePermission !== undefined) {
|
|
1463
|
+
obj.instantiatePermission = AccessConfig.toJSON(message.instantiatePermission);
|
|
1464
|
+
}
|
|
1465
|
+
return obj;
|
|
1466
|
+
},
|
|
1467
|
+
|
|
1468
|
+
create<I extends Exact<DeepPartial<CodeInfoResponse>, I>>(base?: I): CodeInfoResponse {
|
|
1469
|
+
return CodeInfoResponse.fromPartial(base ?? ({} as any));
|
|
1470
|
+
},
|
|
1471
|
+
fromPartial<I extends Exact<DeepPartial<CodeInfoResponse>, I>>(object: I): CodeInfoResponse {
|
|
1472
|
+
const message = createBaseCodeInfoResponse();
|
|
1473
|
+
message.codeId = (object.codeId !== undefined && object.codeId !== null)
|
|
1474
|
+
? Long.fromValue(object.codeId)
|
|
1475
|
+
: Long.UZERO;
|
|
1476
|
+
message.creator = object.creator ?? "";
|
|
1477
|
+
message.dataHash = object.dataHash ?? new Uint8Array(0);
|
|
1478
|
+
message.instantiatePermission =
|
|
1479
|
+
(object.instantiatePermission !== undefined && object.instantiatePermission !== null)
|
|
1480
|
+
? AccessConfig.fromPartial(object.instantiatePermission)
|
|
1481
|
+
: undefined;
|
|
1482
|
+
return message;
|
|
1483
|
+
},
|
|
1484
|
+
};
|
|
1485
|
+
|
|
1486
|
+
function createBaseQueryCodeResponse(): QueryCodeResponse {
|
|
1487
|
+
return { codeInfo: undefined, data: new Uint8Array(0) };
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
export const QueryCodeResponse = {
|
|
1491
|
+
encode(message: QueryCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1492
|
+
if (message.codeInfo !== undefined) {
|
|
1493
|
+
CodeInfoResponse.encode(message.codeInfo, writer.uint32(10).fork()).ldelim();
|
|
1494
|
+
}
|
|
1495
|
+
if (message.data.length !== 0) {
|
|
1496
|
+
writer.uint32(18).bytes(message.data);
|
|
1497
|
+
}
|
|
1498
|
+
return writer;
|
|
1499
|
+
},
|
|
1500
|
+
|
|
1501
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeResponse {
|
|
1502
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1503
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1504
|
+
const message = createBaseQueryCodeResponse();
|
|
1505
|
+
while (reader.pos < end) {
|
|
1506
|
+
const tag = reader.uint32();
|
|
1507
|
+
switch (tag >>> 3) {
|
|
1508
|
+
case 1:
|
|
1509
|
+
if (tag !== 10) {
|
|
1510
|
+
break;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
message.codeInfo = CodeInfoResponse.decode(reader, reader.uint32());
|
|
1514
|
+
continue;
|
|
1515
|
+
case 2:
|
|
1516
|
+
if (tag !== 18) {
|
|
1517
|
+
break;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
message.data = reader.bytes();
|
|
1521
|
+
continue;
|
|
1522
|
+
}
|
|
1523
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1524
|
+
break;
|
|
1525
|
+
}
|
|
1526
|
+
reader.skipType(tag & 7);
|
|
1527
|
+
}
|
|
1528
|
+
return message;
|
|
1529
|
+
},
|
|
1530
|
+
|
|
1531
|
+
fromJSON(object: any): QueryCodeResponse {
|
|
1532
|
+
return {
|
|
1533
|
+
codeInfo: isSet(object.codeInfo) ? CodeInfoResponse.fromJSON(object.codeInfo) : undefined,
|
|
1534
|
+
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
|
1535
|
+
};
|
|
1536
|
+
},
|
|
1537
|
+
|
|
1538
|
+
toJSON(message: QueryCodeResponse): unknown {
|
|
1539
|
+
const obj: any = {};
|
|
1540
|
+
if (message.codeInfo !== undefined) {
|
|
1541
|
+
obj.codeInfo = CodeInfoResponse.toJSON(message.codeInfo);
|
|
1542
|
+
}
|
|
1543
|
+
if (message.data.length !== 0) {
|
|
1544
|
+
obj.data = base64FromBytes(message.data);
|
|
1545
|
+
}
|
|
1546
|
+
return obj;
|
|
1547
|
+
},
|
|
1548
|
+
|
|
1549
|
+
create<I extends Exact<DeepPartial<QueryCodeResponse>, I>>(base?: I): QueryCodeResponse {
|
|
1550
|
+
return QueryCodeResponse.fromPartial(base ?? ({} as any));
|
|
1551
|
+
},
|
|
1552
|
+
fromPartial<I extends Exact<DeepPartial<QueryCodeResponse>, I>>(object: I): QueryCodeResponse {
|
|
1553
|
+
const message = createBaseQueryCodeResponse();
|
|
1554
|
+
message.codeInfo = (object.codeInfo !== undefined && object.codeInfo !== null)
|
|
1555
|
+
? CodeInfoResponse.fromPartial(object.codeInfo)
|
|
1556
|
+
: undefined;
|
|
1557
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
1558
|
+
return message;
|
|
1559
|
+
},
|
|
1560
|
+
};
|
|
1561
|
+
|
|
1562
|
+
function createBaseQueryCodesRequest(): QueryCodesRequest {
|
|
1563
|
+
return { pagination: undefined };
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
export const QueryCodesRequest = {
|
|
1567
|
+
encode(message: QueryCodesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1568
|
+
if (message.pagination !== undefined) {
|
|
1569
|
+
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
1570
|
+
}
|
|
1571
|
+
return writer;
|
|
1572
|
+
},
|
|
1573
|
+
|
|
1574
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodesRequest {
|
|
1575
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1576
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1577
|
+
const message = createBaseQueryCodesRequest();
|
|
1578
|
+
while (reader.pos < end) {
|
|
1579
|
+
const tag = reader.uint32();
|
|
1580
|
+
switch (tag >>> 3) {
|
|
1581
|
+
case 1:
|
|
1582
|
+
if (tag !== 10) {
|
|
1583
|
+
break;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
1587
|
+
continue;
|
|
1588
|
+
}
|
|
1589
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1590
|
+
break;
|
|
1591
|
+
}
|
|
1592
|
+
reader.skipType(tag & 7);
|
|
1593
|
+
}
|
|
1594
|
+
return message;
|
|
1595
|
+
},
|
|
1596
|
+
|
|
1597
|
+
fromJSON(object: any): QueryCodesRequest {
|
|
1598
|
+
return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined };
|
|
1599
|
+
},
|
|
1600
|
+
|
|
1601
|
+
toJSON(message: QueryCodesRequest): unknown {
|
|
1602
|
+
const obj: any = {};
|
|
1603
|
+
if (message.pagination !== undefined) {
|
|
1604
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
1605
|
+
}
|
|
1606
|
+
return obj;
|
|
1607
|
+
},
|
|
1608
|
+
|
|
1609
|
+
create<I extends Exact<DeepPartial<QueryCodesRequest>, I>>(base?: I): QueryCodesRequest {
|
|
1610
|
+
return QueryCodesRequest.fromPartial(base ?? ({} as any));
|
|
1611
|
+
},
|
|
1612
|
+
fromPartial<I extends Exact<DeepPartial<QueryCodesRequest>, I>>(object: I): QueryCodesRequest {
|
|
1613
|
+
const message = createBaseQueryCodesRequest();
|
|
1614
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1615
|
+
? PageRequest.fromPartial(object.pagination)
|
|
1616
|
+
: undefined;
|
|
1617
|
+
return message;
|
|
1618
|
+
},
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
function createBaseQueryCodesResponse(): QueryCodesResponse {
|
|
1622
|
+
return { codeInfos: [], pagination: undefined };
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
export const QueryCodesResponse = {
|
|
1626
|
+
encode(message: QueryCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1627
|
+
for (const v of message.codeInfos) {
|
|
1628
|
+
CodeInfoResponse.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1629
|
+
}
|
|
1630
|
+
if (message.pagination !== undefined) {
|
|
1631
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1632
|
+
}
|
|
1633
|
+
return writer;
|
|
1634
|
+
},
|
|
1635
|
+
|
|
1636
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodesResponse {
|
|
1637
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1638
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1639
|
+
const message = createBaseQueryCodesResponse();
|
|
1640
|
+
while (reader.pos < end) {
|
|
1641
|
+
const tag = reader.uint32();
|
|
1642
|
+
switch (tag >>> 3) {
|
|
1643
|
+
case 1:
|
|
1644
|
+
if (tag !== 10) {
|
|
1645
|
+
break;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
message.codeInfos.push(CodeInfoResponse.decode(reader, reader.uint32()));
|
|
1649
|
+
continue;
|
|
1650
|
+
case 2:
|
|
1651
|
+
if (tag !== 18) {
|
|
1652
|
+
break;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
1656
|
+
continue;
|
|
1657
|
+
}
|
|
1658
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1659
|
+
break;
|
|
1660
|
+
}
|
|
1661
|
+
reader.skipType(tag & 7);
|
|
1662
|
+
}
|
|
1663
|
+
return message;
|
|
1664
|
+
},
|
|
1665
|
+
|
|
1666
|
+
fromJSON(object: any): QueryCodesResponse {
|
|
1667
|
+
return {
|
|
1668
|
+
codeInfos: globalThis.Array.isArray(object?.codeInfos)
|
|
1669
|
+
? object.codeInfos.map((e: any) => CodeInfoResponse.fromJSON(e))
|
|
1670
|
+
: [],
|
|
1671
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
1672
|
+
};
|
|
1673
|
+
},
|
|
1674
|
+
|
|
1675
|
+
toJSON(message: QueryCodesResponse): unknown {
|
|
1676
|
+
const obj: any = {};
|
|
1677
|
+
if (message.codeInfos?.length) {
|
|
1678
|
+
obj.codeInfos = message.codeInfos.map((e) => CodeInfoResponse.toJSON(e));
|
|
1679
|
+
}
|
|
1680
|
+
if (message.pagination !== undefined) {
|
|
1681
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
1682
|
+
}
|
|
1683
|
+
return obj;
|
|
1684
|
+
},
|
|
1685
|
+
|
|
1686
|
+
create<I extends Exact<DeepPartial<QueryCodesResponse>, I>>(base?: I): QueryCodesResponse {
|
|
1687
|
+
return QueryCodesResponse.fromPartial(base ?? ({} as any));
|
|
1688
|
+
},
|
|
1689
|
+
fromPartial<I extends Exact<DeepPartial<QueryCodesResponse>, I>>(object: I): QueryCodesResponse {
|
|
1690
|
+
const message = createBaseQueryCodesResponse();
|
|
1691
|
+
message.codeInfos = object.codeInfos?.map((e) => CodeInfoResponse.fromPartial(e)) || [];
|
|
1692
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1693
|
+
? PageResponse.fromPartial(object.pagination)
|
|
1694
|
+
: undefined;
|
|
1695
|
+
return message;
|
|
1696
|
+
},
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest {
|
|
1700
|
+
return { pagination: undefined };
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
export const QueryPinnedCodesRequest = {
|
|
1704
|
+
encode(message: QueryPinnedCodesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1705
|
+
if (message.pagination !== undefined) {
|
|
1706
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1707
|
+
}
|
|
1708
|
+
return writer;
|
|
1709
|
+
},
|
|
1710
|
+
|
|
1711
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryPinnedCodesRequest {
|
|
1712
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1713
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1714
|
+
const message = createBaseQueryPinnedCodesRequest();
|
|
1715
|
+
while (reader.pos < end) {
|
|
1716
|
+
const tag = reader.uint32();
|
|
1717
|
+
switch (tag >>> 3) {
|
|
1718
|
+
case 2:
|
|
1719
|
+
if (tag !== 18) {
|
|
1720
|
+
break;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
1724
|
+
continue;
|
|
1725
|
+
}
|
|
1726
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1727
|
+
break;
|
|
1728
|
+
}
|
|
1729
|
+
reader.skipType(tag & 7);
|
|
1730
|
+
}
|
|
1731
|
+
return message;
|
|
1732
|
+
},
|
|
1733
|
+
|
|
1734
|
+
fromJSON(object: any): QueryPinnedCodesRequest {
|
|
1735
|
+
return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined };
|
|
1736
|
+
},
|
|
1737
|
+
|
|
1738
|
+
toJSON(message: QueryPinnedCodesRequest): unknown {
|
|
1739
|
+
const obj: any = {};
|
|
1740
|
+
if (message.pagination !== undefined) {
|
|
1741
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
1742
|
+
}
|
|
1743
|
+
return obj;
|
|
1744
|
+
},
|
|
1745
|
+
|
|
1746
|
+
create<I extends Exact<DeepPartial<QueryPinnedCodesRequest>, I>>(base?: I): QueryPinnedCodesRequest {
|
|
1747
|
+
return QueryPinnedCodesRequest.fromPartial(base ?? ({} as any));
|
|
1748
|
+
},
|
|
1749
|
+
fromPartial<I extends Exact<DeepPartial<QueryPinnedCodesRequest>, I>>(object: I): QueryPinnedCodesRequest {
|
|
1750
|
+
const message = createBaseQueryPinnedCodesRequest();
|
|
1751
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1752
|
+
? PageRequest.fromPartial(object.pagination)
|
|
1753
|
+
: undefined;
|
|
1754
|
+
return message;
|
|
1755
|
+
},
|
|
1756
|
+
};
|
|
1757
|
+
|
|
1758
|
+
function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse {
|
|
1759
|
+
return { codeIds: [], pagination: undefined };
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
export const QueryPinnedCodesResponse = {
|
|
1763
|
+
encode(message: QueryPinnedCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1764
|
+
writer.uint32(10).fork();
|
|
1765
|
+
for (const v of message.codeIds) {
|
|
1766
|
+
writer.uint64(v);
|
|
1767
|
+
}
|
|
1768
|
+
writer.ldelim();
|
|
1769
|
+
if (message.pagination !== undefined) {
|
|
1770
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1771
|
+
}
|
|
1772
|
+
return writer;
|
|
1773
|
+
},
|
|
1774
|
+
|
|
1775
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryPinnedCodesResponse {
|
|
1776
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1777
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1778
|
+
const message = createBaseQueryPinnedCodesResponse();
|
|
1779
|
+
while (reader.pos < end) {
|
|
1780
|
+
const tag = reader.uint32();
|
|
1781
|
+
switch (tag >>> 3) {
|
|
1782
|
+
case 1:
|
|
1783
|
+
if (tag === 8) {
|
|
1784
|
+
message.codeIds.push(reader.uint64() as Long);
|
|
1785
|
+
|
|
1786
|
+
continue;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
if (tag === 10) {
|
|
1790
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1791
|
+
while (reader.pos < end2) {
|
|
1792
|
+
message.codeIds.push(reader.uint64() as Long);
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
continue;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
break;
|
|
1799
|
+
case 2:
|
|
1800
|
+
if (tag !== 18) {
|
|
1801
|
+
break;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
1805
|
+
continue;
|
|
1806
|
+
}
|
|
1807
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1808
|
+
break;
|
|
1809
|
+
}
|
|
1810
|
+
reader.skipType(tag & 7);
|
|
1811
|
+
}
|
|
1812
|
+
return message;
|
|
1813
|
+
},
|
|
1814
|
+
|
|
1815
|
+
fromJSON(object: any): QueryPinnedCodesResponse {
|
|
1816
|
+
return {
|
|
1817
|
+
codeIds: globalThis.Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromValue(e)) : [],
|
|
1818
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
1819
|
+
};
|
|
1820
|
+
},
|
|
1821
|
+
|
|
1822
|
+
toJSON(message: QueryPinnedCodesResponse): unknown {
|
|
1823
|
+
const obj: any = {};
|
|
1824
|
+
if (message.codeIds?.length) {
|
|
1825
|
+
obj.codeIds = message.codeIds.map((e) => (e || Long.UZERO).toString());
|
|
1826
|
+
}
|
|
1827
|
+
if (message.pagination !== undefined) {
|
|
1828
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
1829
|
+
}
|
|
1830
|
+
return obj;
|
|
1831
|
+
},
|
|
1832
|
+
|
|
1833
|
+
create<I extends Exact<DeepPartial<QueryPinnedCodesResponse>, I>>(base?: I): QueryPinnedCodesResponse {
|
|
1834
|
+
return QueryPinnedCodesResponse.fromPartial(base ?? ({} as any));
|
|
1835
|
+
},
|
|
1836
|
+
fromPartial<I extends Exact<DeepPartial<QueryPinnedCodesResponse>, I>>(object: I): QueryPinnedCodesResponse {
|
|
1837
|
+
const message = createBaseQueryPinnedCodesResponse();
|
|
1838
|
+
message.codeIds = object.codeIds?.map((e) => Long.fromValue(e)) || [];
|
|
1839
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1840
|
+
? PageResponse.fromPartial(object.pagination)
|
|
1841
|
+
: undefined;
|
|
1842
|
+
return message;
|
|
1843
|
+
},
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
function createBaseQueryParamsRequest(): QueryParamsRequest {
|
|
1847
|
+
return {};
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
export const QueryParamsRequest = {
|
|
1851
|
+
encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1852
|
+
return writer;
|
|
1853
|
+
},
|
|
1854
|
+
|
|
1855
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest {
|
|
1856
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1857
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1858
|
+
const message = createBaseQueryParamsRequest();
|
|
1859
|
+
while (reader.pos < end) {
|
|
1860
|
+
const tag = reader.uint32();
|
|
1861
|
+
switch (tag >>> 3) {
|
|
1862
|
+
}
|
|
1863
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1864
|
+
break;
|
|
1865
|
+
}
|
|
1866
|
+
reader.skipType(tag & 7);
|
|
1867
|
+
}
|
|
1868
|
+
return message;
|
|
1869
|
+
},
|
|
1870
|
+
|
|
1871
|
+
fromJSON(_: any): QueryParamsRequest {
|
|
1872
|
+
return {};
|
|
1873
|
+
},
|
|
1874
|
+
|
|
1875
|
+
toJSON(_: QueryParamsRequest): unknown {
|
|
1876
|
+
const obj: any = {};
|
|
1877
|
+
return obj;
|
|
1878
|
+
},
|
|
1879
|
+
|
|
1880
|
+
create<I extends Exact<DeepPartial<QueryParamsRequest>, I>>(base?: I): QueryParamsRequest {
|
|
1881
|
+
return QueryParamsRequest.fromPartial(base ?? ({} as any));
|
|
1882
|
+
},
|
|
1883
|
+
fromPartial<I extends Exact<DeepPartial<QueryParamsRequest>, I>>(_: I): QueryParamsRequest {
|
|
1884
|
+
const message = createBaseQueryParamsRequest();
|
|
1885
|
+
return message;
|
|
1886
|
+
},
|
|
1887
|
+
};
|
|
1888
|
+
|
|
1889
|
+
function createBaseQueryParamsResponse(): QueryParamsResponse {
|
|
1890
|
+
return { params: undefined };
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
export const QueryParamsResponse = {
|
|
1894
|
+
encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1895
|
+
if (message.params !== undefined) {
|
|
1896
|
+
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
1897
|
+
}
|
|
1898
|
+
return writer;
|
|
1899
|
+
},
|
|
1900
|
+
|
|
1901
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse {
|
|
1902
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1903
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1904
|
+
const message = createBaseQueryParamsResponse();
|
|
1905
|
+
while (reader.pos < end) {
|
|
1906
|
+
const tag = reader.uint32();
|
|
1907
|
+
switch (tag >>> 3) {
|
|
1908
|
+
case 1:
|
|
1909
|
+
if (tag !== 10) {
|
|
1910
|
+
break;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
message.params = Params.decode(reader, reader.uint32());
|
|
1914
|
+
continue;
|
|
1915
|
+
}
|
|
1916
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1917
|
+
break;
|
|
1918
|
+
}
|
|
1919
|
+
reader.skipType(tag & 7);
|
|
1920
|
+
}
|
|
1921
|
+
return message;
|
|
1922
|
+
},
|
|
1923
|
+
|
|
1924
|
+
fromJSON(object: any): QueryParamsResponse {
|
|
1925
|
+
return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined };
|
|
1926
|
+
},
|
|
1927
|
+
|
|
1928
|
+
toJSON(message: QueryParamsResponse): unknown {
|
|
1929
|
+
const obj: any = {};
|
|
1930
|
+
if (message.params !== undefined) {
|
|
1931
|
+
obj.params = Params.toJSON(message.params);
|
|
1932
|
+
}
|
|
1933
|
+
return obj;
|
|
1934
|
+
},
|
|
1935
|
+
|
|
1936
|
+
create<I extends Exact<DeepPartial<QueryParamsResponse>, I>>(base?: I): QueryParamsResponse {
|
|
1937
|
+
return QueryParamsResponse.fromPartial(base ?? ({} as any));
|
|
1938
|
+
},
|
|
1939
|
+
fromPartial<I extends Exact<DeepPartial<QueryParamsResponse>, I>>(object: I): QueryParamsResponse {
|
|
1940
|
+
const message = createBaseQueryParamsResponse();
|
|
1941
|
+
message.params = (object.params !== undefined && object.params !== null)
|
|
1942
|
+
? Params.fromPartial(object.params)
|
|
1943
|
+
: undefined;
|
|
1944
|
+
return message;
|
|
1945
|
+
},
|
|
1946
|
+
};
|
|
1947
|
+
|
|
1948
|
+
function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest {
|
|
1949
|
+
return { creatorAddress: "", pagination: undefined };
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
export const QueryContractsByCreatorRequest = {
|
|
1953
|
+
encode(message: QueryContractsByCreatorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1954
|
+
if (message.creatorAddress !== "") {
|
|
1955
|
+
writer.uint32(10).string(message.creatorAddress);
|
|
1956
|
+
}
|
|
1957
|
+
if (message.pagination !== undefined) {
|
|
1958
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1959
|
+
}
|
|
1960
|
+
return writer;
|
|
1961
|
+
},
|
|
1962
|
+
|
|
1963
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCreatorRequest {
|
|
1964
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1965
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1966
|
+
const message = createBaseQueryContractsByCreatorRequest();
|
|
1967
|
+
while (reader.pos < end) {
|
|
1968
|
+
const tag = reader.uint32();
|
|
1969
|
+
switch (tag >>> 3) {
|
|
1970
|
+
case 1:
|
|
1971
|
+
if (tag !== 10) {
|
|
1972
|
+
break;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
message.creatorAddress = reader.string();
|
|
1976
|
+
continue;
|
|
1977
|
+
case 2:
|
|
1978
|
+
if (tag !== 18) {
|
|
1979
|
+
break;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
1983
|
+
continue;
|
|
1984
|
+
}
|
|
1985
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1986
|
+
break;
|
|
1987
|
+
}
|
|
1988
|
+
reader.skipType(tag & 7);
|
|
1989
|
+
}
|
|
1990
|
+
return message;
|
|
1991
|
+
},
|
|
1992
|
+
|
|
1993
|
+
fromJSON(object: any): QueryContractsByCreatorRequest {
|
|
1994
|
+
return {
|
|
1995
|
+
creatorAddress: isSet(object.creatorAddress) ? globalThis.String(object.creatorAddress) : "",
|
|
1996
|
+
pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
|
|
1997
|
+
};
|
|
1998
|
+
},
|
|
1999
|
+
|
|
2000
|
+
toJSON(message: QueryContractsByCreatorRequest): unknown {
|
|
2001
|
+
const obj: any = {};
|
|
2002
|
+
if (message.creatorAddress !== "") {
|
|
2003
|
+
obj.creatorAddress = message.creatorAddress;
|
|
2004
|
+
}
|
|
2005
|
+
if (message.pagination !== undefined) {
|
|
2006
|
+
obj.pagination = PageRequest.toJSON(message.pagination);
|
|
2007
|
+
}
|
|
2008
|
+
return obj;
|
|
2009
|
+
},
|
|
2010
|
+
|
|
2011
|
+
create<I extends Exact<DeepPartial<QueryContractsByCreatorRequest>, I>>(base?: I): QueryContractsByCreatorRequest {
|
|
2012
|
+
return QueryContractsByCreatorRequest.fromPartial(base ?? ({} as any));
|
|
2013
|
+
},
|
|
2014
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractsByCreatorRequest>, I>>(
|
|
2015
|
+
object: I,
|
|
2016
|
+
): QueryContractsByCreatorRequest {
|
|
2017
|
+
const message = createBaseQueryContractsByCreatorRequest();
|
|
2018
|
+
message.creatorAddress = object.creatorAddress ?? "";
|
|
2019
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
2020
|
+
? PageRequest.fromPartial(object.pagination)
|
|
2021
|
+
: undefined;
|
|
2022
|
+
return message;
|
|
2023
|
+
},
|
|
2024
|
+
};
|
|
2025
|
+
|
|
2026
|
+
function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorResponse {
|
|
2027
|
+
return { contractAddresses: [], pagination: undefined };
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
export const QueryContractsByCreatorResponse = {
|
|
2031
|
+
encode(message: QueryContractsByCreatorResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2032
|
+
for (const v of message.contractAddresses) {
|
|
2033
|
+
writer.uint32(10).string(v!);
|
|
2034
|
+
}
|
|
2035
|
+
if (message.pagination !== undefined) {
|
|
2036
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
2037
|
+
}
|
|
2038
|
+
return writer;
|
|
2039
|
+
},
|
|
2040
|
+
|
|
2041
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCreatorResponse {
|
|
2042
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2043
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2044
|
+
const message = createBaseQueryContractsByCreatorResponse();
|
|
2045
|
+
while (reader.pos < end) {
|
|
2046
|
+
const tag = reader.uint32();
|
|
2047
|
+
switch (tag >>> 3) {
|
|
2048
|
+
case 1:
|
|
2049
|
+
if (tag !== 10) {
|
|
2050
|
+
break;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
message.contractAddresses.push(reader.string());
|
|
2054
|
+
continue;
|
|
2055
|
+
case 2:
|
|
2056
|
+
if (tag !== 18) {
|
|
2057
|
+
break;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
2061
|
+
continue;
|
|
2062
|
+
}
|
|
2063
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2064
|
+
break;
|
|
2065
|
+
}
|
|
2066
|
+
reader.skipType(tag & 7);
|
|
2067
|
+
}
|
|
2068
|
+
return message;
|
|
2069
|
+
},
|
|
2070
|
+
|
|
2071
|
+
fromJSON(object: any): QueryContractsByCreatorResponse {
|
|
2072
|
+
return {
|
|
2073
|
+
contractAddresses: globalThis.Array.isArray(object?.contractAddresses)
|
|
2074
|
+
? object.contractAddresses.map((e: any) => globalThis.String(e))
|
|
2075
|
+
: [],
|
|
2076
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
2077
|
+
};
|
|
2078
|
+
},
|
|
2079
|
+
|
|
2080
|
+
toJSON(message: QueryContractsByCreatorResponse): unknown {
|
|
2081
|
+
const obj: any = {};
|
|
2082
|
+
if (message.contractAddresses?.length) {
|
|
2083
|
+
obj.contractAddresses = message.contractAddresses;
|
|
2084
|
+
}
|
|
2085
|
+
if (message.pagination !== undefined) {
|
|
2086
|
+
obj.pagination = PageResponse.toJSON(message.pagination);
|
|
2087
|
+
}
|
|
2088
|
+
return obj;
|
|
2089
|
+
},
|
|
2090
|
+
|
|
2091
|
+
create<I extends Exact<DeepPartial<QueryContractsByCreatorResponse>, I>>(base?: I): QueryContractsByCreatorResponse {
|
|
2092
|
+
return QueryContractsByCreatorResponse.fromPartial(base ?? ({} as any));
|
|
2093
|
+
},
|
|
2094
|
+
fromPartial<I extends Exact<DeepPartial<QueryContractsByCreatorResponse>, I>>(
|
|
2095
|
+
object: I,
|
|
2096
|
+
): QueryContractsByCreatorResponse {
|
|
2097
|
+
const message = createBaseQueryContractsByCreatorResponse();
|
|
2098
|
+
message.contractAddresses = object.contractAddresses?.map((e) => e) || [];
|
|
2099
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
2100
|
+
? PageResponse.fromPartial(object.pagination)
|
|
2101
|
+
: undefined;
|
|
2102
|
+
return message;
|
|
2103
|
+
},
|
|
2104
|
+
};
|
|
2105
|
+
|
|
2106
|
+
function createBaseQueryWasmLimitsConfigRequest(): QueryWasmLimitsConfigRequest {
|
|
2107
|
+
return {};
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
export const QueryWasmLimitsConfigRequest = {
|
|
2111
|
+
encode(_: QueryWasmLimitsConfigRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2112
|
+
return writer;
|
|
2113
|
+
},
|
|
2114
|
+
|
|
2115
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryWasmLimitsConfigRequest {
|
|
2116
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2117
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2118
|
+
const message = createBaseQueryWasmLimitsConfigRequest();
|
|
2119
|
+
while (reader.pos < end) {
|
|
2120
|
+
const tag = reader.uint32();
|
|
2121
|
+
switch (tag >>> 3) {
|
|
2122
|
+
}
|
|
2123
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2124
|
+
break;
|
|
2125
|
+
}
|
|
2126
|
+
reader.skipType(tag & 7);
|
|
2127
|
+
}
|
|
2128
|
+
return message;
|
|
2129
|
+
},
|
|
2130
|
+
|
|
2131
|
+
fromJSON(_: any): QueryWasmLimitsConfigRequest {
|
|
2132
|
+
return {};
|
|
2133
|
+
},
|
|
2134
|
+
|
|
2135
|
+
toJSON(_: QueryWasmLimitsConfigRequest): unknown {
|
|
2136
|
+
const obj: any = {};
|
|
2137
|
+
return obj;
|
|
2138
|
+
},
|
|
2139
|
+
|
|
2140
|
+
create<I extends Exact<DeepPartial<QueryWasmLimitsConfigRequest>, I>>(base?: I): QueryWasmLimitsConfigRequest {
|
|
2141
|
+
return QueryWasmLimitsConfigRequest.fromPartial(base ?? ({} as any));
|
|
2142
|
+
},
|
|
2143
|
+
fromPartial<I extends Exact<DeepPartial<QueryWasmLimitsConfigRequest>, I>>(_: I): QueryWasmLimitsConfigRequest {
|
|
2144
|
+
const message = createBaseQueryWasmLimitsConfigRequest();
|
|
2145
|
+
return message;
|
|
2146
|
+
},
|
|
2147
|
+
};
|
|
2148
|
+
|
|
2149
|
+
function createBaseQueryWasmLimitsConfigResponse(): QueryWasmLimitsConfigResponse {
|
|
2150
|
+
return { config: "" };
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
export const QueryWasmLimitsConfigResponse = {
|
|
2154
|
+
encode(message: QueryWasmLimitsConfigResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2155
|
+
if (message.config !== "") {
|
|
2156
|
+
writer.uint32(10).string(message.config);
|
|
2157
|
+
}
|
|
2158
|
+
return writer;
|
|
2159
|
+
},
|
|
2160
|
+
|
|
2161
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryWasmLimitsConfigResponse {
|
|
2162
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2163
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2164
|
+
const message = createBaseQueryWasmLimitsConfigResponse();
|
|
2165
|
+
while (reader.pos < end) {
|
|
2166
|
+
const tag = reader.uint32();
|
|
2167
|
+
switch (tag >>> 3) {
|
|
2168
|
+
case 1:
|
|
2169
|
+
if (tag !== 10) {
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
message.config = reader.string();
|
|
2174
|
+
continue;
|
|
2175
|
+
}
|
|
2176
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2177
|
+
break;
|
|
2178
|
+
}
|
|
2179
|
+
reader.skipType(tag & 7);
|
|
2180
|
+
}
|
|
2181
|
+
return message;
|
|
2182
|
+
},
|
|
2183
|
+
|
|
2184
|
+
fromJSON(object: any): QueryWasmLimitsConfigResponse {
|
|
2185
|
+
return { config: isSet(object.config) ? globalThis.String(object.config) : "" };
|
|
2186
|
+
},
|
|
2187
|
+
|
|
2188
|
+
toJSON(message: QueryWasmLimitsConfigResponse): unknown {
|
|
2189
|
+
const obj: any = {};
|
|
2190
|
+
if (message.config !== "") {
|
|
2191
|
+
obj.config = message.config;
|
|
2192
|
+
}
|
|
2193
|
+
return obj;
|
|
2194
|
+
},
|
|
2195
|
+
|
|
2196
|
+
create<I extends Exact<DeepPartial<QueryWasmLimitsConfigResponse>, I>>(base?: I): QueryWasmLimitsConfigResponse {
|
|
2197
|
+
return QueryWasmLimitsConfigResponse.fromPartial(base ?? ({} as any));
|
|
2198
|
+
},
|
|
2199
|
+
fromPartial<I extends Exact<DeepPartial<QueryWasmLimitsConfigResponse>, I>>(
|
|
2200
|
+
object: I,
|
|
2201
|
+
): QueryWasmLimitsConfigResponse {
|
|
2202
|
+
const message = createBaseQueryWasmLimitsConfigResponse();
|
|
2203
|
+
message.config = object.config ?? "";
|
|
2204
|
+
return message;
|
|
2205
|
+
},
|
|
2206
|
+
};
|
|
2207
|
+
|
|
2208
|
+
function createBaseQueryBuildAddressRequest(): QueryBuildAddressRequest {
|
|
2209
|
+
return { codeHash: "", creatorAddress: "", salt: "", initArgs: new Uint8Array(0) };
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
export const QueryBuildAddressRequest = {
|
|
2213
|
+
encode(message: QueryBuildAddressRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2214
|
+
if (message.codeHash !== "") {
|
|
2215
|
+
writer.uint32(10).string(message.codeHash);
|
|
2216
|
+
}
|
|
2217
|
+
if (message.creatorAddress !== "") {
|
|
2218
|
+
writer.uint32(18).string(message.creatorAddress);
|
|
2219
|
+
}
|
|
2220
|
+
if (message.salt !== "") {
|
|
2221
|
+
writer.uint32(26).string(message.salt);
|
|
2222
|
+
}
|
|
2223
|
+
if (message.initArgs.length !== 0) {
|
|
2224
|
+
writer.uint32(34).bytes(message.initArgs);
|
|
2225
|
+
}
|
|
2226
|
+
return writer;
|
|
2227
|
+
},
|
|
2228
|
+
|
|
2229
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBuildAddressRequest {
|
|
2230
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2231
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2232
|
+
const message = createBaseQueryBuildAddressRequest();
|
|
2233
|
+
while (reader.pos < end) {
|
|
2234
|
+
const tag = reader.uint32();
|
|
2235
|
+
switch (tag >>> 3) {
|
|
2236
|
+
case 1:
|
|
2237
|
+
if (tag !== 10) {
|
|
2238
|
+
break;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
message.codeHash = reader.string();
|
|
2242
|
+
continue;
|
|
2243
|
+
case 2:
|
|
2244
|
+
if (tag !== 18) {
|
|
2245
|
+
break;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
message.creatorAddress = reader.string();
|
|
2249
|
+
continue;
|
|
2250
|
+
case 3:
|
|
2251
|
+
if (tag !== 26) {
|
|
2252
|
+
break;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
message.salt = reader.string();
|
|
2256
|
+
continue;
|
|
2257
|
+
case 4:
|
|
2258
|
+
if (tag !== 34) {
|
|
2259
|
+
break;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
message.initArgs = reader.bytes();
|
|
2263
|
+
continue;
|
|
2264
|
+
}
|
|
2265
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2266
|
+
break;
|
|
2267
|
+
}
|
|
2268
|
+
reader.skipType(tag & 7);
|
|
2269
|
+
}
|
|
2270
|
+
return message;
|
|
2271
|
+
},
|
|
2272
|
+
|
|
2273
|
+
fromJSON(object: any): QueryBuildAddressRequest {
|
|
2274
|
+
return {
|
|
2275
|
+
codeHash: isSet(object.codeHash) ? globalThis.String(object.codeHash) : "",
|
|
2276
|
+
creatorAddress: isSet(object.creatorAddress) ? globalThis.String(object.creatorAddress) : "",
|
|
2277
|
+
salt: isSet(object.salt) ? globalThis.String(object.salt) : "",
|
|
2278
|
+
initArgs: isSet(object.initArgs) ? bytesFromBase64(object.initArgs) : new Uint8Array(0),
|
|
2279
|
+
};
|
|
2280
|
+
},
|
|
2281
|
+
|
|
2282
|
+
toJSON(message: QueryBuildAddressRequest): unknown {
|
|
2283
|
+
const obj: any = {};
|
|
2284
|
+
if (message.codeHash !== "") {
|
|
2285
|
+
obj.codeHash = message.codeHash;
|
|
2286
|
+
}
|
|
2287
|
+
if (message.creatorAddress !== "") {
|
|
2288
|
+
obj.creatorAddress = message.creatorAddress;
|
|
2289
|
+
}
|
|
2290
|
+
if (message.salt !== "") {
|
|
2291
|
+
obj.salt = message.salt;
|
|
2292
|
+
}
|
|
2293
|
+
if (message.initArgs.length !== 0) {
|
|
2294
|
+
obj.initArgs = base64FromBytes(message.initArgs);
|
|
2295
|
+
}
|
|
2296
|
+
return obj;
|
|
2297
|
+
},
|
|
2298
|
+
|
|
2299
|
+
create<I extends Exact<DeepPartial<QueryBuildAddressRequest>, I>>(base?: I): QueryBuildAddressRequest {
|
|
2300
|
+
return QueryBuildAddressRequest.fromPartial(base ?? ({} as any));
|
|
2301
|
+
},
|
|
2302
|
+
fromPartial<I extends Exact<DeepPartial<QueryBuildAddressRequest>, I>>(object: I): QueryBuildAddressRequest {
|
|
2303
|
+
const message = createBaseQueryBuildAddressRequest();
|
|
2304
|
+
message.codeHash = object.codeHash ?? "";
|
|
2305
|
+
message.creatorAddress = object.creatorAddress ?? "";
|
|
2306
|
+
message.salt = object.salt ?? "";
|
|
2307
|
+
message.initArgs = object.initArgs ?? new Uint8Array(0);
|
|
2308
|
+
return message;
|
|
2309
|
+
},
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2312
|
+
function createBaseQueryBuildAddressResponse(): QueryBuildAddressResponse {
|
|
2313
|
+
return { address: "" };
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
export const QueryBuildAddressResponse = {
|
|
2317
|
+
encode(message: QueryBuildAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2318
|
+
if (message.address !== "") {
|
|
2319
|
+
writer.uint32(10).string(message.address);
|
|
2320
|
+
}
|
|
2321
|
+
return writer;
|
|
2322
|
+
},
|
|
2323
|
+
|
|
2324
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBuildAddressResponse {
|
|
2325
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2326
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2327
|
+
const message = createBaseQueryBuildAddressResponse();
|
|
2328
|
+
while (reader.pos < end) {
|
|
2329
|
+
const tag = reader.uint32();
|
|
2330
|
+
switch (tag >>> 3) {
|
|
2331
|
+
case 1:
|
|
2332
|
+
if (tag !== 10) {
|
|
2333
|
+
break;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
message.address = reader.string();
|
|
2337
|
+
continue;
|
|
2338
|
+
}
|
|
2339
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2340
|
+
break;
|
|
2341
|
+
}
|
|
2342
|
+
reader.skipType(tag & 7);
|
|
2343
|
+
}
|
|
2344
|
+
return message;
|
|
2345
|
+
},
|
|
2346
|
+
|
|
2347
|
+
fromJSON(object: any): QueryBuildAddressResponse {
|
|
2348
|
+
return { address: isSet(object.address) ? globalThis.String(object.address) : "" };
|
|
2349
|
+
},
|
|
2350
|
+
|
|
2351
|
+
toJSON(message: QueryBuildAddressResponse): unknown {
|
|
2352
|
+
const obj: any = {};
|
|
2353
|
+
if (message.address !== "") {
|
|
2354
|
+
obj.address = message.address;
|
|
2355
|
+
}
|
|
2356
|
+
return obj;
|
|
2357
|
+
},
|
|
2358
|
+
|
|
2359
|
+
create<I extends Exact<DeepPartial<QueryBuildAddressResponse>, I>>(base?: I): QueryBuildAddressResponse {
|
|
2360
|
+
return QueryBuildAddressResponse.fromPartial(base ?? ({} as any));
|
|
2361
|
+
},
|
|
2362
|
+
fromPartial<I extends Exact<DeepPartial<QueryBuildAddressResponse>, I>>(object: I): QueryBuildAddressResponse {
|
|
2363
|
+
const message = createBaseQueryBuildAddressResponse();
|
|
2364
|
+
message.address = object.address ?? "";
|
|
2365
|
+
return message;
|
|
2366
|
+
},
|
|
2367
|
+
};
|
|
2368
|
+
|
|
2369
|
+
/** Query provides defines the gRPC querier service */
|
|
2370
|
+
export interface Query {
|
|
2371
|
+
/** ContractInfo gets the contract meta data */
|
|
2372
|
+
ContractInfo(
|
|
2373
|
+
request: DeepPartial<QueryContractInfoRequest>,
|
|
2374
|
+
metadata?: grpc.Metadata,
|
|
2375
|
+
): Promise<QueryContractInfoResponse>;
|
|
2376
|
+
/** ContractHistory gets the contract code history */
|
|
2377
|
+
ContractHistory(
|
|
2378
|
+
request: DeepPartial<QueryContractHistoryRequest>,
|
|
2379
|
+
metadata?: grpc.Metadata,
|
|
2380
|
+
): Promise<QueryContractHistoryResponse>;
|
|
2381
|
+
/** ContractsByCode lists all smart contracts for a code id */
|
|
2382
|
+
ContractsByCode(
|
|
2383
|
+
request: DeepPartial<QueryContractsByCodeRequest>,
|
|
2384
|
+
metadata?: grpc.Metadata,
|
|
2385
|
+
): Promise<QueryContractsByCodeResponse>;
|
|
2386
|
+
/** AllContractState gets all raw store data for a single contract */
|
|
2387
|
+
AllContractState(
|
|
2388
|
+
request: DeepPartial<QueryAllContractStateRequest>,
|
|
2389
|
+
metadata?: grpc.Metadata,
|
|
2390
|
+
): Promise<QueryAllContractStateResponse>;
|
|
2391
|
+
/** RawContractState gets single key from the raw store data of a contract */
|
|
2392
|
+
RawContractState(
|
|
2393
|
+
request: DeepPartial<QueryRawContractStateRequest>,
|
|
2394
|
+
metadata?: grpc.Metadata,
|
|
2395
|
+
): Promise<QueryRawContractStateResponse>;
|
|
2396
|
+
/** SmartContractState get smart query result from the contract */
|
|
2397
|
+
SmartContractState(
|
|
2398
|
+
request: DeepPartial<QuerySmartContractStateRequest>,
|
|
2399
|
+
metadata?: grpc.Metadata,
|
|
2400
|
+
): Promise<QuerySmartContractStateResponse>;
|
|
2401
|
+
/** Code gets the binary code and metadata for a single wasm code */
|
|
2402
|
+
Code(request: DeepPartial<QueryCodeRequest>, metadata?: grpc.Metadata): Promise<QueryCodeResponse>;
|
|
2403
|
+
/** Codes gets the metadata for all stored wasm codes */
|
|
2404
|
+
Codes(request: DeepPartial<QueryCodesRequest>, metadata?: grpc.Metadata): Promise<QueryCodesResponse>;
|
|
2405
|
+
/** CodeInfo gets the metadata for a single wasm code */
|
|
2406
|
+
CodeInfo(request: DeepPartial<QueryCodeInfoRequest>, metadata?: grpc.Metadata): Promise<QueryCodeInfoResponse>;
|
|
2407
|
+
/** PinnedCodes gets the pinned code ids */
|
|
2408
|
+
PinnedCodes(
|
|
2409
|
+
request: DeepPartial<QueryPinnedCodesRequest>,
|
|
2410
|
+
metadata?: grpc.Metadata,
|
|
2411
|
+
): Promise<QueryPinnedCodesResponse>;
|
|
2412
|
+
/** Params gets the module params */
|
|
2413
|
+
Params(request: DeepPartial<QueryParamsRequest>, metadata?: grpc.Metadata): Promise<QueryParamsResponse>;
|
|
2414
|
+
/** ContractsByCreator gets the contracts by creator */
|
|
2415
|
+
ContractsByCreator(
|
|
2416
|
+
request: DeepPartial<QueryContractsByCreatorRequest>,
|
|
2417
|
+
metadata?: grpc.Metadata,
|
|
2418
|
+
): Promise<QueryContractsByCreatorResponse>;
|
|
2419
|
+
/**
|
|
2420
|
+
* WasmLimitsConfig gets the configured limits for static validation of Wasm
|
|
2421
|
+
* files, encoded in JSON.
|
|
2422
|
+
*/
|
|
2423
|
+
WasmLimitsConfig(
|
|
2424
|
+
request: DeepPartial<QueryWasmLimitsConfigRequest>,
|
|
2425
|
+
metadata?: grpc.Metadata,
|
|
2426
|
+
): Promise<QueryWasmLimitsConfigResponse>;
|
|
2427
|
+
/** BuildAddress builds a contract address */
|
|
2428
|
+
BuildAddress(
|
|
2429
|
+
request: DeepPartial<QueryBuildAddressRequest>,
|
|
2430
|
+
metadata?: grpc.Metadata,
|
|
2431
|
+
): Promise<QueryBuildAddressResponse>;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
export class QueryClientImpl implements Query {
|
|
2435
|
+
private readonly rpc: Rpc;
|
|
2436
|
+
|
|
2437
|
+
constructor(rpc: Rpc) {
|
|
2438
|
+
this.rpc = rpc;
|
|
2439
|
+
this.ContractInfo = this.ContractInfo.bind(this);
|
|
2440
|
+
this.ContractHistory = this.ContractHistory.bind(this);
|
|
2441
|
+
this.ContractsByCode = this.ContractsByCode.bind(this);
|
|
2442
|
+
this.AllContractState = this.AllContractState.bind(this);
|
|
2443
|
+
this.RawContractState = this.RawContractState.bind(this);
|
|
2444
|
+
this.SmartContractState = this.SmartContractState.bind(this);
|
|
2445
|
+
this.Code = this.Code.bind(this);
|
|
2446
|
+
this.Codes = this.Codes.bind(this);
|
|
2447
|
+
this.CodeInfo = this.CodeInfo.bind(this);
|
|
2448
|
+
this.PinnedCodes = this.PinnedCodes.bind(this);
|
|
2449
|
+
this.Params = this.Params.bind(this);
|
|
2450
|
+
this.ContractsByCreator = this.ContractsByCreator.bind(this);
|
|
2451
|
+
this.WasmLimitsConfig = this.WasmLimitsConfig.bind(this);
|
|
2452
|
+
this.BuildAddress = this.BuildAddress.bind(this);
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
ContractInfo(
|
|
2456
|
+
request: DeepPartial<QueryContractInfoRequest>,
|
|
2457
|
+
metadata?: grpc.Metadata,
|
|
2458
|
+
): Promise<QueryContractInfoResponse> {
|
|
2459
|
+
return this.rpc.unary(QueryContractInfoDesc, QueryContractInfoRequest.fromPartial(request), metadata);
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
ContractHistory(
|
|
2463
|
+
request: DeepPartial<QueryContractHistoryRequest>,
|
|
2464
|
+
metadata?: grpc.Metadata,
|
|
2465
|
+
): Promise<QueryContractHistoryResponse> {
|
|
2466
|
+
return this.rpc.unary(QueryContractHistoryDesc, QueryContractHistoryRequest.fromPartial(request), metadata);
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
ContractsByCode(
|
|
2470
|
+
request: DeepPartial<QueryContractsByCodeRequest>,
|
|
2471
|
+
metadata?: grpc.Metadata,
|
|
2472
|
+
): Promise<QueryContractsByCodeResponse> {
|
|
2473
|
+
return this.rpc.unary(QueryContractsByCodeDesc, QueryContractsByCodeRequest.fromPartial(request), metadata);
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
AllContractState(
|
|
2477
|
+
request: DeepPartial<QueryAllContractStateRequest>,
|
|
2478
|
+
metadata?: grpc.Metadata,
|
|
2479
|
+
): Promise<QueryAllContractStateResponse> {
|
|
2480
|
+
return this.rpc.unary(QueryAllContractStateDesc, QueryAllContractStateRequest.fromPartial(request), metadata);
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
RawContractState(
|
|
2484
|
+
request: DeepPartial<QueryRawContractStateRequest>,
|
|
2485
|
+
metadata?: grpc.Metadata,
|
|
2486
|
+
): Promise<QueryRawContractStateResponse> {
|
|
2487
|
+
return this.rpc.unary(QueryRawContractStateDesc, QueryRawContractStateRequest.fromPartial(request), metadata);
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
SmartContractState(
|
|
2491
|
+
request: DeepPartial<QuerySmartContractStateRequest>,
|
|
2492
|
+
metadata?: grpc.Metadata,
|
|
2493
|
+
): Promise<QuerySmartContractStateResponse> {
|
|
2494
|
+
return this.rpc.unary(QuerySmartContractStateDesc, QuerySmartContractStateRequest.fromPartial(request), metadata);
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
Code(request: DeepPartial<QueryCodeRequest>, metadata?: grpc.Metadata): Promise<QueryCodeResponse> {
|
|
2498
|
+
return this.rpc.unary(QueryCodeDesc, QueryCodeRequest.fromPartial(request), metadata);
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
Codes(request: DeepPartial<QueryCodesRequest>, metadata?: grpc.Metadata): Promise<QueryCodesResponse> {
|
|
2502
|
+
return this.rpc.unary(QueryCodesDesc, QueryCodesRequest.fromPartial(request), metadata);
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
CodeInfo(request: DeepPartial<QueryCodeInfoRequest>, metadata?: grpc.Metadata): Promise<QueryCodeInfoResponse> {
|
|
2506
|
+
return this.rpc.unary(QueryCodeInfoDesc, QueryCodeInfoRequest.fromPartial(request), metadata);
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
PinnedCodes(
|
|
2510
|
+
request: DeepPartial<QueryPinnedCodesRequest>,
|
|
2511
|
+
metadata?: grpc.Metadata,
|
|
2512
|
+
): Promise<QueryPinnedCodesResponse> {
|
|
2513
|
+
return this.rpc.unary(QueryPinnedCodesDesc, QueryPinnedCodesRequest.fromPartial(request), metadata);
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
Params(request: DeepPartial<QueryParamsRequest>, metadata?: grpc.Metadata): Promise<QueryParamsResponse> {
|
|
2517
|
+
return this.rpc.unary(QueryParamsDesc, QueryParamsRequest.fromPartial(request), metadata);
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
ContractsByCreator(
|
|
2521
|
+
request: DeepPartial<QueryContractsByCreatorRequest>,
|
|
2522
|
+
metadata?: grpc.Metadata,
|
|
2523
|
+
): Promise<QueryContractsByCreatorResponse> {
|
|
2524
|
+
return this.rpc.unary(QueryContractsByCreatorDesc, QueryContractsByCreatorRequest.fromPartial(request), metadata);
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
WasmLimitsConfig(
|
|
2528
|
+
request: DeepPartial<QueryWasmLimitsConfigRequest>,
|
|
2529
|
+
metadata?: grpc.Metadata,
|
|
2530
|
+
): Promise<QueryWasmLimitsConfigResponse> {
|
|
2531
|
+
return this.rpc.unary(QueryWasmLimitsConfigDesc, QueryWasmLimitsConfigRequest.fromPartial(request), metadata);
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
BuildAddress(
|
|
2535
|
+
request: DeepPartial<QueryBuildAddressRequest>,
|
|
2536
|
+
metadata?: grpc.Metadata,
|
|
2537
|
+
): Promise<QueryBuildAddressResponse> {
|
|
2538
|
+
return this.rpc.unary(QueryBuildAddressDesc, QueryBuildAddressRequest.fromPartial(request), metadata);
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
export const QueryDesc = { serviceName: "cosmwasm.wasm.v1.Query" };
|
|
2543
|
+
|
|
2544
|
+
export const QueryContractInfoDesc: UnaryMethodDefinitionish = {
|
|
2545
|
+
methodName: "ContractInfo",
|
|
2546
|
+
service: QueryDesc,
|
|
2547
|
+
requestStream: false,
|
|
2548
|
+
responseStream: false,
|
|
2549
|
+
requestType: {
|
|
2550
|
+
serializeBinary() {
|
|
2551
|
+
return QueryContractInfoRequest.encode(this).finish();
|
|
2552
|
+
},
|
|
2553
|
+
} as any,
|
|
2554
|
+
responseType: {
|
|
2555
|
+
deserializeBinary(data: Uint8Array) {
|
|
2556
|
+
const value = QueryContractInfoResponse.decode(data);
|
|
2557
|
+
return {
|
|
2558
|
+
...value,
|
|
2559
|
+
toObject() {
|
|
2560
|
+
return value;
|
|
2561
|
+
},
|
|
2562
|
+
};
|
|
2563
|
+
},
|
|
2564
|
+
} as any,
|
|
2565
|
+
};
|
|
2566
|
+
|
|
2567
|
+
export const QueryContractHistoryDesc: UnaryMethodDefinitionish = {
|
|
2568
|
+
methodName: "ContractHistory",
|
|
2569
|
+
service: QueryDesc,
|
|
2570
|
+
requestStream: false,
|
|
2571
|
+
responseStream: false,
|
|
2572
|
+
requestType: {
|
|
2573
|
+
serializeBinary() {
|
|
2574
|
+
return QueryContractHistoryRequest.encode(this).finish();
|
|
2575
|
+
},
|
|
2576
|
+
} as any,
|
|
2577
|
+
responseType: {
|
|
2578
|
+
deserializeBinary(data: Uint8Array) {
|
|
2579
|
+
const value = QueryContractHistoryResponse.decode(data);
|
|
2580
|
+
return {
|
|
2581
|
+
...value,
|
|
2582
|
+
toObject() {
|
|
2583
|
+
return value;
|
|
2584
|
+
},
|
|
2585
|
+
};
|
|
2586
|
+
},
|
|
2587
|
+
} as any,
|
|
2588
|
+
};
|
|
2589
|
+
|
|
2590
|
+
export const QueryContractsByCodeDesc: UnaryMethodDefinitionish = {
|
|
2591
|
+
methodName: "ContractsByCode",
|
|
2592
|
+
service: QueryDesc,
|
|
2593
|
+
requestStream: false,
|
|
2594
|
+
responseStream: false,
|
|
2595
|
+
requestType: {
|
|
2596
|
+
serializeBinary() {
|
|
2597
|
+
return QueryContractsByCodeRequest.encode(this).finish();
|
|
2598
|
+
},
|
|
2599
|
+
} as any,
|
|
2600
|
+
responseType: {
|
|
2601
|
+
deserializeBinary(data: Uint8Array) {
|
|
2602
|
+
const value = QueryContractsByCodeResponse.decode(data);
|
|
2603
|
+
return {
|
|
2604
|
+
...value,
|
|
2605
|
+
toObject() {
|
|
2606
|
+
return value;
|
|
2607
|
+
},
|
|
2608
|
+
};
|
|
2609
|
+
},
|
|
2610
|
+
} as any,
|
|
2611
|
+
};
|
|
2612
|
+
|
|
2613
|
+
export const QueryAllContractStateDesc: UnaryMethodDefinitionish = {
|
|
2614
|
+
methodName: "AllContractState",
|
|
2615
|
+
service: QueryDesc,
|
|
2616
|
+
requestStream: false,
|
|
2617
|
+
responseStream: false,
|
|
2618
|
+
requestType: {
|
|
2619
|
+
serializeBinary() {
|
|
2620
|
+
return QueryAllContractStateRequest.encode(this).finish();
|
|
2621
|
+
},
|
|
2622
|
+
} as any,
|
|
2623
|
+
responseType: {
|
|
2624
|
+
deserializeBinary(data: Uint8Array) {
|
|
2625
|
+
const value = QueryAllContractStateResponse.decode(data);
|
|
2626
|
+
return {
|
|
2627
|
+
...value,
|
|
2628
|
+
toObject() {
|
|
2629
|
+
return value;
|
|
2630
|
+
},
|
|
2631
|
+
};
|
|
2632
|
+
},
|
|
2633
|
+
} as any,
|
|
2634
|
+
};
|
|
2635
|
+
|
|
2636
|
+
export const QueryRawContractStateDesc: UnaryMethodDefinitionish = {
|
|
2637
|
+
methodName: "RawContractState",
|
|
2638
|
+
service: QueryDesc,
|
|
2639
|
+
requestStream: false,
|
|
2640
|
+
responseStream: false,
|
|
2641
|
+
requestType: {
|
|
2642
|
+
serializeBinary() {
|
|
2643
|
+
return QueryRawContractStateRequest.encode(this).finish();
|
|
2644
|
+
},
|
|
2645
|
+
} as any,
|
|
2646
|
+
responseType: {
|
|
2647
|
+
deserializeBinary(data: Uint8Array) {
|
|
2648
|
+
const value = QueryRawContractStateResponse.decode(data);
|
|
2649
|
+
return {
|
|
2650
|
+
...value,
|
|
2651
|
+
toObject() {
|
|
2652
|
+
return value;
|
|
2653
|
+
},
|
|
2654
|
+
};
|
|
2655
|
+
},
|
|
2656
|
+
} as any,
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2659
|
+
export const QuerySmartContractStateDesc: UnaryMethodDefinitionish = {
|
|
2660
|
+
methodName: "SmartContractState",
|
|
2661
|
+
service: QueryDesc,
|
|
2662
|
+
requestStream: false,
|
|
2663
|
+
responseStream: false,
|
|
2664
|
+
requestType: {
|
|
2665
|
+
serializeBinary() {
|
|
2666
|
+
return QuerySmartContractStateRequest.encode(this).finish();
|
|
2667
|
+
},
|
|
2668
|
+
} as any,
|
|
2669
|
+
responseType: {
|
|
2670
|
+
deserializeBinary(data: Uint8Array) {
|
|
2671
|
+
const value = QuerySmartContractStateResponse.decode(data);
|
|
2672
|
+
return {
|
|
2673
|
+
...value,
|
|
2674
|
+
toObject() {
|
|
2675
|
+
return value;
|
|
2676
|
+
},
|
|
2677
|
+
};
|
|
2678
|
+
},
|
|
2679
|
+
} as any,
|
|
2680
|
+
};
|
|
2681
|
+
|
|
2682
|
+
export const QueryCodeDesc: UnaryMethodDefinitionish = {
|
|
2683
|
+
methodName: "Code",
|
|
2684
|
+
service: QueryDesc,
|
|
2685
|
+
requestStream: false,
|
|
2686
|
+
responseStream: false,
|
|
2687
|
+
requestType: {
|
|
2688
|
+
serializeBinary() {
|
|
2689
|
+
return QueryCodeRequest.encode(this).finish();
|
|
2690
|
+
},
|
|
2691
|
+
} as any,
|
|
2692
|
+
responseType: {
|
|
2693
|
+
deserializeBinary(data: Uint8Array) {
|
|
2694
|
+
const value = QueryCodeResponse.decode(data);
|
|
2695
|
+
return {
|
|
2696
|
+
...value,
|
|
2697
|
+
toObject() {
|
|
2698
|
+
return value;
|
|
2699
|
+
},
|
|
2700
|
+
};
|
|
2701
|
+
},
|
|
2702
|
+
} as any,
|
|
2703
|
+
};
|
|
2704
|
+
|
|
2705
|
+
export const QueryCodesDesc: UnaryMethodDefinitionish = {
|
|
2706
|
+
methodName: "Codes",
|
|
2707
|
+
service: QueryDesc,
|
|
2708
|
+
requestStream: false,
|
|
2709
|
+
responseStream: false,
|
|
2710
|
+
requestType: {
|
|
2711
|
+
serializeBinary() {
|
|
2712
|
+
return QueryCodesRequest.encode(this).finish();
|
|
2713
|
+
},
|
|
2714
|
+
} as any,
|
|
2715
|
+
responseType: {
|
|
2716
|
+
deserializeBinary(data: Uint8Array) {
|
|
2717
|
+
const value = QueryCodesResponse.decode(data);
|
|
2718
|
+
return {
|
|
2719
|
+
...value,
|
|
2720
|
+
toObject() {
|
|
2721
|
+
return value;
|
|
2722
|
+
},
|
|
2723
|
+
};
|
|
2724
|
+
},
|
|
2725
|
+
} as any,
|
|
2726
|
+
};
|
|
2727
|
+
|
|
2728
|
+
export const QueryCodeInfoDesc: UnaryMethodDefinitionish = {
|
|
2729
|
+
methodName: "CodeInfo",
|
|
2730
|
+
service: QueryDesc,
|
|
2731
|
+
requestStream: false,
|
|
2732
|
+
responseStream: false,
|
|
2733
|
+
requestType: {
|
|
2734
|
+
serializeBinary() {
|
|
2735
|
+
return QueryCodeInfoRequest.encode(this).finish();
|
|
2736
|
+
},
|
|
2737
|
+
} as any,
|
|
2738
|
+
responseType: {
|
|
2739
|
+
deserializeBinary(data: Uint8Array) {
|
|
2740
|
+
const value = QueryCodeInfoResponse.decode(data);
|
|
2741
|
+
return {
|
|
2742
|
+
...value,
|
|
2743
|
+
toObject() {
|
|
2744
|
+
return value;
|
|
2745
|
+
},
|
|
2746
|
+
};
|
|
2747
|
+
},
|
|
2748
|
+
} as any,
|
|
2749
|
+
};
|
|
2750
|
+
|
|
2751
|
+
export const QueryPinnedCodesDesc: UnaryMethodDefinitionish = {
|
|
2752
|
+
methodName: "PinnedCodes",
|
|
2753
|
+
service: QueryDesc,
|
|
2754
|
+
requestStream: false,
|
|
2755
|
+
responseStream: false,
|
|
2756
|
+
requestType: {
|
|
2757
|
+
serializeBinary() {
|
|
2758
|
+
return QueryPinnedCodesRequest.encode(this).finish();
|
|
2759
|
+
},
|
|
2760
|
+
} as any,
|
|
2761
|
+
responseType: {
|
|
2762
|
+
deserializeBinary(data: Uint8Array) {
|
|
2763
|
+
const value = QueryPinnedCodesResponse.decode(data);
|
|
2764
|
+
return {
|
|
2765
|
+
...value,
|
|
2766
|
+
toObject() {
|
|
2767
|
+
return value;
|
|
2768
|
+
},
|
|
2769
|
+
};
|
|
2770
|
+
},
|
|
2771
|
+
} as any,
|
|
2772
|
+
};
|
|
2773
|
+
|
|
2774
|
+
export const QueryParamsDesc: UnaryMethodDefinitionish = {
|
|
2775
|
+
methodName: "Params",
|
|
2776
|
+
service: QueryDesc,
|
|
2777
|
+
requestStream: false,
|
|
2778
|
+
responseStream: false,
|
|
2779
|
+
requestType: {
|
|
2780
|
+
serializeBinary() {
|
|
2781
|
+
return QueryParamsRequest.encode(this).finish();
|
|
2782
|
+
},
|
|
2783
|
+
} as any,
|
|
2784
|
+
responseType: {
|
|
2785
|
+
deserializeBinary(data: Uint8Array) {
|
|
2786
|
+
const value = QueryParamsResponse.decode(data);
|
|
2787
|
+
return {
|
|
2788
|
+
...value,
|
|
2789
|
+
toObject() {
|
|
2790
|
+
return value;
|
|
2791
|
+
},
|
|
2792
|
+
};
|
|
2793
|
+
},
|
|
2794
|
+
} as any,
|
|
2795
|
+
};
|
|
2796
|
+
|
|
2797
|
+
export const QueryContractsByCreatorDesc: UnaryMethodDefinitionish = {
|
|
2798
|
+
methodName: "ContractsByCreator",
|
|
2799
|
+
service: QueryDesc,
|
|
2800
|
+
requestStream: false,
|
|
2801
|
+
responseStream: false,
|
|
2802
|
+
requestType: {
|
|
2803
|
+
serializeBinary() {
|
|
2804
|
+
return QueryContractsByCreatorRequest.encode(this).finish();
|
|
2805
|
+
},
|
|
2806
|
+
} as any,
|
|
2807
|
+
responseType: {
|
|
2808
|
+
deserializeBinary(data: Uint8Array) {
|
|
2809
|
+
const value = QueryContractsByCreatorResponse.decode(data);
|
|
2810
|
+
return {
|
|
2811
|
+
...value,
|
|
2812
|
+
toObject() {
|
|
2813
|
+
return value;
|
|
2814
|
+
},
|
|
2815
|
+
};
|
|
2816
|
+
},
|
|
2817
|
+
} as any,
|
|
2818
|
+
};
|
|
2819
|
+
|
|
2820
|
+
export const QueryWasmLimitsConfigDesc: UnaryMethodDefinitionish = {
|
|
2821
|
+
methodName: "WasmLimitsConfig",
|
|
2822
|
+
service: QueryDesc,
|
|
2823
|
+
requestStream: false,
|
|
2824
|
+
responseStream: false,
|
|
2825
|
+
requestType: {
|
|
2826
|
+
serializeBinary() {
|
|
2827
|
+
return QueryWasmLimitsConfigRequest.encode(this).finish();
|
|
2828
|
+
},
|
|
2829
|
+
} as any,
|
|
2830
|
+
responseType: {
|
|
2831
|
+
deserializeBinary(data: Uint8Array) {
|
|
2832
|
+
const value = QueryWasmLimitsConfigResponse.decode(data);
|
|
2833
|
+
return {
|
|
2834
|
+
...value,
|
|
2835
|
+
toObject() {
|
|
2836
|
+
return value;
|
|
2837
|
+
},
|
|
2838
|
+
};
|
|
2839
|
+
},
|
|
2840
|
+
} as any,
|
|
2841
|
+
};
|
|
2842
|
+
|
|
2843
|
+
export const QueryBuildAddressDesc: UnaryMethodDefinitionish = {
|
|
2844
|
+
methodName: "BuildAddress",
|
|
2845
|
+
service: QueryDesc,
|
|
2846
|
+
requestStream: false,
|
|
2847
|
+
responseStream: false,
|
|
2848
|
+
requestType: {
|
|
2849
|
+
serializeBinary() {
|
|
2850
|
+
return QueryBuildAddressRequest.encode(this).finish();
|
|
2851
|
+
},
|
|
2852
|
+
} as any,
|
|
2853
|
+
responseType: {
|
|
2854
|
+
deserializeBinary(data: Uint8Array) {
|
|
2855
|
+
const value = QueryBuildAddressResponse.decode(data);
|
|
2856
|
+
return {
|
|
2857
|
+
...value,
|
|
2858
|
+
toObject() {
|
|
2859
|
+
return value;
|
|
2860
|
+
},
|
|
2861
|
+
};
|
|
2862
|
+
},
|
|
2863
|
+
} as any,
|
|
2864
|
+
};
|
|
2865
|
+
|
|
2866
|
+
interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
|
|
2867
|
+
requestStream: any;
|
|
2868
|
+
responseStream: any;
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
|
|
2872
|
+
|
|
2873
|
+
interface Rpc {
|
|
2874
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
2875
|
+
methodDesc: T,
|
|
2876
|
+
request: any,
|
|
2877
|
+
metadata: grpc.Metadata | undefined,
|
|
2878
|
+
): Promise<any>;
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
export class GrpcWebImpl {
|
|
2882
|
+
private host: string;
|
|
2883
|
+
private options: {
|
|
2884
|
+
transport?: grpc.TransportFactory;
|
|
2885
|
+
|
|
2886
|
+
debug?: boolean;
|
|
2887
|
+
metadata?: grpc.Metadata;
|
|
2888
|
+
upStreamRetryCodes?: number[];
|
|
2889
|
+
};
|
|
2890
|
+
|
|
2891
|
+
constructor(
|
|
2892
|
+
host: string,
|
|
2893
|
+
options: {
|
|
2894
|
+
transport?: grpc.TransportFactory;
|
|
2895
|
+
|
|
2896
|
+
debug?: boolean;
|
|
2897
|
+
metadata?: grpc.Metadata;
|
|
2898
|
+
upStreamRetryCodes?: number[];
|
|
2899
|
+
},
|
|
2900
|
+
) {
|
|
2901
|
+
this.host = host;
|
|
2902
|
+
this.options = options;
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
2906
|
+
methodDesc: T,
|
|
2907
|
+
_request: any,
|
|
2908
|
+
metadata: grpc.Metadata | undefined,
|
|
2909
|
+
): Promise<any> {
|
|
2910
|
+
const request = { ..._request, ...methodDesc.requestType };
|
|
2911
|
+
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
2912
|
+
? new BrowserHeaders({ ...this.options?.metadata.headersMap, ...metadata?.headersMap })
|
|
2913
|
+
: metadata ?? this.options.metadata;
|
|
2914
|
+
return new Promise((resolve, reject) => {
|
|
2915
|
+
grpc.unary(methodDesc, {
|
|
2916
|
+
request,
|
|
2917
|
+
host: this.host,
|
|
2918
|
+
metadata: maybeCombinedMetadata ?? {},
|
|
2919
|
+
...(this.options.transport !== undefined ? { transport: this.options.transport } : {}),
|
|
2920
|
+
debug: this.options.debug ?? false,
|
|
2921
|
+
onEnd: function (response) {
|
|
2922
|
+
if (response.status === grpc.Code.OK) {
|
|
2923
|
+
resolve(response.message!.toObject());
|
|
2924
|
+
} else {
|
|
2925
|
+
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
2926
|
+
reject(err);
|
|
2927
|
+
}
|
|
2928
|
+
},
|
|
2929
|
+
});
|
|
2930
|
+
});
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
2935
|
+
if ((globalThis as any).Buffer) {
|
|
2936
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
2937
|
+
} else {
|
|
2938
|
+
const bin = globalThis.atob(b64);
|
|
2939
|
+
const arr = new Uint8Array(bin.length);
|
|
2940
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
2941
|
+
arr[i] = bin.charCodeAt(i);
|
|
2942
|
+
}
|
|
2943
|
+
return arr;
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
2948
|
+
if ((globalThis as any).Buffer) {
|
|
2949
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
2950
|
+
} else {
|
|
2951
|
+
const bin: string[] = [];
|
|
2952
|
+
arr.forEach((byte) => {
|
|
2953
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
2954
|
+
});
|
|
2955
|
+
return globalThis.btoa(bin.join(""));
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2960
|
+
|
|
2961
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
2962
|
+
: T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
2963
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2964
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
2965
|
+
: Partial<T>;
|
|
2966
|
+
|
|
2967
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
2968
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
2969
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
2970
|
+
|
|
2971
|
+
if (_m0.util.Long !== Long) {
|
|
2972
|
+
_m0.util.Long = Long as any;
|
|
2973
|
+
_m0.configure();
|
|
2974
|
+
}
|
|
2975
|
+
|
|
2976
|
+
function isSet(value: any): boolean {
|
|
2977
|
+
return value !== null && value !== undefined;
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
export class GrpcWebError extends globalThis.Error {
|
|
2981
|
+
constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) {
|
|
2982
|
+
super(message);
|
|
2983
|
+
}
|
|
2984
|
+
}
|