carbon-js-sdk 0.4.28 → 0.4.29-rc1

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 (463) hide show
  1. package/lib/CarbonSDK.d.ts +12 -1
  2. package/lib/CarbonSDK.js +35 -3
  3. package/lib/clients/CarbonQueryClient.d.ts +13 -0
  4. package/lib/clients/CarbonQueryClient.js +61 -48
  5. package/lib/clients/ETHClient.js +15 -15
  6. package/lib/clients/HydrogenClient.js +1 -1
  7. package/lib/clients/NEOClient.js +12 -8
  8. package/lib/clients/TokenClient.js +3 -3
  9. package/lib/clients/ZILClient.js +17 -17
  10. package/lib/codec/adl/genesis.d.ts +3 -3
  11. package/lib/codec/alliance/alliance.d.ts +5 -5
  12. package/lib/codec/alliance/delegations.d.ts +8 -8
  13. package/lib/codec/alliance/events.d.ts +6 -6
  14. package/lib/codec/alliance/genesis.d.ts +7 -7
  15. package/lib/codec/alliance/gov.d.ts +5 -5
  16. package/lib/codec/alliance/params.d.ts +4 -4
  17. package/lib/codec/alliance/query.d.ts +24 -24
  18. package/lib/codec/alliance/tx.d.ts +10 -10
  19. package/lib/codec/bank/event.d.ts +5 -5
  20. package/lib/codec/bank/genesis.d.ts +3 -3
  21. package/lib/codec/bank/query.d.ts +19 -6
  22. package/lib/codec/bank/query.js +148 -29
  23. package/lib/codec/book/book.d.ts +5 -5
  24. package/lib/codec/book/event.d.ts +3 -3
  25. package/lib/codec/book/genesis.d.ts +3 -3
  26. package/lib/codec/book/query.d.ts +8 -8
  27. package/lib/codec/broker/amm.d.ts +37 -9
  28. package/lib/codec/broker/amm.js +185 -6
  29. package/lib/codec/broker/candlestick.d.ts +3 -3
  30. package/lib/codec/broker/event.d.ts +3 -3
  31. package/lib/codec/broker/genesis.d.ts +5 -5
  32. package/lib/codec/broker/genesis.js +9 -9
  33. package/lib/codec/broker/incoming_liquidations.d.ts +3 -3
  34. package/lib/codec/broker/pagination.d.ts +3 -3
  35. package/lib/codec/broker/query.d.ts +8 -8
  36. package/lib/codec/broker/tx.d.ts +5 -5
  37. package/lib/codec/btcx/denom_cross_chain_info.d.ts +3 -3
  38. package/lib/codec/btcx/denom_info.d.ts +3 -3
  39. package/lib/codec/btcx/genesis.d.ts +3 -3
  40. package/lib/codec/btcx/query.d.ts +6 -6
  41. package/lib/codec/btcx/tx.d.ts +8 -8
  42. package/lib/codec/ccm/ccm.d.ts +3 -3
  43. package/lib/codec/ccm/genesis.d.ts +7 -7
  44. package/lib/codec/ccm/query.d.ts +4 -4
  45. package/lib/codec/ccm/tx.d.ts +8 -8
  46. package/lib/codec/cdp/asset_params.d.ts +5 -5
  47. package/lib/codec/cdp/debt_info.d.ts +3 -3
  48. package/lib/codec/cdp/e_mode_category.d.ts +3 -3
  49. package/lib/codec/cdp/event.d.ts +36 -36
  50. package/lib/codec/cdp/genesis.d.ts +10 -10
  51. package/lib/codec/cdp/params.d.ts +3 -3
  52. package/lib/codec/cdp/query.d.ts +49 -49
  53. package/lib/codec/cdp/rate_strategy_params.d.ts +3 -3
  54. package/lib/codec/cdp/reward_scheme.d.ts +6 -6
  55. package/lib/codec/cdp/stablecoin_debt_info.d.ts +3 -3
  56. package/lib/codec/cdp/stablecoin_interest_info.d.ts +3 -3
  57. package/lib/codec/cdp/tx.d.ts +85 -85
  58. package/lib/codec/coin/bridge.d.ts +3 -3
  59. package/lib/codec/coin/event.d.ts +14 -14
  60. package/lib/codec/coin/genesis.d.ts +4 -4
  61. package/lib/codec/coin/group.d.ts +5 -5
  62. package/lib/codec/coin/proposal.d.ts +3 -3
  63. package/lib/codec/coin/query.d.ts +26 -26
  64. package/lib/codec/coin/token.d.ts +9 -9
  65. package/lib/codec/coin/tx.d.ts +48 -48
  66. package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +3 -3
  67. package/lib/codec/cosmos/app/v1alpha1/config.d.ts +4 -4
  68. package/lib/codec/cosmos/app/v1alpha1/module.d.ts +5 -5
  69. package/lib/codec/cosmos/app/v1alpha1/query.d.ts +4 -4
  70. package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +5 -5
  71. package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +3 -3
  72. package/lib/codec/cosmos/auth/v1beta1/query.d.ts +20 -20
  73. package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +6 -6
  74. package/lib/codec/cosmos/authz/v1beta1/event.d.ts +4 -4
  75. package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +3 -3
  76. package/lib/codec/cosmos/authz/v1beta1/query.d.ts +8 -8
  77. package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +8 -8
  78. package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +3 -3
  79. package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +9 -9
  80. package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +4 -4
  81. package/lib/codec/cosmos/bank/v1beta1/query.d.ts +21 -21
  82. package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +6 -6
  83. package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +12 -12
  84. package/lib/codec/cosmos/base/kv/v1beta1/kv.d.ts +4 -4
  85. package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +4 -4
  86. package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +4 -4
  87. package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +6 -6
  88. package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +28 -28
  89. package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +11 -11
  90. package/lib/codec/cosmos/base/store/v1beta1/commit_info.d.ts +5 -5
  91. package/lib/codec/cosmos/base/store/v1beta1/listening.d.ts +5 -5
  92. package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +21 -21
  93. package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +4 -4
  94. package/lib/codec/cosmos/base/v1beta1/coin.d.ts +6 -6
  95. package/lib/codec/cosmos/capability/v1beta1/capability.d.ts +5 -5
  96. package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +4 -4
  97. package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +3 -3
  98. package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +4 -4
  99. package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +4 -4
  100. package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +3 -3
  101. package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +7 -7
  102. package/lib/codec/cosmos/crypto/multisig/keys.d.ts +3 -3
  103. package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +4 -4
  104. package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +4 -4
  105. package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +4 -4
  106. package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +14 -14
  107. package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +10 -10
  108. package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +22 -22
  109. package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +10 -10
  110. package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +3 -3
  111. package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +3 -3
  112. package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +6 -6
  113. package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +4 -4
  114. package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +6 -6
  115. package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +3 -3
  116. package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +8 -8
  117. package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +6 -6
  118. package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +3 -3
  119. package/lib/codec/cosmos/gov/v1/genesis.d.ts +3 -3
  120. package/lib/codec/cosmos/gov/v1/gov.d.ts +10 -10
  121. package/lib/codec/cosmos/gov/v1/query.d.ts +18 -18
  122. package/lib/codec/cosmos/gov/v1/query.js +2 -2
  123. package/lib/codec/cosmos/gov/v1/tx.d.ts +12 -12
  124. package/lib/codec/cosmos/gov/v1/tx.js +2 -2
  125. package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +3 -3
  126. package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +11 -11
  127. package/lib/codec/cosmos/gov/v1beta1/query.d.ts +18 -18
  128. package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
  129. package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +10 -10
  130. package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
  131. package/lib/codec/cosmos/group/v1/events.d.ts +11 -11
  132. package/lib/codec/cosmos/group/v1/events.js +2 -2
  133. package/lib/codec/cosmos/group/v1/genesis.d.ts +3 -3
  134. package/lib/codec/cosmos/group/v1/query.d.ts +69 -28
  135. package/lib/codec/cosmos/group/v1/query.js +124 -1
  136. package/lib/codec/cosmos/group/v1/tx.d.ts +30 -30
  137. package/lib/codec/cosmos/group/v1/tx.js +4 -4
  138. package/lib/codec/cosmos/group/v1/types.d.ts +13 -13
  139. package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +3 -3
  140. package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +4 -4
  141. package/lib/codec/cosmos/mint/v1beta1/query.d.ts +8 -8
  142. package/lib/codec/cosmos/nft/v1beta1/event.d.ts +5 -5
  143. package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +4 -4
  144. package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +4 -4
  145. package/lib/codec/cosmos/nft/v1beta1/query.d.ts +16 -16
  146. package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +4 -4
  147. package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +3 -3
  148. package/lib/codec/cosmos/orm/v1/orm.d.ts +6 -6
  149. package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +4 -4
  150. package/lib/codec/cosmos/params/v1beta1/params.d.ts +4 -4
  151. package/lib/codec/cosmos/params/v1beta1/query.d.ts +7 -7
  152. package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +6 -6
  153. package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +8 -8
  154. package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +4 -4
  155. package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +4 -4
  156. package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +4 -4
  157. package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +4 -4
  158. package/lib/codec/cosmos/staking/v1beta1/query.d.ts +30 -30
  159. package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +22 -22
  160. package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +14 -14
  161. package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +7 -7
  162. package/lib/codec/cosmos/tx/v1beta1/service.d.ts +12 -12
  163. package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +15 -15
  164. package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
  165. package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +12 -12
  166. package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +6 -6
  167. package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +6 -6
  168. package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +10 -8
  169. package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +11 -8
  170. package/lib/codec/cosmos-models.js +5 -1
  171. package/lib/codec/erc20/erc20.d.ts +3 -3
  172. package/lib/codec/erc20/events.d.ts +6 -6
  173. package/lib/codec/erc20/genesis.d.ts +4 -4
  174. package/lib/codec/erc20/query.d.ts +8 -8
  175. package/lib/codec/erc20/tx.d.ts +16 -16
  176. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +4 -4
  177. package/lib/codec/ethermint/evm/v1/events.d.ts +6 -6
  178. package/lib/codec/ethermint/evm/v1/evm.d.ts +10 -10
  179. package/lib/codec/ethermint/evm/v1/genesis.d.ts +4 -4
  180. package/lib/codec/ethermint/evm/v1/query.d.ts +26 -26
  181. package/lib/codec/ethermint/evm/v1/tx.d.ts +10 -10
  182. package/lib/codec/ethermint/feemarket/v1/events.d.ts +4 -4
  183. package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +3 -3
  184. package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +3 -3
  185. package/lib/codec/ethermint/feemarket/v1/query.d.ts +8 -8
  186. package/lib/codec/ethermint/feemarket/v1/tx.d.ts +4 -4
  187. package/lib/codec/ethermint/types/v1/account.d.ts +3 -3
  188. package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +3 -3
  189. package/lib/codec/ethermint/types/v1/indexer.d.ts +3 -3
  190. package/lib/codec/ethermint/types/v1/web3.d.ts +3 -3
  191. package/lib/codec/ethermint-models.js +5 -1
  192. package/lib/codec/evmbank/genesis.d.ts +4 -4
  193. package/lib/codec/evmbank/query.d.ts +4 -4
  194. package/lib/codec/evmmerge/event.d.ts +3 -3
  195. package/lib/codec/evmmerge/genesis.d.ts +5 -5
  196. package/lib/codec/evmmerge/offchain.d.ts +3 -3
  197. package/lib/codec/evmmerge/query.d.ts +4 -4
  198. package/lib/codec/evmmerge/tx.d.ts +4 -4
  199. package/lib/codec/fee/event.d.ts +3 -3
  200. package/lib/codec/fee/fee.d.ts +5 -5
  201. package/lib/codec/fee/genesis.d.ts +3 -3
  202. package/lib/codec/fee/proposal.d.ts +6 -6
  203. package/lib/codec/fee/query.d.ts +10 -10
  204. package/lib/codec/fee/tx.d.ts +10 -10
  205. package/lib/codec/google/protobuf/any.d.ts +3 -3
  206. package/lib/codec/google/protobuf/duration.d.ts +3 -3
  207. package/lib/codec/google/protobuf/timestamp.d.ts +3 -3
  208. package/lib/codec/google/protobuf/wrappers.d.ts +11 -11
  209. package/lib/codec/headersync/consensus_peers.d.ts +7 -7
  210. package/lib/codec/headersync/genesis.d.ts +7 -7
  211. package/lib/codec/headersync/query.d.ts +6 -6
  212. package/lib/codec/headersync/tx.d.ts +6 -6
  213. package/lib/codec/ibc/applications/fee/v1/ack.d.ts +3 -3
  214. package/lib/codec/ibc/applications/fee/v1/fee.d.ts +6 -6
  215. package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +7 -7
  216. package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +3 -3
  217. package/lib/codec/ibc/applications/fee/v1/query.d.ts +22 -22
  218. package/lib/codec/ibc/applications/fee/v1/tx.d.ts +10 -10
  219. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +3 -3
  220. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +6 -6
  221. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +6 -6
  222. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +7 -7
  223. package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +3 -3
  224. package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +4 -4
  225. package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +3 -3
  226. package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.d.ts +3 -3
  227. package/lib/codec/ibc/applications/interchain_accounts/v1/packet.d.ts +4 -4
  228. package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +3 -3
  229. package/lib/codec/ibc/applications/transfer/v1/query.d.ts +12 -12
  230. package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +4 -4
  231. package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +4 -4
  232. package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +3 -3
  233. package/lib/codec/ibc/core/channel/v1/channel.d.ts +9 -9
  234. package/lib/codec/ibc/core/channel/v1/genesis.d.ts +4 -4
  235. package/lib/codec/ibc/core/channel/v1/query.d.ts +28 -28
  236. package/lib/codec/ibc/core/channel/v1/tx.d.ts +22 -22
  237. package/lib/codec/ibc/core/client/v1/client.d.ts +9 -9
  238. package/lib/codec/ibc/core/client/v1/genesis.d.ts +5 -5
  239. package/lib/codec/ibc/core/client/v1/query.d.ts +20 -20
  240. package/lib/codec/ibc/core/client/v1/tx.d.ts +10 -10
  241. package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +6 -6
  242. package/lib/codec/ibc/core/connection/v1/connection.d.ts +9 -9
  243. package/lib/codec/ibc/core/connection/v1/genesis.d.ts +3 -3
  244. package/lib/codec/ibc/core/connection/v1/query.d.ts +14 -14
  245. package/lib/codec/ibc/core/connection/v1/tx.d.ts +10 -10
  246. package/lib/codec/ibc/core/types/v1/genesis.d.ts +3 -3
  247. package/lib/codec/ibc/lightclients/localhost/v1/localhost.d.ts +3 -3
  248. package/lib/codec/ibc/lightclients/solomachine/v1/solomachine.d.ts +18 -18
  249. package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.d.ts +18 -18
  250. package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +7 -7
  251. package/lib/codec/ibc-models.js +5 -1
  252. package/lib/codec/index.d.ts +53 -4
  253. package/lib/codec/index.js +24907 -813
  254. package/lib/codec/inflation/genesis.d.ts +3 -3
  255. package/lib/codec/inflation/inflation.d.ts +3 -3
  256. package/lib/codec/inflation/query.d.ts +4 -4
  257. package/lib/codec/insurance/event.d.ts +3 -3
  258. package/lib/codec/insurance/fund.d.ts +4 -4
  259. package/lib/codec/insurance/genesis.d.ts +3 -3
  260. package/lib/codec/insurance/query.d.ts +4 -4
  261. package/lib/codec/leverage/event.d.ts +3 -3
  262. package/lib/codec/leverage/genesis.d.ts +3 -3
  263. package/lib/codec/leverage/leverage.d.ts +4 -4
  264. package/lib/codec/leverage/query.d.ts +6 -6
  265. package/lib/codec/leverage/tx.d.ts +4 -4
  266. package/lib/codec/liquidation/genesis.d.ts +4 -4
  267. package/lib/codec/liquidation/liquidation.d.ts +3 -3
  268. package/lib/codec/liquidation/outstanding_position.d.ts +4 -4
  269. package/lib/codec/liquidation/query.d.ts +6 -6
  270. package/lib/codec/liquidation/quote_changes.d.ts +3 -3
  271. package/lib/codec/liquiditypool/event.d.ts +8 -8
  272. package/lib/codec/liquiditypool/genesis.d.ts +3 -3
  273. package/lib/codec/liquiditypool/liquiditypool.d.ts +12 -12
  274. package/lib/codec/liquiditypool/proposal.d.ts +11 -11
  275. package/lib/codec/liquiditypool/query.d.ts +35 -35
  276. package/lib/codec/liquiditypool/reward.d.ts +18 -18
  277. package/lib/codec/liquiditypool/tx.d.ts +39 -39
  278. package/lib/codec/lockproxy/event.d.ts +4 -4
  279. package/lib/codec/lockproxy/genesis.d.ts +6 -6
  280. package/lib/codec/lockproxy/lockproxy.d.ts +3 -3
  281. package/lib/codec/lockproxy/query.d.ts +6 -6
  282. package/lib/codec/lockproxy/tx.d.ts +12 -12
  283. package/lib/codec/market/event.d.ts +3 -3
  284. package/lib/codec/market/fee.d.ts +7 -7
  285. package/lib/codec/market/genesis.d.ts +6 -3
  286. package/lib/codec/market/genesis.js +33 -2
  287. package/lib/codec/market/market.d.ts +15 -7
  288. package/lib/codec/market/proposal.d.ts +5 -5
  289. package/lib/codec/market/query.d.ts +101 -8
  290. package/lib/codec/market/query.js +420 -1
  291. package/lib/codec/market/tx.d.ts +110 -13
  292. package/lib/codec/market/tx.js +553 -7
  293. package/lib/codec/marketstats/genesis.d.ts +3 -3
  294. package/lib/codec/marketstats/marketstats.d.ts +3 -3
  295. package/lib/codec/marketstats/params.d.ts +3 -3
  296. package/lib/codec/marketstats/query.d.ts +6 -6
  297. package/lib/codec/misc/block.d.ts +3 -3
  298. package/lib/codec/misc/message.d.ts +3 -3
  299. package/lib/codec/misc/message_type.d.ts +3 -3
  300. package/lib/codec/misc/query.d.ts +16 -16
  301. package/lib/codec/misc/trade.d.ts +3 -3
  302. package/lib/codec/misc/transaction.d.ts +4 -4
  303. package/lib/codec/oracle/event.d.ts +4 -4
  304. package/lib/codec/oracle/genesis.d.ts +3 -3
  305. package/lib/codec/oracle/oracle.d.ts +7 -7
  306. package/lib/codec/oracle/proposal.d.ts +3 -3
  307. package/lib/codec/oracle/query.d.ts +22 -22
  308. package/lib/codec/oracle/slashing.d.ts +4 -4
  309. package/lib/codec/oracle/tx.d.ts +14 -14
  310. package/lib/codec/order/event.d.ts +3 -3
  311. package/lib/codec/order/genesis.d.ts +6 -6
  312. package/lib/codec/order/order.d.ts +9 -9
  313. package/lib/codec/order/query.d.ts +12 -12
  314. package/lib/codec/order/tx.d.ts +12 -12
  315. package/lib/codec/perpsliquidity/event.d.ts +10 -10
  316. package/lib/codec/perpsliquidity/genesis.d.ts +4 -4
  317. package/lib/codec/perpsliquidity/params.d.ts +3 -3
  318. package/lib/codec/perpsliquidity/pool.d.ts +10 -10
  319. package/lib/codec/perpsliquidity/query.d.ts +16 -16
  320. package/lib/codec/perpsliquidity/tx.d.ts +16 -16
  321. package/lib/codec/polynetwork-models.js +5 -1
  322. package/lib/codec/position/event.d.ts +3 -3
  323. package/lib/codec/position/genesis.d.ts +3 -3
  324. package/lib/codec/position/position.d.ts +6 -6
  325. package/lib/codec/position/query.d.ts +8 -8
  326. package/lib/codec/position/tx.d.ts +4 -4
  327. package/lib/codec/pricing/event.d.ts +8 -8
  328. package/lib/codec/pricing/genesis.d.ts +3 -3
  329. package/lib/codec/pricing/legacy.d.ts +3 -3
  330. package/lib/codec/pricing/pricing.d.ts +5 -5
  331. package/lib/codec/pricing/proposal.d.ts +4 -4
  332. package/lib/codec/pricing/query.d.ts +16 -16
  333. package/lib/codec/pricing/tx.d.ts +12 -12
  334. package/lib/codec/profile/event.d.ts +3 -3
  335. package/lib/codec/profile/genesis.d.ts +3 -3
  336. package/lib/codec/profile/profile.d.ts +3 -3
  337. package/lib/codec/profile/query.d.ts +6 -6
  338. package/lib/codec/profile/tx.d.ts +4 -4
  339. package/lib/codec/proofs.d.ts +15 -15
  340. package/lib/codec/sequence/genesis.d.ts +4 -4
  341. package/lib/codec/sequence/query.d.ts +6 -6
  342. package/lib/codec/sequence/tx.d.ts +4 -4
  343. package/lib/codec/subaccount/genesis.d.ts +3 -3
  344. package/lib/codec/subaccount/query.d.ts +10 -10
  345. package/lib/codec/subaccount/subaccount.d.ts +4 -4
  346. package/lib/codec/subaccount/tx.d.ts +8 -8
  347. package/lib/codec/tendermint/abci/types.d.ts +47 -47
  348. package/lib/codec/tendermint/crypto/keys.d.ts +4 -4
  349. package/lib/codec/tendermint/crypto/proof.d.ts +7 -7
  350. package/lib/codec/tendermint/libs/bits/types.d.ts +3 -3
  351. package/lib/codec/tendermint/p2p/types.d.ts +6 -6
  352. package/lib/codec/tendermint/types/block.d.ts +3 -3
  353. package/lib/codec/tendermint/types/evidence.d.ts +6 -6
  354. package/lib/codec/tendermint/types/params.d.ts +8 -8
  355. package/lib/codec/tendermint/types/types.d.ts +16 -16
  356. package/lib/codec/tendermint/types/validator.d.ts +5 -5
  357. package/lib/codec/tendermint/version/types.d.ts +4 -4
  358. package/lib/constant/address.d.ts +1 -1
  359. package/lib/constant/generic.js +1 -1
  360. package/lib/constant/ibc.d.ts +3 -3
  361. package/lib/constant/ibc.js +5 -1
  362. package/lib/constant/index.js +5 -1
  363. package/lib/constant/network.d.ts +9 -1
  364. package/lib/constant/network.js +19 -5
  365. package/lib/constant/node.d.ts +1 -1
  366. package/lib/constant/walletProvider.d.ts +3 -1
  367. package/lib/constant/walletProvider.js +3 -0
  368. package/lib/eth/index.js +5 -1
  369. package/lib/hydrogen/index.js +5 -1
  370. package/lib/hydrogen/transfer.d.ts +2 -2
  371. package/lib/index.js +5 -1
  372. package/lib/insights/common.d.ts +1 -1
  373. package/lib/insights/index.js +5 -1
  374. package/lib/insights/position.d.ts +1 -1
  375. package/lib/modules/cdp.d.ts +1 -1
  376. package/lib/modules/cdp.js +98 -85
  377. package/lib/modules/cosmwasm.js +1 -1
  378. package/lib/modules/evm.d.ts +1 -1
  379. package/lib/modules/evm.js +5 -5
  380. package/lib/modules/gov.js +12 -12
  381. package/lib/modules/index.d.ts +4 -0
  382. package/lib/modules/index.js +9 -1
  383. package/lib/modules/liquiditypool.js +1 -1
  384. package/lib/modules/market.d.ts +34 -0
  385. package/lib/modules/market.js +73 -1
  386. package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
  387. package/lib/provider/account/EthLedgerAccount/index.js +5 -1
  388. package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
  389. package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.js +5 -1
  390. package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
  391. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.d.ts +1 -1
  392. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +8 -4
  393. package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
  394. package/lib/provider/account/NeoLedgerAccount/index.js +5 -1
  395. package/lib/provider/account/index.js +5 -1
  396. package/lib/provider/amino/AminoTypesMap.js +5 -1
  397. package/lib/provider/amino/types/admin.js +32 -28
  398. package/lib/provider/amino/types/bank.js +6 -2
  399. package/lib/provider/amino/types/broker.js +6 -2
  400. package/lib/provider/amino/types/cdp.js +30 -26
  401. package/lib/provider/amino/types/coin.js +9 -5
  402. package/lib/provider/amino/types/evm.js +7 -3
  403. package/lib/provider/amino/types/evmmerge.js +6 -2
  404. package/lib/provider/amino/types/feemarket.js +6 -2
  405. package/lib/provider/amino/types/gov.js +29 -5
  406. package/lib/provider/amino/types/ibc.js +6 -2
  407. package/lib/provider/amino/types/index.d.ts +3 -0
  408. package/lib/provider/amino/types/index.js +7 -1
  409. package/lib/provider/amino/types/leverage.js +6 -2
  410. package/lib/provider/amino/types/liquidityPool.js +15 -8
  411. package/lib/provider/amino/types/market.js +45 -3
  412. package/lib/provider/amino/types/oracle.js +12 -2
  413. package/lib/provider/amino/types/order.js +9 -5
  414. package/lib/provider/amino/types/perpsliquidity.js +11 -7
  415. package/lib/provider/amino/types/position.js +6 -2
  416. package/lib/provider/amino/types/profile.js +6 -2
  417. package/lib/provider/amino/types/staking.js +9 -5
  418. package/lib/provider/amino/types/subaccount.js +8 -4
  419. package/lib/provider/amino/utils.d.ts +2 -2
  420. package/lib/provider/amino/utils.js +11 -11
  421. package/lib/provider/keplr/KeplrAccount.d.ts +2 -0
  422. package/lib/provider/keplr/KeplrAccount.js +38 -0
  423. package/lib/provider/leap/LeapAccount.js +4 -0
  424. package/lib/provider/ledger/ledger.js +8 -5
  425. package/lib/provider/metamask/MetaMask.d.ts +28 -3
  426. package/lib/provider/metamask/MetaMask.js +327 -18
  427. package/lib/provider/metamask/legacy-accounts.d.ts +4 -0
  428. package/lib/provider/metamask/legacy-accounts.js +2171 -8
  429. package/lib/provider/o3/O3Types.d.ts +1 -1
  430. package/lib/provider/o3/O3Wallet.js +18 -11
  431. package/lib/provider/o3/index.js +5 -1
  432. package/lib/provider/zilpay/Zilpay.js +4 -4
  433. package/lib/provider/zilpay/index.js +5 -1
  434. package/lib/util/address.d.ts +9 -5
  435. package/lib/util/address.js +29 -14
  436. package/lib/util/api.d.ts +3 -3
  437. package/lib/util/api.js +4 -4
  438. package/lib/util/blockchain.d.ts +9 -10
  439. package/lib/util/blockchain.js +9 -3
  440. package/lib/util/eip712.js +3 -3
  441. package/lib/util/fetch.js +1 -1
  442. package/lib/util/generic.d.ts +2 -2
  443. package/lib/util/generic.js +3 -3
  444. package/lib/util/gov.d.ts +1 -1
  445. package/lib/util/index.js +5 -1
  446. package/lib/util/legacyEIP712.d.ts +2 -2
  447. package/lib/util/legacyEIP712.js +2 -2
  448. package/lib/util/number.d.ts +4 -4
  449. package/lib/util/number.js +5 -5
  450. package/lib/util/tx.d.ts +42 -3
  451. package/lib/util/tx.js +5 -1
  452. package/lib/util/type.d.ts +1 -1
  453. package/lib/wallet/CarbonSigner.d.ts +21 -4
  454. package/lib/wallet/CarbonSigner.js +26 -7
  455. package/lib/wallet/CarbonSigningClient.d.ts +1 -0
  456. package/lib/wallet/CarbonSigningClient.js +58 -10
  457. package/lib/wallet/CarbonWallet.d.ts +39 -3
  458. package/lib/wallet/CarbonWallet.js +205 -26
  459. package/lib/wallet/index.js +5 -1
  460. package/lib/websocket/connector.js +8 -4
  461. package/lib/websocket/index.js +5 -1
  462. package/lib/websocket/types.d.ts +1 -1
  463. package/package.json +6 -5
@@ -4,10 +4,12 @@ import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
4
4
  import { CarbonQueryClient, ETHClient, HydrogenClient, InsightsQueryClient, NEOClient, TokenClient, ZILClient } from "./clients";
5
5
  import * as clients from "./clients";
6
6
  import N3Client from "./clients/N3Client";
7
- import { AdminModule, AllianceModule, BankModule, BrokerModule, CDPModule, CoinModule, FeeModule, GovModule, IBCModule, LeverageModule, LiquidityPoolModule, MarketModule, OracleModule, OrderModule, PositionModule, ProfileModule, SubAccountModule, XChainModule } from "./modules";
7
+ import { AdminModule, AllianceModule, BankModule, BrokerModule, CDPModule, CoinModule, FeeModule, GovModule, IBCModule, LeverageModule, LiquidityPoolModule, MarketModule, OracleModule, OrderModule, PositionModule, ProfileModule, SubAccountModule, XChainModule, EvmModule, FeemarketModule, EvmMergeModule, PerpsLiquidityModule } from "./modules";
8
8
  import { StakingModule } from "./modules/staking";
9
9
  import { CosmosLedger, Keplr, LeapExtended } from "./provider";
10
10
  import { CarbonSigner, CarbonWallet, CarbonWalletGenericOpts } from "./wallet";
11
+ import { MetaMask } from "./provider/metamask/MetaMask";
12
+ import { ethers } from "ethers";
11
13
  export { CarbonTx } from "./util";
12
14
  export { CarbonSigner, CarbonSignerTypes, CarbonWallet, CarbonWalletGenericOpts, CarbonWalletInitOpts } from "./wallet";
13
15
  export { DenomPrefix } from "./constant";
@@ -15,6 +17,7 @@ export interface CarbonSDKOpts {
15
17
  network: Network;
16
18
  tmClient: Tendermint34Client;
17
19
  chainId?: string;
20
+ evmChainId?: string;
18
21
  token?: TokenClient;
19
22
  config?: Partial<NetworkConfig>;
20
23
  defaultTimeoutBlocks?: number;
@@ -41,6 +44,7 @@ declare class CarbonSDK {
41
44
  readonly query: CarbonQueryClient;
42
45
  insights: InsightsQueryClient;
43
46
  hydrogen: HydrogenClient;
47
+ evmJsonRpc: ethers.providers.JsonRpcProvider;
44
48
  wallet?: CarbonWallet;
45
49
  network: Network;
46
50
  configOverride: Partial<NetworkConfig>;
@@ -51,6 +55,7 @@ declare class CarbonSDK {
51
55
  alliance: AllianceModule;
52
56
  order: OrderModule;
53
57
  lp: LiquidityPoolModule;
58
+ plp: PerpsLiquidityModule;
54
59
  subaccount: SubAccountModule;
55
60
  profile: ProfileModule;
56
61
  cdp: CDPModule;
@@ -66,6 +71,9 @@ declare class CarbonSDK {
66
71
  fee: FeeModule;
67
72
  ibc: IBCModule;
68
73
  xchain: XChainModule;
74
+ evm: EvmModule;
75
+ evmmerge: EvmMergeModule;
76
+ feemarket: FeemarketModule;
69
77
  neo: NEOClient;
70
78
  eth: ETHClient;
71
79
  bsc: ETHClient;
@@ -75,6 +83,7 @@ declare class CarbonSDK {
75
83
  zil: ZILClient;
76
84
  n3: N3Client;
77
85
  chainId: string;
86
+ evmChainId: string;
78
87
  constructor(opts: CarbonSDKOpts);
79
88
  static instance(opts?: CarbonSDKInitOpts): Promise<CarbonSDK>;
80
89
  static instanceWithWallet(wallet: CarbonWallet, sdkOpts?: CarbonSDKInitOpts): Promise<ConnectedCarbonSDK>;
@@ -84,6 +93,7 @@ declare class CarbonSDK {
84
93
  static instanceWithLedger(ledger: CosmosLedger, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
85
94
  static instanceWithKeplr(keplr: Keplr, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
86
95
  static instanceWithLeap(leap: LeapExtended, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
96
+ static instanceWithMetamask(metamask: MetaMask, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
87
97
  static instanceViewOnly(bech32Address: string, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
88
98
  initialize(): Promise<CarbonSDK>;
89
99
  clone(): CarbonSDK;
@@ -96,6 +106,7 @@ declare class CarbonSDK {
96
106
  connectWithLedger(ledger: CosmosLedger, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
97
107
  connectWithKeplr(keplr: Keplr, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
98
108
  connectWithLeap(leap: LeapExtended, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
109
+ connectWithMetamask(metamask: MetaMask, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
99
110
  connectViewOnly(bech32Address: string, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
100
111
  getConfig(): NetworkConfig;
101
112
  getTokenClient(): TokenClient;
package/lib/CarbonSDK.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -43,6 +47,7 @@ const staking_1 = require("./modules/staking");
43
47
  const provider_1 = require("./provider");
44
48
  const blockchain_1 = require("./util/blockchain");
45
49
  const wallet_1 = require("./wallet");
50
+ const ethers_1 = require("ethers");
46
51
  var util_2 = require("./util");
47
52
  Object.defineProperty(exports, "CarbonTx", { enumerable: true, get: function () { return util_2.CarbonTx; } });
48
53
  var wallet_2 = require("./wallet");
@@ -60,20 +65,24 @@ const DEFAULT_SDK_INIT_OPTS = {
60
65
  */
61
66
  class CarbonSDK {
62
67
  constructor(opts) {
63
- var _a, _b, _c, _d, _e;
68
+ var _a, _b, _c, _d, _e, _f, _g;
64
69
  this.network = (_a = opts.network) !== null && _a !== void 0 ? _a : constant_1.DEFAULT_NETWORK;
65
70
  this.configOverride = (_b = opts.config) !== null && _b !== void 0 ? _b : {};
66
71
  this.networkConfig = util_1.GenericUtils.overrideConfig(constant_1.NetworkConfigs[this.network], this.configOverride);
67
72
  this.tmClient = opts.tmClient;
68
73
  this.chainId = (_d = (_c = opts.chainId) !== null && _c !== void 0 ? _c : constant_1.CarbonChainIDs[this.network]) !== null && _d !== void 0 ? _d : constant_1.CarbonChainIDs[constant_1.Network.MainNet];
74
+ this.evmChainId = (_f = (_e = opts.evmChainId) !== null && _e !== void 0 ? _e : constant_1.CarbonEvmChainIDs[this.network]) !== null && _f !== void 0 ? _f : constant_1.CarbonEvmChainIDs[constant_1.Network.MainNet];
69
75
  this.query = new clients_1.CarbonQueryClient(opts.tmClient);
70
76
  this.insights = new clients_1.InsightsQueryClient(this.networkConfig);
71
- this.token = (_e = opts.token) !== null && _e !== void 0 ? _e : clients_1.TokenClient.instance(this.query, this);
77
+ this.token = (_g = opts.token) !== null && _g !== void 0 ? _g : clients_1.TokenClient.instance(this.query, this);
78
+ this.hydrogen = new clients_1.HydrogenClient(this.networkConfig, this.token);
79
+ this.evmJsonRpc = new ethers_1.ethers.providers.JsonRpcProvider(constant_1.NetworkConfigs[this.network].evmJsonRpcUrl);
72
80
  this.hydrogen = clients_1.HydrogenClient.instance(this.networkConfig, this.token);
73
81
  this.admin = new modules_1.AdminModule(this);
74
82
  this.alliance = new modules_1.AllianceModule(this);
75
83
  this.order = new modules_1.OrderModule(this);
76
84
  this.lp = new modules_1.LiquidityPoolModule(this);
85
+ this.plp = new modules_1.PerpsLiquidityModule(this);
77
86
  this.subaccount = new modules_1.SubAccountModule(this);
78
87
  this.profile = new modules_1.ProfileModule(this);
79
88
  this.cdp = new modules_1.CDPModule(this);
@@ -89,6 +98,9 @@ class CarbonSDK {
89
98
  this.fee = new modules_1.FeeModule(this);
90
99
  this.ibc = new modules_1.IBCModule(this);
91
100
  this.xchain = new modules_1.XChainModule(this);
101
+ this.evm = new modules_1.EvmModule(this);
102
+ this.evmmerge = new modules_1.EvmMergeModule(this);
103
+ this.feemarket = new modules_1.FeemarketModule(this);
92
104
  this.neo = clients_1.NEOClient.instance({
93
105
  configProvider: this,
94
106
  blockchain: blockchain_1.Blockchain.Neo,
@@ -188,6 +200,12 @@ class CarbonSDK {
188
200
  return sdk.connectWithLeap(leap, walletOpts);
189
201
  });
190
202
  }
203
+ static instanceWithMetamask(metamask, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ const sdk = yield CarbonSDK.instance(sdkOpts);
206
+ return sdk.connectWithMetamask(metamask, walletOpts);
207
+ });
208
+ }
191
209
  static instanceViewOnly(bech32Address, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
192
210
  return __awaiter(this, void 0, void 0, function* () {
193
211
  const sdk = yield CarbonSDK.instance(sdkOpts);
@@ -291,6 +309,20 @@ class CarbonSDK {
291
309
  return this.connect(wallet);
292
310
  });
293
311
  }
312
+ connectWithMetamask(metamask, opts) {
313
+ return __awaiter(this, void 0, void 0, function* () {
314
+ const evmChainId = this.evmChainId;
315
+ const addressOptions = {
316
+ network: this.networkConfig.network,
317
+ bech32Prefix: this.networkConfig.Bech32Prefix
318
+ };
319
+ const address = yield metamask.defaultAccount();
320
+ const publicKeyHex = yield metamask.getPublicKey(address);
321
+ const publicKeyBase64 = Buffer.from(publicKeyHex, 'hex').toString('base64');
322
+ const wallet = wallet_1.CarbonWallet.withMetamask(metamask, evmChainId, publicKeyBase64, addressOptions, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
323
+ return this.connect(wallet);
324
+ });
325
+ }
294
326
  connectViewOnly(bech32Address, opts) {
295
327
  return __awaiter(this, void 0, void 0, function* () {
296
328
  const wallet = wallet_1.CarbonWallet.withAddress(bech32Address, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
@@ -14,6 +14,10 @@ import { QueryClientImpl as ParamsQueryClient } from "../codec/cosmos/params/v1b
14
14
  import { QueryClientImpl as SlashingQueryClient } from "../codec/cosmos/slashing/v1beta1/query";
15
15
  import { QueryClientImpl as StakingQueryClient } from "../codec/cosmos/staking/v1beta1/query";
16
16
  import { QueryClientImpl as UpgradeQueryClient } from "../codec/cosmos/upgrade/v1beta1/query";
17
+ import { QueryClientImpl as EthermintEVMQueryClient } from "../codec/ethermint/evm/v1/query";
18
+ import { QueryClientImpl as EvmMergeQueryClient } from "../codec/evmmerge/query";
19
+ import { QueryClientImpl as EvmBankQueryClient } from "../codec/evmbank/query";
20
+ import { QueryClientImpl as EthermintFeeMarketQueryClient } from "../codec/ethermint/feemarket/v1/query";
17
21
  import { QueryClientImpl as FeeQueryClient } from "../codec/fee/query";
18
22
  import { QueryClientImpl as HeadersyncQueryClient } from "../codec/headersync/query";
19
23
  import { QueryClientImpl as IBCInterchainControlQueryClient } from "../codec/ibc/applications/interchain_accounts/controller/v1/query";
@@ -27,6 +31,7 @@ import { QueryClientImpl as InsuranceQueryClient } from "../codec/insurance/quer
27
31
  import { QueryClientImpl as LeverageQueryClient } from "../codec/leverage/query";
28
32
  import { QueryClientImpl as LiquidationQueryClient } from "../codec/liquidation/query";
29
33
  import { QueryClientImpl as LiquidityPoolQueryClient } from "../codec/liquiditypool/query";
34
+ import { QueryClientImpl as PerpLiquidityPoolQueryClient } from "../codec/perpsliquidity/query";
30
35
  import { QueryClientImpl as MarketQueryClient } from "../codec/market/query";
31
36
  import { QueryClientImpl as MarketStatsQueryClient } from "../codec/marketstats/query";
32
37
  import { QueryClientImpl as MiscQueryClient } from "../codec/misc/query";
@@ -47,6 +52,10 @@ export interface IBCClientGroup {
47
52
  connection: IBCConnectionQueryClient;
48
53
  channel: IBCChannelQueryClient;
49
54
  }
55
+ export interface EthermintClientGroup {
56
+ evm: EthermintEVMQueryClient;
57
+ feeMarket: EthermintFeeMarketQueryClient;
58
+ }
50
59
  declare class CarbonQueryClient {
51
60
  private readonly tmClient;
52
61
  adl: ADLQueryClient;
@@ -60,6 +69,7 @@ declare class CarbonQueryClient {
60
69
  leverage: LeverageQueryClient;
61
70
  liquidation: LiquidationQueryClient;
62
71
  liquiditypool: LiquidityPoolQueryClient;
72
+ perpetualpool: PerpLiquidityPoolQueryClient;
63
73
  market: MarketQueryClient;
64
74
  marketstats: MarketStatsQueryClient;
65
75
  misc: MiscQueryClient;
@@ -84,6 +94,9 @@ declare class CarbonQueryClient {
84
94
  alliance: AllianceClient;
85
95
  chain: BlockchainClient;
86
96
  ibc: IBCClientGroup;
97
+ ethermint: EthermintClientGroup;
98
+ evmmerge: EvmMergeQueryClient;
99
+ evmbank: EvmBankQueryClient;
87
100
  private baseClient;
88
101
  constructor(tmClient: Tendermint34Client);
89
102
  getProtobufRpcClient(): import("@cosmjs/stargate").ProtobufRpcClient;
@@ -19,59 +19,67 @@ const query_13 = require("../codec/cosmos/params/v1beta1/query");
19
19
  const query_14 = require("../codec/cosmos/slashing/v1beta1/query");
20
20
  const query_15 = require("../codec/cosmos/staking/v1beta1/query");
21
21
  const query_16 = require("../codec/cosmos/upgrade/v1beta1/query");
22
- const query_17 = require("../codec/fee/query");
23
- const query_18 = require("../codec/headersync/query");
24
- const query_19 = require("../codec/ibc/applications/interchain_accounts/controller/v1/query");
25
- const query_20 = require("../codec/ibc/applications/interchain_accounts/host/v1/query");
26
- const query_21 = require("../codec/ibc/applications/transfer/v1/query");
27
- const query_22 = require("../codec/ibc/core/client/v1/query");
28
- const query_23 = require("../codec/ibc/core/connection/v1/query");
29
- const query_24 = require("../codec/ibc/core/channel/v1/query");
30
- const query_25 = require("../codec/inflation/query");
31
- const query_26 = require("../codec/insurance/query");
32
- const query_27 = require("../codec/leverage/query");
33
- const query_28 = require("../codec/liquidation/query");
34
- const query_29 = require("../codec/liquiditypool/query");
35
- const query_30 = require("../codec/market/query");
36
- const query_31 = require("../codec/marketstats/query");
37
- const query_32 = require("../codec/misc/query");
38
- const query_33 = require("../codec/oracle/query");
39
- const query_34 = require("../codec/order/query");
40
- const query_35 = require("../codec/position/query");
41
- const query_36 = require("../codec/pricing/query");
42
- const query_37 = require("../codec/profile/query");
43
- const query_38 = require("../codec/subaccount/query");
44
- const query_39 = require("../codec/alliance/query");
22
+ const query_17 = require("../codec/ethermint/evm/v1/query");
23
+ const query_18 = require("../codec/evmmerge/query");
24
+ const query_19 = require("../codec/evmbank/query");
25
+ const query_20 = require("../codec/ethermint/feemarket/v1/query");
26
+ const query_21 = require("../codec/fee/query");
27
+ const query_22 = require("../codec/headersync/query");
28
+ const query_23 = require("../codec/ibc/applications/interchain_accounts/controller/v1/query");
29
+ const query_24 = require("../codec/ibc/applications/interchain_accounts/host/v1/query");
30
+ const query_25 = require("../codec/ibc/applications/transfer/v1/query");
31
+ const query_26 = require("../codec/ibc/core/client/v1/query");
32
+ const query_27 = require("../codec/ibc/core/connection/v1/query");
33
+ const query_28 = require("../codec/ibc/core/channel/v1/query");
34
+ const query_29 = require("../codec/inflation/query");
35
+ const query_30 = require("../codec/insurance/query");
36
+ const query_31 = require("../codec/leverage/query");
37
+ const query_32 = require("../codec/liquidation/query");
38
+ const query_33 = require("../codec/liquiditypool/query");
39
+ const query_34 = require("../codec/perpsliquidity/query");
40
+ const query_35 = require("../codec/market/query");
41
+ const query_36 = require("../codec/marketstats/query");
42
+ const query_37 = require("../codec/misc/query");
43
+ const query_38 = require("../codec/oracle/query");
44
+ const query_39 = require("../codec/order/query");
45
+ const query_40 = require("../codec/position/query");
46
+ const query_41 = require("../codec/pricing/query");
47
+ const query_42 = require("../codec/profile/query");
48
+ const query_43 = require("../codec/subaccount/query");
49
+ const query_44 = require("../codec/alliance/query");
45
50
  const stargate_1 = require("@cosmjs/stargate");
46
51
  const BlockchainClient_1 = __importDefault(require("./BlockchainClient"));
47
52
  class CarbonQueryClient {
48
53
  constructor(tmClient) {
49
54
  this.tmClient = tmClient;
50
55
  this.baseClient = new stargate_1.QueryClient(this.tmClient);
51
- const rpcClient = stargate_1.createProtobufRpcClient(this.baseClient);
56
+ const rpcClient = (0, stargate_1.createProtobufRpcClient)(this.baseClient);
52
57
  this.chain = BlockchainClient_1.default.connectWithTm(this.tmClient);
53
58
  this.adl = new query_1.QueryClientImpl(rpcClient);
54
- this.alliance = new query_39.QueryClientImpl(rpcClient);
59
+ this.alliance = new query_44.QueryClientImpl(rpcClient);
55
60
  this.book = new query_2.QueryClientImpl(rpcClient);
56
61
  this.broker = new query_3.QueryClientImpl(rpcClient);
57
62
  this.coin = new query_5.QueryClientImpl(rpcClient);
58
63
  this.cdp = new query_4.QueryClientImpl(rpcClient);
59
- this.fee = new query_17.QueryClientImpl(rpcClient);
60
- this.inflation = new query_25.QueryClientImpl(rpcClient);
61
- this.insurance = new query_26.QueryClientImpl(rpcClient);
62
- this.leverage = new query_27.QueryClientImpl(rpcClient);
63
- this.liquidation = new query_28.QueryClientImpl(rpcClient);
64
- this.liquiditypool = new query_29.QueryClientImpl(rpcClient);
65
- this.market = new query_30.QueryClientImpl(rpcClient);
66
- this.marketstats = new query_31.QueryClientImpl(rpcClient);
67
- this.misc = new query_32.QueryClientImpl(rpcClient);
68
- this.oracle = new query_33.QueryClientImpl(rpcClient);
69
- this.order = new query_34.QueryClientImpl(rpcClient);
70
- this.position = new query_35.QueryClientImpl(rpcClient);
71
- this.pricing = new query_36.QueryClientImpl(rpcClient);
72
- this.profile = new query_37.QueryClientImpl(rpcClient);
73
- this.subaccount = new query_38.QueryClientImpl(rpcClient);
74
- this.headersync = new query_18.QueryClientImpl(rpcClient);
64
+ this.fee = new query_21.QueryClientImpl(rpcClient);
65
+ this.inflation = new query_29.QueryClientImpl(rpcClient);
66
+ this.insurance = new query_30.QueryClientImpl(rpcClient);
67
+ this.leverage = new query_31.QueryClientImpl(rpcClient);
68
+ this.liquidation = new query_32.QueryClientImpl(rpcClient);
69
+ this.liquiditypool = new query_33.QueryClientImpl(rpcClient);
70
+ this.perpetualpool = new query_34.QueryClientImpl(rpcClient);
71
+ this.market = new query_35.QueryClientImpl(rpcClient);
72
+ this.marketstats = new query_36.QueryClientImpl(rpcClient);
73
+ this.misc = new query_37.QueryClientImpl(rpcClient);
74
+ this.oracle = new query_38.QueryClientImpl(rpcClient);
75
+ this.order = new query_39.QueryClientImpl(rpcClient);
76
+ this.position = new query_40.QueryClientImpl(rpcClient);
77
+ this.pricing = new query_41.QueryClientImpl(rpcClient);
78
+ this.profile = new query_42.QueryClientImpl(rpcClient);
79
+ this.subaccount = new query_43.QueryClientImpl(rpcClient);
80
+ this.headersync = new query_22.QueryClientImpl(rpcClient);
81
+ this.evmmerge = new query_18.QueryClientImpl(rpcClient);
82
+ this.evmbank = new query_19.QueryClientImpl(rpcClient);
75
83
  this.auth = new query_6.QueryClientImpl(rpcClient);
76
84
  this.bank = new query_7.QueryClientImpl(rpcClient);
77
85
  this.distribution = new query_9.QueryClientImpl(rpcClient);
@@ -83,17 +91,22 @@ class CarbonQueryClient {
83
91
  this.staking = new query_15.QueryClientImpl(rpcClient);
84
92
  this.upgrade = new query_16.QueryClientImpl(rpcClient);
85
93
  this.cosmosTm = new query_8.ServiceClientImpl(rpcClient);
94
+ this.alliance = new query_44.QueryClientImpl(rpcClient);
86
95
  this.ibc = {
87
- controller: new query_19.QueryClientImpl(rpcClient),
88
- host: new query_20.QueryClientImpl(rpcClient),
89
- transfer: new query_21.QueryClientImpl(rpcClient),
90
- client: new query_22.QueryClientImpl(rpcClient),
91
- connection: new query_23.QueryClientImpl(rpcClient),
92
- channel: new query_24.QueryClientImpl(rpcClient),
96
+ controller: new query_23.QueryClientImpl(rpcClient),
97
+ host: new query_24.QueryClientImpl(rpcClient),
98
+ transfer: new query_25.QueryClientImpl(rpcClient),
99
+ client: new query_26.QueryClientImpl(rpcClient),
100
+ connection: new query_27.QueryClientImpl(rpcClient),
101
+ channel: new query_28.QueryClientImpl(rpcClient),
102
+ };
103
+ this.ethermint = {
104
+ evm: new query_17.QueryClientImpl(rpcClient),
105
+ feeMarket: new query_20.QueryClientImpl(rpcClient),
93
106
  };
94
107
  }
95
108
  getProtobufRpcClient() {
96
- return stargate_1.createProtobufRpcClient(this.baseClient);
109
+ return (0, stargate_1.createProtobufRpcClient)(this.baseClient);
97
110
  }
98
111
  }
99
112
  exports.default = CarbonQueryClient;
@@ -44,15 +44,15 @@ class ETHClient {
44
44
  ?
45
45
  this.tokenClient.getBlockchainV2(token.denom) == ETHClient.BLOCKCHAINV2_MAPPING[this.blockchain]
46
46
  :
47
- blockchain_1.blockchainForChainId(token.chainId.toNumber(), api.network) == this.blockchain;
47
+ (0, blockchain_1.blockchainForChainId)(token.chainId.toNumber(), api.network) == this.blockchain;
48
48
  return isCorrectBlockchain &&
49
49
  token.tokenAddress.length == 40 &&
50
- token.bridgeAddress.toLowerCase() == generic_1.stripHexPrefix(lockProxyAddress) &&
50
+ token.bridgeAddress.toLowerCase() == (0, generic_1.stripHexPrefix)(lockProxyAddress) &&
51
51
  (!whitelistDenoms || whitelistDenoms.includes(token.denom)) &&
52
- this.verifyChecksum(generic_1.appendHexPrefix(token.tokenAddress));
52
+ this.verifyChecksum((0, generic_1.appendHexPrefix)(token.tokenAddress));
53
53
  });
54
54
  const assetIds = tokens.map((token) => {
55
- return this.verifyChecksum(generic_1.appendHexPrefix(token.tokenAddress));
55
+ return this.verifyChecksum((0, generic_1.appendHexPrefix)(token.tokenAddress));
56
56
  });
57
57
  const provider = this.getProvider();
58
58
  const contractAddress = this.getBalanceReaderAddress();
@@ -99,14 +99,14 @@ class ETHClient {
99
99
  }
100
100
  const carbonNetwork = networkConfig.network;
101
101
  const fromTokenId = fromToken.id;
102
- const fromTokenAddress = generic_1.appendHexPrefix(fromToken.tokenAddress);
102
+ const fromTokenAddress = (0, generic_1.appendHexPrefix)(fromToken.tokenAddress);
103
103
  const toTokenDenom = toToken.denom;
104
104
  const recoveryAddressHex = ethers_1.ethers.utils.hexlify(util_1.AddressUtils.SWTHAddress.getAddressBytes(recoveryAddress, carbonNetwork));
105
105
  const fromAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(fromTokenId));
106
106
  const toAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(toTokenDenom));
107
107
  const nonce = yield this.getTxNonce(fromAddress, params.nonce, rpcProvider);
108
108
  const contract = new ethers_1.ethers.Contract(this.getBridgeEntranceAddr(), eth_1.ABIs.bridgeEntrance, rpcProvider);
109
- const feeAddress = generic_1.appendHexPrefix(networkConfig.feeAddress);
109
+ const feeAddress = (0, generic_1.appendHexPrefix)(networkConfig.feeAddress);
110
110
  const tokenCreator = fromToken.creator;
111
111
  const targetAddressBytes = util_1.AddressUtils.SWTHAddress.getAddressBytes(tokenCreator, carbonNetwork);
112
112
  const targetProxyHash = ethers_1.ethers.utils.hexlify(targetAddressBytes);
@@ -135,9 +135,9 @@ class ETHClient {
135
135
  throw new Error("Minimum gas required: 150,000");
136
136
  }
137
137
  const networkConfig = this.getNetworkConfig();
138
- const assetId = generic_1.appendHexPrefix(token.tokenAddress);
139
- const targetProxyHash = generic_1.appendHexPrefix(this.getTargetProxyHash(token));
140
- const feeAddress = generic_1.appendHexPrefix(networkConfig.feeAddress);
138
+ const assetId = (0, generic_1.appendHexPrefix)(token.tokenAddress);
139
+ const targetProxyHash = (0, generic_1.appendHexPrefix)(this.getTargetProxyHash(token));
140
+ const feeAddress = (0, generic_1.appendHexPrefix)(networkConfig.feeAddress);
141
141
  const toAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(token.id));
142
142
  const swthAddress = ethers_1.ethers.utils.hexlify(address);
143
143
  const contractAddress = this.getLockProxyAddress();
@@ -188,16 +188,16 @@ class ETHClient {
188
188
  return "insufficient balance";
189
189
  }
190
190
  const networkConfig = this.getNetworkConfig();
191
- const assetId = generic_1.appendHexPrefix(tokenWithExternalBalances.tokenAddress);
192
- const targetProxyHash = generic_1.appendHexPrefix(this.getTargetProxyHash(tokenWithExternalBalances));
193
- const feeAddress = generic_1.appendHexPrefix(networkConfig.feeAddress);
191
+ const assetId = (0, generic_1.appendHexPrefix)(tokenWithExternalBalances.tokenAddress);
192
+ const targetProxyHash = (0, generic_1.appendHexPrefix)(this.getTargetProxyHash(tokenWithExternalBalances));
193
+ const feeAddress = (0, generic_1.appendHexPrefix)(networkConfig.feeAddress);
194
194
  const toAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(tokenWithExternalBalances.id));
195
195
  const nonce = Math.floor(Math.random() * 1000000000); // random nonce to prevent replay attacks
196
196
  const message = ethers_1.ethers.utils.solidityKeccak256(["string", "address", "bytes", "bytes", "bytes", "uint256", "uint256", "uint256"], ["sendTokens", assetId, targetProxyHash, toAssetHash, feeAddress, amount, feeAmount, nonce]);
197
197
  // logger("sendDeposit message", message)
198
198
  let signatureResult;
199
199
  const { address, signature } = yield getSignatureCallback(message);
200
- const signatureBytes = ethers_1.ethers.utils.arrayify(generic_1.appendHexPrefix(signature));
200
+ const signatureBytes = ethers_1.ethers.utils.arrayify((0, generic_1.appendHexPrefix)(signature));
201
201
  const rsv = ethers_1.ethers.utils.splitSignature(signatureBytes);
202
202
  // logger("sign result", address, signature)
203
203
  signatureResult = {
@@ -236,7 +236,7 @@ class ETHClient {
236
236
  if (!feeInfo.deposit_fee) {
237
237
  throw new Error("unsupported token");
238
238
  }
239
- if (blockchain_1.blockchainForChainId(token.chainId.toNumber(), this.configProvider.getConfig().network) !== this.blockchain) {
239
+ if ((0, blockchain_1.blockchainForChainId)(token.chainId.toNumber(), this.configProvider.getConfig().network) !== this.blockchain) {
240
240
  throw new Error("unsupported token");
241
241
  }
242
242
  let feeAmount = ethers_1.ethers.BigNumber.from(feeInfo.deposit_fee);
@@ -302,7 +302,7 @@ class ETHClient {
302
302
  getTargetProxyHash(token) {
303
303
  const networkConfig = this.getNetworkConfig();
304
304
  const addressBytes = address_1.SWTHAddress.getAddressBytes(token.creator, networkConfig.network);
305
- const addressHex = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(addressBytes));
305
+ const addressHex = (0, generic_1.stripHexPrefix)(ethers_1.ethers.utils.hexlify(addressBytes));
306
306
  return addressHex;
307
307
  }
308
308
  getProvider() {
@@ -29,7 +29,7 @@ exports.HydrogenEndpoints = {
29
29
  const formatDateField = (value) => {
30
30
  if (typeof value !== "string")
31
31
  return null;
32
- return dayjs_1.default(value);
32
+ return (0, dayjs_1.default)(value);
33
33
  };
34
34
  // temporary function to parse okt/okc blockchain
35
35
  // to remove when automatic deposit/withdraw feature is deployed
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -69,13 +73,13 @@ class NEOClient {
69
73
  ?
70
74
  !!sdk.token.getBlockchainV2(token.denom) && (blockchain_1.BLOCKCHAIN_V2_TO_V1_MAPPING[sdk.token.getBlockchainV2(token.denom)] == this.blockchain)
71
75
  :
72
- blockchain_1.blockchainForChainId(token.chainId.toNumber(), sdk.network) == this.blockchain;
76
+ (0, blockchain_1.blockchainForChainId)(token.chainId.toNumber(), sdk.network) == this.blockchain;
73
77
  return (isCorrectBlockchain || token.denom === "swth") && token.tokenAddress.length == 40 && token.bridgeAddress.length == 40;
74
78
  });
75
79
  const client = new Neon.rpc.RPCClient(url, "2.5.2"); // TODO: should we change the RPC version??
76
80
  // NOTE: fetching of tokens is chunked in sets of 15 as we may hit
77
81
  // the gas limit on the RPC node and error out otherwise
78
- const promises = lodash_1.chunk(tokens, 75).map((partition) => __awaiter(this, void 0, void 0, function* () {
82
+ const promises = (0, lodash_1.chunk)(tokens, 75).map((partition) => __awaiter(this, void 0, void 0, function* () {
79
83
  var _a, _b, _c;
80
84
  let acc = {};
81
85
  for (const token of partition) {
@@ -117,8 +121,8 @@ class NEOClient {
117
121
  const targetProxyHash = this.getTargetProxyHash(token);
118
122
  const toAssetHash = Neon.u.str2hexstring(token.id);
119
123
  const addressBytes = address_1.SWTHAddress.getAddressBytes(swthAddress, networkConfig.network);
120
- const toAddress = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(addressBytes));
121
- const zeroAddressHex = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(constant_1.ZeroAddress));
124
+ const toAddress = (0, generic_1.stripHexPrefix)(ethers_1.ethers.utils.hexlify(addressBytes));
125
+ const zeroAddressHex = (0, generic_1.stripHexPrefix)(ethers_1.ethers.utils.hexlify(constant_1.ZeroAddress));
122
126
  const amount = ethers_1.ethers.BigNumber.from(token.externalBalance);
123
127
  const feeAmount = ethers_1.ethers.BigNumber.from(feeAmountInput !== null && feeAmountInput !== void 0 ? feeAmountInput : "100000000");
124
128
  const feeAddress = feeAmount.isZero() ? zeroAddressHex : networkConfig.feeAddress;
@@ -165,7 +169,7 @@ class NEOClient {
165
169
  const fromAddress = util_1.AddressUtils.NEOAddress.publicKeyToAddress(publicKeyOutput.publicKey);
166
170
  const targetProxyHash = this.getTargetProxyHash(token);
167
171
  const toAssetHash = Neon.u.str2hexstring(token.id);
168
- const toAddress = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(address));
172
+ const toAddress = (0, generic_1.stripHexPrefix)(ethers_1.ethers.utils.hexlify(address));
169
173
  const nonce = Math.floor(Math.random() * 1000000);
170
174
  if (amount.lt(feeAmount)) {
171
175
  throw new Error("Invalid amount");
@@ -201,7 +205,7 @@ class NEOClient {
201
205
  const fromAddress = ledger.scriptHash;
202
206
  const targetProxyHash = this.getTargetProxyHash(token);
203
207
  const toAssetHash = Neon.u.str2hexstring(token.id);
204
- const toAddress = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(address));
208
+ const toAddress = (0, generic_1.stripHexPrefix)(ethers_1.ethers.utils.hexlify(address));
205
209
  const feeAddress = networkConfig.feeAddress;
206
210
  const nonce = Math.floor(Math.random() * 1000000);
207
211
  if (amount.lt(feeAmount)) {
@@ -321,7 +325,7 @@ class NEOClient {
321
325
  getTargetProxyHash(token) {
322
326
  const networkConfig = this.getNetworkConfig();
323
327
  const addressBytes = address_1.SWTHAddress.getAddressBytes(token.creator, networkConfig.network);
324
- const addressHex = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(addressBytes));
328
+ const addressHex = (0, generic_1.stripHexPrefix)(ethers_1.ethers.utils.hexlify(addressBytes));
325
329
  return addressHex;
326
330
  }
327
331
  getNetworkConfig() {
@@ -570,7 +570,7 @@ class TokenClient {
570
570
  if (!token)
571
571
  return undefined;
572
572
  const bridge = this.getBridgeFromToken(token);
573
- if (!bridge || !blockchain_1.isIbcBridge(bridge))
573
+ if (!bridge || !(0, blockchain_1.isIbcBridge)(bridge))
574
574
  return undefined;
575
575
  return bridge.chain_id_name;
576
576
  }
@@ -579,7 +579,7 @@ class TokenClient {
579
579
  // get swth on osmosis
580
580
  const osmoTmClient = yield tendermint_rpc_1.Tendermint34Client.connect(network_1.publicRpcNodes.Osmosis);
581
581
  const osmoClient = new stargate_1.QueryClient(osmoTmClient);
582
- const osmosRpcClient = stargate_1.createProtobufRpcClient(osmoClient);
582
+ const osmosRpcClient = (0, stargate_1.createProtobufRpcClient)(osmoClient);
583
583
  const osmoIbcClient = new query_1.QueryClientImpl(osmosRpcClient);
584
584
  const osmoDenomTraces = yield osmoIbcClient.DenomTraces({
585
585
  pagination: pagination_1.PageRequest.fromPartial({
@@ -672,7 +672,7 @@ class TokenClient {
672
672
  processTokenPrices(tokenPrices) {
673
673
  return tokenPrices.reduce((prevPrices, price) => {
674
674
  const newPrev = prevPrices;
675
- newPrev[price.denom] = number_1.bnOrZero(price.twap).shiftedBy(-constant_1.decTypeDecimals);
675
+ newPrev[price.denom] = (0, number_1.bnOrZero)(price.twap).shiftedBy(-constant_1.decTypeDecimals);
676
676
  return newPrev;
677
677
  }, {});
678
678
  }