carbon-js-sdk 0.7.2-beta.2 → 0.7.2

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 (462) hide show
  1. package/lib/CarbonSDK.js +6 -2
  2. package/lib/clients/BatchQueryClient.js +4 -4
  3. package/lib/clients/CarbonQueryClient.js +1 -1
  4. package/lib/clients/ETHClient.js +15 -15
  5. package/lib/clients/HydrogenClient.js +1 -1
  6. package/lib/clients/InsightsQueryClient.d.ts +7 -0
  7. package/lib/clients/InsightsQueryClient.js +17 -3
  8. package/lib/clients/NEOClient.js +12 -8
  9. package/lib/clients/TokenClient.js +2 -2
  10. package/lib/clients/ZILClient.js +17 -17
  11. package/lib/codec/adl/genesis.d.ts +3 -3
  12. package/lib/codec/admin/genesis.d.ts +3 -3
  13. package/lib/codec/admin/query.d.ts +6 -6
  14. package/lib/codec/admin/tx.d.ts +6 -6
  15. package/lib/codec/alliance/alliance.d.ts +5 -5
  16. package/lib/codec/alliance/delegations.d.ts +8 -8
  17. package/lib/codec/alliance/events.d.ts +6 -6
  18. package/lib/codec/alliance/genesis.d.ts +7 -7
  19. package/lib/codec/alliance/gov.d.ts +5 -5
  20. package/lib/codec/alliance/params.d.ts +4 -4
  21. package/lib/codec/alliance/query.d.ts +24 -24
  22. package/lib/codec/alliance/tx.d.ts +10 -10
  23. package/lib/codec/bank/event.d.ts +7 -7
  24. package/lib/codec/bank/genesis.d.ts +3 -3
  25. package/lib/codec/bank/query.d.ts +6 -6
  26. package/lib/codec/book/book.d.ts +6 -6
  27. package/lib/codec/book/event.d.ts +3 -3
  28. package/lib/codec/book/genesis.d.ts +3 -3
  29. package/lib/codec/book/legacy.d.ts +3 -3
  30. package/lib/codec/book/query.d.ts +12 -12
  31. package/lib/codec/broker/amm.d.ts +5 -5
  32. package/lib/codec/broker/candlestick.d.ts +3 -3
  33. package/lib/codec/broker/event.d.ts +4 -4
  34. package/lib/codec/broker/genesis.d.ts +3 -3
  35. package/lib/codec/broker/incoming_liquidations.d.ts +3 -3
  36. package/lib/codec/broker/pagination.d.ts +3 -3
  37. package/lib/codec/broker/query.d.ts +8 -8
  38. package/lib/codec/broker/tx.d.ts +5 -5
  39. package/lib/codec/btcx/denom_cross_chain_info.d.ts +3 -3
  40. package/lib/codec/btcx/denom_info.d.ts +3 -3
  41. package/lib/codec/btcx/genesis.d.ts +3 -3
  42. package/lib/codec/btcx/query.d.ts +6 -6
  43. package/lib/codec/btcx/tx.d.ts +8 -8
  44. package/lib/codec/carbon-models.js +5 -1
  45. package/lib/codec/ccm/ccm.d.ts +3 -3
  46. package/lib/codec/ccm/genesis.d.ts +7 -7
  47. package/lib/codec/ccm/query.d.ts +4 -4
  48. package/lib/codec/ccm/tx.d.ts +8 -8
  49. package/lib/codec/cdp/asset_params.d.ts +5 -5
  50. package/lib/codec/cdp/cdp_liquidations.d.ts +3 -3
  51. package/lib/codec/cdp/debt_info.d.ts +3 -3
  52. package/lib/codec/cdp/e_mode_category.d.ts +3 -3
  53. package/lib/codec/cdp/event.d.ts +36 -36
  54. package/lib/codec/cdp/genesis.d.ts +10 -10
  55. package/lib/codec/cdp/params.d.ts +3 -3
  56. package/lib/codec/cdp/query.d.ts +53 -53
  57. package/lib/codec/cdp/rate_strategy_params.d.ts +3 -3
  58. package/lib/codec/cdp/reward_scheme.d.ts +6 -6
  59. package/lib/codec/cdp/stablecoin_debt_info.d.ts +3 -3
  60. package/lib/codec/cdp/stablecoin_interest_info.d.ts +3 -3
  61. package/lib/codec/cdp/tx.d.ts +87 -87
  62. package/lib/codec/coin/bridge.d.ts +3 -3
  63. package/lib/codec/coin/event.d.ts +14 -14
  64. package/lib/codec/coin/genesis.d.ts +4 -4
  65. package/lib/codec/coin/group.d.ts +5 -5
  66. package/lib/codec/coin/proposal.d.ts +3 -3
  67. package/lib/codec/coin/query.d.ts +26 -26
  68. package/lib/codec/coin/token.d.ts +9 -9
  69. package/lib/codec/coin/tx.d.ts +48 -48
  70. package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +3 -3
  71. package/lib/codec/cosmos/app/v1alpha1/config.d.ts +4 -4
  72. package/lib/codec/cosmos/app/v1alpha1/module.d.ts +5 -5
  73. package/lib/codec/cosmos/app/v1alpha1/query.d.ts +4 -4
  74. package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +5 -5
  75. package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +3 -3
  76. package/lib/codec/cosmos/auth/v1beta1/query.d.ts +20 -20
  77. package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +6 -6
  78. package/lib/codec/cosmos/authz/v1beta1/event.d.ts +4 -4
  79. package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +3 -3
  80. package/lib/codec/cosmos/authz/v1beta1/query.d.ts +8 -8
  81. package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +8 -8
  82. package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +3 -3
  83. package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +9 -9
  84. package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +4 -4
  85. package/lib/codec/cosmos/bank/v1beta1/query.d.ts +21 -21
  86. package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +6 -6
  87. package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +12 -12
  88. package/lib/codec/cosmos/base/kv/v1beta1/kv.d.ts +4 -4
  89. package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +4 -4
  90. package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +4 -4
  91. package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +6 -6
  92. package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +28 -28
  93. package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +11 -11
  94. package/lib/codec/cosmos/base/store/v1beta1/commit_info.d.ts +5 -5
  95. package/lib/codec/cosmos/base/store/v1beta1/listening.d.ts +5 -5
  96. package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +21 -21
  97. package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +4 -4
  98. package/lib/codec/cosmos/base/v1beta1/coin.d.ts +6 -6
  99. package/lib/codec/cosmos/capability/v1beta1/capability.d.ts +5 -5
  100. package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +4 -4
  101. package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +3 -3
  102. package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +4 -4
  103. package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +4 -4
  104. package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +3 -3
  105. package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +7 -7
  106. package/lib/codec/cosmos/crypto/multisig/keys.d.ts +3 -3
  107. package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +4 -4
  108. package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +4 -4
  109. package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +4 -4
  110. package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +14 -14
  111. package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +10 -10
  112. package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +22 -22
  113. package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +10 -10
  114. package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +3 -3
  115. package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +3 -3
  116. package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +6 -6
  117. package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +4 -4
  118. package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +6 -6
  119. package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +3 -3
  120. package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +8 -8
  121. package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +6 -6
  122. package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +3 -3
  123. package/lib/codec/cosmos/gov/v1/genesis.d.ts +3 -3
  124. package/lib/codec/cosmos/gov/v1/gov.d.ts +10 -10
  125. package/lib/codec/cosmos/gov/v1/query.d.ts +18 -18
  126. package/lib/codec/cosmos/gov/v1/query.js +2 -2
  127. package/lib/codec/cosmos/gov/v1/tx.d.ts +12 -12
  128. package/lib/codec/cosmos/gov/v1/tx.js +2 -2
  129. package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +3 -3
  130. package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +11 -11
  131. package/lib/codec/cosmos/gov/v1beta1/query.d.ts +18 -18
  132. package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
  133. package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +10 -10
  134. package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
  135. package/lib/codec/cosmos/group/v1/events.d.ts +11 -11
  136. package/lib/codec/cosmos/group/v1/events.js +2 -2
  137. package/lib/codec/cosmos/group/v1/genesis.d.ts +3 -3
  138. package/lib/codec/cosmos/group/v1/query.d.ts +30 -30
  139. package/lib/codec/cosmos/group/v1/tx.d.ts +30 -30
  140. package/lib/codec/cosmos/group/v1/tx.js +4 -4
  141. package/lib/codec/cosmos/group/v1/types.d.ts +13 -13
  142. package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +3 -3
  143. package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +4 -4
  144. package/lib/codec/cosmos/mint/v1beta1/query.d.ts +8 -8
  145. package/lib/codec/cosmos/nft/v1beta1/event.d.ts +5 -5
  146. package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +4 -4
  147. package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +4 -4
  148. package/lib/codec/cosmos/nft/v1beta1/query.d.ts +16 -16
  149. package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +4 -4
  150. package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +3 -3
  151. package/lib/codec/cosmos/orm/v1/orm.d.ts +6 -6
  152. package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +4 -4
  153. package/lib/codec/cosmos/params/v1beta1/params.d.ts +4 -4
  154. package/lib/codec/cosmos/params/v1beta1/query.d.ts +7 -7
  155. package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +6 -6
  156. package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +8 -8
  157. package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +4 -4
  158. package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +4 -4
  159. package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +4 -4
  160. package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +4 -4
  161. package/lib/codec/cosmos/staking/v1beta1/query.d.ts +30 -30
  162. package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +22 -22
  163. package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +14 -14
  164. package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +7 -7
  165. package/lib/codec/cosmos/tx/v1beta1/service.d.ts +12 -12
  166. package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +15 -15
  167. package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
  168. package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +12 -12
  169. package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +6 -6
  170. package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +6 -6
  171. package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +8 -8
  172. package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +8 -8
  173. package/lib/codec/cosmos-models.js +5 -1
  174. package/lib/codec/erc20/erc20.d.ts +3 -3
  175. package/lib/codec/erc20/events.d.ts +6 -6
  176. package/lib/codec/erc20/genesis.d.ts +4 -4
  177. package/lib/codec/erc20/query.d.ts +8 -8
  178. package/lib/codec/erc20/tx.d.ts +16 -16
  179. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +4 -4
  180. package/lib/codec/ethermint/evm/v1/events.d.ts +6 -6
  181. package/lib/codec/ethermint/evm/v1/evm.d.ts +10 -10
  182. package/lib/codec/ethermint/evm/v1/genesis.d.ts +4 -4
  183. package/lib/codec/ethermint/evm/v1/query.d.ts +26 -26
  184. package/lib/codec/ethermint/evm/v1/tx.d.ts +10 -10
  185. package/lib/codec/ethermint/feemarket/v1/events.d.ts +4 -4
  186. package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +3 -3
  187. package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +3 -3
  188. package/lib/codec/ethermint/feemarket/v1/query.d.ts +8 -8
  189. package/lib/codec/ethermint/feemarket/v1/tx.d.ts +4 -4
  190. package/lib/codec/ethermint/types/v1/account.d.ts +3 -3
  191. package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +3 -3
  192. package/lib/codec/ethermint/types/v1/indexer.d.ts +3 -3
  193. package/lib/codec/ethermint/types/v1/web3.d.ts +3 -3
  194. package/lib/codec/ethermint-models.js +5 -1
  195. package/lib/codec/evmbank/genesis.d.ts +4 -4
  196. package/lib/codec/evmbank/query.d.ts +4 -4
  197. package/lib/codec/evmcontract/genesis.d.ts +3 -3
  198. package/lib/codec/evmmerge/address.d.ts +3 -3
  199. package/lib/codec/evmmerge/event.d.ts +3 -3
  200. package/lib/codec/evmmerge/genesis.d.ts +5 -5
  201. package/lib/codec/evmmerge/offchain.d.ts +3 -3
  202. package/lib/codec/evmmerge/query.d.ts +6 -6
  203. package/lib/codec/evmmerge/tx.d.ts +4 -4
  204. package/lib/codec/fee/event.d.ts +3 -3
  205. package/lib/codec/fee/fee.d.ts +5 -5
  206. package/lib/codec/fee/genesis.d.ts +3 -3
  207. package/lib/codec/fee/proposal.d.ts +6 -6
  208. package/lib/codec/fee/query.d.ts +10 -10
  209. package/lib/codec/fee/tx.d.ts +10 -10
  210. package/lib/codec/google/protobuf/any.d.ts +3 -3
  211. package/lib/codec/google/protobuf/duration.d.ts +3 -3
  212. package/lib/codec/google/protobuf/timestamp.d.ts +3 -3
  213. package/lib/codec/google/protobuf/wrappers.d.ts +11 -11
  214. package/lib/codec/headersync/consensus_peers.d.ts +7 -7
  215. package/lib/codec/headersync/genesis.d.ts +7 -7
  216. package/lib/codec/headersync/query.d.ts +6 -6
  217. package/lib/codec/headersync/tx.d.ts +6 -6
  218. package/lib/codec/ibc/applications/fee/v1/ack.d.ts +3 -3
  219. package/lib/codec/ibc/applications/fee/v1/fee.d.ts +6 -6
  220. package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +7 -7
  221. package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +3 -3
  222. package/lib/codec/ibc/applications/fee/v1/query.d.ts +22 -22
  223. package/lib/codec/ibc/applications/fee/v1/tx.d.ts +10 -10
  224. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +3 -3
  225. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +6 -6
  226. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +6 -6
  227. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +7 -7
  228. package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +3 -3
  229. package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +4 -4
  230. package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +3 -3
  231. package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.d.ts +3 -3
  232. package/lib/codec/ibc/applications/interchain_accounts/v1/packet.d.ts +4 -4
  233. package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +3 -3
  234. package/lib/codec/ibc/applications/transfer/v1/query.d.ts +12 -12
  235. package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +4 -4
  236. package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +4 -4
  237. package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +3 -3
  238. package/lib/codec/ibc/core/channel/v1/channel.d.ts +9 -9
  239. package/lib/codec/ibc/core/channel/v1/genesis.d.ts +4 -4
  240. package/lib/codec/ibc/core/channel/v1/query.d.ts +28 -28
  241. package/lib/codec/ibc/core/channel/v1/tx.d.ts +22 -22
  242. package/lib/codec/ibc/core/client/v1/client.d.ts +9 -9
  243. package/lib/codec/ibc/core/client/v1/genesis.d.ts +5 -5
  244. package/lib/codec/ibc/core/client/v1/query.d.ts +20 -20
  245. package/lib/codec/ibc/core/client/v1/tx.d.ts +10 -10
  246. package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +6 -6
  247. package/lib/codec/ibc/core/connection/v1/connection.d.ts +9 -9
  248. package/lib/codec/ibc/core/connection/v1/genesis.d.ts +3 -3
  249. package/lib/codec/ibc/core/connection/v1/query.d.ts +14 -14
  250. package/lib/codec/ibc/core/connection/v1/tx.d.ts +10 -10
  251. package/lib/codec/ibc/core/types/v1/genesis.d.ts +3 -3
  252. package/lib/codec/ibc/lightclients/localhost/v1/localhost.d.ts +3 -3
  253. package/lib/codec/ibc/lightclients/solomachine/v1/solomachine.d.ts +18 -18
  254. package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.d.ts +18 -18
  255. package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +7 -7
  256. package/lib/codec/ibc-models.js +5 -1
  257. package/lib/codec/index.js +5 -1
  258. package/lib/codec/inflation/genesis.d.ts +3 -3
  259. package/lib/codec/inflation/inflation.d.ts +3 -3
  260. package/lib/codec/inflation/query.d.ts +4 -4
  261. package/lib/codec/insurance/event.d.ts +3 -3
  262. package/lib/codec/insurance/fund.d.ts +4 -4
  263. package/lib/codec/insurance/genesis.d.ts +3 -3
  264. package/lib/codec/insurance/query.d.ts +4 -4
  265. package/lib/codec/insurance/tx.d.ts +4 -4
  266. package/lib/codec/leverage/event.d.ts +3 -3
  267. package/lib/codec/leverage/genesis.d.ts +3 -3
  268. package/lib/codec/leverage/leverage.d.ts +4 -4
  269. package/lib/codec/leverage/query.d.ts +6 -6
  270. package/lib/codec/leverage/tx.d.ts +4 -4
  271. package/lib/codec/liquidation/genesis.d.ts +4 -4
  272. package/lib/codec/liquidation/liquidation.d.ts +3 -3
  273. package/lib/codec/liquidation/outstanding_position.d.ts +4 -4
  274. package/lib/codec/liquidation/query.d.ts +6 -6
  275. package/lib/codec/liquidation/quote_changes.d.ts +3 -3
  276. package/lib/codec/liquiditypool/event.d.ts +15 -15
  277. package/lib/codec/liquiditypool/genesis.d.ts +3 -3
  278. package/lib/codec/liquiditypool/liquiditypool.d.ts +12 -12
  279. package/lib/codec/liquiditypool/proposal.d.ts +11 -11
  280. package/lib/codec/liquiditypool/query.d.ts +31 -31
  281. package/lib/codec/liquiditypool/reward.d.ts +18 -18
  282. package/lib/codec/liquiditypool/tx.d.ts +39 -39
  283. package/lib/codec/lockproxy/event.d.ts +4 -4
  284. package/lib/codec/lockproxy/genesis.d.ts +6 -6
  285. package/lib/codec/lockproxy/lockproxy.d.ts +3 -3
  286. package/lib/codec/lockproxy/query.d.ts +6 -6
  287. package/lib/codec/lockproxy/tx.d.ts +12 -12
  288. package/lib/codec/market/event.d.ts +3 -3
  289. package/lib/codec/market/fee.d.ts +7 -7
  290. package/lib/codec/market/genesis.d.ts +3 -3
  291. package/lib/codec/market/market.d.ts +7 -7
  292. package/lib/codec/market/proposal.d.ts +5 -5
  293. package/lib/codec/market/query.d.ts +20 -20
  294. package/lib/codec/market/tx.d.ts +21 -21
  295. package/lib/codec/marketstats/genesis.d.ts +3 -3
  296. package/lib/codec/marketstats/marketstats.d.ts +3 -3
  297. package/lib/codec/marketstats/params.d.ts +3 -3
  298. package/lib/codec/marketstats/query.d.ts +6 -6
  299. package/lib/codec/misc/block.d.ts +3 -3
  300. package/lib/codec/misc/message.d.ts +3 -3
  301. package/lib/codec/misc/message_type.d.ts +3 -3
  302. package/lib/codec/misc/query.d.ts +16 -16
  303. package/lib/codec/misc/trade.d.ts +3 -3
  304. package/lib/codec/misc/transaction.d.ts +4 -4
  305. package/lib/codec/oracle/event.d.ts +4 -4
  306. package/lib/codec/oracle/genesis.d.ts +3 -3
  307. package/lib/codec/oracle/oracle.d.ts +8 -8
  308. package/lib/codec/oracle/proposal.d.ts +3 -3
  309. package/lib/codec/oracle/query.d.ts +28 -28
  310. package/lib/codec/oracle/slashing.d.ts +4 -4
  311. package/lib/codec/oracle/tx.d.ts +14 -14
  312. package/lib/codec/order/event.d.ts +3 -3
  313. package/lib/codec/order/genesis.d.ts +6 -6
  314. package/lib/codec/order/order.d.ts +9 -9
  315. package/lib/codec/order/query.d.ts +12 -12
  316. package/lib/codec/order/tx.d.ts +12 -12
  317. package/lib/codec/perpspool/event.d.ts +9 -9
  318. package/lib/codec/perpspool/genesis.d.ts +6 -6
  319. package/lib/codec/perpspool/market.d.ts +8 -8
  320. package/lib/codec/perpspool/params.d.ts +3 -3
  321. package/lib/codec/perpspool/pool.d.ts +8 -8
  322. package/lib/codec/perpspool/query.d.ts +20 -20
  323. package/lib/codec/perpspool/tx.d.ts +18 -18
  324. package/lib/codec/polynetwork-models.js +5 -1
  325. package/lib/codec/position/event.d.ts +3 -3
  326. package/lib/codec/position/genesis.d.ts +3 -3
  327. package/lib/codec/position/position.d.ts +6 -6
  328. package/lib/codec/position/query.d.ts +8 -8
  329. package/lib/codec/position/tx.d.ts +4 -4
  330. package/lib/codec/pricing/event.d.ts +8 -8
  331. package/lib/codec/pricing/genesis.d.ts +3 -3
  332. package/lib/codec/pricing/legacy.d.ts +3 -3
  333. package/lib/codec/pricing/pricing.d.ts +5 -5
  334. package/lib/codec/pricing/proposal.d.ts +4 -4
  335. package/lib/codec/pricing/query.d.ts +16 -16
  336. package/lib/codec/pricing/tx.d.ts +12 -12
  337. package/lib/codec/profile/event.d.ts +3 -3
  338. package/lib/codec/profile/genesis.d.ts +3 -3
  339. package/lib/codec/profile/profile.d.ts +3 -3
  340. package/lib/codec/profile/query.d.ts +8 -8
  341. package/lib/codec/profile/tx.d.ts +4 -4
  342. package/lib/codec/proofs.d.ts +15 -15
  343. package/lib/codec/sequence/genesis.d.ts +4 -4
  344. package/lib/codec/sequence/query.d.ts +6 -6
  345. package/lib/codec/sequence/tx.d.ts +4 -4
  346. package/lib/codec/subaccount/genesis.d.ts +3 -3
  347. package/lib/codec/subaccount/legacy.d.ts +3 -3
  348. package/lib/codec/subaccount/query.d.ts +17 -17
  349. package/lib/codec/subaccount/subaccount.d.ts +6 -6
  350. package/lib/codec/subaccount/tx.d.ts +8 -8
  351. package/lib/codec/tendermint/abci/types.d.ts +46 -46
  352. package/lib/codec/tendermint/crypto/keys.d.ts +3 -3
  353. package/lib/codec/tendermint/crypto/proof.d.ts +7 -7
  354. package/lib/codec/tendermint/libs/bits/types.d.ts +3 -3
  355. package/lib/codec/tendermint/p2p/types.d.ts +6 -6
  356. package/lib/codec/tendermint/types/block.d.ts +3 -3
  357. package/lib/codec/tendermint/types/evidence.d.ts +6 -6
  358. package/lib/codec/tendermint/types/params.d.ts +8 -8
  359. package/lib/codec/tendermint/types/types.d.ts +15 -15
  360. package/lib/codec/tendermint/types/validator.d.ts +5 -5
  361. package/lib/codec/tendermint/version/types.d.ts +4 -4
  362. package/lib/constant/address.d.ts +1 -1
  363. package/lib/constant/generic.js +1 -1
  364. package/lib/constant/ibc.d.ts +3 -3
  365. package/lib/constant/ibc.js +5 -1
  366. package/lib/constant/index.js +5 -1
  367. package/lib/constant/node.d.ts +1 -1
  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 +2 -1
  373. package/lib/insights/common.js +1 -0
  374. package/lib/insights/competition.d.ts +15 -0
  375. package/lib/insights/index.js +5 -1
  376. package/lib/insights/position.d.ts +1 -1
  377. package/lib/modules/cdp.js +45 -45
  378. package/lib/modules/cosmwasm.js +2 -2
  379. package/lib/modules/evm.d.ts +1 -1
  380. package/lib/modules/evm.js +5 -5
  381. package/lib/modules/gov.js +12 -12
  382. package/lib/modules/index.js +5 -1
  383. package/lib/modules/liquiditypool.js +1 -1
  384. package/lib/modules/order.js +2 -2
  385. package/lib/modules/test.d.ts +0 -0
  386. package/lib/modules/test.js +1 -0
  387. package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
  388. package/lib/provider/account/EthLedgerAccount/index.js +5 -1
  389. package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
  390. package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.js +5 -1
  391. package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
  392. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.d.ts +1 -1
  393. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +8 -4
  394. package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
  395. package/lib/provider/account/NeoLedgerAccount/index.js +5 -1
  396. package/lib/provider/account/index.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 +31 -27
  401. package/lib/provider/amino/types/coin.js +9 -5
  402. package/lib/provider/amino/types/erc20.js +7 -3
  403. package/lib/provider/amino/types/evm.js +7 -3
  404. package/lib/provider/amino/types/evmmerge.js +6 -2
  405. package/lib/provider/amino/types/feemarket.js +6 -2
  406. package/lib/provider/amino/types/gov.js +10 -6
  407. package/lib/provider/amino/types/ibc.js +6 -2
  408. package/lib/provider/amino/types/leverage.js +6 -2
  409. package/lib/provider/amino/types/liquidityPool.js +12 -8
  410. package/lib/provider/amino/types/market.js +11 -7
  411. package/lib/provider/amino/types/oracle.js +7 -3
  412. package/lib/provider/amino/types/order.js +9 -5
  413. package/lib/provider/amino/types/perpspool.js +11 -7
  414. package/lib/provider/amino/types/position.js +6 -2
  415. package/lib/provider/amino/types/profile.js +6 -2
  416. package/lib/provider/amino/types/staking.js +9 -5
  417. package/lib/provider/amino/types/subaccount.js +8 -4
  418. package/lib/provider/amino/utils.d.ts +2 -2
  419. package/lib/provider/amino/utils.js +11 -11
  420. package/lib/provider/keplr/KeplrAccount.js +6 -6
  421. package/lib/provider/leap/LeapAccount.js +2 -2
  422. package/lib/provider/ledger/ledger.js +9 -6
  423. package/lib/provider/metamask/MetaMask.d.ts +1 -1
  424. package/lib/provider/metamask/MetaMask.js +28 -24
  425. package/lib/provider/metamask/error.d.ts +1 -1
  426. package/lib/provider/o3/O3Types.d.ts +1 -1
  427. package/lib/provider/o3/O3Wallet.js +15 -11
  428. package/lib/provider/o3/index.js +5 -1
  429. package/lib/provider/zilpay/Zilpay.js +4 -4
  430. package/lib/provider/zilpay/index.js +5 -1
  431. package/lib/util/address.d.ts +5 -5
  432. package/lib/util/address.js +19 -15
  433. package/lib/util/api.d.ts +3 -3
  434. package/lib/util/api.js +4 -4
  435. package/lib/util/blockchain.d.ts +7 -7
  436. package/lib/util/blockchain.js +4 -4
  437. package/lib/util/eip712.js +3 -3
  438. package/lib/util/fetch.js +1 -1
  439. package/lib/util/generic.d.ts +3 -2
  440. package/lib/util/generic.js +3 -3
  441. package/lib/util/gov.d.ts +1 -1
  442. package/lib/util/index.js +5 -1
  443. package/lib/util/legacyEIP712.d.ts +2 -2
  444. package/lib/util/legacyEIP712.js +2 -2
  445. package/lib/util/network.js +3 -3
  446. package/lib/util/number.d.ts +4 -4
  447. package/lib/util/number.js +5 -5
  448. package/lib/util/tx.d.ts +3 -3
  449. package/lib/util/tx.js +5 -1
  450. package/lib/util/type.d.ts +1 -1
  451. package/lib/wallet/CarbonSigner.d.ts +5 -5
  452. package/lib/wallet/CarbonSigner.js +6 -6
  453. package/lib/wallet/CarbonSigningClient.js +15 -15
  454. package/lib/wallet/CarbonWallet.d.ts +1 -1
  455. package/lib/wallet/CarbonWallet.js +11 -11
  456. package/lib/wallet/index.js +5 -1
  457. package/lib/websocket/connector.js +8 -4
  458. package/lib/websocket/index.js +5 -1
  459. package/lib/websocket/types.d.ts +1 -1
  460. package/package.json +1 -1
  461. package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.d.ts +0 -76
  462. package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.js +0 -424
@@ -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];
@@ -94,13 +98,13 @@ const randomMnemonic = () => {
94
98
  };
95
99
  exports.randomMnemonic = randomMnemonic;
96
100
  const wifEncodePrivateKey = (privateKey, iter = 128) => {
97
- const privateKeyBuf = exports.stringOrBufferToBuffer(privateKey);
101
+ const privateKeyBuf = (0, exports.stringOrBufferToBuffer)(privateKey);
98
102
  return wif.encode(iter, privateKeyBuf, true);
99
103
  };
100
104
  exports.wifEncodePrivateKey = wifEncodePrivateKey;
101
105
  exports.SWTHAddress = {
102
106
  newMnemonic: () => {
103
- return exports.randomMnemonic();
107
+ return (0, exports.randomMnemonic)();
104
108
  },
105
109
  coinType: () => {
106
110
  return SWTH_COIN_TYPE;
@@ -110,10 +114,10 @@ exports.SWTHAddress = {
110
114
  return new BIP44Path(BIP44_PURPOSE, coinType).update(index, change, account).toArray();
111
115
  },
112
116
  publicKeyToScriptHash: (publicKey) => {
113
- const pubKeyBuffer = exports.stringOrBufferToBuffer(publicKey);
117
+ const pubKeyBuffer = (0, exports.stringOrBufferToBuffer)(publicKey);
114
118
  const sha256Hash = ethers_1.ethers.utils.sha256(pubKeyBuffer);
115
119
  const ripemdHash = ethers_1.ethers.utils.ripemd160(sha256Hash);
116
- return generic_1.stripHexPrefix(ripemdHash);
120
+ return (0, generic_1.stripHexPrefix)(ripemdHash);
117
121
  },
118
122
  publicKeyToAddress: (publicKey, opts) => {
119
123
  const scriptHash = exports.SWTHAddress.publicKeyToScriptHash(publicKey);
@@ -135,7 +139,7 @@ exports.SWTHAddress = {
135
139
  return privateKey;
136
140
  },
137
141
  privateToPublicKey: (privateKey) => {
138
- const privateKeyBuff = exports.stringOrBufferToBuffer(privateKey);
142
+ const privateKeyBuff = (0, exports.stringOrBufferToBuffer)(privateKey);
139
143
  const publicKeyUint8Array = secp256k1.publicKeyCreate(privateKeyBuff, true);
140
144
  const publicKey = Buffer.from(publicKeyUint8Array);
141
145
  return publicKey;
@@ -146,7 +150,7 @@ exports.SWTHAddress = {
146
150
  return address;
147
151
  },
148
152
  encode: (hash, opts) => {
149
- const hashBuff = exports.stringOrBufferToBuffer(hash, "hex");
153
+ const hashBuff = (0, exports.stringOrBufferToBuffer)(hash, "hex");
150
154
  const words = bech32.toWords(hashBuff.slice(0, 20));
151
155
  const addressPrefix = exports.SWTHAddress.getBech32Prefix(opts === null || opts === void 0 ? void 0 : opts.network, opts === null || opts === void 0 ? void 0 : opts.bech32Prefix, opts === null || opts === void 0 ? void 0 : opts.type);
152
156
  const address = bech32.encode(addressPrefix, words);
@@ -205,7 +209,7 @@ exports.NEOAddress = {
205
209
  ]);
206
210
  const sha256Hash = ethers_1.ethers.utils.sha256(addressScript);
207
211
  const ripemdHash = ethers_1.ethers.utils.ripemd160(sha256Hash);
208
- return generic_1.stripHexPrefix(ripemdHash);
212
+ return (0, generic_1.stripHexPrefix)(ripemdHash);
209
213
  },
210
214
  publicKeyToAddress: (publicKey) => {
211
215
  const addressScript = exports.NEOAddress.publicKeyToScriptHash(publicKey);
@@ -213,7 +217,7 @@ exports.NEOAddress = {
213
217
  return address;
214
218
  },
215
219
  encodePublicKey: (unencodedPublicKey) => {
216
- const unencPubKeyBuf = exports.stringOrBufferToBuffer(unencodedPublicKey);
220
+ const unencPubKeyBuf = (0, exports.stringOrBufferToBuffer)(unencodedPublicKey);
217
221
  if (unencPubKeyBuf.length <= 33) {
218
222
  // length indicates already encoded
219
223
  return unencPubKeyBuf;
@@ -238,7 +242,7 @@ exports.NEOAddress = {
238
242
  return privateKey;
239
243
  },
240
244
  privateToPublicKey: (privateKey) => {
241
- const privateKeyBuff = exports.stringOrBufferToBuffer(privateKey);
245
+ const privateKeyBuff = (0, exports.stringOrBufferToBuffer)(privateKey);
242
246
  const publicKeyUint8Array = secp256r1.publicKeyCreate(privateKeyBuff, true);
243
247
  return Buffer.from(publicKeyUint8Array);
244
248
  },
@@ -256,7 +260,7 @@ exports.NEOAddress = {
256
260
  },
257
261
  };
258
262
  exports.N3Address = Object.assign(Object.assign({}, exports.NEOAddress), { publicKeyToScriptHash: (publicKey) => {
259
- const publicKeyHex = exports.stringOrBufferToBuffer(publicKey).toString("hex");
263
+ const publicKeyHex = (0, exports.stringOrBufferToBuffer)(publicKey).toString("hex");
260
264
  return neon_core_next_1.wallet.getScriptHashFromPublicKey(publicKeyHex);
261
265
  }, publicKeyToAddress: (publicKey) => {
262
266
  const addressScript = exports.N3Address.publicKeyToScriptHash(publicKey);
@@ -282,7 +286,7 @@ exports.ETHAddress = {
282
286
  return ethers_1.ethers.utils.keccak256(encodedPublicKey);
283
287
  },
284
288
  publicKeyToAddress: (publicKey) => {
285
- const publicKeyBuff = exports.stringOrBufferToBuffer(publicKey);
289
+ const publicKeyBuff = (0, exports.stringOrBufferToBuffer)(publicKey);
286
290
  return ethers_1.ethers.utils.computeAddress(publicKeyBuff);
287
291
  },
288
292
  publicKeyToBech32Address: (publicKey, opts) => {
@@ -290,7 +294,7 @@ exports.ETHAddress = {
290
294
  return exports.ETHAddress.encode(hexAddress.split('0x')[1], opts);
291
295
  },
292
296
  encodePublicKey: (unencodedPublicKey) => {
293
- const unencodedPublicKeyBuff = exports.stringOrBufferToBuffer(unencodedPublicKey);
297
+ const unencodedPublicKeyBuff = (0, exports.stringOrBufferToBuffer)(unencodedPublicKey);
294
298
  const publicKey = ethers_1.ethers.utils.computePublicKey(unencodedPublicKeyBuff, true);
295
299
  return Buffer.from(publicKey, "hex");
296
300
  },
@@ -302,7 +306,7 @@ exports.ETHAddress = {
302
306
  return Buffer.from((_a = wallet.privateKey) === null || _a === void 0 ? void 0 : _a.replace(/^0x/, ""), "hex");
303
307
  },
304
308
  privateToPublicKey: (privateKey) => {
305
- const privateKeyBuff = exports.stringOrBufferToBuffer(privateKey);
309
+ const privateKeyBuff = (0, exports.stringOrBufferToBuffer)(privateKey);
306
310
  return Buffer.from(ethers_1.ethers.utils.computePublicKey(privateKeyBuff).replace(/^0x/, ""), "hex");
307
311
  },
308
312
  privateKeyToAddress: (privateKey) => {
@@ -315,7 +319,7 @@ exports.ETHAddress = {
315
319
  return exports.ETHAddress.privateKeyToAddress(privateKey);
316
320
  },
317
321
  encode: (hash, opts) => {
318
- const hashBuff = exports.stringOrBufferToBuffer(hash, "hex");
322
+ const hashBuff = (0, exports.stringOrBufferToBuffer)(hash, "hex");
319
323
  const words = bech32.toWords(hashBuff.slice(0, 20));
320
324
  const addressPrefix = exports.SWTHAddress.getBech32Prefix(opts === null || opts === void 0 ? void 0 : opts.network, opts === null || opts === void 0 ? void 0 : opts.bech32Prefix, opts === null || opts === void 0 ? void 0 : opts.type);
321
325
  const address = bech32.encode(addressPrefix, words);
package/lib/util/api.d.ts CHANGED
@@ -61,7 +61,7 @@ export declare class HTTP<PathSpecs> {
61
61
  * @param routeParams object map for route parameters.
62
62
  * @param queryParams object map for query parameters.
63
63
  */
64
- path: (path: keyof PathSpecs, routeParams?: PathParams | undefined, queryParams?: PathParams | undefined) => string;
64
+ path: (path: keyof PathSpecs, routeParams?: PathParams, queryParams?: PathParams) => string;
65
65
  /**
66
66
  * Executes HTTP GET request with fetch
67
67
  */
@@ -89,10 +89,10 @@ export declare class RequestError extends Error {
89
89
  result: RequestResult;
90
90
  constructor(result: RequestResult, message?: string);
91
91
  }
92
- declare type RequestOpts = Omit<RequestInit, "body"> & {
92
+ type RequestOpts = Omit<RequestInit, "body"> & {
93
93
  body?: any;
94
94
  };
95
- export declare type APIRequester = (options?: RequestOpts, parser?: ResponseParser) => Promise<RequestResult>;
95
+ export type APIRequester = (options?: RequestOpts, parser?: ResponseParser) => Promise<RequestResult>;
96
96
  export interface APIExecutor {
97
97
  get: APIRequester;
98
98
  post: APIRequester;
package/lib/util/api.js CHANGED
@@ -84,7 +84,7 @@ class HTTP {
84
84
  * Executes HTTP GET request with fetch
85
85
  */
86
86
  this.get = ({ url, headers }) => {
87
- return fetch_1.fetch(url, {
87
+ return (0, fetch_1.fetch)(url, {
88
88
  method: "GET",
89
89
  headers,
90
90
  });
@@ -93,7 +93,7 @@ class HTTP {
93
93
  * Executes HTTP POST request with fetch
94
94
  */
95
95
  this.post = (options) => {
96
- return fetch_1.fetch(options.url, {
96
+ return (0, fetch_1.fetch)(options.url, {
97
97
  method: "POST",
98
98
  headers: Object.assign({ "Content-Type": options.content_type || "application/json" }, options.headers),
99
99
  body: JSON.stringify(options.body),
@@ -103,7 +103,7 @@ class HTTP {
103
103
  * Executes HTTP DELETE request with fetch
104
104
  */
105
105
  this.del = (options) => {
106
- return fetch_1.fetch(options.url, {
106
+ return (0, fetch_1.fetch)(options.url, {
107
107
  method: "DELETE",
108
108
  headers: Object.assign({ "Content-Type": options.content_type || "application/json" }, options.headers),
109
109
  body: JSON.stringify(options.body),
@@ -114,7 +114,7 @@ class HTTP {
114
114
  */
115
115
  this.raw = (options) => {
116
116
  const { url } = options, otherOpts = __rest(options, ["url"]);
117
- return fetch_1.fetch(url, otherOpts);
117
+ return (0, fetch_1.fetch)(url, otherOpts);
118
118
  };
119
119
  this.apiPrefix = apiPrefix;
120
120
  this.apiEndpoints = apiEndpoints;
@@ -44,7 +44,7 @@ export declare enum Blockchain {
44
44
  Agoric = "agoric",
45
45
  Sommelier = "sommelier"
46
46
  }
47
- export declare type BlockchainV2 = ReturnType<TokenClient['getAllBlockchainNames']>[number] | "Native" | "Carbon" | "Tradehub" | "Ibc" | "Polynetwork";
47
+ export type BlockchainV2 = ReturnType<TokenClient['getAllBlockchainNames']>[number] | "Native" | "Carbon" | "Tradehub" | "Ibc" | "Polynetwork";
48
48
  export declare const BLOCKCHAIN_V2_TO_V1_MAPPING: SimpleMap<Blockchain>;
49
49
  export declare const BRIDGE_IDS: {
50
50
  polynetwork: number;
@@ -66,7 +66,7 @@ export interface BridgeMap {
66
66
  polynetwork: PolyNetworkBridge[];
67
67
  ibc: IbcBridge[];
68
68
  }
69
- export declare type ChainIds = SimpleMap<number>;
69
+ export type ChainIds = SimpleMap<number>;
70
70
  export declare const ChainNames: {
71
71
  readonly 1: "MainNet";
72
72
  readonly 3: "Ropsten";
@@ -89,10 +89,10 @@ export declare const CHAIN_IDS_TEST: ChainIds;
89
89
  export declare const chainIdsByBlockchain: SimpleMap<ChainIds>;
90
90
  export declare function parseBlockchain(value: string | null): Blockchain | null;
91
91
  export declare function getChainFromID(id: number): string | undefined;
92
- export declare const getBlockchainFromChain: (chainId?: number | undefined) => Blockchain.Ethereum | Blockchain.BinanceSmartChain | Blockchain.Zilliqa | Blockchain.Arbitrum | Blockchain.Polygon | Blockchain.Okc | undefined;
93
- export declare const blockchainForChainId: (chainId?: number | undefined, network?: Network) => Blockchain | undefined;
94
- export declare const getBlockchainFromChainV2: (chainId?: number | undefined) => "Carbon" | "Ethereum" | "Binance Smart Chain" | "Arbitrum" | "Polygon" | "Okc" | "Zilliqa" | undefined;
95
- export declare const blockchainForChainIdV2: (chainId?: number | undefined, network?: Network) => Blockchain | BlockchainV2 | undefined;
92
+ export declare const getBlockchainFromChain: (chainId?: number) => Blockchain.Ethereum | Blockchain.BinanceSmartChain | Blockchain.Zilliqa | Blockchain.Arbitrum | Blockchain.Polygon | Blockchain.Okc | undefined;
93
+ export declare const blockchainForChainId: (chainId?: number, network?: Network) => Blockchain | undefined;
94
+ export declare const getBlockchainFromChainV2: (chainId?: number) => "Carbon" | "Ethereum" | "Binance Smart Chain" | "Arbitrum" | "Polygon" | "Okc" | "Zilliqa" | undefined;
95
+ export declare const blockchainForChainIdV2: (chainId?: number, network?: Network) => Blockchain | BlockchainV2 | undefined;
96
96
  export declare const EvmChains: readonly ["Ethereum", "Binance Smart Chain", "Arbitrum", "Polygon", "OKC", "Carbon"];
97
- export declare type EVMChain = (typeof EvmChains)[number];
97
+ export type EVMChain = (typeof EvmChains)[number];
98
98
  export declare const isEvmChain: (chain: string) => chain is "Carbon" | "Ethereum" | "Binance Smart Chain" | "Arbitrum" | "Polygon" | "OKC";
@@ -306,10 +306,10 @@ const getBlockchainFromChainV2 = (chainId) => {
306
306
  case 42161:
307
307
  case 421611:
308
308
  return 'Arbitrum';
309
- case Number(ethermint_1.parseChainId((network_1.CarbonEvmChainIDs[network_1.Network.LocalHost]))):
310
- case Number(ethermint_1.parseChainId((network_1.CarbonEvmChainIDs[network_1.Network.DevNet]))):
311
- case Number(ethermint_1.parseChainId((network_1.CarbonEvmChainIDs[network_1.Network.TestNet]))):
312
- case Number(ethermint_1.parseChainId((network_1.CarbonEvmChainIDs[network_1.Network.MainNet]))):
309
+ case Number((0, ethermint_1.parseChainId)((network_1.CarbonEvmChainIDs[network_1.Network.LocalHost]))):
310
+ case Number((0, ethermint_1.parseChainId)((network_1.CarbonEvmChainIDs[network_1.Network.DevNet]))):
311
+ case Number((0, ethermint_1.parseChainId)((network_1.CarbonEvmChainIDs[network_1.Network.TestNet]))):
312
+ case Number((0, ethermint_1.parseChainId)((network_1.CarbonEvmChainIDs[network_1.Network.MainNet]))):
313
313
  return 'Carbon';
314
314
  }
315
315
  return undefined;
@@ -114,7 +114,7 @@ function getMsgValueType(msgTypeUrl, msgValue, msgTypeName, msgTypeIndex, types,
114
114
  const isArray = type.includes('[]') ? true : false;
115
115
  // TypeValue0 --> Value
116
116
  const objectName = typeName.split('Type')[1].split(`${msgTypeIndex}`)[0];
117
- const nestedTypeName = `Type${objectName ? objectName : ''}${name.split('_').map((subName) => lodash_1.capitalize(subName)).join('')}`;
117
+ const nestedTypeName = `Type${objectName ? objectName : ''}${name.split('_').map((subName) => (0, lodash_1.capitalize)(subName)).join('')}`;
118
118
  const nestedMsgTypeIndex = getLatestMsgTypeIndex(nestedTypeName, types);
119
119
  const nestedType = getTypeName(name, nestedMsgTypeIndex, objectName, true, isArray);
120
120
  msgTypeDefinitions[typeName] = [...msgTypeDefinitions[typeName], { name, type: nestedType }];
@@ -153,7 +153,7 @@ function getGjsonPrimitiveType(value) {
153
153
  }
154
154
  function getTypeName(name, index, objectName, nestedType = false, isArray = false) {
155
155
  if (nestedType) {
156
- return `Type${objectName ? objectName : ''}${name.split('_').map(subName => lodash_1.capitalize(subName)).join('')}${index}${isArray ? '[]' : ''}`;
156
+ return `Type${objectName ? objectName : ''}${name.split('_').map(subName => (0, lodash_1.capitalize)(subName)).join('')}${index}${isArray ? '[]' : ''}`;
157
157
  }
158
158
  return name;
159
159
  }
@@ -180,7 +180,7 @@ function constructEIP712Tx(doc) {
180
180
  const eip712Tx = {
181
181
  types: getTypes(doc.msgs),
182
182
  primaryType: "Tx",
183
- domain: Object.assign(Object.assign({}, eip712_1.DEFAULT_CARBON_DOMAIN_FIELDS), { chainId: ethermint_1.parseChainId(doc.chain_id) }),
183
+ domain: Object.assign(Object.assign({}, eip712_1.DEFAULT_CARBON_DOMAIN_FIELDS), { chainId: (0, ethermint_1.parseChainId)(doc.chain_id) }),
184
184
  message: Object.assign({ account_number, chain_id, fee, memo, sequence }, convertMsgs(doc.msgs)),
185
185
  };
186
186
  return eip712Tx;
package/lib/util/fetch.js CHANGED
@@ -10,7 +10,7 @@ function fetch(url, init) {
10
10
  return window.fetch(url, Object.assign({}, init));
11
11
  }
12
12
  else {
13
- return node_fetch_1.default(url, init);
13
+ return (0, node_fetch_1.default)(url, init);
14
14
  }
15
15
  }
16
16
  exports.fetch = fetch;
@@ -1,11 +1,12 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
3
4
  export declare const overrideConfig: <T = unknown>(defaults: T, override?: Partial<T> | undefined) => T;
4
5
  export declare const sortObject: (input: any) => unknown;
5
6
  export declare const stripHexPrefix: (input: string) => string;
6
7
  export declare const appendHexPrefix: (input: string) => string;
7
- export declare const computeTxHash: (bytes?: Uint8Array | Buffer | undefined) => string | undefined;
8
- export declare const toTxHash: (bytes?: Uint8Array | Buffer | undefined) => string | undefined;
8
+ export declare const computeTxHash: (bytes?: Uint8Array | Buffer) => string | undefined;
9
+ export declare const toTxHash: (bytes?: Uint8Array | Buffer) => string | undefined;
9
10
  /**
10
11
  * Make tendermint client send RPC requests with the same request
11
12
  * ID instead of using a random id that is unread in the client.
@@ -21,7 +21,7 @@ const overrideConfig = (defaults, override) => {
21
21
  if (typeof member === "undefined")
22
22
  continue;
23
23
  if (typeof member === "object") {
24
- result[key] = exports.overrideConfig(result[key], member);
24
+ result[key] = (0, exports.overrideConfig)(result[key], member);
25
25
  }
26
26
  else {
27
27
  result[key] = member;
@@ -38,7 +38,7 @@ const sortObject = (input) => {
38
38
  const output = {};
39
39
  Object.keys(input)
40
40
  .sort()
41
- .forEach((key) => (output[key] = exports.sortObject(input[key])));
41
+ .forEach((key) => (output[key] = (0, exports.sortObject)(input[key])));
42
42
  return output;
43
43
  };
44
44
  exports.sortObject = sortObject;
@@ -53,7 +53,7 @@ exports.appendHexPrefix = appendHexPrefix;
53
53
  const computeTxHash = (bytes) => {
54
54
  if (!bytes)
55
55
  return bytes;
56
- return exports.toTxHash(crypto_1.sha256(bytes));
56
+ return (0, exports.toTxHash)((0, crypto_1.sha256)(bytes));
57
57
  };
58
58
  exports.computeTxHash = computeTxHash;
59
59
  const toTxHash = (bytes) => {
package/lib/util/gov.d.ts CHANGED
@@ -37,4 +37,4 @@ export declare const emptyProposal: {
37
37
  typeUrl: string;
38
38
  value: {};
39
39
  };
40
- export declare const decodeContent: (content?: Any | undefined) => PropDecoded;
40
+ export declare const decodeContent: (content?: Any) => PropDecoded;
package/lib/util/index.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];
@@ -8,12 +8,12 @@ export interface LegacyEIP712Tx {
8
8
  readonly domain: TypedDataDomain;
9
9
  readonly message: LegacyEIP712StdSignDoc;
10
10
  }
11
- export declare type EIP712Fee = {
11
+ export type EIP712Fee = {
12
12
  readonly amount: readonly Coin[];
13
13
  readonly gas: string;
14
14
  readonly feePayer: string;
15
15
  };
16
- declare type LegacyEIP712StdSignDoc = StdSignDoc & {
16
+ type LegacyEIP712StdSignDoc = StdSignDoc & {
17
17
  fee: EIP712Fee;
18
18
  };
19
19
  export declare function legacyConstructEIP712Tx(doc: LegacyEIP712StdSignDoc): LegacyEIP712Tx;
@@ -62,7 +62,7 @@ function getMsgValueType(msgTypeUrl, msgValue, msgTypeName, objectName, nestedTy
62
62
  }
63
63
  function getTypeName(name, objectName, nestedType = false, isArray = false) {
64
64
  if (nestedType) {
65
- return `Type${objectName === 'MsgValue' ? '' : objectName}${name.split('_').map(subName => lodash_1.capitalize(subName)).join('')}${isArray ? '[]' : ''}`;
65
+ return `Type${objectName === 'MsgValue' ? '' : objectName}${name.split('_').map(subName => (0, lodash_1.capitalize)(subName)).join('')}${isArray ? '[]' : ''}`;
66
66
  }
67
67
  return name;
68
68
  }
@@ -90,7 +90,7 @@ function legacyConstructEIP712Tx(doc) {
90
90
  const eip712Tx = {
91
91
  types: getTypes(AminoTypesMap_1.default.fromAmino(msg).typeUrl, msg.value),
92
92
  primaryType: "Tx",
93
- domain: Object.assign(Object.assign({}, eip712_1.DEFAULT_CARBON_DOMAIN_FIELDS), { chainId: ethermint_1.parseChainId(doc.chain_id) }),
93
+ domain: Object.assign(Object.assign({}, eip712_1.DEFAULT_CARBON_DOMAIN_FIELDS), { chainId: (0, ethermint_1.parseChainId)(doc.chain_id) }),
94
94
  message: doc,
95
95
  };
96
96
  return eip712Tx;
@@ -31,9 +31,9 @@ const parseNetwork = (network, defaultNetwork = constant_1.DEFAULT_NETWORK) => {
31
31
  exports.parseNetwork = parseNetwork;
32
32
  const carbonNetworkFromChainId = (parsedEvmChainId) => {
33
33
  switch (parsedEvmChainId) {
34
- case ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.LocalHost]): return index_1.CarbonSDK.Network.LocalHost;
35
- case ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.DevNet]): return index_1.CarbonSDK.Network.DevNet;
36
- case ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.TestNet]): return index_1.CarbonSDK.Network.TestNet;
34
+ case (0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.LocalHost]): return index_1.CarbonSDK.Network.LocalHost;
35
+ case (0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.DevNet]): return index_1.CarbonSDK.Network.DevNet;
36
+ case (0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.TestNet]): return index_1.CarbonSDK.Network.TestNet;
37
37
  default: return index_1.CarbonSDK.Network.MainNet;
38
38
  }
39
39
  };
@@ -2,8 +2,8 @@ import BigNumber from "bignumber.js";
2
2
  export declare const BN_ONE: BigNumber;
3
3
  export declare const BN_ZERO: BigNumber;
4
4
  export declare const BN_10000: BigNumber;
5
- export declare const parseBN: (input?: string | number | BigNumber | null | undefined, defaultValue?: BigNumber | undefined) => BigNumber | undefined;
6
- export declare const bnOrZero: (input?: string | number | BigNumber | null | undefined, defaultValue?: BigNumber) => BigNumber;
7
- export declare const toHuman: (value?: string | number | BigNumber | null | undefined, decimals?: string | number | BigNumber | null | undefined) => BigNumber | undefined;
8
- export declare const toUnitless: (value?: string | number | BigNumber | null | undefined, decimals?: string | number | BigNumber | null | undefined) => BigNumber | undefined;
5
+ export declare const parseBN: (input?: string | BigNumber | number | null, defaultValue?: BigNumber) => BigNumber | undefined;
6
+ export declare const bnOrZero: (input?: string | BigNumber | number | null, defaultValue?: BigNumber) => BigNumber;
7
+ export declare const toHuman: (value?: null | BigNumber | string | number, decimals?: null | BigNumber | string | number) => BigNumber | undefined;
8
+ export declare const toUnitless: (value?: null | BigNumber | string | number, decimals?: null | BigNumber | string | number) => BigNumber | undefined;
9
9
  export declare const generateNonce: () => number;
@@ -18,26 +18,26 @@ const parseBN = (input, defaultValue) => {
18
18
  };
19
19
  exports.parseBN = parseBN;
20
20
  const bnOrZero = (input, defaultValue = exports.BN_ZERO) => {
21
- return exports.parseBN(input, defaultValue);
21
+ return (0, exports.parseBN)(input, defaultValue);
22
22
  };
23
23
  exports.bnOrZero = bnOrZero;
24
24
  const toHuman = (value, decimals) => {
25
25
  if (value === undefined || value === null)
26
26
  return undefined;
27
- const valueBN = exports.bnOrZero(value);
27
+ const valueBN = (0, exports.bnOrZero)(value);
28
28
  if (!decimals)
29
29
  return valueBN; // decimals = 0 or nullish
30
- const decimalsBN = exports.bnOrZero(decimals);
30
+ const decimalsBN = (0, exports.bnOrZero)(decimals);
31
31
  return valueBN.shiftedBy(decimalsBN.negated().toNumber());
32
32
  };
33
33
  exports.toHuman = toHuman;
34
34
  const toUnitless = (value, decimals) => {
35
35
  if (value === undefined || value === null)
36
36
  return undefined;
37
- const valueBN = exports.bnOrZero(value);
37
+ const valueBN = (0, exports.bnOrZero)(value);
38
38
  if (!decimals)
39
39
  return valueBN; // decimals = 0 or nullish
40
- const decimalsBN = exports.bnOrZero(decimals);
40
+ const decimalsBN = (0, exports.bnOrZero)(decimals);
41
41
  return valueBN.shiftedBy(decimalsBN.toNumber());
42
42
  };
43
43
  exports.toUnitless = toUnitless;
package/lib/util/tx.d.ts CHANGED
@@ -10,8 +10,8 @@ export interface TxBody extends Omit<CosmosModels.Tx.TxBody, "messages"> {
10
10
  export interface Tx extends Omit<CosmosModels.Tx.Tx, "body"> {
11
11
  body?: TxBody;
12
12
  }
13
- export declare const decode: (bytes?: Uint8Array | Buffer | undefined) => Tx | undefined;
14
- export declare const getSender: (decodedTx: Tx, opts?: SWTHAddressOptions | undefined) => string;
13
+ export declare const decode: (bytes?: Uint8Array | Buffer) => Tx | undefined;
14
+ export declare const getSender: (decodedTx: Tx, opts?: SWTHAddressOptions) => string;
15
15
  export declare enum BroadcastTxMode {
16
16
  BroadcastTxSync = "sync",
17
17
  BroadcastTxAsync = "async",
@@ -35,7 +35,7 @@ export interface BroadcastTxOpts {
35
35
  timeoutMs?: number;
36
36
  pollIntervalMs?: number;
37
37
  }
38
- export declare type SignAndBroadcastOpts = Partial<SignTxOpts & BroadcastTxOpts>;
38
+ export type SignAndBroadcastOpts = Partial<SignTxOpts & BroadcastTxOpts>;
39
39
  export interface TxLog {
40
40
  msg_index: number;
41
41
  log: string;
package/lib/util/tx.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];
@@ -8,7 +8,7 @@ export interface NetworkMap<T> {
8
8
  [Network.DevNet]: T;
9
9
  [Network.LocalHost]: T;
10
10
  }
11
- export declare type OptionalNetworkMap<T> = Partial<NetworkMap<T>>;
11
+ export type OptionalNetworkMap<T> = Partial<NetworkMap<T>>;
12
12
  /**
13
13
  * converts snakecase strings to camelcase
14
14
  * @param snakeStr string to convert to camelcase
@@ -18,15 +18,15 @@ export interface EIP712Signer extends EvmSigner {
18
18
  legacyEip712SignMode: boolean;
19
19
  readonly signLegacyEip712: (signerAddress: string, signDoc: StdSignDoc) => Promise<LegacyEIP712AminoSignResponse>;
20
20
  }
21
- export declare type CarbonSigner = DirectCarbonSigner | AminoCarbonSigner | CarbonEIP712Signer;
22
- export declare type CarbonEIP712Signer = (DirectCarbonSigner | AminoCarbonSigner) & EIP712Signer;
23
- export declare type DirectCarbonSigner = OfflineDirectSigner & EvmSigner & {
21
+ export type CarbonSigner = DirectCarbonSigner | AminoCarbonSigner | CarbonEIP712Signer;
22
+ export type CarbonEIP712Signer = (DirectCarbonSigner | AminoCarbonSigner) & EIP712Signer;
23
+ export type DirectCarbonSigner = OfflineDirectSigner & EvmSigner & {
24
24
  type: CarbonSignerTypes;
25
25
  };
26
- export declare type AminoCarbonSigner = OfflineAminoSigner & EvmSigner & {
26
+ export type AminoCarbonSigner = OfflineAminoSigner & EvmSigner & {
27
27
  type: CarbonSignerTypes;
28
28
  };
29
- export declare type LegacyEIP712AminoSignResponse = AminoSignResponse & {
29
+ export type LegacyEIP712AminoSignResponse = AminoSignResponse & {
30
30
  feePayer: string;
31
31
  };
32
32
  export declare function isCarbonEIP712Signer(signer: OfflineSigner): boolean;
@@ -92,10 +92,6 @@ class CarbonNonSigner {
92
92
  exports.CarbonNonSigner = CarbonNonSigner;
93
93
  // Uses amino because ledger does not work with protobuf yet
94
94
  class CarbonLedgerSigner {
95
- constructor(ledger) {
96
- this.ledger = ledger;
97
- this.type = CarbonSignerTypes.Ledger;
98
- }
99
95
  retrieveAccount() {
100
96
  return __awaiter(this, void 0, void 0, function* () {
101
97
  if (!this.account) {
@@ -120,9 +116,9 @@ class CarbonLedgerSigner {
120
116
  return __awaiter(this, void 0, void 0, function* () {
121
117
  const account = yield this.retrieveAccount();
122
118
  const { pubkey } = account;
123
- const msg = JSON.stringify(generic_1.sortObject(doc));
119
+ const msg = JSON.stringify((0, generic_1.sortObject)(doc));
124
120
  const signBytes = yield this.ledger.sign(msg);
125
- const signature = amino_1.encodeSecp256k1Signature(pubkey, signBytes);
121
+ const signature = (0, amino_1.encodeSecp256k1Signature)(pubkey, signBytes);
126
122
  return {
127
123
  signed: doc,
128
124
  signature,
@@ -134,5 +130,9 @@ class CarbonLedgerSigner {
134
130
  throw new Error("signing not available");
135
131
  });
136
132
  }
133
+ constructor(ledger) {
134
+ this.ledger = ledger;
135
+ this.type = CarbonSignerTypes.Ledger;
136
+ }
137
137
  }
138
138
  exports.CarbonLedgerSigner = CarbonLedgerSigner;