@ark-us/wasmxjs 0.0.1

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.
Files changed (219) hide show
  1. package/LICENSE +3 -0
  2. package/README.md +280 -0
  3. package/main/codegen/cosmos/base/abci/v1beta1/abci.js +887 -0
  4. package/main/codegen/cosmos/base/kv/v1beta1/kv.js +139 -0
  5. package/main/codegen/cosmos/base/query/v1beta1/pagination.js +157 -0
  6. package/main/codegen/cosmos/base/reflection/v1beta1/reflection.js +231 -0
  7. package/main/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1479 -0
  8. package/main/codegen/cosmos/base/snapshots/v1beta1/snapshot.js +478 -0
  9. package/main/codegen/cosmos/base/store/v1beta1/commit_info.js +207 -0
  10. package/main/codegen/cosmos/base/store/v1beta1/listening.js +89 -0
  11. package/main/codegen/cosmos/base/tendermint/v1beta1/query.js +951 -0
  12. package/main/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.js +117 -0
  13. package/main/codegen/cosmos/base/v1beta1/coin.js +223 -0
  14. package/main/codegen/cosmos/bundle.js +63 -0
  15. package/main/codegen/cosmos/rpc.query.js +55 -0
  16. package/main/codegen/extern.js +66 -0
  17. package/main/codegen/gogoproto/bundle.js +16 -0
  18. package/main/codegen/gogoproto/gogo.js +5 -0
  19. package/main/codegen/google/api/annotations.js +5 -0
  20. package/main/codegen/google/api/http.js +306 -0
  21. package/main/codegen/google/api/httpbody.js +102 -0
  22. package/main/codegen/google/bundle.js +26 -0
  23. package/main/codegen/google/protobuf/any.js +69 -0
  24. package/main/codegen/google/protobuf/descriptor.js +3429 -0
  25. package/main/codegen/google/protobuf/duration.js +69 -0
  26. package/main/codegen/google/protobuf/timestamp.js +69 -0
  27. package/main/codegen/helpers.js +170 -0
  28. package/main/codegen/index.js +93 -0
  29. package/main/codegen/tendermint/abci/types.js +3616 -0
  30. package/main/codegen/tendermint/bundle.js +37 -0
  31. package/main/codegen/tendermint/crypto/keys.js +69 -0
  32. package/main/codegen/tendermint/crypto/proof.js +372 -0
  33. package/main/codegen/tendermint/libs/bits/types.js +100 -0
  34. package/main/codegen/tendermint/p2p/types.js +322 -0
  35. package/main/codegen/tendermint/types/block.js +90 -0
  36. package/main/codegen/tendermint/types/evidence.js +335 -0
  37. package/main/codegen/tendermint/types/params.js +397 -0
  38. package/main/codegen/tendermint/types/types.js +1223 -0
  39. package/main/codegen/tendermint/types/validator.js +237 -0
  40. package/main/codegen/tendermint/version/types.js +126 -0
  41. package/main/codegen/wasmx/bundle.js +30 -0
  42. package/main/codegen/wasmx/client.js +65 -0
  43. package/main/codegen/wasmx/index.js +126 -0
  44. package/main/codegen/wasmx/rpc.query.js +65 -0
  45. package/main/codegen/wasmx/rpc.tx.js +44 -0
  46. package/main/codegen/wasmx/wasmx/contract.js +324 -0
  47. package/main/codegen/wasmx/wasmx/genesis.js +481 -0
  48. package/main/codegen/wasmx/wasmx/params.js +45 -0
  49. package/main/codegen/wasmx/wasmx/query.js +1187 -0
  50. package/main/codegen/wasmx/wasmx/query.rpc.Query.js +154 -0
  51. package/main/codegen/wasmx/wasmx/tx.amino.js +251 -0
  52. package/main/codegen/wasmx/wasmx/tx.js +937 -0
  53. package/main/codegen/wasmx/wasmx/tx.registry.js +213 -0
  54. package/main/codegen/wasmx/wasmx/tx.rpc.msg.js +85 -0
  55. package/main/index.js +16 -0
  56. package/module/codegen/cosmos/base/abci/v1beta1/abci.js +755 -0
  57. package/module/codegen/cosmos/base/kv/v1beta1/kv.js +110 -0
  58. package/module/codegen/cosmos/base/query/v1beta1/pagination.js +154 -0
  59. package/module/codegen/cosmos/base/reflection/v1beta1/reflection.js +183 -0
  60. package/module/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1297 -0
  61. package/module/codegen/cosmos/base/snapshots/v1beta1/snapshot.js +439 -0
  62. package/module/codegen/cosmos/base/store/v1beta1/commit_info.js +179 -0
  63. package/module/codegen/cosmos/base/store/v1beta1/listening.js +86 -0
  64. package/module/codegen/cosmos/base/tendermint/v1beta1/query.js +866 -0
  65. package/module/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.js +74 -0
  66. package/module/codegen/cosmos/base/v1beta1/coin.js +213 -0
  67. package/module/codegen/cosmos/bundle.js +52 -0
  68. package/module/codegen/cosmos/rpc.query.js +17 -0
  69. package/module/codegen/extern.js +30 -0
  70. package/module/codegen/gogoproto/bundle.js +5 -0
  71. package/module/codegen/gogoproto/gogo.js +1 -0
  72. package/module/codegen/google/api/annotations.js +1 -0
  73. package/module/codegen/google/api/http.js +264 -0
  74. package/module/codegen/google/api/httpbody.js +115 -0
  75. package/module/codegen/google/bundle.js +15 -0
  76. package/module/codegen/google/protobuf/any.js +140 -0
  77. package/module/codegen/google/protobuf/descriptor.js +2801 -0
  78. package/module/codegen/google/protobuf/duration.js +119 -0
  79. package/module/codegen/google/protobuf/timestamp.js +143 -0
  80. package/module/codegen/helpers.js +140 -0
  81. package/module/codegen/index.js +14 -0
  82. package/module/codegen/tendermint/abci/types.js +3305 -0
  83. package/module/codegen/tendermint/bundle.js +26 -0
  84. package/module/codegen/tendermint/crypto/keys.js +60 -0
  85. package/module/codegen/tendermint/crypto/proof.js +320 -0
  86. package/module/codegen/tendermint/libs/bits/types.js +71 -0
  87. package/module/codegen/tendermint/p2p/types.js +305 -0
  88. package/module/codegen/tendermint/types/block.js +79 -0
  89. package/module/codegen/tendermint/types/evidence.js +285 -0
  90. package/module/codegen/tendermint/types/params.js +363 -0
  91. package/module/codegen/tendermint/types/types.js +1149 -0
  92. package/module/codegen/tendermint/types/validator.js +204 -0
  93. package/module/codegen/tendermint/version/types.js +119 -0
  94. package/module/codegen/wasmx/bundle.js +19 -0
  95. package/module/codegen/wasmx/client.js +36 -0
  96. package/module/codegen/wasmx/index.js +11 -0
  97. package/module/codegen/wasmx/rpc.query.js +20 -0
  98. package/module/codegen/wasmx/rpc.tx.js +7 -0
  99. package/module/codegen/wasmx/wasmx/contract.js +291 -0
  100. package/module/codegen/wasmx/wasmx/genesis.js +386 -0
  101. package/module/codegen/wasmx/wasmx/params.js +36 -0
  102. package/module/codegen/wasmx/wasmx/query.js +1052 -0
  103. package/module/codegen/wasmx/wasmx/query.rpc.Query.js +101 -0
  104. package/module/codegen/wasmx/wasmx/tx.amino.js +236 -0
  105. package/module/codegen/wasmx/wasmx/tx.js +815 -0
  106. package/module/codegen/wasmx/wasmx/tx.registry.js +199 -0
  107. package/module/codegen/wasmx/wasmx/tx.rpc.msg.js +47 -0
  108. package/module/index.js +1 -0
  109. package/package.json +88 -0
  110. package/src/codegen/cosmos/base/abci/v1beta1/abci.ts +1254 -0
  111. package/src/codegen/cosmos/base/kv/v1beta1/kv.ts +156 -0
  112. package/src/codegen/cosmos/base/query/v1beta1/pagination.ts +314 -0
  113. package/src/codegen/cosmos/base/reflection/v1beta1/reflection.ts +280 -0
  114. package/src/codegen/cosmos/base/reflection/v2alpha1/reflection.ts +2079 -0
  115. package/src/codegen/cosmos/base/snapshots/v1beta1/snapshot.ts +641 -0
  116. package/src/codegen/cosmos/base/store/v1beta1/commit_info.ts +269 -0
  117. package/src/codegen/cosmos/base/store/v1beta1/listening.ts +129 -0
  118. package/src/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.ts +107 -0
  119. package/src/codegen/cosmos/base/tendermint/v1beta1/query.ts +1284 -0
  120. package/src/codegen/cosmos/base/v1beta1/coin.ts +318 -0
  121. package/src/codegen/cosmos/bundle.ts +52 -0
  122. package/src/codegen/cosmos/rpc.query.ts +19 -0
  123. package/src/codegen/extern.ts +33 -0
  124. package/src/codegen/gogoproto/bundle.ts +3 -0
  125. package/src/codegen/gogoproto/gogo.ts +1 -0
  126. package/src/codegen/google/api/annotations.ts +1 -0
  127. package/src/codegen/google/api/http.ts +945 -0
  128. package/src/codegen/google/api/httpbody.ts +200 -0
  129. package/src/codegen/google/bundle.ts +18 -0
  130. package/src/codegen/google/protobuf/any.ts +305 -0
  131. package/src/codegen/google/protobuf/descriptor.ts +5113 -0
  132. package/src/codegen/google/protobuf/duration.ts +229 -0
  133. package/src/codegen/google/protobuf/timestamp.ts +273 -0
  134. package/src/codegen/helpers.ts +240 -0
  135. package/src/codegen/index.ts +14 -0
  136. package/src/codegen/tendermint/abci/types.ts +4754 -0
  137. package/src/codegen/tendermint/bundle.ts +32 -0
  138. package/src/codegen/tendermint/crypto/keys.ts +83 -0
  139. package/src/codegen/tendermint/crypto/proof.ts +465 -0
  140. package/src/codegen/tendermint/libs/bits/types.ts +97 -0
  141. package/src/codegen/tendermint/p2p/types.ts +422 -0
  142. package/src/codegen/tendermint/types/block.ts +109 -0
  143. package/src/codegen/tendermint/types/evidence.ts +415 -0
  144. package/src/codegen/tendermint/types/params.ts +615 -0
  145. package/src/codegen/tendermint/types/types.ts +1663 -0
  146. package/src/codegen/tendermint/types/validator.ts +282 -0
  147. package/src/codegen/tendermint/version/types.ts +180 -0
  148. package/src/codegen/wasmx/bundle.ts +26 -0
  149. package/src/codegen/wasmx/client.ts +45 -0
  150. package/src/codegen/wasmx/index.ts +11 -0
  151. package/src/codegen/wasmx/rpc.query.ts +22 -0
  152. package/src/codegen/wasmx/rpc.tx.ts +10 -0
  153. package/src/codegen/wasmx/wasmx/contract.ts +470 -0
  154. package/src/codegen/wasmx/wasmx/genesis.ts +552 -0
  155. package/src/codegen/wasmx/wasmx/params.ts +50 -0
  156. package/src/codegen/wasmx/wasmx/query.rpc.Query.ts +149 -0
  157. package/src/codegen/wasmx/wasmx/query.ts +1668 -0
  158. package/src/codegen/wasmx/wasmx/tx.amino.ts +314 -0
  159. package/src/codegen/wasmx/wasmx/tx.registry.ts +230 -0
  160. package/src/codegen/wasmx/wasmx/tx.rpc.msg.ts +80 -0
  161. package/src/codegen/wasmx/wasmx/tx.ts +1331 -0
  162. package/src/index.ts +1 -0
  163. package/types/codegen/cosmos/base/abci/v1beta1/abci.d.ts +338 -0
  164. package/types/codegen/cosmos/base/kv/v1beta1/kv.d.ts +33 -0
  165. package/types/codegen/cosmos/base/query/v1beta1/pagination.d.ts +140 -0
  166. package/types/codegen/cosmos/base/reflection/v1beta1/reflection.d.ts +75 -0
  167. package/types/codegen/cosmos/base/reflection/v2alpha1/reflection.d.ts +565 -0
  168. package/types/codegen/cosmos/base/snapshots/v1beta1/snapshot.d.ts +135 -0
  169. package/types/codegen/cosmos/base/store/v1beta1/commit_info.d.ts +71 -0
  170. package/types/codegen/cosmos/base/store/v1beta1/listening.d.ts +38 -0
  171. package/types/codegen/cosmos/base/tendermint/v1beta1/query.d.ts +282 -0
  172. package/types/codegen/cosmos/base/tendermint/v1beta1/query.lcd.d.ts +14 -0
  173. package/types/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.d.ts +36 -0
  174. package/types/codegen/cosmos/base/v1beta1/coin.d.ts +85 -0
  175. package/types/codegen/cosmos/bundle.d.ts +594 -0
  176. package/types/codegen/cosmos/lcd.d.ts +11 -0
  177. package/types/codegen/cosmos/rpc.query.d.ts +19 -0
  178. package/types/codegen/extern.d.ts +9 -0
  179. package/types/codegen/gogoproto/bundle.d.ts +1 -0
  180. package/types/codegen/gogoproto/gogo.d.ts +1 -0
  181. package/types/codegen/google/api/annotations.d.ts +1 -0
  182. package/types/codegen/google/api/http.d.ts +622 -0
  183. package/types/codegen/google/api/httpbody.d.ts +113 -0
  184. package/types/codegen/google/bundle.d.ts +274 -0
  185. package/types/codegen/google/protobuf/any.d.ts +238 -0
  186. package/types/codegen/google/protobuf/descriptor.d.ts +1835 -0
  187. package/types/codegen/google/protobuf/duration.d.ts +163 -0
  188. package/types/codegen/google/protobuf/timestamp.d.ts +207 -0
  189. package/types/codegen/helpers.d.ts +82 -0
  190. package/types/codegen/index.d.ts +13 -0
  191. package/types/codegen/tendermint/abci/types.d.ts +993 -0
  192. package/types/codegen/tendermint/bundle.d.ts +639 -0
  193. package/types/codegen/tendermint/crypto/keys.d.ts +18 -0
  194. package/types/codegen/tendermint/crypto/proof.d.ts +101 -0
  195. package/types/codegen/tendermint/libs/bits/types.d.ts +17 -0
  196. package/types/codegen/tendermint/p2p/types.d.ts +78 -0
  197. package/types/codegen/tendermint/types/block.d.ts +22 -0
  198. package/types/codegen/tendermint/types/evidence.d.ts +91 -0
  199. package/types/codegen/tendermint/types/params.d.ts +193 -0
  200. package/types/codegen/tendermint/types/types.d.ts +363 -0
  201. package/types/codegen/tendermint/types/validator.d.ts +54 -0
  202. package/types/codegen/tendermint/version/types.d.ts +52 -0
  203. package/types/codegen/wasmx/bundle.d.ts +614 -0
  204. package/types/codegen/wasmx/client.d.ts +151 -0
  205. package/types/codegen/wasmx/index.d.ts +11 -0
  206. package/types/codegen/wasmx/lcd.d.ts +14 -0
  207. package/types/codegen/wasmx/rpc.query.d.ts +32 -0
  208. package/types/codegen/wasmx/rpc.tx.d.ts +8 -0
  209. package/types/codegen/wasmx/wasmx/contract.d.ts +122 -0
  210. package/types/codegen/wasmx/wasmx/genesis.d.ts +107 -0
  211. package/types/codegen/wasmx/wasmx/params.d.ts +14 -0
  212. package/types/codegen/wasmx/wasmx/query.d.ts +451 -0
  213. package/types/codegen/wasmx/wasmx/query.lcd.d.ts +17 -0
  214. package/types/codegen/wasmx/wasmx/query.rpc.Query.d.ts +48 -0
  215. package/types/codegen/wasmx/wasmx/tx.amino.d.ts +110 -0
  216. package/types/codegen/wasmx/wasmx/tx.d.ts +332 -0
  217. package/types/codegen/wasmx/wasmx/tx.registry.d.ts +136 -0
  218. package/types/codegen/wasmx/wasmx/tx.rpc.msg.d.ts +33 -0
  219. package/types/index.d.ts +1 -0
@@ -0,0 +1,1668 @@
1
+ import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination";
2
+ import { Coin, CoinSDKType } from "../../cosmos/base/v1beta1/coin";
3
+ import { ContractInfo, ContractInfoSDKType, ContractStorage, ContractStorageSDKType } from "./contract";
4
+ import { Params, ParamsSDKType } from "./params";
5
+ import * as _m0 from "protobufjs/minimal";
6
+ import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers";
7
+ /**
8
+ * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC
9
+ * method
10
+ */
11
+
12
+ export interface QueryContractInfoRequest {
13
+ /** address is the address of the contract to query */
14
+ address: string;
15
+ }
16
+ /**
17
+ * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC
18
+ * method
19
+ */
20
+
21
+ export interface QueryContractInfoRequestSDKType {
22
+ /** address is the address of the contract to query */
23
+ address: string;
24
+ }
25
+ /**
26
+ * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC
27
+ * method
28
+ */
29
+
30
+ export interface QueryContractInfoResponse {
31
+ /** address is the address of the contract */
32
+ address: string;
33
+ contractInfo?: ContractInfo;
34
+ }
35
+ /**
36
+ * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC
37
+ * method
38
+ */
39
+
40
+ export interface QueryContractInfoResponseSDKType {
41
+ /** address is the address of the contract */
42
+ address: string;
43
+ contract_info?: ContractInfoSDKType;
44
+ }
45
+ /**
46
+ * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode
47
+ * RPC method
48
+ */
49
+
50
+ export interface QueryContractsByCodeRequest {
51
+ /**
52
+ * grpc-gateway_out does not support Go style CodID
53
+ * pagination defines an optional pagination for the request.
54
+ */
55
+ codeId: Long;
56
+ pagination?: PageRequest;
57
+ }
58
+ /**
59
+ * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode
60
+ * RPC method
61
+ */
62
+
63
+ export interface QueryContractsByCodeRequestSDKType {
64
+ /**
65
+ * grpc-gateway_out does not support Go style CodID
66
+ * pagination defines an optional pagination for the request.
67
+ */
68
+ code_id: Long;
69
+ pagination?: PageRequestSDKType;
70
+ }
71
+ /**
72
+ * QueryContractsByCodeResponse is the response type for the
73
+ * Query/ContractsByCode RPC method
74
+ */
75
+
76
+ export interface QueryContractsByCodeResponse {
77
+ /** contracts are a set of contract addresses */
78
+ contracts: string[];
79
+ /** pagination defines the pagination in the response. */
80
+
81
+ pagination?: PageResponse;
82
+ }
83
+ /**
84
+ * QueryContractsByCodeResponse is the response type for the
85
+ * Query/ContractsByCode RPC method
86
+ */
87
+
88
+ export interface QueryContractsByCodeResponseSDKType {
89
+ /** contracts are a set of contract addresses */
90
+ contracts: string[];
91
+ /** pagination defines the pagination in the response. */
92
+
93
+ pagination?: PageResponseSDKType;
94
+ }
95
+ /**
96
+ * QueryAllContractStateRequest is the request type for the
97
+ * Query/AllContractState RPC method
98
+ */
99
+
100
+ export interface QueryAllContractStateRequest {
101
+ /** address is the address of the contract */
102
+ address: string;
103
+ /** pagination defines an optional pagination for the request. */
104
+
105
+ pagination?: PageRequest;
106
+ }
107
+ /**
108
+ * QueryAllContractStateRequest is the request type for the
109
+ * Query/AllContractState RPC method
110
+ */
111
+
112
+ export interface QueryAllContractStateRequestSDKType {
113
+ /** address is the address of the contract */
114
+ address: string;
115
+ /** pagination defines an optional pagination for the request. */
116
+
117
+ pagination?: PageRequestSDKType;
118
+ }
119
+ /**
120
+ * QueryAllContractStateResponse is the response type for the
121
+ * Query/AllContractState RPC method
122
+ */
123
+
124
+ export interface QueryAllContractStateResponse {
125
+ items: ContractStorage[];
126
+ /** pagination defines the pagination in the response. */
127
+
128
+ pagination?: PageResponse;
129
+ }
130
+ /**
131
+ * QueryAllContractStateResponse is the response type for the
132
+ * Query/AllContractState RPC method
133
+ */
134
+
135
+ export interface QueryAllContractStateResponseSDKType {
136
+ items: ContractStorageSDKType[];
137
+ /** pagination defines the pagination in the response. */
138
+
139
+ pagination?: PageResponseSDKType;
140
+ }
141
+ /**
142
+ * QueryRawContractStateRequest is the request type for the
143
+ * Query/RawContractState RPC method
144
+ */
145
+
146
+ export interface QueryRawContractStateRequest {
147
+ /** address is the address of the contract */
148
+ address: string;
149
+ queryData: Uint8Array;
150
+ }
151
+ /**
152
+ * QueryRawContractStateRequest is the request type for the
153
+ * Query/RawContractState RPC method
154
+ */
155
+
156
+ export interface QueryRawContractStateRequestSDKType {
157
+ /** address is the address of the contract */
158
+ address: string;
159
+ query_data: Uint8Array;
160
+ }
161
+ /**
162
+ * QueryRawContractStateResponse is the response type for the
163
+ * Query/RawContractState RPC method
164
+ */
165
+
166
+ export interface QueryRawContractStateResponse {
167
+ /** Data contains the raw store data */
168
+ data: Uint8Array;
169
+ }
170
+ /**
171
+ * QueryRawContractStateResponse is the response type for the
172
+ * Query/RawContractState RPC method
173
+ */
174
+
175
+ export interface QueryRawContractStateResponseSDKType {
176
+ /** Data contains the raw store data */
177
+ data: Uint8Array;
178
+ }
179
+ /**
180
+ * QuerySmartContractCallRequest is the request type for the
181
+ * Query/SmartContractCall RPC method
182
+ */
183
+
184
+ export interface QuerySmartContractCallRequest {
185
+ /** Sender is the that actor that signed the messages */
186
+ sender: string;
187
+ /** Address is the address of the smart contract */
188
+
189
+ address: string;
190
+ queryData: Uint8Array;
191
+ /** Funds coins that are transferred to the contract on execution */
192
+
193
+ funds: Coin[];
194
+ /**
195
+ * Array of either hex-encoded contract addresses or contract labels
196
+ * on which the execution of this message depends on
197
+ */
198
+
199
+ dependencies: string[];
200
+ }
201
+ /**
202
+ * QuerySmartContractCallRequest is the request type for the
203
+ * Query/SmartContractCall RPC method
204
+ */
205
+
206
+ export interface QuerySmartContractCallRequestSDKType {
207
+ /** Sender is the that actor that signed the messages */
208
+ sender: string;
209
+ /** Address is the address of the smart contract */
210
+
211
+ address: string;
212
+ query_data: Uint8Array;
213
+ /** Funds coins that are transferred to the contract on execution */
214
+
215
+ funds: CoinSDKType[];
216
+ /**
217
+ * Array of either hex-encoded contract addresses or contract labels
218
+ * on which the execution of this message depends on
219
+ */
220
+
221
+ dependencies: string[];
222
+ }
223
+ /**
224
+ * QuerySmartContractCallResponse is the response type for the
225
+ * Query/SmartContractCall RPC method
226
+ */
227
+
228
+ export interface QuerySmartContractCallResponse {
229
+ /** Data contains the json data returned from the smart contract */
230
+ data: Uint8Array;
231
+ }
232
+ /**
233
+ * QuerySmartContractCallResponse is the response type for the
234
+ * Query/SmartContractCall RPC method
235
+ */
236
+
237
+ export interface QuerySmartContractCallResponseSDKType {
238
+ /** Data contains the json data returned from the smart contract */
239
+ data: Uint8Array;
240
+ }
241
+ /** QueryCodeRequest is the request type for the Query/Code RPC method */
242
+
243
+ export interface QueryCodeRequest {
244
+ /** grpc-gateway_out does not support Go style CodID */
245
+ codeId: Long;
246
+ }
247
+ /** QueryCodeRequest is the request type for the Query/Code RPC method */
248
+
249
+ export interface QueryCodeRequestSDKType {
250
+ /** grpc-gateway_out does not support Go style CodID */
251
+ code_id: Long;
252
+ }
253
+ /** CodeInfoResponse contains code meta data from CodeInfo */
254
+
255
+ export interface CodeInfoResponse {
256
+ codeId: Long;
257
+ creator: string;
258
+ dataHash: Uint8Array;
259
+ }
260
+ /** CodeInfoResponse contains code meta data from CodeInfo */
261
+
262
+ export interface CodeInfoResponseSDKType {
263
+ code_id: Long;
264
+ creator: string;
265
+ data_hash: Uint8Array;
266
+ }
267
+ /** QueryCodeResponse is the response type for the Query/Code RPC method */
268
+
269
+ export interface QueryCodeResponse {
270
+ codeInfo?: CodeInfoResponse;
271
+ data: Uint8Array;
272
+ }
273
+ /** QueryCodeResponse is the response type for the Query/Code RPC method */
274
+
275
+ export interface QueryCodeResponseSDKType {
276
+ code_info?: CodeInfoResponseSDKType;
277
+ data: Uint8Array;
278
+ }
279
+ /** QueryCodesRequest is the request type for the Query/Codes RPC method */
280
+
281
+ export interface QueryCodesRequest {
282
+ /** pagination defines an optional pagination for the request. */
283
+ pagination?: PageRequest;
284
+ }
285
+ /** QueryCodesRequest is the request type for the Query/Codes RPC method */
286
+
287
+ export interface QueryCodesRequestSDKType {
288
+ /** pagination defines an optional pagination for the request. */
289
+ pagination?: PageRequestSDKType;
290
+ }
291
+ /** QueryCodesResponse is the response type for the Query/Codes RPC method */
292
+
293
+ export interface QueryCodesResponse {
294
+ codeInfos: CodeInfoResponse[];
295
+ /** pagination defines the pagination in the response. */
296
+
297
+ pagination?: PageResponse;
298
+ }
299
+ /** QueryCodesResponse is the response type for the Query/Codes RPC method */
300
+
301
+ export interface QueryCodesResponseSDKType {
302
+ code_infos: CodeInfoResponseSDKType[];
303
+ /** pagination defines the pagination in the response. */
304
+
305
+ pagination?: PageResponseSDKType;
306
+ }
307
+ /** QueryParamsRequest is the request type for the Query/Params RPC method. */
308
+
309
+ export interface QueryParamsRequest {}
310
+ /** QueryParamsRequest is the request type for the Query/Params RPC method. */
311
+
312
+ export interface QueryParamsRequestSDKType {}
313
+ /** QueryParamsResponse is the response type for the Query/Params RPC method. */
314
+
315
+ export interface QueryParamsResponse {
316
+ /** params defines the parameters of the module. */
317
+ params?: Params;
318
+ }
319
+ /** QueryParamsResponse is the response type for the Query/Params RPC method. */
320
+
321
+ export interface QueryParamsResponseSDKType {
322
+ /** params defines the parameters of the module. */
323
+ params?: ParamsSDKType;
324
+ }
325
+ /**
326
+ * QueryContractsByCreatorRequest is the request type for the
327
+ * Query/ContractsByCreator RPC method.
328
+ */
329
+
330
+ export interface QueryContractsByCreatorRequest {
331
+ /** CreatorAddress is the address of contract creator */
332
+ creatorAddress: string;
333
+ /** Pagination defines an optional pagination for the request. */
334
+
335
+ pagination?: PageRequest;
336
+ }
337
+ /**
338
+ * QueryContractsByCreatorRequest is the request type for the
339
+ * Query/ContractsByCreator RPC method.
340
+ */
341
+
342
+ export interface QueryContractsByCreatorRequestSDKType {
343
+ /** CreatorAddress is the address of contract creator */
344
+ creator_address: string;
345
+ /** Pagination defines an optional pagination for the request. */
346
+
347
+ pagination?: PageRequestSDKType;
348
+ }
349
+ /**
350
+ * QueryContractsByCreatorResponse is the response type for the
351
+ * Query/ContractsByCreator RPC method.
352
+ */
353
+
354
+ export interface QueryContractsByCreatorResponse {
355
+ /** ContractAddresses result set */
356
+ contractAddresses: string[];
357
+ /** Pagination defines the pagination in the response. */
358
+
359
+ pagination?: PageResponse;
360
+ }
361
+ /**
362
+ * QueryContractsByCreatorResponse is the response type for the
363
+ * Query/ContractsByCreator RPC method.
364
+ */
365
+
366
+ export interface QueryContractsByCreatorResponseSDKType {
367
+ /** ContractAddresses result set */
368
+ contract_addresses: string[];
369
+ /** Pagination defines the pagination in the response. */
370
+
371
+ pagination?: PageResponseSDKType;
372
+ }
373
+
374
+ function createBaseQueryContractInfoRequest(): QueryContractInfoRequest {
375
+ return {
376
+ address: ""
377
+ };
378
+ }
379
+
380
+ export const QueryContractInfoRequest = {
381
+ encode(message: QueryContractInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
382
+ if (message.address !== "") {
383
+ writer.uint32(10).string(message.address);
384
+ }
385
+
386
+ return writer;
387
+ },
388
+
389
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractInfoRequest {
390
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
391
+ let end = length === undefined ? reader.len : reader.pos + length;
392
+ const message = createBaseQueryContractInfoRequest();
393
+
394
+ while (reader.pos < end) {
395
+ const tag = reader.uint32();
396
+
397
+ switch (tag >>> 3) {
398
+ case 1:
399
+ message.address = reader.string();
400
+ break;
401
+
402
+ default:
403
+ reader.skipType(tag & 7);
404
+ break;
405
+ }
406
+ }
407
+
408
+ return message;
409
+ },
410
+
411
+ fromJSON(object: any): QueryContractInfoRequest {
412
+ return {
413
+ address: isSet(object.address) ? String(object.address) : ""
414
+ };
415
+ },
416
+
417
+ toJSON(message: QueryContractInfoRequest): unknown {
418
+ const obj: any = {};
419
+ message.address !== undefined && (obj.address = message.address);
420
+ return obj;
421
+ },
422
+
423
+ fromPartial(object: Partial<QueryContractInfoRequest>): QueryContractInfoRequest {
424
+ const message = createBaseQueryContractInfoRequest();
425
+ message.address = object.address ?? "";
426
+ return message;
427
+ }
428
+
429
+ };
430
+
431
+ function createBaseQueryContractInfoResponse(): QueryContractInfoResponse {
432
+ return {
433
+ address: "",
434
+ contractInfo: undefined
435
+ };
436
+ }
437
+
438
+ export const QueryContractInfoResponse = {
439
+ encode(message: QueryContractInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
440
+ if (message.address !== "") {
441
+ writer.uint32(10).string(message.address);
442
+ }
443
+
444
+ if (message.contractInfo !== undefined) {
445
+ ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim();
446
+ }
447
+
448
+ return writer;
449
+ },
450
+
451
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractInfoResponse {
452
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
453
+ let end = length === undefined ? reader.len : reader.pos + length;
454
+ const message = createBaseQueryContractInfoResponse();
455
+
456
+ while (reader.pos < end) {
457
+ const tag = reader.uint32();
458
+
459
+ switch (tag >>> 3) {
460
+ case 1:
461
+ message.address = reader.string();
462
+ break;
463
+
464
+ case 2:
465
+ message.contractInfo = ContractInfo.decode(reader, reader.uint32());
466
+ break;
467
+
468
+ default:
469
+ reader.skipType(tag & 7);
470
+ break;
471
+ }
472
+ }
473
+
474
+ return message;
475
+ },
476
+
477
+ fromJSON(object: any): QueryContractInfoResponse {
478
+ return {
479
+ address: isSet(object.address) ? String(object.address) : "",
480
+ contractInfo: isSet(object.contractInfo) ? ContractInfo.fromJSON(object.contractInfo) : undefined
481
+ };
482
+ },
483
+
484
+ toJSON(message: QueryContractInfoResponse): unknown {
485
+ const obj: any = {};
486
+ message.address !== undefined && (obj.address = message.address);
487
+ message.contractInfo !== undefined && (obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined);
488
+ return obj;
489
+ },
490
+
491
+ fromPartial(object: Partial<QueryContractInfoResponse>): QueryContractInfoResponse {
492
+ const message = createBaseQueryContractInfoResponse();
493
+ message.address = object.address ?? "";
494
+ message.contractInfo = object.contractInfo !== undefined && object.contractInfo !== null ? ContractInfo.fromPartial(object.contractInfo) : undefined;
495
+ return message;
496
+ }
497
+
498
+ };
499
+
500
+ function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest {
501
+ return {
502
+ codeId: Long.UZERO,
503
+ pagination: undefined
504
+ };
505
+ }
506
+
507
+ export const QueryContractsByCodeRequest = {
508
+ encode(message: QueryContractsByCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
509
+ if (!message.codeId.isZero()) {
510
+ writer.uint32(8).uint64(message.codeId);
511
+ }
512
+
513
+ if (message.pagination !== undefined) {
514
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
515
+ }
516
+
517
+ return writer;
518
+ },
519
+
520
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCodeRequest {
521
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
522
+ let end = length === undefined ? reader.len : reader.pos + length;
523
+ const message = createBaseQueryContractsByCodeRequest();
524
+
525
+ while (reader.pos < end) {
526
+ const tag = reader.uint32();
527
+
528
+ switch (tag >>> 3) {
529
+ case 1:
530
+ message.codeId = (reader.uint64() as Long);
531
+ break;
532
+
533
+ case 2:
534
+ message.pagination = PageRequest.decode(reader, reader.uint32());
535
+ break;
536
+
537
+ default:
538
+ reader.skipType(tag & 7);
539
+ break;
540
+ }
541
+ }
542
+
543
+ return message;
544
+ },
545
+
546
+ fromJSON(object: any): QueryContractsByCodeRequest {
547
+ return {
548
+ codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
549
+ pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined
550
+ };
551
+ },
552
+
553
+ toJSON(message: QueryContractsByCodeRequest): unknown {
554
+ const obj: any = {};
555
+ message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
556
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
557
+ return obj;
558
+ },
559
+
560
+ fromPartial(object: Partial<QueryContractsByCodeRequest>): QueryContractsByCodeRequest {
561
+ const message = createBaseQueryContractsByCodeRequest();
562
+ message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO;
563
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
564
+ return message;
565
+ }
566
+
567
+ };
568
+
569
+ function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse {
570
+ return {
571
+ contracts: [],
572
+ pagination: undefined
573
+ };
574
+ }
575
+
576
+ export const QueryContractsByCodeResponse = {
577
+ encode(message: QueryContractsByCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
578
+ for (const v of message.contracts) {
579
+ writer.uint32(10).string(v!);
580
+ }
581
+
582
+ if (message.pagination !== undefined) {
583
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
584
+ }
585
+
586
+ return writer;
587
+ },
588
+
589
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCodeResponse {
590
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
591
+ let end = length === undefined ? reader.len : reader.pos + length;
592
+ const message = createBaseQueryContractsByCodeResponse();
593
+
594
+ while (reader.pos < end) {
595
+ const tag = reader.uint32();
596
+
597
+ switch (tag >>> 3) {
598
+ case 1:
599
+ message.contracts.push(reader.string());
600
+ break;
601
+
602
+ case 2:
603
+ message.pagination = PageResponse.decode(reader, reader.uint32());
604
+ break;
605
+
606
+ default:
607
+ reader.skipType(tag & 7);
608
+ break;
609
+ }
610
+ }
611
+
612
+ return message;
613
+ },
614
+
615
+ fromJSON(object: any): QueryContractsByCodeResponse {
616
+ return {
617
+ contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => String(e)) : [],
618
+ pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined
619
+ };
620
+ },
621
+
622
+ toJSON(message: QueryContractsByCodeResponse): unknown {
623
+ const obj: any = {};
624
+
625
+ if (message.contracts) {
626
+ obj.contracts = message.contracts.map(e => e);
627
+ } else {
628
+ obj.contracts = [];
629
+ }
630
+
631
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
632
+ return obj;
633
+ },
634
+
635
+ fromPartial(object: Partial<QueryContractsByCodeResponse>): QueryContractsByCodeResponse {
636
+ const message = createBaseQueryContractsByCodeResponse();
637
+ message.contracts = object.contracts?.map(e => e) || [];
638
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
639
+ return message;
640
+ }
641
+
642
+ };
643
+
644
+ function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest {
645
+ return {
646
+ address: "",
647
+ pagination: undefined
648
+ };
649
+ }
650
+
651
+ export const QueryAllContractStateRequest = {
652
+ encode(message: QueryAllContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
653
+ if (message.address !== "") {
654
+ writer.uint32(10).string(message.address);
655
+ }
656
+
657
+ if (message.pagination !== undefined) {
658
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
659
+ }
660
+
661
+ return writer;
662
+ },
663
+
664
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllContractStateRequest {
665
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
666
+ let end = length === undefined ? reader.len : reader.pos + length;
667
+ const message = createBaseQueryAllContractStateRequest();
668
+
669
+ while (reader.pos < end) {
670
+ const tag = reader.uint32();
671
+
672
+ switch (tag >>> 3) {
673
+ case 1:
674
+ message.address = reader.string();
675
+ break;
676
+
677
+ case 2:
678
+ message.pagination = PageRequest.decode(reader, reader.uint32());
679
+ break;
680
+
681
+ default:
682
+ reader.skipType(tag & 7);
683
+ break;
684
+ }
685
+ }
686
+
687
+ return message;
688
+ },
689
+
690
+ fromJSON(object: any): QueryAllContractStateRequest {
691
+ return {
692
+ address: isSet(object.address) ? String(object.address) : "",
693
+ pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined
694
+ };
695
+ },
696
+
697
+ toJSON(message: QueryAllContractStateRequest): unknown {
698
+ const obj: any = {};
699
+ message.address !== undefined && (obj.address = message.address);
700
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
701
+ return obj;
702
+ },
703
+
704
+ fromPartial(object: Partial<QueryAllContractStateRequest>): QueryAllContractStateRequest {
705
+ const message = createBaseQueryAllContractStateRequest();
706
+ message.address = object.address ?? "";
707
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
708
+ return message;
709
+ }
710
+
711
+ };
712
+
713
+ function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse {
714
+ return {
715
+ items: [],
716
+ pagination: undefined
717
+ };
718
+ }
719
+
720
+ export const QueryAllContractStateResponse = {
721
+ encode(message: QueryAllContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
722
+ for (const v of message.items) {
723
+ ContractStorage.encode(v!, writer.uint32(10).fork()).ldelim();
724
+ }
725
+
726
+ if (message.pagination !== undefined) {
727
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
728
+ }
729
+
730
+ return writer;
731
+ },
732
+
733
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllContractStateResponse {
734
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
735
+ let end = length === undefined ? reader.len : reader.pos + length;
736
+ const message = createBaseQueryAllContractStateResponse();
737
+
738
+ while (reader.pos < end) {
739
+ const tag = reader.uint32();
740
+
741
+ switch (tag >>> 3) {
742
+ case 1:
743
+ message.items.push(ContractStorage.decode(reader, reader.uint32()));
744
+ break;
745
+
746
+ case 2:
747
+ message.pagination = PageResponse.decode(reader, reader.uint32());
748
+ break;
749
+
750
+ default:
751
+ reader.skipType(tag & 7);
752
+ break;
753
+ }
754
+ }
755
+
756
+ return message;
757
+ },
758
+
759
+ fromJSON(object: any): QueryAllContractStateResponse {
760
+ return {
761
+ items: Array.isArray(object?.items) ? object.items.map((e: any) => ContractStorage.fromJSON(e)) : [],
762
+ pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined
763
+ };
764
+ },
765
+
766
+ toJSON(message: QueryAllContractStateResponse): unknown {
767
+ const obj: any = {};
768
+
769
+ if (message.items) {
770
+ obj.items = message.items.map(e => e ? ContractStorage.toJSON(e) : undefined);
771
+ } else {
772
+ obj.items = [];
773
+ }
774
+
775
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
776
+ return obj;
777
+ },
778
+
779
+ fromPartial(object: Partial<QueryAllContractStateResponse>): QueryAllContractStateResponse {
780
+ const message = createBaseQueryAllContractStateResponse();
781
+ message.items = object.items?.map(e => ContractStorage.fromPartial(e)) || [];
782
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
783
+ return message;
784
+ }
785
+
786
+ };
787
+
788
+ function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest {
789
+ return {
790
+ address: "",
791
+ queryData: new Uint8Array()
792
+ };
793
+ }
794
+
795
+ export const QueryRawContractStateRequest = {
796
+ encode(message: QueryRawContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
797
+ if (message.address !== "") {
798
+ writer.uint32(10).string(message.address);
799
+ }
800
+
801
+ if (message.queryData.length !== 0) {
802
+ writer.uint32(18).bytes(message.queryData);
803
+ }
804
+
805
+ return writer;
806
+ },
807
+
808
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryRawContractStateRequest {
809
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
810
+ let end = length === undefined ? reader.len : reader.pos + length;
811
+ const message = createBaseQueryRawContractStateRequest();
812
+
813
+ while (reader.pos < end) {
814
+ const tag = reader.uint32();
815
+
816
+ switch (tag >>> 3) {
817
+ case 1:
818
+ message.address = reader.string();
819
+ break;
820
+
821
+ case 2:
822
+ message.queryData = reader.bytes();
823
+ break;
824
+
825
+ default:
826
+ reader.skipType(tag & 7);
827
+ break;
828
+ }
829
+ }
830
+
831
+ return message;
832
+ },
833
+
834
+ fromJSON(object: any): QueryRawContractStateRequest {
835
+ return {
836
+ address: isSet(object.address) ? String(object.address) : "",
837
+ queryData: isSet(object.queryData) ? bytesFromBase64(object.queryData) : new Uint8Array()
838
+ };
839
+ },
840
+
841
+ toJSON(message: QueryRawContractStateRequest): unknown {
842
+ const obj: any = {};
843
+ message.address !== undefined && (obj.address = message.address);
844
+ message.queryData !== undefined && (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array()));
845
+ return obj;
846
+ },
847
+
848
+ fromPartial(object: Partial<QueryRawContractStateRequest>): QueryRawContractStateRequest {
849
+ const message = createBaseQueryRawContractStateRequest();
850
+ message.address = object.address ?? "";
851
+ message.queryData = object.queryData ?? new Uint8Array();
852
+ return message;
853
+ }
854
+
855
+ };
856
+
857
+ function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse {
858
+ return {
859
+ data: new Uint8Array()
860
+ };
861
+ }
862
+
863
+ export const QueryRawContractStateResponse = {
864
+ encode(message: QueryRawContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
865
+ if (message.data.length !== 0) {
866
+ writer.uint32(10).bytes(message.data);
867
+ }
868
+
869
+ return writer;
870
+ },
871
+
872
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryRawContractStateResponse {
873
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
874
+ let end = length === undefined ? reader.len : reader.pos + length;
875
+ const message = createBaseQueryRawContractStateResponse();
876
+
877
+ while (reader.pos < end) {
878
+ const tag = reader.uint32();
879
+
880
+ switch (tag >>> 3) {
881
+ case 1:
882
+ message.data = reader.bytes();
883
+ break;
884
+
885
+ default:
886
+ reader.skipType(tag & 7);
887
+ break;
888
+ }
889
+ }
890
+
891
+ return message;
892
+ },
893
+
894
+ fromJSON(object: any): QueryRawContractStateResponse {
895
+ return {
896
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array()
897
+ };
898
+ },
899
+
900
+ toJSON(message: QueryRawContractStateResponse): unknown {
901
+ const obj: any = {};
902
+ message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
903
+ return obj;
904
+ },
905
+
906
+ fromPartial(object: Partial<QueryRawContractStateResponse>): QueryRawContractStateResponse {
907
+ const message = createBaseQueryRawContractStateResponse();
908
+ message.data = object.data ?? new Uint8Array();
909
+ return message;
910
+ }
911
+
912
+ };
913
+
914
+ function createBaseQuerySmartContractCallRequest(): QuerySmartContractCallRequest {
915
+ return {
916
+ sender: "",
917
+ address: "",
918
+ queryData: new Uint8Array(),
919
+ funds: [],
920
+ dependencies: []
921
+ };
922
+ }
923
+
924
+ export const QuerySmartContractCallRequest = {
925
+ encode(message: QuerySmartContractCallRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
926
+ if (message.sender !== "") {
927
+ writer.uint32(10).string(message.sender);
928
+ }
929
+
930
+ if (message.address !== "") {
931
+ writer.uint32(18).string(message.address);
932
+ }
933
+
934
+ if (message.queryData.length !== 0) {
935
+ writer.uint32(26).bytes(message.queryData);
936
+ }
937
+
938
+ for (const v of message.funds) {
939
+ Coin.encode(v!, writer.uint32(34).fork()).ldelim();
940
+ }
941
+
942
+ for (const v of message.dependencies) {
943
+ writer.uint32(42).string(v!);
944
+ }
945
+
946
+ return writer;
947
+ },
948
+
949
+ decode(input: _m0.Reader | Uint8Array, length?: number): QuerySmartContractCallRequest {
950
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
951
+ let end = length === undefined ? reader.len : reader.pos + length;
952
+ const message = createBaseQuerySmartContractCallRequest();
953
+
954
+ while (reader.pos < end) {
955
+ const tag = reader.uint32();
956
+
957
+ switch (tag >>> 3) {
958
+ case 1:
959
+ message.sender = reader.string();
960
+ break;
961
+
962
+ case 2:
963
+ message.address = reader.string();
964
+ break;
965
+
966
+ case 3:
967
+ message.queryData = reader.bytes();
968
+ break;
969
+
970
+ case 4:
971
+ message.funds.push(Coin.decode(reader, reader.uint32()));
972
+ break;
973
+
974
+ case 5:
975
+ message.dependencies.push(reader.string());
976
+ break;
977
+
978
+ default:
979
+ reader.skipType(tag & 7);
980
+ break;
981
+ }
982
+ }
983
+
984
+ return message;
985
+ },
986
+
987
+ fromJSON(object: any): QuerySmartContractCallRequest {
988
+ return {
989
+ sender: isSet(object.sender) ? String(object.sender) : "",
990
+ address: isSet(object.address) ? String(object.address) : "",
991
+ queryData: isSet(object.queryData) ? bytesFromBase64(object.queryData) : new Uint8Array(),
992
+ funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [],
993
+ dependencies: Array.isArray(object?.dependencies) ? object.dependencies.map((e: any) => String(e)) : []
994
+ };
995
+ },
996
+
997
+ toJSON(message: QuerySmartContractCallRequest): unknown {
998
+ const obj: any = {};
999
+ message.sender !== undefined && (obj.sender = message.sender);
1000
+ message.address !== undefined && (obj.address = message.address);
1001
+ message.queryData !== undefined && (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array()));
1002
+
1003
+ if (message.funds) {
1004
+ obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined);
1005
+ } else {
1006
+ obj.funds = [];
1007
+ }
1008
+
1009
+ if (message.dependencies) {
1010
+ obj.dependencies = message.dependencies.map(e => e);
1011
+ } else {
1012
+ obj.dependencies = [];
1013
+ }
1014
+
1015
+ return obj;
1016
+ },
1017
+
1018
+ fromPartial(object: Partial<QuerySmartContractCallRequest>): QuerySmartContractCallRequest {
1019
+ const message = createBaseQuerySmartContractCallRequest();
1020
+ message.sender = object.sender ?? "";
1021
+ message.address = object.address ?? "";
1022
+ message.queryData = object.queryData ?? new Uint8Array();
1023
+ message.funds = object.funds?.map(e => Coin.fromPartial(e)) || [];
1024
+ message.dependencies = object.dependencies?.map(e => e) || [];
1025
+ return message;
1026
+ }
1027
+
1028
+ };
1029
+
1030
+ function createBaseQuerySmartContractCallResponse(): QuerySmartContractCallResponse {
1031
+ return {
1032
+ data: new Uint8Array()
1033
+ };
1034
+ }
1035
+
1036
+ export const QuerySmartContractCallResponse = {
1037
+ encode(message: QuerySmartContractCallResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1038
+ if (message.data.length !== 0) {
1039
+ writer.uint32(10).bytes(message.data);
1040
+ }
1041
+
1042
+ return writer;
1043
+ },
1044
+
1045
+ decode(input: _m0.Reader | Uint8Array, length?: number): QuerySmartContractCallResponse {
1046
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1047
+ let end = length === undefined ? reader.len : reader.pos + length;
1048
+ const message = createBaseQuerySmartContractCallResponse();
1049
+
1050
+ while (reader.pos < end) {
1051
+ const tag = reader.uint32();
1052
+
1053
+ switch (tag >>> 3) {
1054
+ case 1:
1055
+ message.data = reader.bytes();
1056
+ break;
1057
+
1058
+ default:
1059
+ reader.skipType(tag & 7);
1060
+ break;
1061
+ }
1062
+ }
1063
+
1064
+ return message;
1065
+ },
1066
+
1067
+ fromJSON(object: any): QuerySmartContractCallResponse {
1068
+ return {
1069
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array()
1070
+ };
1071
+ },
1072
+
1073
+ toJSON(message: QuerySmartContractCallResponse): unknown {
1074
+ const obj: any = {};
1075
+ message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
1076
+ return obj;
1077
+ },
1078
+
1079
+ fromPartial(object: Partial<QuerySmartContractCallResponse>): QuerySmartContractCallResponse {
1080
+ const message = createBaseQuerySmartContractCallResponse();
1081
+ message.data = object.data ?? new Uint8Array();
1082
+ return message;
1083
+ }
1084
+
1085
+ };
1086
+
1087
+ function createBaseQueryCodeRequest(): QueryCodeRequest {
1088
+ return {
1089
+ codeId: Long.UZERO
1090
+ };
1091
+ }
1092
+
1093
+ export const QueryCodeRequest = {
1094
+ encode(message: QueryCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1095
+ if (!message.codeId.isZero()) {
1096
+ writer.uint32(8).uint64(message.codeId);
1097
+ }
1098
+
1099
+ return writer;
1100
+ },
1101
+
1102
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeRequest {
1103
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1104
+ let end = length === undefined ? reader.len : reader.pos + length;
1105
+ const message = createBaseQueryCodeRequest();
1106
+
1107
+ while (reader.pos < end) {
1108
+ const tag = reader.uint32();
1109
+
1110
+ switch (tag >>> 3) {
1111
+ case 1:
1112
+ message.codeId = (reader.uint64() as Long);
1113
+ break;
1114
+
1115
+ default:
1116
+ reader.skipType(tag & 7);
1117
+ break;
1118
+ }
1119
+ }
1120
+
1121
+ return message;
1122
+ },
1123
+
1124
+ fromJSON(object: any): QueryCodeRequest {
1125
+ return {
1126
+ codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO
1127
+ };
1128
+ },
1129
+
1130
+ toJSON(message: QueryCodeRequest): unknown {
1131
+ const obj: any = {};
1132
+ message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
1133
+ return obj;
1134
+ },
1135
+
1136
+ fromPartial(object: Partial<QueryCodeRequest>): QueryCodeRequest {
1137
+ const message = createBaseQueryCodeRequest();
1138
+ message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO;
1139
+ return message;
1140
+ }
1141
+
1142
+ };
1143
+
1144
+ function createBaseCodeInfoResponse(): CodeInfoResponse {
1145
+ return {
1146
+ codeId: Long.UZERO,
1147
+ creator: "",
1148
+ dataHash: new Uint8Array()
1149
+ };
1150
+ }
1151
+
1152
+ export const CodeInfoResponse = {
1153
+ encode(message: CodeInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1154
+ if (!message.codeId.isZero()) {
1155
+ writer.uint32(8).uint64(message.codeId);
1156
+ }
1157
+
1158
+ if (message.creator !== "") {
1159
+ writer.uint32(18).string(message.creator);
1160
+ }
1161
+
1162
+ if (message.dataHash.length !== 0) {
1163
+ writer.uint32(26).bytes(message.dataHash);
1164
+ }
1165
+
1166
+ return writer;
1167
+ },
1168
+
1169
+ decode(input: _m0.Reader | Uint8Array, length?: number): CodeInfoResponse {
1170
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1171
+ let end = length === undefined ? reader.len : reader.pos + length;
1172
+ const message = createBaseCodeInfoResponse();
1173
+
1174
+ while (reader.pos < end) {
1175
+ const tag = reader.uint32();
1176
+
1177
+ switch (tag >>> 3) {
1178
+ case 1:
1179
+ message.codeId = (reader.uint64() as Long);
1180
+ break;
1181
+
1182
+ case 2:
1183
+ message.creator = reader.string();
1184
+ break;
1185
+
1186
+ case 3:
1187
+ message.dataHash = reader.bytes();
1188
+ break;
1189
+
1190
+ default:
1191
+ reader.skipType(tag & 7);
1192
+ break;
1193
+ }
1194
+ }
1195
+
1196
+ return message;
1197
+ },
1198
+
1199
+ fromJSON(object: any): CodeInfoResponse {
1200
+ return {
1201
+ codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
1202
+ creator: isSet(object.creator) ? String(object.creator) : "",
1203
+ dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array()
1204
+ };
1205
+ },
1206
+
1207
+ toJSON(message: CodeInfoResponse): unknown {
1208
+ const obj: any = {};
1209
+ message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
1210
+ message.creator !== undefined && (obj.creator = message.creator);
1211
+ message.dataHash !== undefined && (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array()));
1212
+ return obj;
1213
+ },
1214
+
1215
+ fromPartial(object: Partial<CodeInfoResponse>): CodeInfoResponse {
1216
+ const message = createBaseCodeInfoResponse();
1217
+ message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO;
1218
+ message.creator = object.creator ?? "";
1219
+ message.dataHash = object.dataHash ?? new Uint8Array();
1220
+ return message;
1221
+ }
1222
+
1223
+ };
1224
+
1225
+ function createBaseQueryCodeResponse(): QueryCodeResponse {
1226
+ return {
1227
+ codeInfo: undefined,
1228
+ data: new Uint8Array()
1229
+ };
1230
+ }
1231
+
1232
+ export const QueryCodeResponse = {
1233
+ encode(message: QueryCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1234
+ if (message.codeInfo !== undefined) {
1235
+ CodeInfoResponse.encode(message.codeInfo, writer.uint32(10).fork()).ldelim();
1236
+ }
1237
+
1238
+ if (message.data.length !== 0) {
1239
+ writer.uint32(18).bytes(message.data);
1240
+ }
1241
+
1242
+ return writer;
1243
+ },
1244
+
1245
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeResponse {
1246
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1247
+ let end = length === undefined ? reader.len : reader.pos + length;
1248
+ const message = createBaseQueryCodeResponse();
1249
+
1250
+ while (reader.pos < end) {
1251
+ const tag = reader.uint32();
1252
+
1253
+ switch (tag >>> 3) {
1254
+ case 1:
1255
+ message.codeInfo = CodeInfoResponse.decode(reader, reader.uint32());
1256
+ break;
1257
+
1258
+ case 2:
1259
+ message.data = reader.bytes();
1260
+ break;
1261
+
1262
+ default:
1263
+ reader.skipType(tag & 7);
1264
+ break;
1265
+ }
1266
+ }
1267
+
1268
+ return message;
1269
+ },
1270
+
1271
+ fromJSON(object: any): QueryCodeResponse {
1272
+ return {
1273
+ codeInfo: isSet(object.codeInfo) ? CodeInfoResponse.fromJSON(object.codeInfo) : undefined,
1274
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array()
1275
+ };
1276
+ },
1277
+
1278
+ toJSON(message: QueryCodeResponse): unknown {
1279
+ const obj: any = {};
1280
+ message.codeInfo !== undefined && (obj.codeInfo = message.codeInfo ? CodeInfoResponse.toJSON(message.codeInfo) : undefined);
1281
+ message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
1282
+ return obj;
1283
+ },
1284
+
1285
+ fromPartial(object: Partial<QueryCodeResponse>): QueryCodeResponse {
1286
+ const message = createBaseQueryCodeResponse();
1287
+ message.codeInfo = object.codeInfo !== undefined && object.codeInfo !== null ? CodeInfoResponse.fromPartial(object.codeInfo) : undefined;
1288
+ message.data = object.data ?? new Uint8Array();
1289
+ return message;
1290
+ }
1291
+
1292
+ };
1293
+
1294
+ function createBaseQueryCodesRequest(): QueryCodesRequest {
1295
+ return {
1296
+ pagination: undefined
1297
+ };
1298
+ }
1299
+
1300
+ export const QueryCodesRequest = {
1301
+ encode(message: QueryCodesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1302
+ if (message.pagination !== undefined) {
1303
+ PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
1304
+ }
1305
+
1306
+ return writer;
1307
+ },
1308
+
1309
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodesRequest {
1310
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1311
+ let end = length === undefined ? reader.len : reader.pos + length;
1312
+ const message = createBaseQueryCodesRequest();
1313
+
1314
+ while (reader.pos < end) {
1315
+ const tag = reader.uint32();
1316
+
1317
+ switch (tag >>> 3) {
1318
+ case 1:
1319
+ message.pagination = PageRequest.decode(reader, reader.uint32());
1320
+ break;
1321
+
1322
+ default:
1323
+ reader.skipType(tag & 7);
1324
+ break;
1325
+ }
1326
+ }
1327
+
1328
+ return message;
1329
+ },
1330
+
1331
+ fromJSON(object: any): QueryCodesRequest {
1332
+ return {
1333
+ pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined
1334
+ };
1335
+ },
1336
+
1337
+ toJSON(message: QueryCodesRequest): unknown {
1338
+ const obj: any = {};
1339
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
1340
+ return obj;
1341
+ },
1342
+
1343
+ fromPartial(object: Partial<QueryCodesRequest>): QueryCodesRequest {
1344
+ const message = createBaseQueryCodesRequest();
1345
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
1346
+ return message;
1347
+ }
1348
+
1349
+ };
1350
+
1351
+ function createBaseQueryCodesResponse(): QueryCodesResponse {
1352
+ return {
1353
+ codeInfos: [],
1354
+ pagination: undefined
1355
+ };
1356
+ }
1357
+
1358
+ export const QueryCodesResponse = {
1359
+ encode(message: QueryCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1360
+ for (const v of message.codeInfos) {
1361
+ CodeInfoResponse.encode(v!, writer.uint32(10).fork()).ldelim();
1362
+ }
1363
+
1364
+ if (message.pagination !== undefined) {
1365
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
1366
+ }
1367
+
1368
+ return writer;
1369
+ },
1370
+
1371
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodesResponse {
1372
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1373
+ let end = length === undefined ? reader.len : reader.pos + length;
1374
+ const message = createBaseQueryCodesResponse();
1375
+
1376
+ while (reader.pos < end) {
1377
+ const tag = reader.uint32();
1378
+
1379
+ switch (tag >>> 3) {
1380
+ case 1:
1381
+ message.codeInfos.push(CodeInfoResponse.decode(reader, reader.uint32()));
1382
+ break;
1383
+
1384
+ case 2:
1385
+ message.pagination = PageResponse.decode(reader, reader.uint32());
1386
+ break;
1387
+
1388
+ default:
1389
+ reader.skipType(tag & 7);
1390
+ break;
1391
+ }
1392
+ }
1393
+
1394
+ return message;
1395
+ },
1396
+
1397
+ fromJSON(object: any): QueryCodesResponse {
1398
+ return {
1399
+ codeInfos: Array.isArray(object?.codeInfos) ? object.codeInfos.map((e: any) => CodeInfoResponse.fromJSON(e)) : [],
1400
+ pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined
1401
+ };
1402
+ },
1403
+
1404
+ toJSON(message: QueryCodesResponse): unknown {
1405
+ const obj: any = {};
1406
+
1407
+ if (message.codeInfos) {
1408
+ obj.codeInfos = message.codeInfos.map(e => e ? CodeInfoResponse.toJSON(e) : undefined);
1409
+ } else {
1410
+ obj.codeInfos = [];
1411
+ }
1412
+
1413
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
1414
+ return obj;
1415
+ },
1416
+
1417
+ fromPartial(object: Partial<QueryCodesResponse>): QueryCodesResponse {
1418
+ const message = createBaseQueryCodesResponse();
1419
+ message.codeInfos = object.codeInfos?.map(e => CodeInfoResponse.fromPartial(e)) || [];
1420
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
1421
+ return message;
1422
+ }
1423
+
1424
+ };
1425
+
1426
+ function createBaseQueryParamsRequest(): QueryParamsRequest {
1427
+ return {};
1428
+ }
1429
+
1430
+ export const QueryParamsRequest = {
1431
+ encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1432
+ return writer;
1433
+ },
1434
+
1435
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest {
1436
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1437
+ let end = length === undefined ? reader.len : reader.pos + length;
1438
+ const message = createBaseQueryParamsRequest();
1439
+
1440
+ while (reader.pos < end) {
1441
+ const tag = reader.uint32();
1442
+
1443
+ switch (tag >>> 3) {
1444
+ default:
1445
+ reader.skipType(tag & 7);
1446
+ break;
1447
+ }
1448
+ }
1449
+
1450
+ return message;
1451
+ },
1452
+
1453
+ fromJSON(_: any): QueryParamsRequest {
1454
+ return {};
1455
+ },
1456
+
1457
+ toJSON(_: QueryParamsRequest): unknown {
1458
+ const obj: any = {};
1459
+ return obj;
1460
+ },
1461
+
1462
+ fromPartial(_: Partial<QueryParamsRequest>): QueryParamsRequest {
1463
+ const message = createBaseQueryParamsRequest();
1464
+ return message;
1465
+ }
1466
+
1467
+ };
1468
+
1469
+ function createBaseQueryParamsResponse(): QueryParamsResponse {
1470
+ return {
1471
+ params: undefined
1472
+ };
1473
+ }
1474
+
1475
+ export const QueryParamsResponse = {
1476
+ encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1477
+ if (message.params !== undefined) {
1478
+ Params.encode(message.params, writer.uint32(10).fork()).ldelim();
1479
+ }
1480
+
1481
+ return writer;
1482
+ },
1483
+
1484
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse {
1485
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1486
+ let end = length === undefined ? reader.len : reader.pos + length;
1487
+ const message = createBaseQueryParamsResponse();
1488
+
1489
+ while (reader.pos < end) {
1490
+ const tag = reader.uint32();
1491
+
1492
+ switch (tag >>> 3) {
1493
+ case 1:
1494
+ message.params = Params.decode(reader, reader.uint32());
1495
+ break;
1496
+
1497
+ default:
1498
+ reader.skipType(tag & 7);
1499
+ break;
1500
+ }
1501
+ }
1502
+
1503
+ return message;
1504
+ },
1505
+
1506
+ fromJSON(object: any): QueryParamsResponse {
1507
+ return {
1508
+ params: isSet(object.params) ? Params.fromJSON(object.params) : undefined
1509
+ };
1510
+ },
1511
+
1512
+ toJSON(message: QueryParamsResponse): unknown {
1513
+ const obj: any = {};
1514
+ message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
1515
+ return obj;
1516
+ },
1517
+
1518
+ fromPartial(object: Partial<QueryParamsResponse>): QueryParamsResponse {
1519
+ const message = createBaseQueryParamsResponse();
1520
+ message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined;
1521
+ return message;
1522
+ }
1523
+
1524
+ };
1525
+
1526
+ function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest {
1527
+ return {
1528
+ creatorAddress: "",
1529
+ pagination: undefined
1530
+ };
1531
+ }
1532
+
1533
+ export const QueryContractsByCreatorRequest = {
1534
+ encode(message: QueryContractsByCreatorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1535
+ if (message.creatorAddress !== "") {
1536
+ writer.uint32(10).string(message.creatorAddress);
1537
+ }
1538
+
1539
+ if (message.pagination !== undefined) {
1540
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
1541
+ }
1542
+
1543
+ return writer;
1544
+ },
1545
+
1546
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCreatorRequest {
1547
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1548
+ let end = length === undefined ? reader.len : reader.pos + length;
1549
+ const message = createBaseQueryContractsByCreatorRequest();
1550
+
1551
+ while (reader.pos < end) {
1552
+ const tag = reader.uint32();
1553
+
1554
+ switch (tag >>> 3) {
1555
+ case 1:
1556
+ message.creatorAddress = reader.string();
1557
+ break;
1558
+
1559
+ case 2:
1560
+ message.pagination = PageRequest.decode(reader, reader.uint32());
1561
+ break;
1562
+
1563
+ default:
1564
+ reader.skipType(tag & 7);
1565
+ break;
1566
+ }
1567
+ }
1568
+
1569
+ return message;
1570
+ },
1571
+
1572
+ fromJSON(object: any): QueryContractsByCreatorRequest {
1573
+ return {
1574
+ creatorAddress: isSet(object.creatorAddress) ? String(object.creatorAddress) : "",
1575
+ pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined
1576
+ };
1577
+ },
1578
+
1579
+ toJSON(message: QueryContractsByCreatorRequest): unknown {
1580
+ const obj: any = {};
1581
+ message.creatorAddress !== undefined && (obj.creatorAddress = message.creatorAddress);
1582
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
1583
+ return obj;
1584
+ },
1585
+
1586
+ fromPartial(object: Partial<QueryContractsByCreatorRequest>): QueryContractsByCreatorRequest {
1587
+ const message = createBaseQueryContractsByCreatorRequest();
1588
+ message.creatorAddress = object.creatorAddress ?? "";
1589
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
1590
+ return message;
1591
+ }
1592
+
1593
+ };
1594
+
1595
+ function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorResponse {
1596
+ return {
1597
+ contractAddresses: [],
1598
+ pagination: undefined
1599
+ };
1600
+ }
1601
+
1602
+ export const QueryContractsByCreatorResponse = {
1603
+ encode(message: QueryContractsByCreatorResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1604
+ for (const v of message.contractAddresses) {
1605
+ writer.uint32(10).string(v!);
1606
+ }
1607
+
1608
+ if (message.pagination !== undefined) {
1609
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
1610
+ }
1611
+
1612
+ return writer;
1613
+ },
1614
+
1615
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCreatorResponse {
1616
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1617
+ let end = length === undefined ? reader.len : reader.pos + length;
1618
+ const message = createBaseQueryContractsByCreatorResponse();
1619
+
1620
+ while (reader.pos < end) {
1621
+ const tag = reader.uint32();
1622
+
1623
+ switch (tag >>> 3) {
1624
+ case 1:
1625
+ message.contractAddresses.push(reader.string());
1626
+ break;
1627
+
1628
+ case 2:
1629
+ message.pagination = PageResponse.decode(reader, reader.uint32());
1630
+ break;
1631
+
1632
+ default:
1633
+ reader.skipType(tag & 7);
1634
+ break;
1635
+ }
1636
+ }
1637
+
1638
+ return message;
1639
+ },
1640
+
1641
+ fromJSON(object: any): QueryContractsByCreatorResponse {
1642
+ return {
1643
+ contractAddresses: Array.isArray(object?.contractAddresses) ? object.contractAddresses.map((e: any) => String(e)) : [],
1644
+ pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined
1645
+ };
1646
+ },
1647
+
1648
+ toJSON(message: QueryContractsByCreatorResponse): unknown {
1649
+ const obj: any = {};
1650
+
1651
+ if (message.contractAddresses) {
1652
+ obj.contractAddresses = message.contractAddresses.map(e => e);
1653
+ } else {
1654
+ obj.contractAddresses = [];
1655
+ }
1656
+
1657
+ message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
1658
+ return obj;
1659
+ },
1660
+
1661
+ fromPartial(object: Partial<QueryContractsByCreatorResponse>): QueryContractsByCreatorResponse {
1662
+ const message = createBaseQueryContractsByCreatorResponse();
1663
+ message.contractAddresses = object.contractAddresses?.map(e => e) || [];
1664
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
1665
+ return message;
1666
+ }
1667
+
1668
+ };