@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,3193 @@
1
+ //@ts-nocheck
2
+ import { Header, HeaderAmino, HeaderSDKType } from "../../../tendermint/types/types";
3
+ import { Timestamp } from "../../../google/protobuf/timestamp";
4
+ import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
5
+ import { Duration, DurationAmino, DurationSDKType } from "../../../google/protobuf/duration";
6
+ import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin";
7
+ import { ValidatorUpdate, ValidatorUpdateAmino, ValidatorUpdateSDKType } from "../../../tendermint/abci/types";
8
+ import { BinaryReader, BinaryWriter } from "../../../binary";
9
+ import { Decimal } from "@cosmjs/math";
10
+ import { toTimestamp, fromTimestamp } from "../../../helpers";
11
+ import { encodePubkey, decodePubkey } from "@cosmjs/proto-signing";
12
+ import { Pubkey } from "@cosmjs/amino";
13
+ /** BondStatus is the status of a validator. */
14
+ export enum BondStatus {
15
+ /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */
16
+ BOND_STATUS_UNSPECIFIED = 0,
17
+ /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */
18
+ BOND_STATUS_UNBONDED = 1,
19
+ /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */
20
+ BOND_STATUS_UNBONDING = 2,
21
+ /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */
22
+ BOND_STATUS_BONDED = 3,
23
+ UNRECOGNIZED = -1,
24
+ }
25
+ export const BondStatusSDKType = BondStatus;
26
+ export const BondStatusAmino = BondStatus;
27
+ export function bondStatusFromJSON(object: any): BondStatus {
28
+ switch (object) {
29
+ case 0:
30
+ case "BOND_STATUS_UNSPECIFIED":
31
+ return BondStatus.BOND_STATUS_UNSPECIFIED;
32
+ case 1:
33
+ case "BOND_STATUS_UNBONDED":
34
+ return BondStatus.BOND_STATUS_UNBONDED;
35
+ case 2:
36
+ case "BOND_STATUS_UNBONDING":
37
+ return BondStatus.BOND_STATUS_UNBONDING;
38
+ case 3:
39
+ case "BOND_STATUS_BONDED":
40
+ return BondStatus.BOND_STATUS_BONDED;
41
+ case -1:
42
+ case "UNRECOGNIZED":
43
+ default:
44
+ return BondStatus.UNRECOGNIZED;
45
+ }
46
+ }
47
+ export function bondStatusToJSON(object: BondStatus): string {
48
+ switch (object) {
49
+ case BondStatus.BOND_STATUS_UNSPECIFIED:
50
+ return "BOND_STATUS_UNSPECIFIED";
51
+ case BondStatus.BOND_STATUS_UNBONDED:
52
+ return "BOND_STATUS_UNBONDED";
53
+ case BondStatus.BOND_STATUS_UNBONDING:
54
+ return "BOND_STATUS_UNBONDING";
55
+ case BondStatus.BOND_STATUS_BONDED:
56
+ return "BOND_STATUS_BONDED";
57
+ case BondStatus.UNRECOGNIZED:
58
+ default:
59
+ return "UNRECOGNIZED";
60
+ }
61
+ }
62
+ /** Infraction indicates the infraction a validator commited. */
63
+ export enum Infraction {
64
+ /** INFRACTION_UNSPECIFIED - UNSPECIFIED defines an empty infraction. */
65
+ INFRACTION_UNSPECIFIED = 0,
66
+ /** INFRACTION_DOUBLE_SIGN - DOUBLE_SIGN defines a validator that double-signs a block. */
67
+ INFRACTION_DOUBLE_SIGN = 1,
68
+ /** INFRACTION_DOWNTIME - DOWNTIME defines a validator that missed signing too many blocks. */
69
+ INFRACTION_DOWNTIME = 2,
70
+ UNRECOGNIZED = -1,
71
+ }
72
+ export const InfractionSDKType = Infraction;
73
+ export const InfractionAmino = Infraction;
74
+ export function infractionFromJSON(object: any): Infraction {
75
+ switch (object) {
76
+ case 0:
77
+ case "INFRACTION_UNSPECIFIED":
78
+ return Infraction.INFRACTION_UNSPECIFIED;
79
+ case 1:
80
+ case "INFRACTION_DOUBLE_SIGN":
81
+ return Infraction.INFRACTION_DOUBLE_SIGN;
82
+ case 2:
83
+ case "INFRACTION_DOWNTIME":
84
+ return Infraction.INFRACTION_DOWNTIME;
85
+ case -1:
86
+ case "UNRECOGNIZED":
87
+ default:
88
+ return Infraction.UNRECOGNIZED;
89
+ }
90
+ }
91
+ export function infractionToJSON(object: Infraction): string {
92
+ switch (object) {
93
+ case Infraction.INFRACTION_UNSPECIFIED:
94
+ return "INFRACTION_UNSPECIFIED";
95
+ case Infraction.INFRACTION_DOUBLE_SIGN:
96
+ return "INFRACTION_DOUBLE_SIGN";
97
+ case Infraction.INFRACTION_DOWNTIME:
98
+ return "INFRACTION_DOWNTIME";
99
+ case Infraction.UNRECOGNIZED:
100
+ default:
101
+ return "UNRECOGNIZED";
102
+ }
103
+ }
104
+ /**
105
+ * HistoricalInfo contains header and validator information for a given block.
106
+ * It is stored as part of staking module's state, which persists the `n` most
107
+ * recent HistoricalInfo
108
+ * (`n` is set by the staking module's `historical_entries` parameter).
109
+ */
110
+ export interface HistoricalInfo {
111
+ header: Header;
112
+ valset: Validator[];
113
+ }
114
+ export interface HistoricalInfoProtoMsg {
115
+ typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo";
116
+ value: Uint8Array;
117
+ }
118
+ /**
119
+ * HistoricalInfo contains header and validator information for a given block.
120
+ * It is stored as part of staking module's state, which persists the `n` most
121
+ * recent HistoricalInfo
122
+ * (`n` is set by the staking module's `historical_entries` parameter).
123
+ * @name HistoricalInfoAmino
124
+ * @package cosmos.staking.v1beta1
125
+ * @see proto type: cosmos.staking.v1beta1.HistoricalInfo
126
+ */
127
+ export interface HistoricalInfoAmino {
128
+ header: HeaderAmino;
129
+ valset: ValidatorAmino[];
130
+ }
131
+ export interface HistoricalInfoAminoMsg {
132
+ type: "cosmos-sdk/HistoricalInfo";
133
+ value: HistoricalInfoAmino;
134
+ }
135
+ /**
136
+ * HistoricalInfo contains header and validator information for a given block.
137
+ * It is stored as part of staking module's state, which persists the `n` most
138
+ * recent HistoricalInfo
139
+ * (`n` is set by the staking module's `historical_entries` parameter).
140
+ */
141
+ export interface HistoricalInfoSDKType {
142
+ header: HeaderSDKType;
143
+ valset: ValidatorSDKType[];
144
+ }
145
+ /**
146
+ * CommissionRates defines the initial commission rates to be used for creating
147
+ * a validator.
148
+ */
149
+ export interface CommissionRates {
150
+ /** rate is the commission rate charged to delegators, as a fraction. */
151
+ rate: string;
152
+ /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */
153
+ maxRate: string;
154
+ /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */
155
+ maxChangeRate: string;
156
+ }
157
+ export interface CommissionRatesProtoMsg {
158
+ typeUrl: "/cosmos.staking.v1beta1.CommissionRates";
159
+ value: Uint8Array;
160
+ }
161
+ /**
162
+ * CommissionRates defines the initial commission rates to be used for creating
163
+ * a validator.
164
+ * @name CommissionRatesAmino
165
+ * @package cosmos.staking.v1beta1
166
+ * @see proto type: cosmos.staking.v1beta1.CommissionRates
167
+ */
168
+ export interface CommissionRatesAmino {
169
+ /**
170
+ * rate is the commission rate charged to delegators, as a fraction.
171
+ */
172
+ rate: string;
173
+ /**
174
+ * max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
175
+ */
176
+ max_rate: string;
177
+ /**
178
+ * max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
179
+ */
180
+ max_change_rate: string;
181
+ }
182
+ export interface CommissionRatesAminoMsg {
183
+ type: "cosmos-sdk/CommissionRates";
184
+ value: CommissionRatesAmino;
185
+ }
186
+ /**
187
+ * CommissionRates defines the initial commission rates to be used for creating
188
+ * a validator.
189
+ */
190
+ export interface CommissionRatesSDKType {
191
+ rate: string;
192
+ max_rate: string;
193
+ max_change_rate: string;
194
+ }
195
+ /** Commission defines commission parameters for a given validator. */
196
+ export interface Commission {
197
+ /** commission_rates defines the initial commission rates to be used for creating a validator. */
198
+ commissionRates: CommissionRates;
199
+ /** update_time is the last time the commission rate was changed. */
200
+ updateTime: Date;
201
+ }
202
+ export interface CommissionProtoMsg {
203
+ typeUrl: "/cosmos.staking.v1beta1.Commission";
204
+ value: Uint8Array;
205
+ }
206
+ /**
207
+ * Commission defines commission parameters for a given validator.
208
+ * @name CommissionAmino
209
+ * @package cosmos.staking.v1beta1
210
+ * @see proto type: cosmos.staking.v1beta1.Commission
211
+ */
212
+ export interface CommissionAmino {
213
+ /**
214
+ * commission_rates defines the initial commission rates to be used for creating a validator.
215
+ */
216
+ commission_rates: CommissionRatesAmino;
217
+ /**
218
+ * update_time is the last time the commission rate was changed.
219
+ */
220
+ update_time: string;
221
+ }
222
+ export interface CommissionAminoMsg {
223
+ type: "cosmos-sdk/Commission";
224
+ value: CommissionAmino;
225
+ }
226
+ /** Commission defines commission parameters for a given validator. */
227
+ export interface CommissionSDKType {
228
+ commission_rates: CommissionRatesSDKType;
229
+ update_time: Date;
230
+ }
231
+ /** Description defines a validator description. */
232
+ export interface Description {
233
+ /** moniker defines a human-readable name for the validator. */
234
+ moniker: string;
235
+ /** identity defines an optional identity signature (ex. UPort or Keybase). */
236
+ identity: string;
237
+ /** website defines an optional website link. */
238
+ website: string;
239
+ /** security_contact defines an optional email for security contact. */
240
+ securityContact: string;
241
+ /** details define other optional details. */
242
+ details: string;
243
+ }
244
+ export interface DescriptionProtoMsg {
245
+ typeUrl: "/cosmos.staking.v1beta1.Description";
246
+ value: Uint8Array;
247
+ }
248
+ /**
249
+ * Description defines a validator description.
250
+ * @name DescriptionAmino
251
+ * @package cosmos.staking.v1beta1
252
+ * @see proto type: cosmos.staking.v1beta1.Description
253
+ */
254
+ export interface DescriptionAmino {
255
+ /**
256
+ * moniker defines a human-readable name for the validator.
257
+ */
258
+ moniker?: string;
259
+ /**
260
+ * identity defines an optional identity signature (ex. UPort or Keybase).
261
+ */
262
+ identity?: string;
263
+ /**
264
+ * website defines an optional website link.
265
+ */
266
+ website?: string;
267
+ /**
268
+ * security_contact defines an optional email for security contact.
269
+ */
270
+ security_contact?: string;
271
+ /**
272
+ * details define other optional details.
273
+ */
274
+ details?: string;
275
+ }
276
+ export interface DescriptionAminoMsg {
277
+ type: "cosmos-sdk/Description";
278
+ value: DescriptionAmino;
279
+ }
280
+ /** Description defines a validator description. */
281
+ export interface DescriptionSDKType {
282
+ moniker: string;
283
+ identity: string;
284
+ website: string;
285
+ security_contact: string;
286
+ details: string;
287
+ }
288
+ /**
289
+ * Validator defines a validator, together with the total amount of the
290
+ * Validator's bond shares and their exchange rate to coins. Slashing results in
291
+ * a decrease in the exchange rate, allowing correct calculation of future
292
+ * undelegations without iterating over delegators. When coins are delegated to
293
+ * this validator, the validator is credited with a delegation whose number of
294
+ * bond shares is based on the amount of coins delegated divided by the current
295
+ * exchange rate. Voting power can be calculated as total bonded shares
296
+ * multiplied by exchange rate.
297
+ */
298
+ export interface Validator {
299
+ /** operator_address defines the address of the validator's operator; bech encoded in JSON. */
300
+ operatorAddress: string;
301
+ /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */
302
+ consensusPubkey?: Any | undefined;
303
+ /** jailed defined whether the validator has been jailed from bonded status or not. */
304
+ jailed: boolean;
305
+ /** status is the validator status (bonded/unbonding/unbonded). */
306
+ status: BondStatus;
307
+ /** tokens define the delegated tokens (incl. self-delegation). */
308
+ tokens: string;
309
+ /** delegator_shares defines total shares issued to a validator's delegators. */
310
+ delegatorShares: string;
311
+ /** description defines the description terms for the validator. */
312
+ description: Description;
313
+ /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */
314
+ unbondingHeight: bigint;
315
+ /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */
316
+ unbondingTime: Date;
317
+ /** commission defines the commission parameters. */
318
+ commission: Commission;
319
+ /** min_self_delegation is the validator's self declared minimum self delegation. */
320
+ minSelfDelegation: string;
321
+ /** strictly positive if this validator's unbonding has been stopped by external modules */
322
+ unbondingOnHoldRefCount: bigint;
323
+ /** list of unbonding ids, each uniquely identifing an unbonding of this validator */
324
+ unbondingIds: bigint[];
325
+ }
326
+ export interface ValidatorProtoMsg {
327
+ typeUrl: "/cosmos.staking.v1beta1.Validator";
328
+ value: Uint8Array;
329
+ }
330
+ export type ValidatorEncoded = Omit<Validator, "consensusPubkey"> & {
331
+ /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */consensusPubkey?: AnyProtoMsg | undefined;
332
+ };
333
+ /**
334
+ * Validator defines a validator, together with the total amount of the
335
+ * Validator's bond shares and their exchange rate to coins. Slashing results in
336
+ * a decrease in the exchange rate, allowing correct calculation of future
337
+ * undelegations without iterating over delegators. When coins are delegated to
338
+ * this validator, the validator is credited with a delegation whose number of
339
+ * bond shares is based on the amount of coins delegated divided by the current
340
+ * exchange rate. Voting power can be calculated as total bonded shares
341
+ * multiplied by exchange rate.
342
+ * @name ValidatorAmino
343
+ * @package cosmos.staking.v1beta1
344
+ * @see proto type: cosmos.staking.v1beta1.Validator
345
+ */
346
+ export interface ValidatorAmino {
347
+ /**
348
+ * operator_address defines the address of the validator's operator; bech encoded in JSON.
349
+ */
350
+ operator_address?: string;
351
+ /**
352
+ * consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
353
+ */
354
+ consensus_pubkey?: AnyAmino;
355
+ /**
356
+ * jailed defined whether the validator has been jailed from bonded status or not.
357
+ */
358
+ jailed?: boolean;
359
+ /**
360
+ * status is the validator status (bonded/unbonding/unbonded).
361
+ */
362
+ status?: BondStatus;
363
+ /**
364
+ * tokens define the delegated tokens (incl. self-delegation).
365
+ */
366
+ tokens?: string;
367
+ /**
368
+ * delegator_shares defines total shares issued to a validator's delegators.
369
+ */
370
+ delegator_shares?: string;
371
+ /**
372
+ * description defines the description terms for the validator.
373
+ */
374
+ description: DescriptionAmino;
375
+ /**
376
+ * unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
377
+ */
378
+ unbonding_height?: string;
379
+ /**
380
+ * unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
381
+ */
382
+ unbonding_time: string;
383
+ /**
384
+ * commission defines the commission parameters.
385
+ */
386
+ commission: CommissionAmino;
387
+ /**
388
+ * min_self_delegation is the validator's self declared minimum self delegation.
389
+ */
390
+ min_self_delegation?: string;
391
+ /**
392
+ * strictly positive if this validator's unbonding has been stopped by external modules
393
+ */
394
+ unbonding_on_hold_ref_count?: string;
395
+ /**
396
+ * list of unbonding ids, each uniquely identifing an unbonding of this validator
397
+ */
398
+ unbonding_ids?: string[];
399
+ }
400
+ export interface ValidatorAminoMsg {
401
+ type: "cosmos-sdk/Validator";
402
+ value: ValidatorAmino;
403
+ }
404
+ /**
405
+ * Validator defines a validator, together with the total amount of the
406
+ * Validator's bond shares and their exchange rate to coins. Slashing results in
407
+ * a decrease in the exchange rate, allowing correct calculation of future
408
+ * undelegations without iterating over delegators. When coins are delegated to
409
+ * this validator, the validator is credited with a delegation whose number of
410
+ * bond shares is based on the amount of coins delegated divided by the current
411
+ * exchange rate. Voting power can be calculated as total bonded shares
412
+ * multiplied by exchange rate.
413
+ */
414
+ export interface ValidatorSDKType {
415
+ operator_address: string;
416
+ consensus_pubkey?: AnySDKType | undefined;
417
+ jailed: boolean;
418
+ status: BondStatus;
419
+ tokens: string;
420
+ delegator_shares: string;
421
+ description: DescriptionSDKType;
422
+ unbonding_height: bigint;
423
+ unbonding_time: Date;
424
+ commission: CommissionSDKType;
425
+ min_self_delegation: string;
426
+ unbonding_on_hold_ref_count: bigint;
427
+ unbonding_ids: bigint[];
428
+ }
429
+ /** ValAddresses defines a repeated set of validator addresses. */
430
+ export interface ValAddresses {
431
+ addresses: string[];
432
+ }
433
+ export interface ValAddressesProtoMsg {
434
+ typeUrl: "/cosmos.staking.v1beta1.ValAddresses";
435
+ value: Uint8Array;
436
+ }
437
+ /**
438
+ * ValAddresses defines a repeated set of validator addresses.
439
+ * @name ValAddressesAmino
440
+ * @package cosmos.staking.v1beta1
441
+ * @see proto type: cosmos.staking.v1beta1.ValAddresses
442
+ */
443
+ export interface ValAddressesAmino {
444
+ addresses?: string[];
445
+ }
446
+ export interface ValAddressesAminoMsg {
447
+ type: "cosmos-sdk/ValAddresses";
448
+ value: ValAddressesAmino;
449
+ }
450
+ /** ValAddresses defines a repeated set of validator addresses. */
451
+ export interface ValAddressesSDKType {
452
+ addresses: string[];
453
+ }
454
+ /**
455
+ * DVPair is struct that just has a delegator-validator pair with no other data.
456
+ * It is intended to be used as a marshalable pointer. For example, a DVPair can
457
+ * be used to construct the key to getting an UnbondingDelegation from state.
458
+ */
459
+ export interface DVPair {
460
+ delegatorAddress: string;
461
+ validatorAddress: string;
462
+ }
463
+ export interface DVPairProtoMsg {
464
+ typeUrl: "/cosmos.staking.v1beta1.DVPair";
465
+ value: Uint8Array;
466
+ }
467
+ /**
468
+ * DVPair is struct that just has a delegator-validator pair with no other data.
469
+ * It is intended to be used as a marshalable pointer. For example, a DVPair can
470
+ * be used to construct the key to getting an UnbondingDelegation from state.
471
+ * @name DVPairAmino
472
+ * @package cosmos.staking.v1beta1
473
+ * @see proto type: cosmos.staking.v1beta1.DVPair
474
+ */
475
+ export interface DVPairAmino {
476
+ delegator_address?: string;
477
+ validator_address?: string;
478
+ }
479
+ export interface DVPairAminoMsg {
480
+ type: "cosmos-sdk/DVPair";
481
+ value: DVPairAmino;
482
+ }
483
+ /**
484
+ * DVPair is struct that just has a delegator-validator pair with no other data.
485
+ * It is intended to be used as a marshalable pointer. For example, a DVPair can
486
+ * be used to construct the key to getting an UnbondingDelegation from state.
487
+ */
488
+ export interface DVPairSDKType {
489
+ delegator_address: string;
490
+ validator_address: string;
491
+ }
492
+ /** DVPairs defines an array of DVPair objects. */
493
+ export interface DVPairs {
494
+ pairs: DVPair[];
495
+ }
496
+ export interface DVPairsProtoMsg {
497
+ typeUrl: "/cosmos.staking.v1beta1.DVPairs";
498
+ value: Uint8Array;
499
+ }
500
+ /**
501
+ * DVPairs defines an array of DVPair objects.
502
+ * @name DVPairsAmino
503
+ * @package cosmos.staking.v1beta1
504
+ * @see proto type: cosmos.staking.v1beta1.DVPairs
505
+ */
506
+ export interface DVPairsAmino {
507
+ pairs: DVPairAmino[];
508
+ }
509
+ export interface DVPairsAminoMsg {
510
+ type: "cosmos-sdk/DVPairs";
511
+ value: DVPairsAmino;
512
+ }
513
+ /** DVPairs defines an array of DVPair objects. */
514
+ export interface DVPairsSDKType {
515
+ pairs: DVPairSDKType[];
516
+ }
517
+ /**
518
+ * DVVTriplet is struct that just has a delegator-validator-validator triplet
519
+ * with no other data. It is intended to be used as a marshalable pointer. For
520
+ * example, a DVVTriplet can be used to construct the key to getting a
521
+ * Redelegation from state.
522
+ */
523
+ export interface DVVTriplet {
524
+ delegatorAddress: string;
525
+ validatorSrcAddress: string;
526
+ validatorDstAddress: string;
527
+ }
528
+ export interface DVVTripletProtoMsg {
529
+ typeUrl: "/cosmos.staking.v1beta1.DVVTriplet";
530
+ value: Uint8Array;
531
+ }
532
+ /**
533
+ * DVVTriplet is struct that just has a delegator-validator-validator triplet
534
+ * with no other data. It is intended to be used as a marshalable pointer. For
535
+ * example, a DVVTriplet can be used to construct the key to getting a
536
+ * Redelegation from state.
537
+ * @name DVVTripletAmino
538
+ * @package cosmos.staking.v1beta1
539
+ * @see proto type: cosmos.staking.v1beta1.DVVTriplet
540
+ */
541
+ export interface DVVTripletAmino {
542
+ delegator_address?: string;
543
+ validator_src_address?: string;
544
+ validator_dst_address?: string;
545
+ }
546
+ export interface DVVTripletAminoMsg {
547
+ type: "cosmos-sdk/DVVTriplet";
548
+ value: DVVTripletAmino;
549
+ }
550
+ /**
551
+ * DVVTriplet is struct that just has a delegator-validator-validator triplet
552
+ * with no other data. It is intended to be used as a marshalable pointer. For
553
+ * example, a DVVTriplet can be used to construct the key to getting a
554
+ * Redelegation from state.
555
+ */
556
+ export interface DVVTripletSDKType {
557
+ delegator_address: string;
558
+ validator_src_address: string;
559
+ validator_dst_address: string;
560
+ }
561
+ /** DVVTriplets defines an array of DVVTriplet objects. */
562
+ export interface DVVTriplets {
563
+ triplets: DVVTriplet[];
564
+ }
565
+ export interface DVVTripletsProtoMsg {
566
+ typeUrl: "/cosmos.staking.v1beta1.DVVTriplets";
567
+ value: Uint8Array;
568
+ }
569
+ /**
570
+ * DVVTriplets defines an array of DVVTriplet objects.
571
+ * @name DVVTripletsAmino
572
+ * @package cosmos.staking.v1beta1
573
+ * @see proto type: cosmos.staking.v1beta1.DVVTriplets
574
+ */
575
+ export interface DVVTripletsAmino {
576
+ triplets: DVVTripletAmino[];
577
+ }
578
+ export interface DVVTripletsAminoMsg {
579
+ type: "cosmos-sdk/DVVTriplets";
580
+ value: DVVTripletsAmino;
581
+ }
582
+ /** DVVTriplets defines an array of DVVTriplet objects. */
583
+ export interface DVVTripletsSDKType {
584
+ triplets: DVVTripletSDKType[];
585
+ }
586
+ /**
587
+ * Delegation represents the bond with tokens held by an account. It is
588
+ * owned by one delegator, and is associated with the voting power of one
589
+ * validator.
590
+ */
591
+ export interface Delegation {
592
+ /** delegator_address is the encoded address of the delegator. */
593
+ delegatorAddress: string;
594
+ /** validator_address is the encoded address of the validator. */
595
+ validatorAddress: string;
596
+ /** shares define the delegation shares received. */
597
+ shares: string;
598
+ }
599
+ export interface DelegationProtoMsg {
600
+ typeUrl: "/cosmos.staking.v1beta1.Delegation";
601
+ value: Uint8Array;
602
+ }
603
+ /**
604
+ * Delegation represents the bond with tokens held by an account. It is
605
+ * owned by one delegator, and is associated with the voting power of one
606
+ * validator.
607
+ * @name DelegationAmino
608
+ * @package cosmos.staking.v1beta1
609
+ * @see proto type: cosmos.staking.v1beta1.Delegation
610
+ */
611
+ export interface DelegationAmino {
612
+ /**
613
+ * delegator_address is the encoded address of the delegator.
614
+ */
615
+ delegator_address?: string;
616
+ /**
617
+ * validator_address is the encoded address of the validator.
618
+ */
619
+ validator_address?: string;
620
+ /**
621
+ * shares define the delegation shares received.
622
+ */
623
+ shares?: string;
624
+ }
625
+ export interface DelegationAminoMsg {
626
+ type: "cosmos-sdk/Delegation";
627
+ value: DelegationAmino;
628
+ }
629
+ /**
630
+ * Delegation represents the bond with tokens held by an account. It is
631
+ * owned by one delegator, and is associated with the voting power of one
632
+ * validator.
633
+ */
634
+ export interface DelegationSDKType {
635
+ delegator_address: string;
636
+ validator_address: string;
637
+ shares: string;
638
+ }
639
+ /**
640
+ * UnbondingDelegation stores all of a single delegator's unbonding bonds
641
+ * for a single validator in an time-ordered list.
642
+ */
643
+ export interface UnbondingDelegation {
644
+ /** delegator_address is the encoded address of the delegator. */
645
+ delegatorAddress: string;
646
+ /** validator_address is the encoded address of the validator. */
647
+ validatorAddress: string;
648
+ /** entries are the unbonding delegation entries. */
649
+ entries: UnbondingDelegationEntry[];
650
+ }
651
+ export interface UnbondingDelegationProtoMsg {
652
+ typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation";
653
+ value: Uint8Array;
654
+ }
655
+ /**
656
+ * UnbondingDelegation stores all of a single delegator's unbonding bonds
657
+ * for a single validator in an time-ordered list.
658
+ * @name UnbondingDelegationAmino
659
+ * @package cosmos.staking.v1beta1
660
+ * @see proto type: cosmos.staking.v1beta1.UnbondingDelegation
661
+ */
662
+ export interface UnbondingDelegationAmino {
663
+ /**
664
+ * delegator_address is the encoded address of the delegator.
665
+ */
666
+ delegator_address?: string;
667
+ /**
668
+ * validator_address is the encoded address of the validator.
669
+ */
670
+ validator_address?: string;
671
+ /**
672
+ * entries are the unbonding delegation entries.
673
+ */
674
+ entries: UnbondingDelegationEntryAmino[];
675
+ }
676
+ export interface UnbondingDelegationAminoMsg {
677
+ type: "cosmos-sdk/UnbondingDelegation";
678
+ value: UnbondingDelegationAmino;
679
+ }
680
+ /**
681
+ * UnbondingDelegation stores all of a single delegator's unbonding bonds
682
+ * for a single validator in an time-ordered list.
683
+ */
684
+ export interface UnbondingDelegationSDKType {
685
+ delegator_address: string;
686
+ validator_address: string;
687
+ entries: UnbondingDelegationEntrySDKType[];
688
+ }
689
+ /** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */
690
+ export interface UnbondingDelegationEntry {
691
+ /** creation_height is the height which the unbonding took place. */
692
+ creationHeight: bigint;
693
+ /** completion_time is the unix time for unbonding completion. */
694
+ completionTime: Date;
695
+ /** initial_balance defines the tokens initially scheduled to receive at completion. */
696
+ initialBalance: string;
697
+ /** balance defines the tokens to receive at completion. */
698
+ balance: string;
699
+ /** Incrementing id that uniquely identifies this entry */
700
+ unbondingId: bigint;
701
+ /** Strictly positive if this entry's unbonding has been stopped by external modules */
702
+ unbondingOnHoldRefCount: bigint;
703
+ }
704
+ export interface UnbondingDelegationEntryProtoMsg {
705
+ typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry";
706
+ value: Uint8Array;
707
+ }
708
+ /**
709
+ * UnbondingDelegationEntry defines an unbonding object with relevant metadata.
710
+ * @name UnbondingDelegationEntryAmino
711
+ * @package cosmos.staking.v1beta1
712
+ * @see proto type: cosmos.staking.v1beta1.UnbondingDelegationEntry
713
+ */
714
+ export interface UnbondingDelegationEntryAmino {
715
+ /**
716
+ * creation_height is the height which the unbonding took place.
717
+ */
718
+ creation_height?: string;
719
+ /**
720
+ * completion_time is the unix time for unbonding completion.
721
+ */
722
+ completion_time: string;
723
+ /**
724
+ * initial_balance defines the tokens initially scheduled to receive at completion.
725
+ */
726
+ initial_balance?: string;
727
+ /**
728
+ * balance defines the tokens to receive at completion.
729
+ */
730
+ balance?: string;
731
+ /**
732
+ * Incrementing id that uniquely identifies this entry
733
+ */
734
+ unbonding_id?: string;
735
+ /**
736
+ * Strictly positive if this entry's unbonding has been stopped by external modules
737
+ */
738
+ unbonding_on_hold_ref_count?: string;
739
+ }
740
+ export interface UnbondingDelegationEntryAminoMsg {
741
+ type: "cosmos-sdk/UnbondingDelegationEntry";
742
+ value: UnbondingDelegationEntryAmino;
743
+ }
744
+ /** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */
745
+ export interface UnbondingDelegationEntrySDKType {
746
+ creation_height: bigint;
747
+ completion_time: Date;
748
+ initial_balance: string;
749
+ balance: string;
750
+ unbonding_id: bigint;
751
+ unbonding_on_hold_ref_count: bigint;
752
+ }
753
+ /** RedelegationEntry defines a redelegation object with relevant metadata. */
754
+ export interface RedelegationEntry {
755
+ /** creation_height defines the height which the redelegation took place. */
756
+ creationHeight: bigint;
757
+ /** completion_time defines the unix time for redelegation completion. */
758
+ completionTime: Date;
759
+ /** initial_balance defines the initial balance when redelegation started. */
760
+ initialBalance: string;
761
+ /** shares_dst is the amount of destination-validator shares created by redelegation. */
762
+ sharesDst: string;
763
+ /** Incrementing id that uniquely identifies this entry */
764
+ unbondingId: bigint;
765
+ /** Strictly positive if this entry's unbonding has been stopped by external modules */
766
+ unbondingOnHoldRefCount: bigint;
767
+ }
768
+ export interface RedelegationEntryProtoMsg {
769
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry";
770
+ value: Uint8Array;
771
+ }
772
+ /**
773
+ * RedelegationEntry defines a redelegation object with relevant metadata.
774
+ * @name RedelegationEntryAmino
775
+ * @package cosmos.staking.v1beta1
776
+ * @see proto type: cosmos.staking.v1beta1.RedelegationEntry
777
+ */
778
+ export interface RedelegationEntryAmino {
779
+ /**
780
+ * creation_height defines the height which the redelegation took place.
781
+ */
782
+ creation_height?: string;
783
+ /**
784
+ * completion_time defines the unix time for redelegation completion.
785
+ */
786
+ completion_time: string;
787
+ /**
788
+ * initial_balance defines the initial balance when redelegation started.
789
+ */
790
+ initial_balance?: string;
791
+ /**
792
+ * shares_dst is the amount of destination-validator shares created by redelegation.
793
+ */
794
+ shares_dst?: string;
795
+ /**
796
+ * Incrementing id that uniquely identifies this entry
797
+ */
798
+ unbonding_id?: string;
799
+ /**
800
+ * Strictly positive if this entry's unbonding has been stopped by external modules
801
+ */
802
+ unbonding_on_hold_ref_count?: string;
803
+ }
804
+ export interface RedelegationEntryAminoMsg {
805
+ type: "cosmos-sdk/RedelegationEntry";
806
+ value: RedelegationEntryAmino;
807
+ }
808
+ /** RedelegationEntry defines a redelegation object with relevant metadata. */
809
+ export interface RedelegationEntrySDKType {
810
+ creation_height: bigint;
811
+ completion_time: Date;
812
+ initial_balance: string;
813
+ shares_dst: string;
814
+ unbonding_id: bigint;
815
+ unbonding_on_hold_ref_count: bigint;
816
+ }
817
+ /**
818
+ * Redelegation contains the list of a particular delegator's redelegating bonds
819
+ * from a particular source validator to a particular destination validator.
820
+ */
821
+ export interface Redelegation {
822
+ /** delegator_address is the bech32-encoded address of the delegator. */
823
+ delegatorAddress: string;
824
+ /** validator_src_address is the validator redelegation source operator address. */
825
+ validatorSrcAddress: string;
826
+ /** validator_dst_address is the validator redelegation destination operator address. */
827
+ validatorDstAddress: string;
828
+ /** entries are the redelegation entries. */
829
+ entries: RedelegationEntry[];
830
+ }
831
+ export interface RedelegationProtoMsg {
832
+ typeUrl: "/cosmos.staking.v1beta1.Redelegation";
833
+ value: Uint8Array;
834
+ }
835
+ /**
836
+ * Redelegation contains the list of a particular delegator's redelegating bonds
837
+ * from a particular source validator to a particular destination validator.
838
+ * @name RedelegationAmino
839
+ * @package cosmos.staking.v1beta1
840
+ * @see proto type: cosmos.staking.v1beta1.Redelegation
841
+ */
842
+ export interface RedelegationAmino {
843
+ /**
844
+ * delegator_address is the bech32-encoded address of the delegator.
845
+ */
846
+ delegator_address?: string;
847
+ /**
848
+ * validator_src_address is the validator redelegation source operator address.
849
+ */
850
+ validator_src_address?: string;
851
+ /**
852
+ * validator_dst_address is the validator redelegation destination operator address.
853
+ */
854
+ validator_dst_address?: string;
855
+ /**
856
+ * entries are the redelegation entries.
857
+ */
858
+ entries: RedelegationEntryAmino[];
859
+ }
860
+ export interface RedelegationAminoMsg {
861
+ type: "cosmos-sdk/Redelegation";
862
+ value: RedelegationAmino;
863
+ }
864
+ /**
865
+ * Redelegation contains the list of a particular delegator's redelegating bonds
866
+ * from a particular source validator to a particular destination validator.
867
+ */
868
+ export interface RedelegationSDKType {
869
+ delegator_address: string;
870
+ validator_src_address: string;
871
+ validator_dst_address: string;
872
+ entries: RedelegationEntrySDKType[];
873
+ }
874
+ /** Params defines the parameters for the x/staking module. */
875
+ export interface Params {
876
+ /** unbonding_time is the time duration of unbonding. */
877
+ unbondingTime: Duration;
878
+ /** max_validators is the maximum number of validators. */
879
+ maxValidators: number;
880
+ /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */
881
+ maxEntries: number;
882
+ /** historical_entries is the number of historical entries to persist. */
883
+ historicalEntries: number;
884
+ /** bond_denom defines the bondable coin denomination. */
885
+ bondDenom: string;
886
+ /** min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators */
887
+ minCommissionRate: string;
888
+ }
889
+ export interface ParamsProtoMsg {
890
+ typeUrl: "/cosmos.staking.v1beta1.Params";
891
+ value: Uint8Array;
892
+ }
893
+ /**
894
+ * Params defines the parameters for the x/staking module.
895
+ * @name ParamsAmino
896
+ * @package cosmos.staking.v1beta1
897
+ * @see proto type: cosmos.staking.v1beta1.Params
898
+ */
899
+ export interface ParamsAmino {
900
+ /**
901
+ * unbonding_time is the time duration of unbonding.
902
+ */
903
+ unbonding_time: DurationAmino;
904
+ /**
905
+ * max_validators is the maximum number of validators.
906
+ */
907
+ max_validators?: number;
908
+ /**
909
+ * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
910
+ */
911
+ max_entries?: number;
912
+ /**
913
+ * historical_entries is the number of historical entries to persist.
914
+ */
915
+ historical_entries?: number;
916
+ /**
917
+ * bond_denom defines the bondable coin denomination.
918
+ */
919
+ bond_denom?: string;
920
+ /**
921
+ * min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators
922
+ */
923
+ min_commission_rate: string;
924
+ }
925
+ export interface ParamsAminoMsg {
926
+ type: "cosmos-sdk/x/staking/Params";
927
+ value: ParamsAmino;
928
+ }
929
+ /** Params defines the parameters for the x/staking module. */
930
+ export interface ParamsSDKType {
931
+ unbonding_time: DurationSDKType;
932
+ max_validators: number;
933
+ max_entries: number;
934
+ historical_entries: number;
935
+ bond_denom: string;
936
+ min_commission_rate: string;
937
+ }
938
+ /**
939
+ * DelegationResponse is equivalent to Delegation except that it contains a
940
+ * balance in addition to shares which is more suitable for client responses.
941
+ */
942
+ export interface DelegationResponse {
943
+ delegation: Delegation;
944
+ balance: Coin;
945
+ }
946
+ export interface DelegationResponseProtoMsg {
947
+ typeUrl: "/cosmos.staking.v1beta1.DelegationResponse";
948
+ value: Uint8Array;
949
+ }
950
+ /**
951
+ * DelegationResponse is equivalent to Delegation except that it contains a
952
+ * balance in addition to shares which is more suitable for client responses.
953
+ * @name DelegationResponseAmino
954
+ * @package cosmos.staking.v1beta1
955
+ * @see proto type: cosmos.staking.v1beta1.DelegationResponse
956
+ */
957
+ export interface DelegationResponseAmino {
958
+ delegation: DelegationAmino;
959
+ balance: CoinAmino;
960
+ }
961
+ export interface DelegationResponseAminoMsg {
962
+ type: "cosmos-sdk/DelegationResponse";
963
+ value: DelegationResponseAmino;
964
+ }
965
+ /**
966
+ * DelegationResponse is equivalent to Delegation except that it contains a
967
+ * balance in addition to shares which is more suitable for client responses.
968
+ */
969
+ export interface DelegationResponseSDKType {
970
+ delegation: DelegationSDKType;
971
+ balance: CoinSDKType;
972
+ }
973
+ /**
974
+ * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
975
+ * contains a balance in addition to shares which is more suitable for client
976
+ * responses.
977
+ */
978
+ export interface RedelegationEntryResponse {
979
+ redelegationEntry: RedelegationEntry;
980
+ balance: string;
981
+ }
982
+ export interface RedelegationEntryResponseProtoMsg {
983
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse";
984
+ value: Uint8Array;
985
+ }
986
+ /**
987
+ * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
988
+ * contains a balance in addition to shares which is more suitable for client
989
+ * responses.
990
+ * @name RedelegationEntryResponseAmino
991
+ * @package cosmos.staking.v1beta1
992
+ * @see proto type: cosmos.staking.v1beta1.RedelegationEntryResponse
993
+ */
994
+ export interface RedelegationEntryResponseAmino {
995
+ redelegation_entry: RedelegationEntryAmino;
996
+ balance?: string;
997
+ }
998
+ export interface RedelegationEntryResponseAminoMsg {
999
+ type: "cosmos-sdk/RedelegationEntryResponse";
1000
+ value: RedelegationEntryResponseAmino;
1001
+ }
1002
+ /**
1003
+ * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
1004
+ * contains a balance in addition to shares which is more suitable for client
1005
+ * responses.
1006
+ */
1007
+ export interface RedelegationEntryResponseSDKType {
1008
+ redelegation_entry: RedelegationEntrySDKType;
1009
+ balance: string;
1010
+ }
1011
+ /**
1012
+ * RedelegationResponse is equivalent to a Redelegation except that its entries
1013
+ * contain a balance in addition to shares which is more suitable for client
1014
+ * responses.
1015
+ */
1016
+ export interface RedelegationResponse {
1017
+ redelegation: Redelegation;
1018
+ entries: RedelegationEntryResponse[];
1019
+ }
1020
+ export interface RedelegationResponseProtoMsg {
1021
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse";
1022
+ value: Uint8Array;
1023
+ }
1024
+ /**
1025
+ * RedelegationResponse is equivalent to a Redelegation except that its entries
1026
+ * contain a balance in addition to shares which is more suitable for client
1027
+ * responses.
1028
+ * @name RedelegationResponseAmino
1029
+ * @package cosmos.staking.v1beta1
1030
+ * @see proto type: cosmos.staking.v1beta1.RedelegationResponse
1031
+ */
1032
+ export interface RedelegationResponseAmino {
1033
+ redelegation: RedelegationAmino;
1034
+ entries: RedelegationEntryResponseAmino[];
1035
+ }
1036
+ export interface RedelegationResponseAminoMsg {
1037
+ type: "cosmos-sdk/RedelegationResponse";
1038
+ value: RedelegationResponseAmino;
1039
+ }
1040
+ /**
1041
+ * RedelegationResponse is equivalent to a Redelegation except that its entries
1042
+ * contain a balance in addition to shares which is more suitable for client
1043
+ * responses.
1044
+ */
1045
+ export interface RedelegationResponseSDKType {
1046
+ redelegation: RedelegationSDKType;
1047
+ entries: RedelegationEntryResponseSDKType[];
1048
+ }
1049
+ /**
1050
+ * Pool is used for tracking bonded and not-bonded token supply of the bond
1051
+ * denomination.
1052
+ */
1053
+ export interface Pool {
1054
+ notBondedTokens: string;
1055
+ bondedTokens: string;
1056
+ }
1057
+ export interface PoolProtoMsg {
1058
+ typeUrl: "/cosmos.staking.v1beta1.Pool";
1059
+ value: Uint8Array;
1060
+ }
1061
+ /**
1062
+ * Pool is used for tracking bonded and not-bonded token supply of the bond
1063
+ * denomination.
1064
+ * @name PoolAmino
1065
+ * @package cosmos.staking.v1beta1
1066
+ * @see proto type: cosmos.staking.v1beta1.Pool
1067
+ */
1068
+ export interface PoolAmino {
1069
+ not_bonded_tokens: string;
1070
+ bonded_tokens: string;
1071
+ }
1072
+ export interface PoolAminoMsg {
1073
+ type: "cosmos-sdk/Pool";
1074
+ value: PoolAmino;
1075
+ }
1076
+ /**
1077
+ * Pool is used for tracking bonded and not-bonded token supply of the bond
1078
+ * denomination.
1079
+ */
1080
+ export interface PoolSDKType {
1081
+ not_bonded_tokens: string;
1082
+ bonded_tokens: string;
1083
+ }
1084
+ /**
1085
+ * ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
1086
+ * TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
1087
+ */
1088
+ export interface ValidatorUpdates {
1089
+ updates: ValidatorUpdate[];
1090
+ }
1091
+ export interface ValidatorUpdatesProtoMsg {
1092
+ typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates";
1093
+ value: Uint8Array;
1094
+ }
1095
+ /**
1096
+ * ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
1097
+ * TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
1098
+ * @name ValidatorUpdatesAmino
1099
+ * @package cosmos.staking.v1beta1
1100
+ * @see proto type: cosmos.staking.v1beta1.ValidatorUpdates
1101
+ */
1102
+ export interface ValidatorUpdatesAmino {
1103
+ updates: ValidatorUpdateAmino[];
1104
+ }
1105
+ export interface ValidatorUpdatesAminoMsg {
1106
+ type: "cosmos-sdk/ValidatorUpdates";
1107
+ value: ValidatorUpdatesAmino;
1108
+ }
1109
+ /**
1110
+ * ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
1111
+ * TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
1112
+ */
1113
+ export interface ValidatorUpdatesSDKType {
1114
+ updates: ValidatorUpdateSDKType[];
1115
+ }
1116
+ function createBaseHistoricalInfo(): HistoricalInfo {
1117
+ return {
1118
+ header: Header.fromPartial({}),
1119
+ valset: []
1120
+ };
1121
+ }
1122
+ export const HistoricalInfo = {
1123
+ typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo",
1124
+ encode(message: HistoricalInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1125
+ if (message.header !== undefined) {
1126
+ Header.encode(message.header, writer.uint32(10).fork()).ldelim();
1127
+ }
1128
+ for (const v of message.valset) {
1129
+ Validator.encode(v!, writer.uint32(18).fork()).ldelim();
1130
+ }
1131
+ return writer;
1132
+ },
1133
+ decode(input: BinaryReader | Uint8Array, length?: number): HistoricalInfo {
1134
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1135
+ let end = length === undefined ? reader.len : reader.pos + length;
1136
+ const message = createBaseHistoricalInfo();
1137
+ while (reader.pos < end) {
1138
+ const tag = reader.uint32();
1139
+ switch (tag >>> 3) {
1140
+ case 1:
1141
+ message.header = Header.decode(reader, reader.uint32());
1142
+ break;
1143
+ case 2:
1144
+ message.valset.push(Validator.decode(reader, reader.uint32()));
1145
+ break;
1146
+ default:
1147
+ reader.skipType(tag & 7);
1148
+ break;
1149
+ }
1150
+ }
1151
+ return message;
1152
+ },
1153
+ fromPartial(object: Partial<HistoricalInfo>): HistoricalInfo {
1154
+ const message = createBaseHistoricalInfo();
1155
+ message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined;
1156
+ message.valset = object.valset?.map(e => Validator.fromPartial(e)) || [];
1157
+ return message;
1158
+ },
1159
+ fromAmino(object: HistoricalInfoAmino): HistoricalInfo {
1160
+ const message = createBaseHistoricalInfo();
1161
+ if (object.header !== undefined && object.header !== null) {
1162
+ message.header = Header.fromAmino(object.header);
1163
+ }
1164
+ message.valset = object.valset?.map(e => Validator.fromAmino(e)) || [];
1165
+ return message;
1166
+ },
1167
+ toAmino(message: HistoricalInfo): HistoricalInfoAmino {
1168
+ const obj: any = {};
1169
+ obj.header = message.header ? Header.toAmino(message.header) : Header.toAmino(Header.fromPartial({}));
1170
+ if (message.valset) {
1171
+ obj.valset = message.valset.map(e => e ? Validator.toAmino(e) : undefined);
1172
+ } else {
1173
+ obj.valset = message.valset;
1174
+ }
1175
+ return obj;
1176
+ },
1177
+ fromAminoMsg(object: HistoricalInfoAminoMsg): HistoricalInfo {
1178
+ return HistoricalInfo.fromAmino(object.value);
1179
+ },
1180
+ toAminoMsg(message: HistoricalInfo): HistoricalInfoAminoMsg {
1181
+ return {
1182
+ type: "cosmos-sdk/HistoricalInfo",
1183
+ value: HistoricalInfo.toAmino(message)
1184
+ };
1185
+ },
1186
+ fromProtoMsg(message: HistoricalInfoProtoMsg): HistoricalInfo {
1187
+ return HistoricalInfo.decode(message.value);
1188
+ },
1189
+ toProto(message: HistoricalInfo): Uint8Array {
1190
+ return HistoricalInfo.encode(message).finish();
1191
+ },
1192
+ toProtoMsg(message: HistoricalInfo): HistoricalInfoProtoMsg {
1193
+ return {
1194
+ typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo",
1195
+ value: HistoricalInfo.encode(message).finish()
1196
+ };
1197
+ }
1198
+ };
1199
+ function createBaseCommissionRates(): CommissionRates {
1200
+ return {
1201
+ rate: "",
1202
+ maxRate: "",
1203
+ maxChangeRate: ""
1204
+ };
1205
+ }
1206
+ export const CommissionRates = {
1207
+ typeUrl: "/cosmos.staking.v1beta1.CommissionRates",
1208
+ encode(message: CommissionRates, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1209
+ if (message.rate !== "") {
1210
+ writer.uint32(10).string(Decimal.fromUserInput(message.rate, 18).atomics);
1211
+ }
1212
+ if (message.maxRate !== "") {
1213
+ writer.uint32(18).string(Decimal.fromUserInput(message.maxRate, 18).atomics);
1214
+ }
1215
+ if (message.maxChangeRate !== "") {
1216
+ writer.uint32(26).string(Decimal.fromUserInput(message.maxChangeRate, 18).atomics);
1217
+ }
1218
+ return writer;
1219
+ },
1220
+ decode(input: BinaryReader | Uint8Array, length?: number): CommissionRates {
1221
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1222
+ let end = length === undefined ? reader.len : reader.pos + length;
1223
+ const message = createBaseCommissionRates();
1224
+ while (reader.pos < end) {
1225
+ const tag = reader.uint32();
1226
+ switch (tag >>> 3) {
1227
+ case 1:
1228
+ message.rate = Decimal.fromAtomics(reader.string(), 18).toString();
1229
+ break;
1230
+ case 2:
1231
+ message.maxRate = Decimal.fromAtomics(reader.string(), 18).toString();
1232
+ break;
1233
+ case 3:
1234
+ message.maxChangeRate = Decimal.fromAtomics(reader.string(), 18).toString();
1235
+ break;
1236
+ default:
1237
+ reader.skipType(tag & 7);
1238
+ break;
1239
+ }
1240
+ }
1241
+ return message;
1242
+ },
1243
+ fromPartial(object: Partial<CommissionRates>): CommissionRates {
1244
+ const message = createBaseCommissionRates();
1245
+ message.rate = object.rate ?? "";
1246
+ message.maxRate = object.maxRate ?? "";
1247
+ message.maxChangeRate = object.maxChangeRate ?? "";
1248
+ return message;
1249
+ },
1250
+ fromAmino(object: CommissionRatesAmino): CommissionRates {
1251
+ const message = createBaseCommissionRates();
1252
+ if (object.rate !== undefined && object.rate !== null) {
1253
+ message.rate = object.rate;
1254
+ }
1255
+ if (object.max_rate !== undefined && object.max_rate !== null) {
1256
+ message.maxRate = object.max_rate;
1257
+ }
1258
+ if (object.max_change_rate !== undefined && object.max_change_rate !== null) {
1259
+ message.maxChangeRate = object.max_change_rate;
1260
+ }
1261
+ return message;
1262
+ },
1263
+ toAmino(message: CommissionRates): CommissionRatesAmino {
1264
+ const obj: any = {};
1265
+ obj.rate = message.rate ?? "";
1266
+ obj.max_rate = message.maxRate ?? "";
1267
+ obj.max_change_rate = message.maxChangeRate ?? "";
1268
+ return obj;
1269
+ },
1270
+ fromAminoMsg(object: CommissionRatesAminoMsg): CommissionRates {
1271
+ return CommissionRates.fromAmino(object.value);
1272
+ },
1273
+ toAminoMsg(message: CommissionRates): CommissionRatesAminoMsg {
1274
+ return {
1275
+ type: "cosmos-sdk/CommissionRates",
1276
+ value: CommissionRates.toAmino(message)
1277
+ };
1278
+ },
1279
+ fromProtoMsg(message: CommissionRatesProtoMsg): CommissionRates {
1280
+ return CommissionRates.decode(message.value);
1281
+ },
1282
+ toProto(message: CommissionRates): Uint8Array {
1283
+ return CommissionRates.encode(message).finish();
1284
+ },
1285
+ toProtoMsg(message: CommissionRates): CommissionRatesProtoMsg {
1286
+ return {
1287
+ typeUrl: "/cosmos.staking.v1beta1.CommissionRates",
1288
+ value: CommissionRates.encode(message).finish()
1289
+ };
1290
+ }
1291
+ };
1292
+ function createBaseCommission(): Commission {
1293
+ return {
1294
+ commissionRates: CommissionRates.fromPartial({}),
1295
+ updateTime: new Date()
1296
+ };
1297
+ }
1298
+ export const Commission = {
1299
+ typeUrl: "/cosmos.staking.v1beta1.Commission",
1300
+ encode(message: Commission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1301
+ if (message.commissionRates !== undefined) {
1302
+ CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).ldelim();
1303
+ }
1304
+ if (message.updateTime !== undefined) {
1305
+ Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(18).fork()).ldelim();
1306
+ }
1307
+ return writer;
1308
+ },
1309
+ decode(input: BinaryReader | Uint8Array, length?: number): Commission {
1310
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1311
+ let end = length === undefined ? reader.len : reader.pos + length;
1312
+ const message = createBaseCommission();
1313
+ while (reader.pos < end) {
1314
+ const tag = reader.uint32();
1315
+ switch (tag >>> 3) {
1316
+ case 1:
1317
+ message.commissionRates = CommissionRates.decode(reader, reader.uint32());
1318
+ break;
1319
+ case 2:
1320
+ message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1321
+ break;
1322
+ default:
1323
+ reader.skipType(tag & 7);
1324
+ break;
1325
+ }
1326
+ }
1327
+ return message;
1328
+ },
1329
+ fromPartial(object: Partial<Commission>): Commission {
1330
+ const message = createBaseCommission();
1331
+ message.commissionRates = object.commissionRates !== undefined && object.commissionRates !== null ? CommissionRates.fromPartial(object.commissionRates) : undefined;
1332
+ message.updateTime = object.updateTime ?? undefined;
1333
+ return message;
1334
+ },
1335
+ fromAmino(object: CommissionAmino): Commission {
1336
+ const message = createBaseCommission();
1337
+ if (object.commission_rates !== undefined && object.commission_rates !== null) {
1338
+ message.commissionRates = CommissionRates.fromAmino(object.commission_rates);
1339
+ }
1340
+ if (object.update_time !== undefined && object.update_time !== null) {
1341
+ message.updateTime = fromTimestamp(Timestamp.fromAmino(object.update_time));
1342
+ }
1343
+ return message;
1344
+ },
1345
+ toAmino(message: Commission): CommissionAmino {
1346
+ const obj: any = {};
1347
+ obj.commission_rates = message.commissionRates ? CommissionRates.toAmino(message.commissionRates) : CommissionRates.toAmino(CommissionRates.fromPartial({}));
1348
+ obj.update_time = message.updateTime ? Timestamp.toAmino(toTimestamp(message.updateTime)) : new Date();
1349
+ return obj;
1350
+ },
1351
+ fromAminoMsg(object: CommissionAminoMsg): Commission {
1352
+ return Commission.fromAmino(object.value);
1353
+ },
1354
+ toAminoMsg(message: Commission): CommissionAminoMsg {
1355
+ return {
1356
+ type: "cosmos-sdk/Commission",
1357
+ value: Commission.toAmino(message)
1358
+ };
1359
+ },
1360
+ fromProtoMsg(message: CommissionProtoMsg): Commission {
1361
+ return Commission.decode(message.value);
1362
+ },
1363
+ toProto(message: Commission): Uint8Array {
1364
+ return Commission.encode(message).finish();
1365
+ },
1366
+ toProtoMsg(message: Commission): CommissionProtoMsg {
1367
+ return {
1368
+ typeUrl: "/cosmos.staking.v1beta1.Commission",
1369
+ value: Commission.encode(message).finish()
1370
+ };
1371
+ }
1372
+ };
1373
+ function createBaseDescription(): Description {
1374
+ return {
1375
+ moniker: "",
1376
+ identity: "",
1377
+ website: "",
1378
+ securityContact: "",
1379
+ details: ""
1380
+ };
1381
+ }
1382
+ export const Description = {
1383
+ typeUrl: "/cosmos.staking.v1beta1.Description",
1384
+ encode(message: Description, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1385
+ if (message.moniker !== "") {
1386
+ writer.uint32(10).string(message.moniker);
1387
+ }
1388
+ if (message.identity !== "") {
1389
+ writer.uint32(18).string(message.identity);
1390
+ }
1391
+ if (message.website !== "") {
1392
+ writer.uint32(26).string(message.website);
1393
+ }
1394
+ if (message.securityContact !== "") {
1395
+ writer.uint32(34).string(message.securityContact);
1396
+ }
1397
+ if (message.details !== "") {
1398
+ writer.uint32(42).string(message.details);
1399
+ }
1400
+ return writer;
1401
+ },
1402
+ decode(input: BinaryReader | Uint8Array, length?: number): Description {
1403
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1404
+ let end = length === undefined ? reader.len : reader.pos + length;
1405
+ const message = createBaseDescription();
1406
+ while (reader.pos < end) {
1407
+ const tag = reader.uint32();
1408
+ switch (tag >>> 3) {
1409
+ case 1:
1410
+ message.moniker = reader.string();
1411
+ break;
1412
+ case 2:
1413
+ message.identity = reader.string();
1414
+ break;
1415
+ case 3:
1416
+ message.website = reader.string();
1417
+ break;
1418
+ case 4:
1419
+ message.securityContact = reader.string();
1420
+ break;
1421
+ case 5:
1422
+ message.details = reader.string();
1423
+ break;
1424
+ default:
1425
+ reader.skipType(tag & 7);
1426
+ break;
1427
+ }
1428
+ }
1429
+ return message;
1430
+ },
1431
+ fromPartial(object: Partial<Description>): Description {
1432
+ const message = createBaseDescription();
1433
+ message.moniker = object.moniker ?? "";
1434
+ message.identity = object.identity ?? "";
1435
+ message.website = object.website ?? "";
1436
+ message.securityContact = object.securityContact ?? "";
1437
+ message.details = object.details ?? "";
1438
+ return message;
1439
+ },
1440
+ fromAmino(object: DescriptionAmino): Description {
1441
+ const message = createBaseDescription();
1442
+ if (object.moniker !== undefined && object.moniker !== null) {
1443
+ message.moniker = object.moniker;
1444
+ }
1445
+ if (object.identity !== undefined && object.identity !== null) {
1446
+ message.identity = object.identity;
1447
+ }
1448
+ if (object.website !== undefined && object.website !== null) {
1449
+ message.website = object.website;
1450
+ }
1451
+ if (object.security_contact !== undefined && object.security_contact !== null) {
1452
+ message.securityContact = object.security_contact;
1453
+ }
1454
+ if (object.details !== undefined && object.details !== null) {
1455
+ message.details = object.details;
1456
+ }
1457
+ return message;
1458
+ },
1459
+ toAmino(message: Description): DescriptionAmino {
1460
+ const obj: any = {};
1461
+ obj.moniker = message.moniker === "" ? undefined : message.moniker;
1462
+ obj.identity = message.identity === "" ? undefined : message.identity;
1463
+ obj.website = message.website === "" ? undefined : message.website;
1464
+ obj.security_contact = message.securityContact === "" ? undefined : message.securityContact;
1465
+ obj.details = message.details === "" ? undefined : message.details;
1466
+ return obj;
1467
+ },
1468
+ fromAminoMsg(object: DescriptionAminoMsg): Description {
1469
+ return Description.fromAmino(object.value);
1470
+ },
1471
+ toAminoMsg(message: Description): DescriptionAminoMsg {
1472
+ return {
1473
+ type: "cosmos-sdk/Description",
1474
+ value: Description.toAmino(message)
1475
+ };
1476
+ },
1477
+ fromProtoMsg(message: DescriptionProtoMsg): Description {
1478
+ return Description.decode(message.value);
1479
+ },
1480
+ toProto(message: Description): Uint8Array {
1481
+ return Description.encode(message).finish();
1482
+ },
1483
+ toProtoMsg(message: Description): DescriptionProtoMsg {
1484
+ return {
1485
+ typeUrl: "/cosmos.staking.v1beta1.Description",
1486
+ value: Description.encode(message).finish()
1487
+ };
1488
+ }
1489
+ };
1490
+ function createBaseValidator(): Validator {
1491
+ return {
1492
+ operatorAddress: "",
1493
+ consensusPubkey: undefined,
1494
+ jailed: false,
1495
+ status: 0,
1496
+ tokens: "",
1497
+ delegatorShares: "",
1498
+ description: Description.fromPartial({}),
1499
+ unbondingHeight: BigInt(0),
1500
+ unbondingTime: new Date(),
1501
+ commission: Commission.fromPartial({}),
1502
+ minSelfDelegation: "",
1503
+ unbondingOnHoldRefCount: BigInt(0),
1504
+ unbondingIds: []
1505
+ };
1506
+ }
1507
+ export const Validator = {
1508
+ typeUrl: "/cosmos.staking.v1beta1.Validator",
1509
+ encode(message: Validator, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1510
+ if (message.operatorAddress !== "") {
1511
+ writer.uint32(10).string(message.operatorAddress);
1512
+ }
1513
+ if (message.consensusPubkey !== undefined) {
1514
+ Any.encode(message.consensusPubkey as Any, writer.uint32(18).fork()).ldelim();
1515
+ }
1516
+ if (message.jailed === true) {
1517
+ writer.uint32(24).bool(message.jailed);
1518
+ }
1519
+ if (message.status !== 0) {
1520
+ writer.uint32(32).int32(message.status);
1521
+ }
1522
+ if (message.tokens !== "") {
1523
+ writer.uint32(42).string(message.tokens);
1524
+ }
1525
+ if (message.delegatorShares !== "") {
1526
+ writer.uint32(50).string(Decimal.fromUserInput(message.delegatorShares, 18).atomics);
1527
+ }
1528
+ if (message.description !== undefined) {
1529
+ Description.encode(message.description, writer.uint32(58).fork()).ldelim();
1530
+ }
1531
+ if (message.unbondingHeight !== BigInt(0)) {
1532
+ writer.uint32(64).int64(message.unbondingHeight);
1533
+ }
1534
+ if (message.unbondingTime !== undefined) {
1535
+ Timestamp.encode(toTimestamp(message.unbondingTime), writer.uint32(74).fork()).ldelim();
1536
+ }
1537
+ if (message.commission !== undefined) {
1538
+ Commission.encode(message.commission, writer.uint32(82).fork()).ldelim();
1539
+ }
1540
+ if (message.minSelfDelegation !== "") {
1541
+ writer.uint32(90).string(message.minSelfDelegation);
1542
+ }
1543
+ if (message.unbondingOnHoldRefCount !== BigInt(0)) {
1544
+ writer.uint32(96).int64(message.unbondingOnHoldRefCount);
1545
+ }
1546
+ writer.uint32(106).fork();
1547
+ for (const v of message.unbondingIds) {
1548
+ writer.uint64(v);
1549
+ }
1550
+ writer.ldelim();
1551
+ return writer;
1552
+ },
1553
+ decode(input: BinaryReader | Uint8Array, length?: number): Validator {
1554
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1555
+ let end = length === undefined ? reader.len : reader.pos + length;
1556
+ const message = createBaseValidator();
1557
+ while (reader.pos < end) {
1558
+ const tag = reader.uint32();
1559
+ switch (tag >>> 3) {
1560
+ case 1:
1561
+ message.operatorAddress = reader.string();
1562
+ break;
1563
+ case 2:
1564
+ message.consensusPubkey = Cosmos_cryptoPubKey_InterfaceDecoder(reader) as Any;
1565
+ break;
1566
+ case 3:
1567
+ message.jailed = reader.bool();
1568
+ break;
1569
+ case 4:
1570
+ message.status = reader.int32() as any;
1571
+ break;
1572
+ case 5:
1573
+ message.tokens = reader.string();
1574
+ break;
1575
+ case 6:
1576
+ message.delegatorShares = Decimal.fromAtomics(reader.string(), 18).toString();
1577
+ break;
1578
+ case 7:
1579
+ message.description = Description.decode(reader, reader.uint32());
1580
+ break;
1581
+ case 8:
1582
+ message.unbondingHeight = reader.int64();
1583
+ break;
1584
+ case 9:
1585
+ message.unbondingTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1586
+ break;
1587
+ case 10:
1588
+ message.commission = Commission.decode(reader, reader.uint32());
1589
+ break;
1590
+ case 11:
1591
+ message.minSelfDelegation = reader.string();
1592
+ break;
1593
+ case 12:
1594
+ message.unbondingOnHoldRefCount = reader.int64();
1595
+ break;
1596
+ case 13:
1597
+ if ((tag & 7) === 2) {
1598
+ const end2 = reader.uint32() + reader.pos;
1599
+ while (reader.pos < end2) {
1600
+ message.unbondingIds.push(reader.uint64());
1601
+ }
1602
+ } else {
1603
+ message.unbondingIds.push(reader.uint64());
1604
+ }
1605
+ break;
1606
+ default:
1607
+ reader.skipType(tag & 7);
1608
+ break;
1609
+ }
1610
+ }
1611
+ return message;
1612
+ },
1613
+ fromPartial(object: Partial<Validator>): Validator {
1614
+ const message = createBaseValidator();
1615
+ message.operatorAddress = object.operatorAddress ?? "";
1616
+ message.consensusPubkey = object.consensusPubkey !== undefined && object.consensusPubkey !== null ? Any.fromPartial(object.consensusPubkey) : undefined;
1617
+ message.jailed = object.jailed ?? false;
1618
+ message.status = object.status ?? 0;
1619
+ message.tokens = object.tokens ?? "";
1620
+ message.delegatorShares = object.delegatorShares ?? "";
1621
+ message.description = object.description !== undefined && object.description !== null ? Description.fromPartial(object.description) : undefined;
1622
+ message.unbondingHeight = object.unbondingHeight !== undefined && object.unbondingHeight !== null ? BigInt(object.unbondingHeight.toString()) : BigInt(0);
1623
+ message.unbondingTime = object.unbondingTime ?? undefined;
1624
+ message.commission = object.commission !== undefined && object.commission !== null ? Commission.fromPartial(object.commission) : undefined;
1625
+ message.minSelfDelegation = object.minSelfDelegation ?? "";
1626
+ message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount !== undefined && object.unbondingOnHoldRefCount !== null ? BigInt(object.unbondingOnHoldRefCount.toString()) : BigInt(0);
1627
+ message.unbondingIds = object.unbondingIds?.map(e => BigInt(e.toString())) || [];
1628
+ return message;
1629
+ },
1630
+ fromAmino(object: ValidatorAmino): Validator {
1631
+ const message = createBaseValidator();
1632
+ if (object.operator_address !== undefined && object.operator_address !== null) {
1633
+ message.operatorAddress = object.operator_address;
1634
+ }
1635
+ if (object.consensus_pubkey !== undefined && object.consensus_pubkey !== null) {
1636
+ message.consensusPubkey = encodePubkey(object.consensus_pubkey);
1637
+ }
1638
+ if (object.jailed !== undefined && object.jailed !== null) {
1639
+ message.jailed = object.jailed;
1640
+ }
1641
+ if (object.status !== undefined && object.status !== null) {
1642
+ message.status = object.status;
1643
+ }
1644
+ if (object.tokens !== undefined && object.tokens !== null) {
1645
+ message.tokens = object.tokens;
1646
+ }
1647
+ if (object.delegator_shares !== undefined && object.delegator_shares !== null) {
1648
+ message.delegatorShares = object.delegator_shares;
1649
+ }
1650
+ if (object.description !== undefined && object.description !== null) {
1651
+ message.description = Description.fromAmino(object.description);
1652
+ }
1653
+ if (object.unbonding_height !== undefined && object.unbonding_height !== null) {
1654
+ message.unbondingHeight = BigInt(object.unbonding_height);
1655
+ }
1656
+ if (object.unbonding_time !== undefined && object.unbonding_time !== null) {
1657
+ message.unbondingTime = fromTimestamp(Timestamp.fromAmino(object.unbonding_time));
1658
+ }
1659
+ if (object.commission !== undefined && object.commission !== null) {
1660
+ message.commission = Commission.fromAmino(object.commission);
1661
+ }
1662
+ if (object.min_self_delegation !== undefined && object.min_self_delegation !== null) {
1663
+ message.minSelfDelegation = object.min_self_delegation;
1664
+ }
1665
+ if (object.unbonding_on_hold_ref_count !== undefined && object.unbonding_on_hold_ref_count !== null) {
1666
+ message.unbondingOnHoldRefCount = BigInt(object.unbonding_on_hold_ref_count);
1667
+ }
1668
+ message.unbondingIds = object.unbonding_ids?.map(e => BigInt(e)) || [];
1669
+ return message;
1670
+ },
1671
+ toAmino(message: Validator): ValidatorAmino {
1672
+ const obj: any = {};
1673
+ obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress;
1674
+ obj.consensus_pubkey = message.consensusPubkey ? decodePubkey(message.consensusPubkey) : undefined;
1675
+ obj.jailed = message.jailed === false ? undefined : message.jailed;
1676
+ obj.status = message.status === 0 ? undefined : message.status;
1677
+ obj.tokens = message.tokens === "" ? undefined : message.tokens;
1678
+ obj.delegator_shares = message.delegatorShares === "" ? undefined : message.delegatorShares;
1679
+ obj.description = message.description ? Description.toAmino(message.description) : Description.toAmino(Description.fromPartial({}));
1680
+ obj.unbonding_height = message.unbondingHeight !== BigInt(0) ? message.unbondingHeight?.toString() : undefined;
1681
+ obj.unbonding_time = message.unbondingTime ? Timestamp.toAmino(toTimestamp(message.unbondingTime)) : new Date();
1682
+ obj.commission = message.commission ? Commission.toAmino(message.commission) : Commission.toAmino(Commission.fromPartial({}));
1683
+ obj.min_self_delegation = message.minSelfDelegation === "" ? undefined : message.minSelfDelegation;
1684
+ obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount?.toString() : undefined;
1685
+ if (message.unbondingIds) {
1686
+ obj.unbonding_ids = message.unbondingIds.map(e => e.toString());
1687
+ } else {
1688
+ obj.unbonding_ids = message.unbondingIds;
1689
+ }
1690
+ return obj;
1691
+ },
1692
+ fromAminoMsg(object: ValidatorAminoMsg): Validator {
1693
+ return Validator.fromAmino(object.value);
1694
+ },
1695
+ toAminoMsg(message: Validator): ValidatorAminoMsg {
1696
+ return {
1697
+ type: "cosmos-sdk/Validator",
1698
+ value: Validator.toAmino(message)
1699
+ };
1700
+ },
1701
+ fromProtoMsg(message: ValidatorProtoMsg): Validator {
1702
+ return Validator.decode(message.value);
1703
+ },
1704
+ toProto(message: Validator): Uint8Array {
1705
+ return Validator.encode(message).finish();
1706
+ },
1707
+ toProtoMsg(message: Validator): ValidatorProtoMsg {
1708
+ return {
1709
+ typeUrl: "/cosmos.staking.v1beta1.Validator",
1710
+ value: Validator.encode(message).finish()
1711
+ };
1712
+ }
1713
+ };
1714
+ function createBaseValAddresses(): ValAddresses {
1715
+ return {
1716
+ addresses: []
1717
+ };
1718
+ }
1719
+ export const ValAddresses = {
1720
+ typeUrl: "/cosmos.staking.v1beta1.ValAddresses",
1721
+ encode(message: ValAddresses, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1722
+ for (const v of message.addresses) {
1723
+ writer.uint32(10).string(v!);
1724
+ }
1725
+ return writer;
1726
+ },
1727
+ decode(input: BinaryReader | Uint8Array, length?: number): ValAddresses {
1728
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1729
+ let end = length === undefined ? reader.len : reader.pos + length;
1730
+ const message = createBaseValAddresses();
1731
+ while (reader.pos < end) {
1732
+ const tag = reader.uint32();
1733
+ switch (tag >>> 3) {
1734
+ case 1:
1735
+ message.addresses.push(reader.string());
1736
+ break;
1737
+ default:
1738
+ reader.skipType(tag & 7);
1739
+ break;
1740
+ }
1741
+ }
1742
+ return message;
1743
+ },
1744
+ fromPartial(object: Partial<ValAddresses>): ValAddresses {
1745
+ const message = createBaseValAddresses();
1746
+ message.addresses = object.addresses?.map(e => e) || [];
1747
+ return message;
1748
+ },
1749
+ fromAmino(object: ValAddressesAmino): ValAddresses {
1750
+ const message = createBaseValAddresses();
1751
+ message.addresses = object.addresses?.map(e => e) || [];
1752
+ return message;
1753
+ },
1754
+ toAmino(message: ValAddresses): ValAddressesAmino {
1755
+ const obj: any = {};
1756
+ if (message.addresses) {
1757
+ obj.addresses = message.addresses.map(e => e);
1758
+ } else {
1759
+ obj.addresses = message.addresses;
1760
+ }
1761
+ return obj;
1762
+ },
1763
+ fromAminoMsg(object: ValAddressesAminoMsg): ValAddresses {
1764
+ return ValAddresses.fromAmino(object.value);
1765
+ },
1766
+ toAminoMsg(message: ValAddresses): ValAddressesAminoMsg {
1767
+ return {
1768
+ type: "cosmos-sdk/ValAddresses",
1769
+ value: ValAddresses.toAmino(message)
1770
+ };
1771
+ },
1772
+ fromProtoMsg(message: ValAddressesProtoMsg): ValAddresses {
1773
+ return ValAddresses.decode(message.value);
1774
+ },
1775
+ toProto(message: ValAddresses): Uint8Array {
1776
+ return ValAddresses.encode(message).finish();
1777
+ },
1778
+ toProtoMsg(message: ValAddresses): ValAddressesProtoMsg {
1779
+ return {
1780
+ typeUrl: "/cosmos.staking.v1beta1.ValAddresses",
1781
+ value: ValAddresses.encode(message).finish()
1782
+ };
1783
+ }
1784
+ };
1785
+ function createBaseDVPair(): DVPair {
1786
+ return {
1787
+ delegatorAddress: "",
1788
+ validatorAddress: ""
1789
+ };
1790
+ }
1791
+ export const DVPair = {
1792
+ typeUrl: "/cosmos.staking.v1beta1.DVPair",
1793
+ encode(message: DVPair, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1794
+ if (message.delegatorAddress !== "") {
1795
+ writer.uint32(10).string(message.delegatorAddress);
1796
+ }
1797
+ if (message.validatorAddress !== "") {
1798
+ writer.uint32(18).string(message.validatorAddress);
1799
+ }
1800
+ return writer;
1801
+ },
1802
+ decode(input: BinaryReader | Uint8Array, length?: number): DVPair {
1803
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1804
+ let end = length === undefined ? reader.len : reader.pos + length;
1805
+ const message = createBaseDVPair();
1806
+ while (reader.pos < end) {
1807
+ const tag = reader.uint32();
1808
+ switch (tag >>> 3) {
1809
+ case 1:
1810
+ message.delegatorAddress = reader.string();
1811
+ break;
1812
+ case 2:
1813
+ message.validatorAddress = reader.string();
1814
+ break;
1815
+ default:
1816
+ reader.skipType(tag & 7);
1817
+ break;
1818
+ }
1819
+ }
1820
+ return message;
1821
+ },
1822
+ fromPartial(object: Partial<DVPair>): DVPair {
1823
+ const message = createBaseDVPair();
1824
+ message.delegatorAddress = object.delegatorAddress ?? "";
1825
+ message.validatorAddress = object.validatorAddress ?? "";
1826
+ return message;
1827
+ },
1828
+ fromAmino(object: DVPairAmino): DVPair {
1829
+ const message = createBaseDVPair();
1830
+ if (object.delegator_address !== undefined && object.delegator_address !== null) {
1831
+ message.delegatorAddress = object.delegator_address;
1832
+ }
1833
+ if (object.validator_address !== undefined && object.validator_address !== null) {
1834
+ message.validatorAddress = object.validator_address;
1835
+ }
1836
+ return message;
1837
+ },
1838
+ toAmino(message: DVPair): DVPairAmino {
1839
+ const obj: any = {};
1840
+ obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress;
1841
+ obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
1842
+ return obj;
1843
+ },
1844
+ fromAminoMsg(object: DVPairAminoMsg): DVPair {
1845
+ return DVPair.fromAmino(object.value);
1846
+ },
1847
+ toAminoMsg(message: DVPair): DVPairAminoMsg {
1848
+ return {
1849
+ type: "cosmos-sdk/DVPair",
1850
+ value: DVPair.toAmino(message)
1851
+ };
1852
+ },
1853
+ fromProtoMsg(message: DVPairProtoMsg): DVPair {
1854
+ return DVPair.decode(message.value);
1855
+ },
1856
+ toProto(message: DVPair): Uint8Array {
1857
+ return DVPair.encode(message).finish();
1858
+ },
1859
+ toProtoMsg(message: DVPair): DVPairProtoMsg {
1860
+ return {
1861
+ typeUrl: "/cosmos.staking.v1beta1.DVPair",
1862
+ value: DVPair.encode(message).finish()
1863
+ };
1864
+ }
1865
+ };
1866
+ function createBaseDVPairs(): DVPairs {
1867
+ return {
1868
+ pairs: []
1869
+ };
1870
+ }
1871
+ export const DVPairs = {
1872
+ typeUrl: "/cosmos.staking.v1beta1.DVPairs",
1873
+ encode(message: DVPairs, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1874
+ for (const v of message.pairs) {
1875
+ DVPair.encode(v!, writer.uint32(10).fork()).ldelim();
1876
+ }
1877
+ return writer;
1878
+ },
1879
+ decode(input: BinaryReader | Uint8Array, length?: number): DVPairs {
1880
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1881
+ let end = length === undefined ? reader.len : reader.pos + length;
1882
+ const message = createBaseDVPairs();
1883
+ while (reader.pos < end) {
1884
+ const tag = reader.uint32();
1885
+ switch (tag >>> 3) {
1886
+ case 1:
1887
+ message.pairs.push(DVPair.decode(reader, reader.uint32()));
1888
+ break;
1889
+ default:
1890
+ reader.skipType(tag & 7);
1891
+ break;
1892
+ }
1893
+ }
1894
+ return message;
1895
+ },
1896
+ fromPartial(object: Partial<DVPairs>): DVPairs {
1897
+ const message = createBaseDVPairs();
1898
+ message.pairs = object.pairs?.map(e => DVPair.fromPartial(e)) || [];
1899
+ return message;
1900
+ },
1901
+ fromAmino(object: DVPairsAmino): DVPairs {
1902
+ const message = createBaseDVPairs();
1903
+ message.pairs = object.pairs?.map(e => DVPair.fromAmino(e)) || [];
1904
+ return message;
1905
+ },
1906
+ toAmino(message: DVPairs): DVPairsAmino {
1907
+ const obj: any = {};
1908
+ if (message.pairs) {
1909
+ obj.pairs = message.pairs.map(e => e ? DVPair.toAmino(e) : undefined);
1910
+ } else {
1911
+ obj.pairs = message.pairs;
1912
+ }
1913
+ return obj;
1914
+ },
1915
+ fromAminoMsg(object: DVPairsAminoMsg): DVPairs {
1916
+ return DVPairs.fromAmino(object.value);
1917
+ },
1918
+ toAminoMsg(message: DVPairs): DVPairsAminoMsg {
1919
+ return {
1920
+ type: "cosmos-sdk/DVPairs",
1921
+ value: DVPairs.toAmino(message)
1922
+ };
1923
+ },
1924
+ fromProtoMsg(message: DVPairsProtoMsg): DVPairs {
1925
+ return DVPairs.decode(message.value);
1926
+ },
1927
+ toProto(message: DVPairs): Uint8Array {
1928
+ return DVPairs.encode(message).finish();
1929
+ },
1930
+ toProtoMsg(message: DVPairs): DVPairsProtoMsg {
1931
+ return {
1932
+ typeUrl: "/cosmos.staking.v1beta1.DVPairs",
1933
+ value: DVPairs.encode(message).finish()
1934
+ };
1935
+ }
1936
+ };
1937
+ function createBaseDVVTriplet(): DVVTriplet {
1938
+ return {
1939
+ delegatorAddress: "",
1940
+ validatorSrcAddress: "",
1941
+ validatorDstAddress: ""
1942
+ };
1943
+ }
1944
+ export const DVVTriplet = {
1945
+ typeUrl: "/cosmos.staking.v1beta1.DVVTriplet",
1946
+ encode(message: DVVTriplet, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
1947
+ if (message.delegatorAddress !== "") {
1948
+ writer.uint32(10).string(message.delegatorAddress);
1949
+ }
1950
+ if (message.validatorSrcAddress !== "") {
1951
+ writer.uint32(18).string(message.validatorSrcAddress);
1952
+ }
1953
+ if (message.validatorDstAddress !== "") {
1954
+ writer.uint32(26).string(message.validatorDstAddress);
1955
+ }
1956
+ return writer;
1957
+ },
1958
+ decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplet {
1959
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1960
+ let end = length === undefined ? reader.len : reader.pos + length;
1961
+ const message = createBaseDVVTriplet();
1962
+ while (reader.pos < end) {
1963
+ const tag = reader.uint32();
1964
+ switch (tag >>> 3) {
1965
+ case 1:
1966
+ message.delegatorAddress = reader.string();
1967
+ break;
1968
+ case 2:
1969
+ message.validatorSrcAddress = reader.string();
1970
+ break;
1971
+ case 3:
1972
+ message.validatorDstAddress = reader.string();
1973
+ break;
1974
+ default:
1975
+ reader.skipType(tag & 7);
1976
+ break;
1977
+ }
1978
+ }
1979
+ return message;
1980
+ },
1981
+ fromPartial(object: Partial<DVVTriplet>): DVVTriplet {
1982
+ const message = createBaseDVVTriplet();
1983
+ message.delegatorAddress = object.delegatorAddress ?? "";
1984
+ message.validatorSrcAddress = object.validatorSrcAddress ?? "";
1985
+ message.validatorDstAddress = object.validatorDstAddress ?? "";
1986
+ return message;
1987
+ },
1988
+ fromAmino(object: DVVTripletAmino): DVVTriplet {
1989
+ const message = createBaseDVVTriplet();
1990
+ if (object.delegator_address !== undefined && object.delegator_address !== null) {
1991
+ message.delegatorAddress = object.delegator_address;
1992
+ }
1993
+ if (object.validator_src_address !== undefined && object.validator_src_address !== null) {
1994
+ message.validatorSrcAddress = object.validator_src_address;
1995
+ }
1996
+ if (object.validator_dst_address !== undefined && object.validator_dst_address !== null) {
1997
+ message.validatorDstAddress = object.validator_dst_address;
1998
+ }
1999
+ return message;
2000
+ },
2001
+ toAmino(message: DVVTriplet): DVVTripletAmino {
2002
+ const obj: any = {};
2003
+ obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress;
2004
+ obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress;
2005
+ obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress;
2006
+ return obj;
2007
+ },
2008
+ fromAminoMsg(object: DVVTripletAminoMsg): DVVTriplet {
2009
+ return DVVTriplet.fromAmino(object.value);
2010
+ },
2011
+ toAminoMsg(message: DVVTriplet): DVVTripletAminoMsg {
2012
+ return {
2013
+ type: "cosmos-sdk/DVVTriplet",
2014
+ value: DVVTriplet.toAmino(message)
2015
+ };
2016
+ },
2017
+ fromProtoMsg(message: DVVTripletProtoMsg): DVVTriplet {
2018
+ return DVVTriplet.decode(message.value);
2019
+ },
2020
+ toProto(message: DVVTriplet): Uint8Array {
2021
+ return DVVTriplet.encode(message).finish();
2022
+ },
2023
+ toProtoMsg(message: DVVTriplet): DVVTripletProtoMsg {
2024
+ return {
2025
+ typeUrl: "/cosmos.staking.v1beta1.DVVTriplet",
2026
+ value: DVVTriplet.encode(message).finish()
2027
+ };
2028
+ }
2029
+ };
2030
+ function createBaseDVVTriplets(): DVVTriplets {
2031
+ return {
2032
+ triplets: []
2033
+ };
2034
+ }
2035
+ export const DVVTriplets = {
2036
+ typeUrl: "/cosmos.staking.v1beta1.DVVTriplets",
2037
+ encode(message: DVVTriplets, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2038
+ for (const v of message.triplets) {
2039
+ DVVTriplet.encode(v!, writer.uint32(10).fork()).ldelim();
2040
+ }
2041
+ return writer;
2042
+ },
2043
+ decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplets {
2044
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2045
+ let end = length === undefined ? reader.len : reader.pos + length;
2046
+ const message = createBaseDVVTriplets();
2047
+ while (reader.pos < end) {
2048
+ const tag = reader.uint32();
2049
+ switch (tag >>> 3) {
2050
+ case 1:
2051
+ message.triplets.push(DVVTriplet.decode(reader, reader.uint32()));
2052
+ break;
2053
+ default:
2054
+ reader.skipType(tag & 7);
2055
+ break;
2056
+ }
2057
+ }
2058
+ return message;
2059
+ },
2060
+ fromPartial(object: Partial<DVVTriplets>): DVVTriplets {
2061
+ const message = createBaseDVVTriplets();
2062
+ message.triplets = object.triplets?.map(e => DVVTriplet.fromPartial(e)) || [];
2063
+ return message;
2064
+ },
2065
+ fromAmino(object: DVVTripletsAmino): DVVTriplets {
2066
+ const message = createBaseDVVTriplets();
2067
+ message.triplets = object.triplets?.map(e => DVVTriplet.fromAmino(e)) || [];
2068
+ return message;
2069
+ },
2070
+ toAmino(message: DVVTriplets): DVVTripletsAmino {
2071
+ const obj: any = {};
2072
+ if (message.triplets) {
2073
+ obj.triplets = message.triplets.map(e => e ? DVVTriplet.toAmino(e) : undefined);
2074
+ } else {
2075
+ obj.triplets = message.triplets;
2076
+ }
2077
+ return obj;
2078
+ },
2079
+ fromAminoMsg(object: DVVTripletsAminoMsg): DVVTriplets {
2080
+ return DVVTriplets.fromAmino(object.value);
2081
+ },
2082
+ toAminoMsg(message: DVVTriplets): DVVTripletsAminoMsg {
2083
+ return {
2084
+ type: "cosmos-sdk/DVVTriplets",
2085
+ value: DVVTriplets.toAmino(message)
2086
+ };
2087
+ },
2088
+ fromProtoMsg(message: DVVTripletsProtoMsg): DVVTriplets {
2089
+ return DVVTriplets.decode(message.value);
2090
+ },
2091
+ toProto(message: DVVTriplets): Uint8Array {
2092
+ return DVVTriplets.encode(message).finish();
2093
+ },
2094
+ toProtoMsg(message: DVVTriplets): DVVTripletsProtoMsg {
2095
+ return {
2096
+ typeUrl: "/cosmos.staking.v1beta1.DVVTriplets",
2097
+ value: DVVTriplets.encode(message).finish()
2098
+ };
2099
+ }
2100
+ };
2101
+ function createBaseDelegation(): Delegation {
2102
+ return {
2103
+ delegatorAddress: "",
2104
+ validatorAddress: "",
2105
+ shares: ""
2106
+ };
2107
+ }
2108
+ export const Delegation = {
2109
+ typeUrl: "/cosmos.staking.v1beta1.Delegation",
2110
+ encode(message: Delegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2111
+ if (message.delegatorAddress !== "") {
2112
+ writer.uint32(10).string(message.delegatorAddress);
2113
+ }
2114
+ if (message.validatorAddress !== "") {
2115
+ writer.uint32(18).string(message.validatorAddress);
2116
+ }
2117
+ if (message.shares !== "") {
2118
+ writer.uint32(26).string(Decimal.fromUserInput(message.shares, 18).atomics);
2119
+ }
2120
+ return writer;
2121
+ },
2122
+ decode(input: BinaryReader | Uint8Array, length?: number): Delegation {
2123
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2124
+ let end = length === undefined ? reader.len : reader.pos + length;
2125
+ const message = createBaseDelegation();
2126
+ while (reader.pos < end) {
2127
+ const tag = reader.uint32();
2128
+ switch (tag >>> 3) {
2129
+ case 1:
2130
+ message.delegatorAddress = reader.string();
2131
+ break;
2132
+ case 2:
2133
+ message.validatorAddress = reader.string();
2134
+ break;
2135
+ case 3:
2136
+ message.shares = Decimal.fromAtomics(reader.string(), 18).toString();
2137
+ break;
2138
+ default:
2139
+ reader.skipType(tag & 7);
2140
+ break;
2141
+ }
2142
+ }
2143
+ return message;
2144
+ },
2145
+ fromPartial(object: Partial<Delegation>): Delegation {
2146
+ const message = createBaseDelegation();
2147
+ message.delegatorAddress = object.delegatorAddress ?? "";
2148
+ message.validatorAddress = object.validatorAddress ?? "";
2149
+ message.shares = object.shares ?? "";
2150
+ return message;
2151
+ },
2152
+ fromAmino(object: DelegationAmino): Delegation {
2153
+ const message = createBaseDelegation();
2154
+ if (object.delegator_address !== undefined && object.delegator_address !== null) {
2155
+ message.delegatorAddress = object.delegator_address;
2156
+ }
2157
+ if (object.validator_address !== undefined && object.validator_address !== null) {
2158
+ message.validatorAddress = object.validator_address;
2159
+ }
2160
+ if (object.shares !== undefined && object.shares !== null) {
2161
+ message.shares = object.shares;
2162
+ }
2163
+ return message;
2164
+ },
2165
+ toAmino(message: Delegation): DelegationAmino {
2166
+ const obj: any = {};
2167
+ obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress;
2168
+ obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
2169
+ obj.shares = message.shares === "" ? undefined : message.shares;
2170
+ return obj;
2171
+ },
2172
+ fromAminoMsg(object: DelegationAminoMsg): Delegation {
2173
+ return Delegation.fromAmino(object.value);
2174
+ },
2175
+ toAminoMsg(message: Delegation): DelegationAminoMsg {
2176
+ return {
2177
+ type: "cosmos-sdk/Delegation",
2178
+ value: Delegation.toAmino(message)
2179
+ };
2180
+ },
2181
+ fromProtoMsg(message: DelegationProtoMsg): Delegation {
2182
+ return Delegation.decode(message.value);
2183
+ },
2184
+ toProto(message: Delegation): Uint8Array {
2185
+ return Delegation.encode(message).finish();
2186
+ },
2187
+ toProtoMsg(message: Delegation): DelegationProtoMsg {
2188
+ return {
2189
+ typeUrl: "/cosmos.staking.v1beta1.Delegation",
2190
+ value: Delegation.encode(message).finish()
2191
+ };
2192
+ }
2193
+ };
2194
+ function createBaseUnbondingDelegation(): UnbondingDelegation {
2195
+ return {
2196
+ delegatorAddress: "",
2197
+ validatorAddress: "",
2198
+ entries: []
2199
+ };
2200
+ }
2201
+ export const UnbondingDelegation = {
2202
+ typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation",
2203
+ encode(message: UnbondingDelegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2204
+ if (message.delegatorAddress !== "") {
2205
+ writer.uint32(10).string(message.delegatorAddress);
2206
+ }
2207
+ if (message.validatorAddress !== "") {
2208
+ writer.uint32(18).string(message.validatorAddress);
2209
+ }
2210
+ for (const v of message.entries) {
2211
+ UnbondingDelegationEntry.encode(v!, writer.uint32(26).fork()).ldelim();
2212
+ }
2213
+ return writer;
2214
+ },
2215
+ decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegation {
2216
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2217
+ let end = length === undefined ? reader.len : reader.pos + length;
2218
+ const message = createBaseUnbondingDelegation();
2219
+ while (reader.pos < end) {
2220
+ const tag = reader.uint32();
2221
+ switch (tag >>> 3) {
2222
+ case 1:
2223
+ message.delegatorAddress = reader.string();
2224
+ break;
2225
+ case 2:
2226
+ message.validatorAddress = reader.string();
2227
+ break;
2228
+ case 3:
2229
+ message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32()));
2230
+ break;
2231
+ default:
2232
+ reader.skipType(tag & 7);
2233
+ break;
2234
+ }
2235
+ }
2236
+ return message;
2237
+ },
2238
+ fromPartial(object: Partial<UnbondingDelegation>): UnbondingDelegation {
2239
+ const message = createBaseUnbondingDelegation();
2240
+ message.delegatorAddress = object.delegatorAddress ?? "";
2241
+ message.validatorAddress = object.validatorAddress ?? "";
2242
+ message.entries = object.entries?.map(e => UnbondingDelegationEntry.fromPartial(e)) || [];
2243
+ return message;
2244
+ },
2245
+ fromAmino(object: UnbondingDelegationAmino): UnbondingDelegation {
2246
+ const message = createBaseUnbondingDelegation();
2247
+ if (object.delegator_address !== undefined && object.delegator_address !== null) {
2248
+ message.delegatorAddress = object.delegator_address;
2249
+ }
2250
+ if (object.validator_address !== undefined && object.validator_address !== null) {
2251
+ message.validatorAddress = object.validator_address;
2252
+ }
2253
+ message.entries = object.entries?.map(e => UnbondingDelegationEntry.fromAmino(e)) || [];
2254
+ return message;
2255
+ },
2256
+ toAmino(message: UnbondingDelegation): UnbondingDelegationAmino {
2257
+ const obj: any = {};
2258
+ obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress;
2259
+ obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress;
2260
+ if (message.entries) {
2261
+ obj.entries = message.entries.map(e => e ? UnbondingDelegationEntry.toAmino(e) : undefined);
2262
+ } else {
2263
+ obj.entries = message.entries;
2264
+ }
2265
+ return obj;
2266
+ },
2267
+ fromAminoMsg(object: UnbondingDelegationAminoMsg): UnbondingDelegation {
2268
+ return UnbondingDelegation.fromAmino(object.value);
2269
+ },
2270
+ toAminoMsg(message: UnbondingDelegation): UnbondingDelegationAminoMsg {
2271
+ return {
2272
+ type: "cosmos-sdk/UnbondingDelegation",
2273
+ value: UnbondingDelegation.toAmino(message)
2274
+ };
2275
+ },
2276
+ fromProtoMsg(message: UnbondingDelegationProtoMsg): UnbondingDelegation {
2277
+ return UnbondingDelegation.decode(message.value);
2278
+ },
2279
+ toProto(message: UnbondingDelegation): Uint8Array {
2280
+ return UnbondingDelegation.encode(message).finish();
2281
+ },
2282
+ toProtoMsg(message: UnbondingDelegation): UnbondingDelegationProtoMsg {
2283
+ return {
2284
+ typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation",
2285
+ value: UnbondingDelegation.encode(message).finish()
2286
+ };
2287
+ }
2288
+ };
2289
+ function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry {
2290
+ return {
2291
+ creationHeight: BigInt(0),
2292
+ completionTime: new Date(),
2293
+ initialBalance: "",
2294
+ balance: "",
2295
+ unbondingId: BigInt(0),
2296
+ unbondingOnHoldRefCount: BigInt(0)
2297
+ };
2298
+ }
2299
+ export const UnbondingDelegationEntry = {
2300
+ typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry",
2301
+ encode(message: UnbondingDelegationEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2302
+ if (message.creationHeight !== BigInt(0)) {
2303
+ writer.uint32(8).int64(message.creationHeight);
2304
+ }
2305
+ if (message.completionTime !== undefined) {
2306
+ Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim();
2307
+ }
2308
+ if (message.initialBalance !== "") {
2309
+ writer.uint32(26).string(message.initialBalance);
2310
+ }
2311
+ if (message.balance !== "") {
2312
+ writer.uint32(34).string(message.balance);
2313
+ }
2314
+ if (message.unbondingId !== BigInt(0)) {
2315
+ writer.uint32(40).uint64(message.unbondingId);
2316
+ }
2317
+ if (message.unbondingOnHoldRefCount !== BigInt(0)) {
2318
+ writer.uint32(48).int64(message.unbondingOnHoldRefCount);
2319
+ }
2320
+ return writer;
2321
+ },
2322
+ decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegationEntry {
2323
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2324
+ let end = length === undefined ? reader.len : reader.pos + length;
2325
+ const message = createBaseUnbondingDelegationEntry();
2326
+ while (reader.pos < end) {
2327
+ const tag = reader.uint32();
2328
+ switch (tag >>> 3) {
2329
+ case 1:
2330
+ message.creationHeight = reader.int64();
2331
+ break;
2332
+ case 2:
2333
+ message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2334
+ break;
2335
+ case 3:
2336
+ message.initialBalance = reader.string();
2337
+ break;
2338
+ case 4:
2339
+ message.balance = reader.string();
2340
+ break;
2341
+ case 5:
2342
+ message.unbondingId = reader.uint64();
2343
+ break;
2344
+ case 6:
2345
+ message.unbondingOnHoldRefCount = reader.int64();
2346
+ break;
2347
+ default:
2348
+ reader.skipType(tag & 7);
2349
+ break;
2350
+ }
2351
+ }
2352
+ return message;
2353
+ },
2354
+ fromPartial(object: Partial<UnbondingDelegationEntry>): UnbondingDelegationEntry {
2355
+ const message = createBaseUnbondingDelegationEntry();
2356
+ message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null ? BigInt(object.creationHeight.toString()) : BigInt(0);
2357
+ message.completionTime = object.completionTime ?? undefined;
2358
+ message.initialBalance = object.initialBalance ?? "";
2359
+ message.balance = object.balance ?? "";
2360
+ message.unbondingId = object.unbondingId !== undefined && object.unbondingId !== null ? BigInt(object.unbondingId.toString()) : BigInt(0);
2361
+ message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount !== undefined && object.unbondingOnHoldRefCount !== null ? BigInt(object.unbondingOnHoldRefCount.toString()) : BigInt(0);
2362
+ return message;
2363
+ },
2364
+ fromAmino(object: UnbondingDelegationEntryAmino): UnbondingDelegationEntry {
2365
+ const message = createBaseUnbondingDelegationEntry();
2366
+ if (object.creation_height !== undefined && object.creation_height !== null) {
2367
+ message.creationHeight = BigInt(object.creation_height);
2368
+ }
2369
+ if (object.completion_time !== undefined && object.completion_time !== null) {
2370
+ message.completionTime = fromTimestamp(Timestamp.fromAmino(object.completion_time));
2371
+ }
2372
+ if (object.initial_balance !== undefined && object.initial_balance !== null) {
2373
+ message.initialBalance = object.initial_balance;
2374
+ }
2375
+ if (object.balance !== undefined && object.balance !== null) {
2376
+ message.balance = object.balance;
2377
+ }
2378
+ if (object.unbonding_id !== undefined && object.unbonding_id !== null) {
2379
+ message.unbondingId = BigInt(object.unbonding_id);
2380
+ }
2381
+ if (object.unbonding_on_hold_ref_count !== undefined && object.unbonding_on_hold_ref_count !== null) {
2382
+ message.unbondingOnHoldRefCount = BigInt(object.unbonding_on_hold_ref_count);
2383
+ }
2384
+ return message;
2385
+ },
2386
+ toAmino(message: UnbondingDelegationEntry): UnbondingDelegationEntryAmino {
2387
+ const obj: any = {};
2388
+ obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight?.toString() : undefined;
2389
+ obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : new Date();
2390
+ obj.initial_balance = message.initialBalance === "" ? undefined : message.initialBalance;
2391
+ obj.balance = message.balance === "" ? undefined : message.balance;
2392
+ obj.unbonding_id = message.unbondingId !== BigInt(0) ? message.unbondingId?.toString() : undefined;
2393
+ obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount?.toString() : undefined;
2394
+ return obj;
2395
+ },
2396
+ fromAminoMsg(object: UnbondingDelegationEntryAminoMsg): UnbondingDelegationEntry {
2397
+ return UnbondingDelegationEntry.fromAmino(object.value);
2398
+ },
2399
+ toAminoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryAminoMsg {
2400
+ return {
2401
+ type: "cosmos-sdk/UnbondingDelegationEntry",
2402
+ value: UnbondingDelegationEntry.toAmino(message)
2403
+ };
2404
+ },
2405
+ fromProtoMsg(message: UnbondingDelegationEntryProtoMsg): UnbondingDelegationEntry {
2406
+ return UnbondingDelegationEntry.decode(message.value);
2407
+ },
2408
+ toProto(message: UnbondingDelegationEntry): Uint8Array {
2409
+ return UnbondingDelegationEntry.encode(message).finish();
2410
+ },
2411
+ toProtoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryProtoMsg {
2412
+ return {
2413
+ typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry",
2414
+ value: UnbondingDelegationEntry.encode(message).finish()
2415
+ };
2416
+ }
2417
+ };
2418
+ function createBaseRedelegationEntry(): RedelegationEntry {
2419
+ return {
2420
+ creationHeight: BigInt(0),
2421
+ completionTime: new Date(),
2422
+ initialBalance: "",
2423
+ sharesDst: "",
2424
+ unbondingId: BigInt(0),
2425
+ unbondingOnHoldRefCount: BigInt(0)
2426
+ };
2427
+ }
2428
+ export const RedelegationEntry = {
2429
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry",
2430
+ encode(message: RedelegationEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2431
+ if (message.creationHeight !== BigInt(0)) {
2432
+ writer.uint32(8).int64(message.creationHeight);
2433
+ }
2434
+ if (message.completionTime !== undefined) {
2435
+ Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim();
2436
+ }
2437
+ if (message.initialBalance !== "") {
2438
+ writer.uint32(26).string(message.initialBalance);
2439
+ }
2440
+ if (message.sharesDst !== "") {
2441
+ writer.uint32(34).string(Decimal.fromUserInput(message.sharesDst, 18).atomics);
2442
+ }
2443
+ if (message.unbondingId !== BigInt(0)) {
2444
+ writer.uint32(40).uint64(message.unbondingId);
2445
+ }
2446
+ if (message.unbondingOnHoldRefCount !== BigInt(0)) {
2447
+ writer.uint32(48).int64(message.unbondingOnHoldRefCount);
2448
+ }
2449
+ return writer;
2450
+ },
2451
+ decode(input: BinaryReader | Uint8Array, length?: number): RedelegationEntry {
2452
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2453
+ let end = length === undefined ? reader.len : reader.pos + length;
2454
+ const message = createBaseRedelegationEntry();
2455
+ while (reader.pos < end) {
2456
+ const tag = reader.uint32();
2457
+ switch (tag >>> 3) {
2458
+ case 1:
2459
+ message.creationHeight = reader.int64();
2460
+ break;
2461
+ case 2:
2462
+ message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2463
+ break;
2464
+ case 3:
2465
+ message.initialBalance = reader.string();
2466
+ break;
2467
+ case 4:
2468
+ message.sharesDst = Decimal.fromAtomics(reader.string(), 18).toString();
2469
+ break;
2470
+ case 5:
2471
+ message.unbondingId = reader.uint64();
2472
+ break;
2473
+ case 6:
2474
+ message.unbondingOnHoldRefCount = reader.int64();
2475
+ break;
2476
+ default:
2477
+ reader.skipType(tag & 7);
2478
+ break;
2479
+ }
2480
+ }
2481
+ return message;
2482
+ },
2483
+ fromPartial(object: Partial<RedelegationEntry>): RedelegationEntry {
2484
+ const message = createBaseRedelegationEntry();
2485
+ message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null ? BigInt(object.creationHeight.toString()) : BigInt(0);
2486
+ message.completionTime = object.completionTime ?? undefined;
2487
+ message.initialBalance = object.initialBalance ?? "";
2488
+ message.sharesDst = object.sharesDst ?? "";
2489
+ message.unbondingId = object.unbondingId !== undefined && object.unbondingId !== null ? BigInt(object.unbondingId.toString()) : BigInt(0);
2490
+ message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount !== undefined && object.unbondingOnHoldRefCount !== null ? BigInt(object.unbondingOnHoldRefCount.toString()) : BigInt(0);
2491
+ return message;
2492
+ },
2493
+ fromAmino(object: RedelegationEntryAmino): RedelegationEntry {
2494
+ const message = createBaseRedelegationEntry();
2495
+ if (object.creation_height !== undefined && object.creation_height !== null) {
2496
+ message.creationHeight = BigInt(object.creation_height);
2497
+ }
2498
+ if (object.completion_time !== undefined && object.completion_time !== null) {
2499
+ message.completionTime = fromTimestamp(Timestamp.fromAmino(object.completion_time));
2500
+ }
2501
+ if (object.initial_balance !== undefined && object.initial_balance !== null) {
2502
+ message.initialBalance = object.initial_balance;
2503
+ }
2504
+ if (object.shares_dst !== undefined && object.shares_dst !== null) {
2505
+ message.sharesDst = object.shares_dst;
2506
+ }
2507
+ if (object.unbonding_id !== undefined && object.unbonding_id !== null) {
2508
+ message.unbondingId = BigInt(object.unbonding_id);
2509
+ }
2510
+ if (object.unbonding_on_hold_ref_count !== undefined && object.unbonding_on_hold_ref_count !== null) {
2511
+ message.unbondingOnHoldRefCount = BigInt(object.unbonding_on_hold_ref_count);
2512
+ }
2513
+ return message;
2514
+ },
2515
+ toAmino(message: RedelegationEntry): RedelegationEntryAmino {
2516
+ const obj: any = {};
2517
+ obj.creation_height = message.creationHeight !== BigInt(0) ? message.creationHeight?.toString() : undefined;
2518
+ obj.completion_time = message.completionTime ? Timestamp.toAmino(toTimestamp(message.completionTime)) : new Date();
2519
+ obj.initial_balance = message.initialBalance === "" ? undefined : message.initialBalance;
2520
+ obj.shares_dst = message.sharesDst === "" ? undefined : message.sharesDst;
2521
+ obj.unbonding_id = message.unbondingId !== BigInt(0) ? message.unbondingId?.toString() : undefined;
2522
+ obj.unbonding_on_hold_ref_count = message.unbondingOnHoldRefCount !== BigInt(0) ? message.unbondingOnHoldRefCount?.toString() : undefined;
2523
+ return obj;
2524
+ },
2525
+ fromAminoMsg(object: RedelegationEntryAminoMsg): RedelegationEntry {
2526
+ return RedelegationEntry.fromAmino(object.value);
2527
+ },
2528
+ toAminoMsg(message: RedelegationEntry): RedelegationEntryAminoMsg {
2529
+ return {
2530
+ type: "cosmos-sdk/RedelegationEntry",
2531
+ value: RedelegationEntry.toAmino(message)
2532
+ };
2533
+ },
2534
+ fromProtoMsg(message: RedelegationEntryProtoMsg): RedelegationEntry {
2535
+ return RedelegationEntry.decode(message.value);
2536
+ },
2537
+ toProto(message: RedelegationEntry): Uint8Array {
2538
+ return RedelegationEntry.encode(message).finish();
2539
+ },
2540
+ toProtoMsg(message: RedelegationEntry): RedelegationEntryProtoMsg {
2541
+ return {
2542
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry",
2543
+ value: RedelegationEntry.encode(message).finish()
2544
+ };
2545
+ }
2546
+ };
2547
+ function createBaseRedelegation(): Redelegation {
2548
+ return {
2549
+ delegatorAddress: "",
2550
+ validatorSrcAddress: "",
2551
+ validatorDstAddress: "",
2552
+ entries: []
2553
+ };
2554
+ }
2555
+ export const Redelegation = {
2556
+ typeUrl: "/cosmos.staking.v1beta1.Redelegation",
2557
+ encode(message: Redelegation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2558
+ if (message.delegatorAddress !== "") {
2559
+ writer.uint32(10).string(message.delegatorAddress);
2560
+ }
2561
+ if (message.validatorSrcAddress !== "") {
2562
+ writer.uint32(18).string(message.validatorSrcAddress);
2563
+ }
2564
+ if (message.validatorDstAddress !== "") {
2565
+ writer.uint32(26).string(message.validatorDstAddress);
2566
+ }
2567
+ for (const v of message.entries) {
2568
+ RedelegationEntry.encode(v!, writer.uint32(34).fork()).ldelim();
2569
+ }
2570
+ return writer;
2571
+ },
2572
+ decode(input: BinaryReader | Uint8Array, length?: number): Redelegation {
2573
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2574
+ let end = length === undefined ? reader.len : reader.pos + length;
2575
+ const message = createBaseRedelegation();
2576
+ while (reader.pos < end) {
2577
+ const tag = reader.uint32();
2578
+ switch (tag >>> 3) {
2579
+ case 1:
2580
+ message.delegatorAddress = reader.string();
2581
+ break;
2582
+ case 2:
2583
+ message.validatorSrcAddress = reader.string();
2584
+ break;
2585
+ case 3:
2586
+ message.validatorDstAddress = reader.string();
2587
+ break;
2588
+ case 4:
2589
+ message.entries.push(RedelegationEntry.decode(reader, reader.uint32()));
2590
+ break;
2591
+ default:
2592
+ reader.skipType(tag & 7);
2593
+ break;
2594
+ }
2595
+ }
2596
+ return message;
2597
+ },
2598
+ fromPartial(object: Partial<Redelegation>): Redelegation {
2599
+ const message = createBaseRedelegation();
2600
+ message.delegatorAddress = object.delegatorAddress ?? "";
2601
+ message.validatorSrcAddress = object.validatorSrcAddress ?? "";
2602
+ message.validatorDstAddress = object.validatorDstAddress ?? "";
2603
+ message.entries = object.entries?.map(e => RedelegationEntry.fromPartial(e)) || [];
2604
+ return message;
2605
+ },
2606
+ fromAmino(object: RedelegationAmino): Redelegation {
2607
+ const message = createBaseRedelegation();
2608
+ if (object.delegator_address !== undefined && object.delegator_address !== null) {
2609
+ message.delegatorAddress = object.delegator_address;
2610
+ }
2611
+ if (object.validator_src_address !== undefined && object.validator_src_address !== null) {
2612
+ message.validatorSrcAddress = object.validator_src_address;
2613
+ }
2614
+ if (object.validator_dst_address !== undefined && object.validator_dst_address !== null) {
2615
+ message.validatorDstAddress = object.validator_dst_address;
2616
+ }
2617
+ message.entries = object.entries?.map(e => RedelegationEntry.fromAmino(e)) || [];
2618
+ return message;
2619
+ },
2620
+ toAmino(message: Redelegation): RedelegationAmino {
2621
+ const obj: any = {};
2622
+ obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress;
2623
+ obj.validator_src_address = message.validatorSrcAddress === "" ? undefined : message.validatorSrcAddress;
2624
+ obj.validator_dst_address = message.validatorDstAddress === "" ? undefined : message.validatorDstAddress;
2625
+ if (message.entries) {
2626
+ obj.entries = message.entries.map(e => e ? RedelegationEntry.toAmino(e) : undefined);
2627
+ } else {
2628
+ obj.entries = message.entries;
2629
+ }
2630
+ return obj;
2631
+ },
2632
+ fromAminoMsg(object: RedelegationAminoMsg): Redelegation {
2633
+ return Redelegation.fromAmino(object.value);
2634
+ },
2635
+ toAminoMsg(message: Redelegation): RedelegationAminoMsg {
2636
+ return {
2637
+ type: "cosmos-sdk/Redelegation",
2638
+ value: Redelegation.toAmino(message)
2639
+ };
2640
+ },
2641
+ fromProtoMsg(message: RedelegationProtoMsg): Redelegation {
2642
+ return Redelegation.decode(message.value);
2643
+ },
2644
+ toProto(message: Redelegation): Uint8Array {
2645
+ return Redelegation.encode(message).finish();
2646
+ },
2647
+ toProtoMsg(message: Redelegation): RedelegationProtoMsg {
2648
+ return {
2649
+ typeUrl: "/cosmos.staking.v1beta1.Redelegation",
2650
+ value: Redelegation.encode(message).finish()
2651
+ };
2652
+ }
2653
+ };
2654
+ function createBaseParams(): Params {
2655
+ return {
2656
+ unbondingTime: Duration.fromPartial({}),
2657
+ maxValidators: 0,
2658
+ maxEntries: 0,
2659
+ historicalEntries: 0,
2660
+ bondDenom: "",
2661
+ minCommissionRate: ""
2662
+ };
2663
+ }
2664
+ export const Params = {
2665
+ typeUrl: "/cosmos.staking.v1beta1.Params",
2666
+ encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2667
+ if (message.unbondingTime !== undefined) {
2668
+ Duration.encode(message.unbondingTime, writer.uint32(10).fork()).ldelim();
2669
+ }
2670
+ if (message.maxValidators !== 0) {
2671
+ writer.uint32(16).uint32(message.maxValidators);
2672
+ }
2673
+ if (message.maxEntries !== 0) {
2674
+ writer.uint32(24).uint32(message.maxEntries);
2675
+ }
2676
+ if (message.historicalEntries !== 0) {
2677
+ writer.uint32(32).uint32(message.historicalEntries);
2678
+ }
2679
+ if (message.bondDenom !== "") {
2680
+ writer.uint32(42).string(message.bondDenom);
2681
+ }
2682
+ if (message.minCommissionRate !== "") {
2683
+ writer.uint32(50).string(Decimal.fromUserInput(message.minCommissionRate, 18).atomics);
2684
+ }
2685
+ return writer;
2686
+ },
2687
+ decode(input: BinaryReader | Uint8Array, length?: number): Params {
2688
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2689
+ let end = length === undefined ? reader.len : reader.pos + length;
2690
+ const message = createBaseParams();
2691
+ while (reader.pos < end) {
2692
+ const tag = reader.uint32();
2693
+ switch (tag >>> 3) {
2694
+ case 1:
2695
+ message.unbondingTime = Duration.decode(reader, reader.uint32());
2696
+ break;
2697
+ case 2:
2698
+ message.maxValidators = reader.uint32();
2699
+ break;
2700
+ case 3:
2701
+ message.maxEntries = reader.uint32();
2702
+ break;
2703
+ case 4:
2704
+ message.historicalEntries = reader.uint32();
2705
+ break;
2706
+ case 5:
2707
+ message.bondDenom = reader.string();
2708
+ break;
2709
+ case 6:
2710
+ message.minCommissionRate = Decimal.fromAtomics(reader.string(), 18).toString();
2711
+ break;
2712
+ default:
2713
+ reader.skipType(tag & 7);
2714
+ break;
2715
+ }
2716
+ }
2717
+ return message;
2718
+ },
2719
+ fromPartial(object: Partial<Params>): Params {
2720
+ const message = createBaseParams();
2721
+ message.unbondingTime = object.unbondingTime !== undefined && object.unbondingTime !== null ? Duration.fromPartial(object.unbondingTime) : undefined;
2722
+ message.maxValidators = object.maxValidators ?? 0;
2723
+ message.maxEntries = object.maxEntries ?? 0;
2724
+ message.historicalEntries = object.historicalEntries ?? 0;
2725
+ message.bondDenom = object.bondDenom ?? "";
2726
+ message.minCommissionRate = object.minCommissionRate ?? "";
2727
+ return message;
2728
+ },
2729
+ fromAmino(object: ParamsAmino): Params {
2730
+ const message = createBaseParams();
2731
+ if (object.unbonding_time !== undefined && object.unbonding_time !== null) {
2732
+ message.unbondingTime = Duration.fromAmino(object.unbonding_time);
2733
+ }
2734
+ if (object.max_validators !== undefined && object.max_validators !== null) {
2735
+ message.maxValidators = object.max_validators;
2736
+ }
2737
+ if (object.max_entries !== undefined && object.max_entries !== null) {
2738
+ message.maxEntries = object.max_entries;
2739
+ }
2740
+ if (object.historical_entries !== undefined && object.historical_entries !== null) {
2741
+ message.historicalEntries = object.historical_entries;
2742
+ }
2743
+ if (object.bond_denom !== undefined && object.bond_denom !== null) {
2744
+ message.bondDenom = object.bond_denom;
2745
+ }
2746
+ if (object.min_commission_rate !== undefined && object.min_commission_rate !== null) {
2747
+ message.minCommissionRate = object.min_commission_rate;
2748
+ }
2749
+ return message;
2750
+ },
2751
+ toAmino(message: Params): ParamsAmino {
2752
+ const obj: any = {};
2753
+ obj.unbonding_time = message.unbondingTime ? Duration.toAmino(message.unbondingTime) : Duration.toAmino(Duration.fromPartial({}));
2754
+ obj.max_validators = message.maxValidators === 0 ? undefined : message.maxValidators;
2755
+ obj.max_entries = message.maxEntries === 0 ? undefined : message.maxEntries;
2756
+ obj.historical_entries = message.historicalEntries === 0 ? undefined : message.historicalEntries;
2757
+ obj.bond_denom = message.bondDenom === "" ? undefined : message.bondDenom;
2758
+ obj.min_commission_rate = message.minCommissionRate ?? "";
2759
+ return obj;
2760
+ },
2761
+ fromAminoMsg(object: ParamsAminoMsg): Params {
2762
+ return Params.fromAmino(object.value);
2763
+ },
2764
+ toAminoMsg(message: Params): ParamsAminoMsg {
2765
+ return {
2766
+ type: "cosmos-sdk/x/staking/Params",
2767
+ value: Params.toAmino(message)
2768
+ };
2769
+ },
2770
+ fromProtoMsg(message: ParamsProtoMsg): Params {
2771
+ return Params.decode(message.value);
2772
+ },
2773
+ toProto(message: Params): Uint8Array {
2774
+ return Params.encode(message).finish();
2775
+ },
2776
+ toProtoMsg(message: Params): ParamsProtoMsg {
2777
+ return {
2778
+ typeUrl: "/cosmos.staking.v1beta1.Params",
2779
+ value: Params.encode(message).finish()
2780
+ };
2781
+ }
2782
+ };
2783
+ function createBaseDelegationResponse(): DelegationResponse {
2784
+ return {
2785
+ delegation: Delegation.fromPartial({}),
2786
+ balance: Coin.fromPartial({})
2787
+ };
2788
+ }
2789
+ export const DelegationResponse = {
2790
+ typeUrl: "/cosmos.staking.v1beta1.DelegationResponse",
2791
+ encode(message: DelegationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2792
+ if (message.delegation !== undefined) {
2793
+ Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim();
2794
+ }
2795
+ if (message.balance !== undefined) {
2796
+ Coin.encode(message.balance, writer.uint32(18).fork()).ldelim();
2797
+ }
2798
+ return writer;
2799
+ },
2800
+ decode(input: BinaryReader | Uint8Array, length?: number): DelegationResponse {
2801
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2802
+ let end = length === undefined ? reader.len : reader.pos + length;
2803
+ const message = createBaseDelegationResponse();
2804
+ while (reader.pos < end) {
2805
+ const tag = reader.uint32();
2806
+ switch (tag >>> 3) {
2807
+ case 1:
2808
+ message.delegation = Delegation.decode(reader, reader.uint32());
2809
+ break;
2810
+ case 2:
2811
+ message.balance = Coin.decode(reader, reader.uint32());
2812
+ break;
2813
+ default:
2814
+ reader.skipType(tag & 7);
2815
+ break;
2816
+ }
2817
+ }
2818
+ return message;
2819
+ },
2820
+ fromPartial(object: Partial<DelegationResponse>): DelegationResponse {
2821
+ const message = createBaseDelegationResponse();
2822
+ message.delegation = object.delegation !== undefined && object.delegation !== null ? Delegation.fromPartial(object.delegation) : undefined;
2823
+ message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined;
2824
+ return message;
2825
+ },
2826
+ fromAmino(object: DelegationResponseAmino): DelegationResponse {
2827
+ const message = createBaseDelegationResponse();
2828
+ if (object.delegation !== undefined && object.delegation !== null) {
2829
+ message.delegation = Delegation.fromAmino(object.delegation);
2830
+ }
2831
+ if (object.balance !== undefined && object.balance !== null) {
2832
+ message.balance = Coin.fromAmino(object.balance);
2833
+ }
2834
+ return message;
2835
+ },
2836
+ toAmino(message: DelegationResponse): DelegationResponseAmino {
2837
+ const obj: any = {};
2838
+ obj.delegation = message.delegation ? Delegation.toAmino(message.delegation) : Delegation.toAmino(Delegation.fromPartial({}));
2839
+ obj.balance = message.balance ? Coin.toAmino(message.balance) : Coin.toAmino(Coin.fromPartial({}));
2840
+ return obj;
2841
+ },
2842
+ fromAminoMsg(object: DelegationResponseAminoMsg): DelegationResponse {
2843
+ return DelegationResponse.fromAmino(object.value);
2844
+ },
2845
+ toAminoMsg(message: DelegationResponse): DelegationResponseAminoMsg {
2846
+ return {
2847
+ type: "cosmos-sdk/DelegationResponse",
2848
+ value: DelegationResponse.toAmino(message)
2849
+ };
2850
+ },
2851
+ fromProtoMsg(message: DelegationResponseProtoMsg): DelegationResponse {
2852
+ return DelegationResponse.decode(message.value);
2853
+ },
2854
+ toProto(message: DelegationResponse): Uint8Array {
2855
+ return DelegationResponse.encode(message).finish();
2856
+ },
2857
+ toProtoMsg(message: DelegationResponse): DelegationResponseProtoMsg {
2858
+ return {
2859
+ typeUrl: "/cosmos.staking.v1beta1.DelegationResponse",
2860
+ value: DelegationResponse.encode(message).finish()
2861
+ };
2862
+ }
2863
+ };
2864
+ function createBaseRedelegationEntryResponse(): RedelegationEntryResponse {
2865
+ return {
2866
+ redelegationEntry: RedelegationEntry.fromPartial({}),
2867
+ balance: ""
2868
+ };
2869
+ }
2870
+ export const RedelegationEntryResponse = {
2871
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse",
2872
+ encode(message: RedelegationEntryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2873
+ if (message.redelegationEntry !== undefined) {
2874
+ RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim();
2875
+ }
2876
+ if (message.balance !== "") {
2877
+ writer.uint32(34).string(message.balance);
2878
+ }
2879
+ return writer;
2880
+ },
2881
+ decode(input: BinaryReader | Uint8Array, length?: number): RedelegationEntryResponse {
2882
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2883
+ let end = length === undefined ? reader.len : reader.pos + length;
2884
+ const message = createBaseRedelegationEntryResponse();
2885
+ while (reader.pos < end) {
2886
+ const tag = reader.uint32();
2887
+ switch (tag >>> 3) {
2888
+ case 1:
2889
+ message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32());
2890
+ break;
2891
+ case 4:
2892
+ message.balance = reader.string();
2893
+ break;
2894
+ default:
2895
+ reader.skipType(tag & 7);
2896
+ break;
2897
+ }
2898
+ }
2899
+ return message;
2900
+ },
2901
+ fromPartial(object: Partial<RedelegationEntryResponse>): RedelegationEntryResponse {
2902
+ const message = createBaseRedelegationEntryResponse();
2903
+ message.redelegationEntry = object.redelegationEntry !== undefined && object.redelegationEntry !== null ? RedelegationEntry.fromPartial(object.redelegationEntry) : undefined;
2904
+ message.balance = object.balance ?? "";
2905
+ return message;
2906
+ },
2907
+ fromAmino(object: RedelegationEntryResponseAmino): RedelegationEntryResponse {
2908
+ const message = createBaseRedelegationEntryResponse();
2909
+ if (object.redelegation_entry !== undefined && object.redelegation_entry !== null) {
2910
+ message.redelegationEntry = RedelegationEntry.fromAmino(object.redelegation_entry);
2911
+ }
2912
+ if (object.balance !== undefined && object.balance !== null) {
2913
+ message.balance = object.balance;
2914
+ }
2915
+ return message;
2916
+ },
2917
+ toAmino(message: RedelegationEntryResponse): RedelegationEntryResponseAmino {
2918
+ const obj: any = {};
2919
+ obj.redelegation_entry = message.redelegationEntry ? RedelegationEntry.toAmino(message.redelegationEntry) : RedelegationEntry.toAmino(RedelegationEntry.fromPartial({}));
2920
+ obj.balance = message.balance === "" ? undefined : message.balance;
2921
+ return obj;
2922
+ },
2923
+ fromAminoMsg(object: RedelegationEntryResponseAminoMsg): RedelegationEntryResponse {
2924
+ return RedelegationEntryResponse.fromAmino(object.value);
2925
+ },
2926
+ toAminoMsg(message: RedelegationEntryResponse): RedelegationEntryResponseAminoMsg {
2927
+ return {
2928
+ type: "cosmos-sdk/RedelegationEntryResponse",
2929
+ value: RedelegationEntryResponse.toAmino(message)
2930
+ };
2931
+ },
2932
+ fromProtoMsg(message: RedelegationEntryResponseProtoMsg): RedelegationEntryResponse {
2933
+ return RedelegationEntryResponse.decode(message.value);
2934
+ },
2935
+ toProto(message: RedelegationEntryResponse): Uint8Array {
2936
+ return RedelegationEntryResponse.encode(message).finish();
2937
+ },
2938
+ toProtoMsg(message: RedelegationEntryResponse): RedelegationEntryResponseProtoMsg {
2939
+ return {
2940
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse",
2941
+ value: RedelegationEntryResponse.encode(message).finish()
2942
+ };
2943
+ }
2944
+ };
2945
+ function createBaseRedelegationResponse(): RedelegationResponse {
2946
+ return {
2947
+ redelegation: Redelegation.fromPartial({}),
2948
+ entries: []
2949
+ };
2950
+ }
2951
+ export const RedelegationResponse = {
2952
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse",
2953
+ encode(message: RedelegationResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
2954
+ if (message.redelegation !== undefined) {
2955
+ Redelegation.encode(message.redelegation, writer.uint32(10).fork()).ldelim();
2956
+ }
2957
+ for (const v of message.entries) {
2958
+ RedelegationEntryResponse.encode(v!, writer.uint32(18).fork()).ldelim();
2959
+ }
2960
+ return writer;
2961
+ },
2962
+ decode(input: BinaryReader | Uint8Array, length?: number): RedelegationResponse {
2963
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2964
+ let end = length === undefined ? reader.len : reader.pos + length;
2965
+ const message = createBaseRedelegationResponse();
2966
+ while (reader.pos < end) {
2967
+ const tag = reader.uint32();
2968
+ switch (tag >>> 3) {
2969
+ case 1:
2970
+ message.redelegation = Redelegation.decode(reader, reader.uint32());
2971
+ break;
2972
+ case 2:
2973
+ message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32()));
2974
+ break;
2975
+ default:
2976
+ reader.skipType(tag & 7);
2977
+ break;
2978
+ }
2979
+ }
2980
+ return message;
2981
+ },
2982
+ fromPartial(object: Partial<RedelegationResponse>): RedelegationResponse {
2983
+ const message = createBaseRedelegationResponse();
2984
+ message.redelegation = object.redelegation !== undefined && object.redelegation !== null ? Redelegation.fromPartial(object.redelegation) : undefined;
2985
+ message.entries = object.entries?.map(e => RedelegationEntryResponse.fromPartial(e)) || [];
2986
+ return message;
2987
+ },
2988
+ fromAmino(object: RedelegationResponseAmino): RedelegationResponse {
2989
+ const message = createBaseRedelegationResponse();
2990
+ if (object.redelegation !== undefined && object.redelegation !== null) {
2991
+ message.redelegation = Redelegation.fromAmino(object.redelegation);
2992
+ }
2993
+ message.entries = object.entries?.map(e => RedelegationEntryResponse.fromAmino(e)) || [];
2994
+ return message;
2995
+ },
2996
+ toAmino(message: RedelegationResponse): RedelegationResponseAmino {
2997
+ const obj: any = {};
2998
+ obj.redelegation = message.redelegation ? Redelegation.toAmino(message.redelegation) : Redelegation.toAmino(Redelegation.fromPartial({}));
2999
+ if (message.entries) {
3000
+ obj.entries = message.entries.map(e => e ? RedelegationEntryResponse.toAmino(e) : undefined);
3001
+ } else {
3002
+ obj.entries = message.entries;
3003
+ }
3004
+ return obj;
3005
+ },
3006
+ fromAminoMsg(object: RedelegationResponseAminoMsg): RedelegationResponse {
3007
+ return RedelegationResponse.fromAmino(object.value);
3008
+ },
3009
+ toAminoMsg(message: RedelegationResponse): RedelegationResponseAminoMsg {
3010
+ return {
3011
+ type: "cosmos-sdk/RedelegationResponse",
3012
+ value: RedelegationResponse.toAmino(message)
3013
+ };
3014
+ },
3015
+ fromProtoMsg(message: RedelegationResponseProtoMsg): RedelegationResponse {
3016
+ return RedelegationResponse.decode(message.value);
3017
+ },
3018
+ toProto(message: RedelegationResponse): Uint8Array {
3019
+ return RedelegationResponse.encode(message).finish();
3020
+ },
3021
+ toProtoMsg(message: RedelegationResponse): RedelegationResponseProtoMsg {
3022
+ return {
3023
+ typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse",
3024
+ value: RedelegationResponse.encode(message).finish()
3025
+ };
3026
+ }
3027
+ };
3028
+ function createBasePool(): Pool {
3029
+ return {
3030
+ notBondedTokens: "",
3031
+ bondedTokens: ""
3032
+ };
3033
+ }
3034
+ export const Pool = {
3035
+ typeUrl: "/cosmos.staking.v1beta1.Pool",
3036
+ encode(message: Pool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
3037
+ if (message.notBondedTokens !== "") {
3038
+ writer.uint32(10).string(message.notBondedTokens);
3039
+ }
3040
+ if (message.bondedTokens !== "") {
3041
+ writer.uint32(18).string(message.bondedTokens);
3042
+ }
3043
+ return writer;
3044
+ },
3045
+ decode(input: BinaryReader | Uint8Array, length?: number): Pool {
3046
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3047
+ let end = length === undefined ? reader.len : reader.pos + length;
3048
+ const message = createBasePool();
3049
+ while (reader.pos < end) {
3050
+ const tag = reader.uint32();
3051
+ switch (tag >>> 3) {
3052
+ case 1:
3053
+ message.notBondedTokens = reader.string();
3054
+ break;
3055
+ case 2:
3056
+ message.bondedTokens = reader.string();
3057
+ break;
3058
+ default:
3059
+ reader.skipType(tag & 7);
3060
+ break;
3061
+ }
3062
+ }
3063
+ return message;
3064
+ },
3065
+ fromPartial(object: Partial<Pool>): Pool {
3066
+ const message = createBasePool();
3067
+ message.notBondedTokens = object.notBondedTokens ?? "";
3068
+ message.bondedTokens = object.bondedTokens ?? "";
3069
+ return message;
3070
+ },
3071
+ fromAmino(object: PoolAmino): Pool {
3072
+ const message = createBasePool();
3073
+ if (object.not_bonded_tokens !== undefined && object.not_bonded_tokens !== null) {
3074
+ message.notBondedTokens = object.not_bonded_tokens;
3075
+ }
3076
+ if (object.bonded_tokens !== undefined && object.bonded_tokens !== null) {
3077
+ message.bondedTokens = object.bonded_tokens;
3078
+ }
3079
+ return message;
3080
+ },
3081
+ toAmino(message: Pool): PoolAmino {
3082
+ const obj: any = {};
3083
+ obj.not_bonded_tokens = message.notBondedTokens ?? "";
3084
+ obj.bonded_tokens = message.bondedTokens ?? "";
3085
+ return obj;
3086
+ },
3087
+ fromAminoMsg(object: PoolAminoMsg): Pool {
3088
+ return Pool.fromAmino(object.value);
3089
+ },
3090
+ toAminoMsg(message: Pool): PoolAminoMsg {
3091
+ return {
3092
+ type: "cosmos-sdk/Pool",
3093
+ value: Pool.toAmino(message)
3094
+ };
3095
+ },
3096
+ fromProtoMsg(message: PoolProtoMsg): Pool {
3097
+ return Pool.decode(message.value);
3098
+ },
3099
+ toProto(message: Pool): Uint8Array {
3100
+ return Pool.encode(message).finish();
3101
+ },
3102
+ toProtoMsg(message: Pool): PoolProtoMsg {
3103
+ return {
3104
+ typeUrl: "/cosmos.staking.v1beta1.Pool",
3105
+ value: Pool.encode(message).finish()
3106
+ };
3107
+ }
3108
+ };
3109
+ function createBaseValidatorUpdates(): ValidatorUpdates {
3110
+ return {
3111
+ updates: []
3112
+ };
3113
+ }
3114
+ export const ValidatorUpdates = {
3115
+ typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates",
3116
+ encode(message: ValidatorUpdates, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
3117
+ for (const v of message.updates) {
3118
+ ValidatorUpdate.encode(v!, writer.uint32(10).fork()).ldelim();
3119
+ }
3120
+ return writer;
3121
+ },
3122
+ decode(input: BinaryReader | Uint8Array, length?: number): ValidatorUpdates {
3123
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3124
+ let end = length === undefined ? reader.len : reader.pos + length;
3125
+ const message = createBaseValidatorUpdates();
3126
+ while (reader.pos < end) {
3127
+ const tag = reader.uint32();
3128
+ switch (tag >>> 3) {
3129
+ case 1:
3130
+ message.updates.push(ValidatorUpdate.decode(reader, reader.uint32()));
3131
+ break;
3132
+ default:
3133
+ reader.skipType(tag & 7);
3134
+ break;
3135
+ }
3136
+ }
3137
+ return message;
3138
+ },
3139
+ fromPartial(object: Partial<ValidatorUpdates>): ValidatorUpdates {
3140
+ const message = createBaseValidatorUpdates();
3141
+ message.updates = object.updates?.map(e => ValidatorUpdate.fromPartial(e)) || [];
3142
+ return message;
3143
+ },
3144
+ fromAmino(object: ValidatorUpdatesAmino): ValidatorUpdates {
3145
+ const message = createBaseValidatorUpdates();
3146
+ message.updates = object.updates?.map(e => ValidatorUpdate.fromAmino(e)) || [];
3147
+ return message;
3148
+ },
3149
+ toAmino(message: ValidatorUpdates): ValidatorUpdatesAmino {
3150
+ const obj: any = {};
3151
+ if (message.updates) {
3152
+ obj.updates = message.updates.map(e => e ? ValidatorUpdate.toAmino(e) : undefined);
3153
+ } else {
3154
+ obj.updates = message.updates;
3155
+ }
3156
+ return obj;
3157
+ },
3158
+ fromAminoMsg(object: ValidatorUpdatesAminoMsg): ValidatorUpdates {
3159
+ return ValidatorUpdates.fromAmino(object.value);
3160
+ },
3161
+ toAminoMsg(message: ValidatorUpdates): ValidatorUpdatesAminoMsg {
3162
+ return {
3163
+ type: "cosmos-sdk/ValidatorUpdates",
3164
+ value: ValidatorUpdates.toAmino(message)
3165
+ };
3166
+ },
3167
+ fromProtoMsg(message: ValidatorUpdatesProtoMsg): ValidatorUpdates {
3168
+ return ValidatorUpdates.decode(message.value);
3169
+ },
3170
+ toProto(message: ValidatorUpdates): Uint8Array {
3171
+ return ValidatorUpdates.encode(message).finish();
3172
+ },
3173
+ toProtoMsg(message: ValidatorUpdates): ValidatorUpdatesProtoMsg {
3174
+ return {
3175
+ typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates",
3176
+ value: ValidatorUpdates.encode(message).finish()
3177
+ };
3178
+ }
3179
+ };
3180
+ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: BinaryReader | Uint8Array): Any => {
3181
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3182
+ const data = Any.decode(reader, reader.uint32());
3183
+ switch (data.typeUrl) {
3184
+ default:
3185
+ return data;
3186
+ }
3187
+ };
3188
+ export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino): Any => {
3189
+ return encodePubkey(content);
3190
+ };
3191
+ export const Cosmos_cryptoPubKey_ToAmino = (content: Any): Pubkey | null => {
3192
+ return decodePubkey(content);
3193
+ };