@iconlake/client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/client.ts +170 -0
  2. package/cosmos.auth.v1beta1/index.ts +6 -0
  3. package/cosmos.auth.v1beta1/module.ts +102 -0
  4. package/cosmos.auth.v1beta1/registry.ts +7 -0
  5. package/cosmos.auth.v1beta1/rest.ts +641 -0
  6. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +324 -0
  7. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +95 -0
  8. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +1212 -0
  9. package/cosmos.auth.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  10. package/cosmos.auth.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  11. package/cosmos.auth.v1beta1/types/gogoproto/gogo.ts +2 -0
  12. package/cosmos.auth.v1beta1/types/google/api/annotations.ts +2 -0
  13. package/cosmos.auth.v1beta1/types/google/api/http.ts +589 -0
  14. package/cosmos.auth.v1beta1/types/google/protobuf/any.ts +240 -0
  15. package/cosmos.auth.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  16. package/cosmos.auth.v1beta1/types.ts +11 -0
  17. package/cosmos.authz.v1beta1/index.ts +6 -0
  18. package/cosmos.authz.v1beta1/module.ts +207 -0
  19. package/cosmos.authz.v1beta1/registry.ts +13 -0
  20. package/cosmos.authz.v1beta1/rest.ts +604 -0
  21. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/authz.ts +325 -0
  22. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/event.ts +175 -0
  23. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/genesis.ts +78 -0
  24. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/query.ts +516 -0
  25. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +493 -0
  26. package/cosmos.authz.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  27. package/cosmos.authz.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  28. package/cosmos.authz.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  29. package/cosmos.authz.v1beta1/types/gogoproto/gogo.ts +2 -0
  30. package/cosmos.authz.v1beta1/types/google/api/annotations.ts +2 -0
  31. package/cosmos.authz.v1beta1/types/google/api/http.ts +589 -0
  32. package/cosmos.authz.v1beta1/types/google/protobuf/any.ts +240 -0
  33. package/cosmos.authz.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  34. package/cosmos.authz.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  35. package/cosmos.authz.v1beta1/types.ts +17 -0
  36. package/cosmos.bank.v1beta1/index.ts +6 -0
  37. package/cosmos.bank.v1beta1/module.ts +182 -0
  38. package/cosmos.bank.v1beta1/registry.ts +11 -0
  39. package/cosmos.bank.v1beta1/rest.ts +656 -0
  40. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +77 -0
  41. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +604 -0
  42. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +203 -0
  43. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +1366 -0
  44. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +289 -0
  45. package/cosmos.bank.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  46. package/cosmos.bank.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  47. package/cosmos.bank.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  48. package/cosmos.bank.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  49. package/cosmos.bank.v1beta1/types/gogoproto/gogo.ts +2 -0
  50. package/cosmos.bank.v1beta1/types/google/api/annotations.ts +2 -0
  51. package/cosmos.bank.v1beta1/types/google/api/http.ts +589 -0
  52. package/cosmos.bank.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  53. package/cosmos.bank.v1beta1/types.ts +25 -0
  54. package/cosmos.base.node.v1beta1/index.ts +6 -0
  55. package/cosmos.base.node.v1beta1/module.ts +96 -0
  56. package/cosmos.base.node.v1beta1/registry.ts +7 -0
  57. package/cosmos.base.node.v1beta1/rest.ts +170 -0
  58. package/cosmos.base.node.v1beta1/types/cosmos/base/node/v1beta1/query.ts +137 -0
  59. package/cosmos.base.node.v1beta1/types/google/api/annotations.ts +2 -0
  60. package/cosmos.base.node.v1beta1/types/google/api/http.ts +589 -0
  61. package/cosmos.base.node.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  62. package/cosmos.base.node.v1beta1/types.ts +5 -0
  63. package/cosmos.base.tendermint.v1beta1/index.ts +6 -0
  64. package/cosmos.base.tendermint.v1beta1/module.ts +110 -0
  65. package/cosmos.base.tendermint.v1beta1/registry.ts +7 -0
  66. package/cosmos.base.tendermint.v1beta1/rest.ts +1147 -0
  67. package/cosmos.base.tendermint.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  68. package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +1646 -0
  69. package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/types.ts +442 -0
  70. package/cosmos.base.tendermint.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  71. package/cosmos.base.tendermint.v1beta1/types/gogoproto/gogo.ts +2 -0
  72. package/cosmos.base.tendermint.v1beta1/types/google/api/annotations.ts +2 -0
  73. package/cosmos.base.tendermint.v1beta1/types/google/api/http.ts +589 -0
  74. package/cosmos.base.tendermint.v1beta1/types/google/protobuf/any.ts +240 -0
  75. package/cosmos.base.tendermint.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  76. package/cosmos.base.tendermint.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  77. package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/keys.ts +129 -0
  78. package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/proof.ts +439 -0
  79. package/cosmos.base.tendermint.v1beta1/types/tendermint/p2p/types.ts +423 -0
  80. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/block.ts +112 -0
  81. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/evidence.ts +412 -0
  82. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/types.ts +1452 -0
  83. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/validator.ts +308 -0
  84. package/cosmos.base.tendermint.v1beta1/types/tendermint/version/types.ts +184 -0
  85. package/cosmos.base.tendermint.v1beta1/types.ts +19 -0
  86. package/cosmos.crisis.v1beta1/index.ts +6 -0
  87. package/cosmos.crisis.v1beta1/module.ts +129 -0
  88. package/cosmos.crisis.v1beta1/registry.ts +9 -0
  89. package/cosmos.crisis.v1beta1/rest.ts +152 -0
  90. package/cosmos.crisis.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  91. package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/genesis.ts +79 -0
  92. package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +159 -0
  93. package/cosmos.crisis.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  94. package/cosmos.crisis.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  95. package/cosmos.crisis.v1beta1/types/gogoproto/gogo.ts +2 -0
  96. package/cosmos.crisis.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  97. package/cosmos.crisis.v1beta1/types.ts +5 -0
  98. package/cosmos.distribution.v1beta1/index.ts +6 -0
  99. package/cosmos.distribution.v1beta1/module.ts +266 -0
  100. package/cosmos.distribution.v1beta1/registry.ts +15 -0
  101. package/cosmos.distribution.v1beta1/rest.ts +557 -0
  102. package/cosmos.distribution.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  103. package/cosmos.distribution.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  104. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +945 -0
  105. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +849 -0
  106. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +1289 -0
  107. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +550 -0
  108. package/cosmos.distribution.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  109. package/cosmos.distribution.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  110. package/cosmos.distribution.v1beta1/types/gogoproto/gogo.ts +2 -0
  111. package/cosmos.distribution.v1beta1/types/google/api/annotations.ts +2 -0
  112. package/cosmos.distribution.v1beta1/types/google/api/http.ts +589 -0
  113. package/cosmos.distribution.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  114. package/cosmos.distribution.v1beta1/types.ts +43 -0
  115. package/cosmos.evidence.v1beta1/index.ts +6 -0
  116. package/cosmos.evidence.v1beta1/module.ts +131 -0
  117. package/cosmos.evidence.v1beta1/registry.ts +9 -0
  118. package/cosmos.evidence.v1beta1/rest.ts +402 -0
  119. package/cosmos.evidence.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  120. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +161 -0
  121. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/genesis.ts +73 -0
  122. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +343 -0
  123. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +213 -0
  124. package/cosmos.evidence.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  125. package/cosmos.evidence.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  126. package/cosmos.evidence.v1beta1/types/gogoproto/gogo.ts +2 -0
  127. package/cosmos.evidence.v1beta1/types/google/api/annotations.ts +2 -0
  128. package/cosmos.evidence.v1beta1/types/google/api/http.ts +589 -0
  129. package/cosmos.evidence.v1beta1/types/google/protobuf/any.ts +240 -0
  130. package/cosmos.evidence.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  131. package/cosmos.evidence.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  132. package/cosmos.evidence.v1beta1/types.ts +7 -0
  133. package/cosmos.feegrant.v1beta1/index.ts +6 -0
  134. package/cosmos.feegrant.v1beta1/module.ts +170 -0
  135. package/cosmos.feegrant.v1beta1/registry.ts +11 -0
  136. package/cosmos.feegrant.v1beta1/rest.ts +452 -0
  137. package/cosmos.feegrant.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  138. package/cosmos.feegrant.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  139. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/feegrant.ts +409 -0
  140. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/genesis.ts +76 -0
  141. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/query.ts +484 -0
  142. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/tx.ts +294 -0
  143. package/cosmos.feegrant.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  144. package/cosmos.feegrant.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  145. package/cosmos.feegrant.v1beta1/types/gogoproto/gogo.ts +2 -0
  146. package/cosmos.feegrant.v1beta1/types/google/api/annotations.ts +2 -0
  147. package/cosmos.feegrant.v1beta1/types/google/api/http.ts +589 -0
  148. package/cosmos.feegrant.v1beta1/types/google/protobuf/any.ts +240 -0
  149. package/cosmos.feegrant.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  150. package/cosmos.feegrant.v1beta1/types/google/protobuf/duration.ts +187 -0
  151. package/cosmos.feegrant.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  152. package/cosmos.feegrant.v1beta1/types.ts +13 -0
  153. package/cosmos.gov.v1/index.ts +6 -0
  154. package/cosmos.gov.v1/module.ts +244 -0
  155. package/cosmos.gov.v1/registry.ts +15 -0
  156. package/cosmos.gov.v1/rest.ts +798 -0
  157. package/cosmos.gov.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  158. package/cosmos.gov.v1/types/cosmos/base/v1beta1/coin.ts +261 -0
  159. package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +208 -0
  160. package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +925 -0
  161. package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +1202 -0
  162. package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +763 -0
  163. package/cosmos.gov.v1/types/cosmos/msg/v1/msg.ts +2 -0
  164. package/cosmos.gov.v1/types/cosmos_proto/cosmos.ts +247 -0
  165. package/cosmos.gov.v1/types/gogoproto/gogo.ts +2 -0
  166. package/cosmos.gov.v1/types/google/api/annotations.ts +2 -0
  167. package/cosmos.gov.v1/types/google/api/http.ts +589 -0
  168. package/cosmos.gov.v1/types/google/protobuf/any.ts +240 -0
  169. package/cosmos.gov.v1/types/google/protobuf/descriptor.ts +3753 -0
  170. package/cosmos.gov.v1/types/google/protobuf/duration.ts +187 -0
  171. package/cosmos.gov.v1/types/google/protobuf/timestamp.ts +216 -0
  172. package/cosmos.gov.v1/types.ts +21 -0
  173. package/cosmos.gov.v1beta1/index.ts +6 -0
  174. package/cosmos.gov.v1beta1/module.ts +246 -0
  175. package/cosmos.gov.v1beta1/registry.ts +15 -0
  176. package/cosmos.gov.v1beta1/rest.ts +864 -0
  177. package/cosmos.gov.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  178. package/cosmos.gov.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  179. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +206 -0
  180. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +1015 -0
  181. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +1200 -0
  182. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +612 -0
  183. package/cosmos.gov.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  184. package/cosmos.gov.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  185. package/cosmos.gov.v1beta1/types/gogoproto/gogo.ts +2 -0
  186. package/cosmos.gov.v1beta1/types/google/api/annotations.ts +2 -0
  187. package/cosmos.gov.v1beta1/types/google/api/http.ts +589 -0
  188. package/cosmos.gov.v1beta1/types/google/protobuf/any.ts +240 -0
  189. package/cosmos.gov.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  190. package/cosmos.gov.v1beta1/types/google/protobuf/duration.ts +187 -0
  191. package/cosmos.gov.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  192. package/cosmos.gov.v1beta1/types.ts +23 -0
  193. package/cosmos.group.v1/index.ts +6 -0
  194. package/cosmos.group.v1/module.ts +598 -0
  195. package/cosmos.group.v1/registry.ts +35 -0
  196. package/cosmos.group.v1/rest.ts +1162 -0
  197. package/cosmos.group.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  198. package/cosmos.group.v1/types/cosmos/group/v1/events.ts +568 -0
  199. package/cosmos.group.v1/types/cosmos/group/v1/genesis.ts +228 -0
  200. package/cosmos.group.v1/types/cosmos/group/v1/query.ts +1897 -0
  201. package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +2113 -0
  202. package/cosmos.group.v1/types/cosmos/group/v1/types.ts +1422 -0
  203. package/cosmos.group.v1/types/cosmos/msg/v1/msg.ts +2 -0
  204. package/cosmos.group.v1/types/cosmos_proto/cosmos.ts +247 -0
  205. package/cosmos.group.v1/types/gogoproto/gogo.ts +2 -0
  206. package/cosmos.group.v1/types/google/api/annotations.ts +2 -0
  207. package/cosmos.group.v1/types/google/api/http.ts +589 -0
  208. package/cosmos.group.v1/types/google/protobuf/any.ts +240 -0
  209. package/cosmos.group.v1/types/google/protobuf/descriptor.ts +3753 -0
  210. package/cosmos.group.v1/types/google/protobuf/duration.ts +187 -0
  211. package/cosmos.group.v1/types/google/protobuf/timestamp.ts +216 -0
  212. package/cosmos.group.v1/types.ts +45 -0
  213. package/cosmos.mint.v1beta1/index.ts +6 -0
  214. package/cosmos.mint.v1beta1/module.ts +100 -0
  215. package/cosmos.mint.v1beta1/registry.ts +7 -0
  216. package/cosmos.mint.v1beta1/rest.ts +253 -0
  217. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +92 -0
  218. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +234 -0
  219. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/query.ts +412 -0
  220. package/cosmos.mint.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  221. package/cosmos.mint.v1beta1/types/gogoproto/gogo.ts +2 -0
  222. package/cosmos.mint.v1beta1/types/google/api/annotations.ts +2 -0
  223. package/cosmos.mint.v1beta1/types/google/api/http.ts +589 -0
  224. package/cosmos.mint.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  225. package/cosmos.mint.v1beta1/types.ts +9 -0
  226. package/cosmos.nft.v1beta1/index.ts +6 -0
  227. package/cosmos.nft.v1beta1/module.ts +108 -0
  228. package/cosmos.nft.v1beta1/registry.ts +7 -0
  229. package/cosmos.nft.v1beta1/rest.ts +685 -0
  230. package/cosmos.nft.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  231. package/cosmos.nft.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  232. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +251 -0
  233. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +163 -0
  234. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/nft.ts +240 -0
  235. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +964 -0
  236. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/tx.ts +173 -0
  237. package/cosmos.nft.v1beta1/types/google/api/annotations.ts +2 -0
  238. package/cosmos.nft.v1beta1/types/google/api/http.ts +589 -0
  239. package/cosmos.nft.v1beta1/types/google/protobuf/any.ts +240 -0
  240. package/cosmos.nft.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  241. package/cosmos.nft.v1beta1/types.ts +17 -0
  242. package/cosmos.params.v1beta1/index.ts +6 -0
  243. package/cosmos.params.v1beta1/module.ts +102 -0
  244. package/cosmos.params.v1beta1/registry.ts +7 -0
  245. package/cosmos.params.v1beta1/rest.ts +220 -0
  246. package/cosmos.params.v1beta1/types/cosmos/params/v1beta1/params.ts +174 -0
  247. package/cosmos.params.v1beta1/types/cosmos/params/v1beta1/query.ts +364 -0
  248. package/cosmos.params.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  249. package/cosmos.params.v1beta1/types/gogoproto/gogo.ts +2 -0
  250. package/cosmos.params.v1beta1/types/google/api/annotations.ts +2 -0
  251. package/cosmos.params.v1beta1/types/google/api/http.ts +589 -0
  252. package/cosmos.params.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  253. package/cosmos.params.v1beta1/types.ts +11 -0
  254. package/cosmos.slashing.v1beta1/index.ts +6 -0
  255. package/cosmos.slashing.v1beta1/module.ts +139 -0
  256. package/cosmos.slashing.v1beta1/registry.ts +9 -0
  257. package/cosmos.slashing.v1beta1/rest.ts +368 -0
  258. package/cosmos.slashing.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  259. package/cosmos.slashing.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  260. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +364 -0
  261. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/query.ts +411 -0
  262. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/slashing.ts +352 -0
  263. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +141 -0
  264. package/cosmos.slashing.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  265. package/cosmos.slashing.v1beta1/types/gogoproto/gogo.ts +2 -0
  266. package/cosmos.slashing.v1beta1/types/google/api/annotations.ts +2 -0
  267. package/cosmos.slashing.v1beta1/types/google/api/http.ts +589 -0
  268. package/cosmos.slashing.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  269. package/cosmos.slashing.v1beta1/types/google/protobuf/duration.ts +187 -0
  270. package/cosmos.slashing.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  271. package/cosmos.slashing.v1beta1/types.ts +15 -0
  272. package/cosmos.staking.v1beta1/index.ts +6 -0
  273. package/cosmos.staking.v1beta1/module.ts +340 -0
  274. package/cosmos.staking.v1beta1/registry.ts +19 -0
  275. package/cosmos.staking.v1beta1/rest.ts +1239 -0
  276. package/cosmos.staking.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  277. package/cosmos.staking.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  278. package/cosmos.staking.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  279. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/authz.ts +245 -0
  280. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +322 -0
  281. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +2109 -0
  282. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +1829 -0
  283. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +1005 -0
  284. package/cosmos.staking.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  285. package/cosmos.staking.v1beta1/types/gogoproto/gogo.ts +2 -0
  286. package/cosmos.staking.v1beta1/types/google/api/annotations.ts +2 -0
  287. package/cosmos.staking.v1beta1/types/google/api/http.ts +589 -0
  288. package/cosmos.staking.v1beta1/types/google/protobuf/any.ts +240 -0
  289. package/cosmos.staking.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  290. package/cosmos.staking.v1beta1/types/google/protobuf/duration.ts +187 -0
  291. package/cosmos.staking.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  292. package/cosmos.staking.v1beta1/types/tendermint/crypto/keys.ts +129 -0
  293. package/cosmos.staking.v1beta1/types/tendermint/crypto/proof.ts +439 -0
  294. package/cosmos.staking.v1beta1/types/tendermint/types/types.ts +1452 -0
  295. package/cosmos.staking.v1beta1/types/tendermint/types/validator.ts +308 -0
  296. package/cosmos.staking.v1beta1/types/tendermint/version/types.ts +184 -0
  297. package/cosmos.staking.v1beta1/types.ts +51 -0
  298. package/cosmos.tx.v1beta1/index.ts +6 -0
  299. package/cosmos.tx.v1beta1/module.ts +122 -0
  300. package/cosmos.tx.v1beta1/registry.ts +7 -0
  301. package/cosmos.tx.v1beta1/rest.ts +1372 -0
  302. package/cosmos.tx.v1beta1/types/cosmos/base/abci/v1beta1/abci.ts +1040 -0
  303. package/cosmos.tx.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  304. package/cosmos.tx.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  305. package/cosmos.tx.v1beta1/types/cosmos/crypto/multisig/v1beta1/multisig.ts +195 -0
  306. package/cosmos.tx.v1beta1/types/cosmos/tx/signing/v1beta1/signing.ts +556 -0
  307. package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +1057 -0
  308. package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/tx.ts +1355 -0
  309. package/cosmos.tx.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  310. package/cosmos.tx.v1beta1/types/gogoproto/gogo.ts +2 -0
  311. package/cosmos.tx.v1beta1/types/google/api/annotations.ts +2 -0
  312. package/cosmos.tx.v1beta1/types/google/api/http.ts +589 -0
  313. package/cosmos.tx.v1beta1/types/google/protobuf/any.ts +240 -0
  314. package/cosmos.tx.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  315. package/cosmos.tx.v1beta1/types/google/protobuf/duration.ts +187 -0
  316. package/cosmos.tx.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  317. package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +4154 -0
  318. package/cosmos.tx.v1beta1/types/tendermint/crypto/keys.ts +129 -0
  319. package/cosmos.tx.v1beta1/types/tendermint/crypto/proof.ts +439 -0
  320. package/cosmos.tx.v1beta1/types/tendermint/types/block.ts +112 -0
  321. package/cosmos.tx.v1beta1/types/tendermint/types/evidence.ts +412 -0
  322. package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +514 -0
  323. package/cosmos.tx.v1beta1/types/tendermint/types/types.ts +1452 -0
  324. package/cosmos.tx.v1beta1/types/tendermint/types/validator.ts +308 -0
  325. package/cosmos.tx.v1beta1/types/tendermint/version/types.ts +184 -0
  326. package/cosmos.tx.v1beta1/types.ts +31 -0
  327. package/cosmos.upgrade.v1beta1/index.ts +6 -0
  328. package/cosmos.upgrade.v1beta1/module.ts +170 -0
  329. package/cosmos.upgrade.v1beta1/registry.ts +11 -0
  330. package/cosmos.upgrade.v1beta1/rest.ts +468 -0
  331. package/cosmos.upgrade.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  332. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/query.ts +728 -0
  333. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +284 -0
  334. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  335. package/cosmos.upgrade.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  336. package/cosmos.upgrade.v1beta1/types/gogoproto/gogo.ts +2 -0
  337. package/cosmos.upgrade.v1beta1/types/google/api/annotations.ts +2 -0
  338. package/cosmos.upgrade.v1beta1/types/google/api/http.ts +589 -0
  339. package/cosmos.upgrade.v1beta1/types/google/protobuf/any.ts +240 -0
  340. package/cosmos.upgrade.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  341. package/cosmos.upgrade.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  342. package/cosmos.upgrade.v1beta1/types.ts +13 -0
  343. package/cosmos.vesting.v1beta1/index.ts +6 -0
  344. package/cosmos.vesting.v1beta1/module.ts +207 -0
  345. package/cosmos.vesting.v1beta1/registry.ts +13 -0
  346. package/cosmos.vesting.v1beta1/rest.ts +297 -0
  347. package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +324 -0
  348. package/cosmos.vesting.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  349. package/cosmos.vesting.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  350. package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/tx.ts +540 -0
  351. package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/vesting.ts +529 -0
  352. package/cosmos.vesting.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  353. package/cosmos.vesting.v1beta1/types/gogoproto/gogo.ts +2 -0
  354. package/cosmos.vesting.v1beta1/types/google/protobuf/any.ts +240 -0
  355. package/cosmos.vesting.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  356. package/cosmos.vesting.v1beta1/types.ts +17 -0
  357. package/env.ts +7 -0
  358. package/helpers.ts +32 -0
  359. package/ibc.applications.interchain_accounts.controller.v1/index.ts +6 -0
  360. package/ibc.applications.interchain_accounts.controller.v1/module.ts +98 -0
  361. package/ibc.applications.interchain_accounts.controller.v1/registry.ts +7 -0
  362. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +346 -0
  363. package/ibc.applications.interchain_accounts.controller.v1/types/gogoproto/gogo.ts +2 -0
  364. package/ibc.applications.interchain_accounts.controller.v1/types/google/api/annotations.ts +2 -0
  365. package/ibc.applications.interchain_accounts.controller.v1/types/google/api/http.ts +589 -0
  366. package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.ts +240 -0
  367. package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/descriptor.ts +3753 -0
  368. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +75 -0
  369. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/query.ts +274 -0
  370. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +361 -0
  371. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.ts +234 -0
  372. package/ibc.applications.interchain_accounts.controller.v1/types.ts +7 -0
  373. package/ibc.applications.interchain_accounts.host.v1/index.ts +6 -0
  374. package/ibc.applications.interchain_accounts.host.v1/module.ts +98 -0
  375. package/ibc.applications.interchain_accounts.host.v1/registry.ts +7 -0
  376. package/ibc.applications.interchain_accounts.host.v1/rest.ts +183 -0
  377. package/ibc.applications.interchain_accounts.host.v1/types/gogoproto/gogo.ts +2 -0
  378. package/ibc.applications.interchain_accounts.host.v1/types/google/api/annotations.ts +2 -0
  379. package/ibc.applications.interchain_accounts.host.v1/types/google/api/http.ts +589 -0
  380. package/ibc.applications.interchain_accounts.host.v1/types/google/protobuf/descriptor.ts +3753 -0
  381. package/ibc.applications.interchain_accounts.host.v1/types/ibc/applications/interchain_accounts/host/v1/host.ts +92 -0
  382. package/ibc.applications.interchain_accounts.host.v1/types/ibc/applications/interchain_accounts/host/v1/query.ts +141 -0
  383. package/ibc.applications.interchain_accounts.host.v1/types.ts +7 -0
  384. package/ibc.applications.transfer.v1/index.ts +6 -0
  385. package/ibc.applications.transfer.v1/module.ts +133 -0
  386. package/ibc.applications.transfer.v1/registry.ts +9 -0
  387. package/ibc.applications.transfer.v1/rest.ts +544 -0
  388. package/ibc.applications.transfer.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  389. package/ibc.applications.transfer.v1/types/cosmos/base/v1beta1/coin.ts +261 -0
  390. package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  391. package/ibc.applications.transfer.v1/types/cosmos_proto/cosmos.ts +247 -0
  392. package/ibc.applications.transfer.v1/types/gogoproto/gogo.ts +2 -0
  393. package/ibc.applications.transfer.v1/types/google/api/annotations.ts +2 -0
  394. package/ibc.applications.transfer.v1/types/google/api/http.ts +589 -0
  395. package/ibc.applications.transfer.v1/types/google/protobuf/any.ts +240 -0
  396. package/ibc.applications.transfer.v1/types/google/protobuf/descriptor.ts +3753 -0
  397. package/ibc.applications.transfer.v1/types/google/protobuf/timestamp.ts +216 -0
  398. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +100 -0
  399. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +659 -0
  400. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/transfer.ts +168 -0
  401. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.ts +287 -0
  402. package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +608 -0
  403. package/ibc.applications.transfer.v1/types.ts +9 -0
  404. package/ibc.core.channel.v1/index.ts +6 -0
  405. package/ibc.core.channel.v1/module.ts +112 -0
  406. package/ibc.core.channel.v1/registry.ts +7 -0
  407. package/ibc.core.channel.v1/rest.ts +1375 -0
  408. package/ibc.core.channel.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  409. package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  410. package/ibc.core.channel.v1/types/cosmos_proto/cosmos.ts +247 -0
  411. package/ibc.core.channel.v1/types/gogoproto/gogo.ts +2 -0
  412. package/ibc.core.channel.v1/types/google/api/annotations.ts +2 -0
  413. package/ibc.core.channel.v1/types/google/api/http.ts +589 -0
  414. package/ibc.core.channel.v1/types/google/protobuf/any.ts +240 -0
  415. package/ibc.core.channel.v1/types/google/protobuf/descriptor.ts +3753 -0
  416. package/ibc.core.channel.v1/types/google/protobuf/timestamp.ts +216 -0
  417. package/ibc.core.channel.v1/types/ibc/core/channel/v1/channel.ts +905 -0
  418. package/ibc.core.channel.v1/types/ibc/core/channel/v1/genesis.ts +301 -0
  419. package/ibc.core.channel.v1/types/ibc/core/channel/v1/query.ts +2472 -0
  420. package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +1784 -0
  421. package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +608 -0
  422. package/ibc.core.channel.v1/types.ts +21 -0
  423. package/ibc.core.client.v1/index.ts +6 -0
  424. package/ibc.core.client.v1/module.ts +114 -0
  425. package/ibc.core.client.v1/registry.ts +7 -0
  426. package/ibc.core.client.v1/rest.ts +1084 -0
  427. package/ibc.core.client.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  428. package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  429. package/ibc.core.client.v1/types/cosmos_proto/cosmos.ts +247 -0
  430. package/ibc.core.client.v1/types/gogoproto/gogo.ts +2 -0
  431. package/ibc.core.client.v1/types/google/api/annotations.ts +2 -0
  432. package/ibc.core.client.v1/types/google/api/http.ts +589 -0
  433. package/ibc.core.client.v1/types/google/protobuf/any.ts +240 -0
  434. package/ibc.core.client.v1/types/google/protobuf/descriptor.ts +3753 -0
  435. package/ibc.core.client.v1/types/google/protobuf/timestamp.ts +216 -0
  436. package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +608 -0
  437. package/ibc.core.client.v1/types/ibc/core/client/v1/genesis.ts +357 -0
  438. package/ibc.core.client.v1/types/ibc/core/client/v1/query.ts +1390 -0
  439. package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +691 -0
  440. package/ibc.core.client.v1/types.ts +23 -0
  441. package/ibc.core.connection.v1/index.ts +6 -0
  442. package/ibc.core.connection.v1/module.ts +110 -0
  443. package/ibc.core.connection.v1/registry.ts +7 -0
  444. package/ibc.core.connection.v1/rest.ts +889 -0
  445. package/ibc.core.connection.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  446. package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  447. package/ibc.core.connection.v1/types/cosmos_proto/cosmos.ts +247 -0
  448. package/ibc.core.connection.v1/types/gogoproto/gogo.ts +2 -0
  449. package/ibc.core.connection.v1/types/google/api/annotations.ts +2 -0
  450. package/ibc.core.connection.v1/types/google/api/http.ts +589 -0
  451. package/ibc.core.connection.v1/types/google/protobuf/any.ts +240 -0
  452. package/ibc.core.connection.v1/types/google/protobuf/descriptor.ts +3753 -0
  453. package/ibc.core.connection.v1/types/google/protobuf/timestamp.ts +216 -0
  454. package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +608 -0
  455. package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +299 -0
  456. package/ibc.core.connection.v1/types/ibc/core/connection/v1/connection.ts +698 -0
  457. package/ibc.core.connection.v1/types/ibc/core/connection/v1/genesis.ts +152 -0
  458. package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.ts +1041 -0
  459. package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +908 -0
  460. package/ibc.core.connection.v1/types/proofs.ts +1408 -0
  461. package/ibc.core.connection.v1/types.ts +19 -0
  462. package/iconlake.icon/index.ts +6 -0
  463. package/iconlake.icon/module.ts +135 -0
  464. package/iconlake.icon/registry.ts +9 -0
  465. package/iconlake.icon/rest.ts +206 -0
  466. package/iconlake.icon/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  467. package/iconlake.icon/types/gogoproto/gogo.ts +2 -0
  468. package/iconlake.icon/types/google/api/annotations.ts +2 -0
  469. package/iconlake.icon/types/google/api/http.ts +589 -0
  470. package/iconlake.icon/types/google/protobuf/descriptor.ts +3753 -0
  471. package/iconlake.icon/types/iconlake/icon/genesis.ts +74 -0
  472. package/iconlake.icon/types/iconlake/icon/params.ts +58 -0
  473. package/iconlake.icon/types/iconlake/icon/query.ts +276 -0
  474. package/iconlake.icon/types/iconlake/icon/tx.ts +374 -0
  475. package/iconlake.icon/types.ts +11 -0
  476. package/iconlake.iconlake/index.ts +6 -0
  477. package/iconlake.iconlake/module.ts +133 -0
  478. package/iconlake.iconlake/registry.ts +9 -0
  479. package/iconlake.iconlake/rest.ts +342 -0
  480. package/iconlake.iconlake/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  481. package/iconlake.iconlake/types/cosmos/base/v1beta1/coin.ts +261 -0
  482. package/iconlake.iconlake/types/cosmos_proto/cosmos.ts +247 -0
  483. package/iconlake.iconlake/types/gogoproto/gogo.ts +2 -0
  484. package/iconlake.iconlake/types/google/api/annotations.ts +2 -0
  485. package/iconlake.iconlake/types/google/api/http.ts +589 -0
  486. package/iconlake.iconlake/types/google/protobuf/descriptor.ts +3753 -0
  487. package/iconlake.iconlake/types/iconlake/iconlake/account.ts +140 -0
  488. package/iconlake.iconlake/types/iconlake/iconlake/genesis.ts +91 -0
  489. package/iconlake.iconlake/types/iconlake/iconlake/params.ts +58 -0
  490. package/iconlake.iconlake/types/iconlake/iconlake/query.ts +388 -0
  491. package/iconlake.iconlake/types/iconlake/iconlake/tx.ts +214 -0
  492. package/iconlake.iconlake/types.ts +9 -0
  493. package/index.ts +75 -0
  494. package/modules.ts +5 -0
  495. package/package.json +35 -0
  496. package/tsconfig.json +12 -0
  497. package/types.d.ts +21 -0
@@ -0,0 +1,925 @@
1
+ /* eslint-disable */
2
+ import Long from "long";
3
+ import _m0 from "protobufjs/minimal";
4
+ import { Any } from "../../../google/protobuf/any";
5
+ import { Duration } from "../../../google/protobuf/duration";
6
+ import { Timestamp } from "../../../google/protobuf/timestamp";
7
+ import { Coin } from "../../base/v1beta1/coin";
8
+
9
+ export const protobufPackage = "cosmos.gov.v1";
10
+
11
+ /** Since: cosmos-sdk 0.46 */
12
+
13
+ /** VoteOption enumerates the valid vote options for a given governance proposal. */
14
+ export enum VoteOption {
15
+ /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
16
+ VOTE_OPTION_UNSPECIFIED = 0,
17
+ /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
18
+ VOTE_OPTION_YES = 1,
19
+ /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
20
+ VOTE_OPTION_ABSTAIN = 2,
21
+ /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
22
+ VOTE_OPTION_NO = 3,
23
+ /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
24
+ VOTE_OPTION_NO_WITH_VETO = 4,
25
+ UNRECOGNIZED = -1,
26
+ }
27
+
28
+ export function voteOptionFromJSON(object: any): VoteOption {
29
+ switch (object) {
30
+ case 0:
31
+ case "VOTE_OPTION_UNSPECIFIED":
32
+ return VoteOption.VOTE_OPTION_UNSPECIFIED;
33
+ case 1:
34
+ case "VOTE_OPTION_YES":
35
+ return VoteOption.VOTE_OPTION_YES;
36
+ case 2:
37
+ case "VOTE_OPTION_ABSTAIN":
38
+ return VoteOption.VOTE_OPTION_ABSTAIN;
39
+ case 3:
40
+ case "VOTE_OPTION_NO":
41
+ return VoteOption.VOTE_OPTION_NO;
42
+ case 4:
43
+ case "VOTE_OPTION_NO_WITH_VETO":
44
+ return VoteOption.VOTE_OPTION_NO_WITH_VETO;
45
+ case -1:
46
+ case "UNRECOGNIZED":
47
+ default:
48
+ return VoteOption.UNRECOGNIZED;
49
+ }
50
+ }
51
+
52
+ export function voteOptionToJSON(object: VoteOption): string {
53
+ switch (object) {
54
+ case VoteOption.VOTE_OPTION_UNSPECIFIED:
55
+ return "VOTE_OPTION_UNSPECIFIED";
56
+ case VoteOption.VOTE_OPTION_YES:
57
+ return "VOTE_OPTION_YES";
58
+ case VoteOption.VOTE_OPTION_ABSTAIN:
59
+ return "VOTE_OPTION_ABSTAIN";
60
+ case VoteOption.VOTE_OPTION_NO:
61
+ return "VOTE_OPTION_NO";
62
+ case VoteOption.VOTE_OPTION_NO_WITH_VETO:
63
+ return "VOTE_OPTION_NO_WITH_VETO";
64
+ case VoteOption.UNRECOGNIZED:
65
+ default:
66
+ return "UNRECOGNIZED";
67
+ }
68
+ }
69
+
70
+ /** ProposalStatus enumerates the valid statuses of a proposal. */
71
+ export enum ProposalStatus {
72
+ /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
73
+ PROPOSAL_STATUS_UNSPECIFIED = 0,
74
+ /**
75
+ * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
76
+ * period.
77
+ */
78
+ PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,
79
+ /**
80
+ * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
81
+ * period.
82
+ */
83
+ PROPOSAL_STATUS_VOTING_PERIOD = 2,
84
+ /**
85
+ * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
86
+ * passed.
87
+ */
88
+ PROPOSAL_STATUS_PASSED = 3,
89
+ /**
90
+ * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
91
+ * been rejected.
92
+ */
93
+ PROPOSAL_STATUS_REJECTED = 4,
94
+ /**
95
+ * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
96
+ * failed.
97
+ */
98
+ PROPOSAL_STATUS_FAILED = 5,
99
+ UNRECOGNIZED = -1,
100
+ }
101
+
102
+ export function proposalStatusFromJSON(object: any): ProposalStatus {
103
+ switch (object) {
104
+ case 0:
105
+ case "PROPOSAL_STATUS_UNSPECIFIED":
106
+ return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
107
+ case 1:
108
+ case "PROPOSAL_STATUS_DEPOSIT_PERIOD":
109
+ return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;
110
+ case 2:
111
+ case "PROPOSAL_STATUS_VOTING_PERIOD":
112
+ return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;
113
+ case 3:
114
+ case "PROPOSAL_STATUS_PASSED":
115
+ return ProposalStatus.PROPOSAL_STATUS_PASSED;
116
+ case 4:
117
+ case "PROPOSAL_STATUS_REJECTED":
118
+ return ProposalStatus.PROPOSAL_STATUS_REJECTED;
119
+ case 5:
120
+ case "PROPOSAL_STATUS_FAILED":
121
+ return ProposalStatus.PROPOSAL_STATUS_FAILED;
122
+ case -1:
123
+ case "UNRECOGNIZED":
124
+ default:
125
+ return ProposalStatus.UNRECOGNIZED;
126
+ }
127
+ }
128
+
129
+ export function proposalStatusToJSON(object: ProposalStatus): string {
130
+ switch (object) {
131
+ case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
132
+ return "PROPOSAL_STATUS_UNSPECIFIED";
133
+ case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:
134
+ return "PROPOSAL_STATUS_DEPOSIT_PERIOD";
135
+ case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:
136
+ return "PROPOSAL_STATUS_VOTING_PERIOD";
137
+ case ProposalStatus.PROPOSAL_STATUS_PASSED:
138
+ return "PROPOSAL_STATUS_PASSED";
139
+ case ProposalStatus.PROPOSAL_STATUS_REJECTED:
140
+ return "PROPOSAL_STATUS_REJECTED";
141
+ case ProposalStatus.PROPOSAL_STATUS_FAILED:
142
+ return "PROPOSAL_STATUS_FAILED";
143
+ case ProposalStatus.UNRECOGNIZED:
144
+ default:
145
+ return "UNRECOGNIZED";
146
+ }
147
+ }
148
+
149
+ /** WeightedVoteOption defines a unit of vote for vote split. */
150
+ export interface WeightedVoteOption {
151
+ option: VoteOption;
152
+ weight: string;
153
+ }
154
+
155
+ /**
156
+ * Deposit defines an amount deposited by an account address to an active
157
+ * proposal.
158
+ */
159
+ export interface Deposit {
160
+ proposalId: number;
161
+ depositor: string;
162
+ amount: Coin[];
163
+ }
164
+
165
+ /** Proposal defines the core field members of a governance proposal. */
166
+ export interface Proposal {
167
+ id: number;
168
+ messages: Any[];
169
+ status: ProposalStatus;
170
+ /**
171
+ * final_tally_result is the final tally result of the proposal. When
172
+ * querying a proposal via gRPC, this field is not populated until the
173
+ * proposal's voting period has ended.
174
+ */
175
+ finalTallyResult: TallyResult | undefined;
176
+ submitTime: Date | undefined;
177
+ depositEndTime: Date | undefined;
178
+ totalDeposit: Coin[];
179
+ votingStartTime: Date | undefined;
180
+ votingEndTime:
181
+ | Date
182
+ | undefined;
183
+ /** metadata is any arbitrary metadata attached to the proposal. */
184
+ metadata: string;
185
+ }
186
+
187
+ /** TallyResult defines a standard tally for a governance proposal. */
188
+ export interface TallyResult {
189
+ yesCount: string;
190
+ abstainCount: string;
191
+ noCount: string;
192
+ noWithVetoCount: string;
193
+ }
194
+
195
+ /**
196
+ * Vote defines a vote on a governance proposal.
197
+ * A Vote consists of a proposal ID, the voter, and the vote option.
198
+ */
199
+ export interface Vote {
200
+ proposalId: number;
201
+ voter: string;
202
+ options: WeightedVoteOption[];
203
+ /** metadata is any arbitrary metadata to attached to the vote. */
204
+ metadata: string;
205
+ }
206
+
207
+ /** DepositParams defines the params for deposits on governance proposals. */
208
+ export interface DepositParams {
209
+ /** Minimum deposit for a proposal to enter voting period. */
210
+ minDeposit: Coin[];
211
+ /**
212
+ * Maximum period for Atom holders to deposit on a proposal. Initial value: 2
213
+ * months.
214
+ */
215
+ maxDepositPeriod: Duration | undefined;
216
+ }
217
+
218
+ /** VotingParams defines the params for voting on governance proposals. */
219
+ export interface VotingParams {
220
+ /** Length of the voting period. */
221
+ votingPeriod: Duration | undefined;
222
+ }
223
+
224
+ /** TallyParams defines the params for tallying votes on governance proposals. */
225
+ export interface TallyParams {
226
+ /**
227
+ * Minimum percentage of total stake needed to vote for a result to be
228
+ * considered valid.
229
+ */
230
+ quorum: string;
231
+ /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
232
+ threshold: string;
233
+ /**
234
+ * Minimum value of Veto votes to Total votes ratio for proposal to be
235
+ * vetoed. Default value: 1/3.
236
+ */
237
+ vetoThreshold: string;
238
+ }
239
+
240
+ function createBaseWeightedVoteOption(): WeightedVoteOption {
241
+ return { option: 0, weight: "" };
242
+ }
243
+
244
+ export const WeightedVoteOption = {
245
+ encode(message: WeightedVoteOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
246
+ if (message.option !== 0) {
247
+ writer.uint32(8).int32(message.option);
248
+ }
249
+ if (message.weight !== "") {
250
+ writer.uint32(18).string(message.weight);
251
+ }
252
+ return writer;
253
+ },
254
+
255
+ decode(input: _m0.Reader | Uint8Array, length?: number): WeightedVoteOption {
256
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
257
+ let end = length === undefined ? reader.len : reader.pos + length;
258
+ const message = createBaseWeightedVoteOption();
259
+ while (reader.pos < end) {
260
+ const tag = reader.uint32();
261
+ switch (tag >>> 3) {
262
+ case 1:
263
+ message.option = reader.int32() as any;
264
+ break;
265
+ case 2:
266
+ message.weight = reader.string();
267
+ break;
268
+ default:
269
+ reader.skipType(tag & 7);
270
+ break;
271
+ }
272
+ }
273
+ return message;
274
+ },
275
+
276
+ fromJSON(object: any): WeightedVoteOption {
277
+ return {
278
+ option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0,
279
+ weight: isSet(object.weight) ? String(object.weight) : "",
280
+ };
281
+ },
282
+
283
+ toJSON(message: WeightedVoteOption): unknown {
284
+ const obj: any = {};
285
+ message.option !== undefined && (obj.option = voteOptionToJSON(message.option));
286
+ message.weight !== undefined && (obj.weight = message.weight);
287
+ return obj;
288
+ },
289
+
290
+ fromPartial<I extends Exact<DeepPartial<WeightedVoteOption>, I>>(object: I): WeightedVoteOption {
291
+ const message = createBaseWeightedVoteOption();
292
+ message.option = object.option ?? 0;
293
+ message.weight = object.weight ?? "";
294
+ return message;
295
+ },
296
+ };
297
+
298
+ function createBaseDeposit(): Deposit {
299
+ return { proposalId: 0, depositor: "", amount: [] };
300
+ }
301
+
302
+ export const Deposit = {
303
+ encode(message: Deposit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
304
+ if (message.proposalId !== 0) {
305
+ writer.uint32(8).uint64(message.proposalId);
306
+ }
307
+ if (message.depositor !== "") {
308
+ writer.uint32(18).string(message.depositor);
309
+ }
310
+ for (const v of message.amount) {
311
+ Coin.encode(v!, writer.uint32(26).fork()).ldelim();
312
+ }
313
+ return writer;
314
+ },
315
+
316
+ decode(input: _m0.Reader | Uint8Array, length?: number): Deposit {
317
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
318
+ let end = length === undefined ? reader.len : reader.pos + length;
319
+ const message = createBaseDeposit();
320
+ while (reader.pos < end) {
321
+ const tag = reader.uint32();
322
+ switch (tag >>> 3) {
323
+ case 1:
324
+ message.proposalId = longToNumber(reader.uint64() as Long);
325
+ break;
326
+ case 2:
327
+ message.depositor = reader.string();
328
+ break;
329
+ case 3:
330
+ message.amount.push(Coin.decode(reader, reader.uint32()));
331
+ break;
332
+ default:
333
+ reader.skipType(tag & 7);
334
+ break;
335
+ }
336
+ }
337
+ return message;
338
+ },
339
+
340
+ fromJSON(object: any): Deposit {
341
+ return {
342
+ proposalId: isSet(object.proposalId) ? Number(object.proposalId) : 0,
343
+ depositor: isSet(object.depositor) ? String(object.depositor) : "",
344
+ amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [],
345
+ };
346
+ },
347
+
348
+ toJSON(message: Deposit): unknown {
349
+ const obj: any = {};
350
+ message.proposalId !== undefined && (obj.proposalId = Math.round(message.proposalId));
351
+ message.depositor !== undefined && (obj.depositor = message.depositor);
352
+ if (message.amount) {
353
+ obj.amount = message.amount.map((e) => e ? Coin.toJSON(e) : undefined);
354
+ } else {
355
+ obj.amount = [];
356
+ }
357
+ return obj;
358
+ },
359
+
360
+ fromPartial<I extends Exact<DeepPartial<Deposit>, I>>(object: I): Deposit {
361
+ const message = createBaseDeposit();
362
+ message.proposalId = object.proposalId ?? 0;
363
+ message.depositor = object.depositor ?? "";
364
+ message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
365
+ return message;
366
+ },
367
+ };
368
+
369
+ function createBaseProposal(): Proposal {
370
+ return {
371
+ id: 0,
372
+ messages: [],
373
+ status: 0,
374
+ finalTallyResult: undefined,
375
+ submitTime: undefined,
376
+ depositEndTime: undefined,
377
+ totalDeposit: [],
378
+ votingStartTime: undefined,
379
+ votingEndTime: undefined,
380
+ metadata: "",
381
+ };
382
+ }
383
+
384
+ export const Proposal = {
385
+ encode(message: Proposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
386
+ if (message.id !== 0) {
387
+ writer.uint32(8).uint64(message.id);
388
+ }
389
+ for (const v of message.messages) {
390
+ Any.encode(v!, writer.uint32(18).fork()).ldelim();
391
+ }
392
+ if (message.status !== 0) {
393
+ writer.uint32(24).int32(message.status);
394
+ }
395
+ if (message.finalTallyResult !== undefined) {
396
+ TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim();
397
+ }
398
+ if (message.submitTime !== undefined) {
399
+ Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim();
400
+ }
401
+ if (message.depositEndTime !== undefined) {
402
+ Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim();
403
+ }
404
+ for (const v of message.totalDeposit) {
405
+ Coin.encode(v!, writer.uint32(58).fork()).ldelim();
406
+ }
407
+ if (message.votingStartTime !== undefined) {
408
+ Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim();
409
+ }
410
+ if (message.votingEndTime !== undefined) {
411
+ Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim();
412
+ }
413
+ if (message.metadata !== "") {
414
+ writer.uint32(82).string(message.metadata);
415
+ }
416
+ return writer;
417
+ },
418
+
419
+ decode(input: _m0.Reader | Uint8Array, length?: number): Proposal {
420
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
421
+ let end = length === undefined ? reader.len : reader.pos + length;
422
+ const message = createBaseProposal();
423
+ while (reader.pos < end) {
424
+ const tag = reader.uint32();
425
+ switch (tag >>> 3) {
426
+ case 1:
427
+ message.id = longToNumber(reader.uint64() as Long);
428
+ break;
429
+ case 2:
430
+ message.messages.push(Any.decode(reader, reader.uint32()));
431
+ break;
432
+ case 3:
433
+ message.status = reader.int32() as any;
434
+ break;
435
+ case 4:
436
+ message.finalTallyResult = TallyResult.decode(reader, reader.uint32());
437
+ break;
438
+ case 5:
439
+ message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
440
+ break;
441
+ case 6:
442
+ message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
443
+ break;
444
+ case 7:
445
+ message.totalDeposit.push(Coin.decode(reader, reader.uint32()));
446
+ break;
447
+ case 8:
448
+ message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
449
+ break;
450
+ case 9:
451
+ message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
452
+ break;
453
+ case 10:
454
+ message.metadata = reader.string();
455
+ break;
456
+ default:
457
+ reader.skipType(tag & 7);
458
+ break;
459
+ }
460
+ }
461
+ return message;
462
+ },
463
+
464
+ fromJSON(object: any): Proposal {
465
+ return {
466
+ id: isSet(object.id) ? Number(object.id) : 0,
467
+ messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [],
468
+ status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0,
469
+ finalTallyResult: isSet(object.finalTallyResult) ? TallyResult.fromJSON(object.finalTallyResult) : undefined,
470
+ submitTime: isSet(object.submitTime) ? fromJsonTimestamp(object.submitTime) : undefined,
471
+ depositEndTime: isSet(object.depositEndTime) ? fromJsonTimestamp(object.depositEndTime) : undefined,
472
+ totalDeposit: Array.isArray(object?.totalDeposit) ? object.totalDeposit.map((e: any) => Coin.fromJSON(e)) : [],
473
+ votingStartTime: isSet(object.votingStartTime) ? fromJsonTimestamp(object.votingStartTime) : undefined,
474
+ votingEndTime: isSet(object.votingEndTime) ? fromJsonTimestamp(object.votingEndTime) : undefined,
475
+ metadata: isSet(object.metadata) ? String(object.metadata) : "",
476
+ };
477
+ },
478
+
479
+ toJSON(message: Proposal): unknown {
480
+ const obj: any = {};
481
+ message.id !== undefined && (obj.id = Math.round(message.id));
482
+ if (message.messages) {
483
+ obj.messages = message.messages.map((e) => e ? Any.toJSON(e) : undefined);
484
+ } else {
485
+ obj.messages = [];
486
+ }
487
+ message.status !== undefined && (obj.status = proposalStatusToJSON(message.status));
488
+ message.finalTallyResult !== undefined
489
+ && (obj.finalTallyResult = message.finalTallyResult ? TallyResult.toJSON(message.finalTallyResult) : undefined);
490
+ message.submitTime !== undefined && (obj.submitTime = message.submitTime.toISOString());
491
+ message.depositEndTime !== undefined && (obj.depositEndTime = message.depositEndTime.toISOString());
492
+ if (message.totalDeposit) {
493
+ obj.totalDeposit = message.totalDeposit.map((e) => e ? Coin.toJSON(e) : undefined);
494
+ } else {
495
+ obj.totalDeposit = [];
496
+ }
497
+ message.votingStartTime !== undefined && (obj.votingStartTime = message.votingStartTime.toISOString());
498
+ message.votingEndTime !== undefined && (obj.votingEndTime = message.votingEndTime.toISOString());
499
+ message.metadata !== undefined && (obj.metadata = message.metadata);
500
+ return obj;
501
+ },
502
+
503
+ fromPartial<I extends Exact<DeepPartial<Proposal>, I>>(object: I): Proposal {
504
+ const message = createBaseProposal();
505
+ message.id = object.id ?? 0;
506
+ message.messages = object.messages?.map((e) => Any.fromPartial(e)) || [];
507
+ message.status = object.status ?? 0;
508
+ message.finalTallyResult = (object.finalTallyResult !== undefined && object.finalTallyResult !== null)
509
+ ? TallyResult.fromPartial(object.finalTallyResult)
510
+ : undefined;
511
+ message.submitTime = object.submitTime ?? undefined;
512
+ message.depositEndTime = object.depositEndTime ?? undefined;
513
+ message.totalDeposit = object.totalDeposit?.map((e) => Coin.fromPartial(e)) || [];
514
+ message.votingStartTime = object.votingStartTime ?? undefined;
515
+ message.votingEndTime = object.votingEndTime ?? undefined;
516
+ message.metadata = object.metadata ?? "";
517
+ return message;
518
+ },
519
+ };
520
+
521
+ function createBaseTallyResult(): TallyResult {
522
+ return { yesCount: "", abstainCount: "", noCount: "", noWithVetoCount: "" };
523
+ }
524
+
525
+ export const TallyResult = {
526
+ encode(message: TallyResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
527
+ if (message.yesCount !== "") {
528
+ writer.uint32(10).string(message.yesCount);
529
+ }
530
+ if (message.abstainCount !== "") {
531
+ writer.uint32(18).string(message.abstainCount);
532
+ }
533
+ if (message.noCount !== "") {
534
+ writer.uint32(26).string(message.noCount);
535
+ }
536
+ if (message.noWithVetoCount !== "") {
537
+ writer.uint32(34).string(message.noWithVetoCount);
538
+ }
539
+ return writer;
540
+ },
541
+
542
+ decode(input: _m0.Reader | Uint8Array, length?: number): TallyResult {
543
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
544
+ let end = length === undefined ? reader.len : reader.pos + length;
545
+ const message = createBaseTallyResult();
546
+ while (reader.pos < end) {
547
+ const tag = reader.uint32();
548
+ switch (tag >>> 3) {
549
+ case 1:
550
+ message.yesCount = reader.string();
551
+ break;
552
+ case 2:
553
+ message.abstainCount = reader.string();
554
+ break;
555
+ case 3:
556
+ message.noCount = reader.string();
557
+ break;
558
+ case 4:
559
+ message.noWithVetoCount = reader.string();
560
+ break;
561
+ default:
562
+ reader.skipType(tag & 7);
563
+ break;
564
+ }
565
+ }
566
+ return message;
567
+ },
568
+
569
+ fromJSON(object: any): TallyResult {
570
+ return {
571
+ yesCount: isSet(object.yesCount) ? String(object.yesCount) : "",
572
+ abstainCount: isSet(object.abstainCount) ? String(object.abstainCount) : "",
573
+ noCount: isSet(object.noCount) ? String(object.noCount) : "",
574
+ noWithVetoCount: isSet(object.noWithVetoCount) ? String(object.noWithVetoCount) : "",
575
+ };
576
+ },
577
+
578
+ toJSON(message: TallyResult): unknown {
579
+ const obj: any = {};
580
+ message.yesCount !== undefined && (obj.yesCount = message.yesCount);
581
+ message.abstainCount !== undefined && (obj.abstainCount = message.abstainCount);
582
+ message.noCount !== undefined && (obj.noCount = message.noCount);
583
+ message.noWithVetoCount !== undefined && (obj.noWithVetoCount = message.noWithVetoCount);
584
+ return obj;
585
+ },
586
+
587
+ fromPartial<I extends Exact<DeepPartial<TallyResult>, I>>(object: I): TallyResult {
588
+ const message = createBaseTallyResult();
589
+ message.yesCount = object.yesCount ?? "";
590
+ message.abstainCount = object.abstainCount ?? "";
591
+ message.noCount = object.noCount ?? "";
592
+ message.noWithVetoCount = object.noWithVetoCount ?? "";
593
+ return message;
594
+ },
595
+ };
596
+
597
+ function createBaseVote(): Vote {
598
+ return { proposalId: 0, voter: "", options: [], metadata: "" };
599
+ }
600
+
601
+ export const Vote = {
602
+ encode(message: Vote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
603
+ if (message.proposalId !== 0) {
604
+ writer.uint32(8).uint64(message.proposalId);
605
+ }
606
+ if (message.voter !== "") {
607
+ writer.uint32(18).string(message.voter);
608
+ }
609
+ for (const v of message.options) {
610
+ WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim();
611
+ }
612
+ if (message.metadata !== "") {
613
+ writer.uint32(42).string(message.metadata);
614
+ }
615
+ return writer;
616
+ },
617
+
618
+ decode(input: _m0.Reader | Uint8Array, length?: number): Vote {
619
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
620
+ let end = length === undefined ? reader.len : reader.pos + length;
621
+ const message = createBaseVote();
622
+ while (reader.pos < end) {
623
+ const tag = reader.uint32();
624
+ switch (tag >>> 3) {
625
+ case 1:
626
+ message.proposalId = longToNumber(reader.uint64() as Long);
627
+ break;
628
+ case 2:
629
+ message.voter = reader.string();
630
+ break;
631
+ case 4:
632
+ message.options.push(WeightedVoteOption.decode(reader, reader.uint32()));
633
+ break;
634
+ case 5:
635
+ message.metadata = reader.string();
636
+ break;
637
+ default:
638
+ reader.skipType(tag & 7);
639
+ break;
640
+ }
641
+ }
642
+ return message;
643
+ },
644
+
645
+ fromJSON(object: any): Vote {
646
+ return {
647
+ proposalId: isSet(object.proposalId) ? Number(object.proposalId) : 0,
648
+ voter: isSet(object.voter) ? String(object.voter) : "",
649
+ options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e)) : [],
650
+ metadata: isSet(object.metadata) ? String(object.metadata) : "",
651
+ };
652
+ },
653
+
654
+ toJSON(message: Vote): unknown {
655
+ const obj: any = {};
656
+ message.proposalId !== undefined && (obj.proposalId = Math.round(message.proposalId));
657
+ message.voter !== undefined && (obj.voter = message.voter);
658
+ if (message.options) {
659
+ obj.options = message.options.map((e) => e ? WeightedVoteOption.toJSON(e) : undefined);
660
+ } else {
661
+ obj.options = [];
662
+ }
663
+ message.metadata !== undefined && (obj.metadata = message.metadata);
664
+ return obj;
665
+ },
666
+
667
+ fromPartial<I extends Exact<DeepPartial<Vote>, I>>(object: I): Vote {
668
+ const message = createBaseVote();
669
+ message.proposalId = object.proposalId ?? 0;
670
+ message.voter = object.voter ?? "";
671
+ message.options = object.options?.map((e) => WeightedVoteOption.fromPartial(e)) || [];
672
+ message.metadata = object.metadata ?? "";
673
+ return message;
674
+ },
675
+ };
676
+
677
+ function createBaseDepositParams(): DepositParams {
678
+ return { minDeposit: [], maxDepositPeriod: undefined };
679
+ }
680
+
681
+ export const DepositParams = {
682
+ encode(message: DepositParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
683
+ for (const v of message.minDeposit) {
684
+ Coin.encode(v!, writer.uint32(10).fork()).ldelim();
685
+ }
686
+ if (message.maxDepositPeriod !== undefined) {
687
+ Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim();
688
+ }
689
+ return writer;
690
+ },
691
+
692
+ decode(input: _m0.Reader | Uint8Array, length?: number): DepositParams {
693
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
694
+ let end = length === undefined ? reader.len : reader.pos + length;
695
+ const message = createBaseDepositParams();
696
+ while (reader.pos < end) {
697
+ const tag = reader.uint32();
698
+ switch (tag >>> 3) {
699
+ case 1:
700
+ message.minDeposit.push(Coin.decode(reader, reader.uint32()));
701
+ break;
702
+ case 2:
703
+ message.maxDepositPeriod = Duration.decode(reader, reader.uint32());
704
+ break;
705
+ default:
706
+ reader.skipType(tag & 7);
707
+ break;
708
+ }
709
+ }
710
+ return message;
711
+ },
712
+
713
+ fromJSON(object: any): DepositParams {
714
+ return {
715
+ minDeposit: Array.isArray(object?.minDeposit) ? object.minDeposit.map((e: any) => Coin.fromJSON(e)) : [],
716
+ maxDepositPeriod: isSet(object.maxDepositPeriod) ? Duration.fromJSON(object.maxDepositPeriod) : undefined,
717
+ };
718
+ },
719
+
720
+ toJSON(message: DepositParams): unknown {
721
+ const obj: any = {};
722
+ if (message.minDeposit) {
723
+ obj.minDeposit = message.minDeposit.map((e) => e ? Coin.toJSON(e) : undefined);
724
+ } else {
725
+ obj.minDeposit = [];
726
+ }
727
+ message.maxDepositPeriod !== undefined
728
+ && (obj.maxDepositPeriod = message.maxDepositPeriod ? Duration.toJSON(message.maxDepositPeriod) : undefined);
729
+ return obj;
730
+ },
731
+
732
+ fromPartial<I extends Exact<DeepPartial<DepositParams>, I>>(object: I): DepositParams {
733
+ const message = createBaseDepositParams();
734
+ message.minDeposit = object.minDeposit?.map((e) => Coin.fromPartial(e)) || [];
735
+ message.maxDepositPeriod = (object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null)
736
+ ? Duration.fromPartial(object.maxDepositPeriod)
737
+ : undefined;
738
+ return message;
739
+ },
740
+ };
741
+
742
+ function createBaseVotingParams(): VotingParams {
743
+ return { votingPeriod: undefined };
744
+ }
745
+
746
+ export const VotingParams = {
747
+ encode(message: VotingParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
748
+ if (message.votingPeriod !== undefined) {
749
+ Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim();
750
+ }
751
+ return writer;
752
+ },
753
+
754
+ decode(input: _m0.Reader | Uint8Array, length?: number): VotingParams {
755
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
756
+ let end = length === undefined ? reader.len : reader.pos + length;
757
+ const message = createBaseVotingParams();
758
+ while (reader.pos < end) {
759
+ const tag = reader.uint32();
760
+ switch (tag >>> 3) {
761
+ case 1:
762
+ message.votingPeriod = Duration.decode(reader, reader.uint32());
763
+ break;
764
+ default:
765
+ reader.skipType(tag & 7);
766
+ break;
767
+ }
768
+ }
769
+ return message;
770
+ },
771
+
772
+ fromJSON(object: any): VotingParams {
773
+ return { votingPeriod: isSet(object.votingPeriod) ? Duration.fromJSON(object.votingPeriod) : undefined };
774
+ },
775
+
776
+ toJSON(message: VotingParams): unknown {
777
+ const obj: any = {};
778
+ message.votingPeriod !== undefined
779
+ && (obj.votingPeriod = message.votingPeriod ? Duration.toJSON(message.votingPeriod) : undefined);
780
+ return obj;
781
+ },
782
+
783
+ fromPartial<I extends Exact<DeepPartial<VotingParams>, I>>(object: I): VotingParams {
784
+ const message = createBaseVotingParams();
785
+ message.votingPeriod = (object.votingPeriod !== undefined && object.votingPeriod !== null)
786
+ ? Duration.fromPartial(object.votingPeriod)
787
+ : undefined;
788
+ return message;
789
+ },
790
+ };
791
+
792
+ function createBaseTallyParams(): TallyParams {
793
+ return { quorum: "", threshold: "", vetoThreshold: "" };
794
+ }
795
+
796
+ export const TallyParams = {
797
+ encode(message: TallyParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
798
+ if (message.quorum !== "") {
799
+ writer.uint32(10).string(message.quorum);
800
+ }
801
+ if (message.threshold !== "") {
802
+ writer.uint32(18).string(message.threshold);
803
+ }
804
+ if (message.vetoThreshold !== "") {
805
+ writer.uint32(26).string(message.vetoThreshold);
806
+ }
807
+ return writer;
808
+ },
809
+
810
+ decode(input: _m0.Reader | Uint8Array, length?: number): TallyParams {
811
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
812
+ let end = length === undefined ? reader.len : reader.pos + length;
813
+ const message = createBaseTallyParams();
814
+ while (reader.pos < end) {
815
+ const tag = reader.uint32();
816
+ switch (tag >>> 3) {
817
+ case 1:
818
+ message.quorum = reader.string();
819
+ break;
820
+ case 2:
821
+ message.threshold = reader.string();
822
+ break;
823
+ case 3:
824
+ message.vetoThreshold = reader.string();
825
+ break;
826
+ default:
827
+ reader.skipType(tag & 7);
828
+ break;
829
+ }
830
+ }
831
+ return message;
832
+ },
833
+
834
+ fromJSON(object: any): TallyParams {
835
+ return {
836
+ quorum: isSet(object.quorum) ? String(object.quorum) : "",
837
+ threshold: isSet(object.threshold) ? String(object.threshold) : "",
838
+ vetoThreshold: isSet(object.vetoThreshold) ? String(object.vetoThreshold) : "",
839
+ };
840
+ },
841
+
842
+ toJSON(message: TallyParams): unknown {
843
+ const obj: any = {};
844
+ message.quorum !== undefined && (obj.quorum = message.quorum);
845
+ message.threshold !== undefined && (obj.threshold = message.threshold);
846
+ message.vetoThreshold !== undefined && (obj.vetoThreshold = message.vetoThreshold);
847
+ return obj;
848
+ },
849
+
850
+ fromPartial<I extends Exact<DeepPartial<TallyParams>, I>>(object: I): TallyParams {
851
+ const message = createBaseTallyParams();
852
+ message.quorum = object.quorum ?? "";
853
+ message.threshold = object.threshold ?? "";
854
+ message.vetoThreshold = object.vetoThreshold ?? "";
855
+ return message;
856
+ },
857
+ };
858
+
859
+ declare var self: any | undefined;
860
+ declare var window: any | undefined;
861
+ declare var global: any | undefined;
862
+ var globalThis: any = (() => {
863
+ if (typeof globalThis !== "undefined") {
864
+ return globalThis;
865
+ }
866
+ if (typeof self !== "undefined") {
867
+ return self;
868
+ }
869
+ if (typeof window !== "undefined") {
870
+ return window;
871
+ }
872
+ if (typeof global !== "undefined") {
873
+ return global;
874
+ }
875
+ throw "Unable to locate global object";
876
+ })();
877
+
878
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
879
+
880
+ export type DeepPartial<T> = T extends Builtin ? T
881
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
882
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
883
+ : Partial<T>;
884
+
885
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
886
+ export type Exact<P, I extends P> = P extends Builtin ? P
887
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
888
+
889
+ function toTimestamp(date: Date): Timestamp {
890
+ const seconds = date.getTime() / 1_000;
891
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
892
+ return { seconds, nanos };
893
+ }
894
+
895
+ function fromTimestamp(t: Timestamp): Date {
896
+ let millis = t.seconds * 1_000;
897
+ millis += t.nanos / 1_000_000;
898
+ return new Date(millis);
899
+ }
900
+
901
+ function fromJsonTimestamp(o: any): Date {
902
+ if (o instanceof Date) {
903
+ return o;
904
+ } else if (typeof o === "string") {
905
+ return new Date(o);
906
+ } else {
907
+ return fromTimestamp(Timestamp.fromJSON(o));
908
+ }
909
+ }
910
+
911
+ function longToNumber(long: Long): number {
912
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
913
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
914
+ }
915
+ return long.toNumber();
916
+ }
917
+
918
+ if (_m0.util.Long !== Long) {
919
+ _m0.util.Long = Long as any;
920
+ _m0.configure();
921
+ }
922
+
923
+ function isSet(value: any): boolean {
924
+ return value !== null && value !== undefined;
925
+ }