carbon-js-sdk 0.11.72 → 0.11.74

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