@burnt-labs/xion-types 0.0.1-test.1762962136

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 (554) hide show
  1. package/jest.config.js +18 -0
  2. package/package.json +56 -0
  3. package/scripts/aminos.ts +29 -0
  4. package/scripts/codegen.ts +94 -0
  5. package/scripts/download-protos.ts +248 -0
  6. package/telescope.config.json +84 -0
  7. package/tsconfig.esm.json +9 -0
  8. package/tsconfig.json +18 -0
  9. package/types/abstractaccount/bundle.ts +35 -0
  10. package/types/abstractaccount/client.ts +48 -0
  11. package/types/abstractaccount/lcd.ts +130 -0
  12. package/types/abstractaccount/rpc.query.ts +93 -0
  13. package/types/abstractaccount/rpc.tx.ts +74 -0
  14. package/types/abstractaccount/v1/account.ts +250 -0
  15. package/types/abstractaccount/v1/events.ts +135 -0
  16. package/types/abstractaccount/v1/genesis.ts +106 -0
  17. package/types/abstractaccount/v1/params.ts +192 -0
  18. package/types/abstractaccount/v1/query.lcd.ts +19 -0
  19. package/types/abstractaccount/v1/query.rpc.Query.ts +31 -0
  20. package/types/abstractaccount/v1/query.ts +160 -0
  21. package/types/abstractaccount/v1/tx.amino.ts +14 -0
  22. package/types/abstractaccount/v1/tx.registry.ts +53 -0
  23. package/types/abstractaccount/v1/tx.rpc.msg.ts +29 -0
  24. package/types/abstractaccount/v1/tx.ts +454 -0
  25. package/types/amino/amino.ts +1 -0
  26. package/types/amino/bundle.ts +5 -0
  27. package/types/binary.ts +535 -0
  28. package/types/cosmos/app/runtime/v1alpha1/module.ts +492 -0
  29. package/types/cosmos/app/v1alpha1/config.ts +437 -0
  30. package/types/cosmos/app/v1alpha1/module.ts +466 -0
  31. package/types/cosmos/app/v1alpha1/query.rpc.Query.ts +31 -0
  32. package/types/cosmos/app/v1alpha1/query.ts +176 -0
  33. package/types/cosmos/auth/module/v1/module.ts +288 -0
  34. package/types/cosmos/auth/v1beta1/auth.ts +562 -0
  35. package/types/cosmos/auth/v1beta1/genesis.ts +123 -0
  36. package/types/cosmos/auth/v1beta1/query.lcd.ts +91 -0
  37. package/types/cosmos/auth/v1beta1/query.rpc.Query.ts +137 -0
  38. package/types/cosmos/auth/v1beta1/query.ts +2005 -0
  39. package/types/cosmos/auth/v1beta1/tx.amino.ts +9 -0
  40. package/types/cosmos/auth/v1beta1/tx.registry.ts +35 -0
  41. package/types/cosmos/auth/v1beta1/tx.rpc.msg.ts +24 -0
  42. package/types/cosmos/auth/v1beta1/tx.ts +208 -0
  43. package/types/cosmos/authz/module/v1/module.ts +77 -0
  44. package/types/cosmos/authz/v1beta1/authz.ts +599 -0
  45. package/types/cosmos/authz/v1beta1/event.ts +274 -0
  46. package/types/cosmos/authz/v1beta1/genesis.ts +99 -0
  47. package/types/cosmos/authz/v1beta1/query.lcd.ts +59 -0
  48. package/types/cosmos/authz/v1beta1/query.rpc.Query.ts +53 -0
  49. package/types/cosmos/authz/v1beta1/query.ts +734 -0
  50. package/types/cosmos/authz/v1beta1/tx.amino.ts +19 -0
  51. package/types/cosmos/authz/v1beta1/tx.registry.ts +71 -0
  52. package/types/cosmos/authz/v1beta1/tx.rpc.msg.ts +49 -0
  53. package/types/cosmos/authz/v1beta1/tx.ts +666 -0
  54. package/types/cosmos/autocli/v1/options.ts +1317 -0
  55. package/types/cosmos/autocli/v1/query.rpc.Query.ts +32 -0
  56. package/types/cosmos/autocli/v1/query.ts +298 -0
  57. package/types/cosmos/bank/module/v1/module.ts +156 -0
  58. package/types/cosmos/bank/v1beta1/authz.ts +134 -0
  59. package/types/cosmos/bank/v1beta1/bank.ts +984 -0
  60. package/types/cosmos/bank/v1beta1/genesis.ts +316 -0
  61. package/types/cosmos/bank/v1beta1/query.lcd.ts +207 -0
  62. package/types/cosmos/bank/v1beta1/query.rpc.Query.ts +212 -0
  63. package/types/cosmos/bank/v1beta1/query.ts +3051 -0
  64. package/types/cosmos/bank/v1beta1/tx.amino.ts +24 -0
  65. package/types/cosmos/bank/v1beta1/tx.registry.ts +89 -0
  66. package/types/cosmos/bank/v1beta1/tx.rpc.msg.ts +53 -0
  67. package/types/cosmos/bank/v1beta1/tx.ts +845 -0
  68. package/types/cosmos/base/abci/v1beta1/abci.ts +1776 -0
  69. package/types/cosmos/base/node/v1beta1/query.lcd.ts +25 -0
  70. package/types/cosmos/base/node/v1beta1/query.rpc.Service.ts +42 -0
  71. package/types/cosmos/base/node/v1beta1/query.ts +467 -0
  72. package/types/cosmos/base/query/v1beta1/pagination.ts +372 -0
  73. package/types/cosmos/base/reflection/v1beta1/reflection.ts +385 -0
  74. package/types/cosmos/base/reflection/v2alpha1/reflection.ts +2790 -0
  75. package/types/cosmos/base/tendermint/v1beta1/query.lcd.ts +87 -0
  76. package/types/cosmos/base/tendermint/v1beta1/query.rpc.Service.ts +103 -0
  77. package/types/cosmos/base/tendermint/v1beta1/query.ts +2358 -0
  78. package/types/cosmos/base/tendermint/v1beta1/types.ts +492 -0
  79. package/types/cosmos/base/v1beta1/coin.ts +449 -0
  80. package/types/cosmos/benchmark/module/v1/module.ts +384 -0
  81. package/types/cosmos/benchmark/v1/benchmark.ts +186 -0
  82. package/types/cosmos/benchmark/v1/tx.amino.ts +9 -0
  83. package/types/cosmos/benchmark/v1/tx.registry.ts +35 -0
  84. package/types/cosmos/benchmark/v1/tx.rpc.msg.ts +21 -0
  85. package/types/cosmos/benchmark/v1/tx.ts +224 -0
  86. package/types/cosmos/bundle.ts +807 -0
  87. package/types/cosmos/circuit/module/v1/module.ts +100 -0
  88. package/types/cosmos/circuit/v1/query.lcd.ts +40 -0
  89. package/types/cosmos/circuit/v1/query.rpc.Query.ts +55 -0
  90. package/types/cosmos/circuit/v1/query.ts +576 -0
  91. package/types/cosmos/circuit/v1/tx.amino.ts +19 -0
  92. package/types/cosmos/circuit/v1/tx.registry.ts +71 -0
  93. package/types/cosmos/circuit/v1/tx.rpc.msg.ts +43 -0
  94. package/types/cosmos/circuit/v1/tx.ts +685 -0
  95. package/types/cosmos/circuit/v1/types.ts +419 -0
  96. package/types/cosmos/client.ts +100 -0
  97. package/types/cosmos/consensus/module/v1/module.ts +100 -0
  98. package/types/cosmos/consensus/v1/query.lcd.ts +19 -0
  99. package/types/cosmos/consensus/v1/query.rpc.Query.ts +31 -0
  100. package/types/cosmos/consensus/v1/query.ts +182 -0
  101. package/types/cosmos/consensus/v1/tx.amino.ts +9 -0
  102. package/types/cosmos/consensus/v1/tx.registry.ts +35 -0
  103. package/types/cosmos/consensus/v1/tx.rpc.msg.ts +24 -0
  104. package/types/cosmos/consensus/v1/tx.ts +257 -0
  105. package/types/cosmos/counter/module/v1/module.ts +100 -0
  106. package/types/cosmos/counter/v1/query.rpc.Query.ts +31 -0
  107. package/types/cosmos/counter/v1/query.ts +171 -0
  108. package/types/cosmos/counter/v1/tx.amino.ts +9 -0
  109. package/types/cosmos/counter/v1/tx.registry.ts +35 -0
  110. package/types/cosmos/counter/v1/tx.rpc.msg.ts +21 -0
  111. package/types/cosmos/counter/v1/tx.ts +217 -0
  112. package/types/cosmos/crisis/module/v1/module.ts +119 -0
  113. package/types/cosmos/crisis/v1beta1/genesis.ts +105 -0
  114. package/types/cosmos/crisis/v1beta1/tx.amino.ts +14 -0
  115. package/types/cosmos/crisis/v1beta1/tx.registry.ts +53 -0
  116. package/types/cosmos/crisis/v1beta1/tx.rpc.msg.ts +32 -0
  117. package/types/cosmos/crisis/v1beta1/tx.ts +413 -0
  118. package/types/cosmos/crypto/bls12_381/keys.ts +207 -0
  119. package/types/cosmos/crypto/ed25519/keys.ts +214 -0
  120. package/types/cosmos/crypto/hd/v1/hd.ts +180 -0
  121. package/types/cosmos/crypto/keyring/v1/record.ts +542 -0
  122. package/types/cosmos/crypto/multisig/keys.ts +124 -0
  123. package/types/cosmos/crypto/multisig/v1beta1/multisig.ts +231 -0
  124. package/types/cosmos/crypto/secp256k1/keys.ts +207 -0
  125. package/types/cosmos/crypto/secp256r1/keys.ts +203 -0
  126. package/types/cosmos/distribution/module/v1/module.ts +115 -0
  127. package/types/cosmos/distribution/v1beta1/distribution.ts +1551 -0
  128. package/types/cosmos/distribution/v1beta1/genesis.ts +1208 -0
  129. package/types/cosmos/distribution/v1beta1/query.lcd.ts +89 -0
  130. package/types/cosmos/distribution/v1beta1/query.rpc.Query.ts +137 -0
  131. package/types/cosmos/distribution/v1beta1/query.ts +2195 -0
  132. package/types/cosmos/distribution/v1beta1/tx.amino.ts +39 -0
  133. package/types/cosmos/distribution/v1beta1/tx.registry.ts +143 -0
  134. package/types/cosmos/distribution/v1beta1/tx.rpc.msg.ts +96 -0
  135. package/types/cosmos/distribution/v1beta1/tx.ts +1460 -0
  136. package/types/cosmos/epochs/module/v1/module.ts +77 -0
  137. package/types/cosmos/epochs/v1beta1/events.ts +205 -0
  138. package/types/cosmos/epochs/v1beta1/genesis.ts +384 -0
  139. package/types/cosmos/epochs/v1beta1/query.lcd.ts +31 -0
  140. package/types/cosmos/epochs/v1beta1/query.rpc.Query.ts +42 -0
  141. package/types/cosmos/epochs/v1beta1/query.ts +390 -0
  142. package/types/cosmos/evidence/module/v1/module.ts +77 -0
  143. package/types/cosmos/evidence/v1beta1/evidence.ts +166 -0
  144. package/types/cosmos/evidence/v1beta1/genesis.ts +103 -0
  145. package/types/cosmos/evidence/v1beta1/query.lcd.ts +40 -0
  146. package/types/cosmos/evidence/v1beta1/query.rpc.Query.ts +44 -0
  147. package/types/cosmos/evidence/v1beta1/query.ts +458 -0
  148. package/types/cosmos/evidence/v1beta1/tx.amino.ts +9 -0
  149. package/types/cosmos/evidence/v1beta1/tx.registry.ts +35 -0
  150. package/types/cosmos/evidence/v1beta1/tx.rpc.msg.ts +24 -0
  151. package/types/cosmos/evidence/v1beta1/tx.ts +243 -0
  152. package/types/cosmos/feegrant/module/v1/module.ts +77 -0
  153. package/types/cosmos/feegrant/v1beta1/feegrant.ts +701 -0
  154. package/types/cosmos/feegrant/v1beta1/genesis.ts +99 -0
  155. package/types/cosmos/feegrant/v1beta1/query.lcd.ts +44 -0
  156. package/types/cosmos/feegrant/v1beta1/query.rpc.Query.ts +53 -0
  157. package/types/cosmos/feegrant/v1beta1/query.ts +683 -0
  158. package/types/cosmos/feegrant/v1beta1/tx.amino.ts +19 -0
  159. package/types/cosmos/feegrant/v1beta1/tx.registry.ts +71 -0
  160. package/types/cosmos/feegrant/v1beta1/tx.rpc.msg.ts +43 -0
  161. package/types/cosmos/feegrant/v1beta1/tx.ts +683 -0
  162. package/types/cosmos/genutil/module/v1/module.ts +77 -0
  163. package/types/cosmos/genutil/v1beta1/genesis.ts +103 -0
  164. package/types/cosmos/gov/module/v1/module.ts +123 -0
  165. package/types/cosmos/gov/v1/genesis.ts +288 -0
  166. package/types/cosmos/gov/v1/gov.ts +1889 -0
  167. package/types/cosmos/gov/v1/query.lcd.ts +95 -0
  168. package/types/cosmos/gov/v1/query.rpc.Query.ts +119 -0
  169. package/types/cosmos/gov/v1/query.ts +2026 -0
  170. package/types/cosmos/gov/v1/tx.amino.ts +39 -0
  171. package/types/cosmos/gov/v1/tx.registry.ts +143 -0
  172. package/types/cosmos/gov/v1/tx.rpc.msg.ts +75 -0
  173. package/types/cosmos/gov/v1/tx.ts +1911 -0
  174. package/types/cosmos/gov/v1beta1/genesis.ts +221 -0
  175. package/types/cosmos/gov/v1beta1/gov.ts +1725 -0
  176. package/types/cosmos/gov/v1beta1/query.lcd.ts +89 -0
  177. package/types/cosmos/gov/v1beta1/query.rpc.Query.ts +108 -0
  178. package/types/cosmos/gov/v1beta1/query.ts +1813 -0
  179. package/types/cosmos/gov/v1beta1/tx.amino.ts +24 -0
  180. package/types/cosmos/gov/v1beta1/tx.registry.ts +89 -0
  181. package/types/cosmos/gov/v1beta1/tx.rpc.msg.ts +45 -0
  182. package/types/cosmos/gov/v1beta1/tx.ts +1128 -0
  183. package/types/cosmos/group/module/v1/module.ts +128 -0
  184. package/types/cosmos/group/v1/events.ts +1195 -0
  185. package/types/cosmos/group/v1/genesis.ts +256 -0
  186. package/types/cosmos/group/v1/query.lcd.ts +158 -0
  187. package/types/cosmos/group/v1/query.rpc.Query.ts +182 -0
  188. package/types/cosmos/group/v1/query.ts +3108 -0
  189. package/types/cosmos/group/v1/tx.amino.ts +74 -0
  190. package/types/cosmos/group/v1/tx.registry.ts +269 -0
  191. package/types/cosmos/group/v1/tx.rpc.msg.ts +125 -0
  192. package/types/cosmos/group/v1/tx.ts +3353 -0
  193. package/types/cosmos/group/v1/types.ts +2248 -0
  194. package/types/cosmos/ics23/v1/proofs.ts +2167 -0
  195. package/types/cosmos/lcd.ts +125 -0
  196. package/types/cosmos/mint/module/v1/module.ts +115 -0
  197. package/types/cosmos/mint/v1beta1/genesis.ts +120 -0
  198. package/types/cosmos/mint/v1beta1/mint.ts +313 -0
  199. package/types/cosmos/mint/v1beta1/query.lcd.ts +31 -0
  200. package/types/cosmos/mint/v1beta1/query.rpc.Query.ts +53 -0
  201. package/types/cosmos/mint/v1beta1/query.ts +544 -0
  202. package/types/cosmos/mint/v1beta1/tx.amino.ts +9 -0
  203. package/types/cosmos/mint/v1beta1/tx.registry.ts +35 -0
  204. package/types/cosmos/mint/v1beta1/tx.rpc.msg.ts +24 -0
  205. package/types/cosmos/mint/v1beta1/tx.ts +208 -0
  206. package/types/cosmos/msg/textual/v1/textual.ts +1 -0
  207. package/types/cosmos/msg/v1/msg.ts +1 -0
  208. package/types/cosmos/nft/module/v1/module.ts +77 -0
  209. package/types/cosmos/nft/v1beta1/event.ts +429 -0
  210. package/types/cosmos/nft/v1beta1/genesis.ts +243 -0
  211. package/types/cosmos/nft/v1beta1/nft.ts +389 -0
  212. package/types/cosmos/nft/v1beta1/query.lcd.ts +77 -0
  213. package/types/cosmos/nft/v1beta1/query.rpc.Query.ts +102 -0
  214. package/types/cosmos/nft/v1beta1/query.ts +1513 -0
  215. package/types/cosmos/nft/v1beta1/tx.amino.ts +9 -0
  216. package/types/cosmos/nft/v1beta1/tx.registry.ts +35 -0
  217. package/types/cosmos/nft/v1beta1/tx.rpc.msg.ts +21 -0
  218. package/types/cosmos/nft/v1beta1/tx.ts +232 -0
  219. package/types/cosmos/params/module/v1/module.ts +77 -0
  220. package/types/cosmos/params/v1beta1/params.ts +262 -0
  221. package/types/cosmos/params/v1beta1/query.lcd.ts +35 -0
  222. package/types/cosmos/params/v1beta1/query.rpc.Query.ts +45 -0
  223. package/types/cosmos/params/v1beta1/query.ts +521 -0
  224. package/types/cosmos/protocolpool/module/v1/module.ts +100 -0
  225. package/types/cosmos/protocolpool/v1/genesis.ts +126 -0
  226. package/types/cosmos/protocolpool/v1/query.lcd.ts +37 -0
  227. package/types/cosmos/protocolpool/v1/query.rpc.Query.ts +64 -0
  228. package/types/cosmos/protocolpool/v1/query.ts +761 -0
  229. package/types/cosmos/protocolpool/v1/tx.amino.ts +29 -0
  230. package/types/cosmos/protocolpool/v1/tx.registry.ts +107 -0
  231. package/types/cosmos/protocolpool/v1/tx.rpc.msg.ts +69 -0
  232. package/types/cosmos/protocolpool/v1/tx.ts +1124 -0
  233. package/types/cosmos/protocolpool/v1/types.ts +268 -0
  234. package/types/cosmos/query/v1/query.ts +1 -0
  235. package/types/cosmos/reflection/v1/reflection.ts +178 -0
  236. package/types/cosmos/rpc.query.ts +90 -0
  237. package/types/cosmos/rpc.tx.ts +71 -0
  238. package/types/cosmos/slashing/module/v1/module.ts +100 -0
  239. package/types/cosmos/slashing/v1beta1/genesis.ts +511 -0
  240. package/types/cosmos/slashing/v1beta1/query.lcd.ts +40 -0
  241. package/types/cosmos/slashing/v1beta1/query.rpc.Query.ts +55 -0
  242. package/types/cosmos/slashing/v1beta1/query.ts +606 -0
  243. package/types/cosmos/slashing/v1beta1/slashing.ts +371 -0
  244. package/types/cosmos/slashing/v1beta1/tx.amino.ts +14 -0
  245. package/types/cosmos/slashing/v1beta1/tx.registry.ts +53 -0
  246. package/types/cosmos/slashing/v1beta1/tx.rpc.msg.ts +36 -0
  247. package/types/cosmos/slashing/v1beta1/tx.ts +377 -0
  248. package/types/cosmos/staking/module/v1/module.ts +165 -0
  249. package/types/cosmos/staking/v1beta1/authz.ts +321 -0
  250. package/types/cosmos/staking/v1beta1/genesis.ts +370 -0
  251. package/types/cosmos/staking/v1beta1/query.lcd.ts +174 -0
  252. package/types/cosmos/staking/v1beta1/query.rpc.Query.ts +217 -0
  253. package/types/cosmos/staking/v1beta1/query.ts +3187 -0
  254. package/types/cosmos/staking/v1beta1/staking.ts +3193 -0
  255. package/types/cosmos/staking/v1beta1/tx.amino.ts +39 -0
  256. package/types/cosmos/staking/v1beta1/tx.registry.ts +143 -0
  257. package/types/cosmos/staking/v1beta1/tx.rpc.msg.ts +84 -0
  258. package/types/cosmos/staking/v1beta1/tx.ts +1642 -0
  259. package/types/cosmos/store/internal/kv/v1beta1/kv.ts +208 -0
  260. package/types/cosmos/store/snapshots/v1/snapshot.ts +840 -0
  261. package/types/cosmos/store/streaming/abci/grpc.ts +393 -0
  262. package/types/cosmos/store/v1beta1/commit_info.ts +369 -0
  263. package/types/cosmos/store/v1beta1/listening.ts +296 -0
  264. package/types/cosmos/tx/config/v1/config.ts +127 -0
  265. package/types/cosmos/tx/signing/v1beta1/signing.ts +713 -0
  266. package/types/cosmos/tx/v1beta1/service.lcd.ts +59 -0
  267. package/types/cosmos/tx/v1beta1/service.rpc.Service.ts +119 -0
  268. package/types/cosmos/tx/v1beta1/service.ts +2319 -0
  269. package/types/cosmos/tx/v1beta1/tx.ts +2168 -0
  270. package/types/cosmos/upgrade/module/v1/module.ts +100 -0
  271. package/types/cosmos/upgrade/v1beta1/query.lcd.ts +54 -0
  272. package/types/cosmos/upgrade/v1beta1/query.rpc.Query.ts +82 -0
  273. package/types/cosmos/upgrade/v1beta1/query.ts +1004 -0
  274. package/types/cosmos/upgrade/v1beta1/tx.amino.ts +14 -0
  275. package/types/cosmos/upgrade/v1beta1/tx.registry.ts +53 -0
  276. package/types/cosmos/upgrade/v1beta1/tx.rpc.msg.ts +32 -0
  277. package/types/cosmos/upgrade/v1beta1/tx.ts +368 -0
  278. package/types/cosmos/upgrade/v1beta1/upgrade.ts +623 -0
  279. package/types/cosmos/vesting/module/v1/module.ts +77 -0
  280. package/types/cosmos/vesting/v1beta1/tx.amino.ts +19 -0
  281. package/types/cosmos/vesting/v1beta1/tx.registry.ts +71 -0
  282. package/types/cosmos/vesting/v1beta1/tx.rpc.msg.ts +46 -0
  283. package/types/cosmos/vesting/v1beta1/tx.ts +688 -0
  284. package/types/cosmos/vesting/v1beta1/vesting.ts +751 -0
  285. package/types/cosmos_proto/bundle.ts +5 -0
  286. package/types/cosmos_proto/cosmos.ts +355 -0
  287. package/types/cosmwasm/bundle.ts +39 -0
  288. package/types/cosmwasm/client.ts +48 -0
  289. package/types/cosmwasm/lcd.ts +132 -0
  290. package/types/cosmwasm/rpc.query.ts +95 -0
  291. package/types/cosmwasm/rpc.tx.ts +76 -0
  292. package/types/cosmwasm/wasm/v1/authz.ts +1409 -0
  293. package/types/cosmwasm/wasm/v1/genesis.ts +544 -0
  294. package/types/cosmwasm/wasm/v1/ibc.ts +437 -0
  295. package/types/cosmwasm/wasm/v1/proposal_legacy.ts +2711 -0
  296. package/types/cosmwasm/wasm/v1/query.lcd.ts +154 -0
  297. package/types/cosmwasm/wasm/v1/query.rpc.Query.ts +181 -0
  298. package/types/cosmwasm/wasm/v1/query.ts +3339 -0
  299. package/types/cosmwasm/wasm/v1/tx.amino.ts +89 -0
  300. package/types/cosmwasm/wasm/v1/tx.registry.ts +323 -0
  301. package/types/cosmwasm/wasm/v1/tx.rpc.msg.ts +197 -0
  302. package/types/cosmwasm/wasm/v1/tx.ts +4403 -0
  303. package/types/cosmwasm/wasm/v1/types.ts +1193 -0
  304. package/types/gogoproto/bundle.ts +5 -0
  305. package/types/gogoproto/gogo.ts +1 -0
  306. package/types/google/api/annotations.ts +1 -0
  307. package/types/google/api/apikeys/v2/apikeys.ts +1245 -0
  308. package/types/google/api/apikeys/v2/resources.ts +1268 -0
  309. package/types/google/api/auth.ts +1175 -0
  310. package/types/google/api/backend.ts +691 -0
  311. package/types/google/api/billing.ts +333 -0
  312. package/types/google/api/client.ts +3100 -0
  313. package/types/google/api/cloudquotas/v1/cloudquotas.ts +1196 -0
  314. package/types/google/api/cloudquotas/v1/resources.ts +2065 -0
  315. package/types/google/api/cloudquotas/v1beta/cloudquotas.ts +1196 -0
  316. package/types/google/api/cloudquotas/v1beta/quota_adjuster_settings.ts +509 -0
  317. package/types/google/api/cloudquotas/v1beta/resources.ts +2069 -0
  318. package/types/google/api/config_change.ts +385 -0
  319. package/types/google/api/consumer.ts +362 -0
  320. package/types/google/api/context.ts +418 -0
  321. package/types/google/api/control.ts +141 -0
  322. package/types/google/api/distribution.ts +1253 -0
  323. package/types/google/api/documentation.ts +738 -0
  324. package/types/google/api/endpoint.ts +245 -0
  325. package/types/google/api/error_reason.ts +816 -0
  326. package/types/google/api/expr/conformance/v1alpha1/conformance_service.ts +1293 -0
  327. package/types/google/api/expr/v1alpha1/checked.ts +2259 -0
  328. package/types/google/api/expr/v1alpha1/eval.ts +675 -0
  329. package/types/google/api/expr/v1alpha1/explain.ts +257 -0
  330. package/types/google/api/expr/v1alpha1/syntax.ts +2983 -0
  331. package/types/google/api/expr/v1alpha1/value.ts +771 -0
  332. package/types/google/api/expr/v1beta1/decl.ts +563 -0
  333. package/types/google/api/expr/v1beta1/eval.ts +758 -0
  334. package/types/google/api/expr/v1beta1/expr.ts +1750 -0
  335. package/types/google/api/expr/v1beta1/source.ts +446 -0
  336. package/types/google/api/expr/v1beta1/value.ts +771 -0
  337. package/types/google/api/field_behavior.ts +136 -0
  338. package/types/google/api/field_info.ts +319 -0
  339. package/types/google/api/http.ts +1362 -0
  340. package/types/google/api/httpbody.ts +270 -0
  341. package/types/google/api/label.ts +174 -0
  342. package/types/google/api/launch_stage.ts +112 -0
  343. package/types/google/api/log.ts +201 -0
  344. package/types/google/api/logging.ts +355 -0
  345. package/types/google/api/metric.ts +1174 -0
  346. package/types/google/api/monitored_resource.ts +841 -0
  347. package/types/google/api/monitoring.ts +430 -0
  348. package/types/google/api/policy.ts +314 -0
  349. package/types/google/api/quota.ts +1040 -0
  350. package/types/google/api/resource.ts +769 -0
  351. package/types/google/api/routing.ts +1405 -0
  352. package/types/google/api/service.ts +790 -0
  353. package/types/google/api/servicecontrol/v1/check_error.ts +366 -0
  354. package/types/google/api/servicecontrol/v1/distribution.ts +773 -0
  355. package/types/google/api/servicecontrol/v1/http_request.ts +427 -0
  356. package/types/google/api/servicecontrol/v1/log_entry.ts +804 -0
  357. package/types/google/api/servicecontrol/v1/metric_value.ts +499 -0
  358. package/types/google/api/servicecontrol/v1/operation.ts +544 -0
  359. package/types/google/api/servicecontrol/v1/quota_controller.ts +1041 -0
  360. package/types/google/api/servicecontrol/v1/service_controller.ts +1164 -0
  361. package/types/google/api/servicecontrol/v2/service_controller.ts +949 -0
  362. package/types/google/api/servicemanagement/v1/resources.ts +1888 -0
  363. package/types/google/api/servicemanagement/v1/servicemanager.ts +2444 -0
  364. package/types/google/api/serviceusage/v1/resources.ts +629 -0
  365. package/types/google/api/serviceusage/v1/serviceusage.ts +1530 -0
  366. package/types/google/api/serviceusage/v1beta1/resources.ts +2972 -0
  367. package/types/google/api/serviceusage/v1beta1/serviceusage.ts +4567 -0
  368. package/types/google/api/source_info.ts +97 -0
  369. package/types/google/api/system_parameter.ts +461 -0
  370. package/types/google/api/usage.ts +404 -0
  371. package/types/google/api/visibility.ts +328 -0
  372. package/types/google/bundle.ts +115 -0
  373. package/types/google/logging/type/log_severity.ts +104 -0
  374. package/types/google/longrunning/operations.ts +1153 -0
  375. package/types/google/protobuf/any.ts +424 -0
  376. package/types/google/protobuf/api.ts +942 -0
  377. package/types/google/protobuf/descriptor.ts +7801 -0
  378. package/types/google/protobuf/duration.ts +284 -0
  379. package/types/google/protobuf/empty.ts +93 -0
  380. package/types/google/protobuf/field_mask.ts +694 -0
  381. package/types/google/protobuf/source_context.ts +105 -0
  382. package/types/google/protobuf/struct.ts +584 -0
  383. package/types/google/protobuf/timestamp.ts +373 -0
  384. package/types/google/protobuf/type.ts +1279 -0
  385. package/types/google/protobuf/wrappers.ts +1002 -0
  386. package/types/google/rpc/code.ts +286 -0
  387. package/types/google/rpc/context/attribute_context.ts +2517 -0
  388. package/types/google/rpc/context/audit_context.ts +188 -0
  389. package/types/google/rpc/error_details.ts +2467 -0
  390. package/types/google/rpc/http.ts +424 -0
  391. package/types/google/rpc/status.ts +173 -0
  392. package/types/helpers.ts +259 -0
  393. package/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +107 -0
  394. package/types/ibc/applications/interchain_accounts/controller/v1/query.lcd.ts +25 -0
  395. package/types/ibc/applications/interchain_accounts/controller/v1/query.rpc.Query.ts +42 -0
  396. package/types/ibc/applications/interchain_accounts/controller/v1/query.ts +379 -0
  397. package/types/ibc/applications/interchain_accounts/controller/v1/tx.amino.ts +19 -0
  398. package/types/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts +71 -0
  399. package/types/ibc/applications/interchain_accounts/controller/v1/tx.rpc.msg.ts +37 -0
  400. package/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +692 -0
  401. package/types/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +675 -0
  402. package/types/ibc/applications/interchain_accounts/host/v1/host.ts +261 -0
  403. package/types/ibc/applications/interchain_accounts/host/v1/query.lcd.ts +19 -0
  404. package/types/ibc/applications/interchain_accounts/host/v1/query.rpc.Query.ts +31 -0
  405. package/types/ibc/applications/interchain_accounts/host/v1/query.ts +176 -0
  406. package/types/ibc/applications/interchain_accounts/host/v1/tx.amino.ts +14 -0
  407. package/types/ibc/applications/interchain_accounts/host/v1/tx.registry.ts +53 -0
  408. package/types/ibc/applications/interchain_accounts/host/v1/tx.rpc.msg.ts +29 -0
  409. package/types/ibc/applications/interchain_accounts/host/v1/tx.ts +440 -0
  410. package/types/ibc/applications/interchain_accounts/v1/account.ts +115 -0
  411. package/types/ibc/applications/interchain_accounts/v1/metadata.ts +206 -0
  412. package/types/ibc/applications/interchain_accounts/v1/packet.ts +262 -0
  413. package/types/ibc/applications/transfer/v1/authz.ts +297 -0
  414. package/types/ibc/applications/transfer/v1/denomtrace.ts +133 -0
  415. package/types/ibc/applications/transfer/v1/genesis.ts +156 -0
  416. package/types/ibc/applications/transfer/v1/packet.ts +186 -0
  417. package/types/ibc/applications/transfer/v1/query.lcd.ts +76 -0
  418. package/types/ibc/applications/transfer/v1/query.rpc.Query.ts +88 -0
  419. package/types/ibc/applications/transfer/v1/query.ts +1233 -0
  420. package/types/ibc/applications/transfer/v1/token.ts +347 -0
  421. package/types/ibc/applications/transfer/v1/transfer.ts +140 -0
  422. package/types/ibc/applications/transfer/v1/tx.amino.ts +14 -0
  423. package/types/ibc/applications/transfer/v1/tx.registry.ts +53 -0
  424. package/types/ibc/applications/transfer/v1/tx.rpc.msg.ts +29 -0
  425. package/types/ibc/applications/transfer/v1/tx.ts +579 -0
  426. package/types/ibc/bundle.ts +265 -0
  427. package/types/ibc/client.ts +72 -0
  428. package/types/ibc/core/channel/v1/channel.ts +1455 -0
  429. package/types/ibc/core/channel/v1/genesis.ts +351 -0
  430. package/types/ibc/core/channel/v1/query.lcd.ts +135 -0
  431. package/types/ibc/core/channel/v1/query.rpc.Query.ts +200 -0
  432. package/types/ibc/core/channel/v1/query.ts +3943 -0
  433. package/types/ibc/core/channel/v1/tx.amino.ts +54 -0
  434. package/types/ibc/core/channel/v1/tx.registry.ts +197 -0
  435. package/types/ibc/core/channel/v1/tx.rpc.msg.ts +96 -0
  436. package/types/ibc/core/channel/v1/tx.ts +2558 -0
  437. package/types/ibc/core/channel/v2/genesis.ts +433 -0
  438. package/types/ibc/core/channel/v2/packet.ts +640 -0
  439. package/types/ibc/core/channel/v2/query.lcd.ts +77 -0
  440. package/types/ibc/core/channel/v2/query.rpc.Query.ts +108 -0
  441. package/types/ibc/core/channel/v2/query.ts +2075 -0
  442. package/types/ibc/core/channel/v2/tx.amino.ts +24 -0
  443. package/types/ibc/core/channel/v2/tx.registry.ts +89 -0
  444. package/types/ibc/core/channel/v2/tx.rpc.msg.ts +45 -0
  445. package/types/ibc/core/channel/v2/tx.ts +1003 -0
  446. package/types/ibc/core/client/v1/client.ts +636 -0
  447. package/types/ibc/core/client/v1/genesis.ts +448 -0
  448. package/types/ibc/core/client/v1/query.lcd.ts +102 -0
  449. package/types/ibc/core/client/v1/query.rpc.Query.ts +149 -0
  450. package/types/ibc/core/client/v1/query.ts +2588 -0
  451. package/types/ibc/core/client/v1/tx.amino.ts +44 -0
  452. package/types/ibc/core/client/v1/tx.registry.ts +161 -0
  453. package/types/ibc/core/client/v1/tx.rpc.msg.ts +77 -0
  454. package/types/ibc/core/client/v1/tx.ts +1796 -0
  455. package/types/ibc/core/client/v2/config.ts +115 -0
  456. package/types/ibc/core/client/v2/counterparty.ts +122 -0
  457. package/types/ibc/core/client/v2/genesis.ts +220 -0
  458. package/types/ibc/core/client/v2/query.lcd.ts +25 -0
  459. package/types/ibc/core/client/v2/query.rpc.Query.ts +42 -0
  460. package/types/ibc/core/client/v2/query.ts +402 -0
  461. package/types/ibc/core/client/v2/tx.amino.ts +14 -0
  462. package/types/ibc/core/client/v2/tx.registry.ts +53 -0
  463. package/types/ibc/core/client/v2/tx.rpc.msg.ts +29 -0
  464. package/types/ibc/core/client/v2/tx.ts +453 -0
  465. package/types/ibc/core/commitment/v1/commitment.ts +321 -0
  466. package/types/ibc/core/commitment/v2/commitment.ts +193 -0
  467. package/types/ibc/core/connection/v1/connection.ts +1056 -0
  468. package/types/ibc/core/connection/v1/genesis.ts +150 -0
  469. package/types/ibc/core/connection/v1/query.lcd.ts +61 -0
  470. package/types/ibc/core/connection/v1/query.rpc.Query.ts +97 -0
  471. package/types/ibc/core/connection/v1/query.ts +1472 -0
  472. package/types/ibc/core/connection/v1/tx.amino.ts +29 -0
  473. package/types/ibc/core/connection/v1/tx.registry.ts +107 -0
  474. package/types/ibc/core/connection/v1/tx.rpc.msg.ts +59 -0
  475. package/types/ibc/core/connection/v1/tx.ts +1456 -0
  476. package/types/ibc/core/types/v1/genesis.ts +191 -0
  477. package/types/ibc/lcd.ts +176 -0
  478. package/types/ibc/lightclients/solomachine/v2/solomachine.ts +2161 -0
  479. package/types/ibc/lightclients/solomachine/v3/solomachine.ts +1114 -0
  480. package/types/ibc/lightclients/tendermint/v1/tendermint.ts +891 -0
  481. package/types/ibc/lightclients/wasm/v1/genesis.ts +201 -0
  482. package/types/ibc/lightclients/wasm/v1/query.lcd.ts +34 -0
  483. package/types/ibc/lightclients/wasm/v1/query.rpc.Query.ts +44 -0
  484. package/types/ibc/lightclients/wasm/v1/query.ts +413 -0
  485. package/types/ibc/lightclients/wasm/v1/tx.amino.ts +19 -0
  486. package/types/ibc/lightclients/wasm/v1/tx.registry.ts +71 -0
  487. package/types/ibc/lightclients/wasm/v1/tx.rpc.msg.ts +37 -0
  488. package/types/ibc/lightclients/wasm/v1/tx.ts +640 -0
  489. package/types/ibc/lightclients/wasm/v1/wasm.ts +444 -0
  490. package/types/ibc/rpc.query.ts +123 -0
  491. package/types/ibc/rpc.tx.ts +104 -0
  492. package/types/index.ts +25 -0
  493. package/types/tendermint/abci/types.ts +6565 -0
  494. package/types/tendermint/bundle.ts +33 -0
  495. package/types/tendermint/crypto/keys.ts +106 -0
  496. package/types/tendermint/crypto/proof.ts +576 -0
  497. package/types/tendermint/p2p/types.ts +523 -0
  498. package/types/tendermint/types/block.ts +134 -0
  499. package/types/tendermint/types/evidence.ts +491 -0
  500. package/types/tendermint/types/params.ts +839 -0
  501. package/types/tendermint/types/types.ts +2266 -0
  502. package/types/tendermint/types/validator.ts +399 -0
  503. package/types/tendermint/version/types.ts +228 -0
  504. package/types/utf8.ts +149 -0
  505. package/types/varint.ts +489 -0
  506. package/types/xion/bundle.ts +117 -0
  507. package/types/xion/client.ts +57 -0
  508. package/types/xion/feeabs/v1beta1/epoch.ts +386 -0
  509. package/types/xion/feeabs/v1beta1/genesis.ts +136 -0
  510. package/types/xion/feeabs/v1beta1/osmosisibc.ts +868 -0
  511. package/types/xion/feeabs/v1beta1/params.ts +189 -0
  512. package/types/xion/feeabs/v1beta1/proposal.ts +593 -0
  513. package/types/xion/feeabs/v1beta1/query.lcd.ts +37 -0
  514. package/types/xion/feeabs/v1beta1/query.rpc.Query.ts +64 -0
  515. package/types/xion/feeabs/v1beta1/query.ts +732 -0
  516. package/types/xion/feeabs/v1beta1/tx.amino.ts +39 -0
  517. package/types/xion/feeabs/v1beta1/tx.registry.ts +143 -0
  518. package/types/xion/feeabs/v1beta1/tx.rpc.msg.ts +72 -0
  519. package/types/xion/feeabs/v1beta1/tx.ts +1261 -0
  520. package/types/xion/globalfee/v1/genesis.ts +249 -0
  521. package/types/xion/globalfee/v1/query.lcd.ts +19 -0
  522. package/types/xion/globalfee/v1/query.rpc.Query.ts +31 -0
  523. package/types/xion/globalfee/v1/query.ts +178 -0
  524. package/types/xion/jwk/v1/audience.ts +224 -0
  525. package/types/xion/jwk/v1/genesis.ts +117 -0
  526. package/types/xion/jwk/v1/params.ts +113 -0
  527. package/types/xion/jwk/v1/query.lcd.ts +52 -0
  528. package/types/xion/jwk/v1/query.rpc.Query.ts +77 -0
  529. package/types/xion/jwk/v1/query.ts +1697 -0
  530. package/types/xion/jwk/v1/tx.amino.ts +29 -0
  531. package/types/xion/jwk/v1/tx.registry.ts +107 -0
  532. package/types/xion/jwk/v1/tx.rpc.msg.ts +53 -0
  533. package/types/xion/jwk/v1/tx.ts +1040 -0
  534. package/types/xion/lcd.ts +147 -0
  535. package/types/xion/mint/v1/event.ts +216 -0
  536. package/types/xion/mint/v1/genesis.ts +114 -0
  537. package/types/xion/mint/v1/mint.ts +307 -0
  538. package/types/xion/mint/v1/query.lcd.ts +31 -0
  539. package/types/xion/mint/v1/query.rpc.Query.ts +53 -0
  540. package/types/xion/mint/v1/query.ts +508 -0
  541. package/types/xion/mint/v1/tx.amino.ts +9 -0
  542. package/types/xion/mint/v1/tx.registry.ts +35 -0
  543. package/types/xion/mint/v1/tx.rpc.msg.ts +26 -0
  544. package/types/xion/mint/v1/tx.ts +222 -0
  545. package/types/xion/rpc.query.ts +105 -0
  546. package/types/xion/rpc.tx.ts +83 -0
  547. package/types/xion/v1/feegrant.ts +457 -0
  548. package/types/xion/v1/genesis.ts +116 -0
  549. package/types/xion/v1/query.rpc.Query.ts +64 -0
  550. package/types/xion/v1/query.ts +862 -0
  551. package/types/xion/v1/tx.amino.ts +24 -0
  552. package/types/xion/v1/tx.registry.ts +89 -0
  553. package/types/xion/v1/tx.rpc.msg.ts +57 -0
  554. package/types/xion/v1/tx.ts +793 -0
@@ -0,0 +1,2248 @@
1
+ //@ts-nocheck
2
+ import { Timestamp } from "../../../google/protobuf/timestamp";
3
+ import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration";
4
+ import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
5
+ import { BinaryReader, BinaryWriter } from "../../../binary";
6
+ import { toTimestamp, fromTimestamp } from "../../../helpers";
7
+ /** VoteOption enumerates the valid vote options for a given proposal. */
8
+ export enum VoteOption {
9
+ /**
10
+ * VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will
11
+ * return an error.
12
+ */
13
+ VOTE_OPTION_UNSPECIFIED = 0,
14
+ /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
15
+ VOTE_OPTION_YES = 1,
16
+ /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
17
+ VOTE_OPTION_ABSTAIN = 2,
18
+ /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
19
+ VOTE_OPTION_NO = 3,
20
+ /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
21
+ VOTE_OPTION_NO_WITH_VETO = 4,
22
+ UNRECOGNIZED = -1,
23
+ }
24
+ export const VoteOptionSDKType = VoteOption;
25
+ export const VoteOptionAmino = VoteOption;
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
+ export function voteOptionToJSON(object: VoteOption): string {
50
+ switch (object) {
51
+ case VoteOption.VOTE_OPTION_UNSPECIFIED:
52
+ return "VOTE_OPTION_UNSPECIFIED";
53
+ case VoteOption.VOTE_OPTION_YES:
54
+ return "VOTE_OPTION_YES";
55
+ case VoteOption.VOTE_OPTION_ABSTAIN:
56
+ return "VOTE_OPTION_ABSTAIN";
57
+ case VoteOption.VOTE_OPTION_NO:
58
+ return "VOTE_OPTION_NO";
59
+ case VoteOption.VOTE_OPTION_NO_WITH_VETO:
60
+ return "VOTE_OPTION_NO_WITH_VETO";
61
+ case VoteOption.UNRECOGNIZED:
62
+ default:
63
+ return "UNRECOGNIZED";
64
+ }
65
+ }
66
+ /** ProposalStatus defines proposal statuses. */
67
+ export enum ProposalStatus {
68
+ /** PROPOSAL_STATUS_UNSPECIFIED - An empty value is invalid and not allowed. */
69
+ PROPOSAL_STATUS_UNSPECIFIED = 0,
70
+ /** PROPOSAL_STATUS_SUBMITTED - Initial status of a proposal when submitted. */
71
+ PROPOSAL_STATUS_SUBMITTED = 1,
72
+ /**
73
+ * PROPOSAL_STATUS_ACCEPTED - Final status of a proposal when the final tally is done and the outcome
74
+ * passes the group policy's decision policy.
75
+ */
76
+ PROPOSAL_STATUS_ACCEPTED = 2,
77
+ /**
78
+ * PROPOSAL_STATUS_REJECTED - Final status of a proposal when the final tally is done and the outcome
79
+ * is rejected by the group policy's decision policy.
80
+ */
81
+ PROPOSAL_STATUS_REJECTED = 3,
82
+ /**
83
+ * PROPOSAL_STATUS_ABORTED - Final status of a proposal when the group policy is modified before the
84
+ * final tally.
85
+ */
86
+ PROPOSAL_STATUS_ABORTED = 4,
87
+ /**
88
+ * PROPOSAL_STATUS_WITHDRAWN - A proposal can be withdrawn before the voting start time by the owner.
89
+ * When this happens the final status is Withdrawn.
90
+ */
91
+ PROPOSAL_STATUS_WITHDRAWN = 5,
92
+ UNRECOGNIZED = -1,
93
+ }
94
+ export const ProposalStatusSDKType = ProposalStatus;
95
+ export const ProposalStatusAmino = ProposalStatus;
96
+ export function proposalStatusFromJSON(object: any): ProposalStatus {
97
+ switch (object) {
98
+ case 0:
99
+ case "PROPOSAL_STATUS_UNSPECIFIED":
100
+ return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;
101
+ case 1:
102
+ case "PROPOSAL_STATUS_SUBMITTED":
103
+ return ProposalStatus.PROPOSAL_STATUS_SUBMITTED;
104
+ case 2:
105
+ case "PROPOSAL_STATUS_ACCEPTED":
106
+ return ProposalStatus.PROPOSAL_STATUS_ACCEPTED;
107
+ case 3:
108
+ case "PROPOSAL_STATUS_REJECTED":
109
+ return ProposalStatus.PROPOSAL_STATUS_REJECTED;
110
+ case 4:
111
+ case "PROPOSAL_STATUS_ABORTED":
112
+ return ProposalStatus.PROPOSAL_STATUS_ABORTED;
113
+ case 5:
114
+ case "PROPOSAL_STATUS_WITHDRAWN":
115
+ return ProposalStatus.PROPOSAL_STATUS_WITHDRAWN;
116
+ case -1:
117
+ case "UNRECOGNIZED":
118
+ default:
119
+ return ProposalStatus.UNRECOGNIZED;
120
+ }
121
+ }
122
+ export function proposalStatusToJSON(object: ProposalStatus): string {
123
+ switch (object) {
124
+ case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
125
+ return "PROPOSAL_STATUS_UNSPECIFIED";
126
+ case ProposalStatus.PROPOSAL_STATUS_SUBMITTED:
127
+ return "PROPOSAL_STATUS_SUBMITTED";
128
+ case ProposalStatus.PROPOSAL_STATUS_ACCEPTED:
129
+ return "PROPOSAL_STATUS_ACCEPTED";
130
+ case ProposalStatus.PROPOSAL_STATUS_REJECTED:
131
+ return "PROPOSAL_STATUS_REJECTED";
132
+ case ProposalStatus.PROPOSAL_STATUS_ABORTED:
133
+ return "PROPOSAL_STATUS_ABORTED";
134
+ case ProposalStatus.PROPOSAL_STATUS_WITHDRAWN:
135
+ return "PROPOSAL_STATUS_WITHDRAWN";
136
+ case ProposalStatus.UNRECOGNIZED:
137
+ default:
138
+ return "UNRECOGNIZED";
139
+ }
140
+ }
141
+ /** ProposalExecutorResult defines types of proposal executor results. */
142
+ export enum ProposalExecutorResult {
143
+ /** PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - An empty value is not allowed. */
144
+ PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0,
145
+ /** PROPOSAL_EXECUTOR_RESULT_NOT_RUN - We have not yet run the executor. */
146
+ PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1,
147
+ /** PROPOSAL_EXECUTOR_RESULT_SUCCESS - The executor was successful and proposed action updated state. */
148
+ PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2,
149
+ /** PROPOSAL_EXECUTOR_RESULT_FAILURE - The executor returned an error and proposed action didn't update state. */
150
+ PROPOSAL_EXECUTOR_RESULT_FAILURE = 3,
151
+ UNRECOGNIZED = -1,
152
+ }
153
+ export const ProposalExecutorResultSDKType = ProposalExecutorResult;
154
+ export const ProposalExecutorResultAmino = ProposalExecutorResult;
155
+ export function proposalExecutorResultFromJSON(object: any): ProposalExecutorResult {
156
+ switch (object) {
157
+ case 0:
158
+ case "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED":
159
+ return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED;
160
+ case 1:
161
+ case "PROPOSAL_EXECUTOR_RESULT_NOT_RUN":
162
+ return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN;
163
+ case 2:
164
+ case "PROPOSAL_EXECUTOR_RESULT_SUCCESS":
165
+ return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS;
166
+ case 3:
167
+ case "PROPOSAL_EXECUTOR_RESULT_FAILURE":
168
+ return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE;
169
+ case -1:
170
+ case "UNRECOGNIZED":
171
+ default:
172
+ return ProposalExecutorResult.UNRECOGNIZED;
173
+ }
174
+ }
175
+ export function proposalExecutorResultToJSON(object: ProposalExecutorResult): string {
176
+ switch (object) {
177
+ case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED:
178
+ return "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED";
179
+ case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN:
180
+ return "PROPOSAL_EXECUTOR_RESULT_NOT_RUN";
181
+ case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS:
182
+ return "PROPOSAL_EXECUTOR_RESULT_SUCCESS";
183
+ case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE:
184
+ return "PROPOSAL_EXECUTOR_RESULT_FAILURE";
185
+ case ProposalExecutorResult.UNRECOGNIZED:
186
+ default:
187
+ return "UNRECOGNIZED";
188
+ }
189
+ }
190
+ /**
191
+ * Member represents a group member with an account address,
192
+ * non-zero weight, metadata and added_at timestamp.
193
+ */
194
+ export interface Member {
195
+ /** address is the member's account address. */
196
+ address: string;
197
+ /** weight is the member's voting weight that should be greater than 0. */
198
+ weight: string;
199
+ /** metadata is any arbitrary metadata attached to the member. */
200
+ metadata: string;
201
+ /** added_at is a timestamp specifying when a member was added. */
202
+ addedAt: Date;
203
+ }
204
+ export interface MemberProtoMsg {
205
+ typeUrl: "/cosmos.group.v1.Member";
206
+ value: Uint8Array;
207
+ }
208
+ /**
209
+ * Member represents a group member with an account address,
210
+ * non-zero weight, metadata and added_at timestamp.
211
+ * @name MemberAmino
212
+ * @package cosmos.group.v1
213
+ * @see proto type: cosmos.group.v1.Member
214
+ */
215
+ export interface MemberAmino {
216
+ /**
217
+ * address is the member's account address.
218
+ */
219
+ address?: string;
220
+ /**
221
+ * weight is the member's voting weight that should be greater than 0.
222
+ */
223
+ weight?: string;
224
+ /**
225
+ * metadata is any arbitrary metadata attached to the member.
226
+ */
227
+ metadata?: string;
228
+ /**
229
+ * added_at is a timestamp specifying when a member was added.
230
+ */
231
+ added_at: string;
232
+ }
233
+ export interface MemberAminoMsg {
234
+ type: "cosmos-sdk/Member";
235
+ value: MemberAmino;
236
+ }
237
+ /**
238
+ * Member represents a group member with an account address,
239
+ * non-zero weight, metadata and added_at timestamp.
240
+ */
241
+ export interface MemberSDKType {
242
+ address: string;
243
+ weight: string;
244
+ metadata: string;
245
+ added_at: Date;
246
+ }
247
+ /**
248
+ * MemberRequest represents a group member to be used in Msg server requests.
249
+ * Contrary to `Member`, it doesn't have any `added_at` field
250
+ * since this field cannot be set as part of requests.
251
+ */
252
+ export interface MemberRequest {
253
+ /** address is the member's account address. */
254
+ address: string;
255
+ /** weight is the member's voting weight that should be greater than 0. */
256
+ weight: string;
257
+ /** metadata is any arbitrary metadata attached to the member. */
258
+ metadata: string;
259
+ }
260
+ export interface MemberRequestProtoMsg {
261
+ typeUrl: "/cosmos.group.v1.MemberRequest";
262
+ value: Uint8Array;
263
+ }
264
+ /**
265
+ * MemberRequest represents a group member to be used in Msg server requests.
266
+ * Contrary to `Member`, it doesn't have any `added_at` field
267
+ * since this field cannot be set as part of requests.
268
+ * @name MemberRequestAmino
269
+ * @package cosmos.group.v1
270
+ * @see proto type: cosmos.group.v1.MemberRequest
271
+ */
272
+ export interface MemberRequestAmino {
273
+ /**
274
+ * address is the member's account address.
275
+ */
276
+ address?: string;
277
+ /**
278
+ * weight is the member's voting weight that should be greater than 0.
279
+ */
280
+ weight?: string;
281
+ /**
282
+ * metadata is any arbitrary metadata attached to the member.
283
+ */
284
+ metadata?: string;
285
+ }
286
+ export interface MemberRequestAminoMsg {
287
+ type: "cosmos-sdk/MemberRequest";
288
+ value: MemberRequestAmino;
289
+ }
290
+ /**
291
+ * MemberRequest represents a group member to be used in Msg server requests.
292
+ * Contrary to `Member`, it doesn't have any `added_at` field
293
+ * since this field cannot be set as part of requests.
294
+ */
295
+ export interface MemberRequestSDKType {
296
+ address: string;
297
+ weight: string;
298
+ metadata: string;
299
+ }
300
+ /**
301
+ * ThresholdDecisionPolicy is a decision policy where a proposal passes when it
302
+ * satisfies the two following conditions:
303
+ * 1. The sum of all `YES` voter's weights is greater or equal than the defined
304
+ * `threshold`.
305
+ * 2. The voting and execution periods of the proposal respect the parameters
306
+ * given by `windows`.
307
+ */
308
+ export interface ThresholdDecisionPolicy {
309
+ $typeUrl?: "/cosmos.group.v1.ThresholdDecisionPolicy";
310
+ /**
311
+ * threshold is the minimum weighted sum of `YES` votes that must be met or
312
+ * exceeded for a proposal to succeed.
313
+ */
314
+ threshold: string;
315
+ /** windows defines the different windows for voting and execution. */
316
+ windows?: DecisionPolicyWindows;
317
+ }
318
+ export interface ThresholdDecisionPolicyProtoMsg {
319
+ typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy";
320
+ value: Uint8Array;
321
+ }
322
+ /**
323
+ * ThresholdDecisionPolicy is a decision policy where a proposal passes when it
324
+ * satisfies the two following conditions:
325
+ * 1. The sum of all `YES` voter's weights is greater or equal than the defined
326
+ * `threshold`.
327
+ * 2. The voting and execution periods of the proposal respect the parameters
328
+ * given by `windows`.
329
+ * @name ThresholdDecisionPolicyAmino
330
+ * @package cosmos.group.v1
331
+ * @see proto type: cosmos.group.v1.ThresholdDecisionPolicy
332
+ */
333
+ export interface ThresholdDecisionPolicyAmino {
334
+ /**
335
+ * threshold is the minimum weighted sum of `YES` votes that must be met or
336
+ * exceeded for a proposal to succeed.
337
+ */
338
+ threshold?: string;
339
+ /**
340
+ * windows defines the different windows for voting and execution.
341
+ */
342
+ windows?: DecisionPolicyWindowsAmino;
343
+ }
344
+ export interface ThresholdDecisionPolicyAminoMsg {
345
+ type: "cosmos-sdk/ThresholdDecisionPolicy";
346
+ value: ThresholdDecisionPolicyAmino;
347
+ }
348
+ /**
349
+ * ThresholdDecisionPolicy is a decision policy where a proposal passes when it
350
+ * satisfies the two following conditions:
351
+ * 1. The sum of all `YES` voter's weights is greater or equal than the defined
352
+ * `threshold`.
353
+ * 2. The voting and execution periods of the proposal respect the parameters
354
+ * given by `windows`.
355
+ */
356
+ export interface ThresholdDecisionPolicySDKType {
357
+ $typeUrl?: "/cosmos.group.v1.ThresholdDecisionPolicy";
358
+ threshold: string;
359
+ windows?: DecisionPolicyWindowsSDKType;
360
+ }
361
+ /**
362
+ * PercentageDecisionPolicy is a decision policy where a proposal passes when
363
+ * it satisfies the two following conditions:
364
+ * 1. The percentage of all `YES` voters' weights out of the total group weight
365
+ * is greater or equal than the given `percentage`.
366
+ * 2. The voting and execution periods of the proposal respect the parameters
367
+ * given by `windows`.
368
+ */
369
+ export interface PercentageDecisionPolicy {
370
+ $typeUrl?: "/cosmos.group.v1.PercentageDecisionPolicy";
371
+ /**
372
+ * percentage is the minimum percentage of the weighted sum of `YES` votes must
373
+ * meet for a proposal to succeed.
374
+ */
375
+ percentage: string;
376
+ /** windows defines the different windows for voting and execution. */
377
+ windows?: DecisionPolicyWindows;
378
+ }
379
+ export interface PercentageDecisionPolicyProtoMsg {
380
+ typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy";
381
+ value: Uint8Array;
382
+ }
383
+ /**
384
+ * PercentageDecisionPolicy is a decision policy where a proposal passes when
385
+ * it satisfies the two following conditions:
386
+ * 1. The percentage of all `YES` voters' weights out of the total group weight
387
+ * is greater or equal than the given `percentage`.
388
+ * 2. The voting and execution periods of the proposal respect the parameters
389
+ * given by `windows`.
390
+ * @name PercentageDecisionPolicyAmino
391
+ * @package cosmos.group.v1
392
+ * @see proto type: cosmos.group.v1.PercentageDecisionPolicy
393
+ */
394
+ export interface PercentageDecisionPolicyAmino {
395
+ /**
396
+ * percentage is the minimum percentage of the weighted sum of `YES` votes must
397
+ * meet for a proposal to succeed.
398
+ */
399
+ percentage?: string;
400
+ /**
401
+ * windows defines the different windows for voting and execution.
402
+ */
403
+ windows?: DecisionPolicyWindowsAmino;
404
+ }
405
+ export interface PercentageDecisionPolicyAminoMsg {
406
+ type: "cosmos-sdk/PercentageDecisionPolicy";
407
+ value: PercentageDecisionPolicyAmino;
408
+ }
409
+ /**
410
+ * PercentageDecisionPolicy is a decision policy where a proposal passes when
411
+ * it satisfies the two following conditions:
412
+ * 1. The percentage of all `YES` voters' weights out of the total group weight
413
+ * is greater or equal than the given `percentage`.
414
+ * 2. The voting and execution periods of the proposal respect the parameters
415
+ * given by `windows`.
416
+ */
417
+ export interface PercentageDecisionPolicySDKType {
418
+ $typeUrl?: "/cosmos.group.v1.PercentageDecisionPolicy";
419
+ percentage: string;
420
+ windows?: DecisionPolicyWindowsSDKType;
421
+ }
422
+ /** DecisionPolicyWindows defines the different windows for voting and execution. */
423
+ export interface DecisionPolicyWindows {
424
+ /**
425
+ * voting_period is the duration from submission of a proposal to the end of voting period
426
+ * Within this times votes can be submitted with MsgVote.
427
+ */
428
+ votingPeriod: Duration;
429
+ /**
430
+ * min_execution_period is the minimum duration after the proposal submission
431
+ * where members can start sending MsgExec. This means that the window for
432
+ * sending a MsgExec transaction is:
433
+ * `[ submission + min_execution_period ; submission + voting_period + max_execution_period]`
434
+ * where max_execution_period is a app-specific config, defined in the keeper.
435
+ * If not set, min_execution_period will default to 0.
436
+ *
437
+ * Please make sure to set a `min_execution_period` that is smaller than
438
+ * `voting_period + max_execution_period`, or else the above execution window
439
+ * is empty, meaning that all proposals created with this decision policy
440
+ * won't be able to be executed.
441
+ */
442
+ minExecutionPeriod: Duration;
443
+ }
444
+ export interface DecisionPolicyWindowsProtoMsg {
445
+ typeUrl: "/cosmos.group.v1.DecisionPolicyWindows";
446
+ value: Uint8Array;
447
+ }
448
+ /**
449
+ * DecisionPolicyWindows defines the different windows for voting and execution.
450
+ * @name DecisionPolicyWindowsAmino
451
+ * @package cosmos.group.v1
452
+ * @see proto type: cosmos.group.v1.DecisionPolicyWindows
453
+ */
454
+ export interface DecisionPolicyWindowsAmino {
455
+ /**
456
+ * voting_period is the duration from submission of a proposal to the end of voting period
457
+ * Within this times votes can be submitted with MsgVote.
458
+ */
459
+ voting_period: DurationAmino;
460
+ /**
461
+ * min_execution_period is the minimum duration after the proposal submission
462
+ * where members can start sending MsgExec. This means that the window for
463
+ * sending a MsgExec transaction is:
464
+ * `[ submission + min_execution_period ; submission + voting_period + max_execution_period]`
465
+ * where max_execution_period is a app-specific config, defined in the keeper.
466
+ * If not set, min_execution_period will default to 0.
467
+ *
468
+ * Please make sure to set a `min_execution_period` that is smaller than
469
+ * `voting_period + max_execution_period`, or else the above execution window
470
+ * is empty, meaning that all proposals created with this decision policy
471
+ * won't be able to be executed.
472
+ */
473
+ min_execution_period: DurationAmino;
474
+ }
475
+ export interface DecisionPolicyWindowsAminoMsg {
476
+ type: "cosmos-sdk/DecisionPolicyWindows";
477
+ value: DecisionPolicyWindowsAmino;
478
+ }
479
+ /** DecisionPolicyWindows defines the different windows for voting and execution. */
480
+ export interface DecisionPolicyWindowsSDKType {
481
+ voting_period: DurationSDKType;
482
+ min_execution_period: DurationSDKType;
483
+ }
484
+ /** GroupInfo represents the high-level on-chain information for a group. */
485
+ export interface GroupInfo {
486
+ /** id is the unique ID of the group. */
487
+ id: bigint;
488
+ /** admin is the account address of the group's admin. */
489
+ admin: string;
490
+ /**
491
+ * metadata is any arbitrary metadata to attached to the group.
492
+ * the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1
493
+ */
494
+ metadata: string;
495
+ /**
496
+ * version is used to track changes to a group's membership structure that
497
+ * would break existing proposals. Whenever any members weight is changed,
498
+ * or any member is added or removed this version is incremented and will
499
+ * cause proposals based on older versions of this group to fail
500
+ */
501
+ version: bigint;
502
+ /** total_weight is the sum of the group members' weights. */
503
+ totalWeight: string;
504
+ /** created_at is a timestamp specifying when a group was created. */
505
+ createdAt: Date;
506
+ }
507
+ export interface GroupInfoProtoMsg {
508
+ typeUrl: "/cosmos.group.v1.GroupInfo";
509
+ value: Uint8Array;
510
+ }
511
+ /**
512
+ * GroupInfo represents the high-level on-chain information for a group.
513
+ * @name GroupInfoAmino
514
+ * @package cosmos.group.v1
515
+ * @see proto type: cosmos.group.v1.GroupInfo
516
+ */
517
+ export interface GroupInfoAmino {
518
+ /**
519
+ * id is the unique ID of the group.
520
+ */
521
+ id?: string;
522
+ /**
523
+ * admin is the account address of the group's admin.
524
+ */
525
+ admin?: string;
526
+ /**
527
+ * metadata is any arbitrary metadata to attached to the group.
528
+ * the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1
529
+ */
530
+ metadata?: string;
531
+ /**
532
+ * version is used to track changes to a group's membership structure that
533
+ * would break existing proposals. Whenever any members weight is changed,
534
+ * or any member is added or removed this version is incremented and will
535
+ * cause proposals based on older versions of this group to fail
536
+ */
537
+ version?: string;
538
+ /**
539
+ * total_weight is the sum of the group members' weights.
540
+ */
541
+ total_weight?: string;
542
+ /**
543
+ * created_at is a timestamp specifying when a group was created.
544
+ */
545
+ created_at: string;
546
+ }
547
+ export interface GroupInfoAminoMsg {
548
+ type: "cosmos-sdk/GroupInfo";
549
+ value: GroupInfoAmino;
550
+ }
551
+ /** GroupInfo represents the high-level on-chain information for a group. */
552
+ export interface GroupInfoSDKType {
553
+ id: bigint;
554
+ admin: string;
555
+ metadata: string;
556
+ version: bigint;
557
+ total_weight: string;
558
+ created_at: Date;
559
+ }
560
+ /** GroupMember represents the relationship between a group and a member. */
561
+ export interface GroupMember {
562
+ /** group_id is the unique ID of the group. */
563
+ groupId: bigint;
564
+ /** member is the member data. */
565
+ member?: Member;
566
+ }
567
+ export interface GroupMemberProtoMsg {
568
+ typeUrl: "/cosmos.group.v1.GroupMember";
569
+ value: Uint8Array;
570
+ }
571
+ /**
572
+ * GroupMember represents the relationship between a group and a member.
573
+ * @name GroupMemberAmino
574
+ * @package cosmos.group.v1
575
+ * @see proto type: cosmos.group.v1.GroupMember
576
+ */
577
+ export interface GroupMemberAmino {
578
+ /**
579
+ * group_id is the unique ID of the group.
580
+ */
581
+ group_id?: string;
582
+ /**
583
+ * member is the member data.
584
+ */
585
+ member?: MemberAmino;
586
+ }
587
+ export interface GroupMemberAminoMsg {
588
+ type: "cosmos-sdk/GroupMember";
589
+ value: GroupMemberAmino;
590
+ }
591
+ /** GroupMember represents the relationship between a group and a member. */
592
+ export interface GroupMemberSDKType {
593
+ group_id: bigint;
594
+ member?: MemberSDKType;
595
+ }
596
+ /** GroupPolicyInfo represents the high-level on-chain information for a group policy. */
597
+ export interface GroupPolicyInfo {
598
+ /** address is the account address of group policy. */
599
+ address: string;
600
+ /** group_id is the unique ID of the group. */
601
+ groupId: bigint;
602
+ /** admin is the account address of the group admin. */
603
+ admin: string;
604
+ /**
605
+ * metadata is any arbitrary metadata attached to the group policy.
606
+ * the recommended format of the metadata is to be found here:
607
+ * https://docs.cosmos.network/v0.47/modules/group#decision-policy-1
608
+ */
609
+ metadata: string;
610
+ /**
611
+ * version is used to track changes to a group's GroupPolicyInfo structure that
612
+ * would create a different result on a running proposal.
613
+ */
614
+ version: bigint;
615
+ /** decision_policy specifies the group policy's decision policy. */
616
+ decisionPolicy?: ThresholdDecisionPolicy | PercentageDecisionPolicy | Any | undefined;
617
+ /** created_at is a timestamp specifying when a group policy was created. */
618
+ createdAt: Date;
619
+ }
620
+ export interface GroupPolicyInfoProtoMsg {
621
+ typeUrl: "/cosmos.group.v1.GroupPolicyInfo";
622
+ value: Uint8Array;
623
+ }
624
+ export type GroupPolicyInfoEncoded = Omit<GroupPolicyInfo, "decisionPolicy"> & {
625
+ /** decision_policy specifies the group policy's decision policy. */decisionPolicy?: ThresholdDecisionPolicyProtoMsg | PercentageDecisionPolicyProtoMsg | AnyProtoMsg | undefined;
626
+ };
627
+ /**
628
+ * GroupPolicyInfo represents the high-level on-chain information for a group policy.
629
+ * @name GroupPolicyInfoAmino
630
+ * @package cosmos.group.v1
631
+ * @see proto type: cosmos.group.v1.GroupPolicyInfo
632
+ */
633
+ export interface GroupPolicyInfoAmino {
634
+ /**
635
+ * address is the account address of group policy.
636
+ */
637
+ address?: string;
638
+ /**
639
+ * group_id is the unique ID of the group.
640
+ */
641
+ group_id?: string;
642
+ /**
643
+ * admin is the account address of the group admin.
644
+ */
645
+ admin?: string;
646
+ /**
647
+ * metadata is any arbitrary metadata attached to the group policy.
648
+ * the recommended format of the metadata is to be found here:
649
+ * https://docs.cosmos.network/v0.47/modules/group#decision-policy-1
650
+ */
651
+ metadata?: string;
652
+ /**
653
+ * version is used to track changes to a group's GroupPolicyInfo structure that
654
+ * would create a different result on a running proposal.
655
+ */
656
+ version?: string;
657
+ /**
658
+ * decision_policy specifies the group policy's decision policy.
659
+ */
660
+ decision_policy?: AnyAmino;
661
+ /**
662
+ * created_at is a timestamp specifying when a group policy was created.
663
+ */
664
+ created_at: string;
665
+ }
666
+ export interface GroupPolicyInfoAminoMsg {
667
+ type: "cosmos-sdk/GroupPolicyInfo";
668
+ value: GroupPolicyInfoAmino;
669
+ }
670
+ /** GroupPolicyInfo represents the high-level on-chain information for a group policy. */
671
+ export interface GroupPolicyInfoSDKType {
672
+ address: string;
673
+ group_id: bigint;
674
+ admin: string;
675
+ metadata: string;
676
+ version: bigint;
677
+ decision_policy?: ThresholdDecisionPolicySDKType | PercentageDecisionPolicySDKType | AnySDKType | undefined;
678
+ created_at: Date;
679
+ }
680
+ /**
681
+ * Proposal defines a group proposal. Any member of a group can submit a proposal
682
+ * for a group policy to decide upon.
683
+ * A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
684
+ * passes as well as some optional metadata associated with the proposal.
685
+ */
686
+ export interface Proposal {
687
+ /** id is the unique id of the proposal. */
688
+ id: bigint;
689
+ /** group_policy_address is the account address of group policy. */
690
+ groupPolicyAddress: string;
691
+ /**
692
+ * metadata is any arbitrary metadata attached to the proposal.
693
+ * the recommended format of the metadata is to be found here:
694
+ * https://docs.cosmos.network/v0.47/modules/group#proposal-4
695
+ */
696
+ metadata: string;
697
+ /** proposers are the account addresses of the proposers. */
698
+ proposers: string[];
699
+ /** submit_time is a timestamp specifying when a proposal was submitted. */
700
+ submitTime: Date;
701
+ /**
702
+ * group_version tracks the version of the group at proposal submission.
703
+ * This field is here for informational purposes only.
704
+ */
705
+ groupVersion: bigint;
706
+ /**
707
+ * group_policy_version tracks the version of the group policy at proposal submission.
708
+ * When a decision policy is changed, existing proposals from previous policy
709
+ * versions will become invalid with the `ABORTED` status.
710
+ * This field is here for informational purposes only.
711
+ */
712
+ groupPolicyVersion: bigint;
713
+ /** status represents the high level position in the life cycle of the proposal. Initial value is Submitted. */
714
+ status: ProposalStatus;
715
+ /**
716
+ * final_tally_result contains the sums of all weighted votes for this
717
+ * proposal for each vote option. It is empty at submission, and only
718
+ * populated after tallying, at voting period end or at proposal execution,
719
+ * whichever happens first.
720
+ */
721
+ finalTallyResult: TallyResult;
722
+ /**
723
+ * voting_period_end is the timestamp before which voting must be done.
724
+ * Unless a successful MsgExec is called before (to execute a proposal whose
725
+ * tally is successful before the voting period ends), tallying will be done
726
+ * at this point, and the `final_tally_result`and `status` fields will be
727
+ * accordingly updated.
728
+ */
729
+ votingPeriodEnd: Date;
730
+ /** executor_result is the final result of the proposal execution. Initial value is NotRun. */
731
+ executorResult: ProposalExecutorResult;
732
+ /** messages is a list of `sdk.Msg`s that will be executed if the proposal passes. */
733
+ messages: Any[];
734
+ /** title is the title of the proposal */
735
+ title: string;
736
+ /** summary is a short summary of the proposal */
737
+ summary: string;
738
+ }
739
+ export interface ProposalProtoMsg {
740
+ typeUrl: "/cosmos.group.v1.Proposal";
741
+ value: Uint8Array;
742
+ }
743
+ /**
744
+ * Proposal defines a group proposal. Any member of a group can submit a proposal
745
+ * for a group policy to decide upon.
746
+ * A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
747
+ * passes as well as some optional metadata associated with the proposal.
748
+ * @name ProposalAmino
749
+ * @package cosmos.group.v1
750
+ * @see proto type: cosmos.group.v1.Proposal
751
+ */
752
+ export interface ProposalAmino {
753
+ /**
754
+ * id is the unique id of the proposal.
755
+ */
756
+ id?: string;
757
+ /**
758
+ * group_policy_address is the account address of group policy.
759
+ */
760
+ group_policy_address?: string;
761
+ /**
762
+ * metadata is any arbitrary metadata attached to the proposal.
763
+ * the recommended format of the metadata is to be found here:
764
+ * https://docs.cosmos.network/v0.47/modules/group#proposal-4
765
+ */
766
+ metadata?: string;
767
+ /**
768
+ * proposers are the account addresses of the proposers.
769
+ */
770
+ proposers?: string[];
771
+ /**
772
+ * submit_time is a timestamp specifying when a proposal was submitted.
773
+ */
774
+ submit_time: string;
775
+ /**
776
+ * group_version tracks the version of the group at proposal submission.
777
+ * This field is here for informational purposes only.
778
+ */
779
+ group_version?: string;
780
+ /**
781
+ * group_policy_version tracks the version of the group policy at proposal submission.
782
+ * When a decision policy is changed, existing proposals from previous policy
783
+ * versions will become invalid with the `ABORTED` status.
784
+ * This field is here for informational purposes only.
785
+ */
786
+ group_policy_version?: string;
787
+ /**
788
+ * status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
789
+ */
790
+ status?: ProposalStatus;
791
+ /**
792
+ * final_tally_result contains the sums of all weighted votes for this
793
+ * proposal for each vote option. It is empty at submission, and only
794
+ * populated after tallying, at voting period end or at proposal execution,
795
+ * whichever happens first.
796
+ */
797
+ final_tally_result: TallyResultAmino;
798
+ /**
799
+ * voting_period_end is the timestamp before which voting must be done.
800
+ * Unless a successful MsgExec is called before (to execute a proposal whose
801
+ * tally is successful before the voting period ends), tallying will be done
802
+ * at this point, and the `final_tally_result`and `status` fields will be
803
+ * accordingly updated.
804
+ */
805
+ voting_period_end: string;
806
+ /**
807
+ * executor_result is the final result of the proposal execution. Initial value is NotRun.
808
+ */
809
+ executor_result?: ProposalExecutorResult;
810
+ /**
811
+ * messages is a list of `sdk.Msg`s that will be executed if the proposal passes.
812
+ */
813
+ messages?: AnyAmino[];
814
+ /**
815
+ * title is the title of the proposal
816
+ */
817
+ title?: string;
818
+ /**
819
+ * summary is a short summary of the proposal
820
+ */
821
+ summary?: string;
822
+ }
823
+ export interface ProposalAminoMsg {
824
+ type: "cosmos-sdk/Proposal";
825
+ value: ProposalAmino;
826
+ }
827
+ /**
828
+ * Proposal defines a group proposal. Any member of a group can submit a proposal
829
+ * for a group policy to decide upon.
830
+ * A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
831
+ * passes as well as some optional metadata associated with the proposal.
832
+ */
833
+ export interface ProposalSDKType {
834
+ id: bigint;
835
+ group_policy_address: string;
836
+ metadata: string;
837
+ proposers: string[];
838
+ submit_time: Date;
839
+ group_version: bigint;
840
+ group_policy_version: bigint;
841
+ status: ProposalStatus;
842
+ final_tally_result: TallyResultSDKType;
843
+ voting_period_end: Date;
844
+ executor_result: ProposalExecutorResult;
845
+ messages: AnySDKType[];
846
+ title: string;
847
+ summary: string;
848
+ }
849
+ /** TallyResult represents the sum of weighted votes for each vote option. */
850
+ export interface TallyResult {
851
+ /** yes_count is the weighted sum of yes votes. */
852
+ yesCount: string;
853
+ /** abstain_count is the weighted sum of abstainers. */
854
+ abstainCount: string;
855
+ /** no_count is the weighted sum of no votes. */
856
+ noCount: string;
857
+ /** no_with_veto_count is the weighted sum of veto. */
858
+ noWithVetoCount: string;
859
+ }
860
+ export interface TallyResultProtoMsg {
861
+ typeUrl: "/cosmos.group.v1.TallyResult";
862
+ value: Uint8Array;
863
+ }
864
+ /**
865
+ * TallyResult represents the sum of weighted votes for each vote option.
866
+ * @name TallyResultAmino
867
+ * @package cosmos.group.v1
868
+ * @see proto type: cosmos.group.v1.TallyResult
869
+ */
870
+ export interface TallyResultAmino {
871
+ /**
872
+ * yes_count is the weighted sum of yes votes.
873
+ */
874
+ yes_count?: string;
875
+ /**
876
+ * abstain_count is the weighted sum of abstainers.
877
+ */
878
+ abstain_count?: string;
879
+ /**
880
+ * no_count is the weighted sum of no votes.
881
+ */
882
+ no_count?: string;
883
+ /**
884
+ * no_with_veto_count is the weighted sum of veto.
885
+ */
886
+ no_with_veto_count?: string;
887
+ }
888
+ export interface TallyResultAminoMsg {
889
+ type: "cosmos-sdk/TallyResult";
890
+ value: TallyResultAmino;
891
+ }
892
+ /** TallyResult represents the sum of weighted votes for each vote option. */
893
+ export interface TallyResultSDKType {
894
+ yes_count: string;
895
+ abstain_count: string;
896
+ no_count: string;
897
+ no_with_veto_count: string;
898
+ }
899
+ /** Vote represents a vote for a proposal.string metadata */
900
+ export interface Vote {
901
+ /** proposal is the unique ID of the proposal. */
902
+ proposalId: bigint;
903
+ /** voter is the account address of the voter. */
904
+ voter: string;
905
+ /** option is the voter's choice on the proposal. */
906
+ option: VoteOption;
907
+ /**
908
+ * metadata is any arbitrary metadata attached to the vote.
909
+ * the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2
910
+ */
911
+ metadata: string;
912
+ /** submit_time is the timestamp when the vote was submitted. */
913
+ submitTime: Date;
914
+ }
915
+ export interface VoteProtoMsg {
916
+ typeUrl: "/cosmos.group.v1.Vote";
917
+ value: Uint8Array;
918
+ }
919
+ /**
920
+ * Vote represents a vote for a proposal.string metadata
921
+ * @name VoteAmino
922
+ * @package cosmos.group.v1
923
+ * @see proto type: cosmos.group.v1.Vote
924
+ */
925
+ export interface VoteAmino {
926
+ /**
927
+ * proposal is the unique ID of the proposal.
928
+ */
929
+ proposal_id?: string;
930
+ /**
931
+ * voter is the account address of the voter.
932
+ */
933
+ voter?: string;
934
+ /**
935
+ * option is the voter's choice on the proposal.
936
+ */
937
+ option?: VoteOption;
938
+ /**
939
+ * metadata is any arbitrary metadata attached to the vote.
940
+ * the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2
941
+ */
942
+ metadata?: string;
943
+ /**
944
+ * submit_time is the timestamp when the vote was submitted.
945
+ */
946
+ submit_time: string;
947
+ }
948
+ export interface VoteAminoMsg {
949
+ type: "cosmos-sdk/Vote";
950
+ value: VoteAmino;
951
+ }
952
+ /** Vote represents a vote for a proposal.string metadata */
953
+ export interface VoteSDKType {
954
+ proposal_id: bigint;
955
+ voter: string;
956
+ option: VoteOption;
957
+ metadata: string;
958
+ submit_time: Date;
959
+ }
960
+ function createBaseMember(): Member {
961
+ return {
962
+ address: "",
963
+ weight: "",
964
+ metadata: "",
965
+ addedAt: new Date()
966
+ };
967
+ }
968
+ export const Member = {
969
+ typeUrl: "/cosmos.group.v1.Member",
970
+ encode(message: Member, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
971
+ if (message.address !== "") {
972
+ writer.uint32(10).string(message.address);
973
+ }
974
+ if (message.weight !== "") {
975
+ writer.uint32(18).string(message.weight);
976
+ }
977
+ if (message.metadata !== "") {
978
+ writer.uint32(26).string(message.metadata);
979
+ }
980
+ if (message.addedAt !== undefined) {
981
+ Timestamp.encode(toTimestamp(message.addedAt), writer.uint32(34).fork()).ldelim();
982
+ }
983
+ return writer;
984
+ },
985
+ decode(input: BinaryReader | Uint8Array, length?: number): Member {
986
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
987
+ let end = length === undefined ? reader.len : reader.pos + length;
988
+ const message = createBaseMember();
989
+ while (reader.pos < end) {
990
+ const tag = reader.uint32();
991
+ switch (tag >>> 3) {
992
+ case 1:
993
+ message.address = reader.string();
994
+ break;
995
+ case 2:
996
+ message.weight = reader.string();
997
+ break;
998
+ case 3:
999
+ message.metadata = reader.string();
1000
+ break;
1001
+ case 4:
1002
+ message.addedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1003
+ break;
1004
+ default:
1005
+ reader.skipType(tag & 7);
1006
+ break;
1007
+ }
1008
+ }
1009
+ return message;
1010
+ },
1011
+ fromPartial(object: Partial<Member>): Member {
1012
+ const message = createBaseMember();
1013
+ message.address = object.address ?? "";
1014
+ message.weight = object.weight ?? "";
1015
+ message.metadata = object.metadata ?? "";
1016
+ message.addedAt = object.addedAt ?? undefined;
1017
+ return message;
1018
+ },
1019
+ fromAmino(object: MemberAmino): Member {
1020
+ const message = createBaseMember();
1021
+ if (object.address !== undefined && object.address !== null) {
1022
+ message.address = object.address;
1023
+ }
1024
+ if (object.weight !== undefined && object.weight !== null) {
1025
+ message.weight = object.weight;
1026
+ }
1027
+ if (object.metadata !== undefined && object.metadata !== null) {
1028
+ message.metadata = object.metadata;
1029
+ }
1030
+ if (object.added_at !== undefined && object.added_at !== null) {
1031
+ message.addedAt = fromTimestamp(Timestamp.fromAmino(object.added_at));
1032
+ }
1033
+ return message;
1034
+ },
1035
+ toAmino(message: Member): MemberAmino {
1036
+ const obj: any = {};
1037
+ obj.address = message.address === "" ? undefined : message.address;
1038
+ obj.weight = message.weight === "" ? undefined : message.weight;
1039
+ obj.metadata = message.metadata === "" ? undefined : message.metadata;
1040
+ obj.added_at = message.addedAt ? Timestamp.toAmino(toTimestamp(message.addedAt)) : new Date();
1041
+ return obj;
1042
+ },
1043
+ fromAminoMsg(object: MemberAminoMsg): Member {
1044
+ return Member.fromAmino(object.value);
1045
+ },
1046
+ toAminoMsg(message: Member): MemberAminoMsg {
1047
+ return {
1048
+ type: "cosmos-sdk/Member",
1049
+ value: Member.toAmino(message)
1050
+ };
1051
+ },
1052
+ fromProtoMsg(message: MemberProtoMsg): Member {
1053
+ return Member.decode(message.value);
1054
+ },
1055
+ toProto(message: Member): Uint8Array {
1056
+ return Member.encode(message).finish();
1057
+ },
1058
+ toProtoMsg(message: Member): MemberProtoMsg {
1059
+ return {
1060
+ typeUrl: "/cosmos.group.v1.Member",
1061
+ value: Member.encode(message).finish()
1062
+ };
1063
+ }
1064
+ };
1065
+ function createBaseMemberRequest(): MemberRequest {
1066
+ return {
1067
+ address: "",
1068
+ weight: "",
1069
+ metadata: ""
1070
+ };
1071
+ }
1072
+ export const MemberRequest = {
1073
+ typeUrl: "/cosmos.group.v1.MemberRequest",
1074
+ encode(message: MemberRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1075
+ if (message.address !== "") {
1076
+ writer.uint32(10).string(message.address);
1077
+ }
1078
+ if (message.weight !== "") {
1079
+ writer.uint32(18).string(message.weight);
1080
+ }
1081
+ if (message.metadata !== "") {
1082
+ writer.uint32(26).string(message.metadata);
1083
+ }
1084
+ return writer;
1085
+ },
1086
+ decode(input: BinaryReader | Uint8Array, length?: number): MemberRequest {
1087
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1088
+ let end = length === undefined ? reader.len : reader.pos + length;
1089
+ const message = createBaseMemberRequest();
1090
+ while (reader.pos < end) {
1091
+ const tag = reader.uint32();
1092
+ switch (tag >>> 3) {
1093
+ case 1:
1094
+ message.address = reader.string();
1095
+ break;
1096
+ case 2:
1097
+ message.weight = reader.string();
1098
+ break;
1099
+ case 3:
1100
+ message.metadata = reader.string();
1101
+ break;
1102
+ default:
1103
+ reader.skipType(tag & 7);
1104
+ break;
1105
+ }
1106
+ }
1107
+ return message;
1108
+ },
1109
+ fromPartial(object: Partial<MemberRequest>): MemberRequest {
1110
+ const message = createBaseMemberRequest();
1111
+ message.address = object.address ?? "";
1112
+ message.weight = object.weight ?? "";
1113
+ message.metadata = object.metadata ?? "";
1114
+ return message;
1115
+ },
1116
+ fromAmino(object: MemberRequestAmino): MemberRequest {
1117
+ const message = createBaseMemberRequest();
1118
+ if (object.address !== undefined && object.address !== null) {
1119
+ message.address = object.address;
1120
+ }
1121
+ if (object.weight !== undefined && object.weight !== null) {
1122
+ message.weight = object.weight;
1123
+ }
1124
+ if (object.metadata !== undefined && object.metadata !== null) {
1125
+ message.metadata = object.metadata;
1126
+ }
1127
+ return message;
1128
+ },
1129
+ toAmino(message: MemberRequest): MemberRequestAmino {
1130
+ const obj: any = {};
1131
+ obj.address = message.address === "" ? undefined : message.address;
1132
+ obj.weight = message.weight === "" ? undefined : message.weight;
1133
+ obj.metadata = message.metadata === "" ? undefined : message.metadata;
1134
+ return obj;
1135
+ },
1136
+ fromAminoMsg(object: MemberRequestAminoMsg): MemberRequest {
1137
+ return MemberRequest.fromAmino(object.value);
1138
+ },
1139
+ toAminoMsg(message: MemberRequest): MemberRequestAminoMsg {
1140
+ return {
1141
+ type: "cosmos-sdk/MemberRequest",
1142
+ value: MemberRequest.toAmino(message)
1143
+ };
1144
+ },
1145
+ fromProtoMsg(message: MemberRequestProtoMsg): MemberRequest {
1146
+ return MemberRequest.decode(message.value);
1147
+ },
1148
+ toProto(message: MemberRequest): Uint8Array {
1149
+ return MemberRequest.encode(message).finish();
1150
+ },
1151
+ toProtoMsg(message: MemberRequest): MemberRequestProtoMsg {
1152
+ return {
1153
+ typeUrl: "/cosmos.group.v1.MemberRequest",
1154
+ value: MemberRequest.encode(message).finish()
1155
+ };
1156
+ }
1157
+ };
1158
+ function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy {
1159
+ return {
1160
+ $typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy",
1161
+ threshold: "",
1162
+ windows: undefined
1163
+ };
1164
+ }
1165
+ export const ThresholdDecisionPolicy = {
1166
+ typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy",
1167
+ encode(message: ThresholdDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1168
+ if (message.threshold !== "") {
1169
+ writer.uint32(10).string(message.threshold);
1170
+ }
1171
+ if (message.windows !== undefined) {
1172
+ DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim();
1173
+ }
1174
+ return writer;
1175
+ },
1176
+ decode(input: BinaryReader | Uint8Array, length?: number): ThresholdDecisionPolicy {
1177
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1178
+ let end = length === undefined ? reader.len : reader.pos + length;
1179
+ const message = createBaseThresholdDecisionPolicy();
1180
+ while (reader.pos < end) {
1181
+ const tag = reader.uint32();
1182
+ switch (tag >>> 3) {
1183
+ case 1:
1184
+ message.threshold = reader.string();
1185
+ break;
1186
+ case 2:
1187
+ message.windows = DecisionPolicyWindows.decode(reader, reader.uint32());
1188
+ break;
1189
+ default:
1190
+ reader.skipType(tag & 7);
1191
+ break;
1192
+ }
1193
+ }
1194
+ return message;
1195
+ },
1196
+ fromPartial(object: Partial<ThresholdDecisionPolicy>): ThresholdDecisionPolicy {
1197
+ const message = createBaseThresholdDecisionPolicy();
1198
+ message.threshold = object.threshold ?? "";
1199
+ message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined;
1200
+ return message;
1201
+ },
1202
+ fromAmino(object: ThresholdDecisionPolicyAmino): ThresholdDecisionPolicy {
1203
+ const message = createBaseThresholdDecisionPolicy();
1204
+ if (object.threshold !== undefined && object.threshold !== null) {
1205
+ message.threshold = object.threshold;
1206
+ }
1207
+ if (object.windows !== undefined && object.windows !== null) {
1208
+ message.windows = DecisionPolicyWindows.fromAmino(object.windows);
1209
+ }
1210
+ return message;
1211
+ },
1212
+ toAmino(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAmino {
1213
+ const obj: any = {};
1214
+ obj.threshold = message.threshold === "" ? undefined : message.threshold;
1215
+ obj.windows = message.windows ? DecisionPolicyWindows.toAmino(message.windows) : undefined;
1216
+ return obj;
1217
+ },
1218
+ fromAminoMsg(object: ThresholdDecisionPolicyAminoMsg): ThresholdDecisionPolicy {
1219
+ return ThresholdDecisionPolicy.fromAmino(object.value);
1220
+ },
1221
+ toAminoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAminoMsg {
1222
+ return {
1223
+ type: "cosmos-sdk/ThresholdDecisionPolicy",
1224
+ value: ThresholdDecisionPolicy.toAmino(message)
1225
+ };
1226
+ },
1227
+ fromProtoMsg(message: ThresholdDecisionPolicyProtoMsg): ThresholdDecisionPolicy {
1228
+ return ThresholdDecisionPolicy.decode(message.value);
1229
+ },
1230
+ toProto(message: ThresholdDecisionPolicy): Uint8Array {
1231
+ return ThresholdDecisionPolicy.encode(message).finish();
1232
+ },
1233
+ toProtoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyProtoMsg {
1234
+ return {
1235
+ typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy",
1236
+ value: ThresholdDecisionPolicy.encode(message).finish()
1237
+ };
1238
+ }
1239
+ };
1240
+ function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy {
1241
+ return {
1242
+ $typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy",
1243
+ percentage: "",
1244
+ windows: undefined
1245
+ };
1246
+ }
1247
+ export const PercentageDecisionPolicy = {
1248
+ typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy",
1249
+ encode(message: PercentageDecisionPolicy, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1250
+ if (message.percentage !== "") {
1251
+ writer.uint32(10).string(message.percentage);
1252
+ }
1253
+ if (message.windows !== undefined) {
1254
+ DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim();
1255
+ }
1256
+ return writer;
1257
+ },
1258
+ decode(input: BinaryReader | Uint8Array, length?: number): PercentageDecisionPolicy {
1259
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1260
+ let end = length === undefined ? reader.len : reader.pos + length;
1261
+ const message = createBasePercentageDecisionPolicy();
1262
+ while (reader.pos < end) {
1263
+ const tag = reader.uint32();
1264
+ switch (tag >>> 3) {
1265
+ case 1:
1266
+ message.percentage = reader.string();
1267
+ break;
1268
+ case 2:
1269
+ message.windows = DecisionPolicyWindows.decode(reader, reader.uint32());
1270
+ break;
1271
+ default:
1272
+ reader.skipType(tag & 7);
1273
+ break;
1274
+ }
1275
+ }
1276
+ return message;
1277
+ },
1278
+ fromPartial(object: Partial<PercentageDecisionPolicy>): PercentageDecisionPolicy {
1279
+ const message = createBasePercentageDecisionPolicy();
1280
+ message.percentage = object.percentage ?? "";
1281
+ message.windows = object.windows !== undefined && object.windows !== null ? DecisionPolicyWindows.fromPartial(object.windows) : undefined;
1282
+ return message;
1283
+ },
1284
+ fromAmino(object: PercentageDecisionPolicyAmino): PercentageDecisionPolicy {
1285
+ const message = createBasePercentageDecisionPolicy();
1286
+ if (object.percentage !== undefined && object.percentage !== null) {
1287
+ message.percentage = object.percentage;
1288
+ }
1289
+ if (object.windows !== undefined && object.windows !== null) {
1290
+ message.windows = DecisionPolicyWindows.fromAmino(object.windows);
1291
+ }
1292
+ return message;
1293
+ },
1294
+ toAmino(message: PercentageDecisionPolicy): PercentageDecisionPolicyAmino {
1295
+ const obj: any = {};
1296
+ obj.percentage = message.percentage === "" ? undefined : message.percentage;
1297
+ obj.windows = message.windows ? DecisionPolicyWindows.toAmino(message.windows) : undefined;
1298
+ return obj;
1299
+ },
1300
+ fromAminoMsg(object: PercentageDecisionPolicyAminoMsg): PercentageDecisionPolicy {
1301
+ return PercentageDecisionPolicy.fromAmino(object.value);
1302
+ },
1303
+ toAminoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyAminoMsg {
1304
+ return {
1305
+ type: "cosmos-sdk/PercentageDecisionPolicy",
1306
+ value: PercentageDecisionPolicy.toAmino(message)
1307
+ };
1308
+ },
1309
+ fromProtoMsg(message: PercentageDecisionPolicyProtoMsg): PercentageDecisionPolicy {
1310
+ return PercentageDecisionPolicy.decode(message.value);
1311
+ },
1312
+ toProto(message: PercentageDecisionPolicy): Uint8Array {
1313
+ return PercentageDecisionPolicy.encode(message).finish();
1314
+ },
1315
+ toProtoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyProtoMsg {
1316
+ return {
1317
+ typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy",
1318
+ value: PercentageDecisionPolicy.encode(message).finish()
1319
+ };
1320
+ }
1321
+ };
1322
+ function createBaseDecisionPolicyWindows(): DecisionPolicyWindows {
1323
+ return {
1324
+ votingPeriod: Duration.fromPartial({}),
1325
+ minExecutionPeriod: Duration.fromPartial({})
1326
+ };
1327
+ }
1328
+ export const DecisionPolicyWindows = {
1329
+ typeUrl: "/cosmos.group.v1.DecisionPolicyWindows",
1330
+ encode(message: DecisionPolicyWindows, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1331
+ if (message.votingPeriod !== undefined) {
1332
+ Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim();
1333
+ }
1334
+ if (message.minExecutionPeriod !== undefined) {
1335
+ Duration.encode(message.minExecutionPeriod, writer.uint32(18).fork()).ldelim();
1336
+ }
1337
+ return writer;
1338
+ },
1339
+ decode(input: BinaryReader | Uint8Array, length?: number): DecisionPolicyWindows {
1340
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1341
+ let end = length === undefined ? reader.len : reader.pos + length;
1342
+ const message = createBaseDecisionPolicyWindows();
1343
+ while (reader.pos < end) {
1344
+ const tag = reader.uint32();
1345
+ switch (tag >>> 3) {
1346
+ case 1:
1347
+ message.votingPeriod = Duration.decode(reader, reader.uint32());
1348
+ break;
1349
+ case 2:
1350
+ message.minExecutionPeriod = Duration.decode(reader, reader.uint32());
1351
+ break;
1352
+ default:
1353
+ reader.skipType(tag & 7);
1354
+ break;
1355
+ }
1356
+ }
1357
+ return message;
1358
+ },
1359
+ fromPartial(object: Partial<DecisionPolicyWindows>): DecisionPolicyWindows {
1360
+ const message = createBaseDecisionPolicyWindows();
1361
+ message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? Duration.fromPartial(object.votingPeriod) : undefined;
1362
+ message.minExecutionPeriod = object.minExecutionPeriod !== undefined && object.minExecutionPeriod !== null ? Duration.fromPartial(object.minExecutionPeriod) : undefined;
1363
+ return message;
1364
+ },
1365
+ fromAmino(object: DecisionPolicyWindowsAmino): DecisionPolicyWindows {
1366
+ const message = createBaseDecisionPolicyWindows();
1367
+ if (object.voting_period !== undefined && object.voting_period !== null) {
1368
+ message.votingPeriod = Duration.fromAmino(object.voting_period);
1369
+ }
1370
+ if (object.min_execution_period !== undefined && object.min_execution_period !== null) {
1371
+ message.minExecutionPeriod = Duration.fromAmino(object.min_execution_period);
1372
+ }
1373
+ return message;
1374
+ },
1375
+ toAmino(message: DecisionPolicyWindows): DecisionPolicyWindowsAmino {
1376
+ const obj: any = {};
1377
+ obj.voting_period = message.votingPeriod ? Duration.toAmino(message.votingPeriod) : Duration.toAmino(Duration.fromPartial({}));
1378
+ obj.min_execution_period = message.minExecutionPeriod ? Duration.toAmino(message.minExecutionPeriod) : Duration.toAmino(Duration.fromPartial({}));
1379
+ return obj;
1380
+ },
1381
+ fromAminoMsg(object: DecisionPolicyWindowsAminoMsg): DecisionPolicyWindows {
1382
+ return DecisionPolicyWindows.fromAmino(object.value);
1383
+ },
1384
+ toAminoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsAminoMsg {
1385
+ return {
1386
+ type: "cosmos-sdk/DecisionPolicyWindows",
1387
+ value: DecisionPolicyWindows.toAmino(message)
1388
+ };
1389
+ },
1390
+ fromProtoMsg(message: DecisionPolicyWindowsProtoMsg): DecisionPolicyWindows {
1391
+ return DecisionPolicyWindows.decode(message.value);
1392
+ },
1393
+ toProto(message: DecisionPolicyWindows): Uint8Array {
1394
+ return DecisionPolicyWindows.encode(message).finish();
1395
+ },
1396
+ toProtoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsProtoMsg {
1397
+ return {
1398
+ typeUrl: "/cosmos.group.v1.DecisionPolicyWindows",
1399
+ value: DecisionPolicyWindows.encode(message).finish()
1400
+ };
1401
+ }
1402
+ };
1403
+ function createBaseGroupInfo(): GroupInfo {
1404
+ return {
1405
+ id: BigInt(0),
1406
+ admin: "",
1407
+ metadata: "",
1408
+ version: BigInt(0),
1409
+ totalWeight: "",
1410
+ createdAt: new Date()
1411
+ };
1412
+ }
1413
+ export const GroupInfo = {
1414
+ typeUrl: "/cosmos.group.v1.GroupInfo",
1415
+ encode(message: GroupInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1416
+ if (message.id !== BigInt(0)) {
1417
+ writer.uint32(8).uint64(message.id);
1418
+ }
1419
+ if (message.admin !== "") {
1420
+ writer.uint32(18).string(message.admin);
1421
+ }
1422
+ if (message.metadata !== "") {
1423
+ writer.uint32(26).string(message.metadata);
1424
+ }
1425
+ if (message.version !== BigInt(0)) {
1426
+ writer.uint32(32).uint64(message.version);
1427
+ }
1428
+ if (message.totalWeight !== "") {
1429
+ writer.uint32(42).string(message.totalWeight);
1430
+ }
1431
+ if (message.createdAt !== undefined) {
1432
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).ldelim();
1433
+ }
1434
+ return writer;
1435
+ },
1436
+ decode(input: BinaryReader | Uint8Array, length?: number): GroupInfo {
1437
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1438
+ let end = length === undefined ? reader.len : reader.pos + length;
1439
+ const message = createBaseGroupInfo();
1440
+ while (reader.pos < end) {
1441
+ const tag = reader.uint32();
1442
+ switch (tag >>> 3) {
1443
+ case 1:
1444
+ message.id = reader.uint64();
1445
+ break;
1446
+ case 2:
1447
+ message.admin = reader.string();
1448
+ break;
1449
+ case 3:
1450
+ message.metadata = reader.string();
1451
+ break;
1452
+ case 4:
1453
+ message.version = reader.uint64();
1454
+ break;
1455
+ case 5:
1456
+ message.totalWeight = reader.string();
1457
+ break;
1458
+ case 6:
1459
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1460
+ break;
1461
+ default:
1462
+ reader.skipType(tag & 7);
1463
+ break;
1464
+ }
1465
+ }
1466
+ return message;
1467
+ },
1468
+ fromPartial(object: Partial<GroupInfo>): GroupInfo {
1469
+ const message = createBaseGroupInfo();
1470
+ message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
1471
+ message.admin = object.admin ?? "";
1472
+ message.metadata = object.metadata ?? "";
1473
+ message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0);
1474
+ message.totalWeight = object.totalWeight ?? "";
1475
+ message.createdAt = object.createdAt ?? undefined;
1476
+ return message;
1477
+ },
1478
+ fromAmino(object: GroupInfoAmino): GroupInfo {
1479
+ const message = createBaseGroupInfo();
1480
+ if (object.id !== undefined && object.id !== null) {
1481
+ message.id = BigInt(object.id);
1482
+ }
1483
+ if (object.admin !== undefined && object.admin !== null) {
1484
+ message.admin = object.admin;
1485
+ }
1486
+ if (object.metadata !== undefined && object.metadata !== null) {
1487
+ message.metadata = object.metadata;
1488
+ }
1489
+ if (object.version !== undefined && object.version !== null) {
1490
+ message.version = BigInt(object.version);
1491
+ }
1492
+ if (object.total_weight !== undefined && object.total_weight !== null) {
1493
+ message.totalWeight = object.total_weight;
1494
+ }
1495
+ if (object.created_at !== undefined && object.created_at !== null) {
1496
+ message.createdAt = fromTimestamp(Timestamp.fromAmino(object.created_at));
1497
+ }
1498
+ return message;
1499
+ },
1500
+ toAmino(message: GroupInfo): GroupInfoAmino {
1501
+ const obj: any = {};
1502
+ obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
1503
+ obj.admin = message.admin === "" ? undefined : message.admin;
1504
+ obj.metadata = message.metadata === "" ? undefined : message.metadata;
1505
+ obj.version = message.version !== BigInt(0) ? message.version?.toString() : undefined;
1506
+ obj.total_weight = message.totalWeight === "" ? undefined : message.totalWeight;
1507
+ obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : new Date();
1508
+ return obj;
1509
+ },
1510
+ fromAminoMsg(object: GroupInfoAminoMsg): GroupInfo {
1511
+ return GroupInfo.fromAmino(object.value);
1512
+ },
1513
+ toAminoMsg(message: GroupInfo): GroupInfoAminoMsg {
1514
+ return {
1515
+ type: "cosmos-sdk/GroupInfo",
1516
+ value: GroupInfo.toAmino(message)
1517
+ };
1518
+ },
1519
+ fromProtoMsg(message: GroupInfoProtoMsg): GroupInfo {
1520
+ return GroupInfo.decode(message.value);
1521
+ },
1522
+ toProto(message: GroupInfo): Uint8Array {
1523
+ return GroupInfo.encode(message).finish();
1524
+ },
1525
+ toProtoMsg(message: GroupInfo): GroupInfoProtoMsg {
1526
+ return {
1527
+ typeUrl: "/cosmos.group.v1.GroupInfo",
1528
+ value: GroupInfo.encode(message).finish()
1529
+ };
1530
+ }
1531
+ };
1532
+ function createBaseGroupMember(): GroupMember {
1533
+ return {
1534
+ groupId: BigInt(0),
1535
+ member: undefined
1536
+ };
1537
+ }
1538
+ export const GroupMember = {
1539
+ typeUrl: "/cosmos.group.v1.GroupMember",
1540
+ encode(message: GroupMember, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1541
+ if (message.groupId !== BigInt(0)) {
1542
+ writer.uint32(8).uint64(message.groupId);
1543
+ }
1544
+ if (message.member !== undefined) {
1545
+ Member.encode(message.member, writer.uint32(18).fork()).ldelim();
1546
+ }
1547
+ return writer;
1548
+ },
1549
+ decode(input: BinaryReader | Uint8Array, length?: number): GroupMember {
1550
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1551
+ let end = length === undefined ? reader.len : reader.pos + length;
1552
+ const message = createBaseGroupMember();
1553
+ while (reader.pos < end) {
1554
+ const tag = reader.uint32();
1555
+ switch (tag >>> 3) {
1556
+ case 1:
1557
+ message.groupId = reader.uint64();
1558
+ break;
1559
+ case 2:
1560
+ message.member = Member.decode(reader, reader.uint32());
1561
+ break;
1562
+ default:
1563
+ reader.skipType(tag & 7);
1564
+ break;
1565
+ }
1566
+ }
1567
+ return message;
1568
+ },
1569
+ fromPartial(object: Partial<GroupMember>): GroupMember {
1570
+ const message = createBaseGroupMember();
1571
+ message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0);
1572
+ message.member = object.member !== undefined && object.member !== null ? Member.fromPartial(object.member) : undefined;
1573
+ return message;
1574
+ },
1575
+ fromAmino(object: GroupMemberAmino): GroupMember {
1576
+ const message = createBaseGroupMember();
1577
+ if (object.group_id !== undefined && object.group_id !== null) {
1578
+ message.groupId = BigInt(object.group_id);
1579
+ }
1580
+ if (object.member !== undefined && object.member !== null) {
1581
+ message.member = Member.fromAmino(object.member);
1582
+ }
1583
+ return message;
1584
+ },
1585
+ toAmino(message: GroupMember): GroupMemberAmino {
1586
+ const obj: any = {};
1587
+ obj.group_id = message.groupId !== BigInt(0) ? message.groupId?.toString() : undefined;
1588
+ obj.member = message.member ? Member.toAmino(message.member) : undefined;
1589
+ return obj;
1590
+ },
1591
+ fromAminoMsg(object: GroupMemberAminoMsg): GroupMember {
1592
+ return GroupMember.fromAmino(object.value);
1593
+ },
1594
+ toAminoMsg(message: GroupMember): GroupMemberAminoMsg {
1595
+ return {
1596
+ type: "cosmos-sdk/GroupMember",
1597
+ value: GroupMember.toAmino(message)
1598
+ };
1599
+ },
1600
+ fromProtoMsg(message: GroupMemberProtoMsg): GroupMember {
1601
+ return GroupMember.decode(message.value);
1602
+ },
1603
+ toProto(message: GroupMember): Uint8Array {
1604
+ return GroupMember.encode(message).finish();
1605
+ },
1606
+ toProtoMsg(message: GroupMember): GroupMemberProtoMsg {
1607
+ return {
1608
+ typeUrl: "/cosmos.group.v1.GroupMember",
1609
+ value: GroupMember.encode(message).finish()
1610
+ };
1611
+ }
1612
+ };
1613
+ function createBaseGroupPolicyInfo(): GroupPolicyInfo {
1614
+ return {
1615
+ address: "",
1616
+ groupId: BigInt(0),
1617
+ admin: "",
1618
+ metadata: "",
1619
+ version: BigInt(0),
1620
+ decisionPolicy: undefined,
1621
+ createdAt: new Date()
1622
+ };
1623
+ }
1624
+ export const GroupPolicyInfo = {
1625
+ typeUrl: "/cosmos.group.v1.GroupPolicyInfo",
1626
+ encode(message: GroupPolicyInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1627
+ if (message.address !== "") {
1628
+ writer.uint32(10).string(message.address);
1629
+ }
1630
+ if (message.groupId !== BigInt(0)) {
1631
+ writer.uint32(16).uint64(message.groupId);
1632
+ }
1633
+ if (message.admin !== "") {
1634
+ writer.uint32(26).string(message.admin);
1635
+ }
1636
+ if (message.metadata !== "") {
1637
+ writer.uint32(34).string(message.metadata);
1638
+ }
1639
+ if (message.version !== BigInt(0)) {
1640
+ writer.uint32(40).uint64(message.version);
1641
+ }
1642
+ if (message.decisionPolicy !== undefined) {
1643
+ Any.encode(message.decisionPolicy as Any, writer.uint32(50).fork()).ldelim();
1644
+ }
1645
+ if (message.createdAt !== undefined) {
1646
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).ldelim();
1647
+ }
1648
+ return writer;
1649
+ },
1650
+ decode(input: BinaryReader | Uint8Array, length?: number): GroupPolicyInfo {
1651
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1652
+ let end = length === undefined ? reader.len : reader.pos + length;
1653
+ const message = createBaseGroupPolicyInfo();
1654
+ while (reader.pos < end) {
1655
+ const tag = reader.uint32();
1656
+ switch (tag >>> 3) {
1657
+ case 1:
1658
+ message.address = reader.string();
1659
+ break;
1660
+ case 2:
1661
+ message.groupId = reader.uint64();
1662
+ break;
1663
+ case 3:
1664
+ message.admin = reader.string();
1665
+ break;
1666
+ case 4:
1667
+ message.metadata = reader.string();
1668
+ break;
1669
+ case 5:
1670
+ message.version = reader.uint64();
1671
+ break;
1672
+ case 6:
1673
+ message.decisionPolicy = Cosmos_groupv1DecisionPolicy_InterfaceDecoder(reader) as Any;
1674
+ break;
1675
+ case 7:
1676
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1677
+ break;
1678
+ default:
1679
+ reader.skipType(tag & 7);
1680
+ break;
1681
+ }
1682
+ }
1683
+ return message;
1684
+ },
1685
+ fromPartial(object: Partial<GroupPolicyInfo>): GroupPolicyInfo {
1686
+ const message = createBaseGroupPolicyInfo();
1687
+ message.address = object.address ?? "";
1688
+ message.groupId = object.groupId !== undefined && object.groupId !== null ? BigInt(object.groupId.toString()) : BigInt(0);
1689
+ message.admin = object.admin ?? "";
1690
+ message.metadata = object.metadata ?? "";
1691
+ message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0);
1692
+ message.decisionPolicy = object.decisionPolicy !== undefined && object.decisionPolicy !== null ? Any.fromPartial(object.decisionPolicy) : undefined;
1693
+ message.createdAt = object.createdAt ?? undefined;
1694
+ return message;
1695
+ },
1696
+ fromAmino(object: GroupPolicyInfoAmino): GroupPolicyInfo {
1697
+ const message = createBaseGroupPolicyInfo();
1698
+ if (object.address !== undefined && object.address !== null) {
1699
+ message.address = object.address;
1700
+ }
1701
+ if (object.group_id !== undefined && object.group_id !== null) {
1702
+ message.groupId = BigInt(object.group_id);
1703
+ }
1704
+ if (object.admin !== undefined && object.admin !== null) {
1705
+ message.admin = object.admin;
1706
+ }
1707
+ if (object.metadata !== undefined && object.metadata !== null) {
1708
+ message.metadata = object.metadata;
1709
+ }
1710
+ if (object.version !== undefined && object.version !== null) {
1711
+ message.version = BigInt(object.version);
1712
+ }
1713
+ if (object.decision_policy !== undefined && object.decision_policy !== null) {
1714
+ message.decisionPolicy = Cosmos_groupv1DecisionPolicy_FromAmino(object.decision_policy);
1715
+ }
1716
+ if (object.created_at !== undefined && object.created_at !== null) {
1717
+ message.createdAt = fromTimestamp(Timestamp.fromAmino(object.created_at));
1718
+ }
1719
+ return message;
1720
+ },
1721
+ toAmino(message: GroupPolicyInfo): GroupPolicyInfoAmino {
1722
+ const obj: any = {};
1723
+ obj.address = message.address === "" ? undefined : message.address;
1724
+ obj.group_id = message.groupId !== BigInt(0) ? message.groupId?.toString() : undefined;
1725
+ obj.admin = message.admin === "" ? undefined : message.admin;
1726
+ obj.metadata = message.metadata === "" ? undefined : message.metadata;
1727
+ obj.version = message.version !== BigInt(0) ? message.version?.toString() : undefined;
1728
+ obj.decision_policy = message.decisionPolicy ? Cosmos_groupv1DecisionPolicy_ToAmino(message.decisionPolicy as Any) : undefined;
1729
+ obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : new Date();
1730
+ return obj;
1731
+ },
1732
+ fromAminoMsg(object: GroupPolicyInfoAminoMsg): GroupPolicyInfo {
1733
+ return GroupPolicyInfo.fromAmino(object.value);
1734
+ },
1735
+ toAminoMsg(message: GroupPolicyInfo): GroupPolicyInfoAminoMsg {
1736
+ return {
1737
+ type: "cosmos-sdk/GroupPolicyInfo",
1738
+ value: GroupPolicyInfo.toAmino(message)
1739
+ };
1740
+ },
1741
+ fromProtoMsg(message: GroupPolicyInfoProtoMsg): GroupPolicyInfo {
1742
+ return GroupPolicyInfo.decode(message.value);
1743
+ },
1744
+ toProto(message: GroupPolicyInfo): Uint8Array {
1745
+ return GroupPolicyInfo.encode(message).finish();
1746
+ },
1747
+ toProtoMsg(message: GroupPolicyInfo): GroupPolicyInfoProtoMsg {
1748
+ return {
1749
+ typeUrl: "/cosmos.group.v1.GroupPolicyInfo",
1750
+ value: GroupPolicyInfo.encode(message).finish()
1751
+ };
1752
+ }
1753
+ };
1754
+ function createBaseProposal(): Proposal {
1755
+ return {
1756
+ id: BigInt(0),
1757
+ groupPolicyAddress: "",
1758
+ metadata: "",
1759
+ proposers: [],
1760
+ submitTime: new Date(),
1761
+ groupVersion: BigInt(0),
1762
+ groupPolicyVersion: BigInt(0),
1763
+ status: 0,
1764
+ finalTallyResult: TallyResult.fromPartial({}),
1765
+ votingPeriodEnd: new Date(),
1766
+ executorResult: 0,
1767
+ messages: [],
1768
+ title: "",
1769
+ summary: ""
1770
+ };
1771
+ }
1772
+ export const Proposal = {
1773
+ typeUrl: "/cosmos.group.v1.Proposal",
1774
+ encode(message: Proposal, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1775
+ if (message.id !== BigInt(0)) {
1776
+ writer.uint32(8).uint64(message.id);
1777
+ }
1778
+ if (message.groupPolicyAddress !== "") {
1779
+ writer.uint32(18).string(message.groupPolicyAddress);
1780
+ }
1781
+ if (message.metadata !== "") {
1782
+ writer.uint32(26).string(message.metadata);
1783
+ }
1784
+ for (const v of message.proposers) {
1785
+ writer.uint32(34).string(v!);
1786
+ }
1787
+ if (message.submitTime !== undefined) {
1788
+ Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim();
1789
+ }
1790
+ if (message.groupVersion !== BigInt(0)) {
1791
+ writer.uint32(48).uint64(message.groupVersion);
1792
+ }
1793
+ if (message.groupPolicyVersion !== BigInt(0)) {
1794
+ writer.uint32(56).uint64(message.groupPolicyVersion);
1795
+ }
1796
+ if (message.status !== 0) {
1797
+ writer.uint32(64).int32(message.status);
1798
+ }
1799
+ if (message.finalTallyResult !== undefined) {
1800
+ TallyResult.encode(message.finalTallyResult, writer.uint32(74).fork()).ldelim();
1801
+ }
1802
+ if (message.votingPeriodEnd !== undefined) {
1803
+ Timestamp.encode(toTimestamp(message.votingPeriodEnd), writer.uint32(82).fork()).ldelim();
1804
+ }
1805
+ if (message.executorResult !== 0) {
1806
+ writer.uint32(88).int32(message.executorResult);
1807
+ }
1808
+ for (const v of message.messages) {
1809
+ Any.encode(v!, writer.uint32(98).fork()).ldelim();
1810
+ }
1811
+ if (message.title !== "") {
1812
+ writer.uint32(106).string(message.title);
1813
+ }
1814
+ if (message.summary !== "") {
1815
+ writer.uint32(114).string(message.summary);
1816
+ }
1817
+ return writer;
1818
+ },
1819
+ decode(input: BinaryReader | Uint8Array, length?: number): Proposal {
1820
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1821
+ let end = length === undefined ? reader.len : reader.pos + length;
1822
+ const message = createBaseProposal();
1823
+ while (reader.pos < end) {
1824
+ const tag = reader.uint32();
1825
+ switch (tag >>> 3) {
1826
+ case 1:
1827
+ message.id = reader.uint64();
1828
+ break;
1829
+ case 2:
1830
+ message.groupPolicyAddress = reader.string();
1831
+ break;
1832
+ case 3:
1833
+ message.metadata = reader.string();
1834
+ break;
1835
+ case 4:
1836
+ message.proposers.push(reader.string());
1837
+ break;
1838
+ case 5:
1839
+ message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1840
+ break;
1841
+ case 6:
1842
+ message.groupVersion = reader.uint64();
1843
+ break;
1844
+ case 7:
1845
+ message.groupPolicyVersion = reader.uint64();
1846
+ break;
1847
+ case 8:
1848
+ message.status = reader.int32() as any;
1849
+ break;
1850
+ case 9:
1851
+ message.finalTallyResult = TallyResult.decode(reader, reader.uint32());
1852
+ break;
1853
+ case 10:
1854
+ message.votingPeriodEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1855
+ break;
1856
+ case 11:
1857
+ message.executorResult = reader.int32() as any;
1858
+ break;
1859
+ case 12:
1860
+ message.messages.push(Any.decode(reader, reader.uint32()));
1861
+ break;
1862
+ case 13:
1863
+ message.title = reader.string();
1864
+ break;
1865
+ case 14:
1866
+ message.summary = reader.string();
1867
+ break;
1868
+ default:
1869
+ reader.skipType(tag & 7);
1870
+ break;
1871
+ }
1872
+ }
1873
+ return message;
1874
+ },
1875
+ fromPartial(object: Partial<Proposal>): Proposal {
1876
+ const message = createBaseProposal();
1877
+ message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
1878
+ message.groupPolicyAddress = object.groupPolicyAddress ?? "";
1879
+ message.metadata = object.metadata ?? "";
1880
+ message.proposers = object.proposers?.map(e => e) || [];
1881
+ message.submitTime = object.submitTime ?? undefined;
1882
+ message.groupVersion = object.groupVersion !== undefined && object.groupVersion !== null ? BigInt(object.groupVersion.toString()) : BigInt(0);
1883
+ message.groupPolicyVersion = object.groupPolicyVersion !== undefined && object.groupPolicyVersion !== null ? BigInt(object.groupPolicyVersion.toString()) : BigInt(0);
1884
+ message.status = object.status ?? 0;
1885
+ message.finalTallyResult = object.finalTallyResult !== undefined && object.finalTallyResult !== null ? TallyResult.fromPartial(object.finalTallyResult) : undefined;
1886
+ message.votingPeriodEnd = object.votingPeriodEnd ?? undefined;
1887
+ message.executorResult = object.executorResult ?? 0;
1888
+ message.messages = object.messages?.map(e => Any.fromPartial(e)) || [];
1889
+ message.title = object.title ?? "";
1890
+ message.summary = object.summary ?? "";
1891
+ return message;
1892
+ },
1893
+ fromAmino(object: ProposalAmino): Proposal {
1894
+ const message = createBaseProposal();
1895
+ if (object.id !== undefined && object.id !== null) {
1896
+ message.id = BigInt(object.id);
1897
+ }
1898
+ if (object.group_policy_address !== undefined && object.group_policy_address !== null) {
1899
+ message.groupPolicyAddress = object.group_policy_address;
1900
+ }
1901
+ if (object.metadata !== undefined && object.metadata !== null) {
1902
+ message.metadata = object.metadata;
1903
+ }
1904
+ message.proposers = object.proposers?.map(e => e) || [];
1905
+ if (object.submit_time !== undefined && object.submit_time !== null) {
1906
+ message.submitTime = fromTimestamp(Timestamp.fromAmino(object.submit_time));
1907
+ }
1908
+ if (object.group_version !== undefined && object.group_version !== null) {
1909
+ message.groupVersion = BigInt(object.group_version);
1910
+ }
1911
+ if (object.group_policy_version !== undefined && object.group_policy_version !== null) {
1912
+ message.groupPolicyVersion = BigInt(object.group_policy_version);
1913
+ }
1914
+ if (object.status !== undefined && object.status !== null) {
1915
+ message.status = object.status;
1916
+ }
1917
+ if (object.final_tally_result !== undefined && object.final_tally_result !== null) {
1918
+ message.finalTallyResult = TallyResult.fromAmino(object.final_tally_result);
1919
+ }
1920
+ if (object.voting_period_end !== undefined && object.voting_period_end !== null) {
1921
+ message.votingPeriodEnd = fromTimestamp(Timestamp.fromAmino(object.voting_period_end));
1922
+ }
1923
+ if (object.executor_result !== undefined && object.executor_result !== null) {
1924
+ message.executorResult = object.executor_result;
1925
+ }
1926
+ message.messages = object.messages?.map(e => Any.fromAmino(e)) || [];
1927
+ if (object.title !== undefined && object.title !== null) {
1928
+ message.title = object.title;
1929
+ }
1930
+ if (object.summary !== undefined && object.summary !== null) {
1931
+ message.summary = object.summary;
1932
+ }
1933
+ return message;
1934
+ },
1935
+ toAmino(message: Proposal): ProposalAmino {
1936
+ const obj: any = {};
1937
+ obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
1938
+ obj.group_policy_address = message.groupPolicyAddress === "" ? undefined : message.groupPolicyAddress;
1939
+ obj.metadata = message.metadata === "" ? undefined : message.metadata;
1940
+ if (message.proposers) {
1941
+ obj.proposers = message.proposers.map(e => e);
1942
+ } else {
1943
+ obj.proposers = message.proposers;
1944
+ }
1945
+ obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : new Date();
1946
+ obj.group_version = message.groupVersion !== BigInt(0) ? message.groupVersion?.toString() : undefined;
1947
+ obj.group_policy_version = message.groupPolicyVersion !== BigInt(0) ? message.groupPolicyVersion?.toString() : undefined;
1948
+ obj.status = message.status === 0 ? undefined : message.status;
1949
+ obj.final_tally_result = message.finalTallyResult ? TallyResult.toAmino(message.finalTallyResult) : TallyResult.toAmino(TallyResult.fromPartial({}));
1950
+ obj.voting_period_end = message.votingPeriodEnd ? Timestamp.toAmino(toTimestamp(message.votingPeriodEnd)) : new Date();
1951
+ obj.executor_result = message.executorResult === 0 ? undefined : message.executorResult;
1952
+ if (message.messages) {
1953
+ obj.messages = message.messages.map(e => e ? Any.toAmino(e) : undefined);
1954
+ } else {
1955
+ obj.messages = message.messages;
1956
+ }
1957
+ obj.title = message.title === "" ? undefined : message.title;
1958
+ obj.summary = message.summary === "" ? undefined : message.summary;
1959
+ return obj;
1960
+ },
1961
+ fromAminoMsg(object: ProposalAminoMsg): Proposal {
1962
+ return Proposal.fromAmino(object.value);
1963
+ },
1964
+ toAminoMsg(message: Proposal): ProposalAminoMsg {
1965
+ return {
1966
+ type: "cosmos-sdk/Proposal",
1967
+ value: Proposal.toAmino(message)
1968
+ };
1969
+ },
1970
+ fromProtoMsg(message: ProposalProtoMsg): Proposal {
1971
+ return Proposal.decode(message.value);
1972
+ },
1973
+ toProto(message: Proposal): Uint8Array {
1974
+ return Proposal.encode(message).finish();
1975
+ },
1976
+ toProtoMsg(message: Proposal): ProposalProtoMsg {
1977
+ return {
1978
+ typeUrl: "/cosmos.group.v1.Proposal",
1979
+ value: Proposal.encode(message).finish()
1980
+ };
1981
+ }
1982
+ };
1983
+ function createBaseTallyResult(): TallyResult {
1984
+ return {
1985
+ yesCount: "",
1986
+ abstainCount: "",
1987
+ noCount: "",
1988
+ noWithVetoCount: ""
1989
+ };
1990
+ }
1991
+ export const TallyResult = {
1992
+ typeUrl: "/cosmos.group.v1.TallyResult",
1993
+ encode(message: TallyResult, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1994
+ if (message.yesCount !== "") {
1995
+ writer.uint32(10).string(message.yesCount);
1996
+ }
1997
+ if (message.abstainCount !== "") {
1998
+ writer.uint32(18).string(message.abstainCount);
1999
+ }
2000
+ if (message.noCount !== "") {
2001
+ writer.uint32(26).string(message.noCount);
2002
+ }
2003
+ if (message.noWithVetoCount !== "") {
2004
+ writer.uint32(34).string(message.noWithVetoCount);
2005
+ }
2006
+ return writer;
2007
+ },
2008
+ decode(input: BinaryReader | Uint8Array, length?: number): TallyResult {
2009
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2010
+ let end = length === undefined ? reader.len : reader.pos + length;
2011
+ const message = createBaseTallyResult();
2012
+ while (reader.pos < end) {
2013
+ const tag = reader.uint32();
2014
+ switch (tag >>> 3) {
2015
+ case 1:
2016
+ message.yesCount = reader.string();
2017
+ break;
2018
+ case 2:
2019
+ message.abstainCount = reader.string();
2020
+ break;
2021
+ case 3:
2022
+ message.noCount = reader.string();
2023
+ break;
2024
+ case 4:
2025
+ message.noWithVetoCount = reader.string();
2026
+ break;
2027
+ default:
2028
+ reader.skipType(tag & 7);
2029
+ break;
2030
+ }
2031
+ }
2032
+ return message;
2033
+ },
2034
+ fromPartial(object: Partial<TallyResult>): TallyResult {
2035
+ const message = createBaseTallyResult();
2036
+ message.yesCount = object.yesCount ?? "";
2037
+ message.abstainCount = object.abstainCount ?? "";
2038
+ message.noCount = object.noCount ?? "";
2039
+ message.noWithVetoCount = object.noWithVetoCount ?? "";
2040
+ return message;
2041
+ },
2042
+ fromAmino(object: TallyResultAmino): TallyResult {
2043
+ const message = createBaseTallyResult();
2044
+ if (object.yes_count !== undefined && object.yes_count !== null) {
2045
+ message.yesCount = object.yes_count;
2046
+ }
2047
+ if (object.abstain_count !== undefined && object.abstain_count !== null) {
2048
+ message.abstainCount = object.abstain_count;
2049
+ }
2050
+ if (object.no_count !== undefined && object.no_count !== null) {
2051
+ message.noCount = object.no_count;
2052
+ }
2053
+ if (object.no_with_veto_count !== undefined && object.no_with_veto_count !== null) {
2054
+ message.noWithVetoCount = object.no_with_veto_count;
2055
+ }
2056
+ return message;
2057
+ },
2058
+ toAmino(message: TallyResult): TallyResultAmino {
2059
+ const obj: any = {};
2060
+ obj.yes_count = message.yesCount === "" ? undefined : message.yesCount;
2061
+ obj.abstain_count = message.abstainCount === "" ? undefined : message.abstainCount;
2062
+ obj.no_count = message.noCount === "" ? undefined : message.noCount;
2063
+ obj.no_with_veto_count = message.noWithVetoCount === "" ? undefined : message.noWithVetoCount;
2064
+ return obj;
2065
+ },
2066
+ fromAminoMsg(object: TallyResultAminoMsg): TallyResult {
2067
+ return TallyResult.fromAmino(object.value);
2068
+ },
2069
+ toAminoMsg(message: TallyResult): TallyResultAminoMsg {
2070
+ return {
2071
+ type: "cosmos-sdk/TallyResult",
2072
+ value: TallyResult.toAmino(message)
2073
+ };
2074
+ },
2075
+ fromProtoMsg(message: TallyResultProtoMsg): TallyResult {
2076
+ return TallyResult.decode(message.value);
2077
+ },
2078
+ toProto(message: TallyResult): Uint8Array {
2079
+ return TallyResult.encode(message).finish();
2080
+ },
2081
+ toProtoMsg(message: TallyResult): TallyResultProtoMsg {
2082
+ return {
2083
+ typeUrl: "/cosmos.group.v1.TallyResult",
2084
+ value: TallyResult.encode(message).finish()
2085
+ };
2086
+ }
2087
+ };
2088
+ function createBaseVote(): Vote {
2089
+ return {
2090
+ proposalId: BigInt(0),
2091
+ voter: "",
2092
+ option: 0,
2093
+ metadata: "",
2094
+ submitTime: new Date()
2095
+ };
2096
+ }
2097
+ export const Vote = {
2098
+ typeUrl: "/cosmos.group.v1.Vote",
2099
+ encode(message: Vote, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2100
+ if (message.proposalId !== BigInt(0)) {
2101
+ writer.uint32(8).uint64(message.proposalId);
2102
+ }
2103
+ if (message.voter !== "") {
2104
+ writer.uint32(18).string(message.voter);
2105
+ }
2106
+ if (message.option !== 0) {
2107
+ writer.uint32(24).int32(message.option);
2108
+ }
2109
+ if (message.metadata !== "") {
2110
+ writer.uint32(34).string(message.metadata);
2111
+ }
2112
+ if (message.submitTime !== undefined) {
2113
+ Timestamp.encode(toTimestamp(message.submitTime), writer.uint32(42).fork()).ldelim();
2114
+ }
2115
+ return writer;
2116
+ },
2117
+ decode(input: BinaryReader | Uint8Array, length?: number): Vote {
2118
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2119
+ let end = length === undefined ? reader.len : reader.pos + length;
2120
+ const message = createBaseVote();
2121
+ while (reader.pos < end) {
2122
+ const tag = reader.uint32();
2123
+ switch (tag >>> 3) {
2124
+ case 1:
2125
+ message.proposalId = reader.uint64();
2126
+ break;
2127
+ case 2:
2128
+ message.voter = reader.string();
2129
+ break;
2130
+ case 3:
2131
+ message.option = reader.int32() as any;
2132
+ break;
2133
+ case 4:
2134
+ message.metadata = reader.string();
2135
+ break;
2136
+ case 5:
2137
+ message.submitTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2138
+ break;
2139
+ default:
2140
+ reader.skipType(tag & 7);
2141
+ break;
2142
+ }
2143
+ }
2144
+ return message;
2145
+ },
2146
+ fromPartial(object: Partial<Vote>): Vote {
2147
+ const message = createBaseVote();
2148
+ message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
2149
+ message.voter = object.voter ?? "";
2150
+ message.option = object.option ?? 0;
2151
+ message.metadata = object.metadata ?? "";
2152
+ message.submitTime = object.submitTime ?? undefined;
2153
+ return message;
2154
+ },
2155
+ fromAmino(object: VoteAmino): Vote {
2156
+ const message = createBaseVote();
2157
+ if (object.proposal_id !== undefined && object.proposal_id !== null) {
2158
+ message.proposalId = BigInt(object.proposal_id);
2159
+ }
2160
+ if (object.voter !== undefined && object.voter !== null) {
2161
+ message.voter = object.voter;
2162
+ }
2163
+ if (object.option !== undefined && object.option !== null) {
2164
+ message.option = object.option;
2165
+ }
2166
+ if (object.metadata !== undefined && object.metadata !== null) {
2167
+ message.metadata = object.metadata;
2168
+ }
2169
+ if (object.submit_time !== undefined && object.submit_time !== null) {
2170
+ message.submitTime = fromTimestamp(Timestamp.fromAmino(object.submit_time));
2171
+ }
2172
+ return message;
2173
+ },
2174
+ toAmino(message: Vote): VoteAmino {
2175
+ const obj: any = {};
2176
+ obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
2177
+ obj.voter = message.voter === "" ? undefined : message.voter;
2178
+ obj.option = message.option === 0 ? undefined : message.option;
2179
+ obj.metadata = message.metadata === "" ? undefined : message.metadata;
2180
+ obj.submit_time = message.submitTime ? Timestamp.toAmino(toTimestamp(message.submitTime)) : new Date();
2181
+ return obj;
2182
+ },
2183
+ fromAminoMsg(object: VoteAminoMsg): Vote {
2184
+ return Vote.fromAmino(object.value);
2185
+ },
2186
+ toAminoMsg(message: Vote): VoteAminoMsg {
2187
+ return {
2188
+ type: "cosmos-sdk/Vote",
2189
+ value: Vote.toAmino(message)
2190
+ };
2191
+ },
2192
+ fromProtoMsg(message: VoteProtoMsg): Vote {
2193
+ return Vote.decode(message.value);
2194
+ },
2195
+ toProto(message: Vote): Uint8Array {
2196
+ return Vote.encode(message).finish();
2197
+ },
2198
+ toProtoMsg(message: Vote): VoteProtoMsg {
2199
+ return {
2200
+ typeUrl: "/cosmos.group.v1.Vote",
2201
+ value: Vote.encode(message).finish()
2202
+ };
2203
+ }
2204
+ };
2205
+ export const Cosmos_groupv1DecisionPolicy_InterfaceDecoder = (input: BinaryReader | Uint8Array): ThresholdDecisionPolicy | PercentageDecisionPolicy | Any => {
2206
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2207
+ const data = Any.decode(reader, reader.uint32());
2208
+ switch (data.typeUrl) {
2209
+ case "/cosmos.group.v1.ThresholdDecisionPolicy":
2210
+ return ThresholdDecisionPolicy.decode(data.value);
2211
+ case "/cosmos.group.v1.PercentageDecisionPolicy":
2212
+ return PercentageDecisionPolicy.decode(data.value);
2213
+ default:
2214
+ return data;
2215
+ }
2216
+ };
2217
+ export const Cosmos_groupv1DecisionPolicy_FromAmino = (content: AnyAmino): Any => {
2218
+ switch (content.type) {
2219
+ case "cosmos-sdk/ThresholdDecisionPolicy":
2220
+ return Any.fromPartial({
2221
+ typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy",
2222
+ value: ThresholdDecisionPolicy.encode(ThresholdDecisionPolicy.fromPartial(ThresholdDecisionPolicy.fromAmino(content.value))).finish()
2223
+ });
2224
+ case "cosmos-sdk/PercentageDecisionPolicy":
2225
+ return Any.fromPartial({
2226
+ typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy",
2227
+ value: PercentageDecisionPolicy.encode(PercentageDecisionPolicy.fromPartial(PercentageDecisionPolicy.fromAmino(content.value))).finish()
2228
+ });
2229
+ default:
2230
+ return Any.fromAmino(content);
2231
+ }
2232
+ };
2233
+ export const Cosmos_groupv1DecisionPolicy_ToAmino = (content: Any) => {
2234
+ switch (content.typeUrl) {
2235
+ case "/cosmos.group.v1.ThresholdDecisionPolicy":
2236
+ return {
2237
+ type: "cosmos-sdk/ThresholdDecisionPolicy",
2238
+ value: ThresholdDecisionPolicy.toAmino(ThresholdDecisionPolicy.decode(content.value, undefined))
2239
+ };
2240
+ case "/cosmos.group.v1.PercentageDecisionPolicy":
2241
+ return {
2242
+ type: "cosmos-sdk/PercentageDecisionPolicy",
2243
+ value: PercentageDecisionPolicy.toAmino(PercentageDecisionPolicy.decode(content.value, undefined))
2244
+ };
2245
+ default:
2246
+ return Any.toAmino(content);
2247
+ }
2248
+ };