@iconlake/client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/client.ts +170 -0
  2. package/cosmos.auth.v1beta1/index.ts +6 -0
  3. package/cosmos.auth.v1beta1/module.ts +102 -0
  4. package/cosmos.auth.v1beta1/registry.ts +7 -0
  5. package/cosmos.auth.v1beta1/rest.ts +641 -0
  6. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +324 -0
  7. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +95 -0
  8. package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +1212 -0
  9. package/cosmos.auth.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  10. package/cosmos.auth.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  11. package/cosmos.auth.v1beta1/types/gogoproto/gogo.ts +2 -0
  12. package/cosmos.auth.v1beta1/types/google/api/annotations.ts +2 -0
  13. package/cosmos.auth.v1beta1/types/google/api/http.ts +589 -0
  14. package/cosmos.auth.v1beta1/types/google/protobuf/any.ts +240 -0
  15. package/cosmos.auth.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  16. package/cosmos.auth.v1beta1/types.ts +11 -0
  17. package/cosmos.authz.v1beta1/index.ts +6 -0
  18. package/cosmos.authz.v1beta1/module.ts +207 -0
  19. package/cosmos.authz.v1beta1/registry.ts +13 -0
  20. package/cosmos.authz.v1beta1/rest.ts +604 -0
  21. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/authz.ts +325 -0
  22. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/event.ts +175 -0
  23. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/genesis.ts +78 -0
  24. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/query.ts +516 -0
  25. package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +493 -0
  26. package/cosmos.authz.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  27. package/cosmos.authz.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  28. package/cosmos.authz.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  29. package/cosmos.authz.v1beta1/types/gogoproto/gogo.ts +2 -0
  30. package/cosmos.authz.v1beta1/types/google/api/annotations.ts +2 -0
  31. package/cosmos.authz.v1beta1/types/google/api/http.ts +589 -0
  32. package/cosmos.authz.v1beta1/types/google/protobuf/any.ts +240 -0
  33. package/cosmos.authz.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  34. package/cosmos.authz.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  35. package/cosmos.authz.v1beta1/types.ts +17 -0
  36. package/cosmos.bank.v1beta1/index.ts +6 -0
  37. package/cosmos.bank.v1beta1/module.ts +182 -0
  38. package/cosmos.bank.v1beta1/registry.ts +11 -0
  39. package/cosmos.bank.v1beta1/rest.ts +656 -0
  40. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +77 -0
  41. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +604 -0
  42. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +203 -0
  43. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +1366 -0
  44. package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +289 -0
  45. package/cosmos.bank.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  46. package/cosmos.bank.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  47. package/cosmos.bank.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  48. package/cosmos.bank.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  49. package/cosmos.bank.v1beta1/types/gogoproto/gogo.ts +2 -0
  50. package/cosmos.bank.v1beta1/types/google/api/annotations.ts +2 -0
  51. package/cosmos.bank.v1beta1/types/google/api/http.ts +589 -0
  52. package/cosmos.bank.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  53. package/cosmos.bank.v1beta1/types.ts +25 -0
  54. package/cosmos.base.node.v1beta1/index.ts +6 -0
  55. package/cosmos.base.node.v1beta1/module.ts +96 -0
  56. package/cosmos.base.node.v1beta1/registry.ts +7 -0
  57. package/cosmos.base.node.v1beta1/rest.ts +170 -0
  58. package/cosmos.base.node.v1beta1/types/cosmos/base/node/v1beta1/query.ts +137 -0
  59. package/cosmos.base.node.v1beta1/types/google/api/annotations.ts +2 -0
  60. package/cosmos.base.node.v1beta1/types/google/api/http.ts +589 -0
  61. package/cosmos.base.node.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  62. package/cosmos.base.node.v1beta1/types.ts +5 -0
  63. package/cosmos.base.tendermint.v1beta1/index.ts +6 -0
  64. package/cosmos.base.tendermint.v1beta1/module.ts +110 -0
  65. package/cosmos.base.tendermint.v1beta1/registry.ts +7 -0
  66. package/cosmos.base.tendermint.v1beta1/rest.ts +1147 -0
  67. package/cosmos.base.tendermint.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  68. package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +1646 -0
  69. package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/types.ts +442 -0
  70. package/cosmos.base.tendermint.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  71. package/cosmos.base.tendermint.v1beta1/types/gogoproto/gogo.ts +2 -0
  72. package/cosmos.base.tendermint.v1beta1/types/google/api/annotations.ts +2 -0
  73. package/cosmos.base.tendermint.v1beta1/types/google/api/http.ts +589 -0
  74. package/cosmos.base.tendermint.v1beta1/types/google/protobuf/any.ts +240 -0
  75. package/cosmos.base.tendermint.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  76. package/cosmos.base.tendermint.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  77. package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/keys.ts +129 -0
  78. package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/proof.ts +439 -0
  79. package/cosmos.base.tendermint.v1beta1/types/tendermint/p2p/types.ts +423 -0
  80. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/block.ts +112 -0
  81. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/evidence.ts +412 -0
  82. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/types.ts +1452 -0
  83. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/validator.ts +308 -0
  84. package/cosmos.base.tendermint.v1beta1/types/tendermint/version/types.ts +184 -0
  85. package/cosmos.base.tendermint.v1beta1/types.ts +19 -0
  86. package/cosmos.crisis.v1beta1/index.ts +6 -0
  87. package/cosmos.crisis.v1beta1/module.ts +129 -0
  88. package/cosmos.crisis.v1beta1/registry.ts +9 -0
  89. package/cosmos.crisis.v1beta1/rest.ts +152 -0
  90. package/cosmos.crisis.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  91. package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/genesis.ts +79 -0
  92. package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +159 -0
  93. package/cosmos.crisis.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  94. package/cosmos.crisis.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  95. package/cosmos.crisis.v1beta1/types/gogoproto/gogo.ts +2 -0
  96. package/cosmos.crisis.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  97. package/cosmos.crisis.v1beta1/types.ts +5 -0
  98. package/cosmos.distribution.v1beta1/index.ts +6 -0
  99. package/cosmos.distribution.v1beta1/module.ts +266 -0
  100. package/cosmos.distribution.v1beta1/registry.ts +15 -0
  101. package/cosmos.distribution.v1beta1/rest.ts +557 -0
  102. package/cosmos.distribution.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  103. package/cosmos.distribution.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  104. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +945 -0
  105. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +849 -0
  106. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +1289 -0
  107. package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +550 -0
  108. package/cosmos.distribution.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  109. package/cosmos.distribution.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  110. package/cosmos.distribution.v1beta1/types/gogoproto/gogo.ts +2 -0
  111. package/cosmos.distribution.v1beta1/types/google/api/annotations.ts +2 -0
  112. package/cosmos.distribution.v1beta1/types/google/api/http.ts +589 -0
  113. package/cosmos.distribution.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  114. package/cosmos.distribution.v1beta1/types.ts +43 -0
  115. package/cosmos.evidence.v1beta1/index.ts +6 -0
  116. package/cosmos.evidence.v1beta1/module.ts +131 -0
  117. package/cosmos.evidence.v1beta1/registry.ts +9 -0
  118. package/cosmos.evidence.v1beta1/rest.ts +402 -0
  119. package/cosmos.evidence.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  120. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +161 -0
  121. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/genesis.ts +73 -0
  122. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +343 -0
  123. package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +213 -0
  124. package/cosmos.evidence.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  125. package/cosmos.evidence.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  126. package/cosmos.evidence.v1beta1/types/gogoproto/gogo.ts +2 -0
  127. package/cosmos.evidence.v1beta1/types/google/api/annotations.ts +2 -0
  128. package/cosmos.evidence.v1beta1/types/google/api/http.ts +589 -0
  129. package/cosmos.evidence.v1beta1/types/google/protobuf/any.ts +240 -0
  130. package/cosmos.evidence.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  131. package/cosmos.evidence.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  132. package/cosmos.evidence.v1beta1/types.ts +7 -0
  133. package/cosmos.feegrant.v1beta1/index.ts +6 -0
  134. package/cosmos.feegrant.v1beta1/module.ts +170 -0
  135. package/cosmos.feegrant.v1beta1/registry.ts +11 -0
  136. package/cosmos.feegrant.v1beta1/rest.ts +452 -0
  137. package/cosmos.feegrant.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  138. package/cosmos.feegrant.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  139. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/feegrant.ts +409 -0
  140. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/genesis.ts +76 -0
  141. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/query.ts +484 -0
  142. package/cosmos.feegrant.v1beta1/types/cosmos/feegrant/v1beta1/tx.ts +294 -0
  143. package/cosmos.feegrant.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  144. package/cosmos.feegrant.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  145. package/cosmos.feegrant.v1beta1/types/gogoproto/gogo.ts +2 -0
  146. package/cosmos.feegrant.v1beta1/types/google/api/annotations.ts +2 -0
  147. package/cosmos.feegrant.v1beta1/types/google/api/http.ts +589 -0
  148. package/cosmos.feegrant.v1beta1/types/google/protobuf/any.ts +240 -0
  149. package/cosmos.feegrant.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  150. package/cosmos.feegrant.v1beta1/types/google/protobuf/duration.ts +187 -0
  151. package/cosmos.feegrant.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  152. package/cosmos.feegrant.v1beta1/types.ts +13 -0
  153. package/cosmos.gov.v1/index.ts +6 -0
  154. package/cosmos.gov.v1/module.ts +244 -0
  155. package/cosmos.gov.v1/registry.ts +15 -0
  156. package/cosmos.gov.v1/rest.ts +798 -0
  157. package/cosmos.gov.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  158. package/cosmos.gov.v1/types/cosmos/base/v1beta1/coin.ts +261 -0
  159. package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +208 -0
  160. package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +925 -0
  161. package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +1202 -0
  162. package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +763 -0
  163. package/cosmos.gov.v1/types/cosmos/msg/v1/msg.ts +2 -0
  164. package/cosmos.gov.v1/types/cosmos_proto/cosmos.ts +247 -0
  165. package/cosmos.gov.v1/types/gogoproto/gogo.ts +2 -0
  166. package/cosmos.gov.v1/types/google/api/annotations.ts +2 -0
  167. package/cosmos.gov.v1/types/google/api/http.ts +589 -0
  168. package/cosmos.gov.v1/types/google/protobuf/any.ts +240 -0
  169. package/cosmos.gov.v1/types/google/protobuf/descriptor.ts +3753 -0
  170. package/cosmos.gov.v1/types/google/protobuf/duration.ts +187 -0
  171. package/cosmos.gov.v1/types/google/protobuf/timestamp.ts +216 -0
  172. package/cosmos.gov.v1/types.ts +21 -0
  173. package/cosmos.gov.v1beta1/index.ts +6 -0
  174. package/cosmos.gov.v1beta1/module.ts +246 -0
  175. package/cosmos.gov.v1beta1/registry.ts +15 -0
  176. package/cosmos.gov.v1beta1/rest.ts +864 -0
  177. package/cosmos.gov.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  178. package/cosmos.gov.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  179. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +206 -0
  180. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +1015 -0
  181. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +1200 -0
  182. package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +612 -0
  183. package/cosmos.gov.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  184. package/cosmos.gov.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  185. package/cosmos.gov.v1beta1/types/gogoproto/gogo.ts +2 -0
  186. package/cosmos.gov.v1beta1/types/google/api/annotations.ts +2 -0
  187. package/cosmos.gov.v1beta1/types/google/api/http.ts +589 -0
  188. package/cosmos.gov.v1beta1/types/google/protobuf/any.ts +240 -0
  189. package/cosmos.gov.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  190. package/cosmos.gov.v1beta1/types/google/protobuf/duration.ts +187 -0
  191. package/cosmos.gov.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  192. package/cosmos.gov.v1beta1/types.ts +23 -0
  193. package/cosmos.group.v1/index.ts +6 -0
  194. package/cosmos.group.v1/module.ts +598 -0
  195. package/cosmos.group.v1/registry.ts +35 -0
  196. package/cosmos.group.v1/rest.ts +1162 -0
  197. package/cosmos.group.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  198. package/cosmos.group.v1/types/cosmos/group/v1/events.ts +568 -0
  199. package/cosmos.group.v1/types/cosmos/group/v1/genesis.ts +228 -0
  200. package/cosmos.group.v1/types/cosmos/group/v1/query.ts +1897 -0
  201. package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +2113 -0
  202. package/cosmos.group.v1/types/cosmos/group/v1/types.ts +1422 -0
  203. package/cosmos.group.v1/types/cosmos/msg/v1/msg.ts +2 -0
  204. package/cosmos.group.v1/types/cosmos_proto/cosmos.ts +247 -0
  205. package/cosmos.group.v1/types/gogoproto/gogo.ts +2 -0
  206. package/cosmos.group.v1/types/google/api/annotations.ts +2 -0
  207. package/cosmos.group.v1/types/google/api/http.ts +589 -0
  208. package/cosmos.group.v1/types/google/protobuf/any.ts +240 -0
  209. package/cosmos.group.v1/types/google/protobuf/descriptor.ts +3753 -0
  210. package/cosmos.group.v1/types/google/protobuf/duration.ts +187 -0
  211. package/cosmos.group.v1/types/google/protobuf/timestamp.ts +216 -0
  212. package/cosmos.group.v1/types.ts +45 -0
  213. package/cosmos.mint.v1beta1/index.ts +6 -0
  214. package/cosmos.mint.v1beta1/module.ts +100 -0
  215. package/cosmos.mint.v1beta1/registry.ts +7 -0
  216. package/cosmos.mint.v1beta1/rest.ts +253 -0
  217. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +92 -0
  218. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +234 -0
  219. package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/query.ts +412 -0
  220. package/cosmos.mint.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  221. package/cosmos.mint.v1beta1/types/gogoproto/gogo.ts +2 -0
  222. package/cosmos.mint.v1beta1/types/google/api/annotations.ts +2 -0
  223. package/cosmos.mint.v1beta1/types/google/api/http.ts +589 -0
  224. package/cosmos.mint.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  225. package/cosmos.mint.v1beta1/types.ts +9 -0
  226. package/cosmos.nft.v1beta1/index.ts +6 -0
  227. package/cosmos.nft.v1beta1/module.ts +108 -0
  228. package/cosmos.nft.v1beta1/registry.ts +7 -0
  229. package/cosmos.nft.v1beta1/rest.ts +685 -0
  230. package/cosmos.nft.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  231. package/cosmos.nft.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  232. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +251 -0
  233. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +163 -0
  234. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/nft.ts +240 -0
  235. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +964 -0
  236. package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/tx.ts +173 -0
  237. package/cosmos.nft.v1beta1/types/google/api/annotations.ts +2 -0
  238. package/cosmos.nft.v1beta1/types/google/api/http.ts +589 -0
  239. package/cosmos.nft.v1beta1/types/google/protobuf/any.ts +240 -0
  240. package/cosmos.nft.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  241. package/cosmos.nft.v1beta1/types.ts +17 -0
  242. package/cosmos.params.v1beta1/index.ts +6 -0
  243. package/cosmos.params.v1beta1/module.ts +102 -0
  244. package/cosmos.params.v1beta1/registry.ts +7 -0
  245. package/cosmos.params.v1beta1/rest.ts +220 -0
  246. package/cosmos.params.v1beta1/types/cosmos/params/v1beta1/params.ts +174 -0
  247. package/cosmos.params.v1beta1/types/cosmos/params/v1beta1/query.ts +364 -0
  248. package/cosmos.params.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  249. package/cosmos.params.v1beta1/types/gogoproto/gogo.ts +2 -0
  250. package/cosmos.params.v1beta1/types/google/api/annotations.ts +2 -0
  251. package/cosmos.params.v1beta1/types/google/api/http.ts +589 -0
  252. package/cosmos.params.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  253. package/cosmos.params.v1beta1/types.ts +11 -0
  254. package/cosmos.slashing.v1beta1/index.ts +6 -0
  255. package/cosmos.slashing.v1beta1/module.ts +139 -0
  256. package/cosmos.slashing.v1beta1/registry.ts +9 -0
  257. package/cosmos.slashing.v1beta1/rest.ts +368 -0
  258. package/cosmos.slashing.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  259. package/cosmos.slashing.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  260. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +364 -0
  261. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/query.ts +411 -0
  262. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/slashing.ts +352 -0
  263. package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +141 -0
  264. package/cosmos.slashing.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  265. package/cosmos.slashing.v1beta1/types/gogoproto/gogo.ts +2 -0
  266. package/cosmos.slashing.v1beta1/types/google/api/annotations.ts +2 -0
  267. package/cosmos.slashing.v1beta1/types/google/api/http.ts +589 -0
  268. package/cosmos.slashing.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  269. package/cosmos.slashing.v1beta1/types/google/protobuf/duration.ts +187 -0
  270. package/cosmos.slashing.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  271. package/cosmos.slashing.v1beta1/types.ts +15 -0
  272. package/cosmos.staking.v1beta1/index.ts +6 -0
  273. package/cosmos.staking.v1beta1/module.ts +340 -0
  274. package/cosmos.staking.v1beta1/registry.ts +19 -0
  275. package/cosmos.staking.v1beta1/rest.ts +1239 -0
  276. package/cosmos.staking.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  277. package/cosmos.staking.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  278. package/cosmos.staking.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  279. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/authz.ts +245 -0
  280. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +322 -0
  281. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +2109 -0
  282. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +1829 -0
  283. package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +1005 -0
  284. package/cosmos.staking.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  285. package/cosmos.staking.v1beta1/types/gogoproto/gogo.ts +2 -0
  286. package/cosmos.staking.v1beta1/types/google/api/annotations.ts +2 -0
  287. package/cosmos.staking.v1beta1/types/google/api/http.ts +589 -0
  288. package/cosmos.staking.v1beta1/types/google/protobuf/any.ts +240 -0
  289. package/cosmos.staking.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  290. package/cosmos.staking.v1beta1/types/google/protobuf/duration.ts +187 -0
  291. package/cosmos.staking.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  292. package/cosmos.staking.v1beta1/types/tendermint/crypto/keys.ts +129 -0
  293. package/cosmos.staking.v1beta1/types/tendermint/crypto/proof.ts +439 -0
  294. package/cosmos.staking.v1beta1/types/tendermint/types/types.ts +1452 -0
  295. package/cosmos.staking.v1beta1/types/tendermint/types/validator.ts +308 -0
  296. package/cosmos.staking.v1beta1/types/tendermint/version/types.ts +184 -0
  297. package/cosmos.staking.v1beta1/types.ts +51 -0
  298. package/cosmos.tx.v1beta1/index.ts +6 -0
  299. package/cosmos.tx.v1beta1/module.ts +122 -0
  300. package/cosmos.tx.v1beta1/registry.ts +7 -0
  301. package/cosmos.tx.v1beta1/rest.ts +1372 -0
  302. package/cosmos.tx.v1beta1/types/cosmos/base/abci/v1beta1/abci.ts +1040 -0
  303. package/cosmos.tx.v1beta1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  304. package/cosmos.tx.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  305. package/cosmos.tx.v1beta1/types/cosmos/crypto/multisig/v1beta1/multisig.ts +195 -0
  306. package/cosmos.tx.v1beta1/types/cosmos/tx/signing/v1beta1/signing.ts +556 -0
  307. package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +1057 -0
  308. package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/tx.ts +1355 -0
  309. package/cosmos.tx.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  310. package/cosmos.tx.v1beta1/types/gogoproto/gogo.ts +2 -0
  311. package/cosmos.tx.v1beta1/types/google/api/annotations.ts +2 -0
  312. package/cosmos.tx.v1beta1/types/google/api/http.ts +589 -0
  313. package/cosmos.tx.v1beta1/types/google/protobuf/any.ts +240 -0
  314. package/cosmos.tx.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  315. package/cosmos.tx.v1beta1/types/google/protobuf/duration.ts +187 -0
  316. package/cosmos.tx.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  317. package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +4154 -0
  318. package/cosmos.tx.v1beta1/types/tendermint/crypto/keys.ts +129 -0
  319. package/cosmos.tx.v1beta1/types/tendermint/crypto/proof.ts +439 -0
  320. package/cosmos.tx.v1beta1/types/tendermint/types/block.ts +112 -0
  321. package/cosmos.tx.v1beta1/types/tendermint/types/evidence.ts +412 -0
  322. package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +514 -0
  323. package/cosmos.tx.v1beta1/types/tendermint/types/types.ts +1452 -0
  324. package/cosmos.tx.v1beta1/types/tendermint/types/validator.ts +308 -0
  325. package/cosmos.tx.v1beta1/types/tendermint/version/types.ts +184 -0
  326. package/cosmos.tx.v1beta1/types.ts +31 -0
  327. package/cosmos.upgrade.v1beta1/index.ts +6 -0
  328. package/cosmos.upgrade.v1beta1/module.ts +170 -0
  329. package/cosmos.upgrade.v1beta1/registry.ts +11 -0
  330. package/cosmos.upgrade.v1beta1/rest.ts +468 -0
  331. package/cosmos.upgrade.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  332. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/query.ts +728 -0
  333. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +284 -0
  334. package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  335. package/cosmos.upgrade.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  336. package/cosmos.upgrade.v1beta1/types/gogoproto/gogo.ts +2 -0
  337. package/cosmos.upgrade.v1beta1/types/google/api/annotations.ts +2 -0
  338. package/cosmos.upgrade.v1beta1/types/google/api/http.ts +589 -0
  339. package/cosmos.upgrade.v1beta1/types/google/protobuf/any.ts +240 -0
  340. package/cosmos.upgrade.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  341. package/cosmos.upgrade.v1beta1/types/google/protobuf/timestamp.ts +216 -0
  342. package/cosmos.upgrade.v1beta1/types.ts +13 -0
  343. package/cosmos.vesting.v1beta1/index.ts +6 -0
  344. package/cosmos.vesting.v1beta1/module.ts +207 -0
  345. package/cosmos.vesting.v1beta1/registry.ts +13 -0
  346. package/cosmos.vesting.v1beta1/rest.ts +297 -0
  347. package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +324 -0
  348. package/cosmos.vesting.v1beta1/types/cosmos/base/v1beta1/coin.ts +261 -0
  349. package/cosmos.vesting.v1beta1/types/cosmos/msg/v1/msg.ts +2 -0
  350. package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/tx.ts +540 -0
  351. package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/vesting.ts +529 -0
  352. package/cosmos.vesting.v1beta1/types/cosmos_proto/cosmos.ts +247 -0
  353. package/cosmos.vesting.v1beta1/types/gogoproto/gogo.ts +2 -0
  354. package/cosmos.vesting.v1beta1/types/google/protobuf/any.ts +240 -0
  355. package/cosmos.vesting.v1beta1/types/google/protobuf/descriptor.ts +3753 -0
  356. package/cosmos.vesting.v1beta1/types.ts +17 -0
  357. package/env.ts +7 -0
  358. package/helpers.ts +32 -0
  359. package/ibc.applications.interchain_accounts.controller.v1/index.ts +6 -0
  360. package/ibc.applications.interchain_accounts.controller.v1/module.ts +98 -0
  361. package/ibc.applications.interchain_accounts.controller.v1/registry.ts +7 -0
  362. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +346 -0
  363. package/ibc.applications.interchain_accounts.controller.v1/types/gogoproto/gogo.ts +2 -0
  364. package/ibc.applications.interchain_accounts.controller.v1/types/google/api/annotations.ts +2 -0
  365. package/ibc.applications.interchain_accounts.controller.v1/types/google/api/http.ts +589 -0
  366. package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.ts +240 -0
  367. package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/descriptor.ts +3753 -0
  368. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +75 -0
  369. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/query.ts +274 -0
  370. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +361 -0
  371. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.ts +234 -0
  372. package/ibc.applications.interchain_accounts.controller.v1/types.ts +7 -0
  373. package/ibc.applications.interchain_accounts.host.v1/index.ts +6 -0
  374. package/ibc.applications.interchain_accounts.host.v1/module.ts +98 -0
  375. package/ibc.applications.interchain_accounts.host.v1/registry.ts +7 -0
  376. package/ibc.applications.interchain_accounts.host.v1/rest.ts +183 -0
  377. package/ibc.applications.interchain_accounts.host.v1/types/gogoproto/gogo.ts +2 -0
  378. package/ibc.applications.interchain_accounts.host.v1/types/google/api/annotations.ts +2 -0
  379. package/ibc.applications.interchain_accounts.host.v1/types/google/api/http.ts +589 -0
  380. package/ibc.applications.interchain_accounts.host.v1/types/google/protobuf/descriptor.ts +3753 -0
  381. package/ibc.applications.interchain_accounts.host.v1/types/ibc/applications/interchain_accounts/host/v1/host.ts +92 -0
  382. package/ibc.applications.interchain_accounts.host.v1/types/ibc/applications/interchain_accounts/host/v1/query.ts +141 -0
  383. package/ibc.applications.interchain_accounts.host.v1/types.ts +7 -0
  384. package/ibc.applications.transfer.v1/index.ts +6 -0
  385. package/ibc.applications.transfer.v1/module.ts +133 -0
  386. package/ibc.applications.transfer.v1/registry.ts +9 -0
  387. package/ibc.applications.transfer.v1/rest.ts +544 -0
  388. package/ibc.applications.transfer.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  389. package/ibc.applications.transfer.v1/types/cosmos/base/v1beta1/coin.ts +261 -0
  390. package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  391. package/ibc.applications.transfer.v1/types/cosmos_proto/cosmos.ts +247 -0
  392. package/ibc.applications.transfer.v1/types/gogoproto/gogo.ts +2 -0
  393. package/ibc.applications.transfer.v1/types/google/api/annotations.ts +2 -0
  394. package/ibc.applications.transfer.v1/types/google/api/http.ts +589 -0
  395. package/ibc.applications.transfer.v1/types/google/protobuf/any.ts +240 -0
  396. package/ibc.applications.transfer.v1/types/google/protobuf/descriptor.ts +3753 -0
  397. package/ibc.applications.transfer.v1/types/google/protobuf/timestamp.ts +216 -0
  398. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +100 -0
  399. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +659 -0
  400. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/transfer.ts +168 -0
  401. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.ts +287 -0
  402. package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +608 -0
  403. package/ibc.applications.transfer.v1/types.ts +9 -0
  404. package/ibc.core.channel.v1/index.ts +6 -0
  405. package/ibc.core.channel.v1/module.ts +112 -0
  406. package/ibc.core.channel.v1/registry.ts +7 -0
  407. package/ibc.core.channel.v1/rest.ts +1375 -0
  408. package/ibc.core.channel.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  409. package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  410. package/ibc.core.channel.v1/types/cosmos_proto/cosmos.ts +247 -0
  411. package/ibc.core.channel.v1/types/gogoproto/gogo.ts +2 -0
  412. package/ibc.core.channel.v1/types/google/api/annotations.ts +2 -0
  413. package/ibc.core.channel.v1/types/google/api/http.ts +589 -0
  414. package/ibc.core.channel.v1/types/google/protobuf/any.ts +240 -0
  415. package/ibc.core.channel.v1/types/google/protobuf/descriptor.ts +3753 -0
  416. package/ibc.core.channel.v1/types/google/protobuf/timestamp.ts +216 -0
  417. package/ibc.core.channel.v1/types/ibc/core/channel/v1/channel.ts +905 -0
  418. package/ibc.core.channel.v1/types/ibc/core/channel/v1/genesis.ts +301 -0
  419. package/ibc.core.channel.v1/types/ibc/core/channel/v1/query.ts +2472 -0
  420. package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +1784 -0
  421. package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +608 -0
  422. package/ibc.core.channel.v1/types.ts +21 -0
  423. package/ibc.core.client.v1/index.ts +6 -0
  424. package/ibc.core.client.v1/module.ts +114 -0
  425. package/ibc.core.client.v1/registry.ts +7 -0
  426. package/ibc.core.client.v1/rest.ts +1084 -0
  427. package/ibc.core.client.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  428. package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  429. package/ibc.core.client.v1/types/cosmos_proto/cosmos.ts +247 -0
  430. package/ibc.core.client.v1/types/gogoproto/gogo.ts +2 -0
  431. package/ibc.core.client.v1/types/google/api/annotations.ts +2 -0
  432. package/ibc.core.client.v1/types/google/api/http.ts +589 -0
  433. package/ibc.core.client.v1/types/google/protobuf/any.ts +240 -0
  434. package/ibc.core.client.v1/types/google/protobuf/descriptor.ts +3753 -0
  435. package/ibc.core.client.v1/types/google/protobuf/timestamp.ts +216 -0
  436. package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +608 -0
  437. package/ibc.core.client.v1/types/ibc/core/client/v1/genesis.ts +357 -0
  438. package/ibc.core.client.v1/types/ibc/core/client/v1/query.ts +1390 -0
  439. package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +691 -0
  440. package/ibc.core.client.v1/types.ts +23 -0
  441. package/ibc.core.connection.v1/index.ts +6 -0
  442. package/ibc.core.connection.v1/module.ts +110 -0
  443. package/ibc.core.connection.v1/registry.ts +7 -0
  444. package/ibc.core.connection.v1/rest.ts +889 -0
  445. package/ibc.core.connection.v1/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  446. package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +429 -0
  447. package/ibc.core.connection.v1/types/cosmos_proto/cosmos.ts +247 -0
  448. package/ibc.core.connection.v1/types/gogoproto/gogo.ts +2 -0
  449. package/ibc.core.connection.v1/types/google/api/annotations.ts +2 -0
  450. package/ibc.core.connection.v1/types/google/api/http.ts +589 -0
  451. package/ibc.core.connection.v1/types/google/protobuf/any.ts +240 -0
  452. package/ibc.core.connection.v1/types/google/protobuf/descriptor.ts +3753 -0
  453. package/ibc.core.connection.v1/types/google/protobuf/timestamp.ts +216 -0
  454. package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +608 -0
  455. package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +299 -0
  456. package/ibc.core.connection.v1/types/ibc/core/connection/v1/connection.ts +698 -0
  457. package/ibc.core.connection.v1/types/ibc/core/connection/v1/genesis.ts +152 -0
  458. package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.ts +1041 -0
  459. package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +908 -0
  460. package/ibc.core.connection.v1/types/proofs.ts +1408 -0
  461. package/ibc.core.connection.v1/types.ts +19 -0
  462. package/iconlake.icon/index.ts +6 -0
  463. package/iconlake.icon/module.ts +135 -0
  464. package/iconlake.icon/registry.ts +9 -0
  465. package/iconlake.icon/rest.ts +206 -0
  466. package/iconlake.icon/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  467. package/iconlake.icon/types/gogoproto/gogo.ts +2 -0
  468. package/iconlake.icon/types/google/api/annotations.ts +2 -0
  469. package/iconlake.icon/types/google/api/http.ts +589 -0
  470. package/iconlake.icon/types/google/protobuf/descriptor.ts +3753 -0
  471. package/iconlake.icon/types/iconlake/icon/genesis.ts +74 -0
  472. package/iconlake.icon/types/iconlake/icon/params.ts +58 -0
  473. package/iconlake.icon/types/iconlake/icon/query.ts +276 -0
  474. package/iconlake.icon/types/iconlake/icon/tx.ts +374 -0
  475. package/iconlake.icon/types.ts +11 -0
  476. package/iconlake.iconlake/index.ts +6 -0
  477. package/iconlake.iconlake/module.ts +133 -0
  478. package/iconlake.iconlake/registry.ts +9 -0
  479. package/iconlake.iconlake/rest.ts +342 -0
  480. package/iconlake.iconlake/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
  481. package/iconlake.iconlake/types/cosmos/base/v1beta1/coin.ts +261 -0
  482. package/iconlake.iconlake/types/cosmos_proto/cosmos.ts +247 -0
  483. package/iconlake.iconlake/types/gogoproto/gogo.ts +2 -0
  484. package/iconlake.iconlake/types/google/api/annotations.ts +2 -0
  485. package/iconlake.iconlake/types/google/api/http.ts +589 -0
  486. package/iconlake.iconlake/types/google/protobuf/descriptor.ts +3753 -0
  487. package/iconlake.iconlake/types/iconlake/iconlake/account.ts +140 -0
  488. package/iconlake.iconlake/types/iconlake/iconlake/genesis.ts +91 -0
  489. package/iconlake.iconlake/types/iconlake/iconlake/params.ts +58 -0
  490. package/iconlake.iconlake/types/iconlake/iconlake/query.ts +388 -0
  491. package/iconlake.iconlake/types/iconlake/iconlake/tx.ts +214 -0
  492. package/iconlake.iconlake/types.ts +9 -0
  493. package/index.ts +75 -0
  494. package/modules.ts +5 -0
  495. package/package.json +35 -0
  496. package/tsconfig.json +12 -0
  497. package/types.d.ts +21 -0
@@ -0,0 +1,1355 @@
1
+ /* eslint-disable */
2
+ import Long from "long";
3
+ import _m0 from "protobufjs/minimal";
4
+ import { Any } from "../../../google/protobuf/any";
5
+ import { Coin } from "../../base/v1beta1/coin";
6
+ import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig";
7
+ import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing";
8
+
9
+ export const protobufPackage = "cosmos.tx.v1beta1";
10
+
11
+ /** Tx is the standard type used for broadcasting transactions. */
12
+ export interface Tx {
13
+ /** body is the processable content of the transaction */
14
+ body:
15
+ | TxBody
16
+ | undefined;
17
+ /**
18
+ * auth_info is the authorization related content of the transaction,
19
+ * specifically signers, signer modes and fee
20
+ */
21
+ authInfo:
22
+ | AuthInfo
23
+ | undefined;
24
+ /**
25
+ * signatures is a list of signatures that matches the length and order of
26
+ * AuthInfo's signer_infos to allow connecting signature meta information like
27
+ * public key and signing mode by position.
28
+ */
29
+ signatures: Uint8Array[];
30
+ }
31
+
32
+ /**
33
+ * TxRaw is a variant of Tx that pins the signer's exact binary representation
34
+ * of body and auth_info. This is used for signing, broadcasting and
35
+ * verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and
36
+ * the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used
37
+ * as the transaction ID.
38
+ */
39
+ export interface TxRaw {
40
+ /**
41
+ * body_bytes is a protobuf serialization of a TxBody that matches the
42
+ * representation in SignDoc.
43
+ */
44
+ bodyBytes: Uint8Array;
45
+ /**
46
+ * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
47
+ * representation in SignDoc.
48
+ */
49
+ authInfoBytes: Uint8Array;
50
+ /**
51
+ * signatures is a list of signatures that matches the length and order of
52
+ * AuthInfo's signer_infos to allow connecting signature meta information like
53
+ * public key and signing mode by position.
54
+ */
55
+ signatures: Uint8Array[];
56
+ }
57
+
58
+ /** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */
59
+ export interface SignDoc {
60
+ /**
61
+ * body_bytes is protobuf serialization of a TxBody that matches the
62
+ * representation in TxRaw.
63
+ */
64
+ bodyBytes: Uint8Array;
65
+ /**
66
+ * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
67
+ * representation in TxRaw.
68
+ */
69
+ authInfoBytes: Uint8Array;
70
+ /**
71
+ * chain_id is the unique identifier of the chain this transaction targets.
72
+ * It prevents signed transactions from being used on another chain by an
73
+ * attacker
74
+ */
75
+ chainId: string;
76
+ /** account_number is the account number of the account in state */
77
+ accountNumber: number;
78
+ }
79
+
80
+ /**
81
+ * SignDocDirectAux is the type used for generating sign bytes for
82
+ * SIGN_MODE_DIRECT_AUX.
83
+ *
84
+ * Since: cosmos-sdk 0.46
85
+ */
86
+ export interface SignDocDirectAux {
87
+ /**
88
+ * body_bytes is protobuf serialization of a TxBody that matches the
89
+ * representation in TxRaw.
90
+ */
91
+ bodyBytes: Uint8Array;
92
+ /** public_key is the public key of the signing account. */
93
+ publicKey:
94
+ | Any
95
+ | undefined;
96
+ /**
97
+ * chain_id is the identifier of the chain this transaction targets.
98
+ * It prevents signed transactions from being used on another chain by an
99
+ * attacker.
100
+ */
101
+ chainId: string;
102
+ /** account_number is the account number of the account in state. */
103
+ accountNumber: number;
104
+ /** sequence is the sequence number of the signing account. */
105
+ sequence: number;
106
+ /**
107
+ * Tip is the optional tip used for transactions fees paid in another denom.
108
+ * It should be left empty if the signer is not the tipper for this
109
+ * transaction.
110
+ *
111
+ * This field is ignored if the chain didn't enable tips, i.e. didn't add the
112
+ * `TipDecorator` in its posthandler.
113
+ */
114
+ tip: Tip | undefined;
115
+ }
116
+
117
+ /** TxBody is the body of a transaction that all signers sign over. */
118
+ export interface TxBody {
119
+ /**
120
+ * messages is a list of messages to be executed. The required signers of
121
+ * those messages define the number and order of elements in AuthInfo's
122
+ * signer_infos and Tx's signatures. Each required signer address is added to
123
+ * the list only the first time it occurs.
124
+ * By convention, the first required signer (usually from the first message)
125
+ * is referred to as the primary signer and pays the fee for the whole
126
+ * transaction.
127
+ */
128
+ messages: Any[];
129
+ /**
130
+ * memo is any arbitrary note/comment to be added to the transaction.
131
+ * WARNING: in clients, any publicly exposed text should not be called memo,
132
+ * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
133
+ */
134
+ memo: string;
135
+ /**
136
+ * timeout is the block height after which this transaction will not
137
+ * be processed by the chain
138
+ */
139
+ timeoutHeight: number;
140
+ /**
141
+ * extension_options are arbitrary options that can be added by chains
142
+ * when the default options are not sufficient. If any of these are present
143
+ * and can't be handled, the transaction will be rejected
144
+ */
145
+ extensionOptions: Any[];
146
+ /**
147
+ * extension_options are arbitrary options that can be added by chains
148
+ * when the default options are not sufficient. If any of these are present
149
+ * and can't be handled, they will be ignored
150
+ */
151
+ nonCriticalExtensionOptions: Any[];
152
+ }
153
+
154
+ /**
155
+ * AuthInfo describes the fee and signer modes that are used to sign a
156
+ * transaction.
157
+ */
158
+ export interface AuthInfo {
159
+ /**
160
+ * signer_infos defines the signing modes for the required signers. The number
161
+ * and order of elements must match the required signers from TxBody's
162
+ * messages. The first element is the primary signer and the one which pays
163
+ * the fee.
164
+ */
165
+ signerInfos: SignerInfo[];
166
+ /**
167
+ * Fee is the fee and gas limit for the transaction. The first signer is the
168
+ * primary signer and the one which pays the fee. The fee can be calculated
169
+ * based on the cost of evaluating the body and doing signature verification
170
+ * of the signers. This can be estimated via simulation.
171
+ */
172
+ fee:
173
+ | Fee
174
+ | undefined;
175
+ /**
176
+ * Tip is the optional tip used for transactions fees paid in another denom.
177
+ *
178
+ * This field is ignored if the chain didn't enable tips, i.e. didn't add the
179
+ * `TipDecorator` in its posthandler.
180
+ *
181
+ * Since: cosmos-sdk 0.46
182
+ */
183
+ tip: Tip | undefined;
184
+ }
185
+
186
+ /**
187
+ * SignerInfo describes the public key and signing mode of a single top-level
188
+ * signer.
189
+ */
190
+ export interface SignerInfo {
191
+ /**
192
+ * public_key is the public key of the signer. It is optional for accounts
193
+ * that already exist in state. If unset, the verifier can use the required \
194
+ * signer address for this position and lookup the public key.
195
+ */
196
+ publicKey:
197
+ | Any
198
+ | undefined;
199
+ /**
200
+ * mode_info describes the signing mode of the signer and is a nested
201
+ * structure to support nested multisig pubkey's
202
+ */
203
+ modeInfo:
204
+ | ModeInfo
205
+ | undefined;
206
+ /**
207
+ * sequence is the sequence of the account, which describes the
208
+ * number of committed transactions signed by a given address. It is used to
209
+ * prevent replay attacks.
210
+ */
211
+ sequence: number;
212
+ }
213
+
214
+ /** ModeInfo describes the signing mode of a single or nested multisig signer. */
215
+ export interface ModeInfo {
216
+ /** single represents a single signer */
217
+ single:
218
+ | ModeInfo_Single
219
+ | undefined;
220
+ /** multi represents a nested multisig signer */
221
+ multi: ModeInfo_Multi | undefined;
222
+ }
223
+
224
+ /**
225
+ * Single is the mode info for a single signer. It is structured as a message
226
+ * to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
227
+ * future
228
+ */
229
+ export interface ModeInfo_Single {
230
+ /** mode is the signing mode of the single signer */
231
+ mode: SignMode;
232
+ }
233
+
234
+ /** Multi is the mode info for a multisig public key */
235
+ export interface ModeInfo_Multi {
236
+ /** bitarray specifies which keys within the multisig are signing */
237
+ bitarray:
238
+ | CompactBitArray
239
+ | undefined;
240
+ /**
241
+ * mode_infos is the corresponding modes of the signers of the multisig
242
+ * which could include nested multisig public keys
243
+ */
244
+ modeInfos: ModeInfo[];
245
+ }
246
+
247
+ /**
248
+ * Fee includes the amount of coins paid in fees and the maximum
249
+ * gas to be used by the transaction. The ratio yields an effective "gasprice",
250
+ * which must be above some miminum to be accepted into the mempool.
251
+ */
252
+ export interface Fee {
253
+ /** amount is the amount of coins to be paid as a fee */
254
+ amount: Coin[];
255
+ /**
256
+ * gas_limit is the maximum gas that can be used in transaction processing
257
+ * before an out of gas error occurs
258
+ */
259
+ gasLimit: number;
260
+ /**
261
+ * if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
262
+ * the payer must be a tx signer (and thus have signed this field in AuthInfo).
263
+ * setting this field does *not* change the ordering of required signers for the transaction.
264
+ */
265
+ payer: string;
266
+ /**
267
+ * if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
268
+ * to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
269
+ * not support fee grants, this will fail
270
+ */
271
+ granter: string;
272
+ }
273
+
274
+ /**
275
+ * Tip is the tip used for meta-transactions.
276
+ *
277
+ * Since: cosmos-sdk 0.46
278
+ */
279
+ export interface Tip {
280
+ /** amount is the amount of the tip */
281
+ amount: Coin[];
282
+ /** tipper is the address of the account paying for the tip */
283
+ tipper: string;
284
+ }
285
+
286
+ /**
287
+ * AuxSignerData is the intermediary format that an auxiliary signer (e.g. a
288
+ * tipper) builds and sends to the fee payer (who will build and broadcast the
289
+ * actual tx). AuxSignerData is not a valid tx in itself, and will be rejected
290
+ * by the node if sent directly as-is.
291
+ *
292
+ * Since: cosmos-sdk 0.46
293
+ */
294
+ export interface AuxSignerData {
295
+ /**
296
+ * address is the bech32-encoded address of the auxiliary signer. If using
297
+ * AuxSignerData across different chains, the bech32 prefix of the target
298
+ * chain (where the final transaction is broadcasted) should be used.
299
+ */
300
+ address: string;
301
+ /**
302
+ * sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer
303
+ * signs. Note: we use the same sign doc even if we're signing with
304
+ * LEGACY_AMINO_JSON.
305
+ */
306
+ signDoc:
307
+ | SignDocDirectAux
308
+ | undefined;
309
+ /** mode is the signing mode of the single signer. */
310
+ mode: SignMode;
311
+ /** sig is the signature of the sign doc. */
312
+ sig: Uint8Array;
313
+ }
314
+
315
+ function createBaseTx(): Tx {
316
+ return { body: undefined, authInfo: undefined, signatures: [] };
317
+ }
318
+
319
+ export const Tx = {
320
+ encode(message: Tx, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
321
+ if (message.body !== undefined) {
322
+ TxBody.encode(message.body, writer.uint32(10).fork()).ldelim();
323
+ }
324
+ if (message.authInfo !== undefined) {
325
+ AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim();
326
+ }
327
+ for (const v of message.signatures) {
328
+ writer.uint32(26).bytes(v!);
329
+ }
330
+ return writer;
331
+ },
332
+
333
+ decode(input: _m0.Reader | Uint8Array, length?: number): Tx {
334
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
335
+ let end = length === undefined ? reader.len : reader.pos + length;
336
+ const message = createBaseTx();
337
+ while (reader.pos < end) {
338
+ const tag = reader.uint32();
339
+ switch (tag >>> 3) {
340
+ case 1:
341
+ message.body = TxBody.decode(reader, reader.uint32());
342
+ break;
343
+ case 2:
344
+ message.authInfo = AuthInfo.decode(reader, reader.uint32());
345
+ break;
346
+ case 3:
347
+ message.signatures.push(reader.bytes());
348
+ break;
349
+ default:
350
+ reader.skipType(tag & 7);
351
+ break;
352
+ }
353
+ }
354
+ return message;
355
+ },
356
+
357
+ fromJSON(object: any): Tx {
358
+ return {
359
+ body: isSet(object.body) ? TxBody.fromJSON(object.body) : undefined,
360
+ authInfo: isSet(object.authInfo) ? AuthInfo.fromJSON(object.authInfo) : undefined,
361
+ signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => bytesFromBase64(e)) : [],
362
+ };
363
+ },
364
+
365
+ toJSON(message: Tx): unknown {
366
+ const obj: any = {};
367
+ message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined);
368
+ message.authInfo !== undefined && (obj.authInfo = message.authInfo ? AuthInfo.toJSON(message.authInfo) : undefined);
369
+ if (message.signatures) {
370
+ obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
371
+ } else {
372
+ obj.signatures = [];
373
+ }
374
+ return obj;
375
+ },
376
+
377
+ fromPartial<I extends Exact<DeepPartial<Tx>, I>>(object: I): Tx {
378
+ const message = createBaseTx();
379
+ message.body = (object.body !== undefined && object.body !== null) ? TxBody.fromPartial(object.body) : undefined;
380
+ message.authInfo = (object.authInfo !== undefined && object.authInfo !== null)
381
+ ? AuthInfo.fromPartial(object.authInfo)
382
+ : undefined;
383
+ message.signatures = object.signatures?.map((e) => e) || [];
384
+ return message;
385
+ },
386
+ };
387
+
388
+ function createBaseTxRaw(): TxRaw {
389
+ return { bodyBytes: new Uint8Array(), authInfoBytes: new Uint8Array(), signatures: [] };
390
+ }
391
+
392
+ export const TxRaw = {
393
+ encode(message: TxRaw, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
394
+ if (message.bodyBytes.length !== 0) {
395
+ writer.uint32(10).bytes(message.bodyBytes);
396
+ }
397
+ if (message.authInfoBytes.length !== 0) {
398
+ writer.uint32(18).bytes(message.authInfoBytes);
399
+ }
400
+ for (const v of message.signatures) {
401
+ writer.uint32(26).bytes(v!);
402
+ }
403
+ return writer;
404
+ },
405
+
406
+ decode(input: _m0.Reader | Uint8Array, length?: number): TxRaw {
407
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
408
+ let end = length === undefined ? reader.len : reader.pos + length;
409
+ const message = createBaseTxRaw();
410
+ while (reader.pos < end) {
411
+ const tag = reader.uint32();
412
+ switch (tag >>> 3) {
413
+ case 1:
414
+ message.bodyBytes = reader.bytes();
415
+ break;
416
+ case 2:
417
+ message.authInfoBytes = reader.bytes();
418
+ break;
419
+ case 3:
420
+ message.signatures.push(reader.bytes());
421
+ break;
422
+ default:
423
+ reader.skipType(tag & 7);
424
+ break;
425
+ }
426
+ }
427
+ return message;
428
+ },
429
+
430
+ fromJSON(object: any): TxRaw {
431
+ return {
432
+ bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(),
433
+ authInfoBytes: isSet(object.authInfoBytes) ? bytesFromBase64(object.authInfoBytes) : new Uint8Array(),
434
+ signatures: Array.isArray(object?.signatures) ? object.signatures.map((e: any) => bytesFromBase64(e)) : [],
435
+ };
436
+ },
437
+
438
+ toJSON(message: TxRaw): unknown {
439
+ const obj: any = {};
440
+ message.bodyBytes !== undefined
441
+ && (obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
442
+ message.authInfoBytes !== undefined
443
+ && (obj.authInfoBytes = base64FromBytes(
444
+ message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
445
+ ));
446
+ if (message.signatures) {
447
+ obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
448
+ } else {
449
+ obj.signatures = [];
450
+ }
451
+ return obj;
452
+ },
453
+
454
+ fromPartial<I extends Exact<DeepPartial<TxRaw>, I>>(object: I): TxRaw {
455
+ const message = createBaseTxRaw();
456
+ message.bodyBytes = object.bodyBytes ?? new Uint8Array();
457
+ message.authInfoBytes = object.authInfoBytes ?? new Uint8Array();
458
+ message.signatures = object.signatures?.map((e) => e) || [];
459
+ return message;
460
+ },
461
+ };
462
+
463
+ function createBaseSignDoc(): SignDoc {
464
+ return { bodyBytes: new Uint8Array(), authInfoBytes: new Uint8Array(), chainId: "", accountNumber: 0 };
465
+ }
466
+
467
+ export const SignDoc = {
468
+ encode(message: SignDoc, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
469
+ if (message.bodyBytes.length !== 0) {
470
+ writer.uint32(10).bytes(message.bodyBytes);
471
+ }
472
+ if (message.authInfoBytes.length !== 0) {
473
+ writer.uint32(18).bytes(message.authInfoBytes);
474
+ }
475
+ if (message.chainId !== "") {
476
+ writer.uint32(26).string(message.chainId);
477
+ }
478
+ if (message.accountNumber !== 0) {
479
+ writer.uint32(32).uint64(message.accountNumber);
480
+ }
481
+ return writer;
482
+ },
483
+
484
+ decode(input: _m0.Reader | Uint8Array, length?: number): SignDoc {
485
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
486
+ let end = length === undefined ? reader.len : reader.pos + length;
487
+ const message = createBaseSignDoc();
488
+ while (reader.pos < end) {
489
+ const tag = reader.uint32();
490
+ switch (tag >>> 3) {
491
+ case 1:
492
+ message.bodyBytes = reader.bytes();
493
+ break;
494
+ case 2:
495
+ message.authInfoBytes = reader.bytes();
496
+ break;
497
+ case 3:
498
+ message.chainId = reader.string();
499
+ break;
500
+ case 4:
501
+ message.accountNumber = longToNumber(reader.uint64() as Long);
502
+ break;
503
+ default:
504
+ reader.skipType(tag & 7);
505
+ break;
506
+ }
507
+ }
508
+ return message;
509
+ },
510
+
511
+ fromJSON(object: any): SignDoc {
512
+ return {
513
+ bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(),
514
+ authInfoBytes: isSet(object.authInfoBytes) ? bytesFromBase64(object.authInfoBytes) : new Uint8Array(),
515
+ chainId: isSet(object.chainId) ? String(object.chainId) : "",
516
+ accountNumber: isSet(object.accountNumber) ? Number(object.accountNumber) : 0,
517
+ };
518
+ },
519
+
520
+ toJSON(message: SignDoc): unknown {
521
+ const obj: any = {};
522
+ message.bodyBytes !== undefined
523
+ && (obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
524
+ message.authInfoBytes !== undefined
525
+ && (obj.authInfoBytes = base64FromBytes(
526
+ message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
527
+ ));
528
+ message.chainId !== undefined && (obj.chainId = message.chainId);
529
+ message.accountNumber !== undefined && (obj.accountNumber = Math.round(message.accountNumber));
530
+ return obj;
531
+ },
532
+
533
+ fromPartial<I extends Exact<DeepPartial<SignDoc>, I>>(object: I): SignDoc {
534
+ const message = createBaseSignDoc();
535
+ message.bodyBytes = object.bodyBytes ?? new Uint8Array();
536
+ message.authInfoBytes = object.authInfoBytes ?? new Uint8Array();
537
+ message.chainId = object.chainId ?? "";
538
+ message.accountNumber = object.accountNumber ?? 0;
539
+ return message;
540
+ },
541
+ };
542
+
543
+ function createBaseSignDocDirectAux(): SignDocDirectAux {
544
+ return {
545
+ bodyBytes: new Uint8Array(),
546
+ publicKey: undefined,
547
+ chainId: "",
548
+ accountNumber: 0,
549
+ sequence: 0,
550
+ tip: undefined,
551
+ };
552
+ }
553
+
554
+ export const SignDocDirectAux = {
555
+ encode(message: SignDocDirectAux, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
556
+ if (message.bodyBytes.length !== 0) {
557
+ writer.uint32(10).bytes(message.bodyBytes);
558
+ }
559
+ if (message.publicKey !== undefined) {
560
+ Any.encode(message.publicKey, writer.uint32(18).fork()).ldelim();
561
+ }
562
+ if (message.chainId !== "") {
563
+ writer.uint32(26).string(message.chainId);
564
+ }
565
+ if (message.accountNumber !== 0) {
566
+ writer.uint32(32).uint64(message.accountNumber);
567
+ }
568
+ if (message.sequence !== 0) {
569
+ writer.uint32(40).uint64(message.sequence);
570
+ }
571
+ if (message.tip !== undefined) {
572
+ Tip.encode(message.tip, writer.uint32(50).fork()).ldelim();
573
+ }
574
+ return writer;
575
+ },
576
+
577
+ decode(input: _m0.Reader | Uint8Array, length?: number): SignDocDirectAux {
578
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
579
+ let end = length === undefined ? reader.len : reader.pos + length;
580
+ const message = createBaseSignDocDirectAux();
581
+ while (reader.pos < end) {
582
+ const tag = reader.uint32();
583
+ switch (tag >>> 3) {
584
+ case 1:
585
+ message.bodyBytes = reader.bytes();
586
+ break;
587
+ case 2:
588
+ message.publicKey = Any.decode(reader, reader.uint32());
589
+ break;
590
+ case 3:
591
+ message.chainId = reader.string();
592
+ break;
593
+ case 4:
594
+ message.accountNumber = longToNumber(reader.uint64() as Long);
595
+ break;
596
+ case 5:
597
+ message.sequence = longToNumber(reader.uint64() as Long);
598
+ break;
599
+ case 6:
600
+ message.tip = Tip.decode(reader, reader.uint32());
601
+ break;
602
+ default:
603
+ reader.skipType(tag & 7);
604
+ break;
605
+ }
606
+ }
607
+ return message;
608
+ },
609
+
610
+ fromJSON(object: any): SignDocDirectAux {
611
+ return {
612
+ bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(),
613
+ publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined,
614
+ chainId: isSet(object.chainId) ? String(object.chainId) : "",
615
+ accountNumber: isSet(object.accountNumber) ? Number(object.accountNumber) : 0,
616
+ sequence: isSet(object.sequence) ? Number(object.sequence) : 0,
617
+ tip: isSet(object.tip) ? Tip.fromJSON(object.tip) : undefined,
618
+ };
619
+ },
620
+
621
+ toJSON(message: SignDocDirectAux): unknown {
622
+ const obj: any = {};
623
+ message.bodyBytes !== undefined
624
+ && (obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
625
+ message.publicKey !== undefined && (obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
626
+ message.chainId !== undefined && (obj.chainId = message.chainId);
627
+ message.accountNumber !== undefined && (obj.accountNumber = Math.round(message.accountNumber));
628
+ message.sequence !== undefined && (obj.sequence = Math.round(message.sequence));
629
+ message.tip !== undefined && (obj.tip = message.tip ? Tip.toJSON(message.tip) : undefined);
630
+ return obj;
631
+ },
632
+
633
+ fromPartial<I extends Exact<DeepPartial<SignDocDirectAux>, I>>(object: I): SignDocDirectAux {
634
+ const message = createBaseSignDocDirectAux();
635
+ message.bodyBytes = object.bodyBytes ?? new Uint8Array();
636
+ message.publicKey = (object.publicKey !== undefined && object.publicKey !== null)
637
+ ? Any.fromPartial(object.publicKey)
638
+ : undefined;
639
+ message.chainId = object.chainId ?? "";
640
+ message.accountNumber = object.accountNumber ?? 0;
641
+ message.sequence = object.sequence ?? 0;
642
+ message.tip = (object.tip !== undefined && object.tip !== null) ? Tip.fromPartial(object.tip) : undefined;
643
+ return message;
644
+ },
645
+ };
646
+
647
+ function createBaseTxBody(): TxBody {
648
+ return { messages: [], memo: "", timeoutHeight: 0, extensionOptions: [], nonCriticalExtensionOptions: [] };
649
+ }
650
+
651
+ export const TxBody = {
652
+ encode(message: TxBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
653
+ for (const v of message.messages) {
654
+ Any.encode(v!, writer.uint32(10).fork()).ldelim();
655
+ }
656
+ if (message.memo !== "") {
657
+ writer.uint32(18).string(message.memo);
658
+ }
659
+ if (message.timeoutHeight !== 0) {
660
+ writer.uint32(24).uint64(message.timeoutHeight);
661
+ }
662
+ for (const v of message.extensionOptions) {
663
+ Any.encode(v!, writer.uint32(8186).fork()).ldelim();
664
+ }
665
+ for (const v of message.nonCriticalExtensionOptions) {
666
+ Any.encode(v!, writer.uint32(16378).fork()).ldelim();
667
+ }
668
+ return writer;
669
+ },
670
+
671
+ decode(input: _m0.Reader | Uint8Array, length?: number): TxBody {
672
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
673
+ let end = length === undefined ? reader.len : reader.pos + length;
674
+ const message = createBaseTxBody();
675
+ while (reader.pos < end) {
676
+ const tag = reader.uint32();
677
+ switch (tag >>> 3) {
678
+ case 1:
679
+ message.messages.push(Any.decode(reader, reader.uint32()));
680
+ break;
681
+ case 2:
682
+ message.memo = reader.string();
683
+ break;
684
+ case 3:
685
+ message.timeoutHeight = longToNumber(reader.uint64() as Long);
686
+ break;
687
+ case 1023:
688
+ message.extensionOptions.push(Any.decode(reader, reader.uint32()));
689
+ break;
690
+ case 2047:
691
+ message.nonCriticalExtensionOptions.push(Any.decode(reader, reader.uint32()));
692
+ break;
693
+ default:
694
+ reader.skipType(tag & 7);
695
+ break;
696
+ }
697
+ }
698
+ return message;
699
+ },
700
+
701
+ fromJSON(object: any): TxBody {
702
+ return {
703
+ messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [],
704
+ memo: isSet(object.memo) ? String(object.memo) : "",
705
+ timeoutHeight: isSet(object.timeoutHeight) ? Number(object.timeoutHeight) : 0,
706
+ extensionOptions: Array.isArray(object?.extensionOptions)
707
+ ? object.extensionOptions.map((e: any) => Any.fromJSON(e))
708
+ : [],
709
+ nonCriticalExtensionOptions: Array.isArray(object?.nonCriticalExtensionOptions)
710
+ ? object.nonCriticalExtensionOptions.map((e: any) => Any.fromJSON(e))
711
+ : [],
712
+ };
713
+ },
714
+
715
+ toJSON(message: TxBody): unknown {
716
+ const obj: any = {};
717
+ if (message.messages) {
718
+ obj.messages = message.messages.map((e) => e ? Any.toJSON(e) : undefined);
719
+ } else {
720
+ obj.messages = [];
721
+ }
722
+ message.memo !== undefined && (obj.memo = message.memo);
723
+ message.timeoutHeight !== undefined && (obj.timeoutHeight = Math.round(message.timeoutHeight));
724
+ if (message.extensionOptions) {
725
+ obj.extensionOptions = message.extensionOptions.map((e) => e ? Any.toJSON(e) : undefined);
726
+ } else {
727
+ obj.extensionOptions = [];
728
+ }
729
+ if (message.nonCriticalExtensionOptions) {
730
+ obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) => e ? Any.toJSON(e) : undefined);
731
+ } else {
732
+ obj.nonCriticalExtensionOptions = [];
733
+ }
734
+ return obj;
735
+ },
736
+
737
+ fromPartial<I extends Exact<DeepPartial<TxBody>, I>>(object: I): TxBody {
738
+ const message = createBaseTxBody();
739
+ message.messages = object.messages?.map((e) => Any.fromPartial(e)) || [];
740
+ message.memo = object.memo ?? "";
741
+ message.timeoutHeight = object.timeoutHeight ?? 0;
742
+ message.extensionOptions = object.extensionOptions?.map((e) => Any.fromPartial(e)) || [];
743
+ message.nonCriticalExtensionOptions = object.nonCriticalExtensionOptions?.map((e) => Any.fromPartial(e)) || [];
744
+ return message;
745
+ },
746
+ };
747
+
748
+ function createBaseAuthInfo(): AuthInfo {
749
+ return { signerInfos: [], fee: undefined, tip: undefined };
750
+ }
751
+
752
+ export const AuthInfo = {
753
+ encode(message: AuthInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
754
+ for (const v of message.signerInfos) {
755
+ SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim();
756
+ }
757
+ if (message.fee !== undefined) {
758
+ Fee.encode(message.fee, writer.uint32(18).fork()).ldelim();
759
+ }
760
+ if (message.tip !== undefined) {
761
+ Tip.encode(message.tip, writer.uint32(26).fork()).ldelim();
762
+ }
763
+ return writer;
764
+ },
765
+
766
+ decode(input: _m0.Reader | Uint8Array, length?: number): AuthInfo {
767
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
768
+ let end = length === undefined ? reader.len : reader.pos + length;
769
+ const message = createBaseAuthInfo();
770
+ while (reader.pos < end) {
771
+ const tag = reader.uint32();
772
+ switch (tag >>> 3) {
773
+ case 1:
774
+ message.signerInfos.push(SignerInfo.decode(reader, reader.uint32()));
775
+ break;
776
+ case 2:
777
+ message.fee = Fee.decode(reader, reader.uint32());
778
+ break;
779
+ case 3:
780
+ message.tip = Tip.decode(reader, reader.uint32());
781
+ break;
782
+ default:
783
+ reader.skipType(tag & 7);
784
+ break;
785
+ }
786
+ }
787
+ return message;
788
+ },
789
+
790
+ fromJSON(object: any): AuthInfo {
791
+ return {
792
+ signerInfos: Array.isArray(object?.signerInfos) ? object.signerInfos.map((e: any) => SignerInfo.fromJSON(e)) : [],
793
+ fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined,
794
+ tip: isSet(object.tip) ? Tip.fromJSON(object.tip) : undefined,
795
+ };
796
+ },
797
+
798
+ toJSON(message: AuthInfo): unknown {
799
+ const obj: any = {};
800
+ if (message.signerInfos) {
801
+ obj.signerInfos = message.signerInfos.map((e) => e ? SignerInfo.toJSON(e) : undefined);
802
+ } else {
803
+ obj.signerInfos = [];
804
+ }
805
+ message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);
806
+ message.tip !== undefined && (obj.tip = message.tip ? Tip.toJSON(message.tip) : undefined);
807
+ return obj;
808
+ },
809
+
810
+ fromPartial<I extends Exact<DeepPartial<AuthInfo>, I>>(object: I): AuthInfo {
811
+ const message = createBaseAuthInfo();
812
+ message.signerInfos = object.signerInfos?.map((e) => SignerInfo.fromPartial(e)) || [];
813
+ message.fee = (object.fee !== undefined && object.fee !== null) ? Fee.fromPartial(object.fee) : undefined;
814
+ message.tip = (object.tip !== undefined && object.tip !== null) ? Tip.fromPartial(object.tip) : undefined;
815
+ return message;
816
+ },
817
+ };
818
+
819
+ function createBaseSignerInfo(): SignerInfo {
820
+ return { publicKey: undefined, modeInfo: undefined, sequence: 0 };
821
+ }
822
+
823
+ export const SignerInfo = {
824
+ encode(message: SignerInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
825
+ if (message.publicKey !== undefined) {
826
+ Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
827
+ }
828
+ if (message.modeInfo !== undefined) {
829
+ ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim();
830
+ }
831
+ if (message.sequence !== 0) {
832
+ writer.uint32(24).uint64(message.sequence);
833
+ }
834
+ return writer;
835
+ },
836
+
837
+ decode(input: _m0.Reader | Uint8Array, length?: number): SignerInfo {
838
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
839
+ let end = length === undefined ? reader.len : reader.pos + length;
840
+ const message = createBaseSignerInfo();
841
+ while (reader.pos < end) {
842
+ const tag = reader.uint32();
843
+ switch (tag >>> 3) {
844
+ case 1:
845
+ message.publicKey = Any.decode(reader, reader.uint32());
846
+ break;
847
+ case 2:
848
+ message.modeInfo = ModeInfo.decode(reader, reader.uint32());
849
+ break;
850
+ case 3:
851
+ message.sequence = longToNumber(reader.uint64() as Long);
852
+ break;
853
+ default:
854
+ reader.skipType(tag & 7);
855
+ break;
856
+ }
857
+ }
858
+ return message;
859
+ },
860
+
861
+ fromJSON(object: any): SignerInfo {
862
+ return {
863
+ publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined,
864
+ modeInfo: isSet(object.modeInfo) ? ModeInfo.fromJSON(object.modeInfo) : undefined,
865
+ sequence: isSet(object.sequence) ? Number(object.sequence) : 0,
866
+ };
867
+ },
868
+
869
+ toJSON(message: SignerInfo): unknown {
870
+ const obj: any = {};
871
+ message.publicKey !== undefined && (obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
872
+ message.modeInfo !== undefined && (obj.modeInfo = message.modeInfo ? ModeInfo.toJSON(message.modeInfo) : undefined);
873
+ message.sequence !== undefined && (obj.sequence = Math.round(message.sequence));
874
+ return obj;
875
+ },
876
+
877
+ fromPartial<I extends Exact<DeepPartial<SignerInfo>, I>>(object: I): SignerInfo {
878
+ const message = createBaseSignerInfo();
879
+ message.publicKey = (object.publicKey !== undefined && object.publicKey !== null)
880
+ ? Any.fromPartial(object.publicKey)
881
+ : undefined;
882
+ message.modeInfo = (object.modeInfo !== undefined && object.modeInfo !== null)
883
+ ? ModeInfo.fromPartial(object.modeInfo)
884
+ : undefined;
885
+ message.sequence = object.sequence ?? 0;
886
+ return message;
887
+ },
888
+ };
889
+
890
+ function createBaseModeInfo(): ModeInfo {
891
+ return { single: undefined, multi: undefined };
892
+ }
893
+
894
+ export const ModeInfo = {
895
+ encode(message: ModeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
896
+ if (message.single !== undefined) {
897
+ ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim();
898
+ }
899
+ if (message.multi !== undefined) {
900
+ ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim();
901
+ }
902
+ return writer;
903
+ },
904
+
905
+ decode(input: _m0.Reader | Uint8Array, length?: number): ModeInfo {
906
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
907
+ let end = length === undefined ? reader.len : reader.pos + length;
908
+ const message = createBaseModeInfo();
909
+ while (reader.pos < end) {
910
+ const tag = reader.uint32();
911
+ switch (tag >>> 3) {
912
+ case 1:
913
+ message.single = ModeInfo_Single.decode(reader, reader.uint32());
914
+ break;
915
+ case 2:
916
+ message.multi = ModeInfo_Multi.decode(reader, reader.uint32());
917
+ break;
918
+ default:
919
+ reader.skipType(tag & 7);
920
+ break;
921
+ }
922
+ }
923
+ return message;
924
+ },
925
+
926
+ fromJSON(object: any): ModeInfo {
927
+ return {
928
+ single: isSet(object.single) ? ModeInfo_Single.fromJSON(object.single) : undefined,
929
+ multi: isSet(object.multi) ? ModeInfo_Multi.fromJSON(object.multi) : undefined,
930
+ };
931
+ },
932
+
933
+ toJSON(message: ModeInfo): unknown {
934
+ const obj: any = {};
935
+ message.single !== undefined && (obj.single = message.single ? ModeInfo_Single.toJSON(message.single) : undefined);
936
+ message.multi !== undefined && (obj.multi = message.multi ? ModeInfo_Multi.toJSON(message.multi) : undefined);
937
+ return obj;
938
+ },
939
+
940
+ fromPartial<I extends Exact<DeepPartial<ModeInfo>, I>>(object: I): ModeInfo {
941
+ const message = createBaseModeInfo();
942
+ message.single = (object.single !== undefined && object.single !== null)
943
+ ? ModeInfo_Single.fromPartial(object.single)
944
+ : undefined;
945
+ message.multi = (object.multi !== undefined && object.multi !== null)
946
+ ? ModeInfo_Multi.fromPartial(object.multi)
947
+ : undefined;
948
+ return message;
949
+ },
950
+ };
951
+
952
+ function createBaseModeInfo_Single(): ModeInfo_Single {
953
+ return { mode: 0 };
954
+ }
955
+
956
+ export const ModeInfo_Single = {
957
+ encode(message: ModeInfo_Single, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
958
+ if (message.mode !== 0) {
959
+ writer.uint32(8).int32(message.mode);
960
+ }
961
+ return writer;
962
+ },
963
+
964
+ decode(input: _m0.Reader | Uint8Array, length?: number): ModeInfo_Single {
965
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
966
+ let end = length === undefined ? reader.len : reader.pos + length;
967
+ const message = createBaseModeInfo_Single();
968
+ while (reader.pos < end) {
969
+ const tag = reader.uint32();
970
+ switch (tag >>> 3) {
971
+ case 1:
972
+ message.mode = reader.int32() as any;
973
+ break;
974
+ default:
975
+ reader.skipType(tag & 7);
976
+ break;
977
+ }
978
+ }
979
+ return message;
980
+ },
981
+
982
+ fromJSON(object: any): ModeInfo_Single {
983
+ return { mode: isSet(object.mode) ? signModeFromJSON(object.mode) : 0 };
984
+ },
985
+
986
+ toJSON(message: ModeInfo_Single): unknown {
987
+ const obj: any = {};
988
+ message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
989
+ return obj;
990
+ },
991
+
992
+ fromPartial<I extends Exact<DeepPartial<ModeInfo_Single>, I>>(object: I): ModeInfo_Single {
993
+ const message = createBaseModeInfo_Single();
994
+ message.mode = object.mode ?? 0;
995
+ return message;
996
+ },
997
+ };
998
+
999
+ function createBaseModeInfo_Multi(): ModeInfo_Multi {
1000
+ return { bitarray: undefined, modeInfos: [] };
1001
+ }
1002
+
1003
+ export const ModeInfo_Multi = {
1004
+ encode(message: ModeInfo_Multi, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1005
+ if (message.bitarray !== undefined) {
1006
+ CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();
1007
+ }
1008
+ for (const v of message.modeInfos) {
1009
+ ModeInfo.encode(v!, writer.uint32(18).fork()).ldelim();
1010
+ }
1011
+ return writer;
1012
+ },
1013
+
1014
+ decode(input: _m0.Reader | Uint8Array, length?: number): ModeInfo_Multi {
1015
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1016
+ let end = length === undefined ? reader.len : reader.pos + length;
1017
+ const message = createBaseModeInfo_Multi();
1018
+ while (reader.pos < end) {
1019
+ const tag = reader.uint32();
1020
+ switch (tag >>> 3) {
1021
+ case 1:
1022
+ message.bitarray = CompactBitArray.decode(reader, reader.uint32());
1023
+ break;
1024
+ case 2:
1025
+ message.modeInfos.push(ModeInfo.decode(reader, reader.uint32()));
1026
+ break;
1027
+ default:
1028
+ reader.skipType(tag & 7);
1029
+ break;
1030
+ }
1031
+ }
1032
+ return message;
1033
+ },
1034
+
1035
+ fromJSON(object: any): ModeInfo_Multi {
1036
+ return {
1037
+ bitarray: isSet(object.bitarray) ? CompactBitArray.fromJSON(object.bitarray) : undefined,
1038
+ modeInfos: Array.isArray(object?.modeInfos) ? object.modeInfos.map((e: any) => ModeInfo.fromJSON(e)) : [],
1039
+ };
1040
+ },
1041
+
1042
+ toJSON(message: ModeInfo_Multi): unknown {
1043
+ const obj: any = {};
1044
+ message.bitarray !== undefined
1045
+ && (obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
1046
+ if (message.modeInfos) {
1047
+ obj.modeInfos = message.modeInfos.map((e) => e ? ModeInfo.toJSON(e) : undefined);
1048
+ } else {
1049
+ obj.modeInfos = [];
1050
+ }
1051
+ return obj;
1052
+ },
1053
+
1054
+ fromPartial<I extends Exact<DeepPartial<ModeInfo_Multi>, I>>(object: I): ModeInfo_Multi {
1055
+ const message = createBaseModeInfo_Multi();
1056
+ message.bitarray = (object.bitarray !== undefined && object.bitarray !== null)
1057
+ ? CompactBitArray.fromPartial(object.bitarray)
1058
+ : undefined;
1059
+ message.modeInfos = object.modeInfos?.map((e) => ModeInfo.fromPartial(e)) || [];
1060
+ return message;
1061
+ },
1062
+ };
1063
+
1064
+ function createBaseFee(): Fee {
1065
+ return { amount: [], gasLimit: 0, payer: "", granter: "" };
1066
+ }
1067
+
1068
+ export const Fee = {
1069
+ encode(message: Fee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1070
+ for (const v of message.amount) {
1071
+ Coin.encode(v!, writer.uint32(10).fork()).ldelim();
1072
+ }
1073
+ if (message.gasLimit !== 0) {
1074
+ writer.uint32(16).uint64(message.gasLimit);
1075
+ }
1076
+ if (message.payer !== "") {
1077
+ writer.uint32(26).string(message.payer);
1078
+ }
1079
+ if (message.granter !== "") {
1080
+ writer.uint32(34).string(message.granter);
1081
+ }
1082
+ return writer;
1083
+ },
1084
+
1085
+ decode(input: _m0.Reader | Uint8Array, length?: number): Fee {
1086
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1087
+ let end = length === undefined ? reader.len : reader.pos + length;
1088
+ const message = createBaseFee();
1089
+ while (reader.pos < end) {
1090
+ const tag = reader.uint32();
1091
+ switch (tag >>> 3) {
1092
+ case 1:
1093
+ message.amount.push(Coin.decode(reader, reader.uint32()));
1094
+ break;
1095
+ case 2:
1096
+ message.gasLimit = longToNumber(reader.uint64() as Long);
1097
+ break;
1098
+ case 3:
1099
+ message.payer = reader.string();
1100
+ break;
1101
+ case 4:
1102
+ message.granter = reader.string();
1103
+ break;
1104
+ default:
1105
+ reader.skipType(tag & 7);
1106
+ break;
1107
+ }
1108
+ }
1109
+ return message;
1110
+ },
1111
+
1112
+ fromJSON(object: any): Fee {
1113
+ return {
1114
+ amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [],
1115
+ gasLimit: isSet(object.gasLimit) ? Number(object.gasLimit) : 0,
1116
+ payer: isSet(object.payer) ? String(object.payer) : "",
1117
+ granter: isSet(object.granter) ? String(object.granter) : "",
1118
+ };
1119
+ },
1120
+
1121
+ toJSON(message: Fee): unknown {
1122
+ const obj: any = {};
1123
+ if (message.amount) {
1124
+ obj.amount = message.amount.map((e) => e ? Coin.toJSON(e) : undefined);
1125
+ } else {
1126
+ obj.amount = [];
1127
+ }
1128
+ message.gasLimit !== undefined && (obj.gasLimit = Math.round(message.gasLimit));
1129
+ message.payer !== undefined && (obj.payer = message.payer);
1130
+ message.granter !== undefined && (obj.granter = message.granter);
1131
+ return obj;
1132
+ },
1133
+
1134
+ fromPartial<I extends Exact<DeepPartial<Fee>, I>>(object: I): Fee {
1135
+ const message = createBaseFee();
1136
+ message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
1137
+ message.gasLimit = object.gasLimit ?? 0;
1138
+ message.payer = object.payer ?? "";
1139
+ message.granter = object.granter ?? "";
1140
+ return message;
1141
+ },
1142
+ };
1143
+
1144
+ function createBaseTip(): Tip {
1145
+ return { amount: [], tipper: "" };
1146
+ }
1147
+
1148
+ export const Tip = {
1149
+ encode(message: Tip, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1150
+ for (const v of message.amount) {
1151
+ Coin.encode(v!, writer.uint32(10).fork()).ldelim();
1152
+ }
1153
+ if (message.tipper !== "") {
1154
+ writer.uint32(18).string(message.tipper);
1155
+ }
1156
+ return writer;
1157
+ },
1158
+
1159
+ decode(input: _m0.Reader | Uint8Array, length?: number): Tip {
1160
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1161
+ let end = length === undefined ? reader.len : reader.pos + length;
1162
+ const message = createBaseTip();
1163
+ while (reader.pos < end) {
1164
+ const tag = reader.uint32();
1165
+ switch (tag >>> 3) {
1166
+ case 1:
1167
+ message.amount.push(Coin.decode(reader, reader.uint32()));
1168
+ break;
1169
+ case 2:
1170
+ message.tipper = reader.string();
1171
+ break;
1172
+ default:
1173
+ reader.skipType(tag & 7);
1174
+ break;
1175
+ }
1176
+ }
1177
+ return message;
1178
+ },
1179
+
1180
+ fromJSON(object: any): Tip {
1181
+ return {
1182
+ amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [],
1183
+ tipper: isSet(object.tipper) ? String(object.tipper) : "",
1184
+ };
1185
+ },
1186
+
1187
+ toJSON(message: Tip): unknown {
1188
+ const obj: any = {};
1189
+ if (message.amount) {
1190
+ obj.amount = message.amount.map((e) => e ? Coin.toJSON(e) : undefined);
1191
+ } else {
1192
+ obj.amount = [];
1193
+ }
1194
+ message.tipper !== undefined && (obj.tipper = message.tipper);
1195
+ return obj;
1196
+ },
1197
+
1198
+ fromPartial<I extends Exact<DeepPartial<Tip>, I>>(object: I): Tip {
1199
+ const message = createBaseTip();
1200
+ message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
1201
+ message.tipper = object.tipper ?? "";
1202
+ return message;
1203
+ },
1204
+ };
1205
+
1206
+ function createBaseAuxSignerData(): AuxSignerData {
1207
+ return { address: "", signDoc: undefined, mode: 0, sig: new Uint8Array() };
1208
+ }
1209
+
1210
+ export const AuxSignerData = {
1211
+ encode(message: AuxSignerData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1212
+ if (message.address !== "") {
1213
+ writer.uint32(10).string(message.address);
1214
+ }
1215
+ if (message.signDoc !== undefined) {
1216
+ SignDocDirectAux.encode(message.signDoc, writer.uint32(18).fork()).ldelim();
1217
+ }
1218
+ if (message.mode !== 0) {
1219
+ writer.uint32(24).int32(message.mode);
1220
+ }
1221
+ if (message.sig.length !== 0) {
1222
+ writer.uint32(34).bytes(message.sig);
1223
+ }
1224
+ return writer;
1225
+ },
1226
+
1227
+ decode(input: _m0.Reader | Uint8Array, length?: number): AuxSignerData {
1228
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1229
+ let end = length === undefined ? reader.len : reader.pos + length;
1230
+ const message = createBaseAuxSignerData();
1231
+ while (reader.pos < end) {
1232
+ const tag = reader.uint32();
1233
+ switch (tag >>> 3) {
1234
+ case 1:
1235
+ message.address = reader.string();
1236
+ break;
1237
+ case 2:
1238
+ message.signDoc = SignDocDirectAux.decode(reader, reader.uint32());
1239
+ break;
1240
+ case 3:
1241
+ message.mode = reader.int32() as any;
1242
+ break;
1243
+ case 4:
1244
+ message.sig = reader.bytes();
1245
+ break;
1246
+ default:
1247
+ reader.skipType(tag & 7);
1248
+ break;
1249
+ }
1250
+ }
1251
+ return message;
1252
+ },
1253
+
1254
+ fromJSON(object: any): AuxSignerData {
1255
+ return {
1256
+ address: isSet(object.address) ? String(object.address) : "",
1257
+ signDoc: isSet(object.signDoc) ? SignDocDirectAux.fromJSON(object.signDoc) : undefined,
1258
+ mode: isSet(object.mode) ? signModeFromJSON(object.mode) : 0,
1259
+ sig: isSet(object.sig) ? bytesFromBase64(object.sig) : new Uint8Array(),
1260
+ };
1261
+ },
1262
+
1263
+ toJSON(message: AuxSignerData): unknown {
1264
+ const obj: any = {};
1265
+ message.address !== undefined && (obj.address = message.address);
1266
+ message.signDoc !== undefined
1267
+ && (obj.signDoc = message.signDoc ? SignDocDirectAux.toJSON(message.signDoc) : undefined);
1268
+ message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
1269
+ message.sig !== undefined
1270
+ && (obj.sig = base64FromBytes(message.sig !== undefined ? message.sig : new Uint8Array()));
1271
+ return obj;
1272
+ },
1273
+
1274
+ fromPartial<I extends Exact<DeepPartial<AuxSignerData>, I>>(object: I): AuxSignerData {
1275
+ const message = createBaseAuxSignerData();
1276
+ message.address = object.address ?? "";
1277
+ message.signDoc = (object.signDoc !== undefined && object.signDoc !== null)
1278
+ ? SignDocDirectAux.fromPartial(object.signDoc)
1279
+ : undefined;
1280
+ message.mode = object.mode ?? 0;
1281
+ message.sig = object.sig ?? new Uint8Array();
1282
+ return message;
1283
+ },
1284
+ };
1285
+
1286
+ declare var self: any | undefined;
1287
+ declare var window: any | undefined;
1288
+ declare var global: any | undefined;
1289
+ var globalThis: any = (() => {
1290
+ if (typeof globalThis !== "undefined") {
1291
+ return globalThis;
1292
+ }
1293
+ if (typeof self !== "undefined") {
1294
+ return self;
1295
+ }
1296
+ if (typeof window !== "undefined") {
1297
+ return window;
1298
+ }
1299
+ if (typeof global !== "undefined") {
1300
+ return global;
1301
+ }
1302
+ throw "Unable to locate global object";
1303
+ })();
1304
+
1305
+ function bytesFromBase64(b64: string): Uint8Array {
1306
+ if (globalThis.Buffer) {
1307
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
1308
+ } else {
1309
+ const bin = globalThis.atob(b64);
1310
+ const arr = new Uint8Array(bin.length);
1311
+ for (let i = 0; i < bin.length; ++i) {
1312
+ arr[i] = bin.charCodeAt(i);
1313
+ }
1314
+ return arr;
1315
+ }
1316
+ }
1317
+
1318
+ function base64FromBytes(arr: Uint8Array): string {
1319
+ if (globalThis.Buffer) {
1320
+ return globalThis.Buffer.from(arr).toString("base64");
1321
+ } else {
1322
+ const bin: string[] = [];
1323
+ arr.forEach((byte) => {
1324
+ bin.push(String.fromCharCode(byte));
1325
+ });
1326
+ return globalThis.btoa(bin.join(""));
1327
+ }
1328
+ }
1329
+
1330
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1331
+
1332
+ export type DeepPartial<T> = T extends Builtin ? T
1333
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1334
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1335
+ : Partial<T>;
1336
+
1337
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
1338
+ export type Exact<P, I extends P> = P extends Builtin ? P
1339
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
1340
+
1341
+ function longToNumber(long: Long): number {
1342
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
1343
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1344
+ }
1345
+ return long.toNumber();
1346
+ }
1347
+
1348
+ if (_m0.util.Long !== Long) {
1349
+ _m0.util.Long = Long as any;
1350
+ _m0.configure();
1351
+ }
1352
+
1353
+ function isSet(value: any): boolean {
1354
+ return value !== null && value !== undefined;
1355
+ }