@gitopia/gitopiajs 0.0.4 → 0.0.6

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 (310) hide show
  1. package/dist/LICENSE +21 -0
  2. package/dist/amino/amino.d.ts +1 -0
  3. package/dist/amino/amino.js +2 -0
  4. package/dist/amino/bundle.d.ts +1 -0
  5. package/dist/amino/bundle.js +41 -0
  6. package/dist/binary.d.ts +130 -0
  7. package/dist/binary.js +371 -0
  8. package/dist/cosmos/bank/v1beta1/bank.d.ts +407 -0
  9. package/dist/cosmos/bank/v1beta1/bank.js +664 -0
  10. package/dist/cosmos/bank/v1beta1/query.d.ts +1062 -0
  11. package/dist/cosmos/bank/v1beta1/query.js +1759 -0
  12. package/dist/cosmos/bank/v1beta1/query.lcd.d.ts +19 -0
  13. package/dist/cosmos/bank/v1beta1/query.lcd.js +173 -0
  14. package/dist/cosmos/bank/v1beta1/query.rpc.Query.d.ts +106 -0
  15. package/dist/cosmos/bank/v1beta1/query.rpc.Query.js +123 -0
  16. package/dist/cosmos/base/query/v1beta1/pagination.d.ts +190 -0
  17. package/dist/cosmos/base/query/v1beta1/pagination.js +204 -0
  18. package/dist/cosmos/base/v1beta1/coin.d.ts +193 -0
  19. package/dist/cosmos/base/v1beta1/coin.js +306 -0
  20. package/dist/cosmos/bundle.d.ts +2311 -0
  21. package/dist/cosmos/bundle.js +134 -0
  22. package/dist/cosmos/client.d.ts +84 -0
  23. package/dist/cosmos/client.js +65 -0
  24. package/dist/cosmos/feegrant/v1beta1/feegrant.d.ts +245 -0
  25. package/dist/cosmos/feegrant/v1beta1/feegrant.js +456 -0
  26. package/dist/cosmos/feegrant/v1beta1/query.d.ts +258 -0
  27. package/dist/cosmos/feegrant/v1beta1/query.js +487 -0
  28. package/dist/cosmos/feegrant/v1beta1/query.lcd.d.ts +11 -0
  29. package/dist/cosmos/feegrant/v1beta1/query.lcd.js +44 -0
  30. package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.d.ts +28 -0
  31. package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.js +47 -0
  32. package/dist/cosmos/gov/v1beta1/gov.d.ts +571 -0
  33. package/dist/cosmos/gov/v1beta1/gov.js +1122 -0
  34. package/dist/cosmos/gov/v1beta1/query.d.ts +636 -0
  35. package/dist/cosmos/gov/v1beta1/query.js +1264 -0
  36. package/dist/cosmos/gov/v1beta1/query.lcd.d.ts +16 -0
  37. package/dist/cosmos/gov/v1beta1/query.lcd.js +87 -0
  38. package/dist/cosmos/gov/v1beta1/query.rpc.Query.d.ts +44 -0
  39. package/dist/cosmos/gov/v1beta1/query.rpc.Query.js +92 -0
  40. package/dist/cosmos/group/v1/query.d.ts +1097 -0
  41. package/dist/cosmos/group/v1/query.js +2182 -0
  42. package/dist/cosmos/group/v1/query.lcd.d.ts +22 -0
  43. package/dist/cosmos/group/v1/query.lcd.js +158 -0
  44. package/dist/cosmos/group/v1/query.rpc.Query.d.ts +78 -0
  45. package/dist/cosmos/group/v1/query.rpc.Query.js +148 -0
  46. package/dist/cosmos/group/v1/tx.amino.d.ts +73 -0
  47. package/dist/cosmos/group/v1/tx.amino.js +77 -0
  48. package/dist/cosmos/group/v1/tx.d.ts +1198 -0
  49. package/dist/cosmos/group/v1/tx.js +2362 -0
  50. package/dist/cosmos/group/v1/tx.registry.d.ts +180 -0
  51. package/dist/cosmos/group/v1/tx.registry.js +271 -0
  52. package/dist/cosmos/group/v1/tx.rpc.msg.d.ts +51 -0
  53. package/dist/cosmos/group/v1/tx.rpc.msg.js +96 -0
  54. package/dist/cosmos/group/v1/types.d.ts +873 -0
  55. package/dist/cosmos/group/v1/types.js +1495 -0
  56. package/dist/cosmos/msg/v1/msg.d.ts +1 -0
  57. package/dist/cosmos/msg/v1/msg.js +2 -0
  58. package/dist/cosmos/query/v1/query.d.ts +1 -0
  59. package/dist/cosmos/query/v1/query.js +2 -0
  60. package/dist/cosmos/rpc.query.d.ts +59 -0
  61. package/dist/cosmos/rpc.query.js +60 -0
  62. package/dist/cosmos/rpc.tx.d.ts +10 -0
  63. package/dist/cosmos/rpc.tx.js +44 -0
  64. package/dist/cosmos/upgrade/v1beta1/upgrade.d.ts +278 -0
  65. package/dist/cosmos/upgrade/v1beta1/upgrade.js +382 -0
  66. package/dist/cosmos_proto/bundle.d.ts +32 -0
  67. package/dist/cosmos_proto/bundle.js +41 -0
  68. package/dist/cosmos_proto/cosmos.d.ts +171 -0
  69. package/dist/cosmos_proto/cosmos.js +221 -0
  70. package/dist/esm/amino/amino.js +1 -0
  71. package/dist/esm/amino/bundle.js +5 -0
  72. package/dist/esm/binary.js +366 -0
  73. package/dist/esm/cosmos/bank/v1beta1/bank.js +661 -0
  74. package/dist/esm/cosmos/bank/v1beta1/query.js +1756 -0
  75. package/dist/esm/cosmos/bank/v1beta1/query.lcd.js +169 -0
  76. package/dist/esm/cosmos/bank/v1beta1/query.rpc.Query.js +118 -0
  77. package/dist/esm/cosmos/base/query/v1beta1/pagination.js +201 -0
  78. package/dist/esm/cosmos/base/v1beta1/coin.js +303 -0
  79. package/dist/esm/cosmos/bundle.js +98 -0
  80. package/dist/esm/cosmos/client.js +27 -0
  81. package/dist/esm/cosmos/feegrant/v1beta1/feegrant.js +450 -0
  82. package/dist/esm/cosmos/feegrant/v1beta1/query.js +484 -0
  83. package/dist/esm/cosmos/feegrant/v1beta1/query.lcd.js +40 -0
  84. package/dist/esm/cosmos/feegrant/v1beta1/query.rpc.Query.js +42 -0
  85. package/dist/esm/cosmos/gov/v1beta1/gov.js +1112 -0
  86. package/dist/esm/cosmos/gov/v1beta1/query.js +1261 -0
  87. package/dist/esm/cosmos/gov/v1beta1/query.lcd.js +83 -0
  88. package/dist/esm/cosmos/gov/v1beta1/query.rpc.Query.js +87 -0
  89. package/dist/esm/cosmos/group/v1/query.js +2179 -0
  90. package/dist/esm/cosmos/group/v1/query.lcd.js +154 -0
  91. package/dist/esm/cosmos/group/v1/query.rpc.Query.js +143 -0
  92. package/dist/esm/cosmos/group/v1/tx.amino.js +74 -0
  93. package/dist/esm/cosmos/group/v1/tx.js +2354 -0
  94. package/dist/esm/cosmos/group/v1/tx.registry.js +267 -0
  95. package/dist/esm/cosmos/group/v1/tx.rpc.msg.js +92 -0
  96. package/dist/esm/cosmos/group/v1/types.js +1483 -0
  97. package/dist/esm/cosmos/msg/v1/msg.js +1 -0
  98. package/dist/esm/cosmos/query/v1/query.js +1 -0
  99. package/dist/esm/cosmos/rpc.query.js +23 -0
  100. package/dist/esm/cosmos/rpc.tx.js +7 -0
  101. package/dist/esm/cosmos/upgrade/v1beta1/upgrade.js +379 -0
  102. package/dist/esm/cosmos_proto/bundle.js +5 -0
  103. package/dist/esm/cosmos_proto/cosmos.js +216 -0
  104. package/dist/esm/gitopia/bundle.js +95 -0
  105. package/dist/esm/gitopia/client.js +32 -0
  106. package/dist/esm/gitopia/custom-lcd-client.js +50 -0
  107. package/dist/esm/gitopia/gitopia/gitopia/attachment.js +101 -0
  108. package/dist/esm/gitopia/gitopia/gitopia/bounty.js +255 -0
  109. package/dist/esm/gitopia/gitopia/gitopia/branch.js +137 -0
  110. package/dist/esm/gitopia/gitopia/gitopia/comment.js +488 -0
  111. package/dist/esm/gitopia/gitopia/gitopia/dao.js +451 -0
  112. package/dist/esm/gitopia/gitopia/gitopia/exercised_amount.js +78 -0
  113. package/dist/esm/gitopia/gitopia/gitopia/genesis.js +460 -0
  114. package/dist/esm/gitopia/gitopia/gitopia/issue.js +323 -0
  115. package/dist/esm/gitopia/gitopia/gitopia/params.js +293 -0
  116. package/dist/esm/gitopia/gitopia/gitopia/pullRequest.js +565 -0
  117. package/dist/esm/gitopia/gitopia/gitopia/query.js +7351 -0
  118. package/dist/esm/gitopia/gitopia/gitopia/query.lcd.js +452 -0
  119. package/dist/esm/gitopia/gitopia/gitopia/query.rpc.Query.js +453 -0
  120. package/dist/esm/gitopia/gitopia/gitopia/reaction.js +123 -0
  121. package/dist/esm/gitopia/gitopia/gitopia/release.js +225 -0
  122. package/dist/esm/gitopia/gitopia/gitopia/repository.js +1200 -0
  123. package/dist/esm/gitopia/gitopia/gitopia/tag.js +125 -0
  124. package/dist/esm/gitopia/gitopia/gitopia/task.js +197 -0
  125. package/dist/esm/gitopia/gitopia/gitopia/tx.amino.js +464 -0
  126. package/dist/esm/gitopia/gitopia/gitopia/tx.js +14679 -0
  127. package/dist/esm/gitopia/gitopia/gitopia/tx.registry.js +1671 -0
  128. package/dist/esm/gitopia/gitopia/gitopia/tx.rpc.msg.js +560 -0
  129. package/dist/esm/gitopia/gitopia/gitopia/user.js +340 -0
  130. package/dist/esm/gitopia/gitopia/gitopia/whois.js +146 -0
  131. package/dist/esm/gitopia/gitopia/offchain/offchain.js +144 -0
  132. package/dist/esm/gitopia/gitopia/rewards/genesis.js +82 -0
  133. package/dist/esm/gitopia/gitopia/rewards/params.js +81 -0
  134. package/dist/esm/gitopia/gitopia/rewards/pool.js +191 -0
  135. package/dist/esm/gitopia/gitopia/rewards/query.js +654 -0
  136. package/dist/esm/gitopia/gitopia/rewards/query.lcd.js +40 -0
  137. package/dist/esm/gitopia/gitopia/rewards/query.rpc.Query.js +53 -0
  138. package/dist/esm/gitopia/gitopia/rewards/rewards.js +191 -0
  139. package/dist/esm/gitopia/gitopia/rewards/task.js +176 -0
  140. package/dist/esm/gitopia/gitopia/rewards/tx.amino.js +19 -0
  141. package/dist/esm/gitopia/gitopia/rewards/tx.js +525 -0
  142. package/dist/esm/gitopia/gitopia/rewards/tx.registry.js +69 -0
  143. package/dist/esm/gitopia/gitopia/rewards/tx.rpc.msg.js +26 -0
  144. package/dist/esm/gitopia/rpc.query.js +29 -0
  145. package/dist/esm/gitopia/rpc.tx.js +13 -0
  146. package/dist/esm/gogoproto/bundle.js +5 -0
  147. package/dist/esm/gogoproto/gogo.js +1 -0
  148. package/dist/esm/google/api/annotations.js +1 -0
  149. package/dist/esm/google/api/http.js +329 -0
  150. package/dist/esm/google/bundle.js +14 -0
  151. package/dist/esm/google/protobuf/any.js +74 -0
  152. package/dist/esm/google/protobuf/descriptor.js +4848 -0
  153. package/dist/esm/google/protobuf/duration.js +71 -0
  154. package/dist/esm/google/protobuf/timestamp.js +68 -0
  155. package/dist/esm/helpers.js +131 -0
  156. package/dist/esm/ibc/applications/transfer/v1/query.js +847 -0
  157. package/dist/esm/ibc/applications/transfer/v1/query.lcd.js +70 -0
  158. package/dist/esm/ibc/applications/transfer/v1/query.rpc.Query.js +71 -0
  159. package/dist/esm/ibc/applications/transfer/v1/transfer.js +164 -0
  160. package/dist/esm/ibc/applications/transfer/v1/tx.amino.js +9 -0
  161. package/dist/esm/ibc/applications/transfer/v1/tx.js +226 -0
  162. package/dist/esm/ibc/applications/transfer/v1/tx.registry.js +33 -0
  163. package/dist/esm/ibc/applications/transfer/v1/tx.rpc.msg.js +14 -0
  164. package/dist/esm/ibc/bundle.js +44 -0
  165. package/dist/esm/ibc/client.js +29 -0
  166. package/dist/esm/ibc/core/client/v1/client.js +611 -0
  167. package/dist/esm/ibc/rpc.query.js +30 -0
  168. package/dist/esm/ibc/rpc.tx.js +14 -0
  169. package/dist/esm/index.js +19 -0
  170. package/dist/esm/utf8.js +137 -0
  171. package/dist/esm/varint.js +408 -0
  172. package/dist/gitopia/bundle.d.ts +6123 -0
  173. package/dist/gitopia/bundle.js +131 -0
  174. package/dist/gitopia/client.d.ts +492 -0
  175. package/dist/gitopia/client.js +70 -0
  176. package/dist/gitopia/custom-lcd-client.d.ts +31 -0
  177. package/dist/gitopia/custom-lcd-client.js +87 -0
  178. package/dist/gitopia/gitopia/gitopia/attachment.d.ts +39 -0
  179. package/dist/gitopia/gitopia/gitopia/attachment.js +104 -0
  180. package/dist/gitopia/gitopia/gitopia/bounty.d.ts +79 -0
  181. package/dist/gitopia/gitopia/gitopia/bounty.js +262 -0
  182. package/dist/gitopia/gitopia/gitopia/branch.d.ts +48 -0
  183. package/dist/gitopia/gitopia/gitopia/branch.js +140 -0
  184. package/dist/gitopia/gitopia/gitopia/comment.d.ts +125 -0
  185. package/dist/gitopia/gitopia/gitopia/comment.js +495 -0
  186. package/dist/gitopia/gitopia/gitopia/dao.d.ts +160 -0
  187. package/dist/gitopia/gitopia/gitopia/dao.js +454 -0
  188. package/dist/gitopia/gitopia/gitopia/exercised_amount.d.ts +34 -0
  189. package/dist/gitopia/gitopia/gitopia/exercised_amount.js +81 -0
  190. package/dist/gitopia/gitopia/gitopia/genesis.d.ts +143 -0
  191. package/dist/gitopia/gitopia/gitopia/genesis.js +463 -0
  192. package/dist/gitopia/gitopia/gitopia/issue.d.ts +88 -0
  193. package/dist/gitopia/gitopia/gitopia/issue.js +328 -0
  194. package/dist/gitopia/gitopia/gitopia/params.d.ts +115 -0
  195. package/dist/gitopia/gitopia/gitopia/params.js +296 -0
  196. package/dist/gitopia/gitopia/gitopia/pullRequest.d.ts +177 -0
  197. package/dist/gitopia/gitopia/gitopia/pullRequest.js +570 -0
  198. package/dist/gitopia/gitopia/gitopia/query.d.ts +3130 -0
  199. package/dist/gitopia/gitopia/gitopia/query.js +7355 -0
  200. package/dist/gitopia/gitopia/gitopia/query.lcd.d.ts +54 -0
  201. package/dist/gitopia/gitopia/gitopia/query.lcd.js +456 -0
  202. package/dist/gitopia/gitopia/gitopia/query.rpc.Query.d.ts +188 -0
  203. package/dist/gitopia/gitopia/gitopia/query.rpc.Query.js +458 -0
  204. package/dist/gitopia/gitopia/gitopia/reaction.d.ts +42 -0
  205. package/dist/gitopia/gitopia/gitopia/reaction.js +128 -0
  206. package/dist/gitopia/gitopia/gitopia/release.d.ts +70 -0
  207. package/dist/gitopia/gitopia/gitopia/release.js +228 -0
  208. package/dist/gitopia/gitopia/gitopia/repository.d.ts +424 -0
  209. package/dist/gitopia/gitopia/gitopia/repository.js +1207 -0
  210. package/dist/gitopia/gitopia/gitopia/tag.d.ts +45 -0
  211. package/dist/gitopia/gitopia/gitopia/tag.js +128 -0
  212. package/dist/gitopia/gitopia/gitopia/task.d.ts +64 -0
  213. package/dist/gitopia/gitopia/gitopia/task.js +204 -0
  214. package/dist/gitopia/gitopia/gitopia/tx.amino.d.ts +463 -0
  215. package/dist/gitopia/gitopia/gitopia/tx.amino.js +467 -0
  216. package/dist/gitopia/gitopia/gitopia/tx.d.ts +6246 -0
  217. package/dist/gitopia/gitopia/gitopia/tx.js +14687 -0
  218. package/dist/gitopia/gitopia/gitopia/tx.registry.d.ts +1116 -0
  219. package/dist/gitopia/gitopia/gitopia/tx.registry.js +1675 -0
  220. package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.d.ts +200 -0
  221. package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.js +564 -0
  222. package/dist/gitopia/gitopia/gitopia/user.d.ts +104 -0
  223. package/dist/gitopia/gitopia/gitopia/user.js +343 -0
  224. package/dist/gitopia/gitopia/gitopia/whois.d.ts +51 -0
  225. package/dist/gitopia/gitopia/gitopia/whois.js +151 -0
  226. package/dist/gitopia/gitopia/offchain/offchain.d.ts +74 -0
  227. package/dist/gitopia/gitopia/offchain/offchain.js +147 -0
  228. package/dist/gitopia/gitopia/rewards/genesis.d.ts +40 -0
  229. package/dist/gitopia/gitopia/rewards/genesis.js +85 -0
  230. package/dist/gitopia/gitopia/rewards/params.d.ts +37 -0
  231. package/dist/gitopia/gitopia/rewards/params.js +84 -0
  232. package/dist/gitopia/gitopia/rewards/pool.d.ts +59 -0
  233. package/dist/gitopia/gitopia/rewards/pool.js +196 -0
  234. package/dist/gitopia/gitopia/rewards/query.d.ts +294 -0
  235. package/dist/gitopia/gitopia/rewards/query.js +657 -0
  236. package/dist/gitopia/gitopia/rewards/query.lcd.d.ts +12 -0
  237. package/dist/gitopia/gitopia/rewards/query.lcd.js +44 -0
  238. package/dist/gitopia/gitopia/rewards/query.rpc.Query.d.ts +28 -0
  239. package/dist/gitopia/gitopia/rewards/query.rpc.Query.js +58 -0
  240. package/dist/gitopia/gitopia/rewards/rewards.d.ts +79 -0
  241. package/dist/gitopia/gitopia/rewards/rewards.js +194 -0
  242. package/dist/gitopia/gitopia/rewards/task.d.ts +54 -0
  243. package/dist/gitopia/gitopia/rewards/task.js +181 -0
  244. package/dist/gitopia/gitopia/rewards/tx.amino.d.ts +18 -0
  245. package/dist/gitopia/gitopia/rewards/tx.amino.js +22 -0
  246. package/dist/gitopia/gitopia/rewards/tx.d.ts +242 -0
  247. package/dist/gitopia/gitopia/rewards/tx.js +528 -0
  248. package/dist/gitopia/gitopia/rewards/tx.registry.d.ts +48 -0
  249. package/dist/gitopia/gitopia/rewards/tx.registry.js +73 -0
  250. package/dist/gitopia/gitopia/rewards/tx.rpc.msg.d.ts +19 -0
  251. package/dist/gitopia/gitopia/rewards/tx.rpc.msg.js +30 -0
  252. package/dist/gitopia/rpc.query.d.ts +117 -0
  253. package/dist/gitopia/rpc.query.js +66 -0
  254. package/dist/gitopia/rpc.tx.d.ts +16 -0
  255. package/dist/gitopia/rpc.tx.js +50 -0
  256. package/dist/gogoproto/bundle.d.ts +1 -0
  257. package/dist/gogoproto/bundle.js +41 -0
  258. package/dist/gogoproto/gogo.d.ts +1 -0
  259. package/dist/gogoproto/gogo.js +2 -0
  260. package/dist/google/api/annotations.d.ts +1 -0
  261. package/dist/google/api/annotations.js +2 -0
  262. package/dist/google/api/http.d.ts +1049 -0
  263. package/dist/google/api/http.js +332 -0
  264. package/dist/google/bundle.d.ts +525 -0
  265. package/dist/google/bundle.js +50 -0
  266. package/dist/google/protobuf/any.d.ts +358 -0
  267. package/dist/google/protobuf/any.js +77 -0
  268. package/dist/google/protobuf/descriptor.d.ts +3178 -0
  269. package/dist/google/protobuf/descriptor.js +4886 -0
  270. package/dist/google/protobuf/duration.d.ts +223 -0
  271. package/dist/google/protobuf/duration.js +74 -0
  272. package/dist/google/protobuf/timestamp.d.ts +314 -0
  273. package/dist/google/protobuf/timestamp.js +71 -0
  274. package/dist/helpers.d.ts +82 -0
  275. package/dist/helpers.js +146 -0
  276. package/dist/ibc/applications/transfer/v1/query.d.ts +479 -0
  277. package/dist/ibc/applications/transfer/v1/query.js +850 -0
  278. package/dist/ibc/applications/transfer/v1/query.lcd.d.ts +14 -0
  279. package/dist/ibc/applications/transfer/v1/query.lcd.js +74 -0
  280. package/dist/ibc/applications/transfer/v1/query.rpc.Query.d.ts +36 -0
  281. package/dist/ibc/applications/transfer/v1/query.rpc.Query.js +76 -0
  282. package/dist/ibc/applications/transfer/v1/transfer.d.ts +123 -0
  283. package/dist/ibc/applications/transfer/v1/transfer.js +167 -0
  284. package/dist/ibc/applications/transfer/v1/tx.amino.d.ts +8 -0
  285. package/dist/ibc/applications/transfer/v1/tx.amino.js +12 -0
  286. package/dist/ibc/applications/transfer/v1/tx.d.ts +132 -0
  287. package/dist/ibc/applications/transfer/v1/tx.js +229 -0
  288. package/dist/ibc/applications/transfer/v1/tx.registry.d.ts +24 -0
  289. package/dist/ibc/applications/transfer/v1/tx.registry.js +37 -0
  290. package/dist/ibc/applications/transfer/v1/tx.rpc.msg.d.ts +12 -0
  291. package/dist/ibc/applications/transfer/v1/tx.rpc.msg.js +18 -0
  292. package/dist/ibc/bundle.d.ts +450 -0
  293. package/dist/ibc/bundle.js +80 -0
  294. package/dist/ibc/client.d.ts +22 -0
  295. package/dist/ibc/client.js +67 -0
  296. package/dist/ibc/core/client/v1/client.d.ts +408 -0
  297. package/dist/ibc/core/client/v1/client.js +614 -0
  298. package/dist/ibc/rpc.query.d.ts +73 -0
  299. package/dist/ibc/rpc.query.js +67 -0
  300. package/dist/ibc/rpc.tx.d.ts +17 -0
  301. package/dist/ibc/rpc.tx.js +51 -0
  302. package/dist/index.d.ts +18 -0
  303. package/dist/index.js +35 -0
  304. package/dist/package.json +49 -0
  305. package/dist/utf8.d.ts +27 -0
  306. package/dist/utf8.js +141 -0
  307. package/dist/varint.d.ts +105 -0
  308. package/dist/varint.js +426 -0
  309. package/package.json +11 -8
  310. package/CHANGELOG.md +0 -8
@@ -0,0 +1,1112 @@
1
+ //@ts-nocheck
2
+ import { Coin } from "../../base/v1beta1/coin";
3
+ import { Any } from "../../../google/protobuf/any";
4
+ import { Timestamp } from "../../../google/protobuf/timestamp";
5
+ import { Duration } from "../../../google/protobuf/duration";
6
+ import { SoftwareUpgradeProposal, CancelSoftwareUpgradeProposal } from "../../upgrade/v1beta1/upgrade";
7
+ import { ClientUpdateProposal, UpgradeProposal } from "../../../ibc/core/client/v1/client";
8
+ import { BinaryReader, BinaryWriter } from "../../../binary";
9
+ import { Decimal } from "@cosmjs/math";
10
+ import { toTimestamp, fromTimestamp, bytesFromBase64, base64FromBytes } from "../../../helpers";
11
+ /** VoteOption enumerates the valid vote options for a given governance proposal. */
12
+ export var VoteOption;
13
+ (function (VoteOption) {
14
+ /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */
15
+ VoteOption[VoteOption["VOTE_OPTION_UNSPECIFIED"] = 0] = "VOTE_OPTION_UNSPECIFIED";
16
+ /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
17
+ VoteOption[VoteOption["VOTE_OPTION_YES"] = 1] = "VOTE_OPTION_YES";
18
+ /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
19
+ VoteOption[VoteOption["VOTE_OPTION_ABSTAIN"] = 2] = "VOTE_OPTION_ABSTAIN";
20
+ /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
21
+ VoteOption[VoteOption["VOTE_OPTION_NO"] = 3] = "VOTE_OPTION_NO";
22
+ /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
23
+ VoteOption[VoteOption["VOTE_OPTION_NO_WITH_VETO"] = 4] = "VOTE_OPTION_NO_WITH_VETO";
24
+ VoteOption[VoteOption["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
25
+ })(VoteOption || (VoteOption = {}));
26
+ export const VoteOptionSDKType = VoteOption;
27
+ export const VoteOptionAmino = VoteOption;
28
+ export function voteOptionFromJSON(object) {
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
+ export function voteOptionToJSON(object) {
52
+ switch (object) {
53
+ case VoteOption.VOTE_OPTION_UNSPECIFIED:
54
+ return "VOTE_OPTION_UNSPECIFIED";
55
+ case VoteOption.VOTE_OPTION_YES:
56
+ return "VOTE_OPTION_YES";
57
+ case VoteOption.VOTE_OPTION_ABSTAIN:
58
+ return "VOTE_OPTION_ABSTAIN";
59
+ case VoteOption.VOTE_OPTION_NO:
60
+ return "VOTE_OPTION_NO";
61
+ case VoteOption.VOTE_OPTION_NO_WITH_VETO:
62
+ return "VOTE_OPTION_NO_WITH_VETO";
63
+ case VoteOption.UNRECOGNIZED:
64
+ default:
65
+ return "UNRECOGNIZED";
66
+ }
67
+ }
68
+ /** ProposalStatus enumerates the valid statuses of a proposal. */
69
+ export var ProposalStatus;
70
+ (function (ProposalStatus) {
71
+ /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. */
72
+ ProposalStatus[ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = 0] = "PROPOSAL_STATUS_UNSPECIFIED";
73
+ /**
74
+ * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
75
+ * period.
76
+ */
77
+ ProposalStatus[ProposalStatus["PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD";
78
+ /**
79
+ * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
80
+ * period.
81
+ */
82
+ ProposalStatus[ProposalStatus["PROPOSAL_STATUS_VOTING_PERIOD"] = 2] = "PROPOSAL_STATUS_VOTING_PERIOD";
83
+ /**
84
+ * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
85
+ * passed.
86
+ */
87
+ ProposalStatus[ProposalStatus["PROPOSAL_STATUS_PASSED"] = 3] = "PROPOSAL_STATUS_PASSED";
88
+ /**
89
+ * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
90
+ * been rejected.
91
+ */
92
+ ProposalStatus[ProposalStatus["PROPOSAL_STATUS_REJECTED"] = 4] = "PROPOSAL_STATUS_REJECTED";
93
+ /**
94
+ * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
95
+ * failed.
96
+ */
97
+ ProposalStatus[ProposalStatus["PROPOSAL_STATUS_FAILED"] = 5] = "PROPOSAL_STATUS_FAILED";
98
+ ProposalStatus[ProposalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
99
+ })(ProposalStatus || (ProposalStatus = {}));
100
+ export const ProposalStatusSDKType = ProposalStatus;
101
+ export const ProposalStatusAmino = ProposalStatus;
102
+ export function proposalStatusFromJSON(object) {
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
+ export function proposalStatusToJSON(object) {
129
+ switch (object) {
130
+ case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
131
+ return "PROPOSAL_STATUS_UNSPECIFIED";
132
+ case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:
133
+ return "PROPOSAL_STATUS_DEPOSIT_PERIOD";
134
+ case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:
135
+ return "PROPOSAL_STATUS_VOTING_PERIOD";
136
+ case ProposalStatus.PROPOSAL_STATUS_PASSED:
137
+ return "PROPOSAL_STATUS_PASSED";
138
+ case ProposalStatus.PROPOSAL_STATUS_REJECTED:
139
+ return "PROPOSAL_STATUS_REJECTED";
140
+ case ProposalStatus.PROPOSAL_STATUS_FAILED:
141
+ return "PROPOSAL_STATUS_FAILED";
142
+ case ProposalStatus.UNRECOGNIZED:
143
+ default:
144
+ return "UNRECOGNIZED";
145
+ }
146
+ }
147
+ function createBaseWeightedVoteOption() {
148
+ return {
149
+ option: 0,
150
+ weight: ""
151
+ };
152
+ }
153
+ export const WeightedVoteOption = {
154
+ typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption",
155
+ encode(message, writer = BinaryWriter.create()) {
156
+ if (message.option !== 0) {
157
+ writer.uint32(8).int32(message.option);
158
+ }
159
+ if (message.weight !== "") {
160
+ writer.uint32(18).string(Decimal.fromUserInput(message.weight, 18).atomics);
161
+ }
162
+ return writer;
163
+ },
164
+ decode(input, length) {
165
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
166
+ let end = length === undefined ? reader.len : reader.pos + length;
167
+ const message = createBaseWeightedVoteOption();
168
+ while (reader.pos < end) {
169
+ const tag = reader.uint32();
170
+ switch (tag >>> 3) {
171
+ case 1:
172
+ message.option = reader.int32();
173
+ break;
174
+ case 2:
175
+ message.weight = Decimal.fromAtomics(reader.string(), 18).toString();
176
+ break;
177
+ default:
178
+ reader.skipType(tag & 7);
179
+ break;
180
+ }
181
+ }
182
+ return message;
183
+ },
184
+ fromPartial(object) {
185
+ const message = createBaseWeightedVoteOption();
186
+ message.option = object.option ?? 0;
187
+ message.weight = object.weight ?? "";
188
+ return message;
189
+ },
190
+ fromAmino(object) {
191
+ const message = createBaseWeightedVoteOption();
192
+ if (object.option !== undefined && object.option !== null) {
193
+ message.option = object.option;
194
+ }
195
+ if (object.weight !== undefined && object.weight !== null) {
196
+ message.weight = object.weight;
197
+ }
198
+ return message;
199
+ },
200
+ toAmino(message) {
201
+ const obj = {};
202
+ obj.option = message.option === 0 ? undefined : message.option;
203
+ obj.weight = message.weight === "" ? undefined : message.weight;
204
+ return obj;
205
+ },
206
+ fromAminoMsg(object) {
207
+ return WeightedVoteOption.fromAmino(object.value);
208
+ },
209
+ toAminoMsg(message) {
210
+ return {
211
+ type: "cosmos-sdk/WeightedVoteOption",
212
+ value: WeightedVoteOption.toAmino(message)
213
+ };
214
+ },
215
+ fromProtoMsg(message) {
216
+ return WeightedVoteOption.decode(message.value);
217
+ },
218
+ toProto(message) {
219
+ return WeightedVoteOption.encode(message).finish();
220
+ },
221
+ toProtoMsg(message) {
222
+ return {
223
+ typeUrl: "/cosmos.gov.v1beta1.WeightedVoteOption",
224
+ value: WeightedVoteOption.encode(message).finish()
225
+ };
226
+ }
227
+ };
228
+ function createBaseTextProposal() {
229
+ return {
230
+ $typeUrl: "/cosmos.gov.v1beta1.TextProposal",
231
+ title: "",
232
+ description: ""
233
+ };
234
+ }
235
+ export const TextProposal = {
236
+ typeUrl: "/cosmos.gov.v1beta1.TextProposal",
237
+ encode(message, writer = BinaryWriter.create()) {
238
+ if (message.title !== "") {
239
+ writer.uint32(10).string(message.title);
240
+ }
241
+ if (message.description !== "") {
242
+ writer.uint32(18).string(message.description);
243
+ }
244
+ return writer;
245
+ },
246
+ decode(input, length) {
247
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
248
+ let end = length === undefined ? reader.len : reader.pos + length;
249
+ const message = createBaseTextProposal();
250
+ while (reader.pos < end) {
251
+ const tag = reader.uint32();
252
+ switch (tag >>> 3) {
253
+ case 1:
254
+ message.title = reader.string();
255
+ break;
256
+ case 2:
257
+ message.description = reader.string();
258
+ break;
259
+ default:
260
+ reader.skipType(tag & 7);
261
+ break;
262
+ }
263
+ }
264
+ return message;
265
+ },
266
+ fromPartial(object) {
267
+ const message = createBaseTextProposal();
268
+ message.title = object.title ?? "";
269
+ message.description = object.description ?? "";
270
+ return message;
271
+ },
272
+ fromAmino(object) {
273
+ const message = createBaseTextProposal();
274
+ if (object.title !== undefined && object.title !== null) {
275
+ message.title = object.title;
276
+ }
277
+ if (object.description !== undefined && object.description !== null) {
278
+ message.description = object.description;
279
+ }
280
+ return message;
281
+ },
282
+ toAmino(message) {
283
+ const obj = {};
284
+ obj.title = message.title === "" ? undefined : message.title;
285
+ obj.description = message.description === "" ? undefined : message.description;
286
+ return obj;
287
+ },
288
+ fromAminoMsg(object) {
289
+ return TextProposal.fromAmino(object.value);
290
+ },
291
+ toAminoMsg(message) {
292
+ return {
293
+ type: "cosmos-sdk/TextProposal",
294
+ value: TextProposal.toAmino(message)
295
+ };
296
+ },
297
+ fromProtoMsg(message) {
298
+ return TextProposal.decode(message.value);
299
+ },
300
+ toProto(message) {
301
+ return TextProposal.encode(message).finish();
302
+ },
303
+ toProtoMsg(message) {
304
+ return {
305
+ typeUrl: "/cosmos.gov.v1beta1.TextProposal",
306
+ value: TextProposal.encode(message).finish()
307
+ };
308
+ }
309
+ };
310
+ function createBaseDeposit() {
311
+ return {
312
+ proposalId: BigInt(0),
313
+ depositor: "",
314
+ amount: []
315
+ };
316
+ }
317
+ export const Deposit = {
318
+ typeUrl: "/cosmos.gov.v1beta1.Deposit",
319
+ encode(message, writer = BinaryWriter.create()) {
320
+ if (message.proposalId !== BigInt(0)) {
321
+ writer.uint32(8).uint64(message.proposalId);
322
+ }
323
+ if (message.depositor !== "") {
324
+ writer.uint32(18).string(message.depositor);
325
+ }
326
+ for (const v of message.amount) {
327
+ Coin.encode(v, writer.uint32(26).fork()).ldelim();
328
+ }
329
+ return writer;
330
+ },
331
+ decode(input, length) {
332
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
333
+ let end = length === undefined ? reader.len : reader.pos + length;
334
+ const message = createBaseDeposit();
335
+ while (reader.pos < end) {
336
+ const tag = reader.uint32();
337
+ switch (tag >>> 3) {
338
+ case 1:
339
+ message.proposalId = reader.uint64();
340
+ break;
341
+ case 2:
342
+ message.depositor = reader.string();
343
+ break;
344
+ case 3:
345
+ message.amount.push(Coin.decode(reader, reader.uint32()));
346
+ break;
347
+ default:
348
+ reader.skipType(tag & 7);
349
+ break;
350
+ }
351
+ }
352
+ return message;
353
+ },
354
+ fromPartial(object) {
355
+ const message = createBaseDeposit();
356
+ message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
357
+ message.depositor = object.depositor ?? "";
358
+ message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
359
+ return message;
360
+ },
361
+ fromAmino(object) {
362
+ const message = createBaseDeposit();
363
+ if (object.proposal_id !== undefined && object.proposal_id !== null) {
364
+ message.proposalId = BigInt(object.proposal_id);
365
+ }
366
+ if (object.depositor !== undefined && object.depositor !== null) {
367
+ message.depositor = object.depositor;
368
+ }
369
+ message.amount = object.amount?.map(e => Coin.fromAmino(e)) || [];
370
+ return message;
371
+ },
372
+ toAmino(message) {
373
+ const obj = {};
374
+ obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
375
+ obj.depositor = message.depositor === "" ? undefined : message.depositor;
376
+ if (message.amount) {
377
+ obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined);
378
+ }
379
+ else {
380
+ obj.amount = message.amount;
381
+ }
382
+ return obj;
383
+ },
384
+ fromAminoMsg(object) {
385
+ return Deposit.fromAmino(object.value);
386
+ },
387
+ toAminoMsg(message) {
388
+ return {
389
+ type: "cosmos-sdk/Deposit",
390
+ value: Deposit.toAmino(message)
391
+ };
392
+ },
393
+ fromProtoMsg(message) {
394
+ return Deposit.decode(message.value);
395
+ },
396
+ toProto(message) {
397
+ return Deposit.encode(message).finish();
398
+ },
399
+ toProtoMsg(message) {
400
+ return {
401
+ typeUrl: "/cosmos.gov.v1beta1.Deposit",
402
+ value: Deposit.encode(message).finish()
403
+ };
404
+ }
405
+ };
406
+ function createBaseProposal() {
407
+ return {
408
+ proposalId: BigInt(0),
409
+ content: undefined,
410
+ status: 0,
411
+ finalTallyResult: TallyResult.fromPartial({}),
412
+ submitTime: new Date(),
413
+ depositEndTime: new Date(),
414
+ totalDeposit: [],
415
+ votingStartTime: new Date(),
416
+ votingEndTime: new Date()
417
+ };
418
+ }
419
+ export const Proposal = {
420
+ typeUrl: "/cosmos.gov.v1beta1.Proposal",
421
+ encode(message, writer = BinaryWriter.create()) {
422
+ if (message.proposalId !== BigInt(0)) {
423
+ writer.uint32(8).uint64(message.proposalId);
424
+ }
425
+ if (message.content !== undefined) {
426
+ Any.encode(message.content, writer.uint32(18).fork()).ldelim();
427
+ }
428
+ if (message.status !== 0) {
429
+ writer.uint32(24).int32(message.status);
430
+ }
431
+ if (message.finalTallyResult !== undefined) {
432
+ TallyResult.encode(message.finalTallyResult, writer.uint32(34).fork()).ldelim();
433
+ }
434
+ if (message.submitTime !== undefined) {
435
+ Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim();
436
+ }
437
+ if (message.depositEndTime !== undefined) {
438
+ Timestamp.encode(toTimestamp(message.depositEndTime), writer.uint32(50).fork()).ldelim();
439
+ }
440
+ for (const v of message.totalDeposit) {
441
+ Coin.encode(v, writer.uint32(58).fork()).ldelim();
442
+ }
443
+ if (message.votingStartTime !== undefined) {
444
+ Timestamp.encode(toTimestamp(message.votingStartTime), writer.uint32(66).fork()).ldelim();
445
+ }
446
+ if (message.votingEndTime !== undefined) {
447
+ Timestamp.encode(toTimestamp(message.votingEndTime), writer.uint32(74).fork()).ldelim();
448
+ }
449
+ return writer;
450
+ },
451
+ decode(input, length) {
452
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
453
+ let end = length === undefined ? reader.len : reader.pos + length;
454
+ const message = createBaseProposal();
455
+ while (reader.pos < end) {
456
+ const tag = reader.uint32();
457
+ switch (tag >>> 3) {
458
+ case 1:
459
+ message.proposalId = reader.uint64();
460
+ break;
461
+ case 2:
462
+ message.content = Cosmos_govv1beta1Content_InterfaceDecoder(reader);
463
+ break;
464
+ case 3:
465
+ message.status = reader.int32();
466
+ break;
467
+ case 4:
468
+ message.finalTallyResult = TallyResult.decode(reader, reader.uint32());
469
+ break;
470
+ case 5:
471
+ message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
472
+ break;
473
+ case 6:
474
+ message.depositEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
475
+ break;
476
+ case 7:
477
+ message.totalDeposit.push(Coin.decode(reader, reader.uint32()));
478
+ break;
479
+ case 8:
480
+ message.votingStartTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
481
+ break;
482
+ case 9:
483
+ message.votingEndTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
484
+ break;
485
+ default:
486
+ reader.skipType(tag & 7);
487
+ break;
488
+ }
489
+ }
490
+ return message;
491
+ },
492
+ fromPartial(object) {
493
+ const message = createBaseProposal();
494
+ message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
495
+ message.content = object.content !== undefined && object.content !== null ? Any.fromPartial(object.content) : undefined;
496
+ message.status = object.status ?? 0;
497
+ message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? TallyResult.fromPartial(object.finalTallyResult) : undefined;
498
+ message.submitTime = object.submitTime ?? undefined;
499
+ message.depositEndTime = object.depositEndTime ?? undefined;
500
+ message.totalDeposit = object.totalDeposit?.map(e => Coin.fromPartial(e)) || [];
501
+ message.votingStartTime = object.votingStartTime ?? undefined;
502
+ message.votingEndTime = object.votingEndTime ?? undefined;
503
+ return message;
504
+ },
505
+ fromAmino(object) {
506
+ const message = createBaseProposal();
507
+ if (object.proposal_id !== undefined && object.proposal_id !== null) {
508
+ message.proposalId = BigInt(object.proposal_id);
509
+ }
510
+ if (object.content !== undefined && object.content !== null) {
511
+ message.content = Cosmos_govv1beta1Content_FromAmino(object.content);
512
+ }
513
+ if (object.status !== undefined && object.status !== null) {
514
+ message.status = object.status;
515
+ }
516
+ if (object.final_tally_result !== undefined && object.final_tally_result !== null) {
517
+ message.finalTallyResult = TallyResult.fromAmino(object.final_tally_result);
518
+ }
519
+ if (object.submit_time !== undefined && object.submit_time !== null) {
520
+ message.submitTime = fromTimestamp(Timestamp.fromAmino(object.submit_time));
521
+ }
522
+ if (object.deposit_end_time !== undefined && object.deposit_end_time !== null) {
523
+ message.depositEndTime = fromTimestamp(Timestamp.fromAmino(object.deposit_end_time));
524
+ }
525
+ message.totalDeposit = object.total_deposit?.map(e => Coin.fromAmino(e)) || [];
526
+ if (object.voting_start_time !== undefined && object.voting_start_time !== null) {
527
+ message.votingStartTime = fromTimestamp(Timestamp.fromAmino(object.voting_start_time));
528
+ }
529
+ if (object.voting_end_time !== undefined && object.voting_end_time !== null) {
530
+ message.votingEndTime = fromTimestamp(Timestamp.fromAmino(object.voting_end_time));
531
+ }
532
+ return message;
533
+ },
534
+ toAmino(message) {
535
+ const obj = {};
536
+ obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
537
+ obj.content = message.content ? Cosmos_govv1beta1Content_ToAmino(message.content) : undefined;
538
+ obj.status = message.status === 0 ? undefined : message.status;
539
+ obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult) : TallyResult.toAmino(TallyResult.fromPartial({}));
540
+ obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : new Date();
541
+ obj.deposit_end_time = message.depositEndTime ? Timestamp.toAmino(toTimestamp(message.depositEndTime)) : new Date();
542
+ if (message.totalDeposit) {
543
+ obj.total_deposit = message.totalDeposit.map(e => e ? Coin.toAmino(e) : undefined);
544
+ }
545
+ else {
546
+ obj.total_deposit = message.totalDeposit;
547
+ }
548
+ obj.voting_start_time = message.votingStartTime ? Timestamp.toAmino(toTimestamp(message.votingStartTime)) : new Date();
549
+ obj.voting_end_time = message.votingEndTime ? Timestamp.toAmino(toTimestamp(message.votingEndTime)) : new Date();
550
+ return obj;
551
+ },
552
+ fromAminoMsg(object) {
553
+ return Proposal.fromAmino(object.value);
554
+ },
555
+ toAminoMsg(message) {
556
+ return {
557
+ type: "cosmos-sdk/Proposal",
558
+ value: Proposal.toAmino(message)
559
+ };
560
+ },
561
+ fromProtoMsg(message) {
562
+ return Proposal.decode(message.value);
563
+ },
564
+ toProto(message) {
565
+ return Proposal.encode(message).finish();
566
+ },
567
+ toProtoMsg(message) {
568
+ return {
569
+ typeUrl: "/cosmos.gov.v1beta1.Proposal",
570
+ value: Proposal.encode(message).finish()
571
+ };
572
+ }
573
+ };
574
+ function createBaseTallyResult() {
575
+ return {
576
+ yes: "",
577
+ abstain: "",
578
+ no: "",
579
+ noWithVeto: ""
580
+ };
581
+ }
582
+ export const TallyResult = {
583
+ typeUrl: "/cosmos.gov.v1beta1.TallyResult",
584
+ encode(message, writer = BinaryWriter.create()) {
585
+ if (message.yes !== "") {
586
+ writer.uint32(10).string(message.yes);
587
+ }
588
+ if (message.abstain !== "") {
589
+ writer.uint32(18).string(message.abstain);
590
+ }
591
+ if (message.no !== "") {
592
+ writer.uint32(26).string(message.no);
593
+ }
594
+ if (message.noWithVeto !== "") {
595
+ writer.uint32(34).string(message.noWithVeto);
596
+ }
597
+ return writer;
598
+ },
599
+ decode(input, length) {
600
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
601
+ let end = length === undefined ? reader.len : reader.pos + length;
602
+ const message = createBaseTallyResult();
603
+ while (reader.pos < end) {
604
+ const tag = reader.uint32();
605
+ switch (tag >>> 3) {
606
+ case 1:
607
+ message.yes = reader.string();
608
+ break;
609
+ case 2:
610
+ message.abstain = reader.string();
611
+ break;
612
+ case 3:
613
+ message.no = reader.string();
614
+ break;
615
+ case 4:
616
+ message.noWithVeto = reader.string();
617
+ break;
618
+ default:
619
+ reader.skipType(tag & 7);
620
+ break;
621
+ }
622
+ }
623
+ return message;
624
+ },
625
+ fromPartial(object) {
626
+ const message = createBaseTallyResult();
627
+ message.yes = object.yes ?? "";
628
+ message.abstain = object.abstain ?? "";
629
+ message.no = object.no ?? "";
630
+ message.noWithVeto = object.noWithVeto ?? "";
631
+ return message;
632
+ },
633
+ fromAmino(object) {
634
+ const message = createBaseTallyResult();
635
+ if (object.yes !== undefined && object.yes !== null) {
636
+ message.yes = object.yes;
637
+ }
638
+ if (object.abstain !== undefined && object.abstain !== null) {
639
+ message.abstain = object.abstain;
640
+ }
641
+ if (object.no !== undefined && object.no !== null) {
642
+ message.no = object.no;
643
+ }
644
+ if (object.no_with_veto !== undefined && object.no_with_veto !== null) {
645
+ message.noWithVeto = object.no_with_veto;
646
+ }
647
+ return message;
648
+ },
649
+ toAmino(message) {
650
+ const obj = {};
651
+ obj.yes = message.yes === "" ? undefined : message.yes;
652
+ obj.abstain = message.abstain === "" ? undefined : message.abstain;
653
+ obj.no = message.no === "" ? undefined : message.no;
654
+ obj.no_with_veto = message.noWithVeto === "" ? undefined : message.noWithVeto;
655
+ return obj;
656
+ },
657
+ fromAminoMsg(object) {
658
+ return TallyResult.fromAmino(object.value);
659
+ },
660
+ toAminoMsg(message) {
661
+ return {
662
+ type: "cosmos-sdk/TallyResult",
663
+ value: TallyResult.toAmino(message)
664
+ };
665
+ },
666
+ fromProtoMsg(message) {
667
+ return TallyResult.decode(message.value);
668
+ },
669
+ toProto(message) {
670
+ return TallyResult.encode(message).finish();
671
+ },
672
+ toProtoMsg(message) {
673
+ return {
674
+ typeUrl: "/cosmos.gov.v1beta1.TallyResult",
675
+ value: TallyResult.encode(message).finish()
676
+ };
677
+ }
678
+ };
679
+ function createBaseVote() {
680
+ return {
681
+ proposalId: BigInt(0),
682
+ voter: "",
683
+ option: 0,
684
+ options: []
685
+ };
686
+ }
687
+ export const Vote = {
688
+ typeUrl: "/cosmos.gov.v1beta1.Vote",
689
+ encode(message, writer = BinaryWriter.create()) {
690
+ if (message.proposalId !== BigInt(0)) {
691
+ writer.uint32(8).uint64(message.proposalId);
692
+ }
693
+ if (message.voter !== "") {
694
+ writer.uint32(18).string(message.voter);
695
+ }
696
+ if (message.option !== 0) {
697
+ writer.uint32(24).int32(message.option);
698
+ }
699
+ for (const v of message.options) {
700
+ WeightedVoteOption.encode(v, writer.uint32(34).fork()).ldelim();
701
+ }
702
+ return writer;
703
+ },
704
+ decode(input, length) {
705
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
706
+ let end = length === undefined ? reader.len : reader.pos + length;
707
+ const message = createBaseVote();
708
+ while (reader.pos < end) {
709
+ const tag = reader.uint32();
710
+ switch (tag >>> 3) {
711
+ case 1:
712
+ message.proposalId = reader.uint64();
713
+ break;
714
+ case 2:
715
+ message.voter = reader.string();
716
+ break;
717
+ case 3:
718
+ message.option = reader.int32();
719
+ break;
720
+ case 4:
721
+ message.options.push(WeightedVoteOption.decode(reader, reader.uint32()));
722
+ break;
723
+ default:
724
+ reader.skipType(tag & 7);
725
+ break;
726
+ }
727
+ }
728
+ return message;
729
+ },
730
+ fromPartial(object) {
731
+ const message = createBaseVote();
732
+ message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
733
+ message.voter = object.voter ?? "";
734
+ message.option = object.option ?? 0;
735
+ message.options = object.options?.map(e => WeightedVoteOption.fromPartial(e)) || [];
736
+ return message;
737
+ },
738
+ fromAmino(object) {
739
+ const message = createBaseVote();
740
+ if (object.proposal_id !== undefined && object.proposal_id !== null) {
741
+ message.proposalId = BigInt(object.proposal_id);
742
+ }
743
+ if (object.voter !== undefined && object.voter !== null) {
744
+ message.voter = object.voter;
745
+ }
746
+ if (object.option !== undefined && object.option !== null) {
747
+ message.option = object.option;
748
+ }
749
+ message.options = object.options?.map(e => WeightedVoteOption.fromAmino(e)) || [];
750
+ return message;
751
+ },
752
+ toAmino(message) {
753
+ const obj = {};
754
+ obj.proposal_id = message.proposalId ? message.proposalId?.toString() : "0";
755
+ obj.voter = message.voter === "" ? undefined : message.voter;
756
+ obj.option = message.option === 0 ? undefined : message.option;
757
+ if (message.options) {
758
+ obj.options = message.options.map(e => e ? WeightedVoteOption.toAmino(e) : undefined);
759
+ }
760
+ else {
761
+ obj.options = message.options;
762
+ }
763
+ return obj;
764
+ },
765
+ fromAminoMsg(object) {
766
+ return Vote.fromAmino(object.value);
767
+ },
768
+ toAminoMsg(message) {
769
+ return {
770
+ type: "cosmos-sdk/Vote",
771
+ value: Vote.toAmino(message)
772
+ };
773
+ },
774
+ fromProtoMsg(message) {
775
+ return Vote.decode(message.value);
776
+ },
777
+ toProto(message) {
778
+ return Vote.encode(message).finish();
779
+ },
780
+ toProtoMsg(message) {
781
+ return {
782
+ typeUrl: "/cosmos.gov.v1beta1.Vote",
783
+ value: Vote.encode(message).finish()
784
+ };
785
+ }
786
+ };
787
+ function createBaseDepositParams() {
788
+ return {
789
+ minDeposit: [],
790
+ maxDepositPeriod: Duration.fromPartial({})
791
+ };
792
+ }
793
+ export const DepositParams = {
794
+ typeUrl: "/cosmos.gov.v1beta1.DepositParams",
795
+ encode(message, writer = BinaryWriter.create()) {
796
+ for (const v of message.minDeposit) {
797
+ Coin.encode(v, writer.uint32(10).fork()).ldelim();
798
+ }
799
+ if (message.maxDepositPeriod !== undefined) {
800
+ Duration.encode(message.maxDepositPeriod, writer.uint32(18).fork()).ldelim();
801
+ }
802
+ return writer;
803
+ },
804
+ decode(input, length) {
805
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
806
+ let end = length === undefined ? reader.len : reader.pos + length;
807
+ const message = createBaseDepositParams();
808
+ while (reader.pos < end) {
809
+ const tag = reader.uint32();
810
+ switch (tag >>> 3) {
811
+ case 1:
812
+ message.minDeposit.push(Coin.decode(reader, reader.uint32()));
813
+ break;
814
+ case 2:
815
+ message.maxDepositPeriod = Duration.decode(reader, reader.uint32());
816
+ break;
817
+ default:
818
+ reader.skipType(tag & 7);
819
+ break;
820
+ }
821
+ }
822
+ return message;
823
+ },
824
+ fromPartial(object) {
825
+ const message = createBaseDepositParams();
826
+ message.minDeposit = object.minDeposit?.map(e => Coin.fromPartial(e)) || [];
827
+ message.maxDepositPeriod = object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null ? Duration.fromPartial(object.maxDepositPeriod) : undefined;
828
+ return message;
829
+ },
830
+ fromAmino(object) {
831
+ const message = createBaseDepositParams();
832
+ message.minDeposit = object.min_deposit?.map(e => Coin.fromAmino(e)) || [];
833
+ if (object.max_deposit_period !== undefined && object.max_deposit_period !== null) {
834
+ message.maxDepositPeriod = Duration.fromAmino(object.max_deposit_period);
835
+ }
836
+ return message;
837
+ },
838
+ toAmino(message) {
839
+ const obj = {};
840
+ if (message.minDeposit) {
841
+ obj.min_deposit = message.minDeposit.map(e => e ? Coin.toAmino(e) : undefined);
842
+ }
843
+ else {
844
+ obj.min_deposit = message.minDeposit;
845
+ }
846
+ obj.max_deposit_period = message.maxDepositPeriod ? Duration.toAmino(message.maxDepositPeriod) : undefined;
847
+ return obj;
848
+ },
849
+ fromAminoMsg(object) {
850
+ return DepositParams.fromAmino(object.value);
851
+ },
852
+ toAminoMsg(message) {
853
+ return {
854
+ type: "cosmos-sdk/DepositParams",
855
+ value: DepositParams.toAmino(message)
856
+ };
857
+ },
858
+ fromProtoMsg(message) {
859
+ return DepositParams.decode(message.value);
860
+ },
861
+ toProto(message) {
862
+ return DepositParams.encode(message).finish();
863
+ },
864
+ toProtoMsg(message) {
865
+ return {
866
+ typeUrl: "/cosmos.gov.v1beta1.DepositParams",
867
+ value: DepositParams.encode(message).finish()
868
+ };
869
+ }
870
+ };
871
+ function createBaseVotingParams() {
872
+ return {
873
+ votingPeriod: Duration.fromPartial({})
874
+ };
875
+ }
876
+ export const VotingParams = {
877
+ typeUrl: "/cosmos.gov.v1beta1.VotingParams",
878
+ encode(message, writer = BinaryWriter.create()) {
879
+ if (message.votingPeriod !== undefined) {
880
+ Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim();
881
+ }
882
+ return writer;
883
+ },
884
+ decode(input, length) {
885
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
886
+ let end = length === undefined ? reader.len : reader.pos + length;
887
+ const message = createBaseVotingParams();
888
+ while (reader.pos < end) {
889
+ const tag = reader.uint32();
890
+ switch (tag >>> 3) {
891
+ case 1:
892
+ message.votingPeriod = Duration.decode(reader, reader.uint32());
893
+ break;
894
+ default:
895
+ reader.skipType(tag & 7);
896
+ break;
897
+ }
898
+ }
899
+ return message;
900
+ },
901
+ fromPartial(object) {
902
+ const message = createBaseVotingParams();
903
+ message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined;
904
+ return message;
905
+ },
906
+ fromAmino(object) {
907
+ const message = createBaseVotingParams();
908
+ if (object.voting_period !== undefined && object.voting_period !== null) {
909
+ message.votingPeriod = Duration.fromAmino(object.voting_period);
910
+ }
911
+ return message;
912
+ },
913
+ toAmino(message) {
914
+ const obj = {};
915
+ obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : undefined;
916
+ return obj;
917
+ },
918
+ fromAminoMsg(object) {
919
+ return VotingParams.fromAmino(object.value);
920
+ },
921
+ toAminoMsg(message) {
922
+ return {
923
+ type: "cosmos-sdk/VotingParams",
924
+ value: VotingParams.toAmino(message)
925
+ };
926
+ },
927
+ fromProtoMsg(message) {
928
+ return VotingParams.decode(message.value);
929
+ },
930
+ toProto(message) {
931
+ return VotingParams.encode(message).finish();
932
+ },
933
+ toProtoMsg(message) {
934
+ return {
935
+ typeUrl: "/cosmos.gov.v1beta1.VotingParams",
936
+ value: VotingParams.encode(message).finish()
937
+ };
938
+ }
939
+ };
940
+ function createBaseTallyParams() {
941
+ return {
942
+ quorum: new Uint8Array(),
943
+ threshold: new Uint8Array(),
944
+ vetoThreshold: new Uint8Array()
945
+ };
946
+ }
947
+ export const TallyParams = {
948
+ typeUrl: "/cosmos.gov.v1beta1.TallyParams",
949
+ encode(message, writer = BinaryWriter.create()) {
950
+ if (message.quorum.length !== 0) {
951
+ writer.uint32(10).bytes(message.quorum);
952
+ }
953
+ if (message.threshold.length !== 0) {
954
+ writer.uint32(18).bytes(message.threshold);
955
+ }
956
+ if (message.vetoThreshold.length !== 0) {
957
+ writer.uint32(26).bytes(message.vetoThreshold);
958
+ }
959
+ return writer;
960
+ },
961
+ decode(input, length) {
962
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
963
+ let end = length === undefined ? reader.len : reader.pos + length;
964
+ const message = createBaseTallyParams();
965
+ while (reader.pos < end) {
966
+ const tag = reader.uint32();
967
+ switch (tag >>> 3) {
968
+ case 1:
969
+ message.quorum = reader.bytes();
970
+ break;
971
+ case 2:
972
+ message.threshold = reader.bytes();
973
+ break;
974
+ case 3:
975
+ message.vetoThreshold = reader.bytes();
976
+ break;
977
+ default:
978
+ reader.skipType(tag & 7);
979
+ break;
980
+ }
981
+ }
982
+ return message;
983
+ },
984
+ fromPartial(object) {
985
+ const message = createBaseTallyParams();
986
+ message.quorum = object.quorum ?? new Uint8Array();
987
+ message.threshold = object.threshold ?? new Uint8Array();
988
+ message.vetoThreshold = object.vetoThreshold ?? new Uint8Array();
989
+ return message;
990
+ },
991
+ fromAmino(object) {
992
+ const message = createBaseTallyParams();
993
+ if (object.quorum !== undefined && object.quorum !== null) {
994
+ message.quorum = bytesFromBase64(object.quorum);
995
+ }
996
+ if (object.threshold !== undefined && object.threshold !== null) {
997
+ message.threshold = bytesFromBase64(object.threshold);
998
+ }
999
+ if (object.veto_threshold !== undefined && object.veto_threshold !== null) {
1000
+ message.vetoThreshold = bytesFromBase64(object.veto_threshold);
1001
+ }
1002
+ return message;
1003
+ },
1004
+ toAmino(message) {
1005
+ const obj = {};
1006
+ obj.quorum = message.quorum ? base64FromBytes(message.quorum) : undefined;
1007
+ obj.threshold = message.threshold ? base64FromBytes(message.threshold) : undefined;
1008
+ obj.veto_threshold = message.vetoThreshold ? base64FromBytes(message.vetoThreshold) : undefined;
1009
+ return obj;
1010
+ },
1011
+ fromAminoMsg(object) {
1012
+ return TallyParams.fromAmino(object.value);
1013
+ },
1014
+ toAminoMsg(message) {
1015
+ return {
1016
+ type: "cosmos-sdk/TallyParams",
1017
+ value: TallyParams.toAmino(message)
1018
+ };
1019
+ },
1020
+ fromProtoMsg(message) {
1021
+ return TallyParams.decode(message.value);
1022
+ },
1023
+ toProto(message) {
1024
+ return TallyParams.encode(message).finish();
1025
+ },
1026
+ toProtoMsg(message) {
1027
+ return {
1028
+ typeUrl: "/cosmos.gov.v1beta1.TallyParams",
1029
+ value: TallyParams.encode(message).finish()
1030
+ };
1031
+ }
1032
+ };
1033
+ export const Cosmos_govv1beta1Content_InterfaceDecoder = (input) => {
1034
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1035
+ const data = Any.decode(reader, reader.uint32());
1036
+ switch (data.typeUrl) {
1037
+ case "/cosmos.gov.v1beta1.TextProposal":
1038
+ return TextProposal.decode(data.value);
1039
+ case "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal":
1040
+ return SoftwareUpgradeProposal.decode(data.value);
1041
+ case "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal":
1042
+ return CancelSoftwareUpgradeProposal.decode(data.value);
1043
+ case "/ibc.core.client.v1.ClientUpdateProposal":
1044
+ return ClientUpdateProposal.decode(data.value);
1045
+ case "/ibc.core.client.v1.UpgradeProposal":
1046
+ return UpgradeProposal.decode(data.value);
1047
+ default:
1048
+ return data;
1049
+ }
1050
+ };
1051
+ export const Cosmos_govv1beta1Content_FromAmino = (content) => {
1052
+ switch (content.type) {
1053
+ case "cosmos-sdk/TextProposal":
1054
+ return Any.fromPartial({
1055
+ typeUrl: "/cosmos.gov.v1beta1.TextProposal",
1056
+ value: TextProposal.encode(TextProposal.fromPartial(TextProposal.fromAmino(content.value))).finish()
1057
+ });
1058
+ case "cosmos-sdk/SoftwareUpgradeProposal":
1059
+ return Any.fromPartial({
1060
+ typeUrl: "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",
1061
+ value: SoftwareUpgradeProposal.encode(SoftwareUpgradeProposal.fromPartial(SoftwareUpgradeProposal.fromAmino(content.value))).finish()
1062
+ });
1063
+ case "cosmos-sdk/CancelSoftwareUpgradeProposal":
1064
+ return Any.fromPartial({
1065
+ typeUrl: "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",
1066
+ value: CancelSoftwareUpgradeProposal.encode(CancelSoftwareUpgradeProposal.fromPartial(CancelSoftwareUpgradeProposal.fromAmino(content.value))).finish()
1067
+ });
1068
+ case "cosmos-sdk/ClientUpdateProposal":
1069
+ return Any.fromPartial({
1070
+ typeUrl: "/ibc.core.client.v1.ClientUpdateProposal",
1071
+ value: ClientUpdateProposal.encode(ClientUpdateProposal.fromPartial(ClientUpdateProposal.fromAmino(content.value))).finish()
1072
+ });
1073
+ case "cosmos-sdk/UpgradeProposal":
1074
+ return Any.fromPartial({
1075
+ typeUrl: "/ibc.core.client.v1.UpgradeProposal",
1076
+ value: UpgradeProposal.encode(UpgradeProposal.fromPartial(UpgradeProposal.fromAmino(content.value))).finish()
1077
+ });
1078
+ default:
1079
+ return Any.fromAmino(content);
1080
+ }
1081
+ };
1082
+ export const Cosmos_govv1beta1Content_ToAmino = (content) => {
1083
+ switch (content.typeUrl) {
1084
+ case "/cosmos.gov.v1beta1.TextProposal":
1085
+ return {
1086
+ type: "cosmos-sdk/TextProposal",
1087
+ value: TextProposal.toAmino(TextProposal.decode(content.value, undefined))
1088
+ };
1089
+ case "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal":
1090
+ return {
1091
+ type: "cosmos-sdk/SoftwareUpgradeProposal",
1092
+ value: SoftwareUpgradeProposal.toAmino(SoftwareUpgradeProposal.decode(content.value, undefined))
1093
+ };
1094
+ case "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal":
1095
+ return {
1096
+ type: "cosmos-sdk/CancelSoftwareUpgradeProposal",
1097
+ value: CancelSoftwareUpgradeProposal.toAmino(CancelSoftwareUpgradeProposal.decode(content.value, undefined))
1098
+ };
1099
+ case "/ibc.core.client.v1.ClientUpdateProposal":
1100
+ return {
1101
+ type: "cosmos-sdk/ClientUpdateProposal",
1102
+ value: ClientUpdateProposal.toAmino(ClientUpdateProposal.decode(content.value, undefined))
1103
+ };
1104
+ case "/ibc.core.client.v1.UpgradeProposal":
1105
+ return {
1106
+ type: "cosmos-sdk/UpgradeProposal",
1107
+ value: UpgradeProposal.toAmino(UpgradeProposal.decode(content.value, undefined))
1108
+ };
1109
+ default:
1110
+ return Any.toAmino(content);
1111
+ }
1112
+ };