decentralcardgame-cardchain-client-ts 0.0.9 → 0.0.11

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 (326) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.js +322 -322
  2. package/DecentralCardGame.cardchain.cardchain/module.ts +486 -486
  3. package/DecentralCardGame.cardchain.cardchain/registry.js +71 -71
  4. package/DecentralCardGame.cardchain.cardchain/registry.ts +71 -71
  5. package/DecentralCardGame.cardchain.cardchain/rest.js +1 -1
  6. package/DecentralCardGame.cardchain.cardchain/rest.ts +8 -3
  7. package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/genesis.js +1 -1
  8. package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/genesis.ts +1 -1
  9. package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/tx.js +44 -13
  10. package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/tx.ts +44 -13
  11. package/DecentralCardGame.cardchain.cardchain/types/amino/amino.js +2 -0
  12. package/DecentralCardGame.cardchain.cardchain/types/amino/amino.ts +2 -0
  13. package/DecentralCardGame.cardchain.cardchain/types.js +22 -22
  14. package/DecentralCardGame.cardchain.cardchain/types.ts +22 -22
  15. package/client.js +7 -7
  16. package/client.ts +11 -10
  17. package/cosmos.auth.v1beta1/module.js +2 -0
  18. package/cosmos.auth.v1beta1/module.ts +2 -0
  19. package/cosmos.auth.v1beta1/rest.js +18 -3
  20. package/cosmos.auth.v1beta1/rest.ts +113 -3
  21. package/cosmos.auth.v1beta1/types/amino/amino.js +2 -0
  22. package/cosmos.auth.v1beta1/types/amino/amino.ts +2 -0
  23. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.js +84 -0
  24. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +104 -0
  25. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +1 -1
  26. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.js +104 -3
  27. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +157 -4
  28. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/tx.js +105 -0
  29. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/tx.ts +172 -0
  30. package/cosmos.auth.v1beta1/types/cosmos/msg/v1/msg.js +2 -0
  31. package/cosmos.auth.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  32. package/cosmos.auth.v1beta1/types/cosmos/query/v1/query.js +2 -0
  33. package/cosmos.auth.v1beta1/types/cosmos/query/v1/query.ts +2 -0
  34. package/cosmos.auth.v1beta1/types.js +2 -1
  35. package/cosmos.auth.v1beta1/types.ts +2 -0
  36. package/cosmos.authz.v1beta1/module.js +19 -19
  37. package/cosmos.authz.v1beta1/module.ts +29 -29
  38. package/cosmos.authz.v1beta1/registry.js +2 -2
  39. package/cosmos.authz.v1beta1/registry.ts +2 -2
  40. package/cosmos.authz.v1beta1/types/amino/amino.js +2 -0
  41. package/cosmos.authz.v1beta1/types/amino/amino.ts +2 -0
  42. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +1 -1
  43. package/cosmos.bank.v1beta1/module.js +16 -16
  44. package/cosmos.bank.v1beta1/module.ts +24 -24
  45. package/cosmos.bank.v1beta1/registry.js +2 -2
  46. package/cosmos.bank.v1beta1/registry.ts +2 -2
  47. package/cosmos.bank.v1beta1/rest.js +37 -6
  48. package/cosmos.bank.v1beta1/rest.ts +99 -6
  49. package/cosmos.bank.v1beta1/types/amino/amino.js +2 -0
  50. package/cosmos.bank.v1beta1/types/amino/amino.ts +2 -0
  51. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.js +18 -2
  52. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +24 -2
  53. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +9 -0
  54. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.js +18 -2
  55. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +25 -4
  56. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.js +230 -1
  57. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +356 -5
  58. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.js +206 -1
  59. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +305 -1
  60. package/cosmos.bank.v1beta1/types/cosmos/query/v1/query.js +2 -0
  61. package/cosmos.bank.v1beta1/types/cosmos/query/v1/query.ts +2 -0
  62. package/cosmos.base.tendermint.v1beta1/rest.js +3 -3
  63. package/cosmos.base.tendermint.v1beta1/rest.ts +18 -27
  64. package/cosmos.base.tendermint.v1beta1/types/amino/amino.js +2 -0
  65. package/cosmos.base.tendermint.v1beta1/types/amino/amino.ts +2 -0
  66. package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +16 -46
  67. package/cosmos.consensus.v1/index.js +5 -0
  68. package/cosmos.consensus.v1/index.ts +6 -0
  69. package/cosmos.consensus.v1/module.js +81 -0
  70. package/cosmos.consensus.v1/module.ts +129 -0
  71. package/cosmos.consensus.v1/registry.js +5 -0
  72. package/cosmos.consensus.v1/registry.ts +9 -0
  73. package/cosmos.consensus.v1/rest.js +100 -0
  74. package/cosmos.consensus.v1/rest.ts +268 -0
  75. package/cosmos.consensus.v1/types/cosmos/consensus/v1/query.js +94 -0
  76. package/cosmos.consensus.v1/types/cosmos/consensus/v1/query.ts +147 -0
  77. package/cosmos.consensus.v1/types/cosmos/consensus/v1/tx.js +129 -0
  78. package/cosmos.consensus.v1/types/cosmos/consensus/v1/tx.ts +196 -0
  79. package/cosmos.consensus.v1/types/cosmos/msg/v1/msg.js +2 -0
  80. package/cosmos.consensus.v1/types/cosmos/msg/v1/msg.ts +2 -0
  81. package/cosmos.consensus.v1/types/cosmos_proto/cosmos.js +171 -0
  82. package/cosmos.consensus.v1/types/cosmos_proto/cosmos.ts +247 -0
  83. package/cosmos.consensus.v1/types/gogoproto/gogo.js +2 -0
  84. package/cosmos.consensus.v1/types/gogoproto/gogo.ts +2 -0
  85. package/cosmos.consensus.v1/types/google/api/annotations.js +2 -0
  86. package/cosmos.consensus.v1/types/google/api/annotations.ts +2 -0
  87. package/cosmos.consensus.v1/types/google/api/http.js +260 -0
  88. package/cosmos.consensus.v1/types/google/api/http.ts +589 -0
  89. package/cosmos.consensus.v1/types/google/protobuf/descriptor.js +2830 -0
  90. package/cosmos.consensus.v1/types/google/protobuf/descriptor.ts +3753 -0
  91. package/cosmos.consensus.v1/types/google/protobuf/duration.js +84 -0
  92. package/cosmos.consensus.v1/types/google/protobuf/duration.ts +187 -0
  93. package/cosmos.consensus.v1/types/tendermint/types/params.js +369 -0
  94. package/cosmos.consensus.v1/types/tendermint/types/params.ts +498 -0
  95. package/cosmos.consensus.v1/types.js +1 -0
  96. package/cosmos.consensus.v1/types.ts +5 -0
  97. package/cosmos.crisis.v1beta1/module.js +24 -1
  98. package/cosmos.crisis.v1beta1/module.ts +34 -1
  99. package/cosmos.crisis.v1beta1/registry.js +2 -0
  100. package/cosmos.crisis.v1beta1/registry.ts +2 -0
  101. package/cosmos.crisis.v1beta1/rest.ts +19 -0
  102. package/cosmos.crisis.v1beta1/types/amino/amino.js +2 -0
  103. package/cosmos.crisis.v1beta1/types/amino/amino.ts +2 -0
  104. package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.js +95 -0
  105. package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +140 -1
  106. package/cosmos.distribution.v1beta1/module.js +63 -17
  107. package/cosmos.distribution.v1beta1/module.ts +91 -25
  108. package/cosmos.distribution.v1beta1/registry.js +8 -4
  109. package/cosmos.distribution.v1beta1/registry.ts +8 -4
  110. package/cosmos.distribution.v1beta1/rest.js +14 -0
  111. package/cosmos.distribution.v1beta1/rest.ts +66 -7
  112. package/cosmos.distribution.v1beta1/types/amino/amino.js +2 -0
  113. package/cosmos.distribution.v1beta1/types/amino/amino.ts +2 -0
  114. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +19 -0
  115. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +4 -4
  116. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.js +120 -0
  117. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +158 -1
  118. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.js +199 -0
  119. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +300 -3
  120. package/cosmos.evidence.v1beta1/rest.js +4 -3
  121. package/cosmos.evidence.v1beta1/rest.ts +4 -3
  122. package/cosmos.evidence.v1beta1/types/amino/amino.js +2 -0
  123. package/cosmos.evidence.v1beta1/types/amino/amino.ts +2 -0
  124. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +7 -1
  125. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.js +13 -2
  126. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +25 -3
  127. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +2 -0
  128. package/cosmos.feegrant.v1beta1/types/amino/amino.js +2 -0
  129. package/cosmos.feegrant.v1beta1/types/amino/amino.ts +2 -0
  130. package/cosmos.gov.v1/module.js +44 -19
  131. package/cosmos.gov.v1/module.ts +62 -27
  132. package/cosmos.gov.v1/registry.js +4 -2
  133. package/cosmos.gov.v1/registry.ts +4 -2
  134. package/cosmos.gov.v1/rest.ts +155 -41
  135. package/cosmos.gov.v1/types/amino/amino.js +2 -0
  136. package/cosmos.gov.v1/types/amino/amino.ts +2 -0
  137. package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.js +13 -1
  138. package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +40 -5
  139. package/cosmos.gov.v1/types/cosmos/gov/v1/gov.js +179 -0
  140. package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +277 -6
  141. package/cosmos.gov.v1/types/cosmos/gov/v1/query.js +13 -2
  142. package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +45 -7
  143. package/cosmos.gov.v1/types/cosmos/gov/v1/tx.js +113 -2
  144. package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +186 -3
  145. package/cosmos.gov.v1/types.js +2 -1
  146. package/cosmos.gov.v1/types.ts +2 -0
  147. package/cosmos.gov.v1beta1/module.js +24 -24
  148. package/cosmos.gov.v1beta1/module.ts +36 -36
  149. package/cosmos.gov.v1beta1/registry.js +4 -4
  150. package/cosmos.gov.v1beta1/registry.ts +4 -4
  151. package/cosmos.gov.v1beta1/rest.ts +65 -96
  152. package/cosmos.gov.v1beta1/types/amino/amino.js +2 -0
  153. package/cosmos.gov.v1beta1/types/amino/amino.ts +2 -0
  154. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +3 -3
  155. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +45 -10
  156. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +4 -2
  157. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +16 -1
  158. package/cosmos.group.v1/module.js +98 -96
  159. package/cosmos.group.v1/module.ts +149 -147
  160. package/cosmos.group.v1/registry.js +16 -16
  161. package/cosmos.group.v1/registry.ts +16 -16
  162. package/cosmos.group.v1/rest.js +3 -3
  163. package/cosmos.group.v1/rest.ts +29 -9
  164. package/cosmos.group.v1/types/amino/amino.js +2 -0
  165. package/cosmos.group.v1/types/amino/amino.ts +2 -0
  166. package/cosmos.group.v1/types/cosmos/group/v1/events.js +65 -1
  167. package/cosmos.group.v1/types/cosmos/group/v1/events.ts +89 -1
  168. package/cosmos.group.v1/types/cosmos/group/v1/query.ts +5 -5
  169. package/cosmos.group.v1/types/cosmos/group/v1/tx.js +52 -34
  170. package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +79 -49
  171. package/cosmos.group.v1/types/cosmos/group/v1/types.js +20 -0
  172. package/cosmos.group.v1/types/cosmos/group/v1/types.ts +46 -6
  173. package/cosmos.group.v1/types.js +2 -1
  174. package/cosmos.group.v1/types.ts +2 -0
  175. package/cosmos.mint.v1beta1/rest.ts +9 -1
  176. package/cosmos.mint.v1beta1/types/amino/amino.js +2 -0
  177. package/cosmos.mint.v1beta1/types/amino/amino.ts +2 -0
  178. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +1 -1
  179. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +1 -1
  180. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/tx.js +105 -0
  181. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/tx.ts +172 -0
  182. package/cosmos.mint.v1beta1/types/cosmos/msg/v1/msg.js +2 -0
  183. package/cosmos.mint.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  184. package/cosmos.nft.v1beta1/rest.ts +18 -22
  185. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +10 -0
  186. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +1 -0
  187. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +20 -0
  188. package/cosmos.nft.v1beta1/types/cosmos_proto/cosmos.js +171 -0
  189. package/cosmos.nft.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  190. package/cosmos.params.v1beta1/types/amino/amino.js +2 -0
  191. package/cosmos.params.v1beta1/types/amino/amino.ts +2 -0
  192. package/cosmos.slashing.v1beta1/rest.ts +8 -0
  193. package/cosmos.slashing.v1beta1/types/amino/amino.js +2 -0
  194. package/cosmos.slashing.v1beta1/types/amino/amino.ts +2 -0
  195. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +1 -1
  196. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.js +94 -0
  197. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +139 -0
  198. package/cosmos.staking.v1beta1/module.js +34 -32
  199. package/cosmos.staking.v1beta1/module.ts +50 -48
  200. package/cosmos.staking.v1beta1/registry.js +6 -6
  201. package/cosmos.staking.v1beta1/registry.ts +6 -6
  202. package/cosmos.staking.v1beta1/rest.js +7 -7
  203. package/cosmos.staking.v1beta1/rest.ts +49 -8
  204. package/cosmos.staking.v1beta1/types/amino/amino.js +2 -0
  205. package/cosmos.staking.v1beta1/types/amino/amino.ts +2 -0
  206. package/cosmos.staking.v1beta1/types/cosmos/query/v1/query.js +2 -0
  207. package/cosmos.staking.v1beta1/types/cosmos/query/v1/query.ts +2 -0
  208. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +1 -1
  209. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +36 -5
  210. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.js +180 -2
  211. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +206 -3
  212. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.js +94 -1
  213. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +138 -1
  214. package/cosmos.staking.v1beta1/types/tendermint/abci/types.js +3812 -0
  215. package/cosmos.staking.v1beta1/types/tendermint/abci/types.ts +4525 -0
  216. package/cosmos.staking.v1beta1/types/tendermint/types/params.js +369 -0
  217. package/cosmos.staking.v1beta1/types/tendermint/types/params.ts +498 -0
  218. package/cosmos.staking.v1beta1/types.js +2 -1
  219. package/cosmos.staking.v1beta1/types.ts +2 -0
  220. package/cosmos.tx.v1beta1/rest.js +66 -2
  221. package/cosmos.tx.v1beta1/rest.ts +177 -16
  222. package/cosmos.tx.v1beta1/types/amino/amino.js +2 -0
  223. package/cosmos.tx.v1beta1/types/amino/amino.ts +2 -0
  224. package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.js +360 -2
  225. package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +524 -2
  226. package/cosmos.tx.v1beta1/types/tendermint/abci/types.js +592 -266
  227. package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +703 -332
  228. package/cosmos.tx.v1beta1/types/tendermint/types/params.js +8 -17
  229. package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +9 -25
  230. package/cosmos.upgrade.v1beta1/rest.ts +0 -1
  231. package/cosmos.upgrade.v1beta1/types/amino/amino.js +2 -0
  232. package/cosmos.upgrade.v1beta1/types/amino/amino.ts +2 -0
  233. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +3 -3
  234. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
  235. package/cosmos.vesting.v1beta1/module.js +19 -19
  236. package/cosmos.vesting.v1beta1/module.ts +29 -29
  237. package/cosmos.vesting.v1beta1/registry.js +2 -2
  238. package/cosmos.vesting.v1beta1/registry.ts +2 -2
  239. package/cosmos.vesting.v1beta1/types/amino/amino.js +2 -0
  240. package/cosmos.vesting.v1beta1/types/amino/amino.ts +2 -0
  241. package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.js +84 -0
  242. package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +104 -0
  243. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +1 -0
  244. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +13 -2
  245. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +16 -4
  246. package/ibc.applications.transfer.v1/module.js +5 -27
  247. package/ibc.applications.transfer.v1/module.ts +5 -34
  248. package/ibc.applications.transfer.v1/registry.js +1 -4
  249. package/ibc.applications.transfer.v1/registry.ts +0 -2
  250. package/ibc.applications.transfer.v1/rest.js +15 -1
  251. package/ibc.applications.transfer.v1/rest.ts +30 -1
  252. package/ibc.applications.transfer.v1/types/amino/amino.js +2 -0
  253. package/ibc.applications.transfer.v1/types/amino/amino.ts +2 -0
  254. package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
  255. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/authz.js +135 -0
  256. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/authz.ts +178 -0
  257. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.js +16 -1
  258. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +23 -2
  259. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.js +91 -0
  260. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +120 -0
  261. package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +5 -1
  262. package/ibc.applications.transfer.v1/types.js +3 -1
  263. package/ibc.applications.transfer.v1/types.ts +4 -0
  264. package/ibc.core.channel.v1/rest.ts +1 -0
  265. package/ibc.core.channel.v1/types/amino/amino.js +2 -0
  266. package/ibc.core.channel.v1/types/amino/amino.ts +2 -0
  267. package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
  268. package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.js +13 -2
  269. package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +14 -2
  270. package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +5 -1
  271. package/ibc.core.client.v1/rest.ts +5 -1
  272. package/ibc.core.client.v1/types/amino/amino.js +2 -0
  273. package/ibc.core.client.v1/types/amino/amino.ts +2 -0
  274. package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
  275. package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +5 -1
  276. package/ibc.core.client.v1/types/ibc/core/client/v1/tx.js +9 -8
  277. package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +28 -14
  278. package/ibc.core.connection.v1/types/amino/amino.js +2 -0
  279. package/ibc.core.connection.v1/types/amino/amino.ts +2 -0
  280. package/ibc.core.connection.v1/types/{proofs.js → cosmos/ics23/v1/proofs.js} +1 -1
  281. package/ibc.core.connection.v1/types/{proofs.ts → cosmos/ics23/v1/proofs.ts} +1 -1
  282. package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +6 -4
  283. package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +5 -1
  284. package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.js +1 -1
  285. package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +1 -1
  286. package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.js +26 -0
  287. package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +34 -0
  288. package/index.js +3 -1
  289. package/index.ts +3 -1
  290. package/package.json +1 -4
  291. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/card.js +0 -0
  292. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/card.ts +0 -0
  293. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection.js +0 -0
  294. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection.ts +0 -0
  295. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection_proposal.js +0 -0
  296. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/collection_proposal.ts +0 -0
  297. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/copyright_proposal.js +0 -0
  298. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/copyright_proposal.ts +0 -0
  299. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/council.js +0 -0
  300. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/council.ts +0 -0
  301. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/image.js +0 -0
  302. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/image.ts +0 -0
  303. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match.js +0 -0
  304. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match.ts +0 -0
  305. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match_reporter_proposal.js +0 -0
  306. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/match_reporter_proposal.ts +0 -0
  307. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/num.js +0 -0
  308. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/num.ts +0 -0
  309. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/params.js +0 -0
  310. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/params.ts +0 -0
  311. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/query.js +0 -0
  312. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/query.ts +0 -0
  313. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/running_average.js +0 -0
  314. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/running_average.ts +0 -0
  315. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/sell_offer.js +0 -0
  316. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/sell_offer.ts +0 -0
  317. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/server.js +0 -0
  318. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/server.ts +0 -0
  319. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/user.js +0 -0
  320. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/user.ts +0 -0
  321. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/vote_right.js +0 -0
  322. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/vote_right.ts +0 -0
  323. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_result.js +0 -0
  324. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_result.ts +0 -0
  325. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_results.js +0 -0
  326. /package/DecentralCardGame.cardchain.cardchain/types/{cardchain → DecentralCardGame/cardchain}/cardchain/voting_results.ts +0 -0
@@ -0,0 +1,3812 @@
1
+ /* eslint-disable */
2
+ import Long from "long";
3
+ import _m0 from "protobufjs/minimal";
4
+ import { Timestamp } from "../../google/protobuf/timestamp";
5
+ import { PublicKey } from "../crypto/keys";
6
+ import { ProofOps } from "../crypto/proof";
7
+ import { ConsensusParams } from "../types/params";
8
+ import { Header } from "../types/types";
9
+ export const protobufPackage = "tendermint.abci";
10
+ export var CheckTxType;
11
+ (function (CheckTxType) {
12
+ CheckTxType[CheckTxType["NEW"] = 0] = "NEW";
13
+ CheckTxType[CheckTxType["RECHECK"] = 1] = "RECHECK";
14
+ CheckTxType[CheckTxType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
15
+ })(CheckTxType || (CheckTxType = {}));
16
+ export function checkTxTypeFromJSON(object) {
17
+ switch (object) {
18
+ case 0:
19
+ case "NEW":
20
+ return CheckTxType.NEW;
21
+ case 1:
22
+ case "RECHECK":
23
+ return CheckTxType.RECHECK;
24
+ case -1:
25
+ case "UNRECOGNIZED":
26
+ default:
27
+ return CheckTxType.UNRECOGNIZED;
28
+ }
29
+ }
30
+ export function checkTxTypeToJSON(object) {
31
+ switch (object) {
32
+ case CheckTxType.NEW:
33
+ return "NEW";
34
+ case CheckTxType.RECHECK:
35
+ return "RECHECK";
36
+ case CheckTxType.UNRECOGNIZED:
37
+ default:
38
+ return "UNRECOGNIZED";
39
+ }
40
+ }
41
+ export var MisbehaviorType;
42
+ (function (MisbehaviorType) {
43
+ MisbehaviorType[MisbehaviorType["UNKNOWN"] = 0] = "UNKNOWN";
44
+ MisbehaviorType[MisbehaviorType["DUPLICATE_VOTE"] = 1] = "DUPLICATE_VOTE";
45
+ MisbehaviorType[MisbehaviorType["LIGHT_CLIENT_ATTACK"] = 2] = "LIGHT_CLIENT_ATTACK";
46
+ MisbehaviorType[MisbehaviorType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
47
+ })(MisbehaviorType || (MisbehaviorType = {}));
48
+ export function misbehaviorTypeFromJSON(object) {
49
+ switch (object) {
50
+ case 0:
51
+ case "UNKNOWN":
52
+ return MisbehaviorType.UNKNOWN;
53
+ case 1:
54
+ case "DUPLICATE_VOTE":
55
+ return MisbehaviorType.DUPLICATE_VOTE;
56
+ case 2:
57
+ case "LIGHT_CLIENT_ATTACK":
58
+ return MisbehaviorType.LIGHT_CLIENT_ATTACK;
59
+ case -1:
60
+ case "UNRECOGNIZED":
61
+ default:
62
+ return MisbehaviorType.UNRECOGNIZED;
63
+ }
64
+ }
65
+ export function misbehaviorTypeToJSON(object) {
66
+ switch (object) {
67
+ case MisbehaviorType.UNKNOWN:
68
+ return "UNKNOWN";
69
+ case MisbehaviorType.DUPLICATE_VOTE:
70
+ return "DUPLICATE_VOTE";
71
+ case MisbehaviorType.LIGHT_CLIENT_ATTACK:
72
+ return "LIGHT_CLIENT_ATTACK";
73
+ case MisbehaviorType.UNRECOGNIZED:
74
+ default:
75
+ return "UNRECOGNIZED";
76
+ }
77
+ }
78
+ export var ResponseOfferSnapshot_Result;
79
+ (function (ResponseOfferSnapshot_Result) {
80
+ /** UNKNOWN - Unknown result, abort all snapshot restoration */
81
+ ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNKNOWN"] = 0] = "UNKNOWN";
82
+ /** ACCEPT - Snapshot accepted, apply chunks */
83
+ ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ACCEPT"] = 1] = "ACCEPT";
84
+ /** ABORT - Abort all snapshot restoration */
85
+ ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ABORT"] = 2] = "ABORT";
86
+ /** REJECT - Reject this specific snapshot, try others */
87
+ ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT"] = 3] = "REJECT";
88
+ /** REJECT_FORMAT - Reject all snapshots of this format, try others */
89
+ ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_FORMAT"] = 4] = "REJECT_FORMAT";
90
+ /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */
91
+ ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_SENDER"] = 5] = "REJECT_SENDER";
92
+ ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
93
+ })(ResponseOfferSnapshot_Result || (ResponseOfferSnapshot_Result = {}));
94
+ export function responseOfferSnapshot_ResultFromJSON(object) {
95
+ switch (object) {
96
+ case 0:
97
+ case "UNKNOWN":
98
+ return ResponseOfferSnapshot_Result.UNKNOWN;
99
+ case 1:
100
+ case "ACCEPT":
101
+ return ResponseOfferSnapshot_Result.ACCEPT;
102
+ case 2:
103
+ case "ABORT":
104
+ return ResponseOfferSnapshot_Result.ABORT;
105
+ case 3:
106
+ case "REJECT":
107
+ return ResponseOfferSnapshot_Result.REJECT;
108
+ case 4:
109
+ case "REJECT_FORMAT":
110
+ return ResponseOfferSnapshot_Result.REJECT_FORMAT;
111
+ case 5:
112
+ case "REJECT_SENDER":
113
+ return ResponseOfferSnapshot_Result.REJECT_SENDER;
114
+ case -1:
115
+ case "UNRECOGNIZED":
116
+ default:
117
+ return ResponseOfferSnapshot_Result.UNRECOGNIZED;
118
+ }
119
+ }
120
+ export function responseOfferSnapshot_ResultToJSON(object) {
121
+ switch (object) {
122
+ case ResponseOfferSnapshot_Result.UNKNOWN:
123
+ return "UNKNOWN";
124
+ case ResponseOfferSnapshot_Result.ACCEPT:
125
+ return "ACCEPT";
126
+ case ResponseOfferSnapshot_Result.ABORT:
127
+ return "ABORT";
128
+ case ResponseOfferSnapshot_Result.REJECT:
129
+ return "REJECT";
130
+ case ResponseOfferSnapshot_Result.REJECT_FORMAT:
131
+ return "REJECT_FORMAT";
132
+ case ResponseOfferSnapshot_Result.REJECT_SENDER:
133
+ return "REJECT_SENDER";
134
+ case ResponseOfferSnapshot_Result.UNRECOGNIZED:
135
+ default:
136
+ return "UNRECOGNIZED";
137
+ }
138
+ }
139
+ export var ResponseApplySnapshotChunk_Result;
140
+ (function (ResponseApplySnapshotChunk_Result) {
141
+ /** UNKNOWN - Unknown result, abort all snapshot restoration */
142
+ ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNKNOWN"] = 0] = "UNKNOWN";
143
+ /** ACCEPT - Chunk successfully accepted */
144
+ ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ACCEPT"] = 1] = "ACCEPT";
145
+ /** ABORT - Abort all snapshot restoration */
146
+ ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ABORT"] = 2] = "ABORT";
147
+ /** RETRY - Retry chunk (combine with refetch and reject) */
148
+ ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY"] = 3] = "RETRY";
149
+ /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */
150
+ ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY_SNAPSHOT"] = 4] = "RETRY_SNAPSHOT";
151
+ /** REJECT_SNAPSHOT - Reject this snapshot, try others */
152
+ ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["REJECT_SNAPSHOT"] = 5] = "REJECT_SNAPSHOT";
153
+ ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
154
+ })(ResponseApplySnapshotChunk_Result || (ResponseApplySnapshotChunk_Result = {}));
155
+ export function responseApplySnapshotChunk_ResultFromJSON(object) {
156
+ switch (object) {
157
+ case 0:
158
+ case "UNKNOWN":
159
+ return ResponseApplySnapshotChunk_Result.UNKNOWN;
160
+ case 1:
161
+ case "ACCEPT":
162
+ return ResponseApplySnapshotChunk_Result.ACCEPT;
163
+ case 2:
164
+ case "ABORT":
165
+ return ResponseApplySnapshotChunk_Result.ABORT;
166
+ case 3:
167
+ case "RETRY":
168
+ return ResponseApplySnapshotChunk_Result.RETRY;
169
+ case 4:
170
+ case "RETRY_SNAPSHOT":
171
+ return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT;
172
+ case 5:
173
+ case "REJECT_SNAPSHOT":
174
+ return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT;
175
+ case -1:
176
+ case "UNRECOGNIZED":
177
+ default:
178
+ return ResponseApplySnapshotChunk_Result.UNRECOGNIZED;
179
+ }
180
+ }
181
+ export function responseApplySnapshotChunk_ResultToJSON(object) {
182
+ switch (object) {
183
+ case ResponseApplySnapshotChunk_Result.UNKNOWN:
184
+ return "UNKNOWN";
185
+ case ResponseApplySnapshotChunk_Result.ACCEPT:
186
+ return "ACCEPT";
187
+ case ResponseApplySnapshotChunk_Result.ABORT:
188
+ return "ABORT";
189
+ case ResponseApplySnapshotChunk_Result.RETRY:
190
+ return "RETRY";
191
+ case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT:
192
+ return "RETRY_SNAPSHOT";
193
+ case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT:
194
+ return "REJECT_SNAPSHOT";
195
+ case ResponseApplySnapshotChunk_Result.UNRECOGNIZED:
196
+ default:
197
+ return "UNRECOGNIZED";
198
+ }
199
+ }
200
+ export var ResponseProcessProposal_ProposalStatus;
201
+ (function (ResponseProcessProposal_ProposalStatus) {
202
+ ResponseProcessProposal_ProposalStatus[ResponseProcessProposal_ProposalStatus["UNKNOWN"] = 0] = "UNKNOWN";
203
+ ResponseProcessProposal_ProposalStatus[ResponseProcessProposal_ProposalStatus["ACCEPT"] = 1] = "ACCEPT";
204
+ ResponseProcessProposal_ProposalStatus[ResponseProcessProposal_ProposalStatus["REJECT"] = 2] = "REJECT";
205
+ ResponseProcessProposal_ProposalStatus[ResponseProcessProposal_ProposalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
206
+ })(ResponseProcessProposal_ProposalStatus || (ResponseProcessProposal_ProposalStatus = {}));
207
+ export function responseProcessProposal_ProposalStatusFromJSON(object) {
208
+ switch (object) {
209
+ case 0:
210
+ case "UNKNOWN":
211
+ return ResponseProcessProposal_ProposalStatus.UNKNOWN;
212
+ case 1:
213
+ case "ACCEPT":
214
+ return ResponseProcessProposal_ProposalStatus.ACCEPT;
215
+ case 2:
216
+ case "REJECT":
217
+ return ResponseProcessProposal_ProposalStatus.REJECT;
218
+ case -1:
219
+ case "UNRECOGNIZED":
220
+ default:
221
+ return ResponseProcessProposal_ProposalStatus.UNRECOGNIZED;
222
+ }
223
+ }
224
+ export function responseProcessProposal_ProposalStatusToJSON(object) {
225
+ switch (object) {
226
+ case ResponseProcessProposal_ProposalStatus.UNKNOWN:
227
+ return "UNKNOWN";
228
+ case ResponseProcessProposal_ProposalStatus.ACCEPT:
229
+ return "ACCEPT";
230
+ case ResponseProcessProposal_ProposalStatus.REJECT:
231
+ return "REJECT";
232
+ case ResponseProcessProposal_ProposalStatus.UNRECOGNIZED:
233
+ default:
234
+ return "UNRECOGNIZED";
235
+ }
236
+ }
237
+ function createBaseRequest() {
238
+ return {
239
+ echo: undefined,
240
+ flush: undefined,
241
+ info: undefined,
242
+ initChain: undefined,
243
+ query: undefined,
244
+ beginBlock: undefined,
245
+ checkTx: undefined,
246
+ deliverTx: undefined,
247
+ endBlock: undefined,
248
+ commit: undefined,
249
+ listSnapshots: undefined,
250
+ offerSnapshot: undefined,
251
+ loadSnapshotChunk: undefined,
252
+ applySnapshotChunk: undefined,
253
+ prepareProposal: undefined,
254
+ processProposal: undefined,
255
+ };
256
+ }
257
+ export const Request = {
258
+ encode(message, writer = _m0.Writer.create()) {
259
+ if (message.echo !== undefined) {
260
+ RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim();
261
+ }
262
+ if (message.flush !== undefined) {
263
+ RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim();
264
+ }
265
+ if (message.info !== undefined) {
266
+ RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim();
267
+ }
268
+ if (message.initChain !== undefined) {
269
+ RequestInitChain.encode(message.initChain, writer.uint32(42).fork()).ldelim();
270
+ }
271
+ if (message.query !== undefined) {
272
+ RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim();
273
+ }
274
+ if (message.beginBlock !== undefined) {
275
+ RequestBeginBlock.encode(message.beginBlock, writer.uint32(58).fork()).ldelim();
276
+ }
277
+ if (message.checkTx !== undefined) {
278
+ RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim();
279
+ }
280
+ if (message.deliverTx !== undefined) {
281
+ RequestDeliverTx.encode(message.deliverTx, writer.uint32(74).fork()).ldelim();
282
+ }
283
+ if (message.endBlock !== undefined) {
284
+ RequestEndBlock.encode(message.endBlock, writer.uint32(82).fork()).ldelim();
285
+ }
286
+ if (message.commit !== undefined) {
287
+ RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim();
288
+ }
289
+ if (message.listSnapshots !== undefined) {
290
+ RequestListSnapshots.encode(message.listSnapshots, writer.uint32(98).fork()).ldelim();
291
+ }
292
+ if (message.offerSnapshot !== undefined) {
293
+ RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(106).fork()).ldelim();
294
+ }
295
+ if (message.loadSnapshotChunk !== undefined) {
296
+ RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(114).fork()).ldelim();
297
+ }
298
+ if (message.applySnapshotChunk !== undefined) {
299
+ RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(122).fork()).ldelim();
300
+ }
301
+ if (message.prepareProposal !== undefined) {
302
+ RequestPrepareProposal.encode(message.prepareProposal, writer.uint32(130).fork()).ldelim();
303
+ }
304
+ if (message.processProposal !== undefined) {
305
+ RequestProcessProposal.encode(message.processProposal, writer.uint32(138).fork()).ldelim();
306
+ }
307
+ return writer;
308
+ },
309
+ decode(input, length) {
310
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
311
+ let end = length === undefined ? reader.len : reader.pos + length;
312
+ const message = createBaseRequest();
313
+ while (reader.pos < end) {
314
+ const tag = reader.uint32();
315
+ switch (tag >>> 3) {
316
+ case 1:
317
+ message.echo = RequestEcho.decode(reader, reader.uint32());
318
+ break;
319
+ case 2:
320
+ message.flush = RequestFlush.decode(reader, reader.uint32());
321
+ break;
322
+ case 3:
323
+ message.info = RequestInfo.decode(reader, reader.uint32());
324
+ break;
325
+ case 5:
326
+ message.initChain = RequestInitChain.decode(reader, reader.uint32());
327
+ break;
328
+ case 6:
329
+ message.query = RequestQuery.decode(reader, reader.uint32());
330
+ break;
331
+ case 7:
332
+ message.beginBlock = RequestBeginBlock.decode(reader, reader.uint32());
333
+ break;
334
+ case 8:
335
+ message.checkTx = RequestCheckTx.decode(reader, reader.uint32());
336
+ break;
337
+ case 9:
338
+ message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32());
339
+ break;
340
+ case 10:
341
+ message.endBlock = RequestEndBlock.decode(reader, reader.uint32());
342
+ break;
343
+ case 11:
344
+ message.commit = RequestCommit.decode(reader, reader.uint32());
345
+ break;
346
+ case 12:
347
+ message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32());
348
+ break;
349
+ case 13:
350
+ message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32());
351
+ break;
352
+ case 14:
353
+ message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32());
354
+ break;
355
+ case 15:
356
+ message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32());
357
+ break;
358
+ case 16:
359
+ message.prepareProposal = RequestPrepareProposal.decode(reader, reader.uint32());
360
+ break;
361
+ case 17:
362
+ message.processProposal = RequestProcessProposal.decode(reader, reader.uint32());
363
+ break;
364
+ default:
365
+ reader.skipType(tag & 7);
366
+ break;
367
+ }
368
+ }
369
+ return message;
370
+ },
371
+ fromJSON(object) {
372
+ return {
373
+ echo: isSet(object.echo) ? RequestEcho.fromJSON(object.echo) : undefined,
374
+ flush: isSet(object.flush) ? RequestFlush.fromJSON(object.flush) : undefined,
375
+ info: isSet(object.info) ? RequestInfo.fromJSON(object.info) : undefined,
376
+ initChain: isSet(object.initChain) ? RequestInitChain.fromJSON(object.initChain) : undefined,
377
+ query: isSet(object.query) ? RequestQuery.fromJSON(object.query) : undefined,
378
+ beginBlock: isSet(object.beginBlock) ? RequestBeginBlock.fromJSON(object.beginBlock) : undefined,
379
+ checkTx: isSet(object.checkTx) ? RequestCheckTx.fromJSON(object.checkTx) : undefined,
380
+ deliverTx: isSet(object.deliverTx) ? RequestDeliverTx.fromJSON(object.deliverTx) : undefined,
381
+ endBlock: isSet(object.endBlock) ? RequestEndBlock.fromJSON(object.endBlock) : undefined,
382
+ commit: isSet(object.commit) ? RequestCommit.fromJSON(object.commit) : undefined,
383
+ listSnapshots: isSet(object.listSnapshots) ? RequestListSnapshots.fromJSON(object.listSnapshots) : undefined,
384
+ offerSnapshot: isSet(object.offerSnapshot) ? RequestOfferSnapshot.fromJSON(object.offerSnapshot) : undefined,
385
+ loadSnapshotChunk: isSet(object.loadSnapshotChunk)
386
+ ? RequestLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk)
387
+ : undefined,
388
+ applySnapshotChunk: isSet(object.applySnapshotChunk)
389
+ ? RequestApplySnapshotChunk.fromJSON(object.applySnapshotChunk)
390
+ : undefined,
391
+ prepareProposal: isSet(object.prepareProposal)
392
+ ? RequestPrepareProposal.fromJSON(object.prepareProposal)
393
+ : undefined,
394
+ processProposal: isSet(object.processProposal)
395
+ ? RequestProcessProposal.fromJSON(object.processProposal)
396
+ : undefined,
397
+ };
398
+ },
399
+ toJSON(message) {
400
+ const obj = {};
401
+ message.echo !== undefined && (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined);
402
+ message.flush !== undefined && (obj.flush = message.flush ? RequestFlush.toJSON(message.flush) : undefined);
403
+ message.info !== undefined && (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined);
404
+ message.initChain !== undefined
405
+ && (obj.initChain = message.initChain ? RequestInitChain.toJSON(message.initChain) : undefined);
406
+ message.query !== undefined && (obj.query = message.query ? RequestQuery.toJSON(message.query) : undefined);
407
+ message.beginBlock !== undefined
408
+ && (obj.beginBlock = message.beginBlock ? RequestBeginBlock.toJSON(message.beginBlock) : undefined);
409
+ message.checkTx !== undefined
410
+ && (obj.checkTx = message.checkTx ? RequestCheckTx.toJSON(message.checkTx) : undefined);
411
+ message.deliverTx !== undefined
412
+ && (obj.deliverTx = message.deliverTx ? RequestDeliverTx.toJSON(message.deliverTx) : undefined);
413
+ message.endBlock !== undefined
414
+ && (obj.endBlock = message.endBlock ? RequestEndBlock.toJSON(message.endBlock) : undefined);
415
+ message.commit !== undefined && (obj.commit = message.commit ? RequestCommit.toJSON(message.commit) : undefined);
416
+ message.listSnapshots !== undefined
417
+ && (obj.listSnapshots = message.listSnapshots ? RequestListSnapshots.toJSON(message.listSnapshots) : undefined);
418
+ message.offerSnapshot !== undefined
419
+ && (obj.offerSnapshot = message.offerSnapshot ? RequestOfferSnapshot.toJSON(message.offerSnapshot) : undefined);
420
+ message.loadSnapshotChunk !== undefined && (obj.loadSnapshotChunk = message.loadSnapshotChunk
421
+ ? RequestLoadSnapshotChunk.toJSON(message.loadSnapshotChunk)
422
+ : undefined);
423
+ message.applySnapshotChunk !== undefined && (obj.applySnapshotChunk = message.applySnapshotChunk
424
+ ? RequestApplySnapshotChunk.toJSON(message.applySnapshotChunk)
425
+ : undefined);
426
+ message.prepareProposal !== undefined && (obj.prepareProposal = message.prepareProposal
427
+ ? RequestPrepareProposal.toJSON(message.prepareProposal)
428
+ : undefined);
429
+ message.processProposal !== undefined && (obj.processProposal = message.processProposal
430
+ ? RequestProcessProposal.toJSON(message.processProposal)
431
+ : undefined);
432
+ return obj;
433
+ },
434
+ fromPartial(object) {
435
+ const message = createBaseRequest();
436
+ message.echo = (object.echo !== undefined && object.echo !== null)
437
+ ? RequestEcho.fromPartial(object.echo)
438
+ : undefined;
439
+ message.flush = (object.flush !== undefined && object.flush !== null)
440
+ ? RequestFlush.fromPartial(object.flush)
441
+ : undefined;
442
+ message.info = (object.info !== undefined && object.info !== null)
443
+ ? RequestInfo.fromPartial(object.info)
444
+ : undefined;
445
+ message.initChain = (object.initChain !== undefined && object.initChain !== null)
446
+ ? RequestInitChain.fromPartial(object.initChain)
447
+ : undefined;
448
+ message.query = (object.query !== undefined && object.query !== null)
449
+ ? RequestQuery.fromPartial(object.query)
450
+ : undefined;
451
+ message.beginBlock = (object.beginBlock !== undefined && object.beginBlock !== null)
452
+ ? RequestBeginBlock.fromPartial(object.beginBlock)
453
+ : undefined;
454
+ message.checkTx = (object.checkTx !== undefined && object.checkTx !== null)
455
+ ? RequestCheckTx.fromPartial(object.checkTx)
456
+ : undefined;
457
+ message.deliverTx = (object.deliverTx !== undefined && object.deliverTx !== null)
458
+ ? RequestDeliverTx.fromPartial(object.deliverTx)
459
+ : undefined;
460
+ message.endBlock = (object.endBlock !== undefined && object.endBlock !== null)
461
+ ? RequestEndBlock.fromPartial(object.endBlock)
462
+ : undefined;
463
+ message.commit = (object.commit !== undefined && object.commit !== null)
464
+ ? RequestCommit.fromPartial(object.commit)
465
+ : undefined;
466
+ message.listSnapshots = (object.listSnapshots !== undefined && object.listSnapshots !== null)
467
+ ? RequestListSnapshots.fromPartial(object.listSnapshots)
468
+ : undefined;
469
+ message.offerSnapshot = (object.offerSnapshot !== undefined && object.offerSnapshot !== null)
470
+ ? RequestOfferSnapshot.fromPartial(object.offerSnapshot)
471
+ : undefined;
472
+ message.loadSnapshotChunk = (object.loadSnapshotChunk !== undefined && object.loadSnapshotChunk !== null)
473
+ ? RequestLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk)
474
+ : undefined;
475
+ message.applySnapshotChunk = (object.applySnapshotChunk !== undefined && object.applySnapshotChunk !== null)
476
+ ? RequestApplySnapshotChunk.fromPartial(object.applySnapshotChunk)
477
+ : undefined;
478
+ message.prepareProposal = (object.prepareProposal !== undefined && object.prepareProposal !== null)
479
+ ? RequestPrepareProposal.fromPartial(object.prepareProposal)
480
+ : undefined;
481
+ message.processProposal = (object.processProposal !== undefined && object.processProposal !== null)
482
+ ? RequestProcessProposal.fromPartial(object.processProposal)
483
+ : undefined;
484
+ return message;
485
+ },
486
+ };
487
+ function createBaseRequestEcho() {
488
+ return { message: "" };
489
+ }
490
+ export const RequestEcho = {
491
+ encode(message, writer = _m0.Writer.create()) {
492
+ if (message.message !== "") {
493
+ writer.uint32(10).string(message.message);
494
+ }
495
+ return writer;
496
+ },
497
+ decode(input, length) {
498
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
499
+ let end = length === undefined ? reader.len : reader.pos + length;
500
+ const message = createBaseRequestEcho();
501
+ while (reader.pos < end) {
502
+ const tag = reader.uint32();
503
+ switch (tag >>> 3) {
504
+ case 1:
505
+ message.message = reader.string();
506
+ break;
507
+ default:
508
+ reader.skipType(tag & 7);
509
+ break;
510
+ }
511
+ }
512
+ return message;
513
+ },
514
+ fromJSON(object) {
515
+ return { message: isSet(object.message) ? String(object.message) : "" };
516
+ },
517
+ toJSON(message) {
518
+ const obj = {};
519
+ message.message !== undefined && (obj.message = message.message);
520
+ return obj;
521
+ },
522
+ fromPartial(object) {
523
+ const message = createBaseRequestEcho();
524
+ message.message = object.message ?? "";
525
+ return message;
526
+ },
527
+ };
528
+ function createBaseRequestFlush() {
529
+ return {};
530
+ }
531
+ export const RequestFlush = {
532
+ encode(_, writer = _m0.Writer.create()) {
533
+ return writer;
534
+ },
535
+ decode(input, length) {
536
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
537
+ let end = length === undefined ? reader.len : reader.pos + length;
538
+ const message = createBaseRequestFlush();
539
+ while (reader.pos < end) {
540
+ const tag = reader.uint32();
541
+ switch (tag >>> 3) {
542
+ default:
543
+ reader.skipType(tag & 7);
544
+ break;
545
+ }
546
+ }
547
+ return message;
548
+ },
549
+ fromJSON(_) {
550
+ return {};
551
+ },
552
+ toJSON(_) {
553
+ const obj = {};
554
+ return obj;
555
+ },
556
+ fromPartial(_) {
557
+ const message = createBaseRequestFlush();
558
+ return message;
559
+ },
560
+ };
561
+ function createBaseRequestInfo() {
562
+ return { version: "", blockVersion: 0, p2pVersion: 0, abciVersion: "" };
563
+ }
564
+ export const RequestInfo = {
565
+ encode(message, writer = _m0.Writer.create()) {
566
+ if (message.version !== "") {
567
+ writer.uint32(10).string(message.version);
568
+ }
569
+ if (message.blockVersion !== 0) {
570
+ writer.uint32(16).uint64(message.blockVersion);
571
+ }
572
+ if (message.p2pVersion !== 0) {
573
+ writer.uint32(24).uint64(message.p2pVersion);
574
+ }
575
+ if (message.abciVersion !== "") {
576
+ writer.uint32(34).string(message.abciVersion);
577
+ }
578
+ return writer;
579
+ },
580
+ decode(input, length) {
581
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
582
+ let end = length === undefined ? reader.len : reader.pos + length;
583
+ const message = createBaseRequestInfo();
584
+ while (reader.pos < end) {
585
+ const tag = reader.uint32();
586
+ switch (tag >>> 3) {
587
+ case 1:
588
+ message.version = reader.string();
589
+ break;
590
+ case 2:
591
+ message.blockVersion = longToNumber(reader.uint64());
592
+ break;
593
+ case 3:
594
+ message.p2pVersion = longToNumber(reader.uint64());
595
+ break;
596
+ case 4:
597
+ message.abciVersion = reader.string();
598
+ break;
599
+ default:
600
+ reader.skipType(tag & 7);
601
+ break;
602
+ }
603
+ }
604
+ return message;
605
+ },
606
+ fromJSON(object) {
607
+ return {
608
+ version: isSet(object.version) ? String(object.version) : "",
609
+ blockVersion: isSet(object.blockVersion) ? Number(object.blockVersion) : 0,
610
+ p2pVersion: isSet(object.p2pVersion) ? Number(object.p2pVersion) : 0,
611
+ abciVersion: isSet(object.abciVersion) ? String(object.abciVersion) : "",
612
+ };
613
+ },
614
+ toJSON(message) {
615
+ const obj = {};
616
+ message.version !== undefined && (obj.version = message.version);
617
+ message.blockVersion !== undefined && (obj.blockVersion = Math.round(message.blockVersion));
618
+ message.p2pVersion !== undefined && (obj.p2pVersion = Math.round(message.p2pVersion));
619
+ message.abciVersion !== undefined && (obj.abciVersion = message.abciVersion);
620
+ return obj;
621
+ },
622
+ fromPartial(object) {
623
+ const message = createBaseRequestInfo();
624
+ message.version = object.version ?? "";
625
+ message.blockVersion = object.blockVersion ?? 0;
626
+ message.p2pVersion = object.p2pVersion ?? 0;
627
+ message.abciVersion = object.abciVersion ?? "";
628
+ return message;
629
+ },
630
+ };
631
+ function createBaseRequestInitChain() {
632
+ return {
633
+ time: undefined,
634
+ chainId: "",
635
+ consensusParams: undefined,
636
+ validators: [],
637
+ appStateBytes: new Uint8Array(),
638
+ initialHeight: 0,
639
+ };
640
+ }
641
+ export const RequestInitChain = {
642
+ encode(message, writer = _m0.Writer.create()) {
643
+ if (message.time !== undefined) {
644
+ Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).ldelim();
645
+ }
646
+ if (message.chainId !== "") {
647
+ writer.uint32(18).string(message.chainId);
648
+ }
649
+ if (message.consensusParams !== undefined) {
650
+ ConsensusParams.encode(message.consensusParams, writer.uint32(26).fork()).ldelim();
651
+ }
652
+ for (const v of message.validators) {
653
+ ValidatorUpdate.encode(v, writer.uint32(34).fork()).ldelim();
654
+ }
655
+ if (message.appStateBytes.length !== 0) {
656
+ writer.uint32(42).bytes(message.appStateBytes);
657
+ }
658
+ if (message.initialHeight !== 0) {
659
+ writer.uint32(48).int64(message.initialHeight);
660
+ }
661
+ return writer;
662
+ },
663
+ decode(input, length) {
664
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
665
+ let end = length === undefined ? reader.len : reader.pos + length;
666
+ const message = createBaseRequestInitChain();
667
+ while (reader.pos < end) {
668
+ const tag = reader.uint32();
669
+ switch (tag >>> 3) {
670
+ case 1:
671
+ message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
672
+ break;
673
+ case 2:
674
+ message.chainId = reader.string();
675
+ break;
676
+ case 3:
677
+ message.consensusParams = ConsensusParams.decode(reader, reader.uint32());
678
+ break;
679
+ case 4:
680
+ message.validators.push(ValidatorUpdate.decode(reader, reader.uint32()));
681
+ break;
682
+ case 5:
683
+ message.appStateBytes = reader.bytes();
684
+ break;
685
+ case 6:
686
+ message.initialHeight = longToNumber(reader.int64());
687
+ break;
688
+ default:
689
+ reader.skipType(tag & 7);
690
+ break;
691
+ }
692
+ }
693
+ return message;
694
+ },
695
+ fromJSON(object) {
696
+ return {
697
+ time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,
698
+ chainId: isSet(object.chainId) ? String(object.chainId) : "",
699
+ consensusParams: isSet(object.consensusParams) ? ConsensusParams.fromJSON(object.consensusParams) : undefined,
700
+ validators: Array.isArray(object?.validators)
701
+ ? object.validators.map((e) => ValidatorUpdate.fromJSON(e))
702
+ : [],
703
+ appStateBytes: isSet(object.appStateBytes) ? bytesFromBase64(object.appStateBytes) : new Uint8Array(),
704
+ initialHeight: isSet(object.initialHeight) ? Number(object.initialHeight) : 0,
705
+ };
706
+ },
707
+ toJSON(message) {
708
+ const obj = {};
709
+ message.time !== undefined && (obj.time = message.time.toISOString());
710
+ message.chainId !== undefined && (obj.chainId = message.chainId);
711
+ message.consensusParams !== undefined
712
+ && (obj.consensusParams = message.consensusParams ? ConsensusParams.toJSON(message.consensusParams) : undefined);
713
+ if (message.validators) {
714
+ obj.validators = message.validators.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined);
715
+ }
716
+ else {
717
+ obj.validators = [];
718
+ }
719
+ message.appStateBytes !== undefined
720
+ && (obj.appStateBytes = base64FromBytes(message.appStateBytes !== undefined ? message.appStateBytes : new Uint8Array()));
721
+ message.initialHeight !== undefined && (obj.initialHeight = Math.round(message.initialHeight));
722
+ return obj;
723
+ },
724
+ fromPartial(object) {
725
+ const message = createBaseRequestInitChain();
726
+ message.time = object.time ?? undefined;
727
+ message.chainId = object.chainId ?? "";
728
+ message.consensusParams = (object.consensusParams !== undefined && object.consensusParams !== null)
729
+ ? ConsensusParams.fromPartial(object.consensusParams)
730
+ : undefined;
731
+ message.validators = object.validators?.map((e) => ValidatorUpdate.fromPartial(e)) || [];
732
+ message.appStateBytes = object.appStateBytes ?? new Uint8Array();
733
+ message.initialHeight = object.initialHeight ?? 0;
734
+ return message;
735
+ },
736
+ };
737
+ function createBaseRequestQuery() {
738
+ return { data: new Uint8Array(), path: "", height: 0, prove: false };
739
+ }
740
+ export const RequestQuery = {
741
+ encode(message, writer = _m0.Writer.create()) {
742
+ if (message.data.length !== 0) {
743
+ writer.uint32(10).bytes(message.data);
744
+ }
745
+ if (message.path !== "") {
746
+ writer.uint32(18).string(message.path);
747
+ }
748
+ if (message.height !== 0) {
749
+ writer.uint32(24).int64(message.height);
750
+ }
751
+ if (message.prove === true) {
752
+ writer.uint32(32).bool(message.prove);
753
+ }
754
+ return writer;
755
+ },
756
+ decode(input, length) {
757
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
758
+ let end = length === undefined ? reader.len : reader.pos + length;
759
+ const message = createBaseRequestQuery();
760
+ while (reader.pos < end) {
761
+ const tag = reader.uint32();
762
+ switch (tag >>> 3) {
763
+ case 1:
764
+ message.data = reader.bytes();
765
+ break;
766
+ case 2:
767
+ message.path = reader.string();
768
+ break;
769
+ case 3:
770
+ message.height = longToNumber(reader.int64());
771
+ break;
772
+ case 4:
773
+ message.prove = reader.bool();
774
+ break;
775
+ default:
776
+ reader.skipType(tag & 7);
777
+ break;
778
+ }
779
+ }
780
+ return message;
781
+ },
782
+ fromJSON(object) {
783
+ return {
784
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(),
785
+ path: isSet(object.path) ? String(object.path) : "",
786
+ height: isSet(object.height) ? Number(object.height) : 0,
787
+ prove: isSet(object.prove) ? Boolean(object.prove) : false,
788
+ };
789
+ },
790
+ toJSON(message) {
791
+ const obj = {};
792
+ message.data !== undefined
793
+ && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
794
+ message.path !== undefined && (obj.path = message.path);
795
+ message.height !== undefined && (obj.height = Math.round(message.height));
796
+ message.prove !== undefined && (obj.prove = message.prove);
797
+ return obj;
798
+ },
799
+ fromPartial(object) {
800
+ const message = createBaseRequestQuery();
801
+ message.data = object.data ?? new Uint8Array();
802
+ message.path = object.path ?? "";
803
+ message.height = object.height ?? 0;
804
+ message.prove = object.prove ?? false;
805
+ return message;
806
+ },
807
+ };
808
+ function createBaseRequestBeginBlock() {
809
+ return { hash: new Uint8Array(), header: undefined, lastCommitInfo: undefined, byzantineValidators: [] };
810
+ }
811
+ export const RequestBeginBlock = {
812
+ encode(message, writer = _m0.Writer.create()) {
813
+ if (message.hash.length !== 0) {
814
+ writer.uint32(10).bytes(message.hash);
815
+ }
816
+ if (message.header !== undefined) {
817
+ Header.encode(message.header, writer.uint32(18).fork()).ldelim();
818
+ }
819
+ if (message.lastCommitInfo !== undefined) {
820
+ CommitInfo.encode(message.lastCommitInfo, writer.uint32(26).fork()).ldelim();
821
+ }
822
+ for (const v of message.byzantineValidators) {
823
+ Misbehavior.encode(v, writer.uint32(34).fork()).ldelim();
824
+ }
825
+ return writer;
826
+ },
827
+ decode(input, length) {
828
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
829
+ let end = length === undefined ? reader.len : reader.pos + length;
830
+ const message = createBaseRequestBeginBlock();
831
+ while (reader.pos < end) {
832
+ const tag = reader.uint32();
833
+ switch (tag >>> 3) {
834
+ case 1:
835
+ message.hash = reader.bytes();
836
+ break;
837
+ case 2:
838
+ message.header = Header.decode(reader, reader.uint32());
839
+ break;
840
+ case 3:
841
+ message.lastCommitInfo = CommitInfo.decode(reader, reader.uint32());
842
+ break;
843
+ case 4:
844
+ message.byzantineValidators.push(Misbehavior.decode(reader, reader.uint32()));
845
+ break;
846
+ default:
847
+ reader.skipType(tag & 7);
848
+ break;
849
+ }
850
+ }
851
+ return message;
852
+ },
853
+ fromJSON(object) {
854
+ return {
855
+ hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(),
856
+ header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,
857
+ lastCommitInfo: isSet(object.lastCommitInfo) ? CommitInfo.fromJSON(object.lastCommitInfo) : undefined,
858
+ byzantineValidators: Array.isArray(object?.byzantineValidators)
859
+ ? object.byzantineValidators.map((e) => Misbehavior.fromJSON(e))
860
+ : [],
861
+ };
862
+ },
863
+ toJSON(message) {
864
+ const obj = {};
865
+ message.hash !== undefined
866
+ && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
867
+ message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined);
868
+ message.lastCommitInfo !== undefined
869
+ && (obj.lastCommitInfo = message.lastCommitInfo ? CommitInfo.toJSON(message.lastCommitInfo) : undefined);
870
+ if (message.byzantineValidators) {
871
+ obj.byzantineValidators = message.byzantineValidators.map((e) => e ? Misbehavior.toJSON(e) : undefined);
872
+ }
873
+ else {
874
+ obj.byzantineValidators = [];
875
+ }
876
+ return obj;
877
+ },
878
+ fromPartial(object) {
879
+ const message = createBaseRequestBeginBlock();
880
+ message.hash = object.hash ?? new Uint8Array();
881
+ message.header = (object.header !== undefined && object.header !== null)
882
+ ? Header.fromPartial(object.header)
883
+ : undefined;
884
+ message.lastCommitInfo = (object.lastCommitInfo !== undefined && object.lastCommitInfo !== null)
885
+ ? CommitInfo.fromPartial(object.lastCommitInfo)
886
+ : undefined;
887
+ message.byzantineValidators = object.byzantineValidators?.map((e) => Misbehavior.fromPartial(e)) || [];
888
+ return message;
889
+ },
890
+ };
891
+ function createBaseRequestCheckTx() {
892
+ return { tx: new Uint8Array(), type: 0 };
893
+ }
894
+ export const RequestCheckTx = {
895
+ encode(message, writer = _m0.Writer.create()) {
896
+ if (message.tx.length !== 0) {
897
+ writer.uint32(10).bytes(message.tx);
898
+ }
899
+ if (message.type !== 0) {
900
+ writer.uint32(16).int32(message.type);
901
+ }
902
+ return writer;
903
+ },
904
+ decode(input, length) {
905
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
906
+ let end = length === undefined ? reader.len : reader.pos + length;
907
+ const message = createBaseRequestCheckTx();
908
+ while (reader.pos < end) {
909
+ const tag = reader.uint32();
910
+ switch (tag >>> 3) {
911
+ case 1:
912
+ message.tx = reader.bytes();
913
+ break;
914
+ case 2:
915
+ message.type = reader.int32();
916
+ break;
917
+ default:
918
+ reader.skipType(tag & 7);
919
+ break;
920
+ }
921
+ }
922
+ return message;
923
+ },
924
+ fromJSON(object) {
925
+ return {
926
+ tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
927
+ type: isSet(object.type) ? checkTxTypeFromJSON(object.type) : 0,
928
+ };
929
+ },
930
+ toJSON(message) {
931
+ const obj = {};
932
+ message.tx !== undefined && (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array()));
933
+ message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type));
934
+ return obj;
935
+ },
936
+ fromPartial(object) {
937
+ const message = createBaseRequestCheckTx();
938
+ message.tx = object.tx ?? new Uint8Array();
939
+ message.type = object.type ?? 0;
940
+ return message;
941
+ },
942
+ };
943
+ function createBaseRequestDeliverTx() {
944
+ return { tx: new Uint8Array() };
945
+ }
946
+ export const RequestDeliverTx = {
947
+ encode(message, writer = _m0.Writer.create()) {
948
+ if (message.tx.length !== 0) {
949
+ writer.uint32(10).bytes(message.tx);
950
+ }
951
+ return writer;
952
+ },
953
+ decode(input, length) {
954
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
955
+ let end = length === undefined ? reader.len : reader.pos + length;
956
+ const message = createBaseRequestDeliverTx();
957
+ while (reader.pos < end) {
958
+ const tag = reader.uint32();
959
+ switch (tag >>> 3) {
960
+ case 1:
961
+ message.tx = reader.bytes();
962
+ break;
963
+ default:
964
+ reader.skipType(tag & 7);
965
+ break;
966
+ }
967
+ }
968
+ return message;
969
+ },
970
+ fromJSON(object) {
971
+ return { tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array() };
972
+ },
973
+ toJSON(message) {
974
+ const obj = {};
975
+ message.tx !== undefined && (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array()));
976
+ return obj;
977
+ },
978
+ fromPartial(object) {
979
+ const message = createBaseRequestDeliverTx();
980
+ message.tx = object.tx ?? new Uint8Array();
981
+ return message;
982
+ },
983
+ };
984
+ function createBaseRequestEndBlock() {
985
+ return { height: 0 };
986
+ }
987
+ export const RequestEndBlock = {
988
+ encode(message, writer = _m0.Writer.create()) {
989
+ if (message.height !== 0) {
990
+ writer.uint32(8).int64(message.height);
991
+ }
992
+ return writer;
993
+ },
994
+ decode(input, length) {
995
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
996
+ let end = length === undefined ? reader.len : reader.pos + length;
997
+ const message = createBaseRequestEndBlock();
998
+ while (reader.pos < end) {
999
+ const tag = reader.uint32();
1000
+ switch (tag >>> 3) {
1001
+ case 1:
1002
+ message.height = longToNumber(reader.int64());
1003
+ break;
1004
+ default:
1005
+ reader.skipType(tag & 7);
1006
+ break;
1007
+ }
1008
+ }
1009
+ return message;
1010
+ },
1011
+ fromJSON(object) {
1012
+ return { height: isSet(object.height) ? Number(object.height) : 0 };
1013
+ },
1014
+ toJSON(message) {
1015
+ const obj = {};
1016
+ message.height !== undefined && (obj.height = Math.round(message.height));
1017
+ return obj;
1018
+ },
1019
+ fromPartial(object) {
1020
+ const message = createBaseRequestEndBlock();
1021
+ message.height = object.height ?? 0;
1022
+ return message;
1023
+ },
1024
+ };
1025
+ function createBaseRequestCommit() {
1026
+ return {};
1027
+ }
1028
+ export const RequestCommit = {
1029
+ encode(_, writer = _m0.Writer.create()) {
1030
+ return writer;
1031
+ },
1032
+ decode(input, length) {
1033
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1034
+ let end = length === undefined ? reader.len : reader.pos + length;
1035
+ const message = createBaseRequestCommit();
1036
+ while (reader.pos < end) {
1037
+ const tag = reader.uint32();
1038
+ switch (tag >>> 3) {
1039
+ default:
1040
+ reader.skipType(tag & 7);
1041
+ break;
1042
+ }
1043
+ }
1044
+ return message;
1045
+ },
1046
+ fromJSON(_) {
1047
+ return {};
1048
+ },
1049
+ toJSON(_) {
1050
+ const obj = {};
1051
+ return obj;
1052
+ },
1053
+ fromPartial(_) {
1054
+ const message = createBaseRequestCommit();
1055
+ return message;
1056
+ },
1057
+ };
1058
+ function createBaseRequestListSnapshots() {
1059
+ return {};
1060
+ }
1061
+ export const RequestListSnapshots = {
1062
+ encode(_, writer = _m0.Writer.create()) {
1063
+ return writer;
1064
+ },
1065
+ decode(input, length) {
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 = createBaseRequestListSnapshots();
1069
+ while (reader.pos < end) {
1070
+ const tag = reader.uint32();
1071
+ switch (tag >>> 3) {
1072
+ default:
1073
+ reader.skipType(tag & 7);
1074
+ break;
1075
+ }
1076
+ }
1077
+ return message;
1078
+ },
1079
+ fromJSON(_) {
1080
+ return {};
1081
+ },
1082
+ toJSON(_) {
1083
+ const obj = {};
1084
+ return obj;
1085
+ },
1086
+ fromPartial(_) {
1087
+ const message = createBaseRequestListSnapshots();
1088
+ return message;
1089
+ },
1090
+ };
1091
+ function createBaseRequestOfferSnapshot() {
1092
+ return { snapshot: undefined, appHash: new Uint8Array() };
1093
+ }
1094
+ export const RequestOfferSnapshot = {
1095
+ encode(message, writer = _m0.Writer.create()) {
1096
+ if (message.snapshot !== undefined) {
1097
+ Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim();
1098
+ }
1099
+ if (message.appHash.length !== 0) {
1100
+ writer.uint32(18).bytes(message.appHash);
1101
+ }
1102
+ return writer;
1103
+ },
1104
+ decode(input, length) {
1105
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1106
+ let end = length === undefined ? reader.len : reader.pos + length;
1107
+ const message = createBaseRequestOfferSnapshot();
1108
+ while (reader.pos < end) {
1109
+ const tag = reader.uint32();
1110
+ switch (tag >>> 3) {
1111
+ case 1:
1112
+ message.snapshot = Snapshot.decode(reader, reader.uint32());
1113
+ break;
1114
+ case 2:
1115
+ message.appHash = reader.bytes();
1116
+ break;
1117
+ default:
1118
+ reader.skipType(tag & 7);
1119
+ break;
1120
+ }
1121
+ }
1122
+ return message;
1123
+ },
1124
+ fromJSON(object) {
1125
+ return {
1126
+ snapshot: isSet(object.snapshot) ? Snapshot.fromJSON(object.snapshot) : undefined,
1127
+ appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array(),
1128
+ };
1129
+ },
1130
+ toJSON(message) {
1131
+ const obj = {};
1132
+ message.snapshot !== undefined && (obj.snapshot = message.snapshot ? Snapshot.toJSON(message.snapshot) : undefined);
1133
+ message.appHash !== undefined
1134
+ && (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array()));
1135
+ return obj;
1136
+ },
1137
+ fromPartial(object) {
1138
+ const message = createBaseRequestOfferSnapshot();
1139
+ message.snapshot = (object.snapshot !== undefined && object.snapshot !== null)
1140
+ ? Snapshot.fromPartial(object.snapshot)
1141
+ : undefined;
1142
+ message.appHash = object.appHash ?? new Uint8Array();
1143
+ return message;
1144
+ },
1145
+ };
1146
+ function createBaseRequestLoadSnapshotChunk() {
1147
+ return { height: 0, format: 0, chunk: 0 };
1148
+ }
1149
+ export const RequestLoadSnapshotChunk = {
1150
+ encode(message, writer = _m0.Writer.create()) {
1151
+ if (message.height !== 0) {
1152
+ writer.uint32(8).uint64(message.height);
1153
+ }
1154
+ if (message.format !== 0) {
1155
+ writer.uint32(16).uint32(message.format);
1156
+ }
1157
+ if (message.chunk !== 0) {
1158
+ writer.uint32(24).uint32(message.chunk);
1159
+ }
1160
+ return writer;
1161
+ },
1162
+ decode(input, length) {
1163
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1164
+ let end = length === undefined ? reader.len : reader.pos + length;
1165
+ const message = createBaseRequestLoadSnapshotChunk();
1166
+ while (reader.pos < end) {
1167
+ const tag = reader.uint32();
1168
+ switch (tag >>> 3) {
1169
+ case 1:
1170
+ message.height = longToNumber(reader.uint64());
1171
+ break;
1172
+ case 2:
1173
+ message.format = reader.uint32();
1174
+ break;
1175
+ case 3:
1176
+ message.chunk = reader.uint32();
1177
+ break;
1178
+ default:
1179
+ reader.skipType(tag & 7);
1180
+ break;
1181
+ }
1182
+ }
1183
+ return message;
1184
+ },
1185
+ fromJSON(object) {
1186
+ return {
1187
+ height: isSet(object.height) ? Number(object.height) : 0,
1188
+ format: isSet(object.format) ? Number(object.format) : 0,
1189
+ chunk: isSet(object.chunk) ? Number(object.chunk) : 0,
1190
+ };
1191
+ },
1192
+ toJSON(message) {
1193
+ const obj = {};
1194
+ message.height !== undefined && (obj.height = Math.round(message.height));
1195
+ message.format !== undefined && (obj.format = Math.round(message.format));
1196
+ message.chunk !== undefined && (obj.chunk = Math.round(message.chunk));
1197
+ return obj;
1198
+ },
1199
+ fromPartial(object) {
1200
+ const message = createBaseRequestLoadSnapshotChunk();
1201
+ message.height = object.height ?? 0;
1202
+ message.format = object.format ?? 0;
1203
+ message.chunk = object.chunk ?? 0;
1204
+ return message;
1205
+ },
1206
+ };
1207
+ function createBaseRequestApplySnapshotChunk() {
1208
+ return { index: 0, chunk: new Uint8Array(), sender: "" };
1209
+ }
1210
+ export const RequestApplySnapshotChunk = {
1211
+ encode(message, writer = _m0.Writer.create()) {
1212
+ if (message.index !== 0) {
1213
+ writer.uint32(8).uint32(message.index);
1214
+ }
1215
+ if (message.chunk.length !== 0) {
1216
+ writer.uint32(18).bytes(message.chunk);
1217
+ }
1218
+ if (message.sender !== "") {
1219
+ writer.uint32(26).string(message.sender);
1220
+ }
1221
+ return writer;
1222
+ },
1223
+ decode(input, length) {
1224
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1225
+ let end = length === undefined ? reader.len : reader.pos + length;
1226
+ const message = createBaseRequestApplySnapshotChunk();
1227
+ while (reader.pos < end) {
1228
+ const tag = reader.uint32();
1229
+ switch (tag >>> 3) {
1230
+ case 1:
1231
+ message.index = reader.uint32();
1232
+ break;
1233
+ case 2:
1234
+ message.chunk = reader.bytes();
1235
+ break;
1236
+ case 3:
1237
+ message.sender = reader.string();
1238
+ break;
1239
+ default:
1240
+ reader.skipType(tag & 7);
1241
+ break;
1242
+ }
1243
+ }
1244
+ return message;
1245
+ },
1246
+ fromJSON(object) {
1247
+ return {
1248
+ index: isSet(object.index) ? Number(object.index) : 0,
1249
+ chunk: isSet(object.chunk) ? bytesFromBase64(object.chunk) : new Uint8Array(),
1250
+ sender: isSet(object.sender) ? String(object.sender) : "",
1251
+ };
1252
+ },
1253
+ toJSON(message) {
1254
+ const obj = {};
1255
+ message.index !== undefined && (obj.index = Math.round(message.index));
1256
+ message.chunk !== undefined
1257
+ && (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array()));
1258
+ message.sender !== undefined && (obj.sender = message.sender);
1259
+ return obj;
1260
+ },
1261
+ fromPartial(object) {
1262
+ const message = createBaseRequestApplySnapshotChunk();
1263
+ message.index = object.index ?? 0;
1264
+ message.chunk = object.chunk ?? new Uint8Array();
1265
+ message.sender = object.sender ?? "";
1266
+ return message;
1267
+ },
1268
+ };
1269
+ function createBaseRequestPrepareProposal() {
1270
+ return {
1271
+ maxTxBytes: 0,
1272
+ txs: [],
1273
+ localLastCommit: undefined,
1274
+ misbehavior: [],
1275
+ height: 0,
1276
+ time: undefined,
1277
+ nextValidatorsHash: new Uint8Array(),
1278
+ proposerAddress: new Uint8Array(),
1279
+ };
1280
+ }
1281
+ export const RequestPrepareProposal = {
1282
+ encode(message, writer = _m0.Writer.create()) {
1283
+ if (message.maxTxBytes !== 0) {
1284
+ writer.uint32(8).int64(message.maxTxBytes);
1285
+ }
1286
+ for (const v of message.txs) {
1287
+ writer.uint32(18).bytes(v);
1288
+ }
1289
+ if (message.localLastCommit !== undefined) {
1290
+ ExtendedCommitInfo.encode(message.localLastCommit, writer.uint32(26).fork()).ldelim();
1291
+ }
1292
+ for (const v of message.misbehavior) {
1293
+ Misbehavior.encode(v, writer.uint32(34).fork()).ldelim();
1294
+ }
1295
+ if (message.height !== 0) {
1296
+ writer.uint32(40).int64(message.height);
1297
+ }
1298
+ if (message.time !== undefined) {
1299
+ Timestamp.encode(toTimestamp(message.time), writer.uint32(50).fork()).ldelim();
1300
+ }
1301
+ if (message.nextValidatorsHash.length !== 0) {
1302
+ writer.uint32(58).bytes(message.nextValidatorsHash);
1303
+ }
1304
+ if (message.proposerAddress.length !== 0) {
1305
+ writer.uint32(66).bytes(message.proposerAddress);
1306
+ }
1307
+ return writer;
1308
+ },
1309
+ decode(input, length) {
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 = createBaseRequestPrepareProposal();
1313
+ while (reader.pos < end) {
1314
+ const tag = reader.uint32();
1315
+ switch (tag >>> 3) {
1316
+ case 1:
1317
+ message.maxTxBytes = longToNumber(reader.int64());
1318
+ break;
1319
+ case 2:
1320
+ message.txs.push(reader.bytes());
1321
+ break;
1322
+ case 3:
1323
+ message.localLastCommit = ExtendedCommitInfo.decode(reader, reader.uint32());
1324
+ break;
1325
+ case 4:
1326
+ message.misbehavior.push(Misbehavior.decode(reader, reader.uint32()));
1327
+ break;
1328
+ case 5:
1329
+ message.height = longToNumber(reader.int64());
1330
+ break;
1331
+ case 6:
1332
+ message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1333
+ break;
1334
+ case 7:
1335
+ message.nextValidatorsHash = reader.bytes();
1336
+ break;
1337
+ case 8:
1338
+ message.proposerAddress = reader.bytes();
1339
+ break;
1340
+ default:
1341
+ reader.skipType(tag & 7);
1342
+ break;
1343
+ }
1344
+ }
1345
+ return message;
1346
+ },
1347
+ fromJSON(object) {
1348
+ return {
1349
+ maxTxBytes: isSet(object.maxTxBytes) ? Number(object.maxTxBytes) : 0,
1350
+ txs: Array.isArray(object?.txs) ? object.txs.map((e) => bytesFromBase64(e)) : [],
1351
+ localLastCommit: isSet(object.localLastCommit) ? ExtendedCommitInfo.fromJSON(object.localLastCommit) : undefined,
1352
+ misbehavior: Array.isArray(object?.misbehavior)
1353
+ ? object.misbehavior.map((e) => Misbehavior.fromJSON(e))
1354
+ : [],
1355
+ height: isSet(object.height) ? Number(object.height) : 0,
1356
+ time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,
1357
+ nextValidatorsHash: isSet(object.nextValidatorsHash)
1358
+ ? bytesFromBase64(object.nextValidatorsHash)
1359
+ : new Uint8Array(),
1360
+ proposerAddress: isSet(object.proposerAddress) ? bytesFromBase64(object.proposerAddress) : new Uint8Array(),
1361
+ };
1362
+ },
1363
+ toJSON(message) {
1364
+ const obj = {};
1365
+ message.maxTxBytes !== undefined && (obj.maxTxBytes = Math.round(message.maxTxBytes));
1366
+ if (message.txs) {
1367
+ obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
1368
+ }
1369
+ else {
1370
+ obj.txs = [];
1371
+ }
1372
+ message.localLastCommit !== undefined
1373
+ && (obj.localLastCommit = message.localLastCommit
1374
+ ? ExtendedCommitInfo.toJSON(message.localLastCommit)
1375
+ : undefined);
1376
+ if (message.misbehavior) {
1377
+ obj.misbehavior = message.misbehavior.map((e) => e ? Misbehavior.toJSON(e) : undefined);
1378
+ }
1379
+ else {
1380
+ obj.misbehavior = [];
1381
+ }
1382
+ message.height !== undefined && (obj.height = Math.round(message.height));
1383
+ message.time !== undefined && (obj.time = message.time.toISOString());
1384
+ message.nextValidatorsHash !== undefined
1385
+ && (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined ? message.nextValidatorsHash : new Uint8Array()));
1386
+ message.proposerAddress !== undefined
1387
+ && (obj.proposerAddress = base64FromBytes(message.proposerAddress !== undefined ? message.proposerAddress : new Uint8Array()));
1388
+ return obj;
1389
+ },
1390
+ fromPartial(object) {
1391
+ const message = createBaseRequestPrepareProposal();
1392
+ message.maxTxBytes = object.maxTxBytes ?? 0;
1393
+ message.txs = object.txs?.map((e) => e) || [];
1394
+ message.localLastCommit = (object.localLastCommit !== undefined && object.localLastCommit !== null)
1395
+ ? ExtendedCommitInfo.fromPartial(object.localLastCommit)
1396
+ : undefined;
1397
+ message.misbehavior = object.misbehavior?.map((e) => Misbehavior.fromPartial(e)) || [];
1398
+ message.height = object.height ?? 0;
1399
+ message.time = object.time ?? undefined;
1400
+ message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array();
1401
+ message.proposerAddress = object.proposerAddress ?? new Uint8Array();
1402
+ return message;
1403
+ },
1404
+ };
1405
+ function createBaseRequestProcessProposal() {
1406
+ return {
1407
+ txs: [],
1408
+ proposedLastCommit: undefined,
1409
+ misbehavior: [],
1410
+ hash: new Uint8Array(),
1411
+ height: 0,
1412
+ time: undefined,
1413
+ nextValidatorsHash: new Uint8Array(),
1414
+ proposerAddress: new Uint8Array(),
1415
+ };
1416
+ }
1417
+ export const RequestProcessProposal = {
1418
+ encode(message, writer = _m0.Writer.create()) {
1419
+ for (const v of message.txs) {
1420
+ writer.uint32(10).bytes(v);
1421
+ }
1422
+ if (message.proposedLastCommit !== undefined) {
1423
+ CommitInfo.encode(message.proposedLastCommit, writer.uint32(18).fork()).ldelim();
1424
+ }
1425
+ for (const v of message.misbehavior) {
1426
+ Misbehavior.encode(v, writer.uint32(26).fork()).ldelim();
1427
+ }
1428
+ if (message.hash.length !== 0) {
1429
+ writer.uint32(34).bytes(message.hash);
1430
+ }
1431
+ if (message.height !== 0) {
1432
+ writer.uint32(40).int64(message.height);
1433
+ }
1434
+ if (message.time !== undefined) {
1435
+ Timestamp.encode(toTimestamp(message.time), writer.uint32(50).fork()).ldelim();
1436
+ }
1437
+ if (message.nextValidatorsHash.length !== 0) {
1438
+ writer.uint32(58).bytes(message.nextValidatorsHash);
1439
+ }
1440
+ if (message.proposerAddress.length !== 0) {
1441
+ writer.uint32(66).bytes(message.proposerAddress);
1442
+ }
1443
+ return writer;
1444
+ },
1445
+ decode(input, length) {
1446
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1447
+ let end = length === undefined ? reader.len : reader.pos + length;
1448
+ const message = createBaseRequestProcessProposal();
1449
+ while (reader.pos < end) {
1450
+ const tag = reader.uint32();
1451
+ switch (tag >>> 3) {
1452
+ case 1:
1453
+ message.txs.push(reader.bytes());
1454
+ break;
1455
+ case 2:
1456
+ message.proposedLastCommit = CommitInfo.decode(reader, reader.uint32());
1457
+ break;
1458
+ case 3:
1459
+ message.misbehavior.push(Misbehavior.decode(reader, reader.uint32()));
1460
+ break;
1461
+ case 4:
1462
+ message.hash = reader.bytes();
1463
+ break;
1464
+ case 5:
1465
+ message.height = longToNumber(reader.int64());
1466
+ break;
1467
+ case 6:
1468
+ message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1469
+ break;
1470
+ case 7:
1471
+ message.nextValidatorsHash = reader.bytes();
1472
+ break;
1473
+ case 8:
1474
+ message.proposerAddress = reader.bytes();
1475
+ break;
1476
+ default:
1477
+ reader.skipType(tag & 7);
1478
+ break;
1479
+ }
1480
+ }
1481
+ return message;
1482
+ },
1483
+ fromJSON(object) {
1484
+ return {
1485
+ txs: Array.isArray(object?.txs) ? object.txs.map((e) => bytesFromBase64(e)) : [],
1486
+ proposedLastCommit: isSet(object.proposedLastCommit) ? CommitInfo.fromJSON(object.proposedLastCommit) : undefined,
1487
+ misbehavior: Array.isArray(object?.misbehavior)
1488
+ ? object.misbehavior.map((e) => Misbehavior.fromJSON(e))
1489
+ : [],
1490
+ hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(),
1491
+ height: isSet(object.height) ? Number(object.height) : 0,
1492
+ time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,
1493
+ nextValidatorsHash: isSet(object.nextValidatorsHash)
1494
+ ? bytesFromBase64(object.nextValidatorsHash)
1495
+ : new Uint8Array(),
1496
+ proposerAddress: isSet(object.proposerAddress) ? bytesFromBase64(object.proposerAddress) : new Uint8Array(),
1497
+ };
1498
+ },
1499
+ toJSON(message) {
1500
+ const obj = {};
1501
+ if (message.txs) {
1502
+ obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
1503
+ }
1504
+ else {
1505
+ obj.txs = [];
1506
+ }
1507
+ message.proposedLastCommit !== undefined && (obj.proposedLastCommit = message.proposedLastCommit
1508
+ ? CommitInfo.toJSON(message.proposedLastCommit)
1509
+ : undefined);
1510
+ if (message.misbehavior) {
1511
+ obj.misbehavior = message.misbehavior.map((e) => e ? Misbehavior.toJSON(e) : undefined);
1512
+ }
1513
+ else {
1514
+ obj.misbehavior = [];
1515
+ }
1516
+ message.hash !== undefined
1517
+ && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
1518
+ message.height !== undefined && (obj.height = Math.round(message.height));
1519
+ message.time !== undefined && (obj.time = message.time.toISOString());
1520
+ message.nextValidatorsHash !== undefined
1521
+ && (obj.nextValidatorsHash = base64FromBytes(message.nextValidatorsHash !== undefined ? message.nextValidatorsHash : new Uint8Array()));
1522
+ message.proposerAddress !== undefined
1523
+ && (obj.proposerAddress = base64FromBytes(message.proposerAddress !== undefined ? message.proposerAddress : new Uint8Array()));
1524
+ return obj;
1525
+ },
1526
+ fromPartial(object) {
1527
+ const message = createBaseRequestProcessProposal();
1528
+ message.txs = object.txs?.map((e) => e) || [];
1529
+ message.proposedLastCommit = (object.proposedLastCommit !== undefined && object.proposedLastCommit !== null)
1530
+ ? CommitInfo.fromPartial(object.proposedLastCommit)
1531
+ : undefined;
1532
+ message.misbehavior = object.misbehavior?.map((e) => Misbehavior.fromPartial(e)) || [];
1533
+ message.hash = object.hash ?? new Uint8Array();
1534
+ message.height = object.height ?? 0;
1535
+ message.time = object.time ?? undefined;
1536
+ message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array();
1537
+ message.proposerAddress = object.proposerAddress ?? new Uint8Array();
1538
+ return message;
1539
+ },
1540
+ };
1541
+ function createBaseResponse() {
1542
+ return {
1543
+ exception: undefined,
1544
+ echo: undefined,
1545
+ flush: undefined,
1546
+ info: undefined,
1547
+ initChain: undefined,
1548
+ query: undefined,
1549
+ beginBlock: undefined,
1550
+ checkTx: undefined,
1551
+ deliverTx: undefined,
1552
+ endBlock: undefined,
1553
+ commit: undefined,
1554
+ listSnapshots: undefined,
1555
+ offerSnapshot: undefined,
1556
+ loadSnapshotChunk: undefined,
1557
+ applySnapshotChunk: undefined,
1558
+ prepareProposal: undefined,
1559
+ processProposal: undefined,
1560
+ };
1561
+ }
1562
+ export const Response = {
1563
+ encode(message, writer = _m0.Writer.create()) {
1564
+ if (message.exception !== undefined) {
1565
+ ResponseException.encode(message.exception, writer.uint32(10).fork()).ldelim();
1566
+ }
1567
+ if (message.echo !== undefined) {
1568
+ ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim();
1569
+ }
1570
+ if (message.flush !== undefined) {
1571
+ ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim();
1572
+ }
1573
+ if (message.info !== undefined) {
1574
+ ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim();
1575
+ }
1576
+ if (message.initChain !== undefined) {
1577
+ ResponseInitChain.encode(message.initChain, writer.uint32(50).fork()).ldelim();
1578
+ }
1579
+ if (message.query !== undefined) {
1580
+ ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim();
1581
+ }
1582
+ if (message.beginBlock !== undefined) {
1583
+ ResponseBeginBlock.encode(message.beginBlock, writer.uint32(66).fork()).ldelim();
1584
+ }
1585
+ if (message.checkTx !== undefined) {
1586
+ ResponseCheckTx.encode(message.checkTx, writer.uint32(74).fork()).ldelim();
1587
+ }
1588
+ if (message.deliverTx !== undefined) {
1589
+ ResponseDeliverTx.encode(message.deliverTx, writer.uint32(82).fork()).ldelim();
1590
+ }
1591
+ if (message.endBlock !== undefined) {
1592
+ ResponseEndBlock.encode(message.endBlock, writer.uint32(90).fork()).ldelim();
1593
+ }
1594
+ if (message.commit !== undefined) {
1595
+ ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim();
1596
+ }
1597
+ if (message.listSnapshots !== undefined) {
1598
+ ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(106).fork()).ldelim();
1599
+ }
1600
+ if (message.offerSnapshot !== undefined) {
1601
+ ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(114).fork()).ldelim();
1602
+ }
1603
+ if (message.loadSnapshotChunk !== undefined) {
1604
+ ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(122).fork()).ldelim();
1605
+ }
1606
+ if (message.applySnapshotChunk !== undefined) {
1607
+ ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(130).fork()).ldelim();
1608
+ }
1609
+ if (message.prepareProposal !== undefined) {
1610
+ ResponsePrepareProposal.encode(message.prepareProposal, writer.uint32(138).fork()).ldelim();
1611
+ }
1612
+ if (message.processProposal !== undefined) {
1613
+ ResponseProcessProposal.encode(message.processProposal, writer.uint32(146).fork()).ldelim();
1614
+ }
1615
+ return writer;
1616
+ },
1617
+ decode(input, length) {
1618
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1619
+ let end = length === undefined ? reader.len : reader.pos + length;
1620
+ const message = createBaseResponse();
1621
+ while (reader.pos < end) {
1622
+ const tag = reader.uint32();
1623
+ switch (tag >>> 3) {
1624
+ case 1:
1625
+ message.exception = ResponseException.decode(reader, reader.uint32());
1626
+ break;
1627
+ case 2:
1628
+ message.echo = ResponseEcho.decode(reader, reader.uint32());
1629
+ break;
1630
+ case 3:
1631
+ message.flush = ResponseFlush.decode(reader, reader.uint32());
1632
+ break;
1633
+ case 4:
1634
+ message.info = ResponseInfo.decode(reader, reader.uint32());
1635
+ break;
1636
+ case 6:
1637
+ message.initChain = ResponseInitChain.decode(reader, reader.uint32());
1638
+ break;
1639
+ case 7:
1640
+ message.query = ResponseQuery.decode(reader, reader.uint32());
1641
+ break;
1642
+ case 8:
1643
+ message.beginBlock = ResponseBeginBlock.decode(reader, reader.uint32());
1644
+ break;
1645
+ case 9:
1646
+ message.checkTx = ResponseCheckTx.decode(reader, reader.uint32());
1647
+ break;
1648
+ case 10:
1649
+ message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32());
1650
+ break;
1651
+ case 11:
1652
+ message.endBlock = ResponseEndBlock.decode(reader, reader.uint32());
1653
+ break;
1654
+ case 12:
1655
+ message.commit = ResponseCommit.decode(reader, reader.uint32());
1656
+ break;
1657
+ case 13:
1658
+ message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32());
1659
+ break;
1660
+ case 14:
1661
+ message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32());
1662
+ break;
1663
+ case 15:
1664
+ message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32());
1665
+ break;
1666
+ case 16:
1667
+ message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32());
1668
+ break;
1669
+ case 17:
1670
+ message.prepareProposal = ResponsePrepareProposal.decode(reader, reader.uint32());
1671
+ break;
1672
+ case 18:
1673
+ message.processProposal = ResponseProcessProposal.decode(reader, reader.uint32());
1674
+ break;
1675
+ default:
1676
+ reader.skipType(tag & 7);
1677
+ break;
1678
+ }
1679
+ }
1680
+ return message;
1681
+ },
1682
+ fromJSON(object) {
1683
+ return {
1684
+ exception: isSet(object.exception) ? ResponseException.fromJSON(object.exception) : undefined,
1685
+ echo: isSet(object.echo) ? ResponseEcho.fromJSON(object.echo) : undefined,
1686
+ flush: isSet(object.flush) ? ResponseFlush.fromJSON(object.flush) : undefined,
1687
+ info: isSet(object.info) ? ResponseInfo.fromJSON(object.info) : undefined,
1688
+ initChain: isSet(object.initChain) ? ResponseInitChain.fromJSON(object.initChain) : undefined,
1689
+ query: isSet(object.query) ? ResponseQuery.fromJSON(object.query) : undefined,
1690
+ beginBlock: isSet(object.beginBlock) ? ResponseBeginBlock.fromJSON(object.beginBlock) : undefined,
1691
+ checkTx: isSet(object.checkTx) ? ResponseCheckTx.fromJSON(object.checkTx) : undefined,
1692
+ deliverTx: isSet(object.deliverTx) ? ResponseDeliverTx.fromJSON(object.deliverTx) : undefined,
1693
+ endBlock: isSet(object.endBlock) ? ResponseEndBlock.fromJSON(object.endBlock) : undefined,
1694
+ commit: isSet(object.commit) ? ResponseCommit.fromJSON(object.commit) : undefined,
1695
+ listSnapshots: isSet(object.listSnapshots) ? ResponseListSnapshots.fromJSON(object.listSnapshots) : undefined,
1696
+ offerSnapshot: isSet(object.offerSnapshot) ? ResponseOfferSnapshot.fromJSON(object.offerSnapshot) : undefined,
1697
+ loadSnapshotChunk: isSet(object.loadSnapshotChunk)
1698
+ ? ResponseLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk)
1699
+ : undefined,
1700
+ applySnapshotChunk: isSet(object.applySnapshotChunk)
1701
+ ? ResponseApplySnapshotChunk.fromJSON(object.applySnapshotChunk)
1702
+ : undefined,
1703
+ prepareProposal: isSet(object.prepareProposal)
1704
+ ? ResponsePrepareProposal.fromJSON(object.prepareProposal)
1705
+ : undefined,
1706
+ processProposal: isSet(object.processProposal)
1707
+ ? ResponseProcessProposal.fromJSON(object.processProposal)
1708
+ : undefined,
1709
+ };
1710
+ },
1711
+ toJSON(message) {
1712
+ const obj = {};
1713
+ message.exception !== undefined
1714
+ && (obj.exception = message.exception ? ResponseException.toJSON(message.exception) : undefined);
1715
+ message.echo !== undefined && (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined);
1716
+ message.flush !== undefined && (obj.flush = message.flush ? ResponseFlush.toJSON(message.flush) : undefined);
1717
+ message.info !== undefined && (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined);
1718
+ message.initChain !== undefined
1719
+ && (obj.initChain = message.initChain ? ResponseInitChain.toJSON(message.initChain) : undefined);
1720
+ message.query !== undefined && (obj.query = message.query ? ResponseQuery.toJSON(message.query) : undefined);
1721
+ message.beginBlock !== undefined
1722
+ && (obj.beginBlock = message.beginBlock ? ResponseBeginBlock.toJSON(message.beginBlock) : undefined);
1723
+ message.checkTx !== undefined
1724
+ && (obj.checkTx = message.checkTx ? ResponseCheckTx.toJSON(message.checkTx) : undefined);
1725
+ message.deliverTx !== undefined
1726
+ && (obj.deliverTx = message.deliverTx ? ResponseDeliverTx.toJSON(message.deliverTx) : undefined);
1727
+ message.endBlock !== undefined
1728
+ && (obj.endBlock = message.endBlock ? ResponseEndBlock.toJSON(message.endBlock) : undefined);
1729
+ message.commit !== undefined && (obj.commit = message.commit ? ResponseCommit.toJSON(message.commit) : undefined);
1730
+ message.listSnapshots !== undefined
1731
+ && (obj.listSnapshots = message.listSnapshots ? ResponseListSnapshots.toJSON(message.listSnapshots) : undefined);
1732
+ message.offerSnapshot !== undefined
1733
+ && (obj.offerSnapshot = message.offerSnapshot ? ResponseOfferSnapshot.toJSON(message.offerSnapshot) : undefined);
1734
+ message.loadSnapshotChunk !== undefined && (obj.loadSnapshotChunk = message.loadSnapshotChunk
1735
+ ? ResponseLoadSnapshotChunk.toJSON(message.loadSnapshotChunk)
1736
+ : undefined);
1737
+ message.applySnapshotChunk !== undefined && (obj.applySnapshotChunk = message.applySnapshotChunk
1738
+ ? ResponseApplySnapshotChunk.toJSON(message.applySnapshotChunk)
1739
+ : undefined);
1740
+ message.prepareProposal !== undefined && (obj.prepareProposal = message.prepareProposal
1741
+ ? ResponsePrepareProposal.toJSON(message.prepareProposal)
1742
+ : undefined);
1743
+ message.processProposal !== undefined && (obj.processProposal = message.processProposal
1744
+ ? ResponseProcessProposal.toJSON(message.processProposal)
1745
+ : undefined);
1746
+ return obj;
1747
+ },
1748
+ fromPartial(object) {
1749
+ const message = createBaseResponse();
1750
+ message.exception = (object.exception !== undefined && object.exception !== null)
1751
+ ? ResponseException.fromPartial(object.exception)
1752
+ : undefined;
1753
+ message.echo = (object.echo !== undefined && object.echo !== null)
1754
+ ? ResponseEcho.fromPartial(object.echo)
1755
+ : undefined;
1756
+ message.flush = (object.flush !== undefined && object.flush !== null)
1757
+ ? ResponseFlush.fromPartial(object.flush)
1758
+ : undefined;
1759
+ message.info = (object.info !== undefined && object.info !== null)
1760
+ ? ResponseInfo.fromPartial(object.info)
1761
+ : undefined;
1762
+ message.initChain = (object.initChain !== undefined && object.initChain !== null)
1763
+ ? ResponseInitChain.fromPartial(object.initChain)
1764
+ : undefined;
1765
+ message.query = (object.query !== undefined && object.query !== null)
1766
+ ? ResponseQuery.fromPartial(object.query)
1767
+ : undefined;
1768
+ message.beginBlock = (object.beginBlock !== undefined && object.beginBlock !== null)
1769
+ ? ResponseBeginBlock.fromPartial(object.beginBlock)
1770
+ : undefined;
1771
+ message.checkTx = (object.checkTx !== undefined && object.checkTx !== null)
1772
+ ? ResponseCheckTx.fromPartial(object.checkTx)
1773
+ : undefined;
1774
+ message.deliverTx = (object.deliverTx !== undefined && object.deliverTx !== null)
1775
+ ? ResponseDeliverTx.fromPartial(object.deliverTx)
1776
+ : undefined;
1777
+ message.endBlock = (object.endBlock !== undefined && object.endBlock !== null)
1778
+ ? ResponseEndBlock.fromPartial(object.endBlock)
1779
+ : undefined;
1780
+ message.commit = (object.commit !== undefined && object.commit !== null)
1781
+ ? ResponseCommit.fromPartial(object.commit)
1782
+ : undefined;
1783
+ message.listSnapshots = (object.listSnapshots !== undefined && object.listSnapshots !== null)
1784
+ ? ResponseListSnapshots.fromPartial(object.listSnapshots)
1785
+ : undefined;
1786
+ message.offerSnapshot = (object.offerSnapshot !== undefined && object.offerSnapshot !== null)
1787
+ ? ResponseOfferSnapshot.fromPartial(object.offerSnapshot)
1788
+ : undefined;
1789
+ message.loadSnapshotChunk = (object.loadSnapshotChunk !== undefined && object.loadSnapshotChunk !== null)
1790
+ ? ResponseLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk)
1791
+ : undefined;
1792
+ message.applySnapshotChunk = (object.applySnapshotChunk !== undefined && object.applySnapshotChunk !== null)
1793
+ ? ResponseApplySnapshotChunk.fromPartial(object.applySnapshotChunk)
1794
+ : undefined;
1795
+ message.prepareProposal = (object.prepareProposal !== undefined && object.prepareProposal !== null)
1796
+ ? ResponsePrepareProposal.fromPartial(object.prepareProposal)
1797
+ : undefined;
1798
+ message.processProposal = (object.processProposal !== undefined && object.processProposal !== null)
1799
+ ? ResponseProcessProposal.fromPartial(object.processProposal)
1800
+ : undefined;
1801
+ return message;
1802
+ },
1803
+ };
1804
+ function createBaseResponseException() {
1805
+ return { error: "" };
1806
+ }
1807
+ export const ResponseException = {
1808
+ encode(message, writer = _m0.Writer.create()) {
1809
+ if (message.error !== "") {
1810
+ writer.uint32(10).string(message.error);
1811
+ }
1812
+ return writer;
1813
+ },
1814
+ decode(input, length) {
1815
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1816
+ let end = length === undefined ? reader.len : reader.pos + length;
1817
+ const message = createBaseResponseException();
1818
+ while (reader.pos < end) {
1819
+ const tag = reader.uint32();
1820
+ switch (tag >>> 3) {
1821
+ case 1:
1822
+ message.error = reader.string();
1823
+ break;
1824
+ default:
1825
+ reader.skipType(tag & 7);
1826
+ break;
1827
+ }
1828
+ }
1829
+ return message;
1830
+ },
1831
+ fromJSON(object) {
1832
+ return { error: isSet(object.error) ? String(object.error) : "" };
1833
+ },
1834
+ toJSON(message) {
1835
+ const obj = {};
1836
+ message.error !== undefined && (obj.error = message.error);
1837
+ return obj;
1838
+ },
1839
+ fromPartial(object) {
1840
+ const message = createBaseResponseException();
1841
+ message.error = object.error ?? "";
1842
+ return message;
1843
+ },
1844
+ };
1845
+ function createBaseResponseEcho() {
1846
+ return { message: "" };
1847
+ }
1848
+ export const ResponseEcho = {
1849
+ encode(message, writer = _m0.Writer.create()) {
1850
+ if (message.message !== "") {
1851
+ writer.uint32(10).string(message.message);
1852
+ }
1853
+ return writer;
1854
+ },
1855
+ decode(input, length) {
1856
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1857
+ let end = length === undefined ? reader.len : reader.pos + length;
1858
+ const message = createBaseResponseEcho();
1859
+ while (reader.pos < end) {
1860
+ const tag = reader.uint32();
1861
+ switch (tag >>> 3) {
1862
+ case 1:
1863
+ message.message = reader.string();
1864
+ break;
1865
+ default:
1866
+ reader.skipType(tag & 7);
1867
+ break;
1868
+ }
1869
+ }
1870
+ return message;
1871
+ },
1872
+ fromJSON(object) {
1873
+ return { message: isSet(object.message) ? String(object.message) : "" };
1874
+ },
1875
+ toJSON(message) {
1876
+ const obj = {};
1877
+ message.message !== undefined && (obj.message = message.message);
1878
+ return obj;
1879
+ },
1880
+ fromPartial(object) {
1881
+ const message = createBaseResponseEcho();
1882
+ message.message = object.message ?? "";
1883
+ return message;
1884
+ },
1885
+ };
1886
+ function createBaseResponseFlush() {
1887
+ return {};
1888
+ }
1889
+ export const ResponseFlush = {
1890
+ encode(_, writer = _m0.Writer.create()) {
1891
+ return writer;
1892
+ },
1893
+ decode(input, length) {
1894
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1895
+ let end = length === undefined ? reader.len : reader.pos + length;
1896
+ const message = createBaseResponseFlush();
1897
+ while (reader.pos < end) {
1898
+ const tag = reader.uint32();
1899
+ switch (tag >>> 3) {
1900
+ default:
1901
+ reader.skipType(tag & 7);
1902
+ break;
1903
+ }
1904
+ }
1905
+ return message;
1906
+ },
1907
+ fromJSON(_) {
1908
+ return {};
1909
+ },
1910
+ toJSON(_) {
1911
+ const obj = {};
1912
+ return obj;
1913
+ },
1914
+ fromPartial(_) {
1915
+ const message = createBaseResponseFlush();
1916
+ return message;
1917
+ },
1918
+ };
1919
+ function createBaseResponseInfo() {
1920
+ return { data: "", version: "", appVersion: 0, lastBlockHeight: 0, lastBlockAppHash: new Uint8Array() };
1921
+ }
1922
+ export const ResponseInfo = {
1923
+ encode(message, writer = _m0.Writer.create()) {
1924
+ if (message.data !== "") {
1925
+ writer.uint32(10).string(message.data);
1926
+ }
1927
+ if (message.version !== "") {
1928
+ writer.uint32(18).string(message.version);
1929
+ }
1930
+ if (message.appVersion !== 0) {
1931
+ writer.uint32(24).uint64(message.appVersion);
1932
+ }
1933
+ if (message.lastBlockHeight !== 0) {
1934
+ writer.uint32(32).int64(message.lastBlockHeight);
1935
+ }
1936
+ if (message.lastBlockAppHash.length !== 0) {
1937
+ writer.uint32(42).bytes(message.lastBlockAppHash);
1938
+ }
1939
+ return writer;
1940
+ },
1941
+ decode(input, length) {
1942
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1943
+ let end = length === undefined ? reader.len : reader.pos + length;
1944
+ const message = createBaseResponseInfo();
1945
+ while (reader.pos < end) {
1946
+ const tag = reader.uint32();
1947
+ switch (tag >>> 3) {
1948
+ case 1:
1949
+ message.data = reader.string();
1950
+ break;
1951
+ case 2:
1952
+ message.version = reader.string();
1953
+ break;
1954
+ case 3:
1955
+ message.appVersion = longToNumber(reader.uint64());
1956
+ break;
1957
+ case 4:
1958
+ message.lastBlockHeight = longToNumber(reader.int64());
1959
+ break;
1960
+ case 5:
1961
+ message.lastBlockAppHash = reader.bytes();
1962
+ break;
1963
+ default:
1964
+ reader.skipType(tag & 7);
1965
+ break;
1966
+ }
1967
+ }
1968
+ return message;
1969
+ },
1970
+ fromJSON(object) {
1971
+ return {
1972
+ data: isSet(object.data) ? String(object.data) : "",
1973
+ version: isSet(object.version) ? String(object.version) : "",
1974
+ appVersion: isSet(object.appVersion) ? Number(object.appVersion) : 0,
1975
+ lastBlockHeight: isSet(object.lastBlockHeight) ? Number(object.lastBlockHeight) : 0,
1976
+ lastBlockAppHash: isSet(object.lastBlockAppHash) ? bytesFromBase64(object.lastBlockAppHash) : new Uint8Array(),
1977
+ };
1978
+ },
1979
+ toJSON(message) {
1980
+ const obj = {};
1981
+ message.data !== undefined && (obj.data = message.data);
1982
+ message.version !== undefined && (obj.version = message.version);
1983
+ message.appVersion !== undefined && (obj.appVersion = Math.round(message.appVersion));
1984
+ message.lastBlockHeight !== undefined && (obj.lastBlockHeight = Math.round(message.lastBlockHeight));
1985
+ message.lastBlockAppHash !== undefined
1986
+ && (obj.lastBlockAppHash = base64FromBytes(message.lastBlockAppHash !== undefined ? message.lastBlockAppHash : new Uint8Array()));
1987
+ return obj;
1988
+ },
1989
+ fromPartial(object) {
1990
+ const message = createBaseResponseInfo();
1991
+ message.data = object.data ?? "";
1992
+ message.version = object.version ?? "";
1993
+ message.appVersion = object.appVersion ?? 0;
1994
+ message.lastBlockHeight = object.lastBlockHeight ?? 0;
1995
+ message.lastBlockAppHash = object.lastBlockAppHash ?? new Uint8Array();
1996
+ return message;
1997
+ },
1998
+ };
1999
+ function createBaseResponseInitChain() {
2000
+ return { consensusParams: undefined, validators: [], appHash: new Uint8Array() };
2001
+ }
2002
+ export const ResponseInitChain = {
2003
+ encode(message, writer = _m0.Writer.create()) {
2004
+ if (message.consensusParams !== undefined) {
2005
+ ConsensusParams.encode(message.consensusParams, writer.uint32(10).fork()).ldelim();
2006
+ }
2007
+ for (const v of message.validators) {
2008
+ ValidatorUpdate.encode(v, writer.uint32(18).fork()).ldelim();
2009
+ }
2010
+ if (message.appHash.length !== 0) {
2011
+ writer.uint32(26).bytes(message.appHash);
2012
+ }
2013
+ return writer;
2014
+ },
2015
+ decode(input, length) {
2016
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2017
+ let end = length === undefined ? reader.len : reader.pos + length;
2018
+ const message = createBaseResponseInitChain();
2019
+ while (reader.pos < end) {
2020
+ const tag = reader.uint32();
2021
+ switch (tag >>> 3) {
2022
+ case 1:
2023
+ message.consensusParams = ConsensusParams.decode(reader, reader.uint32());
2024
+ break;
2025
+ case 2:
2026
+ message.validators.push(ValidatorUpdate.decode(reader, reader.uint32()));
2027
+ break;
2028
+ case 3:
2029
+ message.appHash = reader.bytes();
2030
+ break;
2031
+ default:
2032
+ reader.skipType(tag & 7);
2033
+ break;
2034
+ }
2035
+ }
2036
+ return message;
2037
+ },
2038
+ fromJSON(object) {
2039
+ return {
2040
+ consensusParams: isSet(object.consensusParams) ? ConsensusParams.fromJSON(object.consensusParams) : undefined,
2041
+ validators: Array.isArray(object?.validators)
2042
+ ? object.validators.map((e) => ValidatorUpdate.fromJSON(e))
2043
+ : [],
2044
+ appHash: isSet(object.appHash) ? bytesFromBase64(object.appHash) : new Uint8Array(),
2045
+ };
2046
+ },
2047
+ toJSON(message) {
2048
+ const obj = {};
2049
+ message.consensusParams !== undefined
2050
+ && (obj.consensusParams = message.consensusParams ? ConsensusParams.toJSON(message.consensusParams) : undefined);
2051
+ if (message.validators) {
2052
+ obj.validators = message.validators.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined);
2053
+ }
2054
+ else {
2055
+ obj.validators = [];
2056
+ }
2057
+ message.appHash !== undefined
2058
+ && (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array()));
2059
+ return obj;
2060
+ },
2061
+ fromPartial(object) {
2062
+ const message = createBaseResponseInitChain();
2063
+ message.consensusParams = (object.consensusParams !== undefined && object.consensusParams !== null)
2064
+ ? ConsensusParams.fromPartial(object.consensusParams)
2065
+ : undefined;
2066
+ message.validators = object.validators?.map((e) => ValidatorUpdate.fromPartial(e)) || [];
2067
+ message.appHash = object.appHash ?? new Uint8Array();
2068
+ return message;
2069
+ },
2070
+ };
2071
+ function createBaseResponseQuery() {
2072
+ return {
2073
+ code: 0,
2074
+ log: "",
2075
+ info: "",
2076
+ index: 0,
2077
+ key: new Uint8Array(),
2078
+ value: new Uint8Array(),
2079
+ proofOps: undefined,
2080
+ height: 0,
2081
+ codespace: "",
2082
+ };
2083
+ }
2084
+ export const ResponseQuery = {
2085
+ encode(message, writer = _m0.Writer.create()) {
2086
+ if (message.code !== 0) {
2087
+ writer.uint32(8).uint32(message.code);
2088
+ }
2089
+ if (message.log !== "") {
2090
+ writer.uint32(26).string(message.log);
2091
+ }
2092
+ if (message.info !== "") {
2093
+ writer.uint32(34).string(message.info);
2094
+ }
2095
+ if (message.index !== 0) {
2096
+ writer.uint32(40).int64(message.index);
2097
+ }
2098
+ if (message.key.length !== 0) {
2099
+ writer.uint32(50).bytes(message.key);
2100
+ }
2101
+ if (message.value.length !== 0) {
2102
+ writer.uint32(58).bytes(message.value);
2103
+ }
2104
+ if (message.proofOps !== undefined) {
2105
+ ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim();
2106
+ }
2107
+ if (message.height !== 0) {
2108
+ writer.uint32(72).int64(message.height);
2109
+ }
2110
+ if (message.codespace !== "") {
2111
+ writer.uint32(82).string(message.codespace);
2112
+ }
2113
+ return writer;
2114
+ },
2115
+ decode(input, length) {
2116
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2117
+ let end = length === undefined ? reader.len : reader.pos + length;
2118
+ const message = createBaseResponseQuery();
2119
+ while (reader.pos < end) {
2120
+ const tag = reader.uint32();
2121
+ switch (tag >>> 3) {
2122
+ case 1:
2123
+ message.code = reader.uint32();
2124
+ break;
2125
+ case 3:
2126
+ message.log = reader.string();
2127
+ break;
2128
+ case 4:
2129
+ message.info = reader.string();
2130
+ break;
2131
+ case 5:
2132
+ message.index = longToNumber(reader.int64());
2133
+ break;
2134
+ case 6:
2135
+ message.key = reader.bytes();
2136
+ break;
2137
+ case 7:
2138
+ message.value = reader.bytes();
2139
+ break;
2140
+ case 8:
2141
+ message.proofOps = ProofOps.decode(reader, reader.uint32());
2142
+ break;
2143
+ case 9:
2144
+ message.height = longToNumber(reader.int64());
2145
+ break;
2146
+ case 10:
2147
+ message.codespace = reader.string();
2148
+ break;
2149
+ default:
2150
+ reader.skipType(tag & 7);
2151
+ break;
2152
+ }
2153
+ }
2154
+ return message;
2155
+ },
2156
+ fromJSON(object) {
2157
+ return {
2158
+ code: isSet(object.code) ? Number(object.code) : 0,
2159
+ log: isSet(object.log) ? String(object.log) : "",
2160
+ info: isSet(object.info) ? String(object.info) : "",
2161
+ index: isSet(object.index) ? Number(object.index) : 0,
2162
+ key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
2163
+ value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),
2164
+ proofOps: isSet(object.proofOps) ? ProofOps.fromJSON(object.proofOps) : undefined,
2165
+ height: isSet(object.height) ? Number(object.height) : 0,
2166
+ codespace: isSet(object.codespace) ? String(object.codespace) : "",
2167
+ };
2168
+ },
2169
+ toJSON(message) {
2170
+ const obj = {};
2171
+ message.code !== undefined && (obj.code = Math.round(message.code));
2172
+ message.log !== undefined && (obj.log = message.log);
2173
+ message.info !== undefined && (obj.info = message.info);
2174
+ message.index !== undefined && (obj.index = Math.round(message.index));
2175
+ message.key !== undefined
2176
+ && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
2177
+ message.value !== undefined
2178
+ && (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
2179
+ message.proofOps !== undefined && (obj.proofOps = message.proofOps ? ProofOps.toJSON(message.proofOps) : undefined);
2180
+ message.height !== undefined && (obj.height = Math.round(message.height));
2181
+ message.codespace !== undefined && (obj.codespace = message.codespace);
2182
+ return obj;
2183
+ },
2184
+ fromPartial(object) {
2185
+ const message = createBaseResponseQuery();
2186
+ message.code = object.code ?? 0;
2187
+ message.log = object.log ?? "";
2188
+ message.info = object.info ?? "";
2189
+ message.index = object.index ?? 0;
2190
+ message.key = object.key ?? new Uint8Array();
2191
+ message.value = object.value ?? new Uint8Array();
2192
+ message.proofOps = (object.proofOps !== undefined && object.proofOps !== null)
2193
+ ? ProofOps.fromPartial(object.proofOps)
2194
+ : undefined;
2195
+ message.height = object.height ?? 0;
2196
+ message.codespace = object.codespace ?? "";
2197
+ return message;
2198
+ },
2199
+ };
2200
+ function createBaseResponseBeginBlock() {
2201
+ return { events: [] };
2202
+ }
2203
+ export const ResponseBeginBlock = {
2204
+ encode(message, writer = _m0.Writer.create()) {
2205
+ for (const v of message.events) {
2206
+ Event.encode(v, writer.uint32(10).fork()).ldelim();
2207
+ }
2208
+ return writer;
2209
+ },
2210
+ decode(input, length) {
2211
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2212
+ let end = length === undefined ? reader.len : reader.pos + length;
2213
+ const message = createBaseResponseBeginBlock();
2214
+ while (reader.pos < end) {
2215
+ const tag = reader.uint32();
2216
+ switch (tag >>> 3) {
2217
+ case 1:
2218
+ message.events.push(Event.decode(reader, reader.uint32()));
2219
+ break;
2220
+ default:
2221
+ reader.skipType(tag & 7);
2222
+ break;
2223
+ }
2224
+ }
2225
+ return message;
2226
+ },
2227
+ fromJSON(object) {
2228
+ return { events: Array.isArray(object?.events) ? object.events.map((e) => Event.fromJSON(e)) : [] };
2229
+ },
2230
+ toJSON(message) {
2231
+ const obj = {};
2232
+ if (message.events) {
2233
+ obj.events = message.events.map((e) => e ? Event.toJSON(e) : undefined);
2234
+ }
2235
+ else {
2236
+ obj.events = [];
2237
+ }
2238
+ return obj;
2239
+ },
2240
+ fromPartial(object) {
2241
+ const message = createBaseResponseBeginBlock();
2242
+ message.events = object.events?.map((e) => Event.fromPartial(e)) || [];
2243
+ return message;
2244
+ },
2245
+ };
2246
+ function createBaseResponseCheckTx() {
2247
+ return {
2248
+ code: 0,
2249
+ data: new Uint8Array(),
2250
+ log: "",
2251
+ info: "",
2252
+ gasWanted: 0,
2253
+ gasUsed: 0,
2254
+ events: [],
2255
+ codespace: "",
2256
+ sender: "",
2257
+ priority: 0,
2258
+ mempoolError: "",
2259
+ };
2260
+ }
2261
+ export const ResponseCheckTx = {
2262
+ encode(message, writer = _m0.Writer.create()) {
2263
+ if (message.code !== 0) {
2264
+ writer.uint32(8).uint32(message.code);
2265
+ }
2266
+ if (message.data.length !== 0) {
2267
+ writer.uint32(18).bytes(message.data);
2268
+ }
2269
+ if (message.log !== "") {
2270
+ writer.uint32(26).string(message.log);
2271
+ }
2272
+ if (message.info !== "") {
2273
+ writer.uint32(34).string(message.info);
2274
+ }
2275
+ if (message.gasWanted !== 0) {
2276
+ writer.uint32(40).int64(message.gasWanted);
2277
+ }
2278
+ if (message.gasUsed !== 0) {
2279
+ writer.uint32(48).int64(message.gasUsed);
2280
+ }
2281
+ for (const v of message.events) {
2282
+ Event.encode(v, writer.uint32(58).fork()).ldelim();
2283
+ }
2284
+ if (message.codespace !== "") {
2285
+ writer.uint32(66).string(message.codespace);
2286
+ }
2287
+ if (message.sender !== "") {
2288
+ writer.uint32(74).string(message.sender);
2289
+ }
2290
+ if (message.priority !== 0) {
2291
+ writer.uint32(80).int64(message.priority);
2292
+ }
2293
+ if (message.mempoolError !== "") {
2294
+ writer.uint32(90).string(message.mempoolError);
2295
+ }
2296
+ return writer;
2297
+ },
2298
+ decode(input, length) {
2299
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2300
+ let end = length === undefined ? reader.len : reader.pos + length;
2301
+ const message = createBaseResponseCheckTx();
2302
+ while (reader.pos < end) {
2303
+ const tag = reader.uint32();
2304
+ switch (tag >>> 3) {
2305
+ case 1:
2306
+ message.code = reader.uint32();
2307
+ break;
2308
+ case 2:
2309
+ message.data = reader.bytes();
2310
+ break;
2311
+ case 3:
2312
+ message.log = reader.string();
2313
+ break;
2314
+ case 4:
2315
+ message.info = reader.string();
2316
+ break;
2317
+ case 5:
2318
+ message.gasWanted = longToNumber(reader.int64());
2319
+ break;
2320
+ case 6:
2321
+ message.gasUsed = longToNumber(reader.int64());
2322
+ break;
2323
+ case 7:
2324
+ message.events.push(Event.decode(reader, reader.uint32()));
2325
+ break;
2326
+ case 8:
2327
+ message.codespace = reader.string();
2328
+ break;
2329
+ case 9:
2330
+ message.sender = reader.string();
2331
+ break;
2332
+ case 10:
2333
+ message.priority = longToNumber(reader.int64());
2334
+ break;
2335
+ case 11:
2336
+ message.mempoolError = reader.string();
2337
+ break;
2338
+ default:
2339
+ reader.skipType(tag & 7);
2340
+ break;
2341
+ }
2342
+ }
2343
+ return message;
2344
+ },
2345
+ fromJSON(object) {
2346
+ return {
2347
+ code: isSet(object.code) ? Number(object.code) : 0,
2348
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(),
2349
+ log: isSet(object.log) ? String(object.log) : "",
2350
+ info: isSet(object.info) ? String(object.info) : "",
2351
+ gasWanted: isSet(object.gas_wanted) ? Number(object.gas_wanted) : 0,
2352
+ gasUsed: isSet(object.gas_used) ? Number(object.gas_used) : 0,
2353
+ events: Array.isArray(object?.events) ? object.events.map((e) => Event.fromJSON(e)) : [],
2354
+ codespace: isSet(object.codespace) ? String(object.codespace) : "",
2355
+ sender: isSet(object.sender) ? String(object.sender) : "",
2356
+ priority: isSet(object.priority) ? Number(object.priority) : 0,
2357
+ mempoolError: isSet(object.mempoolError) ? String(object.mempoolError) : "",
2358
+ };
2359
+ },
2360
+ toJSON(message) {
2361
+ const obj = {};
2362
+ message.code !== undefined && (obj.code = Math.round(message.code));
2363
+ message.data !== undefined
2364
+ && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
2365
+ message.log !== undefined && (obj.log = message.log);
2366
+ message.info !== undefined && (obj.info = message.info);
2367
+ message.gasWanted !== undefined && (obj.gas_wanted = Math.round(message.gasWanted));
2368
+ message.gasUsed !== undefined && (obj.gas_used = Math.round(message.gasUsed));
2369
+ if (message.events) {
2370
+ obj.events = message.events.map((e) => e ? Event.toJSON(e) : undefined);
2371
+ }
2372
+ else {
2373
+ obj.events = [];
2374
+ }
2375
+ message.codespace !== undefined && (obj.codespace = message.codespace);
2376
+ message.sender !== undefined && (obj.sender = message.sender);
2377
+ message.priority !== undefined && (obj.priority = Math.round(message.priority));
2378
+ message.mempoolError !== undefined && (obj.mempoolError = message.mempoolError);
2379
+ return obj;
2380
+ },
2381
+ fromPartial(object) {
2382
+ const message = createBaseResponseCheckTx();
2383
+ message.code = object.code ?? 0;
2384
+ message.data = object.data ?? new Uint8Array();
2385
+ message.log = object.log ?? "";
2386
+ message.info = object.info ?? "";
2387
+ message.gasWanted = object.gasWanted ?? 0;
2388
+ message.gasUsed = object.gasUsed ?? 0;
2389
+ message.events = object.events?.map((e) => Event.fromPartial(e)) || [];
2390
+ message.codespace = object.codespace ?? "";
2391
+ message.sender = object.sender ?? "";
2392
+ message.priority = object.priority ?? 0;
2393
+ message.mempoolError = object.mempoolError ?? "";
2394
+ return message;
2395
+ },
2396
+ };
2397
+ function createBaseResponseDeliverTx() {
2398
+ return { code: 0, data: new Uint8Array(), log: "", info: "", gasWanted: 0, gasUsed: 0, events: [], codespace: "" };
2399
+ }
2400
+ export const ResponseDeliverTx = {
2401
+ encode(message, writer = _m0.Writer.create()) {
2402
+ if (message.code !== 0) {
2403
+ writer.uint32(8).uint32(message.code);
2404
+ }
2405
+ if (message.data.length !== 0) {
2406
+ writer.uint32(18).bytes(message.data);
2407
+ }
2408
+ if (message.log !== "") {
2409
+ writer.uint32(26).string(message.log);
2410
+ }
2411
+ if (message.info !== "") {
2412
+ writer.uint32(34).string(message.info);
2413
+ }
2414
+ if (message.gasWanted !== 0) {
2415
+ writer.uint32(40).int64(message.gasWanted);
2416
+ }
2417
+ if (message.gasUsed !== 0) {
2418
+ writer.uint32(48).int64(message.gasUsed);
2419
+ }
2420
+ for (const v of message.events) {
2421
+ Event.encode(v, writer.uint32(58).fork()).ldelim();
2422
+ }
2423
+ if (message.codespace !== "") {
2424
+ writer.uint32(66).string(message.codespace);
2425
+ }
2426
+ return writer;
2427
+ },
2428
+ decode(input, length) {
2429
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2430
+ let end = length === undefined ? reader.len : reader.pos + length;
2431
+ const message = createBaseResponseDeliverTx();
2432
+ while (reader.pos < end) {
2433
+ const tag = reader.uint32();
2434
+ switch (tag >>> 3) {
2435
+ case 1:
2436
+ message.code = reader.uint32();
2437
+ break;
2438
+ case 2:
2439
+ message.data = reader.bytes();
2440
+ break;
2441
+ case 3:
2442
+ message.log = reader.string();
2443
+ break;
2444
+ case 4:
2445
+ message.info = reader.string();
2446
+ break;
2447
+ case 5:
2448
+ message.gasWanted = longToNumber(reader.int64());
2449
+ break;
2450
+ case 6:
2451
+ message.gasUsed = longToNumber(reader.int64());
2452
+ break;
2453
+ case 7:
2454
+ message.events.push(Event.decode(reader, reader.uint32()));
2455
+ break;
2456
+ case 8:
2457
+ message.codespace = reader.string();
2458
+ break;
2459
+ default:
2460
+ reader.skipType(tag & 7);
2461
+ break;
2462
+ }
2463
+ }
2464
+ return message;
2465
+ },
2466
+ fromJSON(object) {
2467
+ return {
2468
+ code: isSet(object.code) ? Number(object.code) : 0,
2469
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(),
2470
+ log: isSet(object.log) ? String(object.log) : "",
2471
+ info: isSet(object.info) ? String(object.info) : "",
2472
+ gasWanted: isSet(object.gas_wanted) ? Number(object.gas_wanted) : 0,
2473
+ gasUsed: isSet(object.gas_used) ? Number(object.gas_used) : 0,
2474
+ events: Array.isArray(object?.events) ? object.events.map((e) => Event.fromJSON(e)) : [],
2475
+ codespace: isSet(object.codespace) ? String(object.codespace) : "",
2476
+ };
2477
+ },
2478
+ toJSON(message) {
2479
+ const obj = {};
2480
+ message.code !== undefined && (obj.code = Math.round(message.code));
2481
+ message.data !== undefined
2482
+ && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
2483
+ message.log !== undefined && (obj.log = message.log);
2484
+ message.info !== undefined && (obj.info = message.info);
2485
+ message.gasWanted !== undefined && (obj.gas_wanted = Math.round(message.gasWanted));
2486
+ message.gasUsed !== undefined && (obj.gas_used = Math.round(message.gasUsed));
2487
+ if (message.events) {
2488
+ obj.events = message.events.map((e) => e ? Event.toJSON(e) : undefined);
2489
+ }
2490
+ else {
2491
+ obj.events = [];
2492
+ }
2493
+ message.codespace !== undefined && (obj.codespace = message.codespace);
2494
+ return obj;
2495
+ },
2496
+ fromPartial(object) {
2497
+ const message = createBaseResponseDeliverTx();
2498
+ message.code = object.code ?? 0;
2499
+ message.data = object.data ?? new Uint8Array();
2500
+ message.log = object.log ?? "";
2501
+ message.info = object.info ?? "";
2502
+ message.gasWanted = object.gasWanted ?? 0;
2503
+ message.gasUsed = object.gasUsed ?? 0;
2504
+ message.events = object.events?.map((e) => Event.fromPartial(e)) || [];
2505
+ message.codespace = object.codespace ?? "";
2506
+ return message;
2507
+ },
2508
+ };
2509
+ function createBaseResponseEndBlock() {
2510
+ return { validatorUpdates: [], consensusParamUpdates: undefined, events: [] };
2511
+ }
2512
+ export const ResponseEndBlock = {
2513
+ encode(message, writer = _m0.Writer.create()) {
2514
+ for (const v of message.validatorUpdates) {
2515
+ ValidatorUpdate.encode(v, writer.uint32(10).fork()).ldelim();
2516
+ }
2517
+ if (message.consensusParamUpdates !== undefined) {
2518
+ ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(18).fork()).ldelim();
2519
+ }
2520
+ for (const v of message.events) {
2521
+ Event.encode(v, writer.uint32(26).fork()).ldelim();
2522
+ }
2523
+ return writer;
2524
+ },
2525
+ decode(input, length) {
2526
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2527
+ let end = length === undefined ? reader.len : reader.pos + length;
2528
+ const message = createBaseResponseEndBlock();
2529
+ while (reader.pos < end) {
2530
+ const tag = reader.uint32();
2531
+ switch (tag >>> 3) {
2532
+ case 1:
2533
+ message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32()));
2534
+ break;
2535
+ case 2:
2536
+ message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32());
2537
+ break;
2538
+ case 3:
2539
+ message.events.push(Event.decode(reader, reader.uint32()));
2540
+ break;
2541
+ default:
2542
+ reader.skipType(tag & 7);
2543
+ break;
2544
+ }
2545
+ }
2546
+ return message;
2547
+ },
2548
+ fromJSON(object) {
2549
+ return {
2550
+ validatorUpdates: Array.isArray(object?.validatorUpdates)
2551
+ ? object.validatorUpdates.map((e) => ValidatorUpdate.fromJSON(e))
2552
+ : [],
2553
+ consensusParamUpdates: isSet(object.consensusParamUpdates)
2554
+ ? ConsensusParams.fromJSON(object.consensusParamUpdates)
2555
+ : undefined,
2556
+ events: Array.isArray(object?.events) ? object.events.map((e) => Event.fromJSON(e)) : [],
2557
+ };
2558
+ },
2559
+ toJSON(message) {
2560
+ const obj = {};
2561
+ if (message.validatorUpdates) {
2562
+ obj.validatorUpdates = message.validatorUpdates.map((e) => e ? ValidatorUpdate.toJSON(e) : undefined);
2563
+ }
2564
+ else {
2565
+ obj.validatorUpdates = [];
2566
+ }
2567
+ message.consensusParamUpdates !== undefined && (obj.consensusParamUpdates = message.consensusParamUpdates
2568
+ ? ConsensusParams.toJSON(message.consensusParamUpdates)
2569
+ : undefined);
2570
+ if (message.events) {
2571
+ obj.events = message.events.map((e) => e ? Event.toJSON(e) : undefined);
2572
+ }
2573
+ else {
2574
+ obj.events = [];
2575
+ }
2576
+ return obj;
2577
+ },
2578
+ fromPartial(object) {
2579
+ const message = createBaseResponseEndBlock();
2580
+ message.validatorUpdates = object.validatorUpdates?.map((e) => ValidatorUpdate.fromPartial(e)) || [];
2581
+ message.consensusParamUpdates =
2582
+ (object.consensusParamUpdates !== undefined && object.consensusParamUpdates !== null)
2583
+ ? ConsensusParams.fromPartial(object.consensusParamUpdates)
2584
+ : undefined;
2585
+ message.events = object.events?.map((e) => Event.fromPartial(e)) || [];
2586
+ return message;
2587
+ },
2588
+ };
2589
+ function createBaseResponseCommit() {
2590
+ return { data: new Uint8Array(), retainHeight: 0 };
2591
+ }
2592
+ export const ResponseCommit = {
2593
+ encode(message, writer = _m0.Writer.create()) {
2594
+ if (message.data.length !== 0) {
2595
+ writer.uint32(18).bytes(message.data);
2596
+ }
2597
+ if (message.retainHeight !== 0) {
2598
+ writer.uint32(24).int64(message.retainHeight);
2599
+ }
2600
+ return writer;
2601
+ },
2602
+ decode(input, length) {
2603
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2604
+ let end = length === undefined ? reader.len : reader.pos + length;
2605
+ const message = createBaseResponseCommit();
2606
+ while (reader.pos < end) {
2607
+ const tag = reader.uint32();
2608
+ switch (tag >>> 3) {
2609
+ case 2:
2610
+ message.data = reader.bytes();
2611
+ break;
2612
+ case 3:
2613
+ message.retainHeight = longToNumber(reader.int64());
2614
+ break;
2615
+ default:
2616
+ reader.skipType(tag & 7);
2617
+ break;
2618
+ }
2619
+ }
2620
+ return message;
2621
+ },
2622
+ fromJSON(object) {
2623
+ return {
2624
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(),
2625
+ retainHeight: isSet(object.retainHeight) ? Number(object.retainHeight) : 0,
2626
+ };
2627
+ },
2628
+ toJSON(message) {
2629
+ const obj = {};
2630
+ message.data !== undefined
2631
+ && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
2632
+ message.retainHeight !== undefined && (obj.retainHeight = Math.round(message.retainHeight));
2633
+ return obj;
2634
+ },
2635
+ fromPartial(object) {
2636
+ const message = createBaseResponseCommit();
2637
+ message.data = object.data ?? new Uint8Array();
2638
+ message.retainHeight = object.retainHeight ?? 0;
2639
+ return message;
2640
+ },
2641
+ };
2642
+ function createBaseResponseListSnapshots() {
2643
+ return { snapshots: [] };
2644
+ }
2645
+ export const ResponseListSnapshots = {
2646
+ encode(message, writer = _m0.Writer.create()) {
2647
+ for (const v of message.snapshots) {
2648
+ Snapshot.encode(v, writer.uint32(10).fork()).ldelim();
2649
+ }
2650
+ return writer;
2651
+ },
2652
+ decode(input, length) {
2653
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2654
+ let end = length === undefined ? reader.len : reader.pos + length;
2655
+ const message = createBaseResponseListSnapshots();
2656
+ while (reader.pos < end) {
2657
+ const tag = reader.uint32();
2658
+ switch (tag >>> 3) {
2659
+ case 1:
2660
+ message.snapshots.push(Snapshot.decode(reader, reader.uint32()));
2661
+ break;
2662
+ default:
2663
+ reader.skipType(tag & 7);
2664
+ break;
2665
+ }
2666
+ }
2667
+ return message;
2668
+ },
2669
+ fromJSON(object) {
2670
+ return {
2671
+ snapshots: Array.isArray(object?.snapshots) ? object.snapshots.map((e) => Snapshot.fromJSON(e)) : [],
2672
+ };
2673
+ },
2674
+ toJSON(message) {
2675
+ const obj = {};
2676
+ if (message.snapshots) {
2677
+ obj.snapshots = message.snapshots.map((e) => e ? Snapshot.toJSON(e) : undefined);
2678
+ }
2679
+ else {
2680
+ obj.snapshots = [];
2681
+ }
2682
+ return obj;
2683
+ },
2684
+ fromPartial(object) {
2685
+ const message = createBaseResponseListSnapshots();
2686
+ message.snapshots = object.snapshots?.map((e) => Snapshot.fromPartial(e)) || [];
2687
+ return message;
2688
+ },
2689
+ };
2690
+ function createBaseResponseOfferSnapshot() {
2691
+ return { result: 0 };
2692
+ }
2693
+ export const ResponseOfferSnapshot = {
2694
+ encode(message, writer = _m0.Writer.create()) {
2695
+ if (message.result !== 0) {
2696
+ writer.uint32(8).int32(message.result);
2697
+ }
2698
+ return writer;
2699
+ },
2700
+ decode(input, length) {
2701
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2702
+ let end = length === undefined ? reader.len : reader.pos + length;
2703
+ const message = createBaseResponseOfferSnapshot();
2704
+ while (reader.pos < end) {
2705
+ const tag = reader.uint32();
2706
+ switch (tag >>> 3) {
2707
+ case 1:
2708
+ message.result = reader.int32();
2709
+ break;
2710
+ default:
2711
+ reader.skipType(tag & 7);
2712
+ break;
2713
+ }
2714
+ }
2715
+ return message;
2716
+ },
2717
+ fromJSON(object) {
2718
+ return { result: isSet(object.result) ? responseOfferSnapshot_ResultFromJSON(object.result) : 0 };
2719
+ },
2720
+ toJSON(message) {
2721
+ const obj = {};
2722
+ message.result !== undefined && (obj.result = responseOfferSnapshot_ResultToJSON(message.result));
2723
+ return obj;
2724
+ },
2725
+ fromPartial(object) {
2726
+ const message = createBaseResponseOfferSnapshot();
2727
+ message.result = object.result ?? 0;
2728
+ return message;
2729
+ },
2730
+ };
2731
+ function createBaseResponseLoadSnapshotChunk() {
2732
+ return { chunk: new Uint8Array() };
2733
+ }
2734
+ export const ResponseLoadSnapshotChunk = {
2735
+ encode(message, writer = _m0.Writer.create()) {
2736
+ if (message.chunk.length !== 0) {
2737
+ writer.uint32(10).bytes(message.chunk);
2738
+ }
2739
+ return writer;
2740
+ },
2741
+ decode(input, length) {
2742
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2743
+ let end = length === undefined ? reader.len : reader.pos + length;
2744
+ const message = createBaseResponseLoadSnapshotChunk();
2745
+ while (reader.pos < end) {
2746
+ const tag = reader.uint32();
2747
+ switch (tag >>> 3) {
2748
+ case 1:
2749
+ message.chunk = reader.bytes();
2750
+ break;
2751
+ default:
2752
+ reader.skipType(tag & 7);
2753
+ break;
2754
+ }
2755
+ }
2756
+ return message;
2757
+ },
2758
+ fromJSON(object) {
2759
+ return { chunk: isSet(object.chunk) ? bytesFromBase64(object.chunk) : new Uint8Array() };
2760
+ },
2761
+ toJSON(message) {
2762
+ const obj = {};
2763
+ message.chunk !== undefined
2764
+ && (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array()));
2765
+ return obj;
2766
+ },
2767
+ fromPartial(object) {
2768
+ const message = createBaseResponseLoadSnapshotChunk();
2769
+ message.chunk = object.chunk ?? new Uint8Array();
2770
+ return message;
2771
+ },
2772
+ };
2773
+ function createBaseResponseApplySnapshotChunk() {
2774
+ return { result: 0, refetchChunks: [], rejectSenders: [] };
2775
+ }
2776
+ export const ResponseApplySnapshotChunk = {
2777
+ encode(message, writer = _m0.Writer.create()) {
2778
+ if (message.result !== 0) {
2779
+ writer.uint32(8).int32(message.result);
2780
+ }
2781
+ writer.uint32(18).fork();
2782
+ for (const v of message.refetchChunks) {
2783
+ writer.uint32(v);
2784
+ }
2785
+ writer.ldelim();
2786
+ for (const v of message.rejectSenders) {
2787
+ writer.uint32(26).string(v);
2788
+ }
2789
+ return writer;
2790
+ },
2791
+ decode(input, length) {
2792
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2793
+ let end = length === undefined ? reader.len : reader.pos + length;
2794
+ const message = createBaseResponseApplySnapshotChunk();
2795
+ while (reader.pos < end) {
2796
+ const tag = reader.uint32();
2797
+ switch (tag >>> 3) {
2798
+ case 1:
2799
+ message.result = reader.int32();
2800
+ break;
2801
+ case 2:
2802
+ if ((tag & 7) === 2) {
2803
+ const end2 = reader.uint32() + reader.pos;
2804
+ while (reader.pos < end2) {
2805
+ message.refetchChunks.push(reader.uint32());
2806
+ }
2807
+ }
2808
+ else {
2809
+ message.refetchChunks.push(reader.uint32());
2810
+ }
2811
+ break;
2812
+ case 3:
2813
+ message.rejectSenders.push(reader.string());
2814
+ break;
2815
+ default:
2816
+ reader.skipType(tag & 7);
2817
+ break;
2818
+ }
2819
+ }
2820
+ return message;
2821
+ },
2822
+ fromJSON(object) {
2823
+ return {
2824
+ result: isSet(object.result) ? responseApplySnapshotChunk_ResultFromJSON(object.result) : 0,
2825
+ refetchChunks: Array.isArray(object?.refetchChunks) ? object.refetchChunks.map((e) => Number(e)) : [],
2826
+ rejectSenders: Array.isArray(object?.rejectSenders) ? object.rejectSenders.map((e) => String(e)) : [],
2827
+ };
2828
+ },
2829
+ toJSON(message) {
2830
+ const obj = {};
2831
+ message.result !== undefined && (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result));
2832
+ if (message.refetchChunks) {
2833
+ obj.refetchChunks = message.refetchChunks.map((e) => Math.round(e));
2834
+ }
2835
+ else {
2836
+ obj.refetchChunks = [];
2837
+ }
2838
+ if (message.rejectSenders) {
2839
+ obj.rejectSenders = message.rejectSenders.map((e) => e);
2840
+ }
2841
+ else {
2842
+ obj.rejectSenders = [];
2843
+ }
2844
+ return obj;
2845
+ },
2846
+ fromPartial(object) {
2847
+ const message = createBaseResponseApplySnapshotChunk();
2848
+ message.result = object.result ?? 0;
2849
+ message.refetchChunks = object.refetchChunks?.map((e) => e) || [];
2850
+ message.rejectSenders = object.rejectSenders?.map((e) => e) || [];
2851
+ return message;
2852
+ },
2853
+ };
2854
+ function createBaseResponsePrepareProposal() {
2855
+ return { txs: [] };
2856
+ }
2857
+ export const ResponsePrepareProposal = {
2858
+ encode(message, writer = _m0.Writer.create()) {
2859
+ for (const v of message.txs) {
2860
+ writer.uint32(10).bytes(v);
2861
+ }
2862
+ return writer;
2863
+ },
2864
+ decode(input, length) {
2865
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2866
+ let end = length === undefined ? reader.len : reader.pos + length;
2867
+ const message = createBaseResponsePrepareProposal();
2868
+ while (reader.pos < end) {
2869
+ const tag = reader.uint32();
2870
+ switch (tag >>> 3) {
2871
+ case 1:
2872
+ message.txs.push(reader.bytes());
2873
+ break;
2874
+ default:
2875
+ reader.skipType(tag & 7);
2876
+ break;
2877
+ }
2878
+ }
2879
+ return message;
2880
+ },
2881
+ fromJSON(object) {
2882
+ return { txs: Array.isArray(object?.txs) ? object.txs.map((e) => bytesFromBase64(e)) : [] };
2883
+ },
2884
+ toJSON(message) {
2885
+ const obj = {};
2886
+ if (message.txs) {
2887
+ obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
2888
+ }
2889
+ else {
2890
+ obj.txs = [];
2891
+ }
2892
+ return obj;
2893
+ },
2894
+ fromPartial(object) {
2895
+ const message = createBaseResponsePrepareProposal();
2896
+ message.txs = object.txs?.map((e) => e) || [];
2897
+ return message;
2898
+ },
2899
+ };
2900
+ function createBaseResponseProcessProposal() {
2901
+ return { status: 0 };
2902
+ }
2903
+ export const ResponseProcessProposal = {
2904
+ encode(message, writer = _m0.Writer.create()) {
2905
+ if (message.status !== 0) {
2906
+ writer.uint32(8).int32(message.status);
2907
+ }
2908
+ return writer;
2909
+ },
2910
+ decode(input, length) {
2911
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2912
+ let end = length === undefined ? reader.len : reader.pos + length;
2913
+ const message = createBaseResponseProcessProposal();
2914
+ while (reader.pos < end) {
2915
+ const tag = reader.uint32();
2916
+ switch (tag >>> 3) {
2917
+ case 1:
2918
+ message.status = reader.int32();
2919
+ break;
2920
+ default:
2921
+ reader.skipType(tag & 7);
2922
+ break;
2923
+ }
2924
+ }
2925
+ return message;
2926
+ },
2927
+ fromJSON(object) {
2928
+ return { status: isSet(object.status) ? responseProcessProposal_ProposalStatusFromJSON(object.status) : 0 };
2929
+ },
2930
+ toJSON(message) {
2931
+ const obj = {};
2932
+ message.status !== undefined && (obj.status = responseProcessProposal_ProposalStatusToJSON(message.status));
2933
+ return obj;
2934
+ },
2935
+ fromPartial(object) {
2936
+ const message = createBaseResponseProcessProposal();
2937
+ message.status = object.status ?? 0;
2938
+ return message;
2939
+ },
2940
+ };
2941
+ function createBaseCommitInfo() {
2942
+ return { round: 0, votes: [] };
2943
+ }
2944
+ export const CommitInfo = {
2945
+ encode(message, writer = _m0.Writer.create()) {
2946
+ if (message.round !== 0) {
2947
+ writer.uint32(8).int32(message.round);
2948
+ }
2949
+ for (const v of message.votes) {
2950
+ VoteInfo.encode(v, writer.uint32(18).fork()).ldelim();
2951
+ }
2952
+ return writer;
2953
+ },
2954
+ decode(input, length) {
2955
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2956
+ let end = length === undefined ? reader.len : reader.pos + length;
2957
+ const message = createBaseCommitInfo();
2958
+ while (reader.pos < end) {
2959
+ const tag = reader.uint32();
2960
+ switch (tag >>> 3) {
2961
+ case 1:
2962
+ message.round = reader.int32();
2963
+ break;
2964
+ case 2:
2965
+ message.votes.push(VoteInfo.decode(reader, reader.uint32()));
2966
+ break;
2967
+ default:
2968
+ reader.skipType(tag & 7);
2969
+ break;
2970
+ }
2971
+ }
2972
+ return message;
2973
+ },
2974
+ fromJSON(object) {
2975
+ return {
2976
+ round: isSet(object.round) ? Number(object.round) : 0,
2977
+ votes: Array.isArray(object?.votes) ? object.votes.map((e) => VoteInfo.fromJSON(e)) : [],
2978
+ };
2979
+ },
2980
+ toJSON(message) {
2981
+ const obj = {};
2982
+ message.round !== undefined && (obj.round = Math.round(message.round));
2983
+ if (message.votes) {
2984
+ obj.votes = message.votes.map((e) => e ? VoteInfo.toJSON(e) : undefined);
2985
+ }
2986
+ else {
2987
+ obj.votes = [];
2988
+ }
2989
+ return obj;
2990
+ },
2991
+ fromPartial(object) {
2992
+ const message = createBaseCommitInfo();
2993
+ message.round = object.round ?? 0;
2994
+ message.votes = object.votes?.map((e) => VoteInfo.fromPartial(e)) || [];
2995
+ return message;
2996
+ },
2997
+ };
2998
+ function createBaseExtendedCommitInfo() {
2999
+ return { round: 0, votes: [] };
3000
+ }
3001
+ export const ExtendedCommitInfo = {
3002
+ encode(message, writer = _m0.Writer.create()) {
3003
+ if (message.round !== 0) {
3004
+ writer.uint32(8).int32(message.round);
3005
+ }
3006
+ for (const v of message.votes) {
3007
+ ExtendedVoteInfo.encode(v, writer.uint32(18).fork()).ldelim();
3008
+ }
3009
+ return writer;
3010
+ },
3011
+ decode(input, length) {
3012
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3013
+ let end = length === undefined ? reader.len : reader.pos + length;
3014
+ const message = createBaseExtendedCommitInfo();
3015
+ while (reader.pos < end) {
3016
+ const tag = reader.uint32();
3017
+ switch (tag >>> 3) {
3018
+ case 1:
3019
+ message.round = reader.int32();
3020
+ break;
3021
+ case 2:
3022
+ message.votes.push(ExtendedVoteInfo.decode(reader, reader.uint32()));
3023
+ break;
3024
+ default:
3025
+ reader.skipType(tag & 7);
3026
+ break;
3027
+ }
3028
+ }
3029
+ return message;
3030
+ },
3031
+ fromJSON(object) {
3032
+ return {
3033
+ round: isSet(object.round) ? Number(object.round) : 0,
3034
+ votes: Array.isArray(object?.votes) ? object.votes.map((e) => ExtendedVoteInfo.fromJSON(e)) : [],
3035
+ };
3036
+ },
3037
+ toJSON(message) {
3038
+ const obj = {};
3039
+ message.round !== undefined && (obj.round = Math.round(message.round));
3040
+ if (message.votes) {
3041
+ obj.votes = message.votes.map((e) => e ? ExtendedVoteInfo.toJSON(e) : undefined);
3042
+ }
3043
+ else {
3044
+ obj.votes = [];
3045
+ }
3046
+ return obj;
3047
+ },
3048
+ fromPartial(object) {
3049
+ const message = createBaseExtendedCommitInfo();
3050
+ message.round = object.round ?? 0;
3051
+ message.votes = object.votes?.map((e) => ExtendedVoteInfo.fromPartial(e)) || [];
3052
+ return message;
3053
+ },
3054
+ };
3055
+ function createBaseEvent() {
3056
+ return { type: "", attributes: [] };
3057
+ }
3058
+ export const Event = {
3059
+ encode(message, writer = _m0.Writer.create()) {
3060
+ if (message.type !== "") {
3061
+ writer.uint32(10).string(message.type);
3062
+ }
3063
+ for (const v of message.attributes) {
3064
+ EventAttribute.encode(v, writer.uint32(18).fork()).ldelim();
3065
+ }
3066
+ return writer;
3067
+ },
3068
+ decode(input, length) {
3069
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3070
+ let end = length === undefined ? reader.len : reader.pos + length;
3071
+ const message = createBaseEvent();
3072
+ while (reader.pos < end) {
3073
+ const tag = reader.uint32();
3074
+ switch (tag >>> 3) {
3075
+ case 1:
3076
+ message.type = reader.string();
3077
+ break;
3078
+ case 2:
3079
+ message.attributes.push(EventAttribute.decode(reader, reader.uint32()));
3080
+ break;
3081
+ default:
3082
+ reader.skipType(tag & 7);
3083
+ break;
3084
+ }
3085
+ }
3086
+ return message;
3087
+ },
3088
+ fromJSON(object) {
3089
+ return {
3090
+ type: isSet(object.type) ? String(object.type) : "",
3091
+ attributes: Array.isArray(object?.attributes)
3092
+ ? object.attributes.map((e) => EventAttribute.fromJSON(e))
3093
+ : [],
3094
+ };
3095
+ },
3096
+ toJSON(message) {
3097
+ const obj = {};
3098
+ message.type !== undefined && (obj.type = message.type);
3099
+ if (message.attributes) {
3100
+ obj.attributes = message.attributes.map((e) => e ? EventAttribute.toJSON(e) : undefined);
3101
+ }
3102
+ else {
3103
+ obj.attributes = [];
3104
+ }
3105
+ return obj;
3106
+ },
3107
+ fromPartial(object) {
3108
+ const message = createBaseEvent();
3109
+ message.type = object.type ?? "";
3110
+ message.attributes = object.attributes?.map((e) => EventAttribute.fromPartial(e)) || [];
3111
+ return message;
3112
+ },
3113
+ };
3114
+ function createBaseEventAttribute() {
3115
+ return { key: "", value: "", index: false };
3116
+ }
3117
+ export const EventAttribute = {
3118
+ encode(message, writer = _m0.Writer.create()) {
3119
+ if (message.key !== "") {
3120
+ writer.uint32(10).string(message.key);
3121
+ }
3122
+ if (message.value !== "") {
3123
+ writer.uint32(18).string(message.value);
3124
+ }
3125
+ if (message.index === true) {
3126
+ writer.uint32(24).bool(message.index);
3127
+ }
3128
+ return writer;
3129
+ },
3130
+ decode(input, length) {
3131
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3132
+ let end = length === undefined ? reader.len : reader.pos + length;
3133
+ const message = createBaseEventAttribute();
3134
+ while (reader.pos < end) {
3135
+ const tag = reader.uint32();
3136
+ switch (tag >>> 3) {
3137
+ case 1:
3138
+ message.key = reader.string();
3139
+ break;
3140
+ case 2:
3141
+ message.value = reader.string();
3142
+ break;
3143
+ case 3:
3144
+ message.index = reader.bool();
3145
+ break;
3146
+ default:
3147
+ reader.skipType(tag & 7);
3148
+ break;
3149
+ }
3150
+ }
3151
+ return message;
3152
+ },
3153
+ fromJSON(object) {
3154
+ return {
3155
+ key: isSet(object.key) ? String(object.key) : "",
3156
+ value: isSet(object.value) ? String(object.value) : "",
3157
+ index: isSet(object.index) ? Boolean(object.index) : false,
3158
+ };
3159
+ },
3160
+ toJSON(message) {
3161
+ const obj = {};
3162
+ message.key !== undefined && (obj.key = message.key);
3163
+ message.value !== undefined && (obj.value = message.value);
3164
+ message.index !== undefined && (obj.index = message.index);
3165
+ return obj;
3166
+ },
3167
+ fromPartial(object) {
3168
+ const message = createBaseEventAttribute();
3169
+ message.key = object.key ?? "";
3170
+ message.value = object.value ?? "";
3171
+ message.index = object.index ?? false;
3172
+ return message;
3173
+ },
3174
+ };
3175
+ function createBaseTxResult() {
3176
+ return { height: 0, index: 0, tx: new Uint8Array(), result: undefined };
3177
+ }
3178
+ export const TxResult = {
3179
+ encode(message, writer = _m0.Writer.create()) {
3180
+ if (message.height !== 0) {
3181
+ writer.uint32(8).int64(message.height);
3182
+ }
3183
+ if (message.index !== 0) {
3184
+ writer.uint32(16).uint32(message.index);
3185
+ }
3186
+ if (message.tx.length !== 0) {
3187
+ writer.uint32(26).bytes(message.tx);
3188
+ }
3189
+ if (message.result !== undefined) {
3190
+ ResponseDeliverTx.encode(message.result, writer.uint32(34).fork()).ldelim();
3191
+ }
3192
+ return writer;
3193
+ },
3194
+ decode(input, length) {
3195
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3196
+ let end = length === undefined ? reader.len : reader.pos + length;
3197
+ const message = createBaseTxResult();
3198
+ while (reader.pos < end) {
3199
+ const tag = reader.uint32();
3200
+ switch (tag >>> 3) {
3201
+ case 1:
3202
+ message.height = longToNumber(reader.int64());
3203
+ break;
3204
+ case 2:
3205
+ message.index = reader.uint32();
3206
+ break;
3207
+ case 3:
3208
+ message.tx = reader.bytes();
3209
+ break;
3210
+ case 4:
3211
+ message.result = ResponseDeliverTx.decode(reader, reader.uint32());
3212
+ break;
3213
+ default:
3214
+ reader.skipType(tag & 7);
3215
+ break;
3216
+ }
3217
+ }
3218
+ return message;
3219
+ },
3220
+ fromJSON(object) {
3221
+ return {
3222
+ height: isSet(object.height) ? Number(object.height) : 0,
3223
+ index: isSet(object.index) ? Number(object.index) : 0,
3224
+ tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
3225
+ result: isSet(object.result) ? ResponseDeliverTx.fromJSON(object.result) : undefined,
3226
+ };
3227
+ },
3228
+ toJSON(message) {
3229
+ const obj = {};
3230
+ message.height !== undefined && (obj.height = Math.round(message.height));
3231
+ message.index !== undefined && (obj.index = Math.round(message.index));
3232
+ message.tx !== undefined && (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array()));
3233
+ message.result !== undefined
3234
+ && (obj.result = message.result ? ResponseDeliverTx.toJSON(message.result) : undefined);
3235
+ return obj;
3236
+ },
3237
+ fromPartial(object) {
3238
+ const message = createBaseTxResult();
3239
+ message.height = object.height ?? 0;
3240
+ message.index = object.index ?? 0;
3241
+ message.tx = object.tx ?? new Uint8Array();
3242
+ message.result = (object.result !== undefined && object.result !== null)
3243
+ ? ResponseDeliverTx.fromPartial(object.result)
3244
+ : undefined;
3245
+ return message;
3246
+ },
3247
+ };
3248
+ function createBaseValidator() {
3249
+ return { address: new Uint8Array(), power: 0 };
3250
+ }
3251
+ export const Validator = {
3252
+ encode(message, writer = _m0.Writer.create()) {
3253
+ if (message.address.length !== 0) {
3254
+ writer.uint32(10).bytes(message.address);
3255
+ }
3256
+ if (message.power !== 0) {
3257
+ writer.uint32(24).int64(message.power);
3258
+ }
3259
+ return writer;
3260
+ },
3261
+ decode(input, length) {
3262
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3263
+ let end = length === undefined ? reader.len : reader.pos + length;
3264
+ const message = createBaseValidator();
3265
+ while (reader.pos < end) {
3266
+ const tag = reader.uint32();
3267
+ switch (tag >>> 3) {
3268
+ case 1:
3269
+ message.address = reader.bytes();
3270
+ break;
3271
+ case 3:
3272
+ message.power = longToNumber(reader.int64());
3273
+ break;
3274
+ default:
3275
+ reader.skipType(tag & 7);
3276
+ break;
3277
+ }
3278
+ }
3279
+ return message;
3280
+ },
3281
+ fromJSON(object) {
3282
+ return {
3283
+ address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(),
3284
+ power: isSet(object.power) ? Number(object.power) : 0,
3285
+ };
3286
+ },
3287
+ toJSON(message) {
3288
+ const obj = {};
3289
+ message.address !== undefined
3290
+ && (obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array()));
3291
+ message.power !== undefined && (obj.power = Math.round(message.power));
3292
+ return obj;
3293
+ },
3294
+ fromPartial(object) {
3295
+ const message = createBaseValidator();
3296
+ message.address = object.address ?? new Uint8Array();
3297
+ message.power = object.power ?? 0;
3298
+ return message;
3299
+ },
3300
+ };
3301
+ function createBaseValidatorUpdate() {
3302
+ return { pubKey: undefined, power: 0 };
3303
+ }
3304
+ export const ValidatorUpdate = {
3305
+ encode(message, writer = _m0.Writer.create()) {
3306
+ if (message.pubKey !== undefined) {
3307
+ PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim();
3308
+ }
3309
+ if (message.power !== 0) {
3310
+ writer.uint32(16).int64(message.power);
3311
+ }
3312
+ return writer;
3313
+ },
3314
+ decode(input, length) {
3315
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3316
+ let end = length === undefined ? reader.len : reader.pos + length;
3317
+ const message = createBaseValidatorUpdate();
3318
+ while (reader.pos < end) {
3319
+ const tag = reader.uint32();
3320
+ switch (tag >>> 3) {
3321
+ case 1:
3322
+ message.pubKey = PublicKey.decode(reader, reader.uint32());
3323
+ break;
3324
+ case 2:
3325
+ message.power = longToNumber(reader.int64());
3326
+ break;
3327
+ default:
3328
+ reader.skipType(tag & 7);
3329
+ break;
3330
+ }
3331
+ }
3332
+ return message;
3333
+ },
3334
+ fromJSON(object) {
3335
+ return {
3336
+ pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined,
3337
+ power: isSet(object.power) ? Number(object.power) : 0,
3338
+ };
3339
+ },
3340
+ toJSON(message) {
3341
+ const obj = {};
3342
+ message.pubKey !== undefined && (obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined);
3343
+ message.power !== undefined && (obj.power = Math.round(message.power));
3344
+ return obj;
3345
+ },
3346
+ fromPartial(object) {
3347
+ const message = createBaseValidatorUpdate();
3348
+ message.pubKey = (object.pubKey !== undefined && object.pubKey !== null)
3349
+ ? PublicKey.fromPartial(object.pubKey)
3350
+ : undefined;
3351
+ message.power = object.power ?? 0;
3352
+ return message;
3353
+ },
3354
+ };
3355
+ function createBaseVoteInfo() {
3356
+ return { validator: undefined, signedLastBlock: false };
3357
+ }
3358
+ export const VoteInfo = {
3359
+ encode(message, writer = _m0.Writer.create()) {
3360
+ if (message.validator !== undefined) {
3361
+ Validator.encode(message.validator, writer.uint32(10).fork()).ldelim();
3362
+ }
3363
+ if (message.signedLastBlock === true) {
3364
+ writer.uint32(16).bool(message.signedLastBlock);
3365
+ }
3366
+ return writer;
3367
+ },
3368
+ decode(input, length) {
3369
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3370
+ let end = length === undefined ? reader.len : reader.pos + length;
3371
+ const message = createBaseVoteInfo();
3372
+ while (reader.pos < end) {
3373
+ const tag = reader.uint32();
3374
+ switch (tag >>> 3) {
3375
+ case 1:
3376
+ message.validator = Validator.decode(reader, reader.uint32());
3377
+ break;
3378
+ case 2:
3379
+ message.signedLastBlock = reader.bool();
3380
+ break;
3381
+ default:
3382
+ reader.skipType(tag & 7);
3383
+ break;
3384
+ }
3385
+ }
3386
+ return message;
3387
+ },
3388
+ fromJSON(object) {
3389
+ return {
3390
+ validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined,
3391
+ signedLastBlock: isSet(object.signedLastBlock) ? Boolean(object.signedLastBlock) : false,
3392
+ };
3393
+ },
3394
+ toJSON(message) {
3395
+ const obj = {};
3396
+ message.validator !== undefined
3397
+ && (obj.validator = message.validator ? Validator.toJSON(message.validator) : undefined);
3398
+ message.signedLastBlock !== undefined && (obj.signedLastBlock = message.signedLastBlock);
3399
+ return obj;
3400
+ },
3401
+ fromPartial(object) {
3402
+ const message = createBaseVoteInfo();
3403
+ message.validator = (object.validator !== undefined && object.validator !== null)
3404
+ ? Validator.fromPartial(object.validator)
3405
+ : undefined;
3406
+ message.signedLastBlock = object.signedLastBlock ?? false;
3407
+ return message;
3408
+ },
3409
+ };
3410
+ function createBaseExtendedVoteInfo() {
3411
+ return { validator: undefined, signedLastBlock: false, voteExtension: new Uint8Array() };
3412
+ }
3413
+ export const ExtendedVoteInfo = {
3414
+ encode(message, writer = _m0.Writer.create()) {
3415
+ if (message.validator !== undefined) {
3416
+ Validator.encode(message.validator, writer.uint32(10).fork()).ldelim();
3417
+ }
3418
+ if (message.signedLastBlock === true) {
3419
+ writer.uint32(16).bool(message.signedLastBlock);
3420
+ }
3421
+ if (message.voteExtension.length !== 0) {
3422
+ writer.uint32(26).bytes(message.voteExtension);
3423
+ }
3424
+ return writer;
3425
+ },
3426
+ decode(input, length) {
3427
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3428
+ let end = length === undefined ? reader.len : reader.pos + length;
3429
+ const message = createBaseExtendedVoteInfo();
3430
+ while (reader.pos < end) {
3431
+ const tag = reader.uint32();
3432
+ switch (tag >>> 3) {
3433
+ case 1:
3434
+ message.validator = Validator.decode(reader, reader.uint32());
3435
+ break;
3436
+ case 2:
3437
+ message.signedLastBlock = reader.bool();
3438
+ break;
3439
+ case 3:
3440
+ message.voteExtension = reader.bytes();
3441
+ break;
3442
+ default:
3443
+ reader.skipType(tag & 7);
3444
+ break;
3445
+ }
3446
+ }
3447
+ return message;
3448
+ },
3449
+ fromJSON(object) {
3450
+ return {
3451
+ validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined,
3452
+ signedLastBlock: isSet(object.signedLastBlock) ? Boolean(object.signedLastBlock) : false,
3453
+ voteExtension: isSet(object.voteExtension) ? bytesFromBase64(object.voteExtension) : new Uint8Array(),
3454
+ };
3455
+ },
3456
+ toJSON(message) {
3457
+ const obj = {};
3458
+ message.validator !== undefined
3459
+ && (obj.validator = message.validator ? Validator.toJSON(message.validator) : undefined);
3460
+ message.signedLastBlock !== undefined && (obj.signedLastBlock = message.signedLastBlock);
3461
+ message.voteExtension !== undefined
3462
+ && (obj.voteExtension = base64FromBytes(message.voteExtension !== undefined ? message.voteExtension : new Uint8Array()));
3463
+ return obj;
3464
+ },
3465
+ fromPartial(object) {
3466
+ const message = createBaseExtendedVoteInfo();
3467
+ message.validator = (object.validator !== undefined && object.validator !== null)
3468
+ ? Validator.fromPartial(object.validator)
3469
+ : undefined;
3470
+ message.signedLastBlock = object.signedLastBlock ?? false;
3471
+ message.voteExtension = object.voteExtension ?? new Uint8Array();
3472
+ return message;
3473
+ },
3474
+ };
3475
+ function createBaseMisbehavior() {
3476
+ return { type: 0, validator: undefined, height: 0, time: undefined, totalVotingPower: 0 };
3477
+ }
3478
+ export const Misbehavior = {
3479
+ encode(message, writer = _m0.Writer.create()) {
3480
+ if (message.type !== 0) {
3481
+ writer.uint32(8).int32(message.type);
3482
+ }
3483
+ if (message.validator !== undefined) {
3484
+ Validator.encode(message.validator, writer.uint32(18).fork()).ldelim();
3485
+ }
3486
+ if (message.height !== 0) {
3487
+ writer.uint32(24).int64(message.height);
3488
+ }
3489
+ if (message.time !== undefined) {
3490
+ Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim();
3491
+ }
3492
+ if (message.totalVotingPower !== 0) {
3493
+ writer.uint32(40).int64(message.totalVotingPower);
3494
+ }
3495
+ return writer;
3496
+ },
3497
+ decode(input, length) {
3498
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3499
+ let end = length === undefined ? reader.len : reader.pos + length;
3500
+ const message = createBaseMisbehavior();
3501
+ while (reader.pos < end) {
3502
+ const tag = reader.uint32();
3503
+ switch (tag >>> 3) {
3504
+ case 1:
3505
+ message.type = reader.int32();
3506
+ break;
3507
+ case 2:
3508
+ message.validator = Validator.decode(reader, reader.uint32());
3509
+ break;
3510
+ case 3:
3511
+ message.height = longToNumber(reader.int64());
3512
+ break;
3513
+ case 4:
3514
+ message.time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3515
+ break;
3516
+ case 5:
3517
+ message.totalVotingPower = longToNumber(reader.int64());
3518
+ break;
3519
+ default:
3520
+ reader.skipType(tag & 7);
3521
+ break;
3522
+ }
3523
+ }
3524
+ return message;
3525
+ },
3526
+ fromJSON(object) {
3527
+ return {
3528
+ type: isSet(object.type) ? misbehaviorTypeFromJSON(object.type) : 0,
3529
+ validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined,
3530
+ height: isSet(object.height) ? Number(object.height) : 0,
3531
+ time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,
3532
+ totalVotingPower: isSet(object.totalVotingPower) ? Number(object.totalVotingPower) : 0,
3533
+ };
3534
+ },
3535
+ toJSON(message) {
3536
+ const obj = {};
3537
+ message.type !== undefined && (obj.type = misbehaviorTypeToJSON(message.type));
3538
+ message.validator !== undefined
3539
+ && (obj.validator = message.validator ? Validator.toJSON(message.validator) : undefined);
3540
+ message.height !== undefined && (obj.height = Math.round(message.height));
3541
+ message.time !== undefined && (obj.time = message.time.toISOString());
3542
+ message.totalVotingPower !== undefined && (obj.totalVotingPower = Math.round(message.totalVotingPower));
3543
+ return obj;
3544
+ },
3545
+ fromPartial(object) {
3546
+ const message = createBaseMisbehavior();
3547
+ message.type = object.type ?? 0;
3548
+ message.validator = (object.validator !== undefined && object.validator !== null)
3549
+ ? Validator.fromPartial(object.validator)
3550
+ : undefined;
3551
+ message.height = object.height ?? 0;
3552
+ message.time = object.time ?? undefined;
3553
+ message.totalVotingPower = object.totalVotingPower ?? 0;
3554
+ return message;
3555
+ },
3556
+ };
3557
+ function createBaseSnapshot() {
3558
+ return { height: 0, format: 0, chunks: 0, hash: new Uint8Array(), metadata: new Uint8Array() };
3559
+ }
3560
+ export const Snapshot = {
3561
+ encode(message, writer = _m0.Writer.create()) {
3562
+ if (message.height !== 0) {
3563
+ writer.uint32(8).uint64(message.height);
3564
+ }
3565
+ if (message.format !== 0) {
3566
+ writer.uint32(16).uint32(message.format);
3567
+ }
3568
+ if (message.chunks !== 0) {
3569
+ writer.uint32(24).uint32(message.chunks);
3570
+ }
3571
+ if (message.hash.length !== 0) {
3572
+ writer.uint32(34).bytes(message.hash);
3573
+ }
3574
+ if (message.metadata.length !== 0) {
3575
+ writer.uint32(42).bytes(message.metadata);
3576
+ }
3577
+ return writer;
3578
+ },
3579
+ decode(input, length) {
3580
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
3581
+ let end = length === undefined ? reader.len : reader.pos + length;
3582
+ const message = createBaseSnapshot();
3583
+ while (reader.pos < end) {
3584
+ const tag = reader.uint32();
3585
+ switch (tag >>> 3) {
3586
+ case 1:
3587
+ message.height = longToNumber(reader.uint64());
3588
+ break;
3589
+ case 2:
3590
+ message.format = reader.uint32();
3591
+ break;
3592
+ case 3:
3593
+ message.chunks = reader.uint32();
3594
+ break;
3595
+ case 4:
3596
+ message.hash = reader.bytes();
3597
+ break;
3598
+ case 5:
3599
+ message.metadata = reader.bytes();
3600
+ break;
3601
+ default:
3602
+ reader.skipType(tag & 7);
3603
+ break;
3604
+ }
3605
+ }
3606
+ return message;
3607
+ },
3608
+ fromJSON(object) {
3609
+ return {
3610
+ height: isSet(object.height) ? Number(object.height) : 0,
3611
+ format: isSet(object.format) ? Number(object.format) : 0,
3612
+ chunks: isSet(object.chunks) ? Number(object.chunks) : 0,
3613
+ hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(),
3614
+ metadata: isSet(object.metadata) ? bytesFromBase64(object.metadata) : new Uint8Array(),
3615
+ };
3616
+ },
3617
+ toJSON(message) {
3618
+ const obj = {};
3619
+ message.height !== undefined && (obj.height = Math.round(message.height));
3620
+ message.format !== undefined && (obj.format = Math.round(message.format));
3621
+ message.chunks !== undefined && (obj.chunks = Math.round(message.chunks));
3622
+ message.hash !== undefined
3623
+ && (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
3624
+ message.metadata !== undefined
3625
+ && (obj.metadata = base64FromBytes(message.metadata !== undefined ? message.metadata : new Uint8Array()));
3626
+ return obj;
3627
+ },
3628
+ fromPartial(object) {
3629
+ const message = createBaseSnapshot();
3630
+ message.height = object.height ?? 0;
3631
+ message.format = object.format ?? 0;
3632
+ message.chunks = object.chunks ?? 0;
3633
+ message.hash = object.hash ?? new Uint8Array();
3634
+ message.metadata = object.metadata ?? new Uint8Array();
3635
+ return message;
3636
+ },
3637
+ };
3638
+ export class ABCIApplicationClientImpl {
3639
+ constructor(rpc) {
3640
+ this.rpc = rpc;
3641
+ this.Echo = this.Echo.bind(this);
3642
+ this.Flush = this.Flush.bind(this);
3643
+ this.Info = this.Info.bind(this);
3644
+ this.DeliverTx = this.DeliverTx.bind(this);
3645
+ this.CheckTx = this.CheckTx.bind(this);
3646
+ this.Query = this.Query.bind(this);
3647
+ this.Commit = this.Commit.bind(this);
3648
+ this.InitChain = this.InitChain.bind(this);
3649
+ this.BeginBlock = this.BeginBlock.bind(this);
3650
+ this.EndBlock = this.EndBlock.bind(this);
3651
+ this.ListSnapshots = this.ListSnapshots.bind(this);
3652
+ this.OfferSnapshot = this.OfferSnapshot.bind(this);
3653
+ this.LoadSnapshotChunk = this.LoadSnapshotChunk.bind(this);
3654
+ this.ApplySnapshotChunk = this.ApplySnapshotChunk.bind(this);
3655
+ this.PrepareProposal = this.PrepareProposal.bind(this);
3656
+ this.ProcessProposal = this.ProcessProposal.bind(this);
3657
+ }
3658
+ Echo(request) {
3659
+ const data = RequestEcho.encode(request).finish();
3660
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Echo", data);
3661
+ return promise.then((data) => ResponseEcho.decode(new _m0.Reader(data)));
3662
+ }
3663
+ Flush(request) {
3664
+ const data = RequestFlush.encode(request).finish();
3665
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Flush", data);
3666
+ return promise.then((data) => ResponseFlush.decode(new _m0.Reader(data)));
3667
+ }
3668
+ Info(request) {
3669
+ const data = RequestInfo.encode(request).finish();
3670
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Info", data);
3671
+ return promise.then((data) => ResponseInfo.decode(new _m0.Reader(data)));
3672
+ }
3673
+ DeliverTx(request) {
3674
+ const data = RequestDeliverTx.encode(request).finish();
3675
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "DeliverTx", data);
3676
+ return promise.then((data) => ResponseDeliverTx.decode(new _m0.Reader(data)));
3677
+ }
3678
+ CheckTx(request) {
3679
+ const data = RequestCheckTx.encode(request).finish();
3680
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "CheckTx", data);
3681
+ return promise.then((data) => ResponseCheckTx.decode(new _m0.Reader(data)));
3682
+ }
3683
+ Query(request) {
3684
+ const data = RequestQuery.encode(request).finish();
3685
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Query", data);
3686
+ return promise.then((data) => ResponseQuery.decode(new _m0.Reader(data)));
3687
+ }
3688
+ Commit(request) {
3689
+ const data = RequestCommit.encode(request).finish();
3690
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "Commit", data);
3691
+ return promise.then((data) => ResponseCommit.decode(new _m0.Reader(data)));
3692
+ }
3693
+ InitChain(request) {
3694
+ const data = RequestInitChain.encode(request).finish();
3695
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "InitChain", data);
3696
+ return promise.then((data) => ResponseInitChain.decode(new _m0.Reader(data)));
3697
+ }
3698
+ BeginBlock(request) {
3699
+ const data = RequestBeginBlock.encode(request).finish();
3700
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "BeginBlock", data);
3701
+ return promise.then((data) => ResponseBeginBlock.decode(new _m0.Reader(data)));
3702
+ }
3703
+ EndBlock(request) {
3704
+ const data = RequestEndBlock.encode(request).finish();
3705
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "EndBlock", data);
3706
+ return promise.then((data) => ResponseEndBlock.decode(new _m0.Reader(data)));
3707
+ }
3708
+ ListSnapshots(request) {
3709
+ const data = RequestListSnapshots.encode(request).finish();
3710
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "ListSnapshots", data);
3711
+ return promise.then((data) => ResponseListSnapshots.decode(new _m0.Reader(data)));
3712
+ }
3713
+ OfferSnapshot(request) {
3714
+ const data = RequestOfferSnapshot.encode(request).finish();
3715
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "OfferSnapshot", data);
3716
+ return promise.then((data) => ResponseOfferSnapshot.decode(new _m0.Reader(data)));
3717
+ }
3718
+ LoadSnapshotChunk(request) {
3719
+ const data = RequestLoadSnapshotChunk.encode(request).finish();
3720
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "LoadSnapshotChunk", data);
3721
+ return promise.then((data) => ResponseLoadSnapshotChunk.decode(new _m0.Reader(data)));
3722
+ }
3723
+ ApplySnapshotChunk(request) {
3724
+ const data = RequestApplySnapshotChunk.encode(request).finish();
3725
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "ApplySnapshotChunk", data);
3726
+ return promise.then((data) => ResponseApplySnapshotChunk.decode(new _m0.Reader(data)));
3727
+ }
3728
+ PrepareProposal(request) {
3729
+ const data = RequestPrepareProposal.encode(request).finish();
3730
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "PrepareProposal", data);
3731
+ return promise.then((data) => ResponsePrepareProposal.decode(new _m0.Reader(data)));
3732
+ }
3733
+ ProcessProposal(request) {
3734
+ const data = RequestProcessProposal.encode(request).finish();
3735
+ const promise = this.rpc.request("tendermint.abci.ABCIApplication", "ProcessProposal", data);
3736
+ return promise.then((data) => ResponseProcessProposal.decode(new _m0.Reader(data)));
3737
+ }
3738
+ }
3739
+ var globalThis = (() => {
3740
+ if (typeof globalThis !== "undefined") {
3741
+ return globalThis;
3742
+ }
3743
+ if (typeof self !== "undefined") {
3744
+ return self;
3745
+ }
3746
+ if (typeof window !== "undefined") {
3747
+ return window;
3748
+ }
3749
+ if (typeof global !== "undefined") {
3750
+ return global;
3751
+ }
3752
+ throw "Unable to locate global object";
3753
+ })();
3754
+ function bytesFromBase64(b64) {
3755
+ if (globalThis.Buffer) {
3756
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
3757
+ }
3758
+ else {
3759
+ const bin = globalThis.atob(b64);
3760
+ const arr = new Uint8Array(bin.length);
3761
+ for (let i = 0; i < bin.length; ++i) {
3762
+ arr[i] = bin.charCodeAt(i);
3763
+ }
3764
+ return arr;
3765
+ }
3766
+ }
3767
+ function base64FromBytes(arr) {
3768
+ if (globalThis.Buffer) {
3769
+ return globalThis.Buffer.from(arr).toString("base64");
3770
+ }
3771
+ else {
3772
+ const bin = [];
3773
+ arr.forEach((byte) => {
3774
+ bin.push(String.fromCharCode(byte));
3775
+ });
3776
+ return globalThis.btoa(bin.join(""));
3777
+ }
3778
+ }
3779
+ function toTimestamp(date) {
3780
+ const seconds = date.getTime() / 1000;
3781
+ const nanos = (date.getTime() % 1000) * 1000000;
3782
+ return { seconds, nanos };
3783
+ }
3784
+ function fromTimestamp(t) {
3785
+ let millis = t.seconds * 1000;
3786
+ millis += t.nanos / 1000000;
3787
+ return new Date(millis);
3788
+ }
3789
+ function fromJsonTimestamp(o) {
3790
+ if (o instanceof Date) {
3791
+ return o;
3792
+ }
3793
+ else if (typeof o === "string") {
3794
+ return new Date(o);
3795
+ }
3796
+ else {
3797
+ return fromTimestamp(Timestamp.fromJSON(o));
3798
+ }
3799
+ }
3800
+ function longToNumber(long) {
3801
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
3802
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
3803
+ }
3804
+ return long.toNumber();
3805
+ }
3806
+ if (_m0.util.Long !== Long) {
3807
+ _m0.util.Long = Long;
3808
+ _m0.configure();
3809
+ }
3810
+ function isSet(value) {
3811
+ return value !== null && value !== undefined;
3812
+ }