@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,1331 @@
1
+ import { Coin, CoinSDKType } from "../../cosmos/base/v1beta1/coin";
2
+ import * as _m0 from "protobufjs/minimal";
3
+ import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../helpers";
4
+ /** MsgStoreCode submit Wasm code to the system */
5
+
6
+ export interface MsgStoreCode {
7
+ /** Sender is the that actor that signed the messages */
8
+ sender: string;
9
+ /** WASMByteCode can be raw or gzip compressed */
10
+
11
+ wasmByteCode: Uint8Array;
12
+ }
13
+ /** MsgStoreCode submit Wasm code to the system */
14
+
15
+ export interface MsgStoreCodeSDKType {
16
+ /** Sender is the that actor that signed the messages */
17
+ sender: string;
18
+ /** WASMByteCode can be raw or gzip compressed */
19
+
20
+ wasm_byte_code: Uint8Array;
21
+ }
22
+ /** MsgStoreCodeResponse returns store result data. */
23
+
24
+ export interface MsgStoreCodeResponse {
25
+ /** CodeID is the reference to the stored WASM code */
26
+ codeId: Long;
27
+ /** Checksum is the sha256 hash of the stored code */
28
+
29
+ checksum: Uint8Array;
30
+ }
31
+ /** MsgStoreCodeResponse returns store result data. */
32
+
33
+ export interface MsgStoreCodeResponseSDKType {
34
+ /** CodeID is the reference to the stored WASM code */
35
+ code_id: Long;
36
+ /** Checksum is the sha256 hash of the stored code */
37
+
38
+ checksum: Uint8Array;
39
+ }
40
+ /**
41
+ * MsgInstantiateContract create a new smart contract instance for the given
42
+ * code id.
43
+ */
44
+
45
+ export interface MsgInstantiateContract {
46
+ /** Sender is the that actor that signed the messages */
47
+ sender: string;
48
+ /** CodeID is the reference to the stored WASM code */
49
+
50
+ codeId: Long;
51
+ /** Label is optional metadata to be stored with a contract instance. */
52
+
53
+ label: string;
54
+ /** Msg json encoded message to be passed to the contract on instantiation */
55
+
56
+ msg: Uint8Array;
57
+ /** Funds coins that are transferred to the contract on instantiation */
58
+
59
+ funds: Coin[];
60
+ }
61
+ /**
62
+ * MsgInstantiateContract create a new smart contract instance for the given
63
+ * code id.
64
+ */
65
+
66
+ export interface MsgInstantiateContractSDKType {
67
+ /** Sender is the that actor that signed the messages */
68
+ sender: string;
69
+ /** CodeID is the reference to the stored WASM code */
70
+
71
+ code_id: Long;
72
+ /** Label is optional metadata to be stored with a contract instance. */
73
+
74
+ label: string;
75
+ /** Msg json encoded message to be passed to the contract on instantiation */
76
+
77
+ msg: Uint8Array;
78
+ /** Funds coins that are transferred to the contract on instantiation */
79
+
80
+ funds: CoinSDKType[];
81
+ }
82
+ /**
83
+ * MsgInstantiateContract2 create a new smart contract instance for the given
84
+ * code id with a predicable address.
85
+ */
86
+
87
+ export interface MsgInstantiateContract2 {
88
+ /** Sender is the that actor that signed the messages */
89
+ sender: string;
90
+ /** Admin is an optional address that can execute migrations */
91
+
92
+ codeId: Long;
93
+ /** Label is optional metadata to be stored with a contract instance. */
94
+
95
+ label: string;
96
+ /** Msg json encoded message to be passed to the contract on instantiation */
97
+
98
+ msg: Uint8Array;
99
+ /** Funds coins that are transferred to the contract on instantiation */
100
+
101
+ funds: Coin[];
102
+ /** Salt is an arbitrary value provided by the sender. Size can be 1 to 64. */
103
+
104
+ salt: Uint8Array;
105
+ /**
106
+ * FixMsg include the msg value into the hash for the predictable address.
107
+ * Default is false
108
+ */
109
+
110
+ fixMsg: boolean;
111
+ }
112
+ /**
113
+ * MsgInstantiateContract2 create a new smart contract instance for the given
114
+ * code id with a predicable address.
115
+ */
116
+
117
+ export interface MsgInstantiateContract2SDKType {
118
+ /** Sender is the that actor that signed the messages */
119
+ sender: string;
120
+ /** Admin is an optional address that can execute migrations */
121
+
122
+ code_id: Long;
123
+ /** Label is optional metadata to be stored with a contract instance. */
124
+
125
+ label: string;
126
+ /** Msg json encoded message to be passed to the contract on instantiation */
127
+
128
+ msg: Uint8Array;
129
+ /** Funds coins that are transferred to the contract on instantiation */
130
+
131
+ funds: CoinSDKType[];
132
+ /** Salt is an arbitrary value provided by the sender. Size can be 1 to 64. */
133
+
134
+ salt: Uint8Array;
135
+ /**
136
+ * FixMsg include the msg value into the hash for the predictable address.
137
+ * Default is false
138
+ */
139
+
140
+ fix_msg: boolean;
141
+ }
142
+ /** MsgInstantiateContractResponse return instantiation result data */
143
+
144
+ export interface MsgInstantiateContractResponse {
145
+ /** Address is the bech32 address of the new contract instance. */
146
+ address: string;
147
+ /** Data contains bytes to returned from the contract */
148
+
149
+ data: Uint8Array;
150
+ }
151
+ /** MsgInstantiateContractResponse return instantiation result data */
152
+
153
+ export interface MsgInstantiateContractResponseSDKType {
154
+ /** Address is the bech32 address of the new contract instance. */
155
+ address: string;
156
+ /** Data contains bytes to returned from the contract */
157
+
158
+ data: Uint8Array;
159
+ }
160
+ /** MsgInstantiateContract2Response return instantiation result data */
161
+
162
+ export interface MsgInstantiateContract2Response {
163
+ /** Address is the bech32 address of the new contract instance. */
164
+ address: string;
165
+ /** Data contains bytes to returned from the contract */
166
+
167
+ data: Uint8Array;
168
+ }
169
+ /** MsgInstantiateContract2Response return instantiation result data */
170
+
171
+ export interface MsgInstantiateContract2ResponseSDKType {
172
+ /** Address is the bech32 address of the new contract instance. */
173
+ address: string;
174
+ /** Data contains bytes to returned from the contract */
175
+
176
+ data: Uint8Array;
177
+ }
178
+ /** MsgExecuteContract submits the given message data to a smart contract */
179
+
180
+ export interface MsgExecuteContract {
181
+ /** Sender is the that actor that signed the messages */
182
+ sender: string;
183
+ /** Contract is the address of the smart contract */
184
+
185
+ contract: string;
186
+ /** Msg json encoded message to be passed to the contract */
187
+
188
+ msg: Uint8Array;
189
+ /** Funds coins that are transferred to the contract on execution */
190
+
191
+ funds: Coin[];
192
+ /**
193
+ * Array of either hex-encoded contract addresses or contract labels
194
+ * on which the execution of this message depends on
195
+ */
196
+
197
+ dependencies: string[];
198
+ }
199
+ /** MsgExecuteContract submits the given message data to a smart contract */
200
+
201
+ export interface MsgExecuteContractSDKType {
202
+ /** Sender is the that actor that signed the messages */
203
+ sender: string;
204
+ /** Contract is the address of the smart contract */
205
+
206
+ contract: string;
207
+ /** Msg json encoded message to be passed to the contract */
208
+
209
+ msg: Uint8Array;
210
+ /** Funds coins that are transferred to the contract on execution */
211
+
212
+ funds: CoinSDKType[];
213
+ /**
214
+ * Array of either hex-encoded contract addresses or contract labels
215
+ * on which the execution of this message depends on
216
+ */
217
+
218
+ dependencies: string[];
219
+ }
220
+ /** MsgExecuteContractResponse returns execution result data. */
221
+
222
+ export interface MsgExecuteContractResponse {
223
+ /** Data contains bytes to returned from the contract */
224
+ data: Uint8Array;
225
+ }
226
+ /** MsgExecuteContractResponse returns execution result data. */
227
+
228
+ export interface MsgExecuteContractResponseSDKType {
229
+ /** Data contains bytes to returned from the contract */
230
+ data: Uint8Array;
231
+ }
232
+ /**
233
+ * MsgExecuteWithOriginContract forwards a message data from a smart contract
234
+ * to another smart contract
235
+ */
236
+
237
+ export interface MsgExecuteWithOriginContract {
238
+ /** Origin is the actor that originally signed the message */
239
+ origin: string;
240
+ /** Sender is the the smart contract that sent the messages */
241
+
242
+ sender: string;
243
+ /** Contract is the address of the smart contract that receives the message */
244
+
245
+ contract: string;
246
+ /** Msg json encoded message to be passed to the contract */
247
+
248
+ msg: Uint8Array;
249
+ /** Funds coins that are transferred to the contract on execution */
250
+
251
+ funds: Coin[];
252
+ }
253
+ /**
254
+ * MsgExecuteWithOriginContract forwards a message data from a smart contract
255
+ * to another smart contract
256
+ */
257
+
258
+ export interface MsgExecuteWithOriginContractSDKType {
259
+ /** Origin is the actor that originally signed the message */
260
+ origin: string;
261
+ /** Sender is the the smart contract that sent the messages */
262
+
263
+ sender: string;
264
+ /** Contract is the address of the smart contract that receives the message */
265
+
266
+ contract: string;
267
+ /** Msg json encoded message to be passed to the contract */
268
+
269
+ msg: Uint8Array;
270
+ /** Funds coins that are transferred to the contract on execution */
271
+
272
+ funds: CoinSDKType[];
273
+ }
274
+ /** MsgExecuteDelegateContract submits the given message data to a smart contract */
275
+
276
+ export interface MsgExecuteDelegateContract {
277
+ /** Origin is the actor that originally signed the message */
278
+ origin: string;
279
+ /** Sender is the storage contract, equivalent to the address that triggers the message (signer) */
280
+
281
+ sender: string;
282
+ /** Caller is the address that will be used as sender */
283
+
284
+ caller: string;
285
+ /** CodeContract is the address of the smart contract whose binary is used */
286
+
287
+ codeContract: string;
288
+ /** StorageContract is the address of the smart contract whose storage is used */
289
+
290
+ storageContract: string;
291
+ /** Msg json encoded message to be passed to the contract */
292
+
293
+ msg: Uint8Array;
294
+ /** Funds coins that are transferred to the contract on execution */
295
+
296
+ funds: Coin[];
297
+ }
298
+ /** MsgExecuteDelegateContract submits the given message data to a smart contract */
299
+
300
+ export interface MsgExecuteDelegateContractSDKType {
301
+ /** Origin is the actor that originally signed the message */
302
+ origin: string;
303
+ /** Sender is the storage contract, equivalent to the address that triggers the message (signer) */
304
+
305
+ sender: string;
306
+ /** Caller is the address that will be used as sender */
307
+
308
+ caller: string;
309
+ /** CodeContract is the address of the smart contract whose binary is used */
310
+
311
+ code_contract: string;
312
+ /** StorageContract is the address of the smart contract whose storage is used */
313
+
314
+ storage_contract: string;
315
+ /** Msg json encoded message to be passed to the contract */
316
+
317
+ msg: Uint8Array;
318
+ /** Funds coins that are transferred to the contract on execution */
319
+
320
+ funds: CoinSDKType[];
321
+ }
322
+ /** MsgExecuteDelegateContractResponse returns execution result data. */
323
+
324
+ export interface MsgExecuteDelegateContractResponse {
325
+ /** Data contains bytes to returned from the contract */
326
+ data: Uint8Array;
327
+ }
328
+ /** MsgExecuteDelegateContractResponse returns execution result data. */
329
+
330
+ export interface MsgExecuteDelegateContractResponseSDKType {
331
+ /** Data contains bytes to returned from the contract */
332
+ data: Uint8Array;
333
+ }
334
+
335
+ function createBaseMsgStoreCode(): MsgStoreCode {
336
+ return {
337
+ sender: "",
338
+ wasmByteCode: new Uint8Array()
339
+ };
340
+ }
341
+
342
+ export const MsgStoreCode = {
343
+ encode(message: MsgStoreCode, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
344
+ if (message.sender !== "") {
345
+ writer.uint32(10).string(message.sender);
346
+ }
347
+
348
+ if (message.wasmByteCode.length !== 0) {
349
+ writer.uint32(18).bytes(message.wasmByteCode);
350
+ }
351
+
352
+ return writer;
353
+ },
354
+
355
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreCode {
356
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
357
+ let end = length === undefined ? reader.len : reader.pos + length;
358
+ const message = createBaseMsgStoreCode();
359
+
360
+ while (reader.pos < end) {
361
+ const tag = reader.uint32();
362
+
363
+ switch (tag >>> 3) {
364
+ case 1:
365
+ message.sender = reader.string();
366
+ break;
367
+
368
+ case 2:
369
+ message.wasmByteCode = reader.bytes();
370
+ break;
371
+
372
+ default:
373
+ reader.skipType(tag & 7);
374
+ break;
375
+ }
376
+ }
377
+
378
+ return message;
379
+ },
380
+
381
+ fromJSON(object: any): MsgStoreCode {
382
+ return {
383
+ sender: isSet(object.sender) ? String(object.sender) : "",
384
+ wasmByteCode: isSet(object.wasmByteCode) ? bytesFromBase64(object.wasmByteCode) : new Uint8Array()
385
+ };
386
+ },
387
+
388
+ toJSON(message: MsgStoreCode): unknown {
389
+ const obj: any = {};
390
+ message.sender !== undefined && (obj.sender = message.sender);
391
+ message.wasmByteCode !== undefined && (obj.wasmByteCode = base64FromBytes(message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array()));
392
+ return obj;
393
+ },
394
+
395
+ fromPartial(object: Partial<MsgStoreCode>): MsgStoreCode {
396
+ const message = createBaseMsgStoreCode();
397
+ message.sender = object.sender ?? "";
398
+ message.wasmByteCode = object.wasmByteCode ?? new Uint8Array();
399
+ return message;
400
+ }
401
+
402
+ };
403
+
404
+ function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse {
405
+ return {
406
+ codeId: Long.UZERO,
407
+ checksum: new Uint8Array()
408
+ };
409
+ }
410
+
411
+ export const MsgStoreCodeResponse = {
412
+ encode(message: MsgStoreCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
413
+ if (!message.codeId.isZero()) {
414
+ writer.uint32(8).uint64(message.codeId);
415
+ }
416
+
417
+ if (message.checksum.length !== 0) {
418
+ writer.uint32(18).bytes(message.checksum);
419
+ }
420
+
421
+ return writer;
422
+ },
423
+
424
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreCodeResponse {
425
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
426
+ let end = length === undefined ? reader.len : reader.pos + length;
427
+ const message = createBaseMsgStoreCodeResponse();
428
+
429
+ while (reader.pos < end) {
430
+ const tag = reader.uint32();
431
+
432
+ switch (tag >>> 3) {
433
+ case 1:
434
+ message.codeId = (reader.uint64() as Long);
435
+ break;
436
+
437
+ case 2:
438
+ message.checksum = reader.bytes();
439
+ break;
440
+
441
+ default:
442
+ reader.skipType(tag & 7);
443
+ break;
444
+ }
445
+ }
446
+
447
+ return message;
448
+ },
449
+
450
+ fromJSON(object: any): MsgStoreCodeResponse {
451
+ return {
452
+ codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
453
+ checksum: isSet(object.checksum) ? bytesFromBase64(object.checksum) : new Uint8Array()
454
+ };
455
+ },
456
+
457
+ toJSON(message: MsgStoreCodeResponse): unknown {
458
+ const obj: any = {};
459
+ message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
460
+ message.checksum !== undefined && (obj.checksum = base64FromBytes(message.checksum !== undefined ? message.checksum : new Uint8Array()));
461
+ return obj;
462
+ },
463
+
464
+ fromPartial(object: Partial<MsgStoreCodeResponse>): MsgStoreCodeResponse {
465
+ const message = createBaseMsgStoreCodeResponse();
466
+ message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO;
467
+ message.checksum = object.checksum ?? new Uint8Array();
468
+ return message;
469
+ }
470
+
471
+ };
472
+
473
+ function createBaseMsgInstantiateContract(): MsgInstantiateContract {
474
+ return {
475
+ sender: "",
476
+ codeId: Long.UZERO,
477
+ label: "",
478
+ msg: new Uint8Array(),
479
+ funds: []
480
+ };
481
+ }
482
+
483
+ export const MsgInstantiateContract = {
484
+ encode(message: MsgInstantiateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
485
+ if (message.sender !== "") {
486
+ writer.uint32(10).string(message.sender);
487
+ }
488
+
489
+ if (!message.codeId.isZero()) {
490
+ writer.uint32(16).uint64(message.codeId);
491
+ }
492
+
493
+ if (message.label !== "") {
494
+ writer.uint32(26).string(message.label);
495
+ }
496
+
497
+ if (message.msg.length !== 0) {
498
+ writer.uint32(34).bytes(message.msg);
499
+ }
500
+
501
+ for (const v of message.funds) {
502
+ Coin.encode(v!, writer.uint32(50).fork()).ldelim();
503
+ }
504
+
505
+ return writer;
506
+ },
507
+
508
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContract {
509
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
510
+ let end = length === undefined ? reader.len : reader.pos + length;
511
+ const message = createBaseMsgInstantiateContract();
512
+
513
+ while (reader.pos < end) {
514
+ const tag = reader.uint32();
515
+
516
+ switch (tag >>> 3) {
517
+ case 1:
518
+ message.sender = reader.string();
519
+ break;
520
+
521
+ case 2:
522
+ message.codeId = (reader.uint64() as Long);
523
+ break;
524
+
525
+ case 3:
526
+ message.label = reader.string();
527
+ break;
528
+
529
+ case 4:
530
+ message.msg = reader.bytes();
531
+ break;
532
+
533
+ case 6:
534
+ message.funds.push(Coin.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): MsgInstantiateContract {
547
+ return {
548
+ sender: isSet(object.sender) ? String(object.sender) : "",
549
+ codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
550
+ label: isSet(object.label) ? String(object.label) : "",
551
+ msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
552
+ funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : []
553
+ };
554
+ },
555
+
556
+ toJSON(message: MsgInstantiateContract): unknown {
557
+ const obj: any = {};
558
+ message.sender !== undefined && (obj.sender = message.sender);
559
+ message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
560
+ message.label !== undefined && (obj.label = message.label);
561
+ message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
562
+
563
+ if (message.funds) {
564
+ obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined);
565
+ } else {
566
+ obj.funds = [];
567
+ }
568
+
569
+ return obj;
570
+ },
571
+
572
+ fromPartial(object: Partial<MsgInstantiateContract>): MsgInstantiateContract {
573
+ const message = createBaseMsgInstantiateContract();
574
+ message.sender = object.sender ?? "";
575
+ message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO;
576
+ message.label = object.label ?? "";
577
+ message.msg = object.msg ?? new Uint8Array();
578
+ message.funds = object.funds?.map(e => Coin.fromPartial(e)) || [];
579
+ return message;
580
+ }
581
+
582
+ };
583
+
584
+ function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 {
585
+ return {
586
+ sender: "",
587
+ codeId: Long.UZERO,
588
+ label: "",
589
+ msg: new Uint8Array(),
590
+ funds: [],
591
+ salt: new Uint8Array(),
592
+ fixMsg: false
593
+ };
594
+ }
595
+
596
+ export const MsgInstantiateContract2 = {
597
+ encode(message: MsgInstantiateContract2, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
598
+ if (message.sender !== "") {
599
+ writer.uint32(10).string(message.sender);
600
+ }
601
+
602
+ if (!message.codeId.isZero()) {
603
+ writer.uint32(16).uint64(message.codeId);
604
+ }
605
+
606
+ if (message.label !== "") {
607
+ writer.uint32(26).string(message.label);
608
+ }
609
+
610
+ if (message.msg.length !== 0) {
611
+ writer.uint32(34).bytes(message.msg);
612
+ }
613
+
614
+ for (const v of message.funds) {
615
+ Coin.encode(v!, writer.uint32(42).fork()).ldelim();
616
+ }
617
+
618
+ if (message.salt.length !== 0) {
619
+ writer.uint32(50).bytes(message.salt);
620
+ }
621
+
622
+ if (message.fixMsg === true) {
623
+ writer.uint32(56).bool(message.fixMsg);
624
+ }
625
+
626
+ return writer;
627
+ },
628
+
629
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContract2 {
630
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
631
+ let end = length === undefined ? reader.len : reader.pos + length;
632
+ const message = createBaseMsgInstantiateContract2();
633
+
634
+ while (reader.pos < end) {
635
+ const tag = reader.uint32();
636
+
637
+ switch (tag >>> 3) {
638
+ case 1:
639
+ message.sender = reader.string();
640
+ break;
641
+
642
+ case 2:
643
+ message.codeId = (reader.uint64() as Long);
644
+ break;
645
+
646
+ case 3:
647
+ message.label = reader.string();
648
+ break;
649
+
650
+ case 4:
651
+ message.msg = reader.bytes();
652
+ break;
653
+
654
+ case 5:
655
+ message.funds.push(Coin.decode(reader, reader.uint32()));
656
+ break;
657
+
658
+ case 6:
659
+ message.salt = reader.bytes();
660
+ break;
661
+
662
+ case 7:
663
+ message.fixMsg = reader.bool();
664
+ break;
665
+
666
+ default:
667
+ reader.skipType(tag & 7);
668
+ break;
669
+ }
670
+ }
671
+
672
+ return message;
673
+ },
674
+
675
+ fromJSON(object: any): MsgInstantiateContract2 {
676
+ return {
677
+ sender: isSet(object.sender) ? String(object.sender) : "",
678
+ codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
679
+ label: isSet(object.label) ? String(object.label) : "",
680
+ msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
681
+ funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [],
682
+ salt: isSet(object.salt) ? bytesFromBase64(object.salt) : new Uint8Array(),
683
+ fixMsg: isSet(object.fixMsg) ? Boolean(object.fixMsg) : false
684
+ };
685
+ },
686
+
687
+ toJSON(message: MsgInstantiateContract2): unknown {
688
+ const obj: any = {};
689
+ message.sender !== undefined && (obj.sender = message.sender);
690
+ message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
691
+ message.label !== undefined && (obj.label = message.label);
692
+ message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
693
+
694
+ if (message.funds) {
695
+ obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined);
696
+ } else {
697
+ obj.funds = [];
698
+ }
699
+
700
+ message.salt !== undefined && (obj.salt = base64FromBytes(message.salt !== undefined ? message.salt : new Uint8Array()));
701
+ message.fixMsg !== undefined && (obj.fixMsg = message.fixMsg);
702
+ return obj;
703
+ },
704
+
705
+ fromPartial(object: Partial<MsgInstantiateContract2>): MsgInstantiateContract2 {
706
+ const message = createBaseMsgInstantiateContract2();
707
+ message.sender = object.sender ?? "";
708
+ message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO;
709
+ message.label = object.label ?? "";
710
+ message.msg = object.msg ?? new Uint8Array();
711
+ message.funds = object.funds?.map(e => Coin.fromPartial(e)) || [];
712
+ message.salt = object.salt ?? new Uint8Array();
713
+ message.fixMsg = object.fixMsg ?? false;
714
+ return message;
715
+ }
716
+
717
+ };
718
+
719
+ function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse {
720
+ return {
721
+ address: "",
722
+ data: new Uint8Array()
723
+ };
724
+ }
725
+
726
+ export const MsgInstantiateContractResponse = {
727
+ encode(message: MsgInstantiateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
728
+ if (message.address !== "") {
729
+ writer.uint32(10).string(message.address);
730
+ }
731
+
732
+ if (message.data.length !== 0) {
733
+ writer.uint32(18).bytes(message.data);
734
+ }
735
+
736
+ return writer;
737
+ },
738
+
739
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContractResponse {
740
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
741
+ let end = length === undefined ? reader.len : reader.pos + length;
742
+ const message = createBaseMsgInstantiateContractResponse();
743
+
744
+ while (reader.pos < end) {
745
+ const tag = reader.uint32();
746
+
747
+ switch (tag >>> 3) {
748
+ case 1:
749
+ message.address = reader.string();
750
+ break;
751
+
752
+ case 2:
753
+ message.data = reader.bytes();
754
+ break;
755
+
756
+ default:
757
+ reader.skipType(tag & 7);
758
+ break;
759
+ }
760
+ }
761
+
762
+ return message;
763
+ },
764
+
765
+ fromJSON(object: any): MsgInstantiateContractResponse {
766
+ return {
767
+ address: isSet(object.address) ? String(object.address) : "",
768
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array()
769
+ };
770
+ },
771
+
772
+ toJSON(message: MsgInstantiateContractResponse): unknown {
773
+ const obj: any = {};
774
+ message.address !== undefined && (obj.address = message.address);
775
+ message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
776
+ return obj;
777
+ },
778
+
779
+ fromPartial(object: Partial<MsgInstantiateContractResponse>): MsgInstantiateContractResponse {
780
+ const message = createBaseMsgInstantiateContractResponse();
781
+ message.address = object.address ?? "";
782
+ message.data = object.data ?? new Uint8Array();
783
+ return message;
784
+ }
785
+
786
+ };
787
+
788
+ function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response {
789
+ return {
790
+ address: "",
791
+ data: new Uint8Array()
792
+ };
793
+ }
794
+
795
+ export const MsgInstantiateContract2Response = {
796
+ encode(message: MsgInstantiateContract2Response, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
797
+ if (message.address !== "") {
798
+ writer.uint32(10).string(message.address);
799
+ }
800
+
801
+ if (message.data.length !== 0) {
802
+ writer.uint32(18).bytes(message.data);
803
+ }
804
+
805
+ return writer;
806
+ },
807
+
808
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContract2Response {
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 = createBaseMsgInstantiateContract2Response();
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.data = 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): MsgInstantiateContract2Response {
835
+ return {
836
+ address: isSet(object.address) ? String(object.address) : "",
837
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array()
838
+ };
839
+ },
840
+
841
+ toJSON(message: MsgInstantiateContract2Response): unknown {
842
+ const obj: any = {};
843
+ message.address !== undefined && (obj.address = message.address);
844
+ message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
845
+ return obj;
846
+ },
847
+
848
+ fromPartial(object: Partial<MsgInstantiateContract2Response>): MsgInstantiateContract2Response {
849
+ const message = createBaseMsgInstantiateContract2Response();
850
+ message.address = object.address ?? "";
851
+ message.data = object.data ?? new Uint8Array();
852
+ return message;
853
+ }
854
+
855
+ };
856
+
857
+ function createBaseMsgExecuteContract(): MsgExecuteContract {
858
+ return {
859
+ sender: "",
860
+ contract: "",
861
+ msg: new Uint8Array(),
862
+ funds: [],
863
+ dependencies: []
864
+ };
865
+ }
866
+
867
+ export const MsgExecuteContract = {
868
+ encode(message: MsgExecuteContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
869
+ if (message.sender !== "") {
870
+ writer.uint32(10).string(message.sender);
871
+ }
872
+
873
+ if (message.contract !== "") {
874
+ writer.uint32(18).string(message.contract);
875
+ }
876
+
877
+ if (message.msg.length !== 0) {
878
+ writer.uint32(26).bytes(message.msg);
879
+ }
880
+
881
+ for (const v of message.funds) {
882
+ Coin.encode(v!, writer.uint32(34).fork()).ldelim();
883
+ }
884
+
885
+ for (const v of message.dependencies) {
886
+ writer.uint32(42).string(v!);
887
+ }
888
+
889
+ return writer;
890
+ },
891
+
892
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecuteContract {
893
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
894
+ let end = length === undefined ? reader.len : reader.pos + length;
895
+ const message = createBaseMsgExecuteContract();
896
+
897
+ while (reader.pos < end) {
898
+ const tag = reader.uint32();
899
+
900
+ switch (tag >>> 3) {
901
+ case 1:
902
+ message.sender = reader.string();
903
+ break;
904
+
905
+ case 2:
906
+ message.contract = reader.string();
907
+ break;
908
+
909
+ case 3:
910
+ message.msg = reader.bytes();
911
+ break;
912
+
913
+ case 4:
914
+ message.funds.push(Coin.decode(reader, reader.uint32()));
915
+ break;
916
+
917
+ case 5:
918
+ message.dependencies.push(reader.string());
919
+ break;
920
+
921
+ default:
922
+ reader.skipType(tag & 7);
923
+ break;
924
+ }
925
+ }
926
+
927
+ return message;
928
+ },
929
+
930
+ fromJSON(object: any): MsgExecuteContract {
931
+ return {
932
+ sender: isSet(object.sender) ? String(object.sender) : "",
933
+ contract: isSet(object.contract) ? String(object.contract) : "",
934
+ msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
935
+ funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [],
936
+ dependencies: Array.isArray(object?.dependencies) ? object.dependencies.map((e: any) => String(e)) : []
937
+ };
938
+ },
939
+
940
+ toJSON(message: MsgExecuteContract): unknown {
941
+ const obj: any = {};
942
+ message.sender !== undefined && (obj.sender = message.sender);
943
+ message.contract !== undefined && (obj.contract = message.contract);
944
+ message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
945
+
946
+ if (message.funds) {
947
+ obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined);
948
+ } else {
949
+ obj.funds = [];
950
+ }
951
+
952
+ if (message.dependencies) {
953
+ obj.dependencies = message.dependencies.map(e => e);
954
+ } else {
955
+ obj.dependencies = [];
956
+ }
957
+
958
+ return obj;
959
+ },
960
+
961
+ fromPartial(object: Partial<MsgExecuteContract>): MsgExecuteContract {
962
+ const message = createBaseMsgExecuteContract();
963
+ message.sender = object.sender ?? "";
964
+ message.contract = object.contract ?? "";
965
+ message.msg = object.msg ?? new Uint8Array();
966
+ message.funds = object.funds?.map(e => Coin.fromPartial(e)) || [];
967
+ message.dependencies = object.dependencies?.map(e => e) || [];
968
+ return message;
969
+ }
970
+
971
+ };
972
+
973
+ function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse {
974
+ return {
975
+ data: new Uint8Array()
976
+ };
977
+ }
978
+
979
+ export const MsgExecuteContractResponse = {
980
+ encode(message: MsgExecuteContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
981
+ if (message.data.length !== 0) {
982
+ writer.uint32(10).bytes(message.data);
983
+ }
984
+
985
+ return writer;
986
+ },
987
+
988
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecuteContractResponse {
989
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
990
+ let end = length === undefined ? reader.len : reader.pos + length;
991
+ const message = createBaseMsgExecuteContractResponse();
992
+
993
+ while (reader.pos < end) {
994
+ const tag = reader.uint32();
995
+
996
+ switch (tag >>> 3) {
997
+ case 1:
998
+ message.data = reader.bytes();
999
+ break;
1000
+
1001
+ default:
1002
+ reader.skipType(tag & 7);
1003
+ break;
1004
+ }
1005
+ }
1006
+
1007
+ return message;
1008
+ },
1009
+
1010
+ fromJSON(object: any): MsgExecuteContractResponse {
1011
+ return {
1012
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array()
1013
+ };
1014
+ },
1015
+
1016
+ toJSON(message: MsgExecuteContractResponse): unknown {
1017
+ const obj: any = {};
1018
+ message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
1019
+ return obj;
1020
+ },
1021
+
1022
+ fromPartial(object: Partial<MsgExecuteContractResponse>): MsgExecuteContractResponse {
1023
+ const message = createBaseMsgExecuteContractResponse();
1024
+ message.data = object.data ?? new Uint8Array();
1025
+ return message;
1026
+ }
1027
+
1028
+ };
1029
+
1030
+ function createBaseMsgExecuteWithOriginContract(): MsgExecuteWithOriginContract {
1031
+ return {
1032
+ origin: "",
1033
+ sender: "",
1034
+ contract: "",
1035
+ msg: new Uint8Array(),
1036
+ funds: []
1037
+ };
1038
+ }
1039
+
1040
+ export const MsgExecuteWithOriginContract = {
1041
+ encode(message: MsgExecuteWithOriginContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1042
+ if (message.origin !== "") {
1043
+ writer.uint32(10).string(message.origin);
1044
+ }
1045
+
1046
+ if (message.sender !== "") {
1047
+ writer.uint32(18).string(message.sender);
1048
+ }
1049
+
1050
+ if (message.contract !== "") {
1051
+ writer.uint32(26).string(message.contract);
1052
+ }
1053
+
1054
+ if (message.msg.length !== 0) {
1055
+ writer.uint32(34).bytes(message.msg);
1056
+ }
1057
+
1058
+ for (const v of message.funds) {
1059
+ Coin.encode(v!, writer.uint32(42).fork()).ldelim();
1060
+ }
1061
+
1062
+ return writer;
1063
+ },
1064
+
1065
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecuteWithOriginContract {
1066
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1067
+ let end = length === undefined ? reader.len : reader.pos + length;
1068
+ const message = createBaseMsgExecuteWithOriginContract();
1069
+
1070
+ while (reader.pos < end) {
1071
+ const tag = reader.uint32();
1072
+
1073
+ switch (tag >>> 3) {
1074
+ case 1:
1075
+ message.origin = reader.string();
1076
+ break;
1077
+
1078
+ case 2:
1079
+ message.sender = reader.string();
1080
+ break;
1081
+
1082
+ case 3:
1083
+ message.contract = reader.string();
1084
+ break;
1085
+
1086
+ case 4:
1087
+ message.msg = reader.bytes();
1088
+ break;
1089
+
1090
+ case 5:
1091
+ message.funds.push(Coin.decode(reader, reader.uint32()));
1092
+ break;
1093
+
1094
+ default:
1095
+ reader.skipType(tag & 7);
1096
+ break;
1097
+ }
1098
+ }
1099
+
1100
+ return message;
1101
+ },
1102
+
1103
+ fromJSON(object: any): MsgExecuteWithOriginContract {
1104
+ return {
1105
+ origin: isSet(object.origin) ? String(object.origin) : "",
1106
+ sender: isSet(object.sender) ? String(object.sender) : "",
1107
+ contract: isSet(object.contract) ? String(object.contract) : "",
1108
+ msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
1109
+ funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : []
1110
+ };
1111
+ },
1112
+
1113
+ toJSON(message: MsgExecuteWithOriginContract): unknown {
1114
+ const obj: any = {};
1115
+ message.origin !== undefined && (obj.origin = message.origin);
1116
+ message.sender !== undefined && (obj.sender = message.sender);
1117
+ message.contract !== undefined && (obj.contract = message.contract);
1118
+ message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
1119
+
1120
+ if (message.funds) {
1121
+ obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined);
1122
+ } else {
1123
+ obj.funds = [];
1124
+ }
1125
+
1126
+ return obj;
1127
+ },
1128
+
1129
+ fromPartial(object: Partial<MsgExecuteWithOriginContract>): MsgExecuteWithOriginContract {
1130
+ const message = createBaseMsgExecuteWithOriginContract();
1131
+ message.origin = object.origin ?? "";
1132
+ message.sender = object.sender ?? "";
1133
+ message.contract = object.contract ?? "";
1134
+ message.msg = object.msg ?? new Uint8Array();
1135
+ message.funds = object.funds?.map(e => Coin.fromPartial(e)) || [];
1136
+ return message;
1137
+ }
1138
+
1139
+ };
1140
+
1141
+ function createBaseMsgExecuteDelegateContract(): MsgExecuteDelegateContract {
1142
+ return {
1143
+ origin: "",
1144
+ sender: "",
1145
+ caller: "",
1146
+ codeContract: "",
1147
+ storageContract: "",
1148
+ msg: new Uint8Array(),
1149
+ funds: []
1150
+ };
1151
+ }
1152
+
1153
+ export const MsgExecuteDelegateContract = {
1154
+ encode(message: MsgExecuteDelegateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1155
+ if (message.origin !== "") {
1156
+ writer.uint32(10).string(message.origin);
1157
+ }
1158
+
1159
+ if (message.sender !== "") {
1160
+ writer.uint32(18).string(message.sender);
1161
+ }
1162
+
1163
+ if (message.caller !== "") {
1164
+ writer.uint32(26).string(message.caller);
1165
+ }
1166
+
1167
+ if (message.codeContract !== "") {
1168
+ writer.uint32(34).string(message.codeContract);
1169
+ }
1170
+
1171
+ if (message.storageContract !== "") {
1172
+ writer.uint32(42).string(message.storageContract);
1173
+ }
1174
+
1175
+ if (message.msg.length !== 0) {
1176
+ writer.uint32(50).bytes(message.msg);
1177
+ }
1178
+
1179
+ for (const v of message.funds) {
1180
+ Coin.encode(v!, writer.uint32(58).fork()).ldelim();
1181
+ }
1182
+
1183
+ return writer;
1184
+ },
1185
+
1186
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecuteDelegateContract {
1187
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1188
+ let end = length === undefined ? reader.len : reader.pos + length;
1189
+ const message = createBaseMsgExecuteDelegateContract();
1190
+
1191
+ while (reader.pos < end) {
1192
+ const tag = reader.uint32();
1193
+
1194
+ switch (tag >>> 3) {
1195
+ case 1:
1196
+ message.origin = reader.string();
1197
+ break;
1198
+
1199
+ case 2:
1200
+ message.sender = reader.string();
1201
+ break;
1202
+
1203
+ case 3:
1204
+ message.caller = reader.string();
1205
+ break;
1206
+
1207
+ case 4:
1208
+ message.codeContract = reader.string();
1209
+ break;
1210
+
1211
+ case 5:
1212
+ message.storageContract = reader.string();
1213
+ break;
1214
+
1215
+ case 6:
1216
+ message.msg = reader.bytes();
1217
+ break;
1218
+
1219
+ case 7:
1220
+ message.funds.push(Coin.decode(reader, reader.uint32()));
1221
+ break;
1222
+
1223
+ default:
1224
+ reader.skipType(tag & 7);
1225
+ break;
1226
+ }
1227
+ }
1228
+
1229
+ return message;
1230
+ },
1231
+
1232
+ fromJSON(object: any): MsgExecuteDelegateContract {
1233
+ return {
1234
+ origin: isSet(object.origin) ? String(object.origin) : "",
1235
+ sender: isSet(object.sender) ? String(object.sender) : "",
1236
+ caller: isSet(object.caller) ? String(object.caller) : "",
1237
+ codeContract: isSet(object.codeContract) ? String(object.codeContract) : "",
1238
+ storageContract: isSet(object.storageContract) ? String(object.storageContract) : "",
1239
+ msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
1240
+ funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : []
1241
+ };
1242
+ },
1243
+
1244
+ toJSON(message: MsgExecuteDelegateContract): unknown {
1245
+ const obj: any = {};
1246
+ message.origin !== undefined && (obj.origin = message.origin);
1247
+ message.sender !== undefined && (obj.sender = message.sender);
1248
+ message.caller !== undefined && (obj.caller = message.caller);
1249
+ message.codeContract !== undefined && (obj.codeContract = message.codeContract);
1250
+ message.storageContract !== undefined && (obj.storageContract = message.storageContract);
1251
+ message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
1252
+
1253
+ if (message.funds) {
1254
+ obj.funds = message.funds.map(e => e ? Coin.toJSON(e) : undefined);
1255
+ } else {
1256
+ obj.funds = [];
1257
+ }
1258
+
1259
+ return obj;
1260
+ },
1261
+
1262
+ fromPartial(object: Partial<MsgExecuteDelegateContract>): MsgExecuteDelegateContract {
1263
+ const message = createBaseMsgExecuteDelegateContract();
1264
+ message.origin = object.origin ?? "";
1265
+ message.sender = object.sender ?? "";
1266
+ message.caller = object.caller ?? "";
1267
+ message.codeContract = object.codeContract ?? "";
1268
+ message.storageContract = object.storageContract ?? "";
1269
+ message.msg = object.msg ?? new Uint8Array();
1270
+ message.funds = object.funds?.map(e => Coin.fromPartial(e)) || [];
1271
+ return message;
1272
+ }
1273
+
1274
+ };
1275
+
1276
+ function createBaseMsgExecuteDelegateContractResponse(): MsgExecuteDelegateContractResponse {
1277
+ return {
1278
+ data: new Uint8Array()
1279
+ };
1280
+ }
1281
+
1282
+ export const MsgExecuteDelegateContractResponse = {
1283
+ encode(message: MsgExecuteDelegateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1284
+ if (message.data.length !== 0) {
1285
+ writer.uint32(10).bytes(message.data);
1286
+ }
1287
+
1288
+ return writer;
1289
+ },
1290
+
1291
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecuteDelegateContractResponse {
1292
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1293
+ let end = length === undefined ? reader.len : reader.pos + length;
1294
+ const message = createBaseMsgExecuteDelegateContractResponse();
1295
+
1296
+ while (reader.pos < end) {
1297
+ const tag = reader.uint32();
1298
+
1299
+ switch (tag >>> 3) {
1300
+ case 1:
1301
+ message.data = reader.bytes();
1302
+ break;
1303
+
1304
+ default:
1305
+ reader.skipType(tag & 7);
1306
+ break;
1307
+ }
1308
+ }
1309
+
1310
+ return message;
1311
+ },
1312
+
1313
+ fromJSON(object: any): MsgExecuteDelegateContractResponse {
1314
+ return {
1315
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array()
1316
+ };
1317
+ },
1318
+
1319
+ toJSON(message: MsgExecuteDelegateContractResponse): unknown {
1320
+ const obj: any = {};
1321
+ message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
1322
+ return obj;
1323
+ },
1324
+
1325
+ fromPartial(object: Partial<MsgExecuteDelegateContractResponse>): MsgExecuteDelegateContractResponse {
1326
+ const message = createBaseMsgExecuteDelegateContractResponse();
1327
+ message.data = object.data ?? new Uint8Array();
1328
+ return message;
1329
+ }
1330
+
1331
+ };