@xpla/xpla-react 1.7.0-beta.0

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 (346) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +47 -0
  3. package/src/amino/amino.ts +1 -0
  4. package/src/binary.ts +534 -0
  5. package/src/cosmos/app/runtime/v1alpha1/module.ts +423 -0
  6. package/src/cosmos/app/runtime/v2/module.ts +589 -0
  7. package/src/cosmos/app/v1alpha1/config.ts +422 -0
  8. package/src/cosmos/app/v1alpha1/module.ts +461 -0
  9. package/src/cosmos/app/v1alpha1/query.rpc.func.ts +14 -0
  10. package/src/cosmos/app/v1alpha1/query.ts +177 -0
  11. package/src/cosmos/auth/module/v1/module.ts +253 -0
  12. package/src/cosmos/auth/v1beta1/accounts.ts +226 -0
  13. package/src/cosmos/auth/v1beta1/auth.ts +550 -0
  14. package/src/cosmos/auth/v1beta1/genesis.ts +119 -0
  15. package/src/cosmos/auth/v1beta1/query.rpc.func.ts +113 -0
  16. package/src/cosmos/auth/v1beta1/query.ts +2034 -0
  17. package/src/cosmos/auth/v1beta1/tx.registry.ts +29 -0
  18. package/src/cosmos/auth/v1beta1/tx.rpc.func.ts +13 -0
  19. package/src/cosmos/auth/v1beta1/tx.ts +219 -0
  20. package/src/cosmos/authz/module/v1/module.ts +80 -0
  21. package/src/cosmos/authz/v1beta1/authz.ts +481 -0
  22. package/src/cosmos/authz/v1beta1/event.ts +259 -0
  23. package/src/cosmos/authz/v1beta1/genesis.ts +100 -0
  24. package/src/cosmos/authz/v1beta1/query.rpc.func.ts +36 -0
  25. package/src/cosmos/authz/v1beta1/query.ts +707 -0
  26. package/src/cosmos/authz/v1beta1/tx.registry.ts +65 -0
  27. package/src/cosmos/authz/v1beta1/tx.rpc.func.ts +31 -0
  28. package/src/cosmos/authz/v1beta1/tx.ts +647 -0
  29. package/src/cosmos/autocli/v1/options.ts +1145 -0
  30. package/src/cosmos/autocli/v1/query.rpc.func.ts +14 -0
  31. package/src/cosmos/autocli/v1/query.ts +288 -0
  32. package/src/cosmos/bank/module/v1/module.ts +153 -0
  33. package/src/cosmos/bank/v1beta1/authz.ts +138 -0
  34. package/src/cosmos/bank/v1beta1/bank.ts +974 -0
  35. package/src/cosmos/bank/v1beta1/genesis.ts +307 -0
  36. package/src/cosmos/bank/v1beta1/query.rpc.func.ts +146 -0
  37. package/src/cosmos/bank/v1beta1/query.ts +3027 -0
  38. package/src/cosmos/bank/v1beta1/tx.registry.ts +83 -0
  39. package/src/cosmos/bank/v1beta1/tx.rpc.func.ts +40 -0
  40. package/src/cosmos/bank/v1beta1/tx.ts +861 -0
  41. package/src/cosmos/base/abci/v1beta1/abci.ts +1698 -0
  42. package/src/cosmos/base/grpc/v2/service.rpc.func.ts +25 -0
  43. package/src/cosmos/base/grpc/v2/service.ts +473 -0
  44. package/src/cosmos/base/node/v1beta1/query.rpc.func.ts +25 -0
  45. package/src/cosmos/base/node/v1beta1/query.ts +454 -0
  46. package/src/cosmos/base/query/v1beta1/pagination.ts +361 -0
  47. package/src/cosmos/base/reflection/v1beta1/reflection.rpc.func.ts +25 -0
  48. package/src/cosmos/base/reflection/v1beta1/reflection.ts +382 -0
  49. package/src/cosmos/base/reflection/v2alpha1/reflection.rpc.func.ts +69 -0
  50. package/src/cosmos/base/reflection/v2alpha1/reflection.ts +2727 -0
  51. package/src/cosmos/base/tendermint/v1beta1/query.rpc.func.ts +80 -0
  52. package/src/cosmos/base/tendermint/v1beta1/query.ts +2302 -0
  53. package/src/cosmos/base/tendermint/v1beta1/types.ts +455 -0
  54. package/src/cosmos/base/v1beta1/coin.ts +439 -0
  55. package/src/cosmos/circuit/module/v1/module.ts +99 -0
  56. package/src/cosmos/circuit/v1/query.rpc.func.ts +36 -0
  57. package/src/cosmos/circuit/v1/query.ts +574 -0
  58. package/src/cosmos/circuit/v1/tx.registry.ts +65 -0
  59. package/src/cosmos/circuit/v1/tx.rpc.func.ts +31 -0
  60. package/src/cosmos/circuit/v1/tx.ts +676 -0
  61. package/src/cosmos/circuit/v1/types.ts +413 -0
  62. package/src/cosmos/consensus/module/v1/module.ts +99 -0
  63. package/src/cosmos/consensus/v1/query.rpc.func.ts +14 -0
  64. package/src/cosmos/consensus/v1/query.ts +185 -0
  65. package/src/cosmos/consensus/v1/tx.registry.ts +29 -0
  66. package/src/cosmos/consensus/v1/tx.rpc.func.ts +13 -0
  67. package/src/cosmos/consensus/v1/tx.ts +255 -0
  68. package/src/cosmos/crisis/module/v1/module.ts +115 -0
  69. package/src/cosmos/crisis/v1beta1/genesis.ts +106 -0
  70. package/src/cosmos/crisis/v1beta1/tx.registry.ts +47 -0
  71. package/src/cosmos/crisis/v1beta1/tx.rpc.func.ts +22 -0
  72. package/src/cosmos/crisis/v1beta1/tx.ts +416 -0
  73. package/src/cosmos/crypto/ed25519/keys.ts +209 -0
  74. package/src/cosmos/crypto/hd/v1/hd.ts +169 -0
  75. package/src/cosmos/crypto/keyring/v1/record.ts +529 -0
  76. package/src/cosmos/crypto/multisig/keys.ts +122 -0
  77. package/src/cosmos/crypto/multisig/v1beta1/multisig.ts +225 -0
  78. package/src/cosmos/crypto/secp256k1/keys.ts +203 -0
  79. package/src/cosmos/crypto/secp256r1/keys.ts +201 -0
  80. package/src/cosmos/distribution/module/v1/module.ts +113 -0
  81. package/src/cosmos/distribution/v1beta1/distribution.ts +1494 -0
  82. package/src/cosmos/distribution/v1beta1/genesis.ts +1129 -0
  83. package/src/cosmos/distribution/v1beta1/query.rpc.func.ts +113 -0
  84. package/src/cosmos/distribution/v1beta1/query.ts +2126 -0
  85. package/src/cosmos/distribution/v1beta1/tx.registry.ts +137 -0
  86. package/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +67 -0
  87. package/src/cosmos/distribution/v1beta1/tx.ts +1478 -0
  88. package/src/cosmos/evidence/module/v1/module.ts +80 -0
  89. package/src/cosmos/evidence/v1beta1/evidence.ts +154 -0
  90. package/src/cosmos/evidence/v1beta1/genesis.ts +102 -0
  91. package/src/cosmos/evidence/v1beta1/query.rpc.func.ts +25 -0
  92. package/src/cosmos/evidence/v1beta1/query.ts +451 -0
  93. package/src/cosmos/evidence/v1beta1/tx.registry.ts +29 -0
  94. package/src/cosmos/evidence/v1beta1/tx.rpc.func.ts +13 -0
  95. package/src/cosmos/evidence/v1beta1/tx.ts +221 -0
  96. package/src/cosmos/feegrant/module/v1/module.ts +80 -0
  97. package/src/cosmos/feegrant/v1beta1/feegrant.ts +573 -0
  98. package/src/cosmos/feegrant/v1beta1/genesis.ts +100 -0
  99. package/src/cosmos/feegrant/v1beta1/query.rpc.func.ts +36 -0
  100. package/src/cosmos/feegrant/v1beta1/query.ts +677 -0
  101. package/src/cosmos/feegrant/v1beta1/tx.registry.ts +65 -0
  102. package/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +31 -0
  103. package/src/cosmos/feegrant/v1beta1/tx.ts +597 -0
  104. package/src/cosmos/genutil/module/v1/module.ts +80 -0
  105. package/src/cosmos/genutil/v1beta1/genesis.ts +101 -0
  106. package/src/cosmos/gov/module/v1/module.ts +121 -0
  107. package/src/cosmos/gov/v1/genesis.ts +280 -0
  108. package/src/cosmos/gov/v1/gov.ts +1843 -0
  109. package/src/cosmos/gov/v1/query.rpc.func.ts +102 -0
  110. package/src/cosmos/gov/v1/query.ts +1970 -0
  111. package/src/cosmos/gov/v1/tx.registry.ts +137 -0
  112. package/src/cosmos/gov/v1/tx.rpc.func.ts +67 -0
  113. package/src/cosmos/gov/v1/tx.ts +1657 -0
  114. package/src/cosmos/gov/v1beta1/genesis.ts +202 -0
  115. package/src/cosmos/gov/v1beta1/gov.ts +1425 -0
  116. package/src/cosmos/gov/v1beta1/query.rpc.func.ts +91 -0
  117. package/src/cosmos/gov/v1beta1/query.ts +1749 -0
  118. package/src/cosmos/gov/v1beta1/tx.registry.ts +83 -0
  119. package/src/cosmos/gov/v1beta1/tx.rpc.func.ts +40 -0
  120. package/src/cosmos/gov/v1beta1/tx.ts +881 -0
  121. package/src/cosmos/group/module/v1/module.ts +128 -0
  122. package/src/cosmos/group/v1/events.ts +1044 -0
  123. package/src/cosmos/group/v1/genesis.ts +240 -0
  124. package/src/cosmos/group/v1/query.rpc.func.ts +157 -0
  125. package/src/cosmos/group/v1/query.ts +3015 -0
  126. package/src/cosmos/group/v1/tx.registry.ts +263 -0
  127. package/src/cosmos/group/v1/tx.rpc.func.ts +130 -0
  128. package/src/cosmos/group/v1/tx.ts +3207 -0
  129. package/src/cosmos/group/v1/types.ts +2081 -0
  130. package/src/cosmos/ics23/v1/proofs.ts +2060 -0
  131. package/src/cosmos/mint/module/v1/module.ts +113 -0
  132. package/src/cosmos/mint/v1beta1/genesis.ts +116 -0
  133. package/src/cosmos/mint/v1beta1/mint.ts +291 -0
  134. package/src/cosmos/mint/v1beta1/query.rpc.func.ts +36 -0
  135. package/src/cosmos/mint/v1beta1/query.ts +541 -0
  136. package/src/cosmos/mint/v1beta1/tx.registry.ts +29 -0
  137. package/src/cosmos/mint/v1beta1/tx.rpc.func.ts +13 -0
  138. package/src/cosmos/mint/v1beta1/tx.ts +219 -0
  139. package/src/cosmos/msg/textual/v1/textual.ts +1 -0
  140. package/src/cosmos/msg/v1/msg.ts +1 -0
  141. package/src/cosmos/nft/module/v1/module.ts +80 -0
  142. package/src/cosmos/nft/v1beta1/event.ts +403 -0
  143. package/src/cosmos/nft/v1beta1/genesis.ts +234 -0
  144. package/src/cosmos/nft/v1beta1/nft.ts +356 -0
  145. package/src/cosmos/nft/v1beta1/query.rpc.func.ts +80 -0
  146. package/src/cosmos/nft/v1beta1/query.ts +1465 -0
  147. package/src/cosmos/nft/v1beta1/tx.registry.ts +29 -0
  148. package/src/cosmos/nft/v1beta1/tx.rpc.func.ts +13 -0
  149. package/src/cosmos/nft/v1beta1/tx.ts +224 -0
  150. package/src/cosmos/orm/module/v1alpha1/module.ts +88 -0
  151. package/src/cosmos/orm/query/v1alpha1/query.rpc.func.ts +25 -0
  152. package/src/cosmos/orm/query/v1alpha1/query.ts +993 -0
  153. package/src/cosmos/orm/v1/orm.ts +589 -0
  154. package/src/cosmos/orm/v1alpha1/schema.ts +325 -0
  155. package/src/cosmos/params/module/v1/module.ts +80 -0
  156. package/src/cosmos/params/v1beta1/params.ts +255 -0
  157. package/src/cosmos/params/v1beta1/query.rpc.func.ts +25 -0
  158. package/src/cosmos/params/v1beta1/query.ts +525 -0
  159. package/src/cosmos/query/v1/query.ts +1 -0
  160. package/src/cosmos/reflection/v1/reflection.rpc.func.ts +14 -0
  161. package/src/cosmos/reflection/v1/reflection.ts +179 -0
  162. package/src/cosmos/slashing/module/v1/module.ts +99 -0
  163. package/src/cosmos/slashing/v1beta1/genesis.ts +492 -0
  164. package/src/cosmos/slashing/v1beta1/query.rpc.func.ts +36 -0
  165. package/src/cosmos/slashing/v1beta1/query.ts +598 -0
  166. package/src/cosmos/slashing/v1beta1/slashing.ts +357 -0
  167. package/src/cosmos/slashing/v1beta1/tx.registry.ts +47 -0
  168. package/src/cosmos/slashing/v1beta1/tx.rpc.func.ts +22 -0
  169. package/src/cosmos/slashing/v1beta1/tx.ts +390 -0
  170. package/src/cosmos/staking/module/v1/module.ts +157 -0
  171. package/src/cosmos/staking/v1beta1/authz.ts +323 -0
  172. package/src/cosmos/staking/v1beta1/genesis.ts +346 -0
  173. package/src/cosmos/staking/v1beta1/query.rpc.func.ts +157 -0
  174. package/src/cosmos/staking/v1beta1/query.ts +3073 -0
  175. package/src/cosmos/staking/v1beta1/staking.ts +3005 -0
  176. package/src/cosmos/staking/v1beta1/tx.registry.ts +137 -0
  177. package/src/cosmos/staking/v1beta1/tx.rpc.func.ts +67 -0
  178. package/src/cosmos/staking/v1beta1/tx.ts +1638 -0
  179. package/src/cosmos/store/internal/kv/v1beta1/kv.ts +207 -0
  180. package/src/cosmos/store/snapshots/v1/snapshot.ts +863 -0
  181. package/src/cosmos/store/snapshots/v2/snapshot.ts +823 -0
  182. package/src/cosmos/store/streaming/abci/grpc.ts +393 -0
  183. package/src/cosmos/store/v1beta1/commit_info.ts +362 -0
  184. package/src/cosmos/store/v1beta1/listening.ts +286 -0
  185. package/src/cosmos/streaming/v1/grpc.ts +985 -0
  186. package/src/cosmos/tx/config/v1/config.ts +127 -0
  187. package/src/cosmos/tx/signing/v1beta1/signing.ts +688 -0
  188. package/src/cosmos/tx/v1beta1/service.rpc.func.ts +102 -0
  189. package/src/cosmos/tx/v1beta1/service.ts +2294 -0
  190. package/src/cosmos/tx/v1beta1/tx.ts +2029 -0
  191. package/src/cosmos/upgrade/module/v1/module.ts +99 -0
  192. package/src/cosmos/upgrade/v1beta1/query.rpc.func.ts +58 -0
  193. package/src/cosmos/upgrade/v1beta1/query.ts +1016 -0
  194. package/src/cosmos/upgrade/v1beta1/tx.registry.ts +47 -0
  195. package/src/cosmos/upgrade/v1beta1/tx.rpc.func.ts +22 -0
  196. package/src/cosmos/upgrade/v1beta1/tx.ts +398 -0
  197. package/src/cosmos/upgrade/v1beta1/upgrade.ts +591 -0
  198. package/src/cosmos/validate/module/v1/module.ts +80 -0
  199. package/src/cosmos/vesting/module/v1/module.ts +80 -0
  200. package/src/cosmos/vesting/v1beta1/tx.registry.ts +65 -0
  201. package/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +31 -0
  202. package/src/cosmos/vesting/v1beta1/tx.ts +698 -0
  203. package/src/cosmos/vesting/v1beta1/vesting.ts +735 -0
  204. package/src/cosmos_proto/cosmos.ts +341 -0
  205. package/src/cosmwasm/wasm/v1/authz.ts +1231 -0
  206. package/src/cosmwasm/wasm/v1/genesis.ts +532 -0
  207. package/src/cosmwasm/wasm/v1/ibc.ts +355 -0
  208. package/src/cosmwasm/wasm/v1/proposal_legacy.ts +2432 -0
  209. package/src/cosmwasm/wasm/v1/query.rpc.func.ts +124 -0
  210. package/src/cosmwasm/wasm/v1/query.ts +2560 -0
  211. package/src/cosmwasm/wasm/v1/tx.registry.ts +317 -0
  212. package/src/cosmwasm/wasm/v1/tx.rpc.func.ts +157 -0
  213. package/src/cosmwasm/wasm/v1/tx.ts +4191 -0
  214. package/src/cosmwasm/wasm/v1/types.ts +1120 -0
  215. package/src/ethermint/crypto/v1/ethsecp256k1/keys.ts +193 -0
  216. package/src/ethermint/evm/v1/events.ts +485 -0
  217. package/src/ethermint/evm/v1/evm.ts +1590 -0
  218. package/src/ethermint/evm/v1/genesis.ts +240 -0
  219. package/src/ethermint/evm/v1/query.rpc.func.ts +136 -0
  220. package/src/ethermint/evm/v1/query.ts +2535 -0
  221. package/src/ethermint/evm/v1/tx.registry.ts +47 -0
  222. package/src/ethermint/evm/v1/tx.rpc.func.ts +22 -0
  223. package/src/ethermint/evm/v1/tx.ts +1333 -0
  224. package/src/ethermint/feemarket/v1/events.ts +195 -0
  225. package/src/ethermint/feemarket/v1/feemarket.ts +213 -0
  226. package/src/ethermint/feemarket/v1/genesis.ts +114 -0
  227. package/src/ethermint/feemarket/v1/query.rpc.func.ts +36 -0
  228. package/src/ethermint/feemarket/v1/query.ts +487 -0
  229. package/src/ethermint/feemarket/v1/tx.registry.ts +29 -0
  230. package/src/ethermint/feemarket/v1/tx.rpc.func.ts +13 -0
  231. package/src/ethermint/feemarket/v1/tx.ts +197 -0
  232. package/src/ethermint/types/v1/account.ts +114 -0
  233. package/src/ethermint/types/v1/dynamic_fee.ts +91 -0
  234. package/src/ethermint/types/v1/indexer.ts +205 -0
  235. package/src/ethermint/types/v1/web3.ts +147 -0
  236. package/src/extern.ts +38 -0
  237. package/src/gogoproto/gogo.ts +1 -0
  238. package/src/google/api/annotations.ts +1 -0
  239. package/src/google/api/http.ts +1069 -0
  240. package/src/google/protobuf/any.ts +331 -0
  241. package/src/google/protobuf/descriptor.ts +7177 -0
  242. package/src/google/protobuf/duration.ts +225 -0
  243. package/src/google/protobuf/timestamp.ts +281 -0
  244. package/src/helper-func-types.ts +191 -0
  245. package/src/helpers.ts +259 -0
  246. package/src/ibc/applications/fee/v1/ack.ts +131 -0
  247. package/src/ibc/applications/fee/v1/fee.ts +481 -0
  248. package/src/ibc/applications/fee/v1/genesis.ts +661 -0
  249. package/src/ibc/applications/fee/v1/metadata.ts +121 -0
  250. package/src/ibc/applications/fee/v1/query.rpc.func.ts +113 -0
  251. package/src/ibc/applications/fee/v1/query.ts +2134 -0
  252. package/src/ibc/applications/fee/v1/tx.registry.ts +83 -0
  253. package/src/ibc/applications/fee/v1/tx.rpc.func.ts +40 -0
  254. package/src/ibc/applications/fee/v1/tx.ts +889 -0
  255. package/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +105 -0
  256. package/src/ibc/applications/interchain_accounts/controller/v1/query.rpc.func.ts +25 -0
  257. package/src/ibc/applications/interchain_accounts/controller/v1/query.ts +379 -0
  258. package/src/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts +65 -0
  259. package/src/ibc/applications/interchain_accounts/controller/v1/tx.rpc.func.ts +31 -0
  260. package/src/ibc/applications/interchain_accounts/controller/v1/tx.ts +685 -0
  261. package/src/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +661 -0
  262. package/src/ibc/applications/interchain_accounts/host/v1/host.ts +253 -0
  263. package/src/ibc/applications/interchain_accounts/host/v1/query.rpc.func.ts +14 -0
  264. package/src/ibc/applications/interchain_accounts/host/v1/query.ts +177 -0
  265. package/src/ibc/applications/interchain_accounts/host/v1/tx.registry.ts +47 -0
  266. package/src/ibc/applications/interchain_accounts/host/v1/tx.rpc.func.ts +22 -0
  267. package/src/ibc/applications/interchain_accounts/host/v1/tx.ts +429 -0
  268. package/src/ibc/applications/interchain_accounts/v1/account.ts +112 -0
  269. package/src/ibc/applications/interchain_accounts/v1/metadata.ts +191 -0
  270. package/src/ibc/applications/interchain_accounts/v1/packet.ts +259 -0
  271. package/src/ibc/applications/transfer/v1/authz.ts +280 -0
  272. package/src/ibc/applications/transfer/v1/genesis.ts +153 -0
  273. package/src/ibc/applications/transfer/v1/query.rpc.func.ts +69 -0
  274. package/src/ibc/applications/transfer/v1/query.ts +1205 -0
  275. package/src/ibc/applications/transfer/v1/transfer.ts +261 -0
  276. package/src/ibc/applications/transfer/v1/tx.registry.ts +47 -0
  277. package/src/ibc/applications/transfer/v1/tx.rpc.func.ts +22 -0
  278. package/src/ibc/applications/transfer/v1/tx.ts +532 -0
  279. package/src/ibc/applications/transfer/v2/packet.ts +171 -0
  280. package/src/ibc/core/channel/v1/channel.ts +1510 -0
  281. package/src/ibc/core/channel/v1/genesis.ts +354 -0
  282. package/src/ibc/core/channel/v1/query.rpc.func.ts +190 -0
  283. package/src/ibc/core/channel/v1/query.ts +4354 -0
  284. package/src/ibc/core/channel/v1/tx.registry.ts +353 -0
  285. package/src/ibc/core/channel/v1/tx.rpc.func.ts +175 -0
  286. package/src/ibc/core/channel/v1/tx.ts +4866 -0
  287. package/src/ibc/core/channel/v1/upgrade.ts +388 -0
  288. package/src/ibc/core/client/v1/client.ts +927 -0
  289. package/src/ibc/core/client/v1/genesis.ts +426 -0
  290. package/src/ibc/core/client/v1/query.rpc.func.ts +113 -0
  291. package/src/ibc/core/client/v1/query.ts +2280 -0
  292. package/src/ibc/core/client/v1/tx.registry.ts +137 -0
  293. package/src/ibc/core/client/v1/tx.rpc.func.ts +67 -0
  294. package/src/ibc/core/client/v1/tx.ts +1543 -0
  295. package/src/ibc/core/commitment/v1/commitment.ts +418 -0
  296. package/src/ibc/core/connection/v1/connection.ts +1010 -0
  297. package/src/ibc/core/connection/v1/genesis.ts +146 -0
  298. package/src/ibc/core/connection/v1/query.rpc.func.ts +69 -0
  299. package/src/ibc/core/connection/v1/query.ts +1408 -0
  300. package/src/ibc/core/connection/v1/tx.registry.ts +101 -0
  301. package/src/ibc/core/connection/v1/tx.rpc.func.ts +49 -0
  302. package/src/ibc/core/connection/v1/tx.ts +1365 -0
  303. package/src/ibc/core/types/v1/genesis.ts +137 -0
  304. package/src/ibc/lightclients/localhost/v2/localhost.ts +100 -0
  305. package/src/ibc/lightclients/solomachine/v2/solomachine.ts +2103 -0
  306. package/src/ibc/lightclients/solomachine/v3/solomachine.ts +1070 -0
  307. package/src/ibc/lightclients/tendermint/v1/tendermint.ts +838 -0
  308. package/src/ibc/lightclients/wasm/v1/genesis.ts +197 -0
  309. package/src/ibc/lightclients/wasm/v1/query.rpc.func.ts +25 -0
  310. package/src/ibc/lightclients/wasm/v1/query.ts +404 -0
  311. package/src/ibc/lightclients/wasm/v1/tx.registry.ts +65 -0
  312. package/src/ibc/lightclients/wasm/v1/tx.rpc.func.ts +31 -0
  313. package/src/ibc/lightclients/wasm/v1/tx.ts +621 -0
  314. package/src/ibc/lightclients/wasm/v1/wasm.ts +438 -0
  315. package/src/react-query.ts +185 -0
  316. package/src/registry.ts +218 -0
  317. package/src/tendermint/abci/types.ts +6283 -0
  318. package/src/tendermint/crypto/keys.ts +103 -0
  319. package/src/tendermint/crypto/proof.ts +555 -0
  320. package/src/tendermint/p2p/types.ts +507 -0
  321. package/src/tendermint/types/block.ts +131 -0
  322. package/src/tendermint/types/evidence.ts +476 -0
  323. package/src/tendermint/types/params.ts +814 -0
  324. package/src/tendermint/types/types.ts +2157 -0
  325. package/src/tendermint/types/validator.ts +389 -0
  326. package/src/tendermint/version/types.ts +219 -0
  327. package/src/types.ts +155 -0
  328. package/src/utf8.ts +148 -0
  329. package/src/varint.ts +488 -0
  330. package/src/xpla/reward/v1beta1/genesis.ts +92 -0
  331. package/src/xpla/reward/v1beta1/query.rpc.func.ts +25 -0
  332. package/src/xpla/reward/v1beta1/query.ts +333 -0
  333. package/src/xpla/reward/v1beta1/reward.ts +153 -0
  334. package/src/xpla/reward/v1beta1/tx.registry.ts +47 -0
  335. package/src/xpla/reward/v1beta1/tx.rpc.func.ts +22 -0
  336. package/src/xpla/reward/v1beta1/tx.ts +391 -0
  337. package/src/xpla/volunteer/v1beta1/genesis.ts +92 -0
  338. package/src/xpla/volunteer/v1beta1/proposal.ts +649 -0
  339. package/src/xpla/volunteer/v1beta1/query.rpc.func.ts +14 -0
  340. package/src/xpla/volunteer/v1beta1/query.ts +160 -0
  341. package/src/xpla/volunteer/v1beta1/tx.registry.ts +47 -0
  342. package/src/xpla/volunteer/v1beta1/tx.rpc.func.ts +22 -0
  343. package/src/xpla/volunteer/v1beta1/tx.ts +448 -0
  344. package/src/xpla/volunteer/v1beta1/volunteervalidator.ts +107 -0
  345. package/tsconfig.esm.json +10 -0
  346. package/tsconfig.json +10 -0
@@ -0,0 +1,362 @@
1
+ import { Timestamp } from "../../../google/protobuf/timestamp";
2
+ import { BinaryReader, BinaryWriter } from "../../../binary";
3
+ import { toTimestamp, fromTimestamp, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
4
+ import { GlobalDecoderRegistry } from "../../../registry";
5
+ /**
6
+ * CommitInfo defines commit information used by the multi-store when committing
7
+ * a version/height.
8
+ */
9
+ export interface CommitInfo {
10
+ version: bigint;
11
+ storeInfos: StoreInfo[];
12
+ timestamp: Date;
13
+ }
14
+ export interface CommitInfoProtoMsg {
15
+ typeUrl: "/cosmos.store.v1beta1.CommitInfo";
16
+ value: Uint8Array;
17
+ }
18
+ /**
19
+ * CommitInfo defines commit information used by the multi-store when committing
20
+ * a version/height.
21
+ */
22
+ export interface CommitInfoAmino {
23
+ version: string;
24
+ store_infos: StoreInfoAmino[];
25
+ timestamp: string;
26
+ }
27
+ export interface CommitInfoAminoMsg {
28
+ type: "cosmos-sdk/CommitInfo";
29
+ value: CommitInfoAmino;
30
+ }
31
+ /**
32
+ * StoreInfo defines store-specific commit information. It contains a reference
33
+ * between a store name and the commit ID.
34
+ */
35
+ export interface StoreInfo {
36
+ name: string;
37
+ commitId: CommitID;
38
+ }
39
+ export interface StoreInfoProtoMsg {
40
+ typeUrl: "/cosmos.store.v1beta1.StoreInfo";
41
+ value: Uint8Array;
42
+ }
43
+ /**
44
+ * StoreInfo defines store-specific commit information. It contains a reference
45
+ * between a store name and the commit ID.
46
+ */
47
+ export interface StoreInfoAmino {
48
+ name: string;
49
+ commit_id: CommitIDAmino;
50
+ }
51
+ export interface StoreInfoAminoMsg {
52
+ type: "cosmos-sdk/StoreInfo";
53
+ value: StoreInfoAmino;
54
+ }
55
+ /**
56
+ * CommitID defines the commitment information when a specific store is
57
+ * committed.
58
+ */
59
+ export interface CommitID {
60
+ version: bigint;
61
+ hash: Uint8Array;
62
+ }
63
+ export interface CommitIDProtoMsg {
64
+ typeUrl: "/cosmos.store.v1beta1.CommitID";
65
+ value: Uint8Array;
66
+ }
67
+ /**
68
+ * CommitID defines the commitment information when a specific store is
69
+ * committed.
70
+ */
71
+ export interface CommitIDAmino {
72
+ version: string;
73
+ hash: string;
74
+ }
75
+ export interface CommitIDAminoMsg {
76
+ type: "cosmos-sdk/CommitID";
77
+ value: CommitIDAmino;
78
+ }
79
+ function createBaseCommitInfo(): CommitInfo {
80
+ return {
81
+ version: BigInt(0),
82
+ storeInfos: [],
83
+ timestamp: new Date()
84
+ };
85
+ }
86
+ export const CommitInfo = {
87
+ typeUrl: "/cosmos.store.v1beta1.CommitInfo",
88
+ aminoType: "cosmos-sdk/CommitInfo",
89
+ is(o: any): o is CommitInfo {
90
+ return o && (o.$typeUrl === CommitInfo.typeUrl || typeof o.version === "bigint" && Array.isArray(o.storeInfos) && (!o.storeInfos.length || StoreInfo.is(o.storeInfos[0])) && Timestamp.is(o.timestamp));
91
+ },
92
+ isAmino(o: any): o is CommitInfoAmino {
93
+ return o && (o.$typeUrl === CommitInfo.typeUrl || typeof o.version === "bigint" && Array.isArray(o.store_infos) && (!o.store_infos.length || StoreInfo.isAmino(o.store_infos[0])) && Timestamp.isAmino(o.timestamp));
94
+ },
95
+ encode(message: CommitInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
96
+ if (message.version !== BigInt(0)) {
97
+ writer.uint32(8).int64(message.version);
98
+ }
99
+ for (const v of message.storeInfos) {
100
+ StoreInfo.encode(v!, writer.uint32(18).fork()).ldelim();
101
+ }
102
+ if (message.timestamp !== undefined) {
103
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim();
104
+ }
105
+ return writer;
106
+ },
107
+ decode(input: BinaryReader | Uint8Array, length?: number): CommitInfo {
108
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
109
+ let end = length === undefined ? reader.len : reader.pos + length;
110
+ const message = createBaseCommitInfo();
111
+ while (reader.pos < end) {
112
+ const tag = reader.uint32();
113
+ switch (tag >>> 3) {
114
+ case 1:
115
+ message.version = reader.int64();
116
+ break;
117
+ case 2:
118
+ message.storeInfos.push(StoreInfo.decode(reader, reader.uint32()));
119
+ break;
120
+ case 3:
121
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
122
+ break;
123
+ default:
124
+ reader.skipType(tag & 7);
125
+ break;
126
+ }
127
+ }
128
+ return message;
129
+ },
130
+ fromPartial(object: DeepPartial<CommitInfo>): CommitInfo {
131
+ const message = createBaseCommitInfo();
132
+ message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0);
133
+ message.storeInfos = object.storeInfos?.map(e => StoreInfo.fromPartial(e)) || [];
134
+ message.timestamp = object.timestamp ?? undefined;
135
+ return message;
136
+ },
137
+ fromAmino(object: CommitInfoAmino): CommitInfo {
138
+ const message = createBaseCommitInfo();
139
+ if (object.version !== undefined && object.version !== null) {
140
+ message.version = BigInt(object.version);
141
+ }
142
+ message.storeInfos = object.store_infos?.map(e => StoreInfo.fromAmino(e)) || [];
143
+ if (object.timestamp !== undefined && object.timestamp !== null) {
144
+ message.timestamp = fromTimestamp(Timestamp.fromAmino(object.timestamp));
145
+ }
146
+ return message;
147
+ },
148
+ toAmino(message: CommitInfo): CommitInfoAmino {
149
+ const obj: any = {};
150
+ obj.version = message.version !== BigInt(0) ? message.version?.toString() : undefined;
151
+ if (message.storeInfos) {
152
+ obj.store_infos = message.storeInfos.map(e => e ? StoreInfo.toAmino(e) : undefined);
153
+ } else {
154
+ obj.store_infos = message.storeInfos;
155
+ }
156
+ obj.timestamp = message.timestamp ? Timestamp.toAmino(toTimestamp(message.timestamp)) : undefined;
157
+ return obj;
158
+ },
159
+ fromAminoMsg(object: CommitInfoAminoMsg): CommitInfo {
160
+ return CommitInfo.fromAmino(object.value);
161
+ },
162
+ toAminoMsg(message: CommitInfo): CommitInfoAminoMsg {
163
+ return {
164
+ type: "cosmos-sdk/CommitInfo",
165
+ value: CommitInfo.toAmino(message)
166
+ };
167
+ },
168
+ fromProtoMsg(message: CommitInfoProtoMsg): CommitInfo {
169
+ return CommitInfo.decode(message.value);
170
+ },
171
+ toProto(message: CommitInfo): Uint8Array {
172
+ return CommitInfo.encode(message).finish();
173
+ },
174
+ toProtoMsg(message: CommitInfo): CommitInfoProtoMsg {
175
+ return {
176
+ typeUrl: "/cosmos.store.v1beta1.CommitInfo",
177
+ value: CommitInfo.encode(message).finish()
178
+ };
179
+ }
180
+ };
181
+ GlobalDecoderRegistry.register(CommitInfo.typeUrl, CommitInfo);
182
+ GlobalDecoderRegistry.registerAminoProtoMapping(CommitInfo.aminoType, CommitInfo.typeUrl);
183
+ function createBaseStoreInfo(): StoreInfo {
184
+ return {
185
+ name: "",
186
+ commitId: CommitID.fromPartial({})
187
+ };
188
+ }
189
+ export const StoreInfo = {
190
+ typeUrl: "/cosmos.store.v1beta1.StoreInfo",
191
+ aminoType: "cosmos-sdk/StoreInfo",
192
+ is(o: any): o is StoreInfo {
193
+ return o && (o.$typeUrl === StoreInfo.typeUrl || typeof o.name === "string" && CommitID.is(o.commitId));
194
+ },
195
+ isAmino(o: any): o is StoreInfoAmino {
196
+ return o && (o.$typeUrl === StoreInfo.typeUrl || typeof o.name === "string" && CommitID.isAmino(o.commit_id));
197
+ },
198
+ encode(message: StoreInfo, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
199
+ if (message.name !== "") {
200
+ writer.uint32(10).string(message.name);
201
+ }
202
+ if (message.commitId !== undefined) {
203
+ CommitID.encode(message.commitId, writer.uint32(18).fork()).ldelim();
204
+ }
205
+ return writer;
206
+ },
207
+ decode(input: BinaryReader | Uint8Array, length?: number): StoreInfo {
208
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
209
+ let end = length === undefined ? reader.len : reader.pos + length;
210
+ const message = createBaseStoreInfo();
211
+ while (reader.pos < end) {
212
+ const tag = reader.uint32();
213
+ switch (tag >>> 3) {
214
+ case 1:
215
+ message.name = reader.string();
216
+ break;
217
+ case 2:
218
+ message.commitId = CommitID.decode(reader, reader.uint32());
219
+ break;
220
+ default:
221
+ reader.skipType(tag & 7);
222
+ break;
223
+ }
224
+ }
225
+ return message;
226
+ },
227
+ fromPartial(object: DeepPartial<StoreInfo>): StoreInfo {
228
+ const message = createBaseStoreInfo();
229
+ message.name = object.name ?? "";
230
+ message.commitId = object.commitId !== undefined && object.commitId !== null ? CommitID.fromPartial(object.commitId) : undefined;
231
+ return message;
232
+ },
233
+ fromAmino(object: StoreInfoAmino): StoreInfo {
234
+ const message = createBaseStoreInfo();
235
+ if (object.name !== undefined && object.name !== null) {
236
+ message.name = object.name;
237
+ }
238
+ if (object.commit_id !== undefined && object.commit_id !== null) {
239
+ message.commitId = CommitID.fromAmino(object.commit_id);
240
+ }
241
+ return message;
242
+ },
243
+ toAmino(message: StoreInfo): StoreInfoAmino {
244
+ const obj: any = {};
245
+ obj.name = message.name === "" ? undefined : message.name;
246
+ obj.commit_id = message.commitId ? CommitID.toAmino(message.commitId) : undefined;
247
+ return obj;
248
+ },
249
+ fromAminoMsg(object: StoreInfoAminoMsg): StoreInfo {
250
+ return StoreInfo.fromAmino(object.value);
251
+ },
252
+ toAminoMsg(message: StoreInfo): StoreInfoAminoMsg {
253
+ return {
254
+ type: "cosmos-sdk/StoreInfo",
255
+ value: StoreInfo.toAmino(message)
256
+ };
257
+ },
258
+ fromProtoMsg(message: StoreInfoProtoMsg): StoreInfo {
259
+ return StoreInfo.decode(message.value);
260
+ },
261
+ toProto(message: StoreInfo): Uint8Array {
262
+ return StoreInfo.encode(message).finish();
263
+ },
264
+ toProtoMsg(message: StoreInfo): StoreInfoProtoMsg {
265
+ return {
266
+ typeUrl: "/cosmos.store.v1beta1.StoreInfo",
267
+ value: StoreInfo.encode(message).finish()
268
+ };
269
+ }
270
+ };
271
+ GlobalDecoderRegistry.register(StoreInfo.typeUrl, StoreInfo);
272
+ GlobalDecoderRegistry.registerAminoProtoMapping(StoreInfo.aminoType, StoreInfo.typeUrl);
273
+ function createBaseCommitID(): CommitID {
274
+ return {
275
+ version: BigInt(0),
276
+ hash: new Uint8Array()
277
+ };
278
+ }
279
+ export const CommitID = {
280
+ typeUrl: "/cosmos.store.v1beta1.CommitID",
281
+ aminoType: "cosmos-sdk/CommitID",
282
+ is(o: any): o is CommitID {
283
+ return o && (o.$typeUrl === CommitID.typeUrl || typeof o.version === "bigint" && (o.hash instanceof Uint8Array || typeof o.hash === "string"));
284
+ },
285
+ isAmino(o: any): o is CommitIDAmino {
286
+ return o && (o.$typeUrl === CommitID.typeUrl || typeof o.version === "bigint" && (o.hash instanceof Uint8Array || typeof o.hash === "string"));
287
+ },
288
+ encode(message: CommitID, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
289
+ if (message.version !== BigInt(0)) {
290
+ writer.uint32(8).int64(message.version);
291
+ }
292
+ if (message.hash.length !== 0) {
293
+ writer.uint32(18).bytes(message.hash);
294
+ }
295
+ return writer;
296
+ },
297
+ decode(input: BinaryReader | Uint8Array, length?: number): CommitID {
298
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
299
+ let end = length === undefined ? reader.len : reader.pos + length;
300
+ const message = createBaseCommitID();
301
+ while (reader.pos < end) {
302
+ const tag = reader.uint32();
303
+ switch (tag >>> 3) {
304
+ case 1:
305
+ message.version = reader.int64();
306
+ break;
307
+ case 2:
308
+ message.hash = reader.bytes();
309
+ break;
310
+ default:
311
+ reader.skipType(tag & 7);
312
+ break;
313
+ }
314
+ }
315
+ return message;
316
+ },
317
+ fromPartial(object: DeepPartial<CommitID>): CommitID {
318
+ const message = createBaseCommitID();
319
+ message.version = object.version !== undefined && object.version !== null ? BigInt(object.version.toString()) : BigInt(0);
320
+ message.hash = object.hash ?? new Uint8Array();
321
+ return message;
322
+ },
323
+ fromAmino(object: CommitIDAmino): CommitID {
324
+ const message = createBaseCommitID();
325
+ if (object.version !== undefined && object.version !== null) {
326
+ message.version = BigInt(object.version);
327
+ }
328
+ if (object.hash !== undefined && object.hash !== null) {
329
+ message.hash = bytesFromBase64(object.hash);
330
+ }
331
+ return message;
332
+ },
333
+ toAmino(message: CommitID): CommitIDAmino {
334
+ const obj: any = {};
335
+ obj.version = message.version !== BigInt(0) ? message.version?.toString() : undefined;
336
+ obj.hash = message.hash ? base64FromBytes(message.hash) : undefined;
337
+ return obj;
338
+ },
339
+ fromAminoMsg(object: CommitIDAminoMsg): CommitID {
340
+ return CommitID.fromAmino(object.value);
341
+ },
342
+ toAminoMsg(message: CommitID): CommitIDAminoMsg {
343
+ return {
344
+ type: "cosmos-sdk/CommitID",
345
+ value: CommitID.toAmino(message)
346
+ };
347
+ },
348
+ fromProtoMsg(message: CommitIDProtoMsg): CommitID {
349
+ return CommitID.decode(message.value);
350
+ },
351
+ toProto(message: CommitID): Uint8Array {
352
+ return CommitID.encode(message).finish();
353
+ },
354
+ toProtoMsg(message: CommitID): CommitIDProtoMsg {
355
+ return {
356
+ typeUrl: "/cosmos.store.v1beta1.CommitID",
357
+ value: CommitID.encode(message).finish()
358
+ };
359
+ }
360
+ };
361
+ GlobalDecoderRegistry.register(CommitID.typeUrl, CommitID);
362
+ GlobalDecoderRegistry.registerAminoProtoMapping(CommitID.aminoType, CommitID.typeUrl);
@@ -0,0 +1,286 @@
1
+ import { ResponseCommit, ResponseCommitAmino, RequestFinalizeBlock, RequestFinalizeBlockAmino, ResponseFinalizeBlock, ResponseFinalizeBlockAmino } from "../../../tendermint/abci/types";
2
+ import { BinaryReader, BinaryWriter } from "../../../binary";
3
+ import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
4
+ import { GlobalDecoderRegistry } from "../../../registry";
5
+ /**
6
+ * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
7
+ * It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
8
+ * Deletes
9
+ *
10
+ * Since: cosmos-sdk 0.43
11
+ */
12
+ export interface StoreKVPair {
13
+ /** the store key for the KVStore this pair originates from */
14
+ storeKey: string;
15
+ /** true indicates a delete operation, false indicates a set operation */
16
+ delete: boolean;
17
+ key: Uint8Array;
18
+ value: Uint8Array;
19
+ }
20
+ export interface StoreKVPairProtoMsg {
21
+ typeUrl: "/cosmos.store.v1beta1.StoreKVPair";
22
+ value: Uint8Array;
23
+ }
24
+ /**
25
+ * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
26
+ * It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
27
+ * Deletes
28
+ *
29
+ * Since: cosmos-sdk 0.43
30
+ */
31
+ export interface StoreKVPairAmino {
32
+ /** the store key for the KVStore this pair originates from */
33
+ store_key: string;
34
+ /** true indicates a delete operation, false indicates a set operation */
35
+ delete: boolean;
36
+ key: string;
37
+ value: string;
38
+ }
39
+ export interface StoreKVPairAminoMsg {
40
+ type: "cosmos-sdk/StoreKVPair";
41
+ value: StoreKVPairAmino;
42
+ }
43
+ /**
44
+ * BlockMetadata contains all the abci event data of a block
45
+ * the file streamer dump them into files together with the state changes.
46
+ */
47
+ export interface BlockMetadata {
48
+ responseCommit?: ResponseCommit;
49
+ requestFinalizeBlock?: RequestFinalizeBlock;
50
+ /** TODO: should we renumber this? */
51
+ responseFinalizeBlock?: ResponseFinalizeBlock;
52
+ }
53
+ export interface BlockMetadataProtoMsg {
54
+ typeUrl: "/cosmos.store.v1beta1.BlockMetadata";
55
+ value: Uint8Array;
56
+ }
57
+ /**
58
+ * BlockMetadata contains all the abci event data of a block
59
+ * the file streamer dump them into files together with the state changes.
60
+ */
61
+ export interface BlockMetadataAmino {
62
+ response_commit?: ResponseCommitAmino;
63
+ request_finalize_block?: RequestFinalizeBlockAmino;
64
+ /** TODO: should we renumber this? */
65
+ response_finalize_block?: ResponseFinalizeBlockAmino;
66
+ }
67
+ export interface BlockMetadataAminoMsg {
68
+ type: "cosmos-sdk/BlockMetadata";
69
+ value: BlockMetadataAmino;
70
+ }
71
+ function createBaseStoreKVPair(): StoreKVPair {
72
+ return {
73
+ storeKey: "",
74
+ delete: false,
75
+ key: new Uint8Array(),
76
+ value: new Uint8Array()
77
+ };
78
+ }
79
+ export const StoreKVPair = {
80
+ typeUrl: "/cosmos.store.v1beta1.StoreKVPair",
81
+ aminoType: "cosmos-sdk/StoreKVPair",
82
+ is(o: any): o is StoreKVPair {
83
+ return o && (o.$typeUrl === StoreKVPair.typeUrl || typeof o.storeKey === "string" && typeof o.delete === "boolean" && (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string"));
84
+ },
85
+ isAmino(o: any): o is StoreKVPairAmino {
86
+ return o && (o.$typeUrl === StoreKVPair.typeUrl || typeof o.store_key === "string" && typeof o.delete === "boolean" && (o.key instanceof Uint8Array || typeof o.key === "string") && (o.value instanceof Uint8Array || typeof o.value === "string"));
87
+ },
88
+ encode(message: StoreKVPair, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
89
+ if (message.storeKey !== "") {
90
+ writer.uint32(10).string(message.storeKey);
91
+ }
92
+ if (message.delete === true) {
93
+ writer.uint32(16).bool(message.delete);
94
+ }
95
+ if (message.key.length !== 0) {
96
+ writer.uint32(26).bytes(message.key);
97
+ }
98
+ if (message.value.length !== 0) {
99
+ writer.uint32(34).bytes(message.value);
100
+ }
101
+ return writer;
102
+ },
103
+ decode(input: BinaryReader | Uint8Array, length?: number): StoreKVPair {
104
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
105
+ let end = length === undefined ? reader.len : reader.pos + length;
106
+ const message = createBaseStoreKVPair();
107
+ while (reader.pos < end) {
108
+ const tag = reader.uint32();
109
+ switch (tag >>> 3) {
110
+ case 1:
111
+ message.storeKey = reader.string();
112
+ break;
113
+ case 2:
114
+ message.delete = reader.bool();
115
+ break;
116
+ case 3:
117
+ message.key = reader.bytes();
118
+ break;
119
+ case 4:
120
+ message.value = reader.bytes();
121
+ break;
122
+ default:
123
+ reader.skipType(tag & 7);
124
+ break;
125
+ }
126
+ }
127
+ return message;
128
+ },
129
+ fromPartial(object: DeepPartial<StoreKVPair>): StoreKVPair {
130
+ const message = createBaseStoreKVPair();
131
+ message.storeKey = object.storeKey ?? "";
132
+ message.delete = object.delete ?? false;
133
+ message.key = object.key ?? new Uint8Array();
134
+ message.value = object.value ?? new Uint8Array();
135
+ return message;
136
+ },
137
+ fromAmino(object: StoreKVPairAmino): StoreKVPair {
138
+ const message = createBaseStoreKVPair();
139
+ if (object.store_key !== undefined && object.store_key !== null) {
140
+ message.storeKey = object.store_key;
141
+ }
142
+ if (object.delete !== undefined && object.delete !== null) {
143
+ message.delete = object.delete;
144
+ }
145
+ if (object.key !== undefined && object.key !== null) {
146
+ message.key = bytesFromBase64(object.key);
147
+ }
148
+ if (object.value !== undefined && object.value !== null) {
149
+ message.value = bytesFromBase64(object.value);
150
+ }
151
+ return message;
152
+ },
153
+ toAmino(message: StoreKVPair): StoreKVPairAmino {
154
+ const obj: any = {};
155
+ obj.store_key = message.storeKey === "" ? undefined : message.storeKey;
156
+ obj.delete = message.delete === false ? undefined : message.delete;
157
+ obj.key = message.key ? base64FromBytes(message.key) : undefined;
158
+ obj.value = message.value ? base64FromBytes(message.value) : undefined;
159
+ return obj;
160
+ },
161
+ fromAminoMsg(object: StoreKVPairAminoMsg): StoreKVPair {
162
+ return StoreKVPair.fromAmino(object.value);
163
+ },
164
+ toAminoMsg(message: StoreKVPair): StoreKVPairAminoMsg {
165
+ return {
166
+ type: "cosmos-sdk/StoreKVPair",
167
+ value: StoreKVPair.toAmino(message)
168
+ };
169
+ },
170
+ fromProtoMsg(message: StoreKVPairProtoMsg): StoreKVPair {
171
+ return StoreKVPair.decode(message.value);
172
+ },
173
+ toProto(message: StoreKVPair): Uint8Array {
174
+ return StoreKVPair.encode(message).finish();
175
+ },
176
+ toProtoMsg(message: StoreKVPair): StoreKVPairProtoMsg {
177
+ return {
178
+ typeUrl: "/cosmos.store.v1beta1.StoreKVPair",
179
+ value: StoreKVPair.encode(message).finish()
180
+ };
181
+ }
182
+ };
183
+ GlobalDecoderRegistry.register(StoreKVPair.typeUrl, StoreKVPair);
184
+ GlobalDecoderRegistry.registerAminoProtoMapping(StoreKVPair.aminoType, StoreKVPair.typeUrl);
185
+ function createBaseBlockMetadata(): BlockMetadata {
186
+ return {
187
+ responseCommit: undefined,
188
+ requestFinalizeBlock: undefined,
189
+ responseFinalizeBlock: undefined
190
+ };
191
+ }
192
+ export const BlockMetadata = {
193
+ typeUrl: "/cosmos.store.v1beta1.BlockMetadata",
194
+ aminoType: "cosmos-sdk/BlockMetadata",
195
+ is(o: any): o is BlockMetadata {
196
+ return o && o.$typeUrl === BlockMetadata.typeUrl;
197
+ },
198
+ isAmino(o: any): o is BlockMetadataAmino {
199
+ return o && o.$typeUrl === BlockMetadata.typeUrl;
200
+ },
201
+ encode(message: BlockMetadata, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
202
+ if (message.responseCommit !== undefined) {
203
+ ResponseCommit.encode(message.responseCommit, writer.uint32(50).fork()).ldelim();
204
+ }
205
+ if (message.requestFinalizeBlock !== undefined) {
206
+ RequestFinalizeBlock.encode(message.requestFinalizeBlock, writer.uint32(58).fork()).ldelim();
207
+ }
208
+ if (message.responseFinalizeBlock !== undefined) {
209
+ ResponseFinalizeBlock.encode(message.responseFinalizeBlock, writer.uint32(66).fork()).ldelim();
210
+ }
211
+ return writer;
212
+ },
213
+ decode(input: BinaryReader | Uint8Array, length?: number): BlockMetadata {
214
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
215
+ let end = length === undefined ? reader.len : reader.pos + length;
216
+ const message = createBaseBlockMetadata();
217
+ while (reader.pos < end) {
218
+ const tag = reader.uint32();
219
+ switch (tag >>> 3) {
220
+ case 6:
221
+ message.responseCommit = ResponseCommit.decode(reader, reader.uint32());
222
+ break;
223
+ case 7:
224
+ message.requestFinalizeBlock = RequestFinalizeBlock.decode(reader, reader.uint32());
225
+ break;
226
+ case 8:
227
+ message.responseFinalizeBlock = ResponseFinalizeBlock.decode(reader, reader.uint32());
228
+ break;
229
+ default:
230
+ reader.skipType(tag & 7);
231
+ break;
232
+ }
233
+ }
234
+ return message;
235
+ },
236
+ fromPartial(object: DeepPartial<BlockMetadata>): BlockMetadata {
237
+ const message = createBaseBlockMetadata();
238
+ message.responseCommit = object.responseCommit !== undefined && object.responseCommit !== null ? ResponseCommit.fromPartial(object.responseCommit) : undefined;
239
+ message.requestFinalizeBlock = object.requestFinalizeBlock !== undefined && object.requestFinalizeBlock !== null ? RequestFinalizeBlock.fromPartial(object.requestFinalizeBlock) : undefined;
240
+ message.responseFinalizeBlock = object.responseFinalizeBlock !== undefined && object.responseFinalizeBlock !== null ? ResponseFinalizeBlock.fromPartial(object.responseFinalizeBlock) : undefined;
241
+ return message;
242
+ },
243
+ fromAmino(object: BlockMetadataAmino): BlockMetadata {
244
+ const message = createBaseBlockMetadata();
245
+ if (object.response_commit !== undefined && object.response_commit !== null) {
246
+ message.responseCommit = ResponseCommit.fromAmino(object.response_commit);
247
+ }
248
+ if (object.request_finalize_block !== undefined && object.request_finalize_block !== null) {
249
+ message.requestFinalizeBlock = RequestFinalizeBlock.fromAmino(object.request_finalize_block);
250
+ }
251
+ if (object.response_finalize_block !== undefined && object.response_finalize_block !== null) {
252
+ message.responseFinalizeBlock = ResponseFinalizeBlock.fromAmino(object.response_finalize_block);
253
+ }
254
+ return message;
255
+ },
256
+ toAmino(message: BlockMetadata): BlockMetadataAmino {
257
+ const obj: any = {};
258
+ obj.response_commit = message.responseCommit ? ResponseCommit.toAmino(message.responseCommit) : undefined;
259
+ obj.request_finalize_block = message.requestFinalizeBlock ? RequestFinalizeBlock.toAmino(message.requestFinalizeBlock) : undefined;
260
+ obj.response_finalize_block = message.responseFinalizeBlock ? ResponseFinalizeBlock.toAmino(message.responseFinalizeBlock) : undefined;
261
+ return obj;
262
+ },
263
+ fromAminoMsg(object: BlockMetadataAminoMsg): BlockMetadata {
264
+ return BlockMetadata.fromAmino(object.value);
265
+ },
266
+ toAminoMsg(message: BlockMetadata): BlockMetadataAminoMsg {
267
+ return {
268
+ type: "cosmos-sdk/BlockMetadata",
269
+ value: BlockMetadata.toAmino(message)
270
+ };
271
+ },
272
+ fromProtoMsg(message: BlockMetadataProtoMsg): BlockMetadata {
273
+ return BlockMetadata.decode(message.value);
274
+ },
275
+ toProto(message: BlockMetadata): Uint8Array {
276
+ return BlockMetadata.encode(message).finish();
277
+ },
278
+ toProtoMsg(message: BlockMetadata): BlockMetadataProtoMsg {
279
+ return {
280
+ typeUrl: "/cosmos.store.v1beta1.BlockMetadata",
281
+ value: BlockMetadata.encode(message).finish()
282
+ };
283
+ }
284
+ };
285
+ GlobalDecoderRegistry.register(BlockMetadata.typeUrl, BlockMetadata);
286
+ GlobalDecoderRegistry.registerAminoProtoMapping(BlockMetadata.aminoType, BlockMetadata.typeUrl);