carbon-js-sdk 0.11.71 → 0.11.73

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 (962) hide show
  1. package/lib/CarbonSDK.js +244 -266
  2. package/lib/clients/BatchQueryClient.js +9 -21
  3. package/lib/clients/CarbonQueryClient.js +1 -2
  4. package/lib/clients/ETHClient.js +231 -245
  5. package/lib/clients/GasFee.js +2 -3
  6. package/lib/clients/GrpcQueryClient.js +5 -1
  7. package/lib/clients/HydrogenClient.js +110 -63
  8. package/lib/clients/InsightsQueryClient.js +457 -593
  9. package/lib/clients/TokenClient.js +271 -318
  10. package/lib/codec/Switcheo/carbon/adl/genesis.d.ts +1 -0
  11. package/lib/codec/Switcheo/carbon/adl/genesis.js +14 -9
  12. package/lib/codec/Switcheo/carbon/adl/query.d.ts +4 -1
  13. package/lib/codec/Switcheo/carbon/adl/query.js +3 -11
  14. package/lib/codec/Switcheo/carbon/adl/tx.d.ts +4 -1
  15. package/lib/codec/Switcheo/carbon/adl/tx.js +3 -11
  16. package/lib/codec/Switcheo/carbon/admin/genesis.d.ts +1 -0
  17. package/lib/codec/Switcheo/carbon/admin/genesis.js +40 -35
  18. package/lib/codec/Switcheo/carbon/admin/params.d.ts +2 -0
  19. package/lib/codec/Switcheo/carbon/admin/params.js +42 -33
  20. package/lib/codec/Switcheo/carbon/admin/query.d.ts +10 -1
  21. package/lib/codec/Switcheo/carbon/admin/query.js +113 -86
  22. package/lib/codec/Switcheo/carbon/admin/tx.d.ts +12 -1
  23. package/lib/codec/Switcheo/carbon/admin/tx.js +164 -128
  24. package/lib/codec/Switcheo/carbon/bank/event.d.ts +5 -0
  25. package/lib/codec/Switcheo/carbon/bank/event.js +149 -116
  26. package/lib/codec/Switcheo/carbon/bank/genesis.d.ts +1 -0
  27. package/lib/codec/Switcheo/carbon/bank/genesis.js +23 -15
  28. package/lib/codec/Switcheo/carbon/bank/query.d.ts +12 -1
  29. package/lib/codec/Switcheo/carbon/bank/query.js +287 -258
  30. package/lib/codec/Switcheo/carbon/bank/tx.d.ts +8 -1
  31. package/lib/codec/Switcheo/carbon/bank/tx.js +91 -67
  32. package/lib/codec/Switcheo/carbon/book/book.d.ts +4 -0
  33. package/lib/codec/Switcheo/carbon/book/book.js +144 -113
  34. package/lib/codec/Switcheo/carbon/book/event.d.ts +4 -0
  35. package/lib/codec/Switcheo/carbon/book/event.js +120 -85
  36. package/lib/codec/Switcheo/carbon/book/export.d.ts +1 -1
  37. package/lib/codec/Switcheo/carbon/book/export.js +2 -2
  38. package/lib/codec/Switcheo/carbon/book/genesis.d.ts +1 -0
  39. package/lib/codec/Switcheo/carbon/book/genesis.js +27 -19
  40. package/lib/codec/Switcheo/carbon/book/legacy.d.ts +8 -7
  41. package/lib/codec/Switcheo/carbon/book/legacy.js +50 -45
  42. package/lib/codec/Switcheo/carbon/book/query.d.ts +15 -2
  43. package/lib/codec/Switcheo/carbon/book/query.js +264 -239
  44. package/lib/codec/Switcheo/carbon/book/tx.d.ts +4 -1
  45. package/lib/codec/Switcheo/carbon/book/tx.js +3 -11
  46. package/lib/codec/Switcheo/carbon/bridge/bridge.d.ts +35 -0
  47. package/lib/codec/Switcheo/carbon/bridge/bridge.js +486 -281
  48. package/lib/codec/Switcheo/carbon/bridge/event.d.ts +23 -1
  49. package/lib/codec/Switcheo/carbon/bridge/event.js +886 -945
  50. package/lib/codec/Switcheo/carbon/bridge/export.d.ts +4 -4
  51. package/lib/codec/Switcheo/carbon/bridge/export.js +10 -21
  52. package/lib/codec/Switcheo/carbon/bridge/genesis.d.ts +2 -1
  53. package/lib/codec/Switcheo/carbon/bridge/genesis.js +117 -69
  54. package/lib/codec/Switcheo/carbon/bridge/params.d.ts +23 -0
  55. package/lib/codec/Switcheo/carbon/bridge/params.js +294 -68
  56. package/lib/codec/Switcheo/carbon/bridge/pending_action.d.ts +7 -1
  57. package/lib/codec/Switcheo/carbon/bridge/pending_action.js +374 -381
  58. package/lib/codec/Switcheo/carbon/bridge/query.d.ts +77 -3
  59. package/lib/codec/Switcheo/carbon/bridge/query.js +808 -520
  60. package/lib/codec/Switcheo/carbon/bridge/tx.d.ts +55 -253
  61. package/lib/codec/Switcheo/carbon/bridge/tx.js +1495 -2388
  62. package/lib/codec/Switcheo/carbon/broker/amm.d.ts +3 -0
  63. package/lib/codec/Switcheo/carbon/broker/amm.js +132 -112
  64. package/lib/codec/Switcheo/carbon/broker/candlestick.d.ts +1 -0
  65. package/lib/codec/Switcheo/carbon/broker/candlestick.js +97 -89
  66. package/lib/codec/Switcheo/carbon/broker/event.d.ts +2 -0
  67. package/lib/codec/Switcheo/carbon/broker/event.js +241 -252
  68. package/lib/codec/Switcheo/carbon/broker/genesis.d.ts +2 -1
  69. package/lib/codec/Switcheo/carbon/broker/genesis.js +27 -19
  70. package/lib/codec/Switcheo/carbon/broker/incoming_liquidations.d.ts +1 -0
  71. package/lib/codec/Switcheo/carbon/broker/incoming_liquidations.js +47 -33
  72. package/lib/codec/Switcheo/carbon/broker/pagination.d.ts +1 -0
  73. package/lib/codec/Switcheo/carbon/broker/pagination.js +32 -31
  74. package/lib/codec/Switcheo/carbon/broker/query.d.ts +11 -2
  75. package/lib/codec/Switcheo/carbon/broker/query.js +279 -284
  76. package/lib/codec/Switcheo/carbon/broker/tx.d.ts +7 -1
  77. package/lib/codec/Switcheo/carbon/broker/tx.js +77 -55
  78. package/lib/codec/Switcheo/carbon/btcx/denom_cross_chain_info.d.ts +1 -0
  79. package/lib/codec/Switcheo/carbon/btcx/denom_cross_chain_info.js +43 -44
  80. package/lib/codec/Switcheo/carbon/btcx/denom_info.d.ts +1 -0
  81. package/lib/codec/Switcheo/carbon/btcx/denom_info.js +63 -64
  82. package/lib/codec/Switcheo/carbon/btcx/genesis.d.ts +1 -0
  83. package/lib/codec/Switcheo/carbon/btcx/genesis.js +14 -9
  84. package/lib/codec/Switcheo/carbon/btcx/query.d.ts +8 -1
  85. package/lib/codec/Switcheo/carbon/btcx/query.js +120 -116
  86. package/lib/codec/Switcheo/carbon/btcx/tx.d.ts +10 -1
  87. package/lib/codec/Switcheo/carbon/btcx/tx.js +210 -189
  88. package/lib/codec/Switcheo/carbon/ccm/genesis.d.ts +7 -0
  89. package/lib/codec/Switcheo/carbon/ccm/genesis.js +299 -215
  90. package/lib/codec/Switcheo/carbon/ccm/params.d.ts +2 -0
  91. package/lib/codec/Switcheo/carbon/ccm/params.js +28 -18
  92. package/lib/codec/Switcheo/carbon/ccm/query.d.ts +8 -1
  93. package/lib/codec/Switcheo/carbon/ccm/query.js +137 -118
  94. package/lib/codec/Switcheo/carbon/ccm/tx.d.ts +9 -1
  95. package/lib/codec/Switcheo/carbon/ccm/tx.js +162 -156
  96. package/lib/codec/Switcheo/carbon/cdp/asset_params.d.ts +6 -0
  97. package/lib/codec/Switcheo/carbon/cdp/asset_params.js +255 -227
  98. package/lib/codec/Switcheo/carbon/cdp/cdp_liquidations.d.ts +1 -0
  99. package/lib/codec/Switcheo/carbon/cdp/cdp_liquidations.js +138 -142
  100. package/lib/codec/Switcheo/carbon/cdp/debt_info.d.ts +1 -0
  101. package/lib/codec/Switcheo/carbon/cdp/debt_info.js +68 -64
  102. package/lib/codec/Switcheo/carbon/cdp/e_mode_category.d.ts +1 -0
  103. package/lib/codec/Switcheo/carbon/cdp/e_mode_category.js +57 -60
  104. package/lib/codec/Switcheo/carbon/cdp/event.d.ts +37 -4
  105. package/lib/codec/Switcheo/carbon/cdp/event.js +1315 -1279
  106. package/lib/codec/Switcheo/carbon/cdp/export.d.ts +3 -2
  107. package/lib/codec/Switcheo/carbon/cdp/export.js +22 -4
  108. package/lib/codec/Switcheo/carbon/cdp/genesis.d.ts +13 -5
  109. package/lib/codec/Switcheo/carbon/cdp/genesis.js +421 -316
  110. package/lib/codec/Switcheo/carbon/cdp/nlend.d.ts +39 -0
  111. package/lib/codec/Switcheo/carbon/cdp/nlend.js +172 -0
  112. package/lib/codec/Switcheo/carbon/cdp/params.d.ts +4 -0
  113. package/lib/codec/Switcheo/carbon/cdp/params.js +229 -209
  114. package/lib/codec/Switcheo/carbon/cdp/query.d.ts +213 -7
  115. package/lib/codec/Switcheo/carbon/cdp/query.js +2249 -1370
  116. package/lib/codec/Switcheo/carbon/cdp/rate_strategy_params.d.ts +1 -0
  117. package/lib/codec/Switcheo/carbon/cdp/rate_strategy_params.js +52 -57
  118. package/lib/codec/Switcheo/carbon/cdp/reward_scheme.d.ts +4 -0
  119. package/lib/codec/Switcheo/carbon/cdp/reward_scheme.js +277 -275
  120. package/lib/codec/Switcheo/carbon/cdp/stablecoin_debt_info.d.ts +1 -0
  121. package/lib/codec/Switcheo/carbon/cdp/stablecoin_debt_info.js +60 -55
  122. package/lib/codec/Switcheo/carbon/cdp/stablecoin_interest_info.d.ts +1 -0
  123. package/lib/codec/Switcheo/carbon/cdp/stablecoin_interest_info.js +34 -29
  124. package/lib/codec/Switcheo/carbon/cdp/tx.d.ts +124 -4
  125. package/lib/codec/Switcheo/carbon/cdp/tx.js +1991 -1557
  126. package/lib/codec/Switcheo/carbon/coin/bridge.d.ts +1 -0
  127. package/lib/codec/Switcheo/carbon/coin/bridge.js +74 -69
  128. package/lib/codec/Switcheo/carbon/coin/event.d.ts +13 -1
  129. package/lib/codec/Switcheo/carbon/coin/event.js +360 -348
  130. package/lib/codec/Switcheo/carbon/coin/export.d.ts +1 -0
  131. package/lib/codec/Switcheo/carbon/coin/export.js +6 -2
  132. package/lib/codec/Switcheo/carbon/coin/genesis.d.ts +3 -1
  133. package/lib/codec/Switcheo/carbon/coin/genesis.js +92 -60
  134. package/lib/codec/Switcheo/carbon/coin/group.d.ts +3 -0
  135. package/lib/codec/Switcheo/carbon/coin/group.js +104 -97
  136. package/lib/codec/Switcheo/carbon/coin/params.d.ts +35 -0
  137. package/lib/codec/Switcheo/carbon/coin/params.js +148 -0
  138. package/lib/codec/Switcheo/carbon/coin/proposal.d.ts +1 -0
  139. package/lib/codec/Switcheo/carbon/coin/proposal.js +40 -37
  140. package/lib/codec/Switcheo/carbon/coin/query.d.ts +29 -2
  141. package/lib/codec/Switcheo/carbon/coin/query.js +647 -577
  142. package/lib/codec/Switcheo/carbon/coin/token.d.ts +7 -0
  143. package/lib/codec/Switcheo/carbon/coin/token.js +344 -344
  144. package/lib/codec/Switcheo/carbon/coin/tx.d.ts +57 -3
  145. package/lib/codec/Switcheo/carbon/coin/tx.js +1621 -1514
  146. package/lib/codec/Switcheo/carbon/erc20/erc20.d.ts +1 -0
  147. package/lib/codec/Switcheo/carbon/erc20/erc20.js +46 -44
  148. package/lib/codec/Switcheo/carbon/erc20/events.d.ts +4 -0
  149. package/lib/codec/Switcheo/carbon/erc20/events.js +151 -144
  150. package/lib/codec/Switcheo/carbon/erc20/genesis.d.ts +2 -1
  151. package/lib/codec/Switcheo/carbon/erc20/genesis.js +34 -27
  152. package/lib/codec/Switcheo/carbon/erc20/params.d.ts +2 -0
  153. package/lib/codec/Switcheo/carbon/erc20/params.js +61 -52
  154. package/lib/codec/Switcheo/carbon/erc20/query.d.ts +10 -1
  155. package/lib/codec/Switcheo/carbon/erc20/query.js +140 -121
  156. package/lib/codec/Switcheo/carbon/erc20/tx.d.ts +18 -1
  157. package/lib/codec/Switcheo/carbon/erc20/tx.js +341 -287
  158. package/lib/codec/Switcheo/carbon/evmbank/genesis.d.ts +2 -0
  159. package/lib/codec/Switcheo/carbon/evmbank/genesis.js +77 -56
  160. package/lib/codec/Switcheo/carbon/evmbank/query.d.ts +6 -1
  161. package/lib/codec/Switcheo/carbon/evmbank/query.js +45 -35
  162. package/lib/codec/Switcheo/carbon/evmcontract/evm_hooks.d.ts +5 -0
  163. package/lib/codec/Switcheo/carbon/evmcontract/evm_hooks.js +196 -172
  164. package/lib/codec/Switcheo/carbon/evmcontract/genesis.d.ts +2 -1
  165. package/lib/codec/Switcheo/carbon/evmcontract/genesis.js +44 -31
  166. package/lib/codec/Switcheo/carbon/evmcontract/params.d.ts +2 -0
  167. package/lib/codec/Switcheo/carbon/evmcontract/params.js +47 -40
  168. package/lib/codec/Switcheo/carbon/evmcontract/query.d.ts +15 -2
  169. package/lib/codec/Switcheo/carbon/evmcontract/query.js +248 -219
  170. package/lib/codec/Switcheo/carbon/evmcontract/tx.d.ts +10 -1
  171. package/lib/codec/Switcheo/carbon/evmcontract/tx.js +151 -131
  172. package/lib/codec/Switcheo/carbon/evmmerge/address.d.ts +1 -0
  173. package/lib/codec/Switcheo/carbon/evmmerge/address.js +31 -27
  174. package/lib/codec/Switcheo/carbon/evmmerge/event.d.ts +1 -0
  175. package/lib/codec/Switcheo/carbon/evmmerge/event.js +38 -37
  176. package/lib/codec/Switcheo/carbon/evmmerge/genesis.d.ts +3 -0
  177. package/lib/codec/Switcheo/carbon/evmmerge/genesis.js +91 -71
  178. package/lib/codec/Switcheo/carbon/evmmerge/offchain.d.ts +1 -0
  179. package/lib/codec/Switcheo/carbon/evmmerge/offchain.js +58 -42
  180. package/lib/codec/Switcheo/carbon/evmmerge/query.d.ts +8 -1
  181. package/lib/codec/Switcheo/carbon/evmmerge/query.js +107 -91
  182. package/lib/codec/Switcheo/carbon/evmmerge/tx.d.ts +6 -1
  183. package/lib/codec/Switcheo/carbon/evmmerge/tx.js +54 -40
  184. package/lib/codec/Switcheo/carbon/fee/event.d.ts +1 -0
  185. package/lib/codec/Switcheo/carbon/fee/event.js +36 -28
  186. package/lib/codec/Switcheo/carbon/fee/fee.d.ts +3 -0
  187. package/lib/codec/Switcheo/carbon/fee/fee.js +84 -64
  188. package/lib/codec/Switcheo/carbon/fee/genesis.d.ts +2 -1
  189. package/lib/codec/Switcheo/carbon/fee/genesis.js +29 -19
  190. package/lib/codec/Switcheo/carbon/fee/query.d.ts +13 -2
  191. package/lib/codec/Switcheo/carbon/fee/query.js +202 -180
  192. package/lib/codec/Switcheo/carbon/fee/tx.d.ts +13 -2
  193. package/lib/codec/Switcheo/carbon/fee/tx.js +186 -147
  194. package/lib/codec/Switcheo/carbon/headersync/consensus_peers.d.ts +5 -0
  195. package/lib/codec/Switcheo/carbon/headersync/consensus_peers.js +181 -158
  196. package/lib/codec/Switcheo/carbon/headersync/genesis.d.ts +5 -0
  197. package/lib/codec/Switcheo/carbon/headersync/genesis.js +207 -153
  198. package/lib/codec/Switcheo/carbon/headersync/query.d.ts +6 -1
  199. package/lib/codec/Switcheo/carbon/headersync/query.js +53 -44
  200. package/lib/codec/Switcheo/carbon/headersync/tx.d.ts +8 -1
  201. package/lib/codec/Switcheo/carbon/headersync/tx.js +92 -68
  202. package/lib/codec/Switcheo/carbon/inflation/genesis.d.ts +1 -0
  203. package/lib/codec/Switcheo/carbon/inflation/genesis.js +34 -31
  204. package/lib/codec/Switcheo/carbon/inflation/inflation.d.ts +1 -0
  205. package/lib/codec/Switcheo/carbon/inflation/inflation.js +73 -71
  206. package/lib/codec/Switcheo/carbon/inflation/query.d.ts +6 -1
  207. package/lib/codec/Switcheo/carbon/inflation/query.js +43 -34
  208. package/lib/codec/Switcheo/carbon/inflation/tx.d.ts +4 -1
  209. package/lib/codec/Switcheo/carbon/inflation/tx.js +3 -11
  210. package/lib/codec/Switcheo/carbon/insurance/event.d.ts +1 -0
  211. package/lib/codec/Switcheo/carbon/insurance/event.js +14 -9
  212. package/lib/codec/Switcheo/carbon/insurance/fund.d.ts +3 -0
  213. package/lib/codec/Switcheo/carbon/insurance/fund.js +116 -98
  214. package/lib/codec/Switcheo/carbon/insurance/genesis.d.ts +2 -1
  215. package/lib/codec/Switcheo/carbon/insurance/genesis.js +36 -27
  216. package/lib/codec/Switcheo/carbon/insurance/params.d.ts +3 -1
  217. package/lib/codec/Switcheo/carbon/insurance/params.js +82 -69
  218. package/lib/codec/Switcheo/carbon/insurance/query.d.ts +14 -3
  219. package/lib/codec/Switcheo/carbon/insurance/query.js +182 -150
  220. package/lib/codec/Switcheo/carbon/insurance/tx.d.ts +8 -1
  221. package/lib/codec/Switcheo/carbon/insurance/tx.js +106 -91
  222. package/lib/codec/Switcheo/carbon/leverage/event.d.ts +1 -0
  223. package/lib/codec/Switcheo/carbon/leverage/event.js +42 -39
  224. package/lib/codec/Switcheo/carbon/leverage/genesis.d.ts +1 -0
  225. package/lib/codec/Switcheo/carbon/leverage/genesis.js +23 -15
  226. package/lib/codec/Switcheo/carbon/leverage/leverage.d.ts +2 -0
  227. package/lib/codec/Switcheo/carbon/leverage/leverage.js +60 -50
  228. package/lib/codec/Switcheo/carbon/leverage/query.d.ts +8 -1
  229. package/lib/codec/Switcheo/carbon/leverage/query.js +102 -79
  230. package/lib/codec/Switcheo/carbon/leverage/tx.d.ts +6 -1
  231. package/lib/codec/Switcheo/carbon/leverage/tx.js +54 -40
  232. package/lib/codec/Switcheo/carbon/liquidation/event.d.ts +1 -0
  233. package/lib/codec/Switcheo/carbon/liquidation/event.js +66 -61
  234. package/lib/codec/Switcheo/carbon/liquidation/genesis.d.ts +2 -0
  235. package/lib/codec/Switcheo/carbon/liquidation/genesis.js +62 -45
  236. package/lib/codec/Switcheo/carbon/liquidation/outstanding_position.d.ts +2 -0
  237. package/lib/codec/Switcheo/carbon/liquidation/outstanding_position.js +89 -76
  238. package/lib/codec/Switcheo/carbon/liquidation/query.d.ts +6 -1
  239. package/lib/codec/Switcheo/carbon/liquidation/query.js +124 -122
  240. package/lib/codec/Switcheo/carbon/liquidation/quote_changes.d.ts +1 -0
  241. package/lib/codec/Switcheo/carbon/liquidation/quote_changes.js +34 -24
  242. package/lib/codec/Switcheo/carbon/liquidation/tx.d.ts +4 -1
  243. package/lib/codec/Switcheo/carbon/liquidation/tx.js +3 -11
  244. package/lib/codec/Switcheo/carbon/liquiditypool/event.d.ts +15 -2
  245. package/lib/codec/Switcheo/carbon/liquiditypool/event.js +612 -614
  246. package/lib/codec/Switcheo/carbon/liquiditypool/genesis.d.ts +3 -2
  247. package/lib/codec/Switcheo/carbon/liquiditypool/genesis.js +121 -96
  248. package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.d.ts +10 -0
  249. package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.js +543 -524
  250. package/lib/codec/Switcheo/carbon/liquiditypool/params.d.ts +2 -0
  251. package/lib/codec/Switcheo/carbon/liquiditypool/params.js +66 -58
  252. package/lib/codec/Switcheo/carbon/liquiditypool/proposal.d.ts +10 -1
  253. package/lib/codec/Switcheo/carbon/liquiditypool/proposal.js +336 -331
  254. package/lib/codec/Switcheo/carbon/liquiditypool/query.d.ts +37 -3
  255. package/lib/codec/Switcheo/carbon/liquiditypool/query.js +799 -711
  256. package/lib/codec/Switcheo/carbon/liquiditypool/reward.d.ts +16 -0
  257. package/lib/codec/Switcheo/carbon/liquiditypool/reward.js +579 -537
  258. package/lib/codec/Switcheo/carbon/liquiditypool/tx.d.ts +45 -1
  259. package/lib/codec/Switcheo/carbon/liquiditypool/tx.js +1209 -1091
  260. package/lib/codec/Switcheo/carbon/lockproxy/event.d.ts +2 -0
  261. package/lib/codec/Switcheo/carbon/lockproxy/event.js +181 -174
  262. package/lib/codec/Switcheo/carbon/lockproxy/genesis.d.ts +4 -0
  263. package/lib/codec/Switcheo/carbon/lockproxy/genesis.js +177 -123
  264. package/lib/codec/Switcheo/carbon/lockproxy/lockproxy.d.ts +1 -0
  265. package/lib/codec/Switcheo/carbon/lockproxy/lockproxy.js +84 -75
  266. package/lib/codec/Switcheo/carbon/lockproxy/query.d.ts +8 -1
  267. package/lib/codec/Switcheo/carbon/lockproxy/query.js +130 -106
  268. package/lib/codec/Switcheo/carbon/lockproxy/tx.d.ts +18 -1
  269. package/lib/codec/Switcheo/carbon/lockproxy/tx.js +515 -490
  270. package/lib/codec/Switcheo/carbon/market/event.d.ts +1 -0
  271. package/lib/codec/Switcheo/carbon/market/event.js +33 -27
  272. package/lib/codec/Switcheo/carbon/market/fee.d.ts +5 -0
  273. package/lib/codec/Switcheo/carbon/market/fee.js +152 -136
  274. package/lib/codec/Switcheo/carbon/market/genesis.d.ts +3 -2
  275. package/lib/codec/Switcheo/carbon/market/genesis.js +75 -57
  276. package/lib/codec/Switcheo/carbon/market/market.d.ts +4 -0
  277. package/lib/codec/Switcheo/carbon/market/market.js +475 -478
  278. package/lib/codec/Switcheo/carbon/market/params.d.ts +2 -0
  279. package/lib/codec/Switcheo/carbon/market/params.js +454 -513
  280. package/lib/codec/Switcheo/carbon/market/proposal.d.ts +4 -1
  281. package/lib/codec/Switcheo/carbon/market/proposal.js +109 -105
  282. package/lib/codec/Switcheo/carbon/market/query.d.ts +26 -3
  283. package/lib/codec/Switcheo/carbon/market/query.js +577 -516
  284. package/lib/codec/Switcheo/carbon/market/tx.d.ts +36 -4
  285. package/lib/codec/Switcheo/carbon/market/tx.js +830 -742
  286. package/lib/codec/Switcheo/carbon/marketstats/genesis.d.ts +1 -0
  287. package/lib/codec/Switcheo/carbon/marketstats/genesis.js +14 -9
  288. package/lib/codec/Switcheo/carbon/marketstats/marketstats.d.ts +1 -0
  289. package/lib/codec/Switcheo/carbon/marketstats/marketstats.js +123 -118
  290. package/lib/codec/Switcheo/carbon/marketstats/query.d.ts +6 -1
  291. package/lib/codec/Switcheo/carbon/marketstats/query.js +41 -27
  292. package/lib/codec/Switcheo/carbon/marketstats/tx.d.ts +4 -1
  293. package/lib/codec/Switcheo/carbon/marketstats/tx.js +3 -11
  294. package/lib/codec/Switcheo/carbon/misc/block.d.ts +1 -0
  295. package/lib/codec/Switcheo/carbon/misc/block.js +47 -47
  296. package/lib/codec/Switcheo/carbon/misc/message.d.ts +1 -0
  297. package/lib/codec/Switcheo/carbon/misc/message.js +71 -62
  298. package/lib/codec/Switcheo/carbon/misc/message_type.d.ts +1 -0
  299. package/lib/codec/Switcheo/carbon/misc/message_type.js +23 -18
  300. package/lib/codec/Switcheo/carbon/misc/query.d.ts +19 -2
  301. package/lib/codec/Switcheo/carbon/misc/query.js +390 -317
  302. package/lib/codec/Switcheo/carbon/misc/trade.d.ts +1 -0
  303. package/lib/codec/Switcheo/carbon/misc/trade.js +105 -101
  304. package/lib/codec/Switcheo/carbon/misc/transaction.d.ts +2 -0
  305. package/lib/codec/Switcheo/carbon/misc/transaction.js +185 -182
  306. package/lib/codec/Switcheo/carbon/oracle/event.d.ts +2 -0
  307. package/lib/codec/Switcheo/carbon/oracle/event.js +113 -112
  308. package/lib/codec/Switcheo/carbon/oracle/export.d.ts +1 -1
  309. package/lib/codec/Switcheo/carbon/oracle/export.js +4 -2
  310. package/lib/codec/Switcheo/carbon/oracle/genesis.d.ts +3 -2
  311. package/lib/codec/Switcheo/carbon/oracle/genesis.js +73 -44
  312. package/lib/codec/Switcheo/carbon/oracle/historical.d.ts +3 -0
  313. package/lib/codec/Switcheo/carbon/oracle/historical.js +100 -92
  314. package/lib/codec/Switcheo/carbon/oracle/oracle.d.ts +3 -0
  315. package/lib/codec/Switcheo/carbon/oracle/oracle.js +174 -167
  316. package/lib/codec/Switcheo/carbon/oracle/params.d.ts +2 -0
  317. package/lib/codec/Switcheo/carbon/oracle/params.js +214 -219
  318. package/lib/codec/Switcheo/carbon/oracle/query.d.ts +62 -4
  319. package/lib/codec/Switcheo/carbon/oracle/query.js +905 -708
  320. package/lib/codec/Switcheo/carbon/oracle/slashing.d.ts +2 -0
  321. package/lib/codec/Switcheo/carbon/oracle/slashing.js +86 -88
  322. package/lib/codec/Switcheo/carbon/oracle/tx.d.ts +31 -2
  323. package/lib/codec/Switcheo/carbon/oracle/tx.js +846 -728
  324. package/lib/codec/Switcheo/carbon/order/event.d.ts +1 -0
  325. package/lib/codec/Switcheo/carbon/order/event.js +55 -60
  326. package/lib/codec/Switcheo/carbon/order/evm_hooks.d.ts +4 -0
  327. package/lib/codec/Switcheo/carbon/order/evm_hooks.js +176 -154
  328. package/lib/codec/Switcheo/carbon/order/genesis.d.ts +5 -1
  329. package/lib/codec/Switcheo/carbon/order/genesis.js +151 -128
  330. package/lib/codec/Switcheo/carbon/order/order.d.ts +5 -0
  331. package/lib/codec/Switcheo/carbon/order/order.js +407 -395
  332. package/lib/codec/Switcheo/carbon/order/params.d.ts +2 -0
  333. package/lib/codec/Switcheo/carbon/order/params.js +63 -57
  334. package/lib/codec/Switcheo/carbon/order/query.d.ts +17 -2
  335. package/lib/codec/Switcheo/carbon/order/query.js +306 -267
  336. package/lib/codec/Switcheo/carbon/order/tx.d.ts +18 -1
  337. package/lib/codec/Switcheo/carbon/order/tx.js +444 -388
  338. package/lib/codec/Switcheo/carbon/otc/event.d.ts +2 -0
  339. package/lib/codec/Switcheo/carbon/otc/event.js +75 -76
  340. package/lib/codec/Switcheo/carbon/otc/genesis.d.ts +2 -1
  341. package/lib/codec/Switcheo/carbon/otc/genesis.js +42 -33
  342. package/lib/codec/Switcheo/carbon/otc/params.d.ts +2 -0
  343. package/lib/codec/Switcheo/carbon/otc/params.js +164 -149
  344. package/lib/codec/Switcheo/carbon/otc/query.d.ts +16 -3
  345. package/lib/codec/Switcheo/carbon/otc/query.js +297 -279
  346. package/lib/codec/Switcheo/carbon/otc/quote.d.ts +2 -0
  347. package/lib/codec/Switcheo/carbon/otc/quote.js +80 -74
  348. package/lib/codec/Switcheo/carbon/otc/rfq.d.ts +2 -0
  349. package/lib/codec/Switcheo/carbon/otc/rfq.js +80 -69
  350. package/lib/codec/Switcheo/carbon/otc/tx.d.ts +15 -2
  351. package/lib/codec/Switcheo/carbon/otc/tx.js +253 -200
  352. package/lib/codec/Switcheo/carbon/perpspool/event.d.ts +14 -2
  353. package/lib/codec/Switcheo/carbon/perpspool/event.js +576 -586
  354. package/lib/codec/Switcheo/carbon/perpspool/genesis.d.ts +7 -2
  355. package/lib/codec/Switcheo/carbon/perpspool/genesis.js +238 -200
  356. package/lib/codec/Switcheo/carbon/perpspool/market.d.ts +8 -1
  357. package/lib/codec/Switcheo/carbon/perpspool/market.js +263 -251
  358. package/lib/codec/Switcheo/carbon/perpspool/params.d.ts +7 -1
  359. package/lib/codec/Switcheo/carbon/perpspool/params.js +422 -376
  360. package/lib/codec/Switcheo/carbon/perpspool/pool.d.ts +8 -1
  361. package/lib/codec/Switcheo/carbon/perpspool/pool.js +326 -335
  362. package/lib/codec/Switcheo/carbon/perpspool/query.d.ts +38 -2
  363. package/lib/codec/Switcheo/carbon/perpspool/query.js +914 -841
  364. package/lib/codec/Switcheo/carbon/perpspool/quote.d.ts +3 -0
  365. package/lib/codec/Switcheo/carbon/perpspool/quote.js +100 -91
  366. package/lib/codec/Switcheo/carbon/perpspool/tx.d.ts +38 -5
  367. package/lib/codec/Switcheo/carbon/perpspool/tx.js +909 -853
  368. package/lib/codec/Switcheo/carbon/perpspool/user_vault.d.ts +4 -0
  369. package/lib/codec/Switcheo/carbon/perpspool/user_vault.js +235 -244
  370. package/lib/codec/Switcheo/carbon/position/event.d.ts +3 -1
  371. package/lib/codec/Switcheo/carbon/position/event.js +111 -120
  372. package/lib/codec/Switcheo/carbon/position/evm_hooks.d.ts +2 -0
  373. package/lib/codec/Switcheo/carbon/position/evm_hooks.js +101 -81
  374. package/lib/codec/Switcheo/carbon/position/genesis.d.ts +1 -0
  375. package/lib/codec/Switcheo/carbon/position/genesis.js +23 -15
  376. package/lib/codec/Switcheo/carbon/position/position.d.ts +5 -0
  377. package/lib/codec/Switcheo/carbon/position/position.js +322 -322
  378. package/lib/codec/Switcheo/carbon/position/query.d.ts +15 -2
  379. package/lib/codec/Switcheo/carbon/position/query.js +258 -221
  380. package/lib/codec/Switcheo/carbon/position/tx.d.ts +6 -1
  381. package/lib/codec/Switcheo/carbon/position/tx.js +54 -40
  382. package/lib/codec/Switcheo/carbon/pricing/event.d.ts +8 -1
  383. package/lib/codec/Switcheo/carbon/pricing/event.js +189 -170
  384. package/lib/codec/Switcheo/carbon/pricing/export.d.ts +2 -2
  385. package/lib/codec/Switcheo/carbon/pricing/export.js +8 -1
  386. package/lib/codec/Switcheo/carbon/pricing/genesis.d.ts +1 -0
  387. package/lib/codec/Switcheo/carbon/pricing/genesis.js +39 -30
  388. package/lib/codec/Switcheo/carbon/pricing/legacy.d.ts +1 -0
  389. package/lib/codec/Switcheo/carbon/pricing/legacy.js +41 -35
  390. package/lib/codec/Switcheo/carbon/pricing/params.d.ts +2 -0
  391. package/lib/codec/Switcheo/carbon/pricing/params.js +150 -139
  392. package/lib/codec/Switcheo/carbon/pricing/pricing.d.ts +42 -0
  393. package/lib/codec/Switcheo/carbon/pricing/pricing.js +436 -208
  394. package/lib/codec/Switcheo/carbon/pricing/query.d.ts +70 -2
  395. package/lib/codec/Switcheo/carbon/pricing/query.js +568 -289
  396. package/lib/codec/Switcheo/carbon/pricing/tx.d.ts +20 -1
  397. package/lib/codec/Switcheo/carbon/pricing/tx.js +381 -316
  398. package/lib/codec/Switcheo/carbon/profile/event.d.ts +1 -0
  399. package/lib/codec/Switcheo/carbon/profile/event.js +33 -29
  400. package/lib/codec/Switcheo/carbon/profile/genesis.d.ts +1 -0
  401. package/lib/codec/Switcheo/carbon/profile/genesis.js +19 -15
  402. package/lib/codec/Switcheo/carbon/profile/profile.d.ts +1 -0
  403. package/lib/codec/Switcheo/carbon/profile/profile.js +36 -28
  404. package/lib/codec/Switcheo/carbon/profile/query.d.ts +11 -2
  405. package/lib/codec/Switcheo/carbon/profile/query.js +146 -132
  406. package/lib/codec/Switcheo/carbon/profile/tx.d.ts +6 -1
  407. package/lib/codec/Switcheo/carbon/profile/tx.js +54 -40
  408. package/lib/codec/Switcheo/carbon/sequence/genesis.d.ts +2 -0
  409. package/lib/codec/Switcheo/carbon/sequence/genesis.js +54 -40
  410. package/lib/codec/Switcheo/carbon/sequence/query.d.ts +8 -1
  411. package/lib/codec/Switcheo/carbon/sequence/query.js +101 -84
  412. package/lib/codec/Switcheo/carbon/sequence/tx.d.ts +6 -1
  413. package/lib/codec/Switcheo/carbon/sequence/tx.js +63 -56
  414. package/lib/codec/Switcheo/carbon/subaccount/export.d.ts +1 -1
  415. package/lib/codec/Switcheo/carbon/subaccount/export.js +2 -2
  416. package/lib/codec/Switcheo/carbon/subaccount/genesis.d.ts +2 -1
  417. package/lib/codec/Switcheo/carbon/subaccount/genesis.js +51 -34
  418. package/lib/codec/Switcheo/carbon/subaccount/legacy.d.ts +8 -7
  419. package/lib/codec/Switcheo/carbon/subaccount/legacy.js +33 -26
  420. package/lib/codec/Switcheo/carbon/subaccount/params.d.ts +2 -0
  421. package/lib/codec/Switcheo/carbon/subaccount/params.js +47 -32
  422. package/lib/codec/Switcheo/carbon/subaccount/query.d.ts +25 -3
  423. package/lib/codec/Switcheo/carbon/subaccount/query.js +505 -448
  424. package/lib/codec/Switcheo/carbon/subaccount/subaccount.d.ts +3 -0
  425. package/lib/codec/Switcheo/carbon/subaccount/subaccount.js +122 -122
  426. package/lib/codec/Switcheo/carbon/subaccount/tx.d.ts +12 -1
  427. package/lib/codec/Switcheo/carbon/subaccount/tx.js +219 -197
  428. package/lib/codec/alliance/alliance/alliance.d.ts +3 -0
  429. package/lib/codec/alliance/alliance/alliance.js +171 -156
  430. package/lib/codec/alliance/alliance/delegations.d.ts +4 -0
  431. package/lib/codec/alliance/alliance/delegations.js +163 -134
  432. package/lib/codec/alliance/alliance/events.d.ts +5 -0
  433. package/lib/codec/alliance/alliance/events.js +199 -200
  434. package/lib/codec/alliance/alliance/genesis.d.ts +8 -3
  435. package/lib/codec/alliance/alliance/genesis.js +224 -191
  436. package/lib/codec/alliance/alliance/gov.d.ts +3 -0
  437. package/lib/codec/alliance/alliance/gov.js +211 -208
  438. package/lib/codec/alliance/alliance/params.d.ts +2 -0
  439. package/lib/codec/alliance/alliance/params.js +79 -69
  440. package/lib/codec/alliance/alliance/query.d.ts +36 -4
  441. package/lib/codec/alliance/alliance/query.js +905 -851
  442. package/lib/codec/alliance/alliance/redelegations.d.ts +3 -0
  443. package/lib/codec/alliance/alliance/redelegations.js +127 -131
  444. package/lib/codec/alliance/alliance/tx.d.ts +21 -2
  445. package/lib/codec/alliance/alliance/tx.js +505 -459
  446. package/lib/codec/alliance/alliance/unbonding.d.ts +1 -0
  447. package/lib/codec/alliance/alliance/unbonding.js +46 -44
  448. package/lib/codec/amino/amino.js +1 -10
  449. package/lib/codec/cosmos/app/runtime/v1alpha1/module.d.ts +2 -0
  450. package/lib/codec/cosmos/app/runtime/v1alpha1/module.js +113 -80
  451. package/lib/codec/cosmos/app/v1alpha1/config.d.ts +3 -0
  452. package/lib/codec/cosmos/app/v1alpha1/config.js +99 -77
  453. package/lib/codec/cosmos/app/v1alpha1/module.d.ts +3 -0
  454. package/lib/codec/cosmos/app/v1alpha1/module.js +87 -64
  455. package/lib/codec/cosmos/app/v1alpha1/query.d.ts +6 -1
  456. package/lib/codec/cosmos/app/v1alpha1/query.js +43 -32
  457. package/lib/codec/cosmos/auth/module/v1/module.d.ts +2 -0
  458. package/lib/codec/cosmos/auth/module/v1/module.js +67 -50
  459. package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +4 -0
  460. package/lib/codec/cosmos/auth/v1beta1/auth.js +208 -192
  461. package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +2 -1
  462. package/lib/codec/cosmos/auth/v1beta1/genesis.js +34 -27
  463. package/lib/codec/cosmos/auth/v1beta1/query.d.ts +26 -3
  464. package/lib/codec/cosmos/auth/v1beta1/query.js +462 -402
  465. package/lib/codec/cosmos/auth/v1beta1/tx.d.ts +6 -1
  466. package/lib/codec/cosmos/auth/v1beta1/tx.js +51 -39
  467. package/lib/codec/cosmos/authz/module/v1/module.d.ts +1 -0
  468. package/lib/codec/cosmos/authz/module/v1/module.js +14 -9
  469. package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +4 -0
  470. package/lib/codec/cosmos/authz/v1beta1/authz.js +117 -103
  471. package/lib/codec/cosmos/authz/v1beta1/event.d.ts +2 -0
  472. package/lib/codec/cosmos/authz/v1beta1/event.js +69 -56
  473. package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +1 -0
  474. package/lib/codec/cosmos/authz/v1beta1/genesis.js +23 -15
  475. package/lib/codec/cosmos/authz/v1beta1/query.d.ts +10 -1
  476. package/lib/codec/cosmos/authz/v1beta1/query.js +204 -189
  477. package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +11 -2
  478. package/lib/codec/cosmos/authz/v1beta1/tx.js +182 -142
  479. package/lib/codec/cosmos/autocli/v1/options.d.ts +7 -0
  480. package/lib/codec/cosmos/autocli/v1/options.js +340 -289
  481. package/lib/codec/cosmos/autocli/v1/query.d.ts +7 -1
  482. package/lib/codec/cosmos/autocli/v1/query.js +80 -57
  483. package/lib/codec/cosmos/bank/module/v1/module.d.ts +1 -0
  484. package/lib/codec/cosmos/bank/module/v1/module.js +41 -31
  485. package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +1 -0
  486. package/lib/codec/cosmos/bank/v1beta1/authz.js +27 -19
  487. package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +7 -0
  488. package/lib/codec/cosmos/bank/v1beta1/bank.js +234 -199
  489. package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +3 -1
  490. package/lib/codec/cosmos/bank/v1beta1/genesis.js +85 -62
  491. package/lib/codec/cosmos/bank/v1beta1/query.d.ts +33 -3
  492. package/lib/codec/cosmos/bank/v1beta1/query.js +734 -673
  493. package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +13 -2
  494. package/lib/codec/cosmos/bank/v1beta1/tx.js +198 -148
  495. package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +11 -0
  496. package/lib/codec/cosmos/base/abci/v1beta1/abci.js +536 -495
  497. package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +8 -1
  498. package/lib/codec/cosmos/base/node/v1beta1/query.js +170 -154
  499. package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +2 -0
  500. package/lib/codec/cosmos/base/query/v1beta1/pagination.js +108 -102
  501. package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +8 -1
  502. package/lib/codec/cosmos/base/reflection/v1beta1/reflection.js +87 -64
  503. package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +30 -1
  504. package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.js +656 -557
  505. package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +26 -4
  506. package/lib/codec/cosmos/base/tendermint/v1beta1/query.js +725 -685
  507. package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +3 -1
  508. package/lib/codec/cosmos/base/tendermint/v1beta1/types.js +215 -221
  509. package/lib/codec/cosmos/base/v1beta1/coin.d.ts +4 -0
  510. package/lib/codec/cosmos/base/v1beta1/coin.js +95 -72
  511. package/lib/codec/cosmos/circuit/module/v1/module.d.ts +1 -0
  512. package/lib/codec/cosmos/circuit/module/v1/module.js +22 -16
  513. package/lib/codec/cosmos/circuit/v1/query.d.ts +11 -2
  514. package/lib/codec/cosmos/circuit/v1/query.js +140 -117
  515. package/lib/codec/cosmos/circuit/v1/tx.d.ts +10 -1
  516. package/lib/codec/cosmos/circuit/v1/tx.js +158 -131
  517. package/lib/codec/cosmos/circuit/v1/types.d.ts +3 -0
  518. package/lib/codec/cosmos/circuit/v1/types.js +94 -71
  519. package/lib/codec/cosmos/consensus/module/v1/module.d.ts +1 -0
  520. package/lib/codec/cosmos/consensus/module/v1/module.js +22 -16
  521. package/lib/codec/cosmos/consensus/v1/query.d.ts +6 -1
  522. package/lib/codec/cosmos/consensus/v1/query.js +43 -34
  523. package/lib/codec/cosmos/consensus/v1/tx.d.ts +7 -2
  524. package/lib/codec/cosmos/consensus/v1/tx.js +78 -76
  525. package/lib/codec/cosmos/crisis/module/v1/module.d.ts +1 -0
  526. package/lib/codec/cosmos/crisis/module/v1/module.js +31 -24
  527. package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +1 -0
  528. package/lib/codec/cosmos/crisis/v1beta1/genesis.js +25 -21
  529. package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +8 -1
  530. package/lib/codec/cosmos/crisis/v1beta1/tx.js +102 -88
  531. package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +2 -0
  532. package/lib/codec/cosmos/crypto/ed25519/keys.js +69 -52
  533. package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +1 -0
  534. package/lib/codec/cosmos/crypto/hd/v1/hd.js +52 -51
  535. package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +5 -0
  536. package/lib/codec/cosmos/crypto/keyring/v1/record.js +141 -136
  537. package/lib/codec/cosmos/crypto/multisig/keys.d.ts +1 -0
  538. package/lib/codec/cosmos/crypto/multisig/keys.js +31 -22
  539. package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +2 -0
  540. package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.js +80 -58
  541. package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +2 -0
  542. package/lib/codec/cosmos/crypto/secp256k1/keys.js +69 -52
  543. package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +2 -0
  544. package/lib/codec/cosmos/crypto/secp256r1/keys.js +69 -52
  545. package/lib/codec/cosmos/distribution/module/v1/module.d.ts +1 -0
  546. package/lib/codec/cosmos/distribution/module/v1/module.js +31 -24
  547. package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +13 -1
  548. package/lib/codec/cosmos/distribution/v1beta1/distribution.js +397 -356
  549. package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +9 -1
  550. package/lib/codec/cosmos/distribution/v1beta1/genesis.js +371 -332
  551. package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +27 -2
  552. package/lib/codec/cosmos/distribution/v1beta1/query.js +531 -472
  553. package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +19 -2
  554. package/lib/codec/cosmos/distribution/v1beta1/tx.js +337 -283
  555. package/lib/codec/cosmos/evidence/module/v1/module.d.ts +1 -0
  556. package/lib/codec/cosmos/evidence/module/v1/module.js +14 -9
  557. package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +1 -0
  558. package/lib/codec/cosmos/evidence/v1beta1/evidence.js +49 -52
  559. package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +1 -0
  560. package/lib/codec/cosmos/evidence/v1beta1/genesis.js +19 -15
  561. package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +8 -1
  562. package/lib/codec/cosmos/evidence/v1beta1/query.js +139 -119
  563. package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +6 -1
  564. package/lib/codec/cosmos/evidence/v1beta1/tx.js +84 -67
  565. package/lib/codec/cosmos/feegrant/module/v1/module.d.ts +1 -0
  566. package/lib/codec/cosmos/feegrant/module/v1/module.js +14 -9
  567. package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +5 -1
  568. package/lib/codec/cosmos/feegrant/v1beta1/feegrant.js +156 -142
  569. package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +1 -0
  570. package/lib/codec/cosmos/feegrant/v1beta1/genesis.js +21 -15
  571. package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +11 -2
  572. package/lib/codec/cosmos/feegrant/v1beta1/query.js +181 -161
  573. package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +10 -1
  574. package/lib/codec/cosmos/feegrant/v1beta1/tx.js +135 -107
  575. package/lib/codec/cosmos/genutil/module/v1/module.d.ts +1 -0
  576. package/lib/codec/cosmos/genutil/module/v1/module.js +14 -9
  577. package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +1 -0
  578. package/lib/codec/cosmos/genutil/v1beta1/genesis.js +47 -33
  579. package/lib/codec/cosmos/gov/module/v1/module.d.ts +1 -0
  580. package/lib/codec/cosmos/gov/module/v1/module.js +33 -27
  581. package/lib/codec/cosmos/gov/v1/genesis.d.ts +2 -1
  582. package/lib/codec/cosmos/gov/v1/genesis.js +98 -93
  583. package/lib/codec/cosmos/gov/v1/gov.d.ts +10 -1
  584. package/lib/codec/cosmos/gov/v1/gov.js +524 -507
  585. package/lib/codec/cosmos/gov/v1/query.d.ts +23 -2
  586. package/lib/codec/cosmos/gov/v1/query.js +518 -494
  587. package/lib/codec/cosmos/gov/v1/tx.d.ts +19 -2
  588. package/lib/codec/cosmos/gov/v1/tx.js +425 -383
  589. package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +2 -1
  590. package/lib/codec/cosmos/gov/v1beta1/genesis.js +80 -71
  591. package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +9 -0
  592. package/lib/codec/cosmos/gov/v1beta1/gov.js +391 -349
  593. package/lib/codec/cosmos/gov/v1beta1/query.d.ts +21 -2
  594. package/lib/codec/cosmos/gov/v1beta1/query.js +473 -454
  595. package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +13 -2
  596. package/lib/codec/cosmos/gov/v1beta1/tx.js +226 -189
  597. package/lib/codec/cosmos/group/module/v1/module.d.ts +1 -0
  598. package/lib/codec/cosmos/group/module/v1/module.js +36 -34
  599. package/lib/codec/cosmos/group/v1/events.d.ts +11 -0
  600. package/lib/codec/cosmos/group/v1/events.js +289 -267
  601. package/lib/codec/cosmos/group/v1/genesis.d.ts +1 -0
  602. package/lib/codec/cosmos/group/v1/genesis.js +89 -69
  603. package/lib/codec/cosmos/group/v1/query.d.ts +33 -2
  604. package/lib/codec/cosmos/group/v1/query.js +802 -744
  605. package/lib/codec/cosmos/group/v1/tx.d.ts +33 -2
  606. package/lib/codec/cosmos/group/v1/tx.js +830 -769
  607. package/lib/codec/cosmos/group/v1/types.d.ts +12 -1
  608. package/lib/codec/cosmos/group/v1/types.js +562 -565
  609. package/lib/codec/cosmos/ics23/v1/proofs.d.ts +13 -0
  610. package/lib/codec/cosmos/ics23/v1/proofs.js +559 -553
  611. package/lib/codec/cosmos/mint/module/v1/module.d.ts +1 -0
  612. package/lib/codec/cosmos/mint/module/v1/module.js +31 -24
  613. package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +1 -0
  614. package/lib/codec/cosmos/mint/v1beta1/genesis.js +36 -31
  615. package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +2 -0
  616. package/lib/codec/cosmos/mint/v1beta1/mint.js +95 -89
  617. package/lib/codec/cosmos/mint/v1beta1/query.d.ts +10 -1
  618. package/lib/codec/cosmos/mint/v1beta1/query.js +144 -109
  619. package/lib/codec/cosmos/mint/v1beta1/tx.d.ts +6 -1
  620. package/lib/codec/cosmos/mint/v1beta1/tx.js +51 -39
  621. package/lib/codec/cosmos/msg/textual/v1/textual.js +1 -10
  622. package/lib/codec/cosmos/msg/v1/msg.js +1 -10
  623. package/lib/codec/cosmos/nft/module/v1/module.d.ts +1 -0
  624. package/lib/codec/cosmos/nft/module/v1/module.js +14 -9
  625. package/lib/codec/cosmos/nft/v1beta1/event.d.ts +3 -0
  626. package/lib/codec/cosmos/nft/v1beta1/event.js +108 -84
  627. package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +2 -0
  628. package/lib/codec/cosmos/nft/v1beta1/genesis.js +58 -41
  629. package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +2 -0
  630. package/lib/codec/cosmos/nft/v1beta1/nft.js +108 -103
  631. package/lib/codec/cosmos/nft/v1beta1/query.d.ts +19 -2
  632. package/lib/codec/cosmos/nft/v1beta1/query.js +360 -315
  633. package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +6 -1
  634. package/lib/codec/cosmos/nft/v1beta1/tx.js +60 -44
  635. package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +1 -0
  636. package/lib/codec/cosmos/orm/module/v1alpha1/module.js +14 -9
  637. package/lib/codec/cosmos/orm/query/v1alpha1/query.d.ts +18 -8
  638. package/lib/codec/cosmos/orm/query/v1alpha1/query.js +309 -281
  639. package/lib/codec/cosmos/orm/v1/orm.d.ts +4 -0
  640. package/lib/codec/cosmos/orm/v1/orm.js +122 -102
  641. package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +2 -0
  642. package/lib/codec/cosmos/orm/v1alpha1/schema.js +98 -76
  643. package/lib/codec/cosmos/params/module/v1/module.d.ts +1 -0
  644. package/lib/codec/cosmos/params/module/v1/module.js +14 -9
  645. package/lib/codec/cosmos/params/v1beta1/params.d.ts +2 -0
  646. package/lib/codec/cosmos/params/v1beta1/params.js +70 -55
  647. package/lib/codec/cosmos/params/v1beta1/query.d.ts +9 -1
  648. package/lib/codec/cosmos/params/v1beta1/query.js +120 -92
  649. package/lib/codec/cosmos/query/v1/query.js +1 -10
  650. package/lib/codec/cosmos/reflection/v1/reflection.d.ts +6 -1
  651. package/lib/codec/cosmos/reflection/v1/reflection.js +37 -27
  652. package/lib/codec/cosmos/slashing/module/v1/module.d.ts +1 -0
  653. package/lib/codec/cosmos/slashing/module/v1/module.js +22 -16
  654. package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +4 -0
  655. package/lib/codec/cosmos/slashing/v1beta1/genesis.js +133 -108
  656. package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +11 -2
  657. package/lib/codec/cosmos/slashing/v1beta1/query.js +144 -124
  658. package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +2 -0
  659. package/lib/codec/cosmos/slashing/v1beta1/slashing.js +165 -156
  660. package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +8 -1
  661. package/lib/codec/cosmos/slashing/v1beta1/tx.js +87 -68
  662. package/lib/codec/cosmos/staking/module/v1/module.d.ts +1 -0
  663. package/lib/codec/cosmos/staking/module/v1/module.js +44 -44
  664. package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +2 -0
  665. package/lib/codec/cosmos/staking/v1beta1/authz.js +72 -70
  666. package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +3 -1
  667. package/lib/codec/cosmos/staking/v1beta1/genesis.js +141 -103
  668. package/lib/codec/cosmos/staking/v1beta1/query.d.ts +33 -2
  669. package/lib/codec/cosmos/staking/v1beta1/query.js +799 -745
  670. package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +23 -2
  671. package/lib/codec/cosmos/staking/v1beta1/staking.js +872 -848
  672. package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +19 -2
  673. package/lib/codec/cosmos/staking/v1beta1/tx.js +465 -454
  674. package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.d.ts +2 -0
  675. package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.js +78 -58
  676. package/lib/codec/cosmos/store/snapshots/v1/snapshot.d.ts +7 -0
  677. package/lib/codec/cosmos/store/snapshots/v1/snapshot.js +268 -245
  678. package/lib/codec/cosmos/store/streaming/abci/grpc.d.ts +9 -2
  679. package/lib/codec/cosmos/store/streaming/abci/grpc.js +109 -95
  680. package/lib/codec/cosmos/store/v1beta1/commit_info.d.ts +3 -0
  681. package/lib/codec/cosmos/store/v1beta1/commit_info.js +130 -111
  682. package/lib/codec/cosmos/store/v1beta1/listening.d.ts +3 -1
  683. package/lib/codec/cosmos/store/v1beta1/listening.js +116 -100
  684. package/lib/codec/cosmos/tx/config/v1/config.d.ts +1 -0
  685. package/lib/codec/cosmos/tx/config/v1/config.js +32 -26
  686. package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +5 -0
  687. package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +190 -163
  688. package/lib/codec/cosmos/tx/v1beta1/service.d.ts +25 -4
  689. package/lib/codec/cosmos/tx/v1beta1/service.js +556 -539
  690. package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +15 -2
  691. package/lib/codec/cosmos/tx/v1beta1/tx.js +540 -512
  692. package/lib/codec/cosmos/upgrade/module/v1/module.d.ts +1 -0
  693. package/lib/codec/cosmos/upgrade/module/v1/module.js +22 -16
  694. package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +15 -2
  695. package/lib/codec/cosmos/upgrade/v1beta1/query.js +238 -193
  696. package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +8 -1
  697. package/lib/codec/cosmos/upgrade/v1beta1/tx.js +84 -66
  698. package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +4 -0
  699. package/lib/codec/cosmos/upgrade/v1beta1/upgrade.js +149 -144
  700. package/lib/codec/cosmos/vesting/module/v1/module.d.ts +1 -0
  701. package/lib/codec/cosmos/vesting/module/v1/module.js +14 -9
  702. package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +10 -1
  703. package/lib/codec/cosmos/vesting/v1beta1/tx.js +185 -167
  704. package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +6 -0
  705. package/lib/codec/cosmos/vesting/v1beta1/vesting.js +223 -193
  706. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +2 -0
  707. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.js +69 -52
  708. package/lib/codec/ethermint/evm/v1/events.d.ts +4 -0
  709. package/lib/codec/ethermint/evm/v1/events.js +132 -121
  710. package/lib/codec/ethermint/evm/v1/evm.d.ts +8 -0
  711. package/lib/codec/ethermint/evm/v1/evm.js +598 -592
  712. package/lib/codec/ethermint/evm/v1/genesis.d.ts +2 -0
  713. package/lib/codec/ethermint/evm/v1/genesis.js +66 -53
  714. package/lib/codec/ethermint/evm/v1/query.d.ts +29 -2
  715. package/lib/codec/ethermint/evm/v1/query.js +750 -700
  716. package/lib/codec/ethermint/evm/v1/tx.d.ts +13 -2
  717. package/lib/codec/ethermint/evm/v1/tx.js +471 -452
  718. package/lib/codec/ethermint/feemarket/v1/events.d.ts +2 -0
  719. package/lib/codec/ethermint/feemarket/v1/events.js +49 -38
  720. package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +1 -0
  721. package/lib/codec/ethermint/feemarket/v1/feemarket.js +90 -90
  722. package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +1 -0
  723. package/lib/codec/ethermint/feemarket/v1/genesis.js +36 -31
  724. package/lib/codec/ethermint/feemarket/v1/query.d.ts +10 -1
  725. package/lib/codec/ethermint/feemarket/v1/query.js +114 -90
  726. package/lib/codec/ethermint/feemarket/v1/tx.d.ts +6 -1
  727. package/lib/codec/ethermint/feemarket/v1/tx.js +51 -39
  728. package/lib/codec/ethermint/types/v1/account.d.ts +1 -0
  729. package/lib/codec/ethermint/types/v1/account.js +33 -28
  730. package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +1 -0
  731. package/lib/codec/ethermint/types/v1/dynamic_fee.js +23 -18
  732. package/lib/codec/ethermint/types/v1/indexer.d.ts +1 -0
  733. package/lib/codec/ethermint/types/v1/indexer.js +79 -78
  734. package/lib/codec/ethermint/types/v1/web3.d.ts +1 -0
  735. package/lib/codec/ethermint/types/v1/web3.js +67 -56
  736. package/lib/codec/google/protobuf/any.d.ts +1 -0
  737. package/lib/codec/google/protobuf/any.js +58 -41
  738. package/lib/codec/google/protobuf/descriptor.d.ts +105 -19
  739. package/lib/codec/google/protobuf/descriptor.js +1968 -1734
  740. package/lib/codec/google/protobuf/duration.d.ts +1 -0
  741. package/lib/codec/google/protobuf/duration.js +34 -28
  742. package/lib/codec/google/protobuf/empty.d.ts +1 -0
  743. package/lib/codec/google/protobuf/empty.js +14 -9
  744. package/lib/codec/google/protobuf/timestamp.d.ts +1 -0
  745. package/lib/codec/google/protobuf/timestamp.js +34 -28
  746. package/lib/codec/google/protobuf/wrappers.d.ts +36 -0
  747. package/lib/codec/google/protobuf/wrappers.js +206 -173
  748. package/lib/codec/ibc/applications/fee/v1/ack.d.ts +1 -0
  749. package/lib/codec/ibc/applications/fee/v1/ack.js +68 -59
  750. package/lib/codec/ibc/applications/fee/v1/fee.d.ts +5 -1
  751. package/lib/codec/ibc/applications/fee/v1/fee.js +124 -102
  752. package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +5 -0
  753. package/lib/codec/ibc/applications/fee/v1/genesis.js +190 -147
  754. package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +1 -0
  755. package/lib/codec/ibc/applications/fee/v1/metadata.js +30 -22
  756. package/lib/codec/ibc/applications/fee/v1/query.d.ts +25 -2
  757. package/lib/codec/ibc/applications/fee/v1/query.js +559 -507
  758. package/lib/codec/ibc/applications/fee/v1/tx.d.ts +13 -2
  759. package/lib/codec/ibc/applications/fee/v1/tx.js +230 -214
  760. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +1 -0
  761. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.js +23 -19
  762. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +8 -1
  763. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.js +92 -77
  764. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +10 -1
  765. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +191 -182
  766. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +5 -0
  767. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +207 -184
  768. package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +1 -0
  769. package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.js +31 -23
  770. package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +6 -1
  771. package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.js +43 -32
  772. package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.d.ts +6 -1
  773. package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.js +51 -39
  774. package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +1 -0
  775. package/lib/codec/ibc/applications/interchain_accounts/v1/account.js +34 -30
  776. package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.d.ts +1 -0
  777. package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.js +56 -58
  778. package/lib/codec/ibc/applications/interchain_accounts/v1/packet.d.ts +2 -0
  779. package/lib/codec/ibc/applications/interchain_accounts/v1/packet.js +85 -63
  780. package/lib/codec/ibc/applications/transfer/v1/authz.d.ts +2 -0
  781. package/lib/codec/ibc/applications/transfer/v1/authz.js +72 -57
  782. package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +2 -1
  783. package/lib/codec/ibc/applications/transfer/v1/genesis.js +46 -37
  784. package/lib/codec/ibc/applications/transfer/v1/query.d.ts +17 -2
  785. package/lib/codec/ibc/applications/transfer/v1/query.js +273 -236
  786. package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +2 -0
  787. package/lib/codec/ibc/applications/transfer/v1/transfer.js +59 -48
  788. package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +8 -1
  789. package/lib/codec/ibc/applications/transfer/v1/tx.js +154 -142
  790. package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +1 -0
  791. package/lib/codec/ibc/applications/transfer/v2/packet.js +48 -46
  792. package/lib/codec/ibc/core/channel/v1/channel.d.ts +11 -2
  793. package/lib/codec/ibc/core/channel/v1/channel.js +450 -430
  794. package/lib/codec/ibc/core/channel/v1/genesis.d.ts +3 -1
  795. package/lib/codec/ibc/core/channel/v1/genesis.js +133 -98
  796. package/lib/codec/ibc/core/channel/v1/query.d.ts +40 -3
  797. package/lib/codec/ibc/core/channel/v1/query.js +1239 -1193
  798. package/lib/codec/ibc/core/channel/v1/tx.d.ts +44 -3
  799. package/lib/codec/ibc/core/channel/v1/tx.js +1587 -1532
  800. package/lib/codec/ibc/core/channel/v1/upgrade.d.ts +4 -1
  801. package/lib/codec/ibc/core/channel/v1/upgrade.js +108 -104
  802. package/lib/codec/ibc/core/client/v1/client.d.ts +8 -1
  803. package/lib/codec/ibc/core/client/v1/client.js +236 -226
  804. package/lib/codec/ibc/core/client/v1/genesis.d.ts +4 -1
  805. package/lib/codec/ibc/core/client/v1/genesis.js +155 -119
  806. package/lib/codec/ibc/core/client/v1/query.d.ts +24 -3
  807. package/lib/codec/ibc/core/client/v1/query.js +524 -467
  808. package/lib/codec/ibc/core/client/v1/tx.d.ts +19 -2
  809. package/lib/codec/ibc/core/client/v1/tx.js +427 -377
  810. package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +4 -0
  811. package/lib/codec/ibc/core/commitment/v1/commitment.js +107 -82
  812. package/lib/codec/ibc/core/connection/v1/connection.d.ts +7 -0
  813. package/lib/codec/ibc/core/connection/v1/connection.js +246 -225
  814. package/lib/codec/ibc/core/connection/v1/genesis.d.ts +2 -1
  815. package/lib/codec/ibc/core/connection/v1/genesis.js +51 -38
  816. package/lib/codec/ibc/core/connection/v1/query.d.ts +18 -3
  817. package/lib/codec/ibc/core/connection/v1/query.js +405 -379
  818. package/lib/codec/ibc/core/connection/v1/tx.d.ts +15 -2
  819. package/lib/codec/ibc/core/connection/v1/tx.js +481 -469
  820. package/lib/codec/ibc/core/types/v1/genesis.d.ts +2 -1
  821. package/lib/codec/ibc/core/types/v1/genesis.js +54 -56
  822. package/lib/codec/ibc/lightclients/localhost/v2/localhost.d.ts +1 -0
  823. package/lib/codec/ibc/lightclients/localhost/v2/localhost.js +25 -21
  824. package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.d.ts +17 -1
  825. package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.js +612 -605
  826. package/lib/codec/ibc/lightclients/solomachine/v3/solomachine.d.ts +8 -0
  827. package/lib/codec/ibc/lightclients/solomachine/v3/solomachine.js +360 -353
  828. package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +8 -3
  829. package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.js +312 -313
  830. package/lib/codec/ibc/lightclients/wasm/v1/genesis.d.ts +2 -0
  831. package/lib/codec/ibc/lightclients/wasm/v1/genesis.js +71 -50
  832. package/lib/codec/ibc/lightclients/wasm/v1/query.d.ts +8 -1
  833. package/lib/codec/ibc/lightclients/wasm/v1/query.js +127 -104
  834. package/lib/codec/ibc/lightclients/wasm/v1/tx.d.ts +10 -1
  835. package/lib/codec/ibc/lightclients/wasm/v1/tx.js +180 -145
  836. package/lib/codec/ibc/lightclients/wasm/v1/wasm.d.ts +4 -0
  837. package/lib/codec/ibc/lightclients/wasm/v1/wasm.js +124 -103
  838. package/lib/codec/index.d.ts +5 -19
  839. package/lib/codec/index.js +429 -163
  840. package/lib/codec/oraclesvc/query.d.ts +4 -1
  841. package/lib/codec/oraclesvc/query.js +5 -9
  842. package/lib/codec/tendermint/abci/types.d.ts +53 -3
  843. package/lib/codec/tendermint/abci/types.js +2265 -2151
  844. package/lib/codec/tendermint/crypto/keys.d.ts +3 -2
  845. package/lib/codec/tendermint/crypto/keys.js +60 -48
  846. package/lib/codec/tendermint/crypto/proof.d.ts +5 -0
  847. package/lib/codec/tendermint/crypto/proof.js +186 -162
  848. package/lib/codec/tendermint/libs/bits/types.d.ts +1 -0
  849. package/lib/codec/tendermint/libs/bits/types.js +33 -29
  850. package/lib/codec/tendermint/oracle/types.d.ts +6 -0
  851. package/lib/codec/tendermint/oracle/types.js +323 -286
  852. package/lib/codec/tendermint/p2p/types.d.ts +4 -0
  853. package/lib/codec/tendermint/p2p/types.js +207 -191
  854. package/lib/codec/tendermint/types/block.d.ts +2 -1
  855. package/lib/codec/tendermint/types/block.js +53 -56
  856. package/lib/codec/tendermint/types/evidence.d.ts +5 -1
  857. package/lib/codec/tendermint/types/evidence.js +178 -166
  858. package/lib/codec/tendermint/types/params.d.ts +7 -0
  859. package/lib/codec/tendermint/types/params.js +233 -232
  860. package/lib/codec/tendermint/types/types.d.ts +15 -0
  861. package/lib/codec/tendermint/types/types.js +803 -796
  862. package/lib/codec/tendermint/types/validator.d.ts +3 -0
  863. package/lib/codec/tendermint/types/validator.js +151 -141
  864. package/lib/codec/tendermint/version/types.d.ts +2 -0
  865. package/lib/codec/tendermint/version/types.js +62 -58
  866. package/lib/constant/network.js +80 -20
  867. package/lib/modules/admin.js +478 -555
  868. package/lib/modules/alliance.js +56 -79
  869. package/lib/modules/bank.js +10 -21
  870. package/lib/modules/base.js +3 -14
  871. package/lib/modules/bridge.js +62 -78
  872. package/lib/modules/broker.js +18 -31
  873. package/lib/modules/cdp.js +749 -851
  874. package/lib/modules/coin.js +80 -111
  875. package/lib/modules/cosmwasm.js +44 -63
  876. package/lib/modules/erc20.js +43 -62
  877. package/lib/modules/evm.js +25 -37
  878. package/lib/modules/evmmerge.js +10 -21
  879. package/lib/modules/fee.js +5 -16
  880. package/lib/modules/gov.js +35 -50
  881. package/lib/modules/grant.js +28 -45
  882. package/lib/modules/ibc.js +193 -185
  883. package/lib/modules/leverage.js +22 -37
  884. package/lib/modules/liquiditypool.js +128 -159
  885. package/lib/modules/market.js +89 -119
  886. package/lib/modules/order.js +86 -115
  887. package/lib/modules/otc.js +30 -45
  888. package/lib/modules/perpspool.js +141 -163
  889. package/lib/modules/position.js +22 -37
  890. package/lib/modules/profile.js +10 -21
  891. package/lib/modules/staking.js +59 -85
  892. package/lib/modules/subaccount.js +33 -48
  893. package/lib/modules/xchain.js +22 -35
  894. package/lib/provider/amino/AminoTypesMap.js +27 -1
  895. package/lib/provider/amino/types/gov.js +71 -29
  896. package/lib/provider/amino/types/grant.js +37 -13
  897. package/lib/provider/amino/types/ibc.js +2 -3
  898. package/lib/provider/amino/types/order.js +9 -2
  899. package/lib/provider/amino/utils.js +21 -23
  900. package/lib/provider/keplr/KeplrAccount.js +122 -134
  901. package/lib/provider/leap/LeapAccount.js +90 -106
  902. package/lib/provider/ledger/ledger.js +166 -207
  903. package/lib/provider/metamask/MetaMask.js +288 -346
  904. package/lib/provider/rainbowKit/RainbowKitAccount.js +128 -162
  905. package/lib/util/address.js +3 -4
  906. package/lib/util/alliance.js +2 -2
  907. package/lib/util/api.js +23 -36
  908. package/lib/util/blockchain.js +1 -2
  909. package/lib/util/bytes.d.ts +2 -0
  910. package/lib/util/bytes.js +10 -0
  911. package/lib/util/eip712.js +5 -5
  912. package/lib/util/ethermint.js +90 -77
  913. package/lib/util/fetch.js +1 -1
  914. package/lib/util/generic.js +34 -42
  915. package/lib/util/grant.js +12 -3
  916. package/lib/util/ibc.js +10 -12
  917. package/lib/util/index.d.ts +1 -0
  918. package/lib/util/index.js +2 -1
  919. package/lib/util/ledger.js +19 -34
  920. package/lib/util/legacyEIP712.js +5 -2
  921. package/lib/util/network.js +1 -2
  922. package/lib/util/provider.js +7 -18
  923. package/lib/util/tx.d.ts +4 -18
  924. package/lib/util/tx.js +10 -10
  925. package/lib/util/type.js +1 -1
  926. package/lib/wallet/CarbonSigner.js +74 -113
  927. package/lib/wallet/CarbonSigningClient.js +107 -116
  928. package/lib/wallet/CarbonWallet.js +497 -501
  929. package/lib/websocket/connector.js +27 -53
  930. package/package.json +3 -3
  931. package/lib/clients/N3Client.d.ts +0 -73
  932. package/lib/clients/N3Client.js +0 -285
  933. package/lib/clients/NEOClient.d.ts +0 -57
  934. package/lib/clients/NEOClient.js +0 -337
  935. package/lib/clients/ZILClient.d.ts +0 -106
  936. package/lib/clients/ZILClient.js +0 -437
  937. package/lib/provider/account/NeoLedgerAccount/N3Ledger/BIP44.d.ts +0 -5
  938. package/lib/provider/account/NeoLedgerAccount/N3Ledger/BIP44.js +0 -26
  939. package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.d.ts +0 -40
  940. package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +0 -62
  941. package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.d.ts +0 -3
  942. package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.js +0 -21
  943. package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.d.ts +0 -42
  944. package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +0 -181
  945. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.d.ts +0 -24
  946. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +0 -150
  947. package/lib/provider/account/NeoLedgerAccount/NeonLedger.d.ts +0 -59
  948. package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +0 -180
  949. package/lib/provider/account/NeoLedgerAccount/index.d.ts +0 -1
  950. package/lib/provider/account/NeoLedgerAccount/index.js +0 -17
  951. package/lib/provider/account/index.d.ts +0 -1
  952. package/lib/provider/account/index.js +0 -17
  953. package/lib/provider/o3/O3Types.d.ts +0 -84
  954. package/lib/provider/o3/O3Types.js +0 -41
  955. package/lib/provider/o3/O3Wallet.d.ts +0 -29
  956. package/lib/provider/o3/O3Wallet.js +0 -242
  957. package/lib/provider/o3/index.d.ts +0 -2
  958. package/lib/provider/o3/index.js +0 -32
  959. package/lib/provider/zilpay/Zilpay.d.ts +0 -33
  960. package/lib/provider/zilpay/Zilpay.js +0 -82
  961. package/lib/provider/zilpay/index.d.ts +0 -1
  962. package/lib/provider/zilpay/index.js +0 -17
package/lib/CarbonSDK.js CHANGED
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
35
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
27
  };
@@ -69,23 +60,22 @@ const DEFAULT_SDK_INIT_OPTS = {
69
60
  */
70
61
  class CarbonSDK {
71
62
  constructor(opts) {
72
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
73
63
  this.initialized = false;
74
- this.network = (_a = opts.network) !== null && _a !== void 0 ? _a : constant_1.DEFAULT_NETWORK;
75
- this.configOverride = (_b = opts.config) !== null && _b !== void 0 ? _b : {};
64
+ this.network = opts.network ?? constant_1.DEFAULT_NETWORK;
65
+ this.configOverride = opts.config ?? {};
76
66
  this.networkConfig = util_1.GenericUtils.overrideConfig(constant_1.NetworkConfigs[this.network], this.configOverride);
77
- this.useTmAbciQuery = (_c = opts.useTmAbciQuery) !== null && _c !== void 0 ? _c : false;
67
+ this.useTmAbciQuery = opts.useTmAbciQuery ?? false;
78
68
  this.gasFee = opts.gasFee;
79
69
  this.tmClient = opts.tmClient;
80
70
  this.wallet = opts.wallet;
81
- this.chainId = (_e = (_d = opts.chainId) !== null && _d !== void 0 ? _d : constant_1.CarbonChainIDs[this.network]) !== null && _e !== void 0 ? _e : constant_1.CarbonChainIDs[constant_1.Network.MainNet];
82
- this.evmChainId = (_g = (_f = opts.evmChainId) !== null && _f !== void 0 ? _f : constant_1.CarbonEvmChainIDs[this.network]) !== null && _g !== void 0 ? _g : constant_1.CarbonEvmChainIDs[constant_1.Network.MainNet];
71
+ this.chainId = opts.chainId ?? constant_1.CarbonChainIDs[this.network] ?? constant_1.CarbonChainIDs[constant_1.Network.MainNet];
72
+ this.evmChainId = opts.evmChainId ?? constant_1.CarbonEvmChainIDs[this.network] ?? constant_1.CarbonEvmChainIDs[constant_1.Network.MainNet];
83
73
  let carbonQueryClient;
84
74
  if (!opts.query) {
85
75
  let grpcClient;
86
76
  if (opts.useTmAbciQuery !== true && this.networkConfig.grpcUrl) {
87
77
  const transport = typeof window === "undefined" ? (0, grpc_web_node_http_transport_1.NodeHttpTransport)() : undefined;
88
- grpcClient = (_h = opts.grpcQueryClient) !== null && _h !== void 0 ? _h : new GrpcQueryClient_1.default(this.networkConfig.restUrl, {
78
+ grpcClient = opts.grpcQueryClient ?? new GrpcQueryClient_1.default(this.networkConfig.restUrl, {
89
79
  transport,
90
80
  });
91
81
  }
@@ -94,10 +84,10 @@ class CarbonSDK {
94
84
  grpcClient,
95
85
  });
96
86
  }
97
- this.query = ((_j = opts.query) !== null && _j !== void 0 ? _j : carbonQueryClient);
98
- this.insights = (_k = opts.insights) !== null && _k !== void 0 ? _k : new clients_1.InsightsQueryClient(this.networkConfig);
99
- this.token = (_l = opts.token) !== null && _l !== void 0 ? _l : clients_1.TokenClient.instance(this.query, this);
100
- this.hydrogen = (_m = opts.hydrogen) !== null && _m !== void 0 ? _m : new clients_1.HydrogenClient(this.networkConfig, this.token);
87
+ this.query = (opts.query ?? carbonQueryClient);
88
+ this.insights = opts.insights ?? new clients_1.InsightsQueryClient(this.networkConfig);
89
+ this.token = opts.token ?? clients_1.TokenClient.instance(this.query, this);
90
+ this.hydrogen = opts.hydrogen ?? new clients_1.HydrogenClient(this.networkConfig, this.token);
101
91
  this.admin = new modules_1.AdminModule(this);
102
92
  this.alliance = new modules_1.AllianceModule(this);
103
93
  this.order = new modules_1.OrderModule(this);
@@ -125,131 +115,104 @@ class CarbonSDK {
125
115
  this.bridge = new modules_1.BridgeModule(this);
126
116
  this.otc = new modules_1.OTCModule(this);
127
117
  }
128
- static instance(opts = DEFAULT_SDK_INIT_OPTS) {
129
- var _a, _b, _c, _d;
130
- return __awaiter(this, void 0, void 0, function* () {
131
- const network = (_a = opts.network) !== null && _a !== void 0 ? _a : constant_1.DEFAULT_NETWORK;
132
- const configOverride = (_b = opts.config) !== null && _b !== void 0 ? _b : {};
133
- const defaultTimeoutBlocks = opts.defaultTimeoutBlocks;
134
- const networkConfig = util_1.GenericUtils.overrideConfig(constant_1.NetworkConfigs[network], configOverride);
135
- const tmClient = (_c = opts.tmClient) !== null && _c !== void 0 ? _c : new tendermint_rpc_1.Tendermint37Client(new clients.BatchQueryClient(networkConfig.tmRpcUrl)); // fallback tmClient
136
- let chainId = networkConfig.chainId; // fallback chain ID
137
- let normalInit = true;
138
- try {
139
- chainId = (_d = (yield tmClient.status())) === null || _d === void 0 ? void 0 : _d.nodeInfo.network;
140
- }
141
- catch (error) {
142
- console.warn("tm client init failed");
143
- console.error(error);
144
- normalInit = false;
145
- }
146
- const sdk = new CarbonSDK({ network, config: configOverride, tmClient, defaultTimeoutBlocks, chainId, useTmAbciQuery: opts.useTmAbciQuery });
147
- if (!normalInit)
148
- return sdk;
149
- if (opts.wallet) {
150
- yield sdk.connect(opts.wallet);
151
- }
152
- if (opts.skipInit !== true) {
153
- yield sdk.initialize();
154
- }
118
+ static async instance(opts = DEFAULT_SDK_INIT_OPTS) {
119
+ const network = opts.network ?? constant_1.DEFAULT_NETWORK;
120
+ const configOverride = opts.config ?? {};
121
+ const defaultTimeoutBlocks = opts.defaultTimeoutBlocks;
122
+ const networkConfig = util_1.GenericUtils.overrideConfig(constant_1.NetworkConfigs[network], configOverride);
123
+ const tmClient = opts.tmClient ?? new tendermint_rpc_1.Tendermint37Client(new clients.BatchQueryClient(networkConfig.tmRpcUrl)); // fallback tmClient
124
+ let chainId = networkConfig.chainId; // fallback chain ID
125
+ let normalInit = true;
126
+ try {
127
+ chainId = (await tmClient.status())?.nodeInfo.network;
128
+ }
129
+ catch (error) {
130
+ console.warn("tm client init failed");
131
+ console.error(error);
132
+ normalInit = false;
133
+ }
134
+ const sdk = new CarbonSDK({ network, config: configOverride, tmClient, defaultTimeoutBlocks, chainId, useTmAbciQuery: opts.useTmAbciQuery });
135
+ if (!normalInit)
155
136
  return sdk;
137
+ if (opts.wallet) {
138
+ await sdk.connect(opts.wallet);
139
+ }
140
+ if (opts.skipInit !== true) {
141
+ await sdk.initialize();
142
+ }
143
+ return sdk;
144
+ }
145
+ static async instanceWithWallet(wallet, sdkOpts = DEFAULT_SDK_INIT_OPTS) {
146
+ const sdk = await CarbonSDK.instance(sdkOpts);
147
+ return sdk.connect(wallet);
148
+ }
149
+ static async instanceWithPrivateKey(privateKey, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
150
+ const sdk = await CarbonSDK.instance(sdkOpts);
151
+ return sdk.connectWithPrivateKey(privateKey, walletOpts);
152
+ }
153
+ static async instanceWithMnemonic(mnemonic, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
154
+ const sdk = await CarbonSDK.instance(sdkOpts);
155
+ return sdk.connectWithMnemonic(mnemonic, walletOpts);
156
+ }
157
+ static async instanceWithSigner(signer, publicKeyBase64, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
158
+ const sdk = await CarbonSDK.instance(sdkOpts);
159
+ return sdk.connectWithSigner(signer, publicKeyBase64, walletOpts);
160
+ }
161
+ static async instanceWithLedger(ledger, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
162
+ const sdk = await CarbonSDK.instance(sdkOpts);
163
+ return sdk.connectWithLedger(ledger, walletOpts);
164
+ }
165
+ static async instanceWithKeplr(keplr, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
166
+ const sdk = await CarbonSDK.instance(sdkOpts);
167
+ return sdk.connectWithKeplr(keplr, walletOpts);
168
+ }
169
+ static async instanceWithLeap(leap, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
170
+ const sdk = await CarbonSDK.instance(sdkOpts);
171
+ return sdk.connectWithLeap(leap, walletOpts);
172
+ }
173
+ static async instanceWithMetamask(metamask, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
174
+ const sdk = await CarbonSDK.instance(sdkOpts);
175
+ return sdk.connectWithMetamask(metamask, walletOpts);
176
+ }
177
+ static async instanceWithRainbowKit(rainbowKit, sdkOpts = DEFAULT_SDK_INIT_OPTS, rainbowKitWalletOpts, walletOpts) {
178
+ const sdk = await CarbonSDK.instance(sdkOpts);
179
+ return sdk.connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, walletOpts);
180
+ }
181
+ static async instanceViewOnly(bech32Address, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
182
+ const sdk = await CarbonSDK.instance(sdkOpts);
183
+ return sdk.connectViewOnly(bech32Address, walletOpts);
184
+ }
185
+ async initialize() {
186
+ const fees = await this.getGasFee();
187
+ const chainId = await this.query.chain.getChainId();
188
+ this.chainId = chainId;
189
+ this.gasFee = fees;
190
+ await this.token.initialize();
191
+ if (this.wallet) {
192
+ await this.wallet.initialize(this.query, fees);
193
+ }
194
+ this.initialized = true;
195
+ return this;
196
+ }
197
+ async getGasFee() {
198
+ if (this.gasFee)
199
+ return this.gasFee;
200
+ const queryClient = this.query;
201
+ const { msgGasCosts } = await queryClient.fee.MsgGasCostAll({
202
+ pagination: constant_1.PAGINATE_10K,
156
203
  });
157
- }
158
- static instanceWithWallet(wallet, sdkOpts = DEFAULT_SDK_INIT_OPTS) {
159
- return __awaiter(this, void 0, void 0, function* () {
160
- const sdk = yield CarbonSDK.instance(sdkOpts);
161
- return sdk.connect(wallet);
162
- });
163
- }
164
- static instanceWithPrivateKey(privateKey, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
165
- return __awaiter(this, void 0, void 0, function* () {
166
- const sdk = yield CarbonSDK.instance(sdkOpts);
167
- return sdk.connectWithPrivateKey(privateKey, walletOpts);
168
- });
169
- }
170
- static instanceWithMnemonic(mnemonic, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
171
- return __awaiter(this, void 0, void 0, function* () {
172
- const sdk = yield CarbonSDK.instance(sdkOpts);
173
- return sdk.connectWithMnemonic(mnemonic, walletOpts);
174
- });
175
- }
176
- static instanceWithSigner(signer, publicKeyBase64, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
177
- return __awaiter(this, void 0, void 0, function* () {
178
- const sdk = yield CarbonSDK.instance(sdkOpts);
179
- return sdk.connectWithSigner(signer, publicKeyBase64, walletOpts);
180
- });
181
- }
182
- static instanceWithLedger(ledger, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
183
- return __awaiter(this, void 0, void 0, function* () {
184
- const sdk = yield CarbonSDK.instance(sdkOpts);
185
- return sdk.connectWithLedger(ledger, walletOpts);
186
- });
187
- }
188
- static instanceWithKeplr(keplr, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
189
- return __awaiter(this, void 0, void 0, function* () {
190
- const sdk = yield CarbonSDK.instance(sdkOpts);
191
- return sdk.connectWithKeplr(keplr, walletOpts);
192
- });
193
- }
194
- static instanceWithLeap(leap, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
195
- return __awaiter(this, void 0, void 0, function* () {
196
- const sdk = yield CarbonSDK.instance(sdkOpts);
197
- return sdk.connectWithLeap(leap, walletOpts);
198
- });
199
- }
200
- static instanceWithMetamask(metamask, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
201
- return __awaiter(this, void 0, void 0, function* () {
202
- const sdk = yield CarbonSDK.instance(sdkOpts);
203
- return sdk.connectWithMetamask(metamask, walletOpts);
204
- });
205
- }
206
- static instanceWithRainbowKit(rainbowKit, sdkOpts = DEFAULT_SDK_INIT_OPTS, rainbowKitWalletOpts, walletOpts) {
207
- return __awaiter(this, void 0, void 0, function* () {
208
- const sdk = yield CarbonSDK.instance(sdkOpts);
209
- return sdk.connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, walletOpts);
210
- });
211
- }
212
- static instanceViewOnly(bech32Address, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
213
- return __awaiter(this, void 0, void 0, function* () {
214
- const sdk = yield CarbonSDK.instance(sdkOpts);
215
- return sdk.connectViewOnly(bech32Address, walletOpts);
216
- });
217
- }
218
- initialize() {
219
- return __awaiter(this, void 0, void 0, function* () {
220
- const fees = yield this.getGasFee();
221
- const chainId = yield this.query.chain.getChainId();
222
- this.chainId = chainId;
223
- this.gasFee = fees;
224
- yield this.token.initialize();
225
- if (this.wallet) {
226
- yield this.wallet.initialize(this.query, fees);
227
- }
228
- this.initialized = true;
229
- return this;
230
- });
231
- }
232
- getGasFee() {
233
- return __awaiter(this, void 0, void 0, function* () {
234
- if (this.gasFee)
235
- return this.gasFee;
236
- const queryClient = this.query;
237
- const { msgGasCosts } = yield queryClient.fee.MsgGasCostAll({
238
- pagination: constant_1.PAGINATE_10K,
239
- });
240
- const txGasCosts = msgGasCosts.reduce((result, item) => {
241
- result[item.msgType] = (0, number_1.bnOrZero)(item.gasCost);
242
- return result;
243
- }, {});
244
- const { minGasPrices } = yield queryClient.fee.MinGasPriceAll({
245
- pagination: constant_1.PAGINATE_10K,
246
- });
247
- const txGasPrices = minGasPrices.reduce((result, item) => {
248
- result[item.denom] = (0, number_1.bnOrZero)(item.gasPrice).shiftedBy(-18); // sdk.Dec shifting
249
- return result;
250
- }, {});
251
- return new GasFee_1.default(txGasCosts, txGasPrices);
204
+ const txGasCosts = msgGasCosts.reduce((result, item) => {
205
+ result[item.msgType] = (0, number_1.bnOrZero)(item.gasCost);
206
+ return result;
207
+ }, {});
208
+ const { minGasPrices } = await queryClient.fee.MinGasPriceAll({
209
+ pagination: constant_1.PAGINATE_10K,
252
210
  });
211
+ const txGasPrices = minGasPrices.reduce((result, item) => {
212
+ result[item.denom] = (0, number_1.bnOrZero)(item.gasPrice).shiftedBy(-18); // sdk.Dec shifting
213
+ return result;
214
+ }, {});
215
+ return new GasFee_1.default(txGasCosts, txGasPrices);
253
216
  }
254
217
  clone() {
255
218
  return new CarbonSDK(this.generateOpts());
@@ -270,155 +233,170 @@ class CarbonSDK {
270
233
  insights: this.insights,
271
234
  };
272
235
  }
273
- connect(wallet, opts) {
274
- return __awaiter(this, void 0, void 0, function* () {
275
- if (!wallet.initialized) {
276
- try {
277
- // Perform initialize function as per normal, but add try-catch statement to check err message
278
- const overrideConfig = {
279
- chainId: this.chainId,
280
- evmChainId: this.evmChainId,
281
- };
282
- const gasFee = yield this.getGasFee();
283
- yield wallet.initialize(this.query, gasFee, overrideConfig, opts);
284
- }
285
- catch (err) {
286
- const errorTyped = err;
287
- // In the case where account does not exist on chain, still allow wallet connection.
288
- // Else, throw an error as per normal
289
- if (!errorTyped.message.includes("Account does not exist on chain. Send some tokens there before trying to query sequence.")) {
290
- throw new Error(errorTyped.message);
291
- }
236
+ async connect(wallet, opts) {
237
+ if (!wallet.initialized) {
238
+ try {
239
+ // Perform initialize function as per normal, but add try-catch statement to check err message
240
+ const overrideConfig = {
241
+ chainId: this.chainId,
242
+ evmChainId: this.evmChainId,
243
+ };
244
+ const gasFee = await this.getGasFee();
245
+ await wallet.initialize(this.query, gasFee, overrideConfig, opts);
246
+ }
247
+ catch (err) {
248
+ const errorTyped = err;
249
+ // In the case where account does not exist on chain, still allow wallet connection.
250
+ // Else, throw an error as per normal
251
+ if (!errorTyped.message.includes("Account does not exist on chain. Send some tokens there before trying to query sequence.")) {
252
+ throw new Error(errorTyped.message);
292
253
  }
293
254
  }
294
- this.wallet = wallet;
295
- return this;
296
- });
255
+ }
256
+ this.wallet = wallet;
257
+ return this;
297
258
  }
298
259
  disconnect() {
299
- var _a;
300
- if ((_a = this.wallet) === null || _a === void 0 ? void 0 : _a.isSigner(wallet_1.CarbonSignerTypes.Ledger)) {
260
+ if (this.wallet?.isSigner(wallet_1.CarbonSignerTypes.Ledger)) {
301
261
  this.wallet.signer.ledger.disconnect();
302
262
  }
303
263
  const opts = this.generateOpts();
304
264
  delete opts.wallet;
305
265
  return new CarbonSDK(opts);
306
266
  }
307
- connectWithPrivateKey(privateKey, opts) {
308
- return __awaiter(this, void 0, void 0, function* () {
309
- const wallet = wallet_1.CarbonWallet.withPrivateKey(privateKey, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
310
- return this.connect(wallet, opts);
267
+ async connectWithPrivateKey(privateKey, opts) {
268
+ const wallet = wallet_1.CarbonWallet.withPrivateKey(privateKey, {
269
+ ...opts,
270
+ network: this.network,
271
+ config: this.configOverride,
311
272
  });
273
+ return this.connect(wallet, opts);
312
274
  }
313
- connectWithMnemonic(mnemonic, opts) {
314
- return __awaiter(this, void 0, void 0, function* () {
315
- const wallet = wallet_1.CarbonWallet.withMnemonic(mnemonic, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
316
- return this.connect(wallet, opts);
275
+ async connectWithMnemonic(mnemonic, opts) {
276
+ const wallet = wallet_1.CarbonWallet.withMnemonic(mnemonic, {
277
+ ...opts,
278
+ network: this.network,
279
+ config: this.configOverride,
317
280
  });
281
+ return this.connect(wallet, opts);
318
282
  }
319
- connectWithSigner(signer, publicKeyBase64, opts) {
320
- return __awaiter(this, void 0, void 0, function* () {
321
- const wallet = wallet_1.CarbonWallet.withSigner(signer, publicKeyBase64, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
322
- return this.connect(wallet, opts);
283
+ async connectWithSigner(signer, publicKeyBase64, opts) {
284
+ const wallet = wallet_1.CarbonWallet.withSigner(signer, publicKeyBase64, {
285
+ ...opts,
286
+ network: this.network,
287
+ config: this.configOverride,
323
288
  });
289
+ return this.connect(wallet, opts);
324
290
  }
325
- connectWithLedger(ledger, opts) {
326
- return __awaiter(this, void 0, void 0, function* () {
327
- const publicKeyBuffer = yield ledger.getPubKey();
328
- const publicKeyBase64 = publicKeyBuffer.toString("base64");
329
- const wallet = wallet_1.CarbonWallet.withLedger(ledger, publicKeyBase64, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
330
- return this.connect(wallet, opts);
291
+ async connectWithLedger(ledger, opts) {
292
+ const publicKeyBuffer = await ledger.getPubKey();
293
+ const publicKeyBase64 = publicKeyBuffer.toString("base64");
294
+ const wallet = wallet_1.CarbonWallet.withLedger(ledger, publicKeyBase64, {
295
+ ...opts,
296
+ network: this.network,
297
+ config: this.configOverride,
331
298
  });
332
- }
333
- connectWithKeplr(keplr, opts) {
334
- return __awaiter(this, void 0, void 0, function* () {
335
- const chainInfo = yield provider_1.KeplrAccount.getChainInfo(this);
336
- const chainId = chainInfo.chainId;
337
- yield keplr.experimentalSuggestChain(chainInfo);
338
- const keplrKey = yield keplr.getKey(chainId);
339
- yield keplr.enable(chainId);
340
- const wallet = wallet_1.CarbonWallet.withKeplr(keplr, chainInfo, keplrKey, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
341
- return this.connect(wallet, opts);
299
+ return this.connect(wallet, opts);
300
+ }
301
+ async connectWithKeplr(keplr, opts) {
302
+ const chainInfo = await provider_1.KeplrAccount.getChainInfo(this);
303
+ const chainId = chainInfo.chainId;
304
+ await keplr.experimentalSuggestChain(chainInfo);
305
+ const keplrKey = await keplr.getKey(chainId);
306
+ await keplr.enable(chainId);
307
+ const wallet = wallet_1.CarbonWallet.withKeplr(keplr, chainInfo, keplrKey, {
308
+ ...opts,
309
+ network: this.network,
310
+ config: this.configOverride,
342
311
  });
343
- }
344
- connectWithLeap(leap, opts) {
345
- return __awaiter(this, void 0, void 0, function* () {
346
- const chainId = this.chainId;
347
- const chainInfo = yield provider_1.LeapAccount.getChainInfo(this);
348
- yield leap.experimentalSuggestChain(chainInfo);
349
- const leapKey = yield leap.getKey(chainId);
350
- yield leap.enable(chainId);
351
- const wallet = wallet_1.CarbonWallet.withLeap(leap, chainId, leapKey, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
352
- return this.connect(wallet, opts);
312
+ return this.connect(wallet, opts);
313
+ }
314
+ async connectWithLeap(leap, opts) {
315
+ const chainId = this.chainId;
316
+ const chainInfo = await provider_1.LeapAccount.getChainInfo(this);
317
+ await leap.experimentalSuggestChain(chainInfo);
318
+ const leapKey = await leap.getKey(chainId);
319
+ await leap.enable(chainId);
320
+ const wallet = wallet_1.CarbonWallet.withLeap(leap, chainId, leapKey, {
321
+ ...opts,
322
+ network: this.network,
323
+ config: this.configOverride,
353
324
  });
325
+ return this.connect(wallet, opts);
354
326
  }
355
- connectWithMetamask(metamask, opts, evmWalletOpts) {
356
- return __awaiter(this, void 0, void 0, function* () {
357
- const evmChainId = this.evmChainId;
358
- const addressOptions = {
359
- network: this.networkConfig.network,
360
- bech32Prefix: this.networkConfig.Bech32Prefix,
361
- };
362
- const noJwtProvided = (opts === null || opts === void 0 ? void 0 : opts.enableJwtAuth) && !(opts === null || opts === void 0 ? void 0 : opts.jwt);
363
- const signMessageRequired = !(evmWalletOpts === null || evmWalletOpts === void 0 ? void 0 : evmWalletOpts.publicKeyBase64) || noJwtProvided;
364
- let pubKey = evmWalletOpts === null || evmWalletOpts === void 0 ? void 0 : evmWalletOpts.publicKeyBase64;
365
- let message;
366
- let signature;
367
- if (signMessageRequired) {
368
- const result = yield MetaMask_1.MetaMask.signAndRecoverPubKey(metamask, opts === null || opts === void 0 ? void 0 : opts.enableJwtAuth, opts === null || opts === void 0 ? void 0 : opts.authMessage);
369
- pubKey = result.publicKey;
370
- message = result.message;
371
- signature = result.signature;
372
- }
373
- const wallet = wallet_1.CarbonWallet.withMetamask(metamask, evmChainId, pubKey, addressOptions, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
374
- if (noJwtProvided) {
375
- const authRequest = {
376
- grant_type: auth_1.GrantType.SignatureEth,
377
- message: message,
378
- public_key: Buffer.from(pubKey, 'base64').toString('hex'),
379
- signature: signature,
380
- };
381
- yield wallet.reloadJwtToken(authRequest, opts === null || opts === void 0 ? void 0 : opts.authMessage);
382
- }
383
- return this.connect(wallet, opts);
327
+ async connectWithMetamask(metamask, opts, evmWalletOpts) {
328
+ const evmChainId = this.evmChainId;
329
+ const addressOptions = {
330
+ network: this.networkConfig.network,
331
+ bech32Prefix: this.networkConfig.Bech32Prefix,
332
+ };
333
+ const noJwtProvided = opts?.enableJwtAuth && !opts?.jwt;
334
+ const signMessageRequired = !evmWalletOpts?.publicKeyBase64 || noJwtProvided;
335
+ let pubKey = evmWalletOpts?.publicKeyBase64;
336
+ let message;
337
+ let signature;
338
+ if (signMessageRequired) {
339
+ const result = await MetaMask_1.MetaMask.signAndRecoverPubKey(metamask, opts?.enableJwtAuth, opts?.authMessage);
340
+ pubKey = result.publicKey;
341
+ message = result.message;
342
+ signature = result.signature;
343
+ }
344
+ const wallet = wallet_1.CarbonWallet.withMetamask(metamask, evmChainId, pubKey, addressOptions, {
345
+ ...opts,
346
+ network: this.network,
347
+ config: this.configOverride,
384
348
  });
385
- }
386
- connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, opts) {
387
- return __awaiter(this, void 0, void 0, function* () {
388
- const evmChainId = this.evmChainId;
389
- const addressOptions = {
390
- network: this.networkConfig.network,
391
- bech32Prefix: this.networkConfig.Bech32Prefix,
349
+ if (noJwtProvided) {
350
+ const authRequest = {
351
+ grant_type: auth_1.GrantType.SignatureEth,
352
+ message: message,
353
+ public_key: Buffer.from(pubKey, 'base64').toString('hex'),
354
+ signature: signature,
392
355
  };
393
- const noJwtProvided = (opts === null || opts === void 0 ? void 0 : opts.enableJwtAuth) && !(opts === null || opts === void 0 ? void 0 : opts.jwt);
394
- const signMessageRequired = !(rainbowKitWalletOpts === null || rainbowKitWalletOpts === void 0 ? void 0 : rainbowKitWalletOpts.publicKeyBase64) || noJwtProvided;
395
- let pubKey = rainbowKitWalletOpts === null || rainbowKitWalletOpts === void 0 ? void 0 : rainbowKitWalletOpts.publicKeyBase64;
396
- let message;
397
- let signature;
398
- if (signMessageRequired) {
399
- const result = yield RainbowKitAccount_1.default.signAndRecoverPubKey(rainbowKit, opts === null || opts === void 0 ? void 0 : opts.enableJwtAuth, opts === null || opts === void 0 ? void 0 : opts.authMessage);
400
- pubKey = result.publicKey;
401
- message = result.message;
402
- signature = result.signature;
403
- }
404
- const wallet = wallet_1.CarbonWallet.withRainbowKit(rainbowKit, evmChainId, pubKey, addressOptions, rainbowKitWalletOpts.walletProvider, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
405
- if (noJwtProvided) {
406
- const authRequest = {
407
- grant_type: auth_1.GrantType.SignatureEth,
408
- message: message,
409
- public_key: Buffer.from(pubKey, 'base64').toString('hex'),
410
- signature: signature,
411
- };
412
- yield wallet.reloadJwtToken(authRequest, opts === null || opts === void 0 ? void 0 : opts.authMessage);
413
- }
414
- return this.connect(wallet, opts);
356
+ await wallet.reloadJwtToken(authRequest, opts?.authMessage);
357
+ }
358
+ return this.connect(wallet, opts);
359
+ }
360
+ async connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, opts) {
361
+ const evmChainId = this.evmChainId;
362
+ const addressOptions = {
363
+ network: this.networkConfig.network,
364
+ bech32Prefix: this.networkConfig.Bech32Prefix,
365
+ };
366
+ const noJwtProvided = opts?.enableJwtAuth && !opts?.jwt;
367
+ const signMessageRequired = !rainbowKitWalletOpts?.publicKeyBase64 || noJwtProvided;
368
+ let pubKey = rainbowKitWalletOpts?.publicKeyBase64;
369
+ let message;
370
+ let signature;
371
+ if (signMessageRequired) {
372
+ const result = await RainbowKitAccount_1.default.signAndRecoverPubKey(rainbowKit, opts?.enableJwtAuth, opts?.authMessage);
373
+ pubKey = result.publicKey;
374
+ message = result.message;
375
+ signature = result.signature;
376
+ }
377
+ const wallet = wallet_1.CarbonWallet.withRainbowKit(rainbowKit, evmChainId, pubKey, addressOptions, rainbowKitWalletOpts.walletProvider, {
378
+ ...opts,
379
+ network: this.network,
380
+ config: this.configOverride,
415
381
  });
382
+ if (noJwtProvided) {
383
+ const authRequest = {
384
+ grant_type: auth_1.GrantType.SignatureEth,
385
+ message: message,
386
+ public_key: Buffer.from(pubKey, 'base64').toString('hex'),
387
+ signature: signature,
388
+ };
389
+ await wallet.reloadJwtToken(authRequest, opts?.authMessage);
390
+ }
391
+ return this.connect(wallet, opts);
416
392
  }
417
- connectViewOnly(bech32Address, opts) {
418
- return __awaiter(this, void 0, void 0, function* () {
419
- const wallet = wallet_1.CarbonWallet.withAddress(bech32Address, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
420
- return this.connect(wallet, opts);
393
+ async connectViewOnly(bech32Address, opts) {
394
+ const wallet = wallet_1.CarbonWallet.withAddress(bech32Address, {
395
+ ...opts,
396
+ network: this.network,
397
+ config: this.configOverride,
421
398
  });
399
+ return this.connect(wallet, opts);
422
400
  }
423
401
  getConfig() {
424
402
  return this.networkConfig;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  const json_rpc_1 = require("@cosmjs/json-rpc");
13
4
  const http_1 = require("@cosmjs/tendermint-rpc/build/rpcclients/http");
@@ -21,11 +12,10 @@ const defaultBatchQueryClientOptions = {
21
12
  };
22
13
  class BatchQueryClient {
23
14
  constructor(endpoint, options = {}) {
24
- var _a, _b;
25
15
  this.queue = [];
26
16
  this.options = {
27
- batchSizeLimit: (_a = options.batchSizeLimit) !== null && _a !== void 0 ? _a : defaultBatchQueryClientOptions.batchSizeLimit,
28
- dispatchInterval: (_b = options.dispatchInterval) !== null && _b !== void 0 ? _b : defaultBatchQueryClientOptions.dispatchInterval,
17
+ batchSizeLimit: options.batchSizeLimit ?? defaultBatchQueryClientOptions.batchSizeLimit,
18
+ dispatchInterval: options.dispatchInterval ?? defaultBatchQueryClientOptions.dispatchInterval,
29
19
  };
30
20
  if (typeof endpoint === "string") {
31
21
  // accept host.name:port and assume http protocol
@@ -42,15 +32,13 @@ class BatchQueryClient {
42
32
  this.timer && clearInterval(this.timer);
43
33
  this.timer = undefined;
44
34
  }
45
- execute(request) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- return new Promise((resolve, reject) => {
48
- this.queue.push({ request, resolve, reject });
49
- if (this.queue.length >= this.options.batchSizeLimit) {
50
- // this train is full, let's go
51
- this.tick();
52
- }
53
- });
35
+ async execute(request) {
36
+ return new Promise((resolve, reject) => {
37
+ this.queue.push({ request, resolve, reject });
38
+ if (this.queue.length >= this.options.batchSizeLimit) {
39
+ // this train is full, let's go
40
+ this.tick();
41
+ }
54
42
  });
55
43
  }
56
44
  validate() {