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