carbon-js-sdk 0.7.4-beta.1 → 0.7.4-beta.3
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.
- package/lib/CarbonSDK.d.ts +5 -6
- package/lib/CarbonSDK.js +3 -8
- package/lib/clients/BatchQueryClient.js +4 -4
- package/lib/clients/BlockchainClient.d.ts +3 -3
- package/lib/clients/BlockchainClient.js +1 -1
- package/lib/clients/CarbonQueryClient.d.ts +49 -49
- package/lib/clients/CarbonQueryClient.js +27 -27
- package/lib/clients/ETHClient.d.ts +5 -5
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/HydrogenClient.d.ts +3 -3
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/InsightsQueryClient.d.ts +4 -4
- package/lib/clients/InsightsQueryClient.js +3 -3
- package/lib/clients/NEOClient.js +8 -12
- package/lib/clients/TokenClient.d.ts +5 -5
- package/lib/clients/TokenClient.js +12 -19
- package/lib/clients/ZILClient.js +17 -17
- package/lib/codec/Switcheo/carbon/adl/genesis.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/adl/genesis.js +46 -0
- package/lib/codec/Switcheo/carbon/adl/query.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/adl/query.js +20 -0
- package/lib/codec/Switcheo/carbon/adl/tx.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/adl/tx.js +20 -0
- package/lib/codec/Switcheo/carbon/admin/export.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/admin/export.js +13 -0
- package/lib/codec/Switcheo/carbon/admin/genesis.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/admin/genesis.js +46 -0
- package/lib/codec/Switcheo/carbon/admin/query.d.ts +62 -0
- package/lib/codec/Switcheo/carbon/admin/query.js +186 -0
- package/lib/codec/Switcheo/carbon/admin/tx.d.ts +62 -0
- package/lib/codec/Switcheo/carbon/admin/tx.js +198 -0
- package/lib/codec/Switcheo/carbon/bank/event.d.ts +65 -0
- package/lib/codec/Switcheo/carbon/bank/event.js +332 -0
- package/lib/codec/Switcheo/carbon/bank/export.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/bank/export.js +14 -0
- package/lib/codec/Switcheo/carbon/bank/genesis.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/bank/genesis.js +46 -0
- package/lib/codec/Switcheo/carbon/bank/query.d.ts +77 -0
- package/lib/codec/Switcheo/carbon/bank/query.js +459 -0
- package/lib/codec/Switcheo/carbon/book/book.d.ts +57 -0
- package/lib/codec/Switcheo/carbon/book/book.js +319 -0
- package/lib/codec/Switcheo/carbon/book/event.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/book/event.js +113 -0
- package/lib/codec/Switcheo/carbon/book/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/book/export.js +23 -0
- package/lib/codec/Switcheo/carbon/book/genesis.d.ts +25 -0
- package/lib/codec/Switcheo/carbon/book/genesis.js +79 -0
- package/lib/codec/Switcheo/carbon/book/legacy.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/book/legacy.js +120 -0
- package/lib/codec/Switcheo/carbon/book/query.d.ts +141 -0
- package/lib/codec/Switcheo/carbon/book/query.js +606 -0
- package/lib/codec/Switcheo/carbon/book/tx.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/book/tx.js +20 -0
- package/lib/codec/Switcheo/carbon/broker/amm.d.ts +50 -0
- package/lib/codec/Switcheo/carbon/broker/amm.js +326 -0
- package/lib/codec/Switcheo/carbon/broker/candlestick.d.ts +27 -0
- package/lib/codec/Switcheo/carbon/broker/candlestick.js +211 -0
- package/lib/codec/Switcheo/carbon/broker/event.d.ts +53 -0
- package/lib/codec/Switcheo/carbon/broker/event.js +485 -0
- package/lib/codec/Switcheo/carbon/broker/export.d.ts +7 -0
- package/lib/codec/Switcheo/carbon/broker/export.js +27 -0
- package/lib/codec/Switcheo/carbon/broker/genesis.d.ts +25 -0
- package/lib/codec/Switcheo/carbon/broker/genesis.js +79 -0
- package/lib/codec/Switcheo/carbon/broker/incoming_liquidations.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/broker/incoming_liquidations.js +93 -0
- package/lib/codec/Switcheo/carbon/broker/pagination.d.ts +19 -0
- package/lib/codec/Switcheo/carbon/broker/pagination.js +78 -0
- package/lib/codec/Switcheo/carbon/broker/query.d.ts +107 -0
- package/lib/codec/Switcheo/carbon/broker/query.js +597 -0
- package/lib/codec/Switcheo/carbon/broker/tx.d.ts +53 -0
- package/lib/codec/Switcheo/carbon/broker/tx.js +176 -0
- package/lib/codec/Switcheo/carbon/btcx/denom_cross_chain_info.d.ts +21 -0
- package/lib/codec/Switcheo/carbon/btcx/denom_cross_chain_info.js +98 -0
- package/lib/codec/Switcheo/carbon/btcx/denom_info.d.ts +24 -0
- package/lib/codec/Switcheo/carbon/btcx/denom_info.js +140 -0
- package/lib/codec/Switcheo/carbon/btcx/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/btcx/export.js +19 -0
- package/lib/codec/Switcheo/carbon/btcx/genesis.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/btcx/genesis.js +46 -0
- package/lib/codec/Switcheo/carbon/btcx/query.d.ts +68 -0
- package/lib/codec/Switcheo/carbon/btcx/query.js +275 -0
- package/lib/codec/Switcheo/carbon/btcx/tx.d.ts +92 -0
- package/lib/codec/Switcheo/carbon/btcx/tx.js +436 -0
- package/lib/codec/Switcheo/carbon/ccm/ccm.d.ts +19 -0
- package/lib/codec/Switcheo/carbon/ccm/ccm.js +60 -0
- package/lib/codec/Switcheo/carbon/ccm/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/ccm/export.js +20 -0
- package/lib/codec/Switcheo/carbon/ccm/genesis.d.ts +83 -0
- package/lib/codec/Switcheo/carbon/ccm/genesis.js +438 -0
- package/lib/codec/Switcheo/carbon/ccm/query.d.ts +45 -0
- package/lib/codec/Switcheo/carbon/ccm/query.js +197 -0
- package/lib/codec/Switcheo/carbon/ccm/tx.d.ts +97 -0
- package/lib/codec/Switcheo/carbon/ccm/tx.js +462 -0
- package/lib/codec/Switcheo/carbon/cdp/asset_params.d.ts +57 -0
- package/lib/codec/Switcheo/carbon/cdp/asset_params.js +411 -0
- package/lib/codec/Switcheo/carbon/cdp/cdp_liquidations.d.ts +32 -0
- package/lib/codec/Switcheo/carbon/cdp/cdp_liquidations.js +288 -0
- package/lib/codec/Switcheo/carbon/cdp/debt_info.d.ts +23 -0
- package/lib/codec/Switcheo/carbon/cdp/debt_info.js +158 -0
- package/lib/codec/Switcheo/carbon/cdp/e_mode_category.d.ts +23 -0
- package/lib/codec/Switcheo/carbon/cdp/e_mode_category.js +135 -0
- package/lib/codec/Switcheo/carbon/cdp/event.d.ts +446 -0
- package/lib/codec/Switcheo/carbon/cdp/event.js +2913 -0
- package/lib/codec/Switcheo/carbon/cdp/export.d.ts +13 -0
- package/lib/codec/Switcheo/carbon/cdp/export.js +210 -0
- package/lib/codec/Switcheo/carbon/cdp/genesis.d.ts +134 -0
- package/lib/codec/Switcheo/carbon/cdp/genesis.js +825 -0
- package/lib/codec/Switcheo/carbon/cdp/params.d.ts +68 -0
- package/lib/codec/Switcheo/carbon/cdp/params.js +210 -0
- package/lib/codec/Switcheo/carbon/cdp/query.d.ts +644 -0
- package/lib/codec/Switcheo/carbon/cdp/query.js +3099 -0
- package/lib/codec/Switcheo/carbon/cdp/rate_strategy_params.d.ts +26 -0
- package/lib/codec/Switcheo/carbon/cdp/rate_strategy_params.js +180 -0
- package/lib/codec/Switcheo/carbon/cdp/reward_scheme.d.ts +71 -0
- package/lib/codec/Switcheo/carbon/cdp/reward_scheme.js +550 -0
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_debt_info.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_debt_info.js +144 -0
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_interest_info.d.ts +19 -0
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_interest_info.js +99 -0
- package/lib/codec/Switcheo/carbon/cdp/tx.d.ts +1026 -0
- package/lib/codec/Switcheo/carbon/cdp/tx.js +5191 -0
- package/lib/codec/Switcheo/carbon/coin/bridge.d.ts +24 -0
- package/lib/codec/Switcheo/carbon/coin/bridge.js +151 -0
- package/lib/codec/Switcheo/carbon/coin/event.d.ts +143 -0
- package/lib/codec/Switcheo/carbon/coin/event.js +775 -0
- package/lib/codec/Switcheo/carbon/coin/export.d.ts +8 -0
- package/lib/codec/Switcheo/carbon/coin/export.js +107 -0
- package/lib/codec/Switcheo/carbon/coin/genesis.d.ts +42 -0
- package/lib/codec/Switcheo/carbon/coin/genesis.js +207 -0
- package/lib/codec/Switcheo/carbon/coin/group.d.ts +50 -0
- package/lib/codec/Switcheo/carbon/coin/group.js +230 -0
- package/lib/codec/Switcheo/carbon/coin/proposal.d.ts +21 -0
- package/lib/codec/Switcheo/carbon/coin/proposal.js +91 -0
- package/lib/codec/Switcheo/carbon/coin/query.d.ts +310 -0
- package/lib/codec/Switcheo/carbon/coin/query.js +1439 -0
- package/lib/codec/Switcheo/carbon/coin/token.d.ts +104 -0
- package/lib/codec/Switcheo/carbon/coin/token.js +700 -0
- package/lib/codec/Switcheo/carbon/coin/tx.d.ts +586 -0
- package/lib/codec/Switcheo/carbon/coin/tx.js +3131 -0
- package/lib/codec/Switcheo/carbon/erc20/erc20.d.ts +41 -0
- package/lib/codec/Switcheo/carbon/erc20/erc20.js +144 -0
- package/lib/codec/Switcheo/carbon/erc20/events.d.ts +76 -0
- package/lib/codec/Switcheo/carbon/erc20/events.js +330 -0
- package/lib/codec/Switcheo/carbon/erc20/export.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/erc20/export.js +37 -0
- package/lib/codec/Switcheo/carbon/erc20/genesis.d.ts +40 -0
- package/lib/codec/Switcheo/carbon/erc20/genesis.js +139 -0
- package/lib/codec/Switcheo/carbon/erc20/query.d.ts +117 -0
- package/lib/codec/Switcheo/carbon/erc20/query.js +333 -0
- package/lib/codec/Switcheo/carbon/erc20/tx.d.ts +232 -0
- package/lib/codec/Switcheo/carbon/erc20/tx.js +765 -0
- package/lib/codec/Switcheo/carbon/evmbank/export.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/evmbank/export.js +8 -0
- package/lib/codec/Switcheo/carbon/evmbank/genesis.d.ts +32 -0
- package/lib/codec/Switcheo/carbon/evmbank/genesis.js +152 -0
- package/lib/codec/Switcheo/carbon/evmbank/query.d.ts +40 -0
- package/lib/codec/Switcheo/carbon/evmbank/query.js +116 -0
- package/lib/codec/Switcheo/carbon/evmcontract/genesis.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/evmcontract/genesis.js +46 -0
- package/lib/codec/Switcheo/carbon/evmcontract/query.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/evmcontract/query.js +20 -0
- package/lib/codec/Switcheo/carbon/evmcontract/tx.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/evmcontract/tx.js +20 -0
- package/lib/codec/Switcheo/carbon/evmmerge/address.d.ts +19 -0
- package/lib/codec/Switcheo/carbon/evmmerge/address.js +75 -0
- package/lib/codec/Switcheo/carbon/evmmerge/event.d.ts +20 -0
- package/lib/codec/Switcheo/carbon/evmmerge/event.js +90 -0
- package/lib/codec/Switcheo/carbon/evmmerge/export.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/evmmerge/export.js +20 -0
- package/lib/codec/Switcheo/carbon/evmmerge/genesis.d.ts +48 -0
- package/lib/codec/Switcheo/carbon/evmmerge/genesis.js +216 -0
- package/lib/codec/Switcheo/carbon/evmmerge/offchain.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/evmmerge/offchain.js +105 -0
- package/lib/codec/Switcheo/carbon/evmmerge/query.d.ts +75 -0
- package/lib/codec/Switcheo/carbon/evmmerge/query.js +254 -0
- package/lib/codec/Switcheo/carbon/evmmerge/tx.d.ts +45 -0
- package/lib/codec/Switcheo/carbon/evmmerge/tx.js +128 -0
- package/lib/codec/Switcheo/carbon/fee/event.d.ts +20 -0
- package/lib/codec/Switcheo/carbon/fee/event.js +83 -0
- package/lib/codec/Switcheo/carbon/fee/export.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/fee/export.js +32 -0
- package/lib/codec/Switcheo/carbon/fee/fee.d.ts +42 -0
- package/lib/codec/Switcheo/carbon/fee/fee.js +183 -0
- package/lib/codec/Switcheo/carbon/fee/genesis.d.ts +23 -0
- package/lib/codec/Switcheo/carbon/fee/genesis.js +79 -0
- package/lib/codec/Switcheo/carbon/fee/proposal.d.ts +57 -0
- package/lib/codec/Switcheo/carbon/fee/proposal.js +311 -0
- package/lib/codec/Switcheo/carbon/fee/query.d.ts +114 -0
- package/lib/codec/Switcheo/carbon/fee/query.js +470 -0
- package/lib/codec/Switcheo/carbon/fee/tx.d.ts +108 -0
- package/lib/codec/Switcheo/carbon/fee/tx.js +415 -0
- package/lib/codec/Switcheo/carbon/headersync/consensus_peers.d.ts +70 -0
- package/lib/codec/Switcheo/carbon/headersync/consensus_peers.js +383 -0
- package/lib/codec/Switcheo/carbon/headersync/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/headersync/export.js +24 -0
- package/lib/codec/Switcheo/carbon/headersync/genesis.d.ts +79 -0
- package/lib/codec/Switcheo/carbon/headersync/genesis.js +419 -0
- package/lib/codec/Switcheo/carbon/headersync/query.d.ts +64 -0
- package/lib/codec/Switcheo/carbon/headersync/query.js +231 -0
- package/lib/codec/Switcheo/carbon/headersync/tx.d.ts +64 -0
- package/lib/codec/Switcheo/carbon/headersync/tx.js +215 -0
- package/lib/codec/Switcheo/carbon/inflation/export.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/inflation/export.js +8 -0
- package/lib/codec/Switcheo/carbon/inflation/genesis.d.ts +25 -0
- package/lib/codec/Switcheo/carbon/inflation/genesis.js +79 -0
- package/lib/codec/Switcheo/carbon/inflation/inflation.d.ts +26 -0
- package/lib/codec/Switcheo/carbon/inflation/inflation.js +165 -0
- package/lib/codec/Switcheo/carbon/inflation/query.d.ts +41 -0
- package/lib/codec/Switcheo/carbon/inflation/query.js +109 -0
- package/lib/codec/Switcheo/carbon/inflation/tx.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/inflation/tx.js +20 -0
- package/lib/codec/Switcheo/carbon/insurance/event.d.ts +24 -0
- package/lib/codec/Switcheo/carbon/insurance/event.js +46 -0
- package/lib/codec/Switcheo/carbon/insurance/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/insurance/export.js +14 -0
- package/lib/codec/Switcheo/carbon/insurance/fund.d.ts +29 -0
- package/lib/codec/Switcheo/carbon/insurance/fund.js +148 -0
- package/lib/codec/Switcheo/carbon/insurance/genesis.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/insurance/genesis.js +46 -0
- package/lib/codec/Switcheo/carbon/insurance/query.d.ts +41 -0
- package/lib/codec/Switcheo/carbon/insurance/query.js +108 -0
- package/lib/codec/Switcheo/carbon/insurance/tx.d.ts +44 -0
- package/lib/codec/Switcheo/carbon/insurance/tx.js +144 -0
- package/lib/codec/Switcheo/carbon/leverage/event.d.ts +21 -0
- package/lib/codec/Switcheo/carbon/leverage/event.js +100 -0
- package/lib/codec/Switcheo/carbon/leverage/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/leverage/export.js +16 -0
- package/lib/codec/Switcheo/carbon/leverage/genesis.d.ts +24 -0
- package/lib/codec/Switcheo/carbon/leverage/genesis.js +64 -0
- package/lib/codec/Switcheo/carbon/leverage/leverage.d.ts +30 -0
- package/lib/codec/Switcheo/carbon/leverage/leverage.js +134 -0
- package/lib/codec/Switcheo/carbon/leverage/query.d.ts +70 -0
- package/lib/codec/Switcheo/carbon/leverage/query.js +234 -0
- package/lib/codec/Switcheo/carbon/leverage/tx.d.ts +43 -0
- package/lib/codec/Switcheo/carbon/leverage/tx.js +127 -0
- package/lib/codec/Switcheo/carbon/liquidation/export.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/liquidation/export.js +17 -0
- package/lib/codec/Switcheo/carbon/liquidation/genesis.d.ts +37 -0
- package/lib/codec/Switcheo/carbon/liquidation/genesis.js +136 -0
- package/lib/codec/Switcheo/carbon/liquidation/liquidation.d.ts +17 -0
- package/lib/codec/Switcheo/carbon/liquidation/liquidation.js +46 -0
- package/lib/codec/Switcheo/carbon/liquidation/outstanding_position.d.ts +33 -0
- package/lib/codec/Switcheo/carbon/liquidation/outstanding_position.js +203 -0
- package/lib/codec/Switcheo/carbon/liquidation/query.d.ts +77 -0
- package/lib/codec/Switcheo/carbon/liquidation/query.js +341 -0
- package/lib/codec/Switcheo/carbon/liquidation/quote_changes.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/liquidation/quote_changes.js +95 -0
- package/lib/codec/Switcheo/carbon/liquidation/tx.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/liquidation/tx.js +20 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/event.d.ts +182 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/event.js +1268 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/export.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/export.js +125 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/genesis.d.ts +32 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/genesis.js +228 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.d.ts +138 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.js +943 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/proposal.d.ts +117 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/proposal.js +697 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/query.d.ts +370 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/query.js +1738 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/reward.d.ts +196 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/reward.js +1204 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/tx.d.ts +453 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/tx.js +2423 -0
- package/lib/codec/Switcheo/carbon/lockproxy/event.d.ts +46 -0
- package/lib/codec/Switcheo/carbon/lockproxy/event.js +348 -0
- package/lib/codec/Switcheo/carbon/lockproxy/export.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/lockproxy/export.js +28 -0
- package/lib/codec/Switcheo/carbon/lockproxy/genesis.d.ts +68 -0
- package/lib/codec/Switcheo/carbon/lockproxy/genesis.js +355 -0
- package/lib/codec/Switcheo/carbon/lockproxy/lockproxy.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/lockproxy/lockproxy.js +147 -0
- package/lib/codec/Switcheo/carbon/lockproxy/query.d.ts +67 -0
- package/lib/codec/Switcheo/carbon/lockproxy/query.js +274 -0
- package/lib/codec/Switcheo/carbon/lockproxy/tx.d.ts +147 -0
- package/lib/codec/Switcheo/carbon/lockproxy/tx.js +808 -0
- package/lib/codec/Switcheo/carbon/market/event.d.ts +20 -0
- package/lib/codec/Switcheo/carbon/market/event.js +76 -0
- package/lib/codec/Switcheo/carbon/market/export.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/market/export.js +61 -0
- package/lib/codec/Switcheo/carbon/market/fee.d.ts +123 -0
- package/lib/codec/Switcheo/carbon/market/fee.js +334 -0
- package/lib/codec/Switcheo/carbon/market/genesis.d.ts +31 -0
- package/lib/codec/Switcheo/carbon/market/genesis.js +147 -0
- package/lib/codec/Switcheo/carbon/market/market.d.ts +131 -0
- package/lib/codec/Switcheo/carbon/market/market.js +1245 -0
- package/lib/codec/Switcheo/carbon/market/proposal.d.ts +46 -0
- package/lib/codec/Switcheo/carbon/market/proposal.js +245 -0
- package/lib/codec/Switcheo/carbon/market/query.d.ts +233 -0
- package/lib/codec/Switcheo/carbon/market/query.js +938 -0
- package/lib/codec/Switcheo/carbon/market/tx.d.ts +250 -0
- package/lib/codec/Switcheo/carbon/market/tx.js +1265 -0
- package/lib/codec/Switcheo/carbon/marketstats/export.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/marketstats/export.js +12 -0
- package/lib/codec/Switcheo/carbon/marketstats/genesis.d.ts +21 -0
- package/lib/codec/Switcheo/carbon/marketstats/genesis.js +63 -0
- package/lib/codec/Switcheo/carbon/marketstats/marketstats.d.ts +31 -0
- package/lib/codec/Switcheo/carbon/marketstats/marketstats.js +258 -0
- package/lib/codec/Switcheo/carbon/marketstats/params.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/marketstats/params.js +46 -0
- package/lib/codec/Switcheo/carbon/marketstats/query.d.ts +66 -0
- package/lib/codec/Switcheo/carbon/marketstats/query.js +195 -0
- package/lib/codec/Switcheo/carbon/marketstats/tx.d.ts +12 -0
- package/lib/codec/Switcheo/carbon/marketstats/tx.js +20 -0
- package/lib/codec/Switcheo/carbon/misc/block.d.ts +21 -0
- package/lib/codec/Switcheo/carbon/misc/block.js +105 -0
- package/lib/codec/Switcheo/carbon/misc/export.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/misc/export.js +29 -0
- package/lib/codec/Switcheo/carbon/misc/message.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/misc/message.js +128 -0
- package/lib/codec/Switcheo/carbon/misc/message_type.d.ts +18 -0
- package/lib/codec/Switcheo/carbon/misc/message_type.js +60 -0
- package/lib/codec/Switcheo/carbon/misc/query.d.ts +192 -0
- package/lib/codec/Switcheo/carbon/misc/query.js +884 -0
- package/lib/codec/Switcheo/carbon/misc/trade.d.ts +28 -0
- package/lib/codec/Switcheo/carbon/misc/trade.js +224 -0
- package/lib/codec/Switcheo/carbon/misc/transaction.d.ts +45 -0
- package/lib/codec/Switcheo/carbon/misc/transaction.js +369 -0
- package/lib/codec/Switcheo/carbon/oracle/event.d.ts +37 -0
- package/lib/codec/Switcheo/carbon/oracle/event.js +228 -0
- package/lib/codec/Switcheo/carbon/oracle/export.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/oracle/export.js +58 -0
- package/lib/codec/Switcheo/carbon/oracle/genesis.d.ts +28 -0
- package/lib/codec/Switcheo/carbon/oracle/genesis.js +141 -0
- package/lib/codec/Switcheo/carbon/oracle/oracle.d.ts +94 -0
- package/lib/codec/Switcheo/carbon/oracle/oracle.js +650 -0
- package/lib/codec/Switcheo/carbon/oracle/proposal.d.ts +21 -0
- package/lib/codec/Switcheo/carbon/oracle/proposal.js +91 -0
- package/lib/codec/Switcheo/carbon/oracle/query.d.ts +336 -0
- package/lib/codec/Switcheo/carbon/oracle/query.js +1551 -0
- package/lib/codec/Switcheo/carbon/oracle/slashing.d.ts +33 -0
- package/lib/codec/Switcheo/carbon/oracle/slashing.js +191 -0
- package/lib/codec/Switcheo/carbon/oracle/tx.d.ts +169 -0
- package/lib/codec/Switcheo/carbon/oracle/tx.js +877 -0
- package/lib/codec/Switcheo/carbon/order/event.d.ts +23 -0
- package/lib/codec/Switcheo/carbon/order/event.js +146 -0
- package/lib/codec/Switcheo/carbon/order/export.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/order/export.js +39 -0
- package/lib/codec/Switcheo/carbon/order/genesis.d.ts +62 -0
- package/lib/codec/Switcheo/carbon/order/genesis.js +322 -0
- package/lib/codec/Switcheo/carbon/order/order.d.ts +113 -0
- package/lib/codec/Switcheo/carbon/order/order.js +875 -0
- package/lib/codec/Switcheo/carbon/order/query.d.ts +143 -0
- package/lib/codec/Switcheo/carbon/order/query.js +596 -0
- package/lib/codec/Switcheo/carbon/order/tx.d.ts +146 -0
- package/lib/codec/Switcheo/carbon/order/tx.js +715 -0
- package/lib/codec/Switcheo/carbon/perpspool/event.d.ts +95 -0
- package/lib/codec/Switcheo/carbon/perpspool/event.js +561 -0
- package/lib/codec/Switcheo/carbon/perpspool/export.d.ts +7 -0
- package/lib/codec/Switcheo/carbon/perpspool/export.js +68 -0
- package/lib/codec/Switcheo/carbon/perpspool/genesis.d.ts +61 -0
- package/lib/codec/Switcheo/carbon/perpspool/genesis.js +343 -0
- package/lib/codec/Switcheo/carbon/perpspool/market.d.ts +96 -0
- package/lib/codec/Switcheo/carbon/perpspool/market.js +493 -0
- package/lib/codec/Switcheo/carbon/perpspool/params.d.ts +30 -0
- package/lib/codec/Switcheo/carbon/perpspool/params.js +189 -0
- package/lib/codec/Switcheo/carbon/perpspool/pool.d.ts +103 -0
- package/lib/codec/Switcheo/carbon/perpspool/pool.js +638 -0
- package/lib/codec/Switcheo/carbon/perpspool/query.d.ts +247 -0
- package/lib/codec/Switcheo/carbon/perpspool/query.js +1141 -0
- package/lib/codec/Switcheo/carbon/perpspool/tx.d.ts +229 -0
- package/lib/codec/Switcheo/carbon/perpspool/tx.js +1144 -0
- package/lib/codec/Switcheo/carbon/position/event.d.ts +26 -0
- package/lib/codec/Switcheo/carbon/position/event.js +180 -0
- package/lib/codec/Switcheo/carbon/position/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/position/export.js +20 -0
- package/lib/codec/Switcheo/carbon/position/genesis.d.ts +24 -0
- package/lib/codec/Switcheo/carbon/position/genesis.js +64 -0
- package/lib/codec/Switcheo/carbon/position/position.d.ts +74 -0
- package/lib/codec/Switcheo/carbon/position/position.js +601 -0
- package/lib/codec/Switcheo/carbon/position/query.d.ts +92 -0
- package/lib/codec/Switcheo/carbon/position/query.js +400 -0
- package/lib/codec/Switcheo/carbon/position/tx.d.ts +42 -0
- package/lib/codec/Switcheo/carbon/position/tx.js +127 -0
- package/lib/codec/Switcheo/carbon/pricing/event.d.ts +74 -0
- package/lib/codec/Switcheo/carbon/pricing/event.js +361 -0
- package/lib/codec/Switcheo/carbon/pricing/export.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/pricing/export.js +45 -0
- package/lib/codec/Switcheo/carbon/pricing/genesis.d.ts +26 -0
- package/lib/codec/Switcheo/carbon/pricing/genesis.js +95 -0
- package/lib/codec/Switcheo/carbon/pricing/legacy.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/pricing/legacy.js +93 -0
- package/lib/codec/Switcheo/carbon/pricing/pricing.d.ts +60 -0
- package/lib/codec/Switcheo/carbon/pricing/pricing.js +456 -0
- package/lib/codec/Switcheo/carbon/pricing/proposal.d.ts +31 -0
- package/lib/codec/Switcheo/carbon/pricing/proposal.js +148 -0
- package/lib/codec/Switcheo/carbon/pricing/query.d.ts +183 -0
- package/lib/codec/Switcheo/carbon/pricing/query.js +759 -0
- package/lib/codec/Switcheo/carbon/pricing/tx.d.ts +131 -0
- package/lib/codec/Switcheo/carbon/pricing/tx.js +529 -0
- package/lib/codec/Switcheo/carbon/profile/event.d.ts +20 -0
- package/lib/codec/Switcheo/carbon/profile/event.js +78 -0
- package/lib/codec/Switcheo/carbon/profile/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/profile/export.js +17 -0
- package/lib/codec/Switcheo/carbon/profile/genesis.d.ts +24 -0
- package/lib/codec/Switcheo/carbon/profile/genesis.js +64 -0
- package/lib/codec/Switcheo/carbon/profile/profile.d.ts +20 -0
- package/lib/codec/Switcheo/carbon/profile/profile.js +83 -0
- package/lib/codec/Switcheo/carbon/profile/query.d.ts +92 -0
- package/lib/codec/Switcheo/carbon/profile/query.js +360 -0
- package/lib/codec/Switcheo/carbon/profile/tx.d.ts +43 -0
- package/lib/codec/Switcheo/carbon/profile/tx.js +127 -0
- package/lib/codec/Switcheo/carbon/sequence/export.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/sequence/export.js +13 -0
- package/lib/codec/Switcheo/carbon/sequence/genesis.d.ts +30 -0
- package/lib/codec/Switcheo/carbon/sequence/genesis.js +122 -0
- package/lib/codec/Switcheo/carbon/sequence/query.d.ts +63 -0
- package/lib/codec/Switcheo/carbon/sequence/query.js +208 -0
- package/lib/codec/Switcheo/carbon/sequence/tx.d.ts +41 -0
- package/lib/codec/Switcheo/carbon/sequence/tx.js +148 -0
- package/lib/codec/Switcheo/carbon/subaccount/export.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/subaccount/export.js +35 -0
- package/lib/codec/Switcheo/carbon/subaccount/genesis.d.ts +28 -0
- package/lib/codec/Switcheo/carbon/subaccount/genesis.js +110 -0
- package/lib/codec/Switcheo/carbon/subaccount/legacy.d.ts +19 -0
- package/lib/codec/Switcheo/carbon/subaccount/legacy.js +72 -0
- package/lib/codec/Switcheo/carbon/subaccount/query.d.ts +229 -0
- package/lib/codec/Switcheo/carbon/subaccount/query.js +1026 -0
- package/lib/codec/Switcheo/carbon/subaccount/subaccount.d.ts +57 -0
- package/lib/codec/Switcheo/carbon/subaccount/subaccount.js +349 -0
- package/lib/codec/Switcheo/carbon/subaccount/tx.d.ts +92 -0
- package/lib/codec/Switcheo/carbon/subaccount/tx.js +395 -0
- package/lib/codec/adl/genesis.d.ts +3 -3
- package/lib/codec/admin/genesis.d.ts +3 -3
- package/lib/codec/admin/query.d.ts +6 -6
- package/lib/codec/admin/tx.d.ts +6 -6
- package/lib/codec/alliance/alliance.d.ts +5 -5
- package/lib/codec/alliance/delegations.d.ts +8 -8
- package/lib/codec/alliance/events.d.ts +6 -6
- package/lib/codec/alliance/genesis.d.ts +7 -7
- package/lib/codec/alliance/gov.d.ts +5 -5
- package/lib/codec/alliance/params.d.ts +4 -4
- package/lib/codec/alliance/query.d.ts +24 -24
- package/lib/codec/alliance/tx.d.ts +10 -10
- package/lib/codec/bank/event.d.ts +7 -7
- package/lib/codec/bank/genesis.d.ts +3 -3
- package/lib/codec/bank/query.d.ts +6 -6
- package/lib/codec/book/book.d.ts +6 -6
- package/lib/codec/book/event.d.ts +3 -3
- package/lib/codec/book/genesis.d.ts +3 -3
- package/lib/codec/book/legacy.d.ts +3 -3
- package/lib/codec/book/query.d.ts +12 -12
- package/lib/codec/broker/amm.d.ts +5 -5
- package/lib/codec/broker/candlestick.d.ts +3 -3
- package/lib/codec/broker/event.d.ts +4 -4
- package/lib/codec/broker/genesis.d.ts +3 -3
- package/lib/codec/broker/incoming_liquidations.d.ts +3 -3
- package/lib/codec/broker/incoming_pool_swap.d.ts +23 -0
- package/lib/codec/broker/incoming_pool_swap.js +136 -0
- package/lib/codec/broker/pagination.d.ts +3 -3
- package/lib/codec/broker/query.d.ts +8 -8
- package/lib/codec/broker/tx.d.ts +5 -5
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +3 -3
- package/lib/codec/btcx/denom_info.d.ts +3 -3
- package/lib/codec/btcx/genesis.d.ts +3 -3
- package/lib/codec/btcx/query.d.ts +6 -6
- package/lib/codec/btcx/tx.d.ts +8 -8
- package/lib/codec/carbon-models.d.ts +26 -26
- package/lib/codec/carbon-models.js +27 -31
- package/lib/codec/ccm/ccm.d.ts +3 -3
- package/lib/codec/ccm/genesis.d.ts +7 -7
- package/lib/codec/ccm/query.d.ts +4 -4
- package/lib/codec/ccm/tx.d.ts +8 -8
- package/lib/codec/cdp/asset_params.d.ts +5 -5
- package/lib/codec/cdp/cdp_liquidations.d.ts +3 -3
- package/lib/codec/cdp/debt_info.d.ts +3 -3
- package/lib/codec/cdp/e_mode_category.d.ts +3 -3
- package/lib/codec/cdp/event.d.ts +36 -36
- package/lib/codec/cdp/genesis.d.ts +10 -10
- package/lib/codec/cdp/params.d.ts +3 -3
- package/lib/codec/cdp/query.d.ts +53 -53
- package/lib/codec/cdp/rate_strategy_params.d.ts +3 -3
- package/lib/codec/cdp/reward_scheme.d.ts +6 -6
- package/lib/codec/cdp/stablecoin_debt_info.d.ts +3 -3
- package/lib/codec/cdp/stablecoin_interest_info.d.ts +3 -3
- package/lib/codec/cdp/tx.d.ts +87 -87
- package/lib/codec/coin/bridge.d.ts +3 -3
- package/lib/codec/coin/event.d.ts +14 -14
- package/lib/codec/coin/genesis.d.ts +4 -4
- package/lib/codec/coin/group.d.ts +5 -5
- package/lib/codec/coin/proposal.d.ts +3 -3
- package/lib/codec/coin/query.d.ts +26 -26
- package/lib/codec/coin/token.d.ts +9 -9
- package/lib/codec/coin/tx.d.ts +48 -48
- package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +3 -3
- package/lib/codec/cosmos/app/v1alpha1/config.d.ts +4 -4
- package/lib/codec/cosmos/app/v1alpha1/module.d.ts +5 -5
- package/lib/codec/cosmos/app/v1alpha1/query.d.ts +4 -4
- package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +5 -5
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +20 -20
- package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +6 -6
- package/lib/codec/cosmos/authz/v1beta1/event.d.ts +4 -4
- package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +8 -8
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +3 -3
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +9 -9
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +21 -21
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +6 -6
- package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +12 -12
- package/lib/codec/cosmos/base/kv/v1beta1/kv.d.ts +4 -4
- package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +4 -4
- package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +4 -4
- package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +6 -6
- package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +28 -28
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +11 -11
- package/lib/codec/cosmos/base/store/v1beta1/commit_info.d.ts +5 -5
- package/lib/codec/cosmos/base/store/v1beta1/listening.d.ts +5 -5
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +21 -21
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +4 -4
- package/lib/codec/cosmos/base/v1beta1/coin.d.ts +6 -6
- package/lib/codec/cosmos/capability/v1beta1/capability.d.ts +5 -5
- package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +4 -4
- package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +3 -3
- package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +7 -7
- package/lib/codec/cosmos/crypto/multisig/keys.d.ts +3 -3
- package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +4 -4
- package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +4 -4
- package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +4 -4
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +14 -14
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +10 -10
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +22 -22
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +10 -10
- package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +3 -3
- package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +6 -6
- package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +6 -6
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +6 -6
- package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/gov/v1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/gov/v1/gov.d.ts +10 -10
- package/lib/codec/cosmos/gov/v1/query.d.ts +18 -18
- package/lib/codec/cosmos/gov/v1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1/tx.d.ts +12 -12
- package/lib/codec/cosmos/gov/v1/tx.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +11 -11
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +18 -18
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +10 -10
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/group/v1/events.d.ts +11 -11
- package/lib/codec/cosmos/group/v1/events.js +2 -2
- package/lib/codec/cosmos/group/v1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/group/v1/query.d.ts +30 -30
- package/lib/codec/cosmos/group/v1/tx.d.ts +30 -30
- package/lib/codec/cosmos/group/v1/tx.js +4 -4
- package/lib/codec/cosmos/group/v1/types.d.ts +13 -13
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +4 -4
- package/lib/codec/cosmos/mint/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/nft/v1beta1/event.d.ts +5 -5
- package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +4 -4
- package/lib/codec/cosmos/nft/v1beta1/query.d.ts +16 -16
- package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +3 -3
- package/lib/codec/cosmos/orm/v1/orm.d.ts +6 -6
- package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +4 -4
- package/lib/codec/cosmos/params/v1beta1/params.d.ts +4 -4
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +7 -7
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +6 -6
- package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +4 -4
- package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +4 -4
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +30 -30
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +22 -22
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +14 -14
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +7 -7
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +12 -12
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +15 -15
- package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +12 -12
- package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +6 -6
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +6 -6
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +8 -8
- package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +8 -8
- package/lib/codec/cosmos-models.js +1 -5
- package/lib/codec/crisis/genesis.d.ts +18 -0
- package/lib/codec/crisis/genesis.js +46 -0
- package/lib/codec/crisis/query.d.ts +43 -0
- package/lib/codec/crisis/query.js +103 -0
- package/lib/codec/crisis/tx.d.ts +12 -0
- package/lib/codec/crisis/tx.js +20 -0
- package/lib/codec/erc20/erc20.d.ts +3 -3
- package/lib/codec/erc20/events.d.ts +6 -6
- package/lib/codec/erc20/genesis.d.ts +4 -4
- package/lib/codec/erc20/query.d.ts +8 -8
- package/lib/codec/erc20/tx.d.ts +16 -16
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +4 -4
- package/lib/codec/ethermint/evm/v1/events.d.ts +6 -6
- package/lib/codec/ethermint/evm/v1/evm.d.ts +10 -10
- package/lib/codec/ethermint/evm/v1/export.d.ts +1 -2
- package/lib/codec/ethermint/evm/v1/export.js +1 -8
- package/lib/codec/ethermint/evm/v1/genesis.d.ts +4 -4
- package/lib/codec/ethermint/evm/v1/query.d.ts +26 -26
- package/lib/codec/ethermint/evm/v1/tx.d.ts +9 -45
- package/lib/codec/ethermint/evm/v1/tx.js +1 -100
- package/lib/codec/ethermint/feemarket/v1/events.d.ts +4 -4
- package/lib/codec/ethermint/feemarket/v1/export.d.ts +0 -2
- package/lib/codec/ethermint/feemarket/v1/export.js +1 -7
- package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +3 -13
- package/lib/codec/ethermint/feemarket/v1/feemarket.js +1 -28
- package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +3 -3
- package/lib/codec/ethermint/feemarket/v1/query.d.ts +8 -8
- package/lib/codec/ethermint/feemarket/v1/tx.d.ts +4 -4
- package/lib/codec/ethermint/types/v1/account.d.ts +3 -3
- package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +3 -3
- package/lib/codec/ethermint/types/v1/indexer.d.ts +3 -3
- package/lib/codec/ethermint/types/v1/web3.d.ts +3 -3
- package/lib/codec/ethermint-models.js +1 -5
- package/lib/codec/evmbank/genesis.d.ts +4 -4
- package/lib/codec/evmbank/query.d.ts +4 -4
- package/lib/codec/evmcontract/genesis.d.ts +3 -3
- package/lib/codec/evmmerge/address.d.ts +3 -3
- package/lib/codec/evmmerge/event.d.ts +3 -3
- package/lib/codec/evmmerge/genesis.d.ts +5 -5
- package/lib/codec/evmmerge/offchain.d.ts +3 -3
- package/lib/codec/evmmerge/query.d.ts +6 -6
- package/lib/codec/evmmerge/tx.d.ts +4 -4
- package/lib/codec/fee/event.d.ts +3 -3
- package/lib/codec/fee/fee.d.ts +5 -5
- package/lib/codec/fee/genesis.d.ts +3 -3
- package/lib/codec/fee/proposal.d.ts +6 -6
- package/lib/codec/fee/query.d.ts +10 -10
- package/lib/codec/fee/tx.d.ts +10 -10
- package/lib/codec/google/protobuf/any.d.ts +3 -3
- package/lib/codec/google/protobuf/duration.d.ts +3 -3
- package/lib/codec/google/protobuf/timestamp.d.ts +3 -3
- package/lib/codec/google/protobuf/wrappers.d.ts +11 -11
- package/lib/codec/headersync/consensus_peers.d.ts +7 -7
- package/lib/codec/headersync/genesis.d.ts +7 -7
- package/lib/codec/headersync/query.d.ts +6 -6
- package/lib/codec/headersync/tx.d.ts +6 -6
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +3 -3
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +6 -6
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +7 -7
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +3 -3
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +22 -22
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +10 -10
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.d.ts +1 -2
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.js +1 -8
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +4 -30
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.js +1 -113
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +6 -6
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +7 -7
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +4 -4
- package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.d.ts +1 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.js +6 -1
- package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.d.ts +76 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.js +424 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/v1/packet.d.ts +4 -4
- package/lib/codec/ibc/applications/transfer/v1/export.d.ts +1 -1
- package/lib/codec/ibc/applications/transfer/v1/export.js +1 -3
- package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +3 -3
- package/lib/codec/ibc/applications/transfer/v1/query.d.ts +11 -40
- package/lib/codec/ibc/applications/transfer/v1/query.js +1 -110
- package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +4 -4
- package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +8 -12
- package/lib/codec/ibc/applications/transfer/v1/tx.js +6 -35
- package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +3 -5
- package/lib/codec/ibc/applications/transfer/v2/packet.js +1 -14
- package/lib/codec/ibc/core/channel/v1/channel.d.ts +8 -28
- package/lib/codec/ibc/core/channel/v1/channel.js +1 -78
- package/lib/codec/ibc/core/channel/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/channel/v1/export.js +2 -3
- package/lib/codec/ibc/core/channel/v1/genesis.d.ts +4 -4
- package/lib/codec/ibc/core/channel/v1/query.d.ts +28 -28
- package/lib/codec/ibc/core/channel/v1/tx.d.ts +34 -37
- package/lib/codec/ibc/core/channel/v1/tx.js +25 -50
- package/lib/codec/ibc/core/client/v1/client.d.ts +9 -9
- package/lib/codec/ibc/core/client/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/client/v1/export.js +1 -3
- package/lib/codec/ibc/core/client/v1/genesis.d.ts +5 -5
- package/lib/codec/ibc/core/client/v1/query.d.ts +19 -56
- package/lib/codec/ibc/core/client/v1/query.js +1 -137
- package/lib/codec/ibc/core/client/v1/tx.d.ts +10 -10
- package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +6 -6
- package/lib/codec/ibc/core/connection/v1/connection.d.ts +9 -9
- package/lib/codec/ibc/core/connection/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/connection/v1/export.js +1 -3
- package/lib/codec/ibc/core/connection/v1/genesis.d.ts +3 -3
- package/lib/codec/ibc/core/connection/v1/query.d.ts +13 -38
- package/lib/codec/ibc/core/connection/v1/query.js +1 -87
- package/lib/codec/ibc/core/connection/v1/tx.d.ts +12 -13
- package/lib/codec/ibc/core/types/v1/genesis.d.ts +3 -3
- package/lib/codec/ibc/lightclients/localhost/v1/localhost.d.ts +3 -3
- package/lib/codec/ibc/lightclients/solomachine/v1/solomachine.d.ts +18 -18
- package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.d.ts +18 -18
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +11 -13
- package/lib/codec/ibc-models.js +1 -5
- package/lib/codec/index.d.ts +164 -173
- package/lib/codec/index.js +11974 -12592
- package/lib/codec/inflation/genesis.d.ts +3 -3
- package/lib/codec/inflation/inflation.d.ts +3 -3
- package/lib/codec/inflation/query.d.ts +4 -4
- package/lib/codec/insurance/event.d.ts +3 -3
- package/lib/codec/insurance/fund.d.ts +4 -4
- package/lib/codec/insurance/genesis.d.ts +3 -3
- package/lib/codec/insurance/query.d.ts +4 -4
- package/lib/codec/insurance/tx.d.ts +4 -4
- package/lib/codec/leverage/event.d.ts +3 -3
- package/lib/codec/leverage/genesis.d.ts +3 -3
- package/lib/codec/leverage/leverage.d.ts +4 -4
- package/lib/codec/leverage/query.d.ts +6 -6
- package/lib/codec/leverage/tx.d.ts +4 -4
- package/lib/codec/liquidation/genesis.d.ts +4 -4
- package/lib/codec/liquidation/liquidation.d.ts +3 -3
- package/lib/codec/liquidation/outstanding_position.d.ts +4 -4
- package/lib/codec/liquidation/query.d.ts +6 -6
- package/lib/codec/liquidation/quote_changes.d.ts +3 -3
- package/lib/codec/liquiditypool/event.d.ts +15 -15
- package/lib/codec/liquiditypool/genesis.d.ts +3 -3
- package/lib/codec/liquiditypool/liquiditypool.d.ts +12 -12
- package/lib/codec/liquiditypool/proposal.d.ts +11 -11
- package/lib/codec/liquiditypool/query.d.ts +31 -31
- package/lib/codec/liquiditypool/reward.d.ts +18 -18
- package/lib/codec/liquiditypool/tx.d.ts +39 -39
- package/lib/codec/lockproxy/event.d.ts +4 -4
- package/lib/codec/lockproxy/genesis.d.ts +6 -6
- package/lib/codec/lockproxy/lockproxy.d.ts +3 -3
- package/lib/codec/lockproxy/query.d.ts +6 -6
- package/lib/codec/lockproxy/tx.d.ts +12 -12
- package/lib/codec/market/event.d.ts +3 -3
- package/lib/codec/market/fee.d.ts +7 -7
- package/lib/codec/market/genesis.d.ts +3 -3
- package/lib/codec/market/legacy.d.ts +62 -0
- package/lib/codec/market/legacy.js +630 -0
- package/lib/codec/market/market.d.ts +7 -7
- package/lib/codec/market/proposal.d.ts +5 -5
- package/lib/codec/market/query.d.ts +20 -20
- package/lib/codec/market/tx.d.ts +21 -21
- package/lib/codec/marketstats/genesis.d.ts +3 -3
- package/lib/codec/marketstats/marketstats.d.ts +3 -3
- package/lib/codec/marketstats/params.d.ts +3 -3
- package/lib/codec/marketstats/query.d.ts +6 -6
- package/lib/codec/misc/block.d.ts +3 -3
- package/lib/codec/misc/message.d.ts +3 -3
- package/lib/codec/misc/message_type.d.ts +3 -3
- package/lib/codec/misc/query.d.ts +16 -16
- package/lib/codec/misc/trade.d.ts +3 -3
- package/lib/codec/misc/transaction.d.ts +4 -4
- package/lib/codec/oracle/event.d.ts +4 -4
- package/lib/codec/oracle/genesis.d.ts +3 -3
- package/lib/codec/oracle/oracle.d.ts +8 -8
- package/lib/codec/oracle/proposal.d.ts +3 -3
- package/lib/codec/oracle/query.d.ts +28 -28
- package/lib/codec/oracle/slashing.d.ts +4 -4
- package/lib/codec/oracle/tx.d.ts +14 -14
- package/lib/codec/order/event.d.ts +3 -3
- package/lib/codec/order/genesis.d.ts +6 -6
- package/lib/codec/order/order.d.ts +9 -9
- package/lib/codec/order/query.d.ts +12 -12
- package/lib/codec/order/tx.d.ts +12 -12
- package/lib/codec/perpspool/event.d.ts +9 -9
- package/lib/codec/perpspool/genesis.d.ts +6 -6
- package/lib/codec/perpspool/market.d.ts +8 -8
- package/lib/codec/perpspool/params.d.ts +3 -3
- package/lib/codec/perpspool/pool.d.ts +8 -8
- package/lib/codec/perpspool/query.d.ts +20 -20
- package/lib/codec/perpspool/tx.d.ts +18 -18
- package/lib/codec/polynetwork-models.d.ts +4 -4
- package/lib/codec/polynetwork-models.js +5 -9
- package/lib/codec/position/event.d.ts +3 -3
- package/lib/codec/position/genesis.d.ts +3 -3
- package/lib/codec/position/position.d.ts +6 -6
- package/lib/codec/position/query.d.ts +8 -8
- package/lib/codec/position/tx.d.ts +4 -4
- package/lib/codec/pricing/event.d.ts +8 -8
- package/lib/codec/pricing/genesis.d.ts +3 -3
- package/lib/codec/pricing/legacy.d.ts +3 -3
- package/lib/codec/pricing/pricing.d.ts +5 -5
- package/lib/codec/pricing/proposal.d.ts +4 -4
- package/lib/codec/pricing/query.d.ts +16 -16
- package/lib/codec/pricing/tx.d.ts +12 -12
- package/lib/codec/profile/event.d.ts +3 -3
- package/lib/codec/profile/genesis.d.ts +3 -3
- package/lib/codec/profile/profile.d.ts +3 -3
- package/lib/codec/profile/query.d.ts +8 -8
- package/lib/codec/profile/tx.d.ts +4 -4
- package/lib/codec/proofs.d.ts +15 -16
- package/lib/codec/proofs.js +0 -6
- package/lib/codec/query/pagination.d.ts +29 -0
- package/lib/codec/query/pagination.js +126 -0
- package/lib/codec/sequence/genesis.d.ts +4 -4
- package/lib/codec/sequence/query.d.ts +6 -6
- package/lib/codec/sequence/tx.d.ts +4 -4
- package/lib/codec/subaccount/export.d.ts +1 -1
- package/lib/codec/subaccount/export.js +3 -1
- package/lib/codec/subaccount/genesis.d.ts +3 -3
- package/lib/codec/subaccount/legacy.d.ts +3 -3
- package/lib/codec/subaccount/query.d.ts +42 -17
- package/lib/codec/subaccount/query.js +115 -1
- package/lib/codec/subaccount/subaccount.d.ts +6 -6
- package/lib/codec/subaccount/tx.d.ts +8 -8
- package/lib/codec/tendermint/abci/types.d.ts +46 -46
- package/lib/codec/tendermint/crypto/keys.d.ts +3 -3
- package/lib/codec/tendermint/crypto/proof.d.ts +7 -7
- package/lib/codec/tendermint/libs/bits/types.d.ts +3 -3
- package/lib/codec/tendermint/p2p/types.d.ts +6 -6
- package/lib/codec/tendermint/types/block.d.ts +3 -3
- package/lib/codec/tendermint/types/evidence.d.ts +6 -6
- package/lib/codec/tendermint/types/params.d.ts +8 -8
- package/lib/codec/tendermint/types/types.d.ts +15 -15
- package/lib/codec/tendermint/types/validator.d.ts +5 -5
- package/lib/codec/tendermint/version/types.d.ts +4 -4
- package/lib/constant/address.d.ts +1 -1
- package/lib/constant/generic.js +1 -1
- package/lib/constant/ibc.d.ts +4 -4
- package/lib/constant/ibc.js +1 -5
- package/lib/constant/index.js +1 -5
- package/lib/constant/node.d.ts +1 -1
- package/lib/constant/token.d.ts +0 -1
- package/lib/eth/index.js +1 -5
- package/lib/hydrogen/index.js +1 -5
- package/lib/hydrogen/transfer.d.ts +2 -2
- package/lib/index.js +1 -5
- package/lib/insights/balance.d.ts +3 -3
- package/lib/insights/common.d.ts +1 -1
- package/lib/insights/index.js +1 -5
- package/lib/insights/position.d.ts +1 -1
- package/lib/modules/broker.js +1 -1
- package/lib/modules/cdp.d.ts +1 -1
- package/lib/modules/cdp.js +49 -50
- package/lib/modules/coin.js +1 -1
- package/lib/modules/cosmwasm.d.ts +2 -2
- package/lib/modules/cosmwasm.js +4 -4
- package/lib/modules/evm.d.ts +1 -2
- package/lib/modules/evm.js +7 -49
- package/lib/modules/gov.d.ts +1 -1
- package/lib/modules/gov.js +18 -18
- package/lib/modules/ibc.d.ts +1 -1
- package/lib/modules/index.d.ts +0 -1
- package/lib/modules/index.js +1 -6
- package/lib/modules/leverage.js +1 -1
- package/lib/modules/liquiditypool.js +1 -1
- package/lib/modules/market.js +1 -1
- package/lib/modules/oracle.js +1 -1
- package/lib/modules/order.js +3 -3
- package/lib/modules/position.js +1 -1
- package/lib/modules/profile.js +1 -1
- package/lib/modules/subaccount.d.ts +7 -1
- package/lib/modules/subaccount.js +8 -2
- package/lib/modules/vault.d.ts +56 -0
- package/lib/modules/vault.js +128 -0
- package/lib/modules/xchain.js +2 -2
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.d.ts +1 -1
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/EthLedgerAccount/index.js +1 -5
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.js +1 -5
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.d.ts +2 -2
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +4 -8
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/index.js +1 -5
- package/lib/provider/account/index.js +1 -5
- package/lib/provider/amino/types/admin.js +28 -32
- package/lib/provider/amino/types/bank.js +2 -6
- package/lib/provider/amino/types/broker.js +2 -6
- package/lib/provider/amino/types/cdp.js +27 -31
- package/lib/provider/amino/types/coin.js +5 -9
- package/lib/provider/amino/types/erc20.js +3 -7
- package/lib/provider/amino/types/evm.js +2 -12
- package/lib/provider/amino/types/evmmerge.js +2 -6
- package/lib/provider/amino/types/feemarket.js +2 -6
- package/lib/provider/amino/types/gov.js +6 -10
- package/lib/provider/amino/types/ibc.js +2 -6
- package/lib/provider/amino/types/leverage.js +2 -6
- package/lib/provider/amino/types/liquidityPool.js +8 -12
- package/lib/provider/amino/types/market.js +7 -11
- package/lib/provider/amino/types/oracle.js +3 -7
- package/lib/provider/amino/types/order.js +5 -9
- package/lib/provider/amino/types/perpspool.js +7 -11
- package/lib/provider/amino/types/position.js +2 -6
- package/lib/provider/amino/types/profile.js +2 -6
- package/lib/provider/amino/types/staking.js +5 -9
- package/lib/provider/amino/types/subaccount.js +4 -8
- package/lib/provider/amino/utils.d.ts +2 -2
- package/lib/provider/amino/utils.js +11 -11
- package/lib/provider/keplr/KeplrAccount.js +6 -6
- package/lib/provider/leap/LeapAccount.js +2 -2
- package/lib/provider/ledger/ledger.js +6 -9
- package/lib/provider/metamask/MetaMask.d.ts +1 -1
- package/lib/provider/metamask/MetaMask.js +24 -28
- package/lib/provider/metamask/error.d.ts +1 -1
- package/lib/provider/o3/O3Types.d.ts +1 -1
- package/lib/provider/o3/O3Wallet.js +11 -15
- package/lib/provider/o3/index.js +1 -5
- package/lib/provider/station/StationAccount.d.ts +28 -0
- package/lib/provider/station/StationAccount.js +168 -0
- package/lib/provider/station/index.d.ts +2 -0
- package/lib/provider/station/index.js +10 -0
- package/lib/provider/zilpay/Zilpay.js +4 -4
- package/lib/provider/zilpay/index.js +1 -5
- package/lib/util/address.d.ts +6 -6
- package/lib/util/address.js +16 -20
- package/lib/util/api.d.ts +3 -3
- package/lib/util/api.js +4 -4
- package/lib/util/blockchain.d.ts +7 -7
- package/lib/util/blockchain.js +4 -4
- package/lib/util/eip712.js +3 -3
- package/lib/util/external.d.ts +1 -1
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.d.ts +5 -6
- package/lib/util/generic.js +4 -4
- package/lib/util/gov.d.ts +1 -1
- package/lib/util/index.js +1 -5
- package/lib/util/legacyEIP712.d.ts +2 -2
- package/lib/util/legacyEIP712.js +2 -2
- package/lib/util/network.js +3 -3
- package/lib/util/number.d.ts +4 -4
- package/lib/util/number.js +5 -5
- package/lib/util/tx.d.ts +155 -171
- package/lib/util/tx.js +1 -5
- package/lib/util/type.d.ts +1 -1
- package/lib/wallet/CarbonSigner.d.ts +5 -5
- package/lib/wallet/CarbonSigner.js +6 -6
- package/lib/wallet/CarbonSigningClient.d.ts +2 -2
- package/lib/wallet/CarbonSigningClient.js +15 -15
- package/lib/wallet/CarbonWallet.d.ts +5 -5
- package/lib/wallet/CarbonWallet.js +13 -13
- package/lib/wallet/index.js +1 -5
- package/lib/websocket/connector.js +4 -8
- package/lib/websocket/index.js +1 -5
- package/lib/websocket/types.d.ts +1 -1
- package/package.json +3 -3
- package/lib/modules/test.d.ts +0 -0
- package/lib/modules/test.js +0 -1
package/lib/CarbonSDK.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Network, NetworkConfig, Network as _Network } from "./constant";
|
|
3
|
-
import {
|
|
3
|
+
import { Tendermint37Client } from "@cosmjs/tendermint-rpc";
|
|
4
4
|
import * as clients from "./clients";
|
|
5
5
|
import { CarbonQueryClient, ETHClient, HydrogenClient, InsightsQueryClient, NEOClient, TokenClient, ZILClient } from "./clients";
|
|
6
6
|
import GrpcQueryClient from "./clients/GrpcQueryClient";
|
|
7
7
|
import N3Client from "./clients/N3Client";
|
|
8
|
-
import { AdminModule, AllianceModule, BankModule, BrokerModule, CDPModule, CoinModule, ERC20Module, EvmMergeModule, EvmModule, FeeModule,
|
|
8
|
+
import { AdminModule, AllianceModule, BankModule, BrokerModule, CDPModule, CoinModule, ERC20Module, EvmMergeModule, EvmModule, FeeModule, GovModule, IBCModule, LeverageModule, LiquidityPoolModule, MarketModule, OracleModule, OrderModule, PerpspoolModule, PositionModule, ProfileModule, SubAccountModule, XChainModule } from "./modules";
|
|
9
9
|
import { StakingModule } from "./modules/staking";
|
|
10
10
|
import { CosmosLedger, Keplr, LeapExtended } from "./provider";
|
|
11
11
|
import { MetaMask } from "./provider/metamask/MetaMask";
|
|
@@ -16,7 +16,7 @@ export { DenomPrefix } from "./constant";
|
|
|
16
16
|
export * as Carbon from "./codec/carbon-models";
|
|
17
17
|
export interface CarbonSDKOpts {
|
|
18
18
|
network: Network;
|
|
19
|
-
tmClient:
|
|
19
|
+
tmClient: Tendermint37Client;
|
|
20
20
|
wallet?: CarbonWallet;
|
|
21
21
|
chainId?: string;
|
|
22
22
|
evmChainId?: string;
|
|
@@ -31,7 +31,7 @@ export interface CarbonSDKOpts {
|
|
|
31
31
|
}
|
|
32
32
|
export interface CarbonSDKInitOpts {
|
|
33
33
|
network: Network;
|
|
34
|
-
tmClient?:
|
|
34
|
+
tmClient?: Tendermint37Client;
|
|
35
35
|
config?: Partial<NetworkConfig>;
|
|
36
36
|
wallet?: CarbonWallet;
|
|
37
37
|
skipInit?: boolean;
|
|
@@ -61,7 +61,7 @@ declare class CarbonSDK {
|
|
|
61
61
|
network: Network;
|
|
62
62
|
configOverride: Partial<NetworkConfig>;
|
|
63
63
|
networkConfig: NetworkConfig;
|
|
64
|
-
tmClient:
|
|
64
|
+
tmClient: Tendermint37Client;
|
|
65
65
|
token: TokenClient;
|
|
66
66
|
admin: AdminModule;
|
|
67
67
|
alliance: AllianceModule;
|
|
@@ -86,7 +86,6 @@ declare class CarbonSDK {
|
|
|
86
86
|
xchain: XChainModule;
|
|
87
87
|
evm: EvmModule;
|
|
88
88
|
evmmerge: EvmMergeModule;
|
|
89
|
-
feemarket: FeemarketModule;
|
|
90
89
|
neo: NEOClient;
|
|
91
90
|
eth: ETHClient;
|
|
92
91
|
bsc: ETHClient;
|
package/lib/CarbonSDK.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
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
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -80,7 +76,7 @@ class CarbonSDK {
|
|
|
80
76
|
if (!opts.query) {
|
|
81
77
|
let grpcClient;
|
|
82
78
|
if (opts.useTmAbciQuery !== true && this.networkConfig.grpcUrl) {
|
|
83
|
-
const transport = typeof window === "undefined" ?
|
|
79
|
+
const transport = typeof window === "undefined" ? grpc_web_node_http_transport_1.NodeHttpTransport() : undefined;
|
|
84
80
|
grpcClient = (_h = opts.grpcQueryClient) !== null && _h !== void 0 ? _h : new GrpcQueryClient_1.default(this.networkConfig.grpcWebUrl, {
|
|
85
81
|
transport,
|
|
86
82
|
});
|
|
@@ -117,7 +113,6 @@ class CarbonSDK {
|
|
|
117
113
|
this.xchain = new modules_1.XChainModule(this);
|
|
118
114
|
this.evm = new modules_1.EvmModule(this);
|
|
119
115
|
this.evmmerge = new modules_1.EvmMergeModule(this);
|
|
120
|
-
this.feemarket = new modules_1.FeemarketModule(this);
|
|
121
116
|
this.neo = clients_1.NEOClient.instance({
|
|
122
117
|
configProvider: this,
|
|
123
118
|
blockchain: blockchain_1.Blockchain.Neo,
|
|
@@ -163,7 +158,7 @@ class CarbonSDK {
|
|
|
163
158
|
const configOverride = (_b = opts.config) !== null && _b !== void 0 ? _b : {};
|
|
164
159
|
const defaultTimeoutBlocks = opts.defaultTimeoutBlocks;
|
|
165
160
|
const networkConfig = util_1.GenericUtils.overrideConfig(constant_1.NetworkConfigs[network], configOverride);
|
|
166
|
-
const tmClient = (_c = opts.tmClient) !== null && _c !== void 0 ? _c : new tendermint_rpc_1.
|
|
161
|
+
const tmClient = (_c = opts.tmClient) !== null && _c !== void 0 ? _c : new tendermint_rpc_1.Tendermint37Client(new clients.BatchQueryClient(networkConfig.tmRpcUrl)); // fallback tmClient
|
|
167
162
|
let chainId = networkConfig.chainId; // fallback chain ID
|
|
168
163
|
let normalInit = true;
|
|
169
164
|
try {
|
|
@@ -29,7 +29,7 @@ class BatchQueryClient {
|
|
|
29
29
|
};
|
|
30
30
|
if (typeof endpoint === "string") {
|
|
31
31
|
// accept host.name:port and assume http protocol
|
|
32
|
-
this.url =
|
|
32
|
+
this.url = rpcclient_1.hasProtocol(endpoint) ? endpoint : "http://" + endpoint;
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
35
|
this.url = endpoint.url;
|
|
@@ -71,7 +71,7 @@ class BatchQueryClient {
|
|
|
71
71
|
return;
|
|
72
72
|
const requests = batch.map((s) => s.request);
|
|
73
73
|
const requestIds = requests.map((request) => request.id);
|
|
74
|
-
|
|
74
|
+
http_1.http("POST", this.url, this.headers, requests).then((raw) => {
|
|
75
75
|
// Requests with a single entry return as an object
|
|
76
76
|
const arr = Array.isArray(raw) ? raw : [raw];
|
|
77
77
|
arr.forEach((el, i) => {
|
|
@@ -79,8 +79,8 @@ class BatchQueryClient {
|
|
|
79
79
|
if (!req)
|
|
80
80
|
return;
|
|
81
81
|
const { reject, resolve } = req;
|
|
82
|
-
const response =
|
|
83
|
-
if (
|
|
82
|
+
const response = json_rpc_1.parseJsonRpcResponse(el);
|
|
83
|
+
if (json_rpc_1.isJsonRpcErrorResponse(response)) {
|
|
84
84
|
reject(new Error(JSON.stringify(response.error)));
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { StargateClient } from "@cosmjs/stargate";
|
|
2
|
-
import {
|
|
2
|
+
import { Tendermint37Client } from "@cosmjs/tendermint-rpc";
|
|
3
3
|
/**
|
|
4
4
|
* BlockchainClient is functionally the same with StargateClient,
|
|
5
5
|
* with an additional static initializer:
|
|
6
6
|
*
|
|
7
7
|
* ```
|
|
8
|
-
* BlockchainClient.connectWithTm(tmClient:
|
|
8
|
+
* BlockchainClient.connectWithTm(tmClient: Tendermint37Client)
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
11
|
* @see StargateClient
|
|
12
12
|
*/
|
|
13
13
|
declare class BlockchainClient extends StargateClient {
|
|
14
|
-
static connectWithTm(tmClient:
|
|
14
|
+
static connectWithTm(tmClient: Tendermint37Client): BlockchainClient;
|
|
15
15
|
}
|
|
16
16
|
export default BlockchainClient;
|
|
@@ -6,7 +6,7 @@ const stargate_1 = require("@cosmjs/stargate");
|
|
|
6
6
|
* with an additional static initializer:
|
|
7
7
|
*
|
|
8
8
|
* ```
|
|
9
|
-
* BlockchainClient.connectWithTm(tmClient:
|
|
9
|
+
* BlockchainClient.connectWithTm(tmClient: Tendermint37Client)
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
12
|
* @see StargateClient
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { QueryClientImpl as ADLQueryClient } from "
|
|
2
|
-
import { QueryClientImpl as BookQueryClient } from "
|
|
3
|
-
import { QueryClientImpl as BrokerQueryClient } from "
|
|
4
|
-
import { QueryClientImpl as CDPQueryClient } from "
|
|
5
|
-
import { QueryClientImpl as CoinQueryClient } from "
|
|
6
|
-
import { QueryClientImpl as AuthQueryClient } from "
|
|
7
|
-
import { QueryClientImpl as BankQueryClient } from "
|
|
8
|
-
import { QueryClientImpl as NativeBankQueryClient } from "
|
|
9
|
-
import { ServiceClientImpl as CosmosTmClient } from "
|
|
10
|
-
import { QueryClientImpl as DistributionQueryClient } from "
|
|
11
|
-
import { QueryClientImpl as EvidenceQueryClient } from "
|
|
12
|
-
import { QueryClientImpl as GovQueryClient } from "
|
|
13
|
-
import { QueryClientImpl as GroupQueryClient } from "
|
|
14
|
-
import { QueryClientImpl as MintQueryClient } from "
|
|
15
|
-
import { QueryClientImpl as ParamsQueryClient } from "
|
|
16
|
-
import { QueryClientImpl as SlashingQueryClient } from "
|
|
17
|
-
import { QueryClientImpl as StakingQueryClient } from "
|
|
18
|
-
import { QueryClientImpl as UpgradeQueryClient } from "
|
|
19
|
-
import { QueryClientImpl as EthermintEVMQueryClient } from "
|
|
20
|
-
import { QueryClientImpl as EvmMergeQueryClient } from "
|
|
21
|
-
import { QueryClientImpl as EvmBankQueryClient } from "
|
|
22
|
-
import { QueryClientImpl as EthermintFeeMarketQueryClient } from "
|
|
23
|
-
import { QueryClientImpl as FeeQueryClient } from "
|
|
24
|
-
import { QueryClientImpl as HeadersyncQueryClient } from "
|
|
25
|
-
import { QueryClientImpl as IBCInterchainControlQueryClient } from "
|
|
26
|
-
import { QueryClientImpl as IBCInterchainHostQueryClient } from "
|
|
27
|
-
import { QueryClientImpl as IBCTransferQueryClient } from "
|
|
28
|
-
import { QueryClientImpl as IBCClientQueryClient } from "
|
|
29
|
-
import { QueryClientImpl as IBCConnectionQueryClient } from "
|
|
30
|
-
import { QueryClientImpl as IBCChannelQueryClient } from "
|
|
31
|
-
import { QueryClientImpl as InflationQueryClient } from "
|
|
32
|
-
import { QueryClientImpl as InsuranceQueryClient } from "
|
|
33
|
-
import { QueryClientImpl as LeverageQueryClient } from "
|
|
34
|
-
import { QueryClientImpl as LiquidationQueryClient } from "
|
|
35
|
-
import { QueryClientImpl as LiquidityPoolQueryClient } from "
|
|
36
|
-
import { QueryClientImpl as MarketQueryClient } from "
|
|
37
|
-
import { QueryClientImpl as MarketStatsQueryClient } from "
|
|
38
|
-
import { QueryClientImpl as MiscQueryClient } from "
|
|
39
|
-
import { QueryClientImpl as OracleQueryClient } from "
|
|
40
|
-
import { QueryClientImpl as OrderQueryClient } from "
|
|
41
|
-
import { QueryClientImpl as PositionQueryClient } from "
|
|
42
|
-
import { QueryClientImpl as PricingQueryClient } from "
|
|
43
|
-
import { QueryClientImpl as ProfileQueryClient } from "
|
|
44
|
-
import { QueryClientImpl as SubaccountQueryClient } from "
|
|
45
|
-
import { QueryClientImpl as AllianceClient } from "
|
|
46
|
-
import { QueryClientImpl as PerpspoolQueryClient } from "
|
|
47
|
-
import { QueryClientImpl as ERC20QueryClient } from "
|
|
48
|
-
import {
|
|
1
|
+
import { QueryClientImpl as ADLQueryClient } from "../codec/Switcheo/carbon/adl/query";
|
|
2
|
+
import { QueryClientImpl as BookQueryClient } from "../codec/Switcheo/carbon/book/query";
|
|
3
|
+
import { QueryClientImpl as BrokerQueryClient } from "../codec/Switcheo/carbon/broker/query";
|
|
4
|
+
import { QueryClientImpl as CDPQueryClient } from "../codec/Switcheo/carbon/cdp/query";
|
|
5
|
+
import { QueryClientImpl as CoinQueryClient } from "../codec/Switcheo/carbon/coin/query";
|
|
6
|
+
import { QueryClientImpl as AuthQueryClient } from "../codec/cosmos/auth/v1beta1/query";
|
|
7
|
+
import { QueryClientImpl as BankQueryClient } from "../codec/cosmos/bank/v1beta1/query";
|
|
8
|
+
import { QueryClientImpl as NativeBankQueryClient } from "../codec/Switcheo/carbon/bank/query";
|
|
9
|
+
import { ServiceClientImpl as CosmosTmClient } from "../codec/cosmos/base/tendermint/v1beta1/query";
|
|
10
|
+
import { QueryClientImpl as DistributionQueryClient } from "../codec/cosmos/distribution/v1beta1/query";
|
|
11
|
+
import { QueryClientImpl as EvidenceQueryClient } from "../codec/cosmos/evidence/v1beta1/query";
|
|
12
|
+
import { QueryClientImpl as GovQueryClient } from "../codec/cosmos/gov/v1beta1/query";
|
|
13
|
+
import { QueryClientImpl as GroupQueryClient } from "../codec/cosmos/group/v1/query";
|
|
14
|
+
import { QueryClientImpl as MintQueryClient } from "../codec/cosmos/mint/v1beta1/query";
|
|
15
|
+
import { QueryClientImpl as ParamsQueryClient } from "../codec/cosmos/params/v1beta1/query";
|
|
16
|
+
import { QueryClientImpl as SlashingQueryClient } from "../codec/cosmos/slashing/v1beta1/query";
|
|
17
|
+
import { QueryClientImpl as StakingQueryClient } from "../codec/cosmos/staking/v1beta1/query";
|
|
18
|
+
import { QueryClientImpl as UpgradeQueryClient } from "../codec/cosmos/upgrade/v1beta1/query";
|
|
19
|
+
import { QueryClientImpl as EthermintEVMQueryClient } from "../codec/ethermint/evm/v1/query";
|
|
20
|
+
import { QueryClientImpl as EvmMergeQueryClient } from "../codec/Switcheo/carbon/evmmerge/query";
|
|
21
|
+
import { QueryClientImpl as EvmBankQueryClient } from "../codec/Switcheo/carbon/evmbank/query";
|
|
22
|
+
import { QueryClientImpl as EthermintFeeMarketQueryClient } from "../codec/ethermint/feemarket/v1/query";
|
|
23
|
+
import { QueryClientImpl as FeeQueryClient } from "../codec/Switcheo/carbon/fee/query";
|
|
24
|
+
import { QueryClientImpl as HeadersyncQueryClient } from "../codec/Switcheo/carbon/headersync/query";
|
|
25
|
+
import { QueryClientImpl as IBCInterchainControlQueryClient } from "../codec/ibc/applications/interchain_accounts/controller/v1/query";
|
|
26
|
+
import { QueryClientImpl as IBCInterchainHostQueryClient } from "../codec/ibc/applications/interchain_accounts/host/v1/query";
|
|
27
|
+
import { QueryClientImpl as IBCTransferQueryClient } from "../codec/ibc/applications/transfer/v1/query";
|
|
28
|
+
import { QueryClientImpl as IBCClientQueryClient } from "../codec/ibc/core/client/v1/query";
|
|
29
|
+
import { QueryClientImpl as IBCConnectionQueryClient } from "../codec/ibc/core/connection/v1/query";
|
|
30
|
+
import { QueryClientImpl as IBCChannelQueryClient } from "../codec/ibc/core/channel/v1/query";
|
|
31
|
+
import { QueryClientImpl as InflationQueryClient } from "../codec/Switcheo/carbon/inflation/query";
|
|
32
|
+
import { QueryClientImpl as InsuranceQueryClient } from "../codec/Switcheo/carbon/insurance/query";
|
|
33
|
+
import { QueryClientImpl as LeverageQueryClient } from "../codec/Switcheo/carbon/leverage/query";
|
|
34
|
+
import { QueryClientImpl as LiquidationQueryClient } from "../codec/Switcheo/carbon/liquidation/query";
|
|
35
|
+
import { QueryClientImpl as LiquidityPoolQueryClient } from "../codec/Switcheo/carbon/liquiditypool/query";
|
|
36
|
+
import { QueryClientImpl as MarketQueryClient } from "../codec/Switcheo/carbon/market/query";
|
|
37
|
+
import { QueryClientImpl as MarketStatsQueryClient } from "../codec/Switcheo/carbon/marketstats/query";
|
|
38
|
+
import { QueryClientImpl as MiscQueryClient } from "../codec/Switcheo/carbon/misc/query";
|
|
39
|
+
import { QueryClientImpl as OracleQueryClient } from "../codec/Switcheo/carbon/oracle/query";
|
|
40
|
+
import { QueryClientImpl as OrderQueryClient } from "../codec/Switcheo/carbon/order/query";
|
|
41
|
+
import { QueryClientImpl as PositionQueryClient } from "../codec/Switcheo/carbon/position/query";
|
|
42
|
+
import { QueryClientImpl as PricingQueryClient } from "../codec/Switcheo/carbon/pricing/query";
|
|
43
|
+
import { QueryClientImpl as ProfileQueryClient } from "../codec/Switcheo/carbon/profile/query";
|
|
44
|
+
import { QueryClientImpl as SubaccountQueryClient } from "../codec/Switcheo/carbon/subaccount/query";
|
|
45
|
+
import { QueryClientImpl as AllianceClient } from "../codec/alliance/query";
|
|
46
|
+
import { QueryClientImpl as PerpspoolQueryClient } from "../codec/Switcheo/carbon/perpspool/query";
|
|
47
|
+
import { QueryClientImpl as ERC20QueryClient } from "../codec/Switcheo/carbon/erc20/query";
|
|
48
|
+
import { Tendermint37Client } from "@cosmjs/tendermint-rpc";
|
|
49
49
|
import BlockchainClient from "./BlockchainClient";
|
|
50
50
|
import GrpcQueryClient from "./GrpcQueryClient";
|
|
51
51
|
export interface IBCClientGroup {
|
|
@@ -61,7 +61,7 @@ export interface EthermintClientGroup {
|
|
|
61
61
|
feeMarket: EthermintFeeMarketQueryClient;
|
|
62
62
|
}
|
|
63
63
|
export interface CarbonQueryClientOpts {
|
|
64
|
-
tmClient:
|
|
64
|
+
tmClient: Tendermint37Client;
|
|
65
65
|
grpcClient?: GrpcQueryClient;
|
|
66
66
|
}
|
|
67
67
|
declare class CarbonQueryClient {
|
|
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const query_1 = require("../codec/adl/query");
|
|
7
|
-
const query_2 = require("../codec/book/query");
|
|
8
|
-
const query_3 = require("../codec/broker/query");
|
|
9
|
-
const query_4 = require("../codec/cdp/query");
|
|
10
|
-
const query_5 = require("../codec/coin/query");
|
|
6
|
+
const query_1 = require("../codec/Switcheo/carbon/adl/query");
|
|
7
|
+
const query_2 = require("../codec/Switcheo/carbon/book/query");
|
|
8
|
+
const query_3 = require("../codec/Switcheo/carbon/broker/query");
|
|
9
|
+
const query_4 = require("../codec/Switcheo/carbon/cdp/query");
|
|
10
|
+
const query_5 = require("../codec/Switcheo/carbon/coin/query");
|
|
11
11
|
const query_6 = require("../codec/cosmos/auth/v1beta1/query");
|
|
12
12
|
const query_7 = require("../codec/cosmos/bank/v1beta1/query");
|
|
13
|
-
const query_8 = require("../codec/bank/query");
|
|
13
|
+
const query_8 = require("../codec/Switcheo/carbon/bank/query");
|
|
14
14
|
const query_9 = require("../codec/cosmos/base/tendermint/v1beta1/query");
|
|
15
15
|
const query_10 = require("../codec/cosmos/distribution/v1beta1/query");
|
|
16
16
|
const query_11 = require("../codec/cosmos/evidence/v1beta1/query");
|
|
@@ -22,40 +22,40 @@ const query_16 = require("../codec/cosmos/slashing/v1beta1/query");
|
|
|
22
22
|
const query_17 = require("../codec/cosmos/staking/v1beta1/query");
|
|
23
23
|
const query_18 = require("../codec/cosmos/upgrade/v1beta1/query");
|
|
24
24
|
const query_19 = require("../codec/ethermint/evm/v1/query");
|
|
25
|
-
const query_20 = require("../codec/evmmerge/query");
|
|
26
|
-
const query_21 = require("../codec/evmbank/query");
|
|
25
|
+
const query_20 = require("../codec/Switcheo/carbon/evmmerge/query");
|
|
26
|
+
const query_21 = require("../codec/Switcheo/carbon/evmbank/query");
|
|
27
27
|
const query_22 = require("../codec/ethermint/feemarket/v1/query");
|
|
28
|
-
const query_23 = require("../codec/fee/query");
|
|
29
|
-
const query_24 = require("../codec/headersync/query");
|
|
28
|
+
const query_23 = require("../codec/Switcheo/carbon/fee/query");
|
|
29
|
+
const query_24 = require("../codec/Switcheo/carbon/headersync/query");
|
|
30
30
|
const query_25 = require("../codec/ibc/applications/interchain_accounts/controller/v1/query");
|
|
31
31
|
const query_26 = require("../codec/ibc/applications/interchain_accounts/host/v1/query");
|
|
32
32
|
const query_27 = require("../codec/ibc/applications/transfer/v1/query");
|
|
33
33
|
const query_28 = require("../codec/ibc/core/client/v1/query");
|
|
34
34
|
const query_29 = require("../codec/ibc/core/connection/v1/query");
|
|
35
35
|
const query_30 = require("../codec/ibc/core/channel/v1/query");
|
|
36
|
-
const query_31 = require("../codec/inflation/query");
|
|
37
|
-
const query_32 = require("../codec/insurance/query");
|
|
38
|
-
const query_33 = require("../codec/leverage/query");
|
|
39
|
-
const query_34 = require("../codec/liquidation/query");
|
|
40
|
-
const query_35 = require("../codec/liquiditypool/query");
|
|
41
|
-
const query_36 = require("../codec/market/query");
|
|
42
|
-
const query_37 = require("../codec/marketstats/query");
|
|
43
|
-
const query_38 = require("../codec/misc/query");
|
|
44
|
-
const query_39 = require("../codec/oracle/query");
|
|
45
|
-
const query_40 = require("../codec/order/query");
|
|
46
|
-
const query_41 = require("../codec/position/query");
|
|
47
|
-
const query_42 = require("../codec/pricing/query");
|
|
48
|
-
const query_43 = require("../codec/profile/query");
|
|
49
|
-
const query_44 = require("../codec/subaccount/query");
|
|
36
|
+
const query_31 = require("../codec/Switcheo/carbon/inflation/query");
|
|
37
|
+
const query_32 = require("../codec/Switcheo/carbon/insurance/query");
|
|
38
|
+
const query_33 = require("../codec/Switcheo/carbon/leverage/query");
|
|
39
|
+
const query_34 = require("../codec/Switcheo/carbon/liquidation/query");
|
|
40
|
+
const query_35 = require("../codec/Switcheo/carbon/liquiditypool/query");
|
|
41
|
+
const query_36 = require("../codec/Switcheo/carbon/market/query");
|
|
42
|
+
const query_37 = require("../codec/Switcheo/carbon/marketstats/query");
|
|
43
|
+
const query_38 = require("../codec/Switcheo/carbon/misc/query");
|
|
44
|
+
const query_39 = require("../codec/Switcheo/carbon/oracle/query");
|
|
45
|
+
const query_40 = require("../codec/Switcheo/carbon/order/query");
|
|
46
|
+
const query_41 = require("../codec/Switcheo/carbon/position/query");
|
|
47
|
+
const query_42 = require("../codec/Switcheo/carbon/pricing/query");
|
|
48
|
+
const query_43 = require("../codec/Switcheo/carbon/profile/query");
|
|
49
|
+
const query_44 = require("../codec/Switcheo/carbon/subaccount/query");
|
|
50
50
|
const query_45 = require("../codec/alliance/query");
|
|
51
|
-
const query_46 = require("../codec/perpspool/query");
|
|
52
|
-
const query_47 = require("../codec/erc20/query");
|
|
51
|
+
const query_46 = require("../codec/Switcheo/carbon/perpspool/query");
|
|
52
|
+
const query_47 = require("../codec/Switcheo/carbon/erc20/query");
|
|
53
53
|
const stargate_1 = require("@cosmjs/stargate");
|
|
54
54
|
const BlockchainClient_1 = __importDefault(require("./BlockchainClient"));
|
|
55
55
|
class CarbonQueryClient {
|
|
56
56
|
constructor(opts) {
|
|
57
57
|
var _a;
|
|
58
|
-
const rpcClient = (_a = opts.grpcClient) !== null && _a !== void 0 ? _a :
|
|
58
|
+
const rpcClient = (_a = opts.grpcClient) !== null && _a !== void 0 ? _a : stargate_1.createProtobufRpcClient(new stargate_1.QueryClient(opts.tmClient));
|
|
59
59
|
this.chain = BlockchainClient_1.default.connectWithTm(opts.tmClient);
|
|
60
60
|
this.adl = new query_1.QueryClientImpl(rpcClient);
|
|
61
61
|
this.alliance = new query_45.QueryClientImpl(rpcClient);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import CarbonSDK from "
|
|
2
|
-
import { EthNetworkConfig, NetworkConfig, NetworkConfigProvider } from "
|
|
3
|
-
import { Carbon } from "
|
|
4
|
-
import { Blockchain } from "
|
|
5
|
-
import { TokenInitInfo, TokensWithExternalBalance } from "
|
|
1
|
+
import CarbonSDK from "../CarbonSDK";
|
|
2
|
+
import { EthNetworkConfig, NetworkConfig, NetworkConfigProvider } from "../constant";
|
|
3
|
+
import { Carbon } from "../CarbonSDK";
|
|
4
|
+
import { Blockchain } from "../util/blockchain";
|
|
5
|
+
import { TokenInitInfo, TokensWithExternalBalance } from "../util/external";
|
|
6
6
|
import BigNumber from "bignumber.js";
|
|
7
7
|
import { ethers } from "ethers";
|
|
8
8
|
import TokenClient from "./TokenClient";
|
package/lib/clients/ETHClient.js
CHANGED
|
@@ -44,15 +44,15 @@ class ETHClient {
|
|
|
44
44
|
?
|
|
45
45
|
this.tokenClient.getBlockchainV2(token.denom) == ETHClient.BLOCKCHAINV2_MAPPING[this.blockchain]
|
|
46
46
|
:
|
|
47
|
-
|
|
47
|
+
blockchain_1.blockchainForChainId(token.chainId.toNumber(), api.network) == this.blockchain;
|
|
48
48
|
return isCorrectBlockchain &&
|
|
49
49
|
token.tokenAddress.length == 40 &&
|
|
50
|
-
token.bridgeAddress.toLowerCase() ==
|
|
50
|
+
token.bridgeAddress.toLowerCase() == generic_1.stripHexPrefix(lockProxyAddress) &&
|
|
51
51
|
(!whitelistDenoms || whitelistDenoms.includes(token.denom)) &&
|
|
52
|
-
this.verifyChecksum(
|
|
52
|
+
this.verifyChecksum(generic_1.appendHexPrefix(token.tokenAddress));
|
|
53
53
|
});
|
|
54
54
|
const assetIds = tokens.map((token) => {
|
|
55
|
-
return this.verifyChecksum(
|
|
55
|
+
return this.verifyChecksum(generic_1.appendHexPrefix(token.tokenAddress));
|
|
56
56
|
});
|
|
57
57
|
const provider = this.getProvider();
|
|
58
58
|
const contractAddress = this.getBalanceReaderAddress();
|
|
@@ -101,14 +101,14 @@ class ETHClient {
|
|
|
101
101
|
}
|
|
102
102
|
const carbonNetwork = networkConfig.network;
|
|
103
103
|
const fromTokenId = fromToken.id;
|
|
104
|
-
const fromTokenAddress =
|
|
104
|
+
const fromTokenAddress = generic_1.appendHexPrefix(fromToken.tokenAddress);
|
|
105
105
|
const toTokenDenom = toToken.denom;
|
|
106
106
|
const recoveryAddressHex = ethers_1.ethers.utils.hexlify(util_1.AddressUtils.SWTHAddress.getAddressBytes(recoveryAddress, carbonNetwork));
|
|
107
107
|
const fromAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(fromTokenId));
|
|
108
108
|
const toAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(toTokenDenom));
|
|
109
109
|
const nonce = yield this.getTxNonce(fromAddress, params.nonce, rpcProvider);
|
|
110
110
|
const contract = new ethers_1.ethers.Contract(this.getBridgeEntranceAddr(), eth_1.ABIs.bridgeEntrance, rpcProvider);
|
|
111
|
-
const feeAddress =
|
|
111
|
+
const feeAddress = generic_1.appendHexPrefix(networkConfig.feeAddress);
|
|
112
112
|
const tokenCreator = fromToken.creator;
|
|
113
113
|
const targetAddressBytes = util_1.AddressUtils.SWTHAddress.getAddressBytes(tokenCreator, carbonNetwork);
|
|
114
114
|
const targetProxyHash = ethers_1.ethers.utils.hexlify(targetAddressBytes);
|
|
@@ -137,9 +137,9 @@ class ETHClient {
|
|
|
137
137
|
throw new Error("Minimum gas required: 150,000");
|
|
138
138
|
}
|
|
139
139
|
const networkConfig = this.getNetworkConfig();
|
|
140
|
-
const assetId =
|
|
141
|
-
const targetProxyHash =
|
|
142
|
-
const feeAddress =
|
|
140
|
+
const assetId = generic_1.appendHexPrefix(token.tokenAddress);
|
|
141
|
+
const targetProxyHash = generic_1.appendHexPrefix(this.getTargetProxyHash(token));
|
|
142
|
+
const feeAddress = generic_1.appendHexPrefix(networkConfig.feeAddress);
|
|
143
143
|
const toAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(token.id));
|
|
144
144
|
const swthAddress = ethers_1.ethers.utils.hexlify(address);
|
|
145
145
|
const contractAddress = this.getLockProxyAddress();
|
|
@@ -190,15 +190,15 @@ class ETHClient {
|
|
|
190
190
|
return "insufficient balance";
|
|
191
191
|
}
|
|
192
192
|
const networkConfig = this.getNetworkConfig();
|
|
193
|
-
const assetId =
|
|
194
|
-
const targetProxyHash =
|
|
195
|
-
const feeAddress =
|
|
193
|
+
const assetId = generic_1.appendHexPrefix(tokenWithExternalBalances.tokenAddress);
|
|
194
|
+
const targetProxyHash = generic_1.appendHexPrefix(this.getTargetProxyHash(tokenWithExternalBalances));
|
|
195
|
+
const feeAddress = generic_1.appendHexPrefix(networkConfig.feeAddress);
|
|
196
196
|
const toAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(tokenWithExternalBalances.id));
|
|
197
197
|
const nonce = Math.floor(Math.random() * 1000000000); // random nonce to prevent replay attacks
|
|
198
198
|
const message = ethers_1.ethers.utils.solidityKeccak256(["string", "address", "bytes", "bytes", "bytes", "uint256", "uint256", "uint256"], ["sendTokens", assetId, targetProxyHash, toAssetHash, feeAddress, amount, feeAmount, nonce]);
|
|
199
199
|
// logger("sendDeposit message", message)
|
|
200
200
|
const { address, signature } = yield getSignatureCallback(message);
|
|
201
|
-
const signatureBytes = ethers_1.ethers.utils.arrayify(
|
|
201
|
+
const signatureBytes = ethers_1.ethers.utils.arrayify(generic_1.appendHexPrefix(signature));
|
|
202
202
|
const rsv = ethers_1.ethers.utils.splitSignature(signatureBytes);
|
|
203
203
|
// logger("sign result", address, signature)
|
|
204
204
|
const signatureResult = {
|
|
@@ -237,7 +237,7 @@ class ETHClient {
|
|
|
237
237
|
if (!feeInfo.deposit_fee) {
|
|
238
238
|
throw new Error("unsupported token");
|
|
239
239
|
}
|
|
240
|
-
if (
|
|
240
|
+
if (blockchain_1.blockchainForChainId(token.chainId.toNumber(), this.configProvider.getConfig().network) !== this.blockchain) {
|
|
241
241
|
throw new Error("unsupported token");
|
|
242
242
|
}
|
|
243
243
|
let feeAmount = ethers_1.ethers.BigNumber.from(feeInfo.deposit_fee);
|
|
@@ -303,7 +303,7 @@ class ETHClient {
|
|
|
303
303
|
getTargetProxyHash(token) {
|
|
304
304
|
const networkConfig = this.getNetworkConfig();
|
|
305
305
|
const addressBytes = address_1.SWTHAddress.getAddressBytes(token.creator, networkConfig.network);
|
|
306
|
-
const addressHex =
|
|
306
|
+
const addressHex = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(addressBytes));
|
|
307
307
|
return addressHex;
|
|
308
308
|
}
|
|
309
309
|
getProvider() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NetworkConfig } from "
|
|
2
|
-
import { BlockchainUtils } from "
|
|
1
|
+
import { NetworkConfig } from "../constant";
|
|
2
|
+
import { BlockchainUtils } from "../util";
|
|
3
3
|
import { ChainTransaction, CrossChainTransfer, CrossChainTransferDetailed, GetDetailedTransfersResponse, GetRelaysRequest, GetRelaysResponse, GetStatsResponse, GetTransfersRequest, GetTransfersResponse, RelaysResponse } from "../hydrogen";
|
|
4
|
-
import { GetFeeQuoteRequest, GetFeeQuoteResponse } from "
|
|
4
|
+
import { GetFeeQuoteRequest, GetFeeQuoteResponse } from "../hydrogen/feeQuote";
|
|
5
5
|
import TokenClient from './TokenClient';
|
|
6
6
|
export declare const HydrogenEndpoints: {
|
|
7
7
|
stats: string;
|
|
@@ -29,7 +29,7 @@ exports.HydrogenEndpoints = {
|
|
|
29
29
|
const formatDateField = (value) => {
|
|
30
30
|
if (typeof value !== "string")
|
|
31
31
|
return null;
|
|
32
|
-
return
|
|
32
|
+
return 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,7 @@
|
|
|
1
|
-
import { NetworkConfig } from "
|
|
2
|
-
import { Insights } from "
|
|
3
|
-
import { InsightsQueryResponse } from "
|
|
4
|
-
import { APIUtils } from "
|
|
1
|
+
import { NetworkConfig } from "../constant";
|
|
2
|
+
import { Insights } from "../index";
|
|
3
|
+
import { InsightsQueryResponse } from "../insights";
|
|
4
|
+
import { APIUtils } from "../util";
|
|
5
5
|
declare class InsightsQueryClient {
|
|
6
6
|
readonly apiManager: APIUtils.APIManager<typeof Insights.InsightsEndpoints>;
|
|
7
7
|
constructor(config: NetworkConfig);
|
|
@@ -101,12 +101,12 @@ class InsightsQueryClient {
|
|
|
101
101
|
const meta = response.data.result.meta;
|
|
102
102
|
const parsedEntries = rawEntries.map(entry => ({
|
|
103
103
|
lastHeight: entry.lastHeight,
|
|
104
|
-
time:
|
|
104
|
+
time: dayjs_1.default(entry.time),
|
|
105
105
|
volumeValue: new bignumber_js_1.default(entry.volumeValue),
|
|
106
106
|
}));
|
|
107
107
|
const parsedMeta = {
|
|
108
|
-
from:
|
|
109
|
-
until:
|
|
108
|
+
from: dayjs_1.default(meta.from),
|
|
109
|
+
until: dayjs_1.default(meta.until),
|
|
110
110
|
interval: meta.interval,
|
|
111
111
|
};
|
|
112
112
|
return { result: { entries: parsedEntries, meta: parsedMeta } };
|
package/lib/clients/NEOClient.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
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
|
-
|
|
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);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -72,13 +68,13 @@ class NEOClient {
|
|
|
72
68
|
?
|
|
73
69
|
!!sdk.token.getBlockchainV2(token.denom) && (blockchain_1.BLOCKCHAIN_V2_TO_V1_MAPPING[sdk.token.getBlockchainV2(token.denom)] == this.blockchain)
|
|
74
70
|
:
|
|
75
|
-
|
|
71
|
+
blockchain_1.blockchainForChainId(token.chainId.toNumber(), sdk.network) == this.blockchain;
|
|
76
72
|
return (isCorrectBlockchain || token.denom === "swth") && token.tokenAddress.length == 40 && token.bridgeAddress.length == 40;
|
|
77
73
|
});
|
|
78
74
|
const client = new Neon.rpc.RPCClient(url, "2.5.2"); // TODO: should we change the RPC version??
|
|
79
75
|
// NOTE: fetching of tokens is chunked in sets of 15 as we may hit
|
|
80
76
|
// the gas limit on the RPC node and error out otherwise
|
|
81
|
-
const promises =
|
|
77
|
+
const promises = lodash_1.chunk(tokens, 75).map((partition) => __awaiter(this, void 0, void 0, function* () {
|
|
82
78
|
var _a, _b, _c;
|
|
83
79
|
const acc = {};
|
|
84
80
|
for (const token of partition) {
|
|
@@ -120,8 +116,8 @@ class NEOClient {
|
|
|
120
116
|
const targetProxyHash = this.getTargetProxyHash(token);
|
|
121
117
|
const toAssetHash = Neon.u.str2hexstring(token.id);
|
|
122
118
|
const addressBytes = address_1.SWTHAddress.getAddressBytes(swthAddress, networkConfig.network);
|
|
123
|
-
const toAddress =
|
|
124
|
-
const zeroAddressHex =
|
|
119
|
+
const toAddress = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(addressBytes));
|
|
120
|
+
const zeroAddressHex = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(constant_1.ZeroAddress));
|
|
125
121
|
const amount = ethers_1.ethers.BigNumber.from(token.externalBalance);
|
|
126
122
|
const feeAmount = ethers_1.ethers.BigNumber.from(feeAmountInput !== null && feeAmountInput !== void 0 ? feeAmountInput : "100000000");
|
|
127
123
|
const feeAddress = feeAmount.isZero() ? zeroAddressHex : networkConfig.feeAddress;
|
|
@@ -166,7 +162,7 @@ class NEOClient {
|
|
|
166
162
|
const fromAddress = util_1.AddressUtils.NEOAddress.publicKeyToAddress(publicKeyOutput.publicKey);
|
|
167
163
|
const targetProxyHash = this.getTargetProxyHash(token);
|
|
168
164
|
const toAssetHash = Neon.u.str2hexstring(token.id);
|
|
169
|
-
const toAddress =
|
|
165
|
+
const toAddress = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(address));
|
|
170
166
|
const nonce = Math.floor(Math.random() * 1000000);
|
|
171
167
|
if (amount.lt(feeAmount)) {
|
|
172
168
|
throw new Error("Invalid amount");
|
|
@@ -202,7 +198,7 @@ class NEOClient {
|
|
|
202
198
|
const fromAddress = ledger.scriptHash;
|
|
203
199
|
const targetProxyHash = this.getTargetProxyHash(token);
|
|
204
200
|
const toAssetHash = Neon.u.str2hexstring(token.id);
|
|
205
|
-
const toAddress =
|
|
201
|
+
const toAddress = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(address));
|
|
206
202
|
const feeAddress = networkConfig.feeAddress;
|
|
207
203
|
const nonce = Math.floor(Math.random() * 1000000);
|
|
208
204
|
if (amount.lt(feeAmount)) {
|
|
@@ -317,7 +313,7 @@ class NEOClient {
|
|
|
317
313
|
getTargetProxyHash(token) {
|
|
318
314
|
const networkConfig = this.getNetworkConfig();
|
|
319
315
|
const addressBytes = address_1.SWTHAddress.getAddressBytes(token.creator, networkConfig.network);
|
|
320
|
-
const addressHex =
|
|
316
|
+
const addressHex = generic_1.stripHexPrefix(ethers_1.ethers.utils.hexlify(addressBytes));
|
|
321
317
|
return addressHex;
|
|
322
318
|
}
|
|
323
319
|
getNetworkConfig() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Carbon } from "
|
|
2
|
-
import { NetworkConfigProvider } from "
|
|
3
|
-
import { GetFeeQuoteResponse } from "
|
|
4
|
-
import { BlockchainUtils, TypeUtils } from "
|
|
5
|
-
import { BlockchainV2, BridgeMap, IbcBridge } from '
|
|
1
|
+
import { Carbon } from "../CarbonSDK";
|
|
2
|
+
import { NetworkConfigProvider } from "../constant";
|
|
3
|
+
import { GetFeeQuoteResponse } from "../hydrogen/feeQuote";
|
|
4
|
+
import { BlockchainUtils, TypeUtils } from "../util";
|
|
5
|
+
import { BlockchainV2, BridgeMap, IbcBridge } from '../util/blockchain';
|
|
6
6
|
import BigNumber from "bignumber.js";
|
|
7
7
|
import CarbonQueryClient from "./CarbonQueryClient";
|
|
8
8
|
declare class TokenClient {
|