carbon-js-sdk 0.11.12 → 0.11.13-beta.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.
- package/lib/CarbonSDK.d.ts +3 -0
- package/lib/CarbonSDK.js +17 -0
- package/lib/clients/AxelarBridgeClient.d.ts +39 -0
- package/lib/clients/AxelarBridgeClient.js +66 -0
- package/lib/clients/InsightsQueryClient.d.ts +0 -4
- package/lib/clients/InsightsQueryClient.js +0 -35
- package/lib/clients/ZILClient.js +2 -2
- package/lib/codec/Switcheo/carbon/bank/export.d.ts +1 -2
- package/lib/codec/Switcheo/carbon/bank/export.js +1 -10
- package/lib/codec/Switcheo/carbon/bank/genesis.d.ts +4 -5
- package/lib/codec/Switcheo/carbon/bank/genesis.js +5 -22
- package/lib/codec/Switcheo/carbon/bank/query.d.ts +0 -45
- package/lib/codec/Switcheo/carbon/bank/query.js +1 -185
- package/lib/codec/Switcheo/carbon/bridge/bridge.d.ts +97 -0
- package/lib/codec/Switcheo/carbon/bridge/bridge.js +596 -0
- package/lib/codec/Switcheo/carbon/bridge/event.d.ts +293 -0
- package/lib/codec/Switcheo/carbon/bridge/event.js +1851 -0
- package/lib/codec/Switcheo/carbon/bridge/export.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/bridge/export.js +129 -0
- package/lib/codec/Switcheo/carbon/bridge/genesis.d.ts +28 -0
- package/lib/codec/Switcheo/carbon/bridge/genesis.js +201 -0
- package/lib/codec/Switcheo/carbon/bridge/params.d.ts +45 -0
- package/lib/codec/Switcheo/carbon/bridge/params.js +122 -0
- package/lib/codec/Switcheo/carbon/bridge/pending_action.d.ts +94 -0
- package/lib/codec/Switcheo/carbon/bridge/pending_action.js +698 -0
- package/lib/codec/Switcheo/carbon/bridge/query.d.ts +291 -0
- package/lib/codec/Switcheo/carbon/bridge/query.js +1301 -0
- package/lib/codec/Switcheo/carbon/bridge/tx.d.ts +788 -0
- package/lib/codec/Switcheo/carbon/bridge/tx.js +3875 -0
- package/lib/codec/Switcheo/carbon/ccm/export.d.ts +2 -2
- package/lib/codec/Switcheo/carbon/ccm/export.js +4 -3
- package/lib/codec/Switcheo/carbon/ccm/genesis.d.ts +1 -31
- package/lib/codec/Switcheo/carbon/ccm/genesis.js +3 -169
- package/lib/codec/Switcheo/carbon/ccm/params.d.ts +10 -8
- package/lib/codec/Switcheo/carbon/ccm/params.js +38 -9
- package/lib/codec/Switcheo/carbon/ccm/tx.d.ts +38 -0
- package/lib/codec/Switcheo/carbon/ccm/tx.js +206 -1
- package/lib/codec/Switcheo/carbon/cdp/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/cdp/export.js +3 -5
- package/lib/codec/Switcheo/carbon/cdp/query.d.ts +4 -29
- package/lib/codec/Switcheo/carbon/cdp/query.js +6 -157
- package/lib/codec/Switcheo/carbon/evmcontract/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/evmcontract/export.js +1 -3
- package/lib/codec/Switcheo/carbon/evmcontract/query.d.ts +8 -37
- package/lib/codec/Switcheo/carbon/evmcontract/query.js +13 -201
- package/lib/codec/Switcheo/carbon/fee/export.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/fee/export.js +6 -1
- package/lib/codec/Switcheo/carbon/fee/proposal.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/headersync/consensus_peers.d.ts +0 -1
- package/lib/codec/Switcheo/carbon/headersync/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/headersync/export.js +3 -1
- package/lib/codec/Switcheo/carbon/headersync/genesis.d.ts +5 -2
- package/lib/codec/Switcheo/carbon/headersync/query.d.ts +23 -1
- package/lib/codec/Switcheo/carbon/headersync/query.js +107 -1
- package/lib/codec/Switcheo/carbon/insurance/export.d.ts +2 -3
- package/lib/codec/Switcheo/carbon/insurance/export.js +1 -8
- package/lib/codec/Switcheo/carbon/insurance/genesis.d.ts +4 -10
- package/lib/codec/Switcheo/carbon/insurance/genesis.js +4 -21
- package/lib/codec/Switcheo/carbon/insurance/query.d.ts +0 -22
- package/lib/codec/Switcheo/carbon/insurance/query.js +1 -88
- package/lib/codec/Switcheo/carbon/insurance/tx.d.ts +0 -25
- package/lib/codec/Switcheo/carbon/insurance/tx.js +1 -103
- package/lib/codec/Switcheo/carbon/market/event.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/market/event.js +13 -11
- package/lib/codec/Switcheo/carbon/market/market.d.ts +0 -2
- package/lib/codec/Switcheo/carbon/market/market.js +2 -30
- package/lib/codec/Switcheo/carbon/market/params.d.ts +0 -2
- package/lib/codec/Switcheo/carbon/market/params.js +2 -32
- package/lib/codec/Switcheo/carbon/market/query.d.ts +8 -12
- package/lib/codec/Switcheo/carbon/market/query.js +8 -80
- package/lib/codec/Switcheo/carbon/oracle/export.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/oracle/export.js +6 -4
- package/lib/codec/Switcheo/carbon/oracle/proposal.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/oracle/tx.d.ts +25 -26
- package/lib/codec/Switcheo/carbon/oracle/tx.js +139 -123
- package/lib/codec/Switcheo/carbon/position/event.d.ts +1 -11
- package/lib/codec/Switcheo/carbon/position/event.js +1 -51
- package/lib/codec/Switcheo/carbon/position/export.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/position/export.js +1 -7
- package/lib/codec/Switcheo/carbon/position/position.d.ts +0 -11
- package/lib/codec/Switcheo/carbon/position/position.js +1 -59
- package/lib/codec/Switcheo/carbon/position/query.d.ts +1 -44
- package/lib/codec/Switcheo/carbon/position/query.js +1 -189
- package/lib/codec/Switcheo/carbon/pricing/export.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/pricing/export.js +4 -1
- package/lib/codec/Switcheo/carbon/pricing/proposal.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/sequence/query.d.ts +4 -7
- package/lib/codec/Switcheo/carbon/sequence/query.js +4 -41
- package/lib/codec/adl/genesis.d.ts +18 -0
- package/lib/codec/adl/genesis.js +46 -0
- package/lib/codec/adl/query.d.ts +12 -0
- package/lib/codec/adl/query.js +20 -0
- package/lib/codec/adl/tx.d.ts +12 -0
- package/lib/codec/adl/tx.js +20 -0
- package/lib/codec/admin/export.d.ts +2 -0
- package/lib/codec/admin/export.js +13 -0
- package/lib/codec/admin/genesis.d.ts +18 -0
- package/lib/codec/admin/genesis.js +46 -0
- package/lib/codec/admin/query.d.ts +62 -0
- package/lib/codec/admin/query.js +186 -0
- package/lib/codec/admin/tx.d.ts +62 -0
- package/lib/codec/admin/tx.js +198 -0
- package/lib/codec/bank/event.d.ts +65 -0
- package/lib/codec/bank/event.js +332 -0
- package/lib/codec/bank/export.d.ts +2 -0
- package/lib/codec/bank/export.js +14 -0
- package/lib/codec/bank/genesis.d.ts +18 -0
- package/lib/codec/bank/genesis.js +46 -0
- package/lib/codec/bank/query.d.ts +77 -0
- package/lib/codec/bank/query.js +459 -0
- package/lib/codec/book/book.d.ts +57 -0
- package/lib/codec/book/book.js +319 -0
- package/lib/codec/book/event.d.ts +22 -0
- package/lib/codec/book/event.js +113 -0
- package/lib/codec/book/export.d.ts +4 -0
- package/lib/codec/book/export.js +23 -0
- package/lib/codec/book/genesis.d.ts +25 -0
- package/lib/codec/book/genesis.js +79 -0
- package/lib/codec/book/legacy.d.ts +22 -0
- package/lib/codec/book/legacy.js +120 -0
- package/lib/codec/book/query.d.ts +141 -0
- package/lib/codec/book/query.js +606 -0
- package/lib/codec/book/tx.d.ts +12 -0
- package/lib/codec/book/tx.js +20 -0
- package/lib/codec/broker/amm.d.ts +50 -0
- package/lib/codec/broker/amm.js +326 -0
- package/lib/codec/broker/candlestick.d.ts +27 -0
- package/lib/codec/broker/candlestick.js +211 -0
- package/lib/codec/broker/event.d.ts +53 -0
- package/lib/codec/broker/event.js +485 -0
- package/lib/codec/broker/export.d.ts +7 -0
- package/lib/codec/broker/export.js +27 -0
- package/lib/codec/broker/genesis.d.ts +25 -0
- package/lib/codec/broker/genesis.js +79 -0
- package/lib/codec/broker/incoming_liquidations.d.ts +18 -0
- package/lib/codec/broker/incoming_liquidations.js +93 -0
- 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 +19 -0
- package/lib/codec/broker/pagination.js +78 -0
- package/lib/codec/broker/query.d.ts +107 -0
- package/lib/codec/broker/query.js +597 -0
- package/lib/codec/broker/tx.d.ts +53 -0
- package/lib/codec/broker/tx.js +176 -0
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +21 -0
- package/lib/codec/btcx/denom_cross_chain_info.js +98 -0
- package/lib/codec/btcx/denom_info.d.ts +24 -0
- package/lib/codec/btcx/denom_info.js +140 -0
- package/lib/codec/btcx/export.d.ts +4 -0
- package/lib/codec/btcx/export.js +19 -0
- package/lib/codec/btcx/genesis.d.ts +18 -0
- package/lib/codec/btcx/genesis.js +46 -0
- package/lib/codec/btcx/query.d.ts +68 -0
- package/lib/codec/btcx/query.js +275 -0
- package/lib/codec/btcx/tx.d.ts +92 -0
- package/lib/codec/btcx/tx.js +436 -0
- package/lib/codec/ccm/ccm.d.ts +19 -0
- package/lib/codec/ccm/ccm.js +60 -0
- package/lib/codec/ccm/export.d.ts +4 -0
- package/lib/codec/ccm/export.js +20 -0
- package/lib/codec/ccm/genesis.d.ts +83 -0
- package/lib/codec/ccm/genesis.js +438 -0
- package/lib/codec/ccm/query.d.ts +45 -0
- package/lib/codec/ccm/query.js +197 -0
- package/lib/codec/ccm/tx.d.ts +97 -0
- package/lib/codec/ccm/tx.js +462 -0
- package/lib/codec/cdp/asset_params.d.ts +57 -0
- package/lib/codec/cdp/asset_params.js +411 -0
- package/lib/codec/cdp/cdp_liquidations.d.ts +32 -0
- package/lib/codec/cdp/cdp_liquidations.js +288 -0
- package/lib/codec/cdp/debt_info.d.ts +23 -0
- package/lib/codec/cdp/debt_info.js +158 -0
- package/lib/codec/cdp/e_mode_category.d.ts +23 -0
- package/lib/codec/cdp/e_mode_category.js +135 -0
- package/lib/codec/cdp/event.d.ts +446 -0
- package/lib/codec/cdp/event.js +2913 -0
- package/lib/codec/cdp/export.d.ts +13 -0
- package/lib/codec/cdp/export.js +210 -0
- package/lib/codec/cdp/genesis.d.ts +134 -0
- package/lib/codec/cdp/genesis.js +825 -0
- package/lib/codec/cdp/params.d.ts +68 -0
- package/lib/codec/cdp/params.js +210 -0
- package/lib/codec/cdp/query.d.ts +644 -0
- package/lib/codec/cdp/query.js +3099 -0
- package/lib/codec/cdp/rate_strategy_params.d.ts +26 -0
- package/lib/codec/cdp/rate_strategy_params.js +180 -0
- package/lib/codec/cdp/reward_scheme.d.ts +71 -0
- package/lib/codec/cdp/reward_scheme.js +550 -0
- package/lib/codec/cdp/stablecoin_debt_info.d.ts +22 -0
- package/lib/codec/cdp/stablecoin_debt_info.js +144 -0
- package/lib/codec/cdp/stablecoin_interest_info.d.ts +19 -0
- package/lib/codec/cdp/stablecoin_interest_info.js +99 -0
- package/lib/codec/cdp/tx.d.ts +1026 -0
- package/lib/codec/cdp/tx.js +5191 -0
- package/lib/codec/coin/bridge.d.ts +24 -0
- package/lib/codec/coin/bridge.js +151 -0
- package/lib/codec/coin/event.d.ts +143 -0
- package/lib/codec/coin/event.js +775 -0
- package/lib/codec/coin/export.d.ts +8 -0
- package/lib/codec/coin/export.js +107 -0
- package/lib/codec/coin/genesis.d.ts +42 -0
- package/lib/codec/coin/genesis.js +207 -0
- package/lib/codec/coin/group.d.ts +50 -0
- package/lib/codec/coin/group.js +230 -0
- package/lib/codec/coin/proposal.d.ts +21 -0
- package/lib/codec/coin/proposal.js +91 -0
- package/lib/codec/coin/query.d.ts +310 -0
- package/lib/codec/coin/query.js +1439 -0
- package/lib/codec/coin/token.d.ts +104 -0
- package/lib/codec/coin/token.js +700 -0
- package/lib/codec/coin/tx.d.ts +586 -0
- package/lib/codec/coin/tx.js +3131 -0
- 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 +41 -0
- package/lib/codec/erc20/erc20.js +144 -0
- package/lib/codec/erc20/events.d.ts +76 -0
- package/lib/codec/erc20/events.js +330 -0
- package/lib/codec/erc20/export.d.ts +5 -0
- package/lib/codec/erc20/export.js +37 -0
- package/lib/codec/erc20/genesis.d.ts +40 -0
- package/lib/codec/erc20/genesis.js +139 -0
- package/lib/codec/erc20/query.d.ts +117 -0
- package/lib/codec/erc20/query.js +333 -0
- package/lib/codec/erc20/tx.d.ts +232 -0
- package/lib/codec/erc20/tx.js +765 -0
- package/lib/codec/evmbank/export.d.ts +2 -0
- package/lib/codec/evmbank/export.js +8 -0
- package/lib/codec/evmbank/genesis.d.ts +32 -0
- package/lib/codec/evmbank/genesis.js +152 -0
- package/lib/codec/evmbank/query.d.ts +40 -0
- package/lib/codec/evmbank/query.js +116 -0
- package/lib/codec/evmcontract/genesis.d.ts +18 -0
- package/lib/codec/evmcontract/genesis.js +46 -0
- package/lib/codec/evmcontract/query.d.ts +12 -0
- package/lib/codec/evmcontract/query.js +20 -0
- package/lib/codec/evmcontract/tx.d.ts +12 -0
- package/lib/codec/evmcontract/tx.js +20 -0
- package/lib/codec/evmmerge/address.d.ts +19 -0
- package/lib/codec/evmmerge/address.js +75 -0
- package/lib/codec/evmmerge/event.d.ts +20 -0
- package/lib/codec/evmmerge/event.js +90 -0
- package/lib/codec/evmmerge/export.d.ts +6 -0
- package/lib/codec/evmmerge/export.js +20 -0
- package/lib/codec/evmmerge/genesis.d.ts +48 -0
- package/lib/codec/evmmerge/genesis.js +216 -0
- package/lib/codec/evmmerge/offchain.d.ts +22 -0
- package/lib/codec/evmmerge/offchain.js +105 -0
- package/lib/codec/evmmerge/query.d.ts +75 -0
- package/lib/codec/evmmerge/query.js +254 -0
- package/lib/codec/evmmerge/tx.d.ts +45 -0
- package/lib/codec/evmmerge/tx.js +128 -0
- package/lib/codec/fee/event.d.ts +20 -0
- package/lib/codec/fee/event.js +83 -0
- package/lib/codec/fee/export.d.ts +5 -0
- package/lib/codec/fee/export.js +32 -0
- package/lib/codec/fee/fee.d.ts +42 -0
- package/lib/codec/fee/fee.js +183 -0
- package/lib/codec/fee/genesis.d.ts +23 -0
- package/lib/codec/fee/genesis.js +79 -0
- package/lib/codec/fee/proposal.d.ts +57 -0
- package/lib/codec/fee/proposal.js +311 -0
- package/lib/codec/fee/query.d.ts +114 -0
- package/lib/codec/fee/query.js +470 -0
- package/lib/codec/fee/tx.d.ts +108 -0
- package/lib/codec/fee/tx.js +415 -0
- package/lib/codec/headersync/consensus_peers.d.ts +70 -0
- package/lib/codec/headersync/consensus_peers.js +383 -0
- package/lib/codec/headersync/export.d.ts +4 -0
- package/lib/codec/headersync/export.js +24 -0
- package/lib/codec/headersync/genesis.d.ts +79 -0
- package/lib/codec/headersync/genesis.js +419 -0
- package/lib/codec/headersync/query.d.ts +64 -0
- package/lib/codec/headersync/query.js +231 -0
- package/lib/codec/headersync/tx.d.ts +64 -0
- package/lib/codec/headersync/tx.js +215 -0
- package/lib/codec/index.d.ts +11 -8
- package/lib/codec/index.js +470 -556
- package/lib/codec/inflation/export.d.ts +2 -0
- package/lib/codec/inflation/export.js +8 -0
- package/lib/codec/inflation/genesis.d.ts +25 -0
- package/lib/codec/inflation/genesis.js +79 -0
- package/lib/codec/inflation/inflation.d.ts +26 -0
- package/lib/codec/inflation/inflation.js +165 -0
- package/lib/codec/inflation/query.d.ts +41 -0
- package/lib/codec/inflation/query.js +109 -0
- package/lib/codec/inflation/tx.d.ts +12 -0
- package/lib/codec/inflation/tx.js +20 -0
- package/lib/codec/insurance/event.d.ts +24 -0
- package/lib/codec/insurance/event.js +46 -0
- package/lib/codec/insurance/export.d.ts +4 -0
- package/lib/codec/insurance/export.js +14 -0
- package/lib/codec/insurance/fund.d.ts +29 -0
- package/lib/codec/insurance/fund.js +148 -0
- package/lib/codec/insurance/genesis.d.ts +18 -0
- package/lib/codec/insurance/genesis.js +46 -0
- package/lib/codec/insurance/query.d.ts +41 -0
- package/lib/codec/insurance/query.js +108 -0
- package/lib/codec/insurance/tx.d.ts +44 -0
- package/lib/codec/insurance/tx.js +144 -0
- package/lib/codec/leverage/event.d.ts +21 -0
- package/lib/codec/leverage/event.js +100 -0
- package/lib/codec/leverage/export.d.ts +4 -0
- package/lib/codec/leverage/export.js +16 -0
- package/lib/codec/leverage/genesis.d.ts +24 -0
- package/lib/codec/leverage/genesis.js +64 -0
- package/lib/codec/leverage/leverage.d.ts +30 -0
- package/lib/codec/leverage/leverage.js +134 -0
- package/lib/codec/leverage/query.d.ts +70 -0
- package/lib/codec/leverage/query.js +234 -0
- package/lib/codec/leverage/tx.d.ts +43 -0
- package/lib/codec/leverage/tx.js +127 -0
- package/lib/codec/liquidation/export.d.ts +5 -0
- package/lib/codec/liquidation/export.js +17 -0
- package/lib/codec/liquidation/genesis.d.ts +37 -0
- package/lib/codec/liquidation/genesis.js +136 -0
- package/lib/codec/liquidation/liquidation.d.ts +17 -0
- package/lib/codec/liquidation/liquidation.js +46 -0
- package/lib/codec/liquidation/outstanding_position.d.ts +33 -0
- package/lib/codec/liquidation/outstanding_position.js +203 -0
- package/lib/codec/liquidation/query.d.ts +77 -0
- package/lib/codec/liquidation/query.js +341 -0
- package/lib/codec/liquidation/quote_changes.d.ts +22 -0
- package/lib/codec/liquidation/quote_changes.js +95 -0
- package/lib/codec/liquidation/tx.d.ts +12 -0
- package/lib/codec/liquidation/tx.js +20 -0
- package/lib/codec/liquiditypool/event.d.ts +182 -0
- package/lib/codec/liquiditypool/event.js +1268 -0
- package/lib/codec/liquiditypool/export.d.ts +6 -0
- package/lib/codec/liquiditypool/export.js +125 -0
- package/lib/codec/liquiditypool/genesis.d.ts +32 -0
- package/lib/codec/liquiditypool/genesis.js +228 -0
- package/lib/codec/liquiditypool/liquiditypool.d.ts +138 -0
- package/lib/codec/liquiditypool/liquiditypool.js +943 -0
- package/lib/codec/liquiditypool/proposal.d.ts +117 -0
- package/lib/codec/liquiditypool/proposal.js +697 -0
- package/lib/codec/liquiditypool/query.d.ts +370 -0
- package/lib/codec/liquiditypool/query.js +1738 -0
- package/lib/codec/liquiditypool/reward.d.ts +196 -0
- package/lib/codec/liquiditypool/reward.js +1204 -0
- package/lib/codec/liquiditypool/tx.d.ts +453 -0
- package/lib/codec/liquiditypool/tx.js +2423 -0
- package/lib/codec/lockproxy/event.d.ts +46 -0
- package/lib/codec/lockproxy/event.js +348 -0
- package/lib/codec/lockproxy/export.d.ts +5 -0
- package/lib/codec/lockproxy/export.js +28 -0
- package/lib/codec/lockproxy/genesis.d.ts +68 -0
- package/lib/codec/lockproxy/genesis.js +355 -0
- package/lib/codec/lockproxy/lockproxy.d.ts +22 -0
- package/lib/codec/lockproxy/lockproxy.js +147 -0
- package/lib/codec/lockproxy/query.d.ts +67 -0
- package/lib/codec/lockproxy/query.js +274 -0
- package/lib/codec/lockproxy/tx.d.ts +147 -0
- package/lib/codec/lockproxy/tx.js +808 -0
- package/lib/codec/market/event.d.ts +20 -0
- package/lib/codec/market/event.js +76 -0
- package/lib/codec/market/export.d.ts +6 -0
- package/lib/codec/market/export.js +61 -0
- package/lib/codec/market/fee.d.ts +123 -0
- package/lib/codec/market/fee.js +334 -0
- package/lib/codec/market/genesis.d.ts +31 -0
- package/lib/codec/market/genesis.js +147 -0
- package/lib/codec/market/legacy.d.ts +62 -0
- package/lib/codec/market/legacy.js +630 -0
- package/lib/codec/market/market.d.ts +131 -0
- package/lib/codec/market/market.js +1245 -0
- package/lib/codec/market/proposal.d.ts +46 -0
- package/lib/codec/market/proposal.js +245 -0
- package/lib/codec/market/query.d.ts +233 -0
- package/lib/codec/market/query.js +938 -0
- package/lib/codec/market/tx.d.ts +250 -0
- package/lib/codec/market/tx.js +1265 -0
- package/lib/codec/marketstats/export.d.ts +3 -0
- package/lib/codec/marketstats/export.js +12 -0
- package/lib/codec/marketstats/genesis.d.ts +21 -0
- package/lib/codec/marketstats/genesis.js +63 -0
- package/lib/codec/marketstats/marketstats.d.ts +31 -0
- package/lib/codec/marketstats/marketstats.js +258 -0
- package/lib/codec/marketstats/params.d.ts +18 -0
- package/lib/codec/marketstats/params.js +46 -0
- package/lib/codec/marketstats/query.d.ts +66 -0
- package/lib/codec/marketstats/query.js +195 -0
- package/lib/codec/marketstats/tx.d.ts +12 -0
- package/lib/codec/marketstats/tx.js +20 -0
- package/lib/codec/misc/block.d.ts +21 -0
- package/lib/codec/misc/block.js +105 -0
- package/lib/codec/misc/export.d.ts +6 -0
- package/lib/codec/misc/export.js +29 -0
- package/lib/codec/misc/message.d.ts +22 -0
- package/lib/codec/misc/message.js +128 -0
- package/lib/codec/misc/message_type.d.ts +18 -0
- package/lib/codec/misc/message_type.js +60 -0
- package/lib/codec/misc/query.d.ts +192 -0
- package/lib/codec/misc/query.js +884 -0
- package/lib/codec/misc/trade.d.ts +28 -0
- package/lib/codec/misc/trade.js +224 -0
- package/lib/codec/misc/transaction.d.ts +45 -0
- package/lib/codec/misc/transaction.js +369 -0
- package/lib/codec/oracle/event.d.ts +37 -0
- package/lib/codec/oracle/event.js +228 -0
- package/lib/codec/oracle/export.d.ts +6 -0
- package/lib/codec/oracle/export.js +58 -0
- package/lib/codec/oracle/genesis.d.ts +28 -0
- package/lib/codec/oracle/genesis.js +141 -0
- package/lib/codec/oracle/oracle.d.ts +94 -0
- package/lib/codec/oracle/oracle.js +650 -0
- package/lib/codec/oracle/proposal.d.ts +21 -0
- package/lib/codec/oracle/proposal.js +91 -0
- package/lib/codec/oracle/query.d.ts +336 -0
- package/lib/codec/oracle/query.js +1551 -0
- package/lib/codec/oracle/slashing.d.ts +33 -0
- package/lib/codec/oracle/slashing.js +191 -0
- package/lib/codec/oracle/tx.d.ts +169 -0
- package/lib/codec/oracle/tx.js +877 -0
- package/lib/codec/order/event.d.ts +23 -0
- package/lib/codec/order/event.js +146 -0
- package/lib/codec/order/export.d.ts +5 -0
- package/lib/codec/order/export.js +39 -0
- package/lib/codec/order/genesis.d.ts +62 -0
- package/lib/codec/order/genesis.js +322 -0
- package/lib/codec/order/order.d.ts +113 -0
- package/lib/codec/order/order.js +875 -0
- package/lib/codec/order/query.d.ts +143 -0
- package/lib/codec/order/query.js +596 -0
- package/lib/codec/order/tx.d.ts +146 -0
- package/lib/codec/order/tx.js +715 -0
- package/lib/codec/perpsliquidity/event.d.ts +115 -0
- package/lib/codec/perpsliquidity/event.js +657 -0
- package/lib/codec/perpsliquidity/genesis.d.ts +36 -0
- package/lib/codec/perpsliquidity/genesis.js +163 -0
- package/lib/codec/perpsliquidity/market.d.ts +84 -0
- package/lib/codec/perpsliquidity/market.js +431 -0
- package/lib/codec/perpsliquidity/params.d.ts +27 -0
- package/lib/codec/perpsliquidity/params.js +129 -0
- package/lib/codec/perpsliquidity/pool.d.ts +119 -0
- package/lib/codec/perpsliquidity/pool.js +774 -0
- package/lib/codec/perpsliquidity/query.d.ts +246 -0
- package/lib/codec/perpsliquidity/query.js +1125 -0
- package/lib/codec/perpsliquidity/tx.d.ts +203 -0
- package/lib/codec/perpsliquidity/tx.js +973 -0
- package/lib/codec/perpspool/event.d.ts +95 -0
- package/lib/codec/perpspool/event.js +561 -0
- package/lib/codec/perpspool/export.d.ts +7 -0
- package/lib/codec/perpspool/export.js +68 -0
- package/lib/codec/perpspool/genesis.d.ts +61 -0
- package/lib/codec/perpspool/genesis.js +343 -0
- package/lib/codec/perpspool/market.d.ts +96 -0
- package/lib/codec/perpspool/market.js +493 -0
- package/lib/codec/perpspool/params.d.ts +30 -0
- package/lib/codec/perpspool/params.js +189 -0
- package/lib/codec/perpspool/pool.d.ts +103 -0
- package/lib/codec/perpspool/pool.js +638 -0
- package/lib/codec/perpspool/query.d.ts +247 -0
- package/lib/codec/perpspool/query.js +1141 -0
- package/lib/codec/perpspool/tx.d.ts +229 -0
- package/lib/codec/perpspool/tx.js +1144 -0
- package/lib/codec/position/event.d.ts +26 -0
- package/lib/codec/position/event.js +180 -0
- package/lib/codec/position/export.d.ts +4 -0
- package/lib/codec/position/export.js +20 -0
- package/lib/codec/position/genesis.d.ts +24 -0
- package/lib/codec/position/genesis.js +64 -0
- package/lib/codec/position/position.d.ts +74 -0
- package/lib/codec/position/position.js +601 -0
- package/lib/codec/position/query.d.ts +92 -0
- package/lib/codec/position/query.js +400 -0
- package/lib/codec/position/tx.d.ts +42 -0
- package/lib/codec/position/tx.js +127 -0
- package/lib/codec/pricing/event.d.ts +74 -0
- package/lib/codec/pricing/event.js +361 -0
- package/lib/codec/pricing/export.d.ts +6 -0
- package/lib/codec/pricing/export.js +45 -0
- package/lib/codec/pricing/genesis.d.ts +26 -0
- package/lib/codec/pricing/genesis.js +95 -0
- package/lib/codec/pricing/legacy.d.ts +22 -0
- package/lib/codec/pricing/legacy.js +93 -0
- package/lib/codec/pricing/pricing.d.ts +60 -0
- package/lib/codec/pricing/pricing.js +456 -0
- package/lib/codec/pricing/proposal.d.ts +31 -0
- package/lib/codec/pricing/proposal.js +148 -0
- package/lib/codec/pricing/query.d.ts +183 -0
- package/lib/codec/pricing/query.js +759 -0
- package/lib/codec/pricing/tx.d.ts +131 -0
- package/lib/codec/pricing/tx.js +529 -0
- package/lib/codec/profile/event.d.ts +20 -0
- package/lib/codec/profile/event.js +78 -0
- package/lib/codec/profile/export.d.ts +4 -0
- package/lib/codec/profile/export.js +17 -0
- package/lib/codec/profile/genesis.d.ts +24 -0
- package/lib/codec/profile/genesis.js +64 -0
- package/lib/codec/profile/profile.d.ts +20 -0
- package/lib/codec/profile/profile.js +83 -0
- package/lib/codec/profile/query.d.ts +92 -0
- package/lib/codec/profile/query.js +360 -0
- package/lib/codec/profile/tx.d.ts +43 -0
- package/lib/codec/profile/tx.js +127 -0
- package/lib/codec/query/pagination.d.ts +29 -0
- package/lib/codec/query/pagination.js +126 -0
- package/lib/codec/sequence/export.d.ts +3 -0
- package/lib/codec/sequence/export.js +13 -0
- package/lib/codec/sequence/genesis.d.ts +30 -0
- package/lib/codec/sequence/genesis.js +122 -0
- package/lib/codec/sequence/query.d.ts +63 -0
- package/lib/codec/sequence/query.js +208 -0
- package/lib/codec/sequence/tx.d.ts +41 -0
- package/lib/codec/sequence/tx.js +148 -0
- package/lib/codec/subaccount/export.d.ts +4 -0
- package/lib/codec/subaccount/export.js +35 -0
- package/lib/codec/subaccount/genesis.d.ts +28 -0
- package/lib/codec/subaccount/genesis.js +110 -0
- package/lib/codec/subaccount/legacy.d.ts +19 -0
- package/lib/codec/subaccount/legacy.js +72 -0
- package/lib/codec/subaccount/query.d.ts +229 -0
- package/lib/codec/subaccount/query.js +1026 -0
- package/lib/codec/subaccount/subaccount.d.ts +57 -0
- package/lib/codec/subaccount/subaccount.js +349 -0
- package/lib/codec/subaccount/tx.d.ts +92 -0
- package/lib/codec/subaccount/tx.js +395 -0
- package/lib/constant/amino.d.ts +0 -0
- package/lib/constant/amino.js +1 -0
- package/lib/constant/generic.d.ts +10 -0
- package/lib/constant/ibc.js +6 -0
- package/lib/constant/index.d.ts +2 -0
- package/lib/constant/index.js +2 -0
- package/lib/constant/network.d.ts +1 -1
- package/lib/constant/network.js +2 -2
- package/lib/constant/walletProvider.d.ts +2 -1
- package/lib/constant/walletProvider.js +1 -0
- package/lib/eth/abis/axelarBridge.json +1150 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +4 -1
- package/lib/insights/common.d.ts +0 -8
- package/lib/insights/common.js +0 -4
- package/lib/insights/competition.d.ts +4 -42
- package/lib/insights/funding.d.ts +0 -12
- package/lib/insights/user.d.ts +1 -29
- package/lib/modules/admin.d.ts +5 -0
- package/lib/modules/admin.js +8 -1
- package/lib/modules/feemarket.d.ts +20 -0
- package/lib/modules/feemarket.js +45 -0
- package/lib/modules/ibc.d.ts +1 -1
- package/lib/modules/ibc.js +5 -9
- package/lib/modules/oracle.d.ts +7 -0
- package/lib/modules/oracle.js +27 -0
- package/lib/modules/perpsliquidity.d.ts +49 -0
- package/lib/modules/perpsliquidity.js +118 -0
- package/lib/modules/vault.d.ts +56 -0
- package/lib/modules/vault.js +128 -0
- package/lib/modules/xchain.d.ts +1 -0
- package/lib/modules/xchain.js +16 -0
- package/lib/provider/amino/types/bridge.d.ts +4 -0
- package/lib/provider/amino/types/bridge.js +38 -0
- package/lib/provider/amino/types/gov.js +66 -98
- package/lib/provider/amino/types/oracle.js +39 -1
- package/lib/provider/amino/types/order.js +2 -2
- package/lib/provider/amino/types/perpsliquidity.d.ts +4 -0
- package/lib/provider/amino/types/perpsliquidity.js +73 -0
- package/lib/provider/amino/types/signless.js +13 -9
- package/lib/provider/index.d.ts +4 -1
- package/lib/provider/index.js +5 -1
- package/lib/provider/keplr/KeplrAccount.js +20 -28
- package/lib/provider/leap/LeapAccount.d.ts +1 -1
- package/lib/provider/leap/LeapAccount.js +2 -59
- package/lib/provider/leap/index.d.ts +1 -1
- package/lib/provider/metamask/MetaMask.d.ts +10 -26
- package/lib/provider/metamask/MetaMask.js +27 -177
- package/lib/provider/metamask/index.d.ts +1 -1
- package/lib/provider/o3/O3Wallet.js +0 -3
- package/lib/provider/rainbowKit/RainbowKitAccount.d.ts +3 -8
- 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.d.ts +1 -1
- package/lib/util/ethermint.d.ts +0 -1
- package/lib/util/ethermint.js +1 -45
- package/lib/util/gov.js +30 -0
- package/lib/util/index.d.ts +0 -1
- package/lib/util/index.js +1 -2
- package/lib/util/signless.d.ts +1 -1
- package/lib/util/signless.js +1 -1
- package/lib/util/tx.d.ts +11 -8
- package/lib/util/tx.js +1 -0
- package/lib/wallet/CarbonSigner.d.ts +3 -9
- package/lib/wallet/CarbonSigner.js +0 -23
- package/lib/wallet/CarbonWallet.d.ts +6 -3
- package/lib/wallet/CarbonWallet.js +9 -4
- package/package.json +3 -3
- package/lib/codec/cosmos/consensus/v1/export.d.ts +0 -2
- package/lib/codec/cosmos/consensus/v1/export.js +0 -9
- package/lib/provider/leap/types.d.ts +0 -59
- package/lib/provider/leap/types.js +0 -11
package/lib/CarbonSDK.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { CarbonSigner, CarbonWallet, CarbonWalletGenericOpts, MetaMaskWalletOpts
|
|
|
15
15
|
export { CarbonTx } from "./util";
|
|
16
16
|
export { CarbonSigner, CarbonSignerTypes, CarbonWallet, CarbonWalletGenericOpts, CarbonWalletInitOpts } from "./wallet";
|
|
17
17
|
export * as Carbon from "./codec/carbon-models";
|
|
18
|
+
import RainbowKitAccount, { RainbowKitWalletOpts } from "./provider/rainbowKit/RainbowKitAccount";
|
|
18
19
|
export interface CarbonSDKOpts {
|
|
19
20
|
network: Network;
|
|
20
21
|
tmClient: Tendermint37Client;
|
|
@@ -114,6 +115,7 @@ declare class CarbonSDK {
|
|
|
114
115
|
static instanceWithKeplr(keplr: Keplr, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
115
116
|
static instanceWithLeap(leap: LeapExtended, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
116
117
|
static instanceWithMetamask(metamask: MetaMask, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts, metamaskWalletOpts?: MetaMaskWalletOpts): Promise<ConnectedCarbonSDK>;
|
|
118
|
+
static instanceWithRainbowKit(rainbowKit: RainbowKitAccount, sdkOpts: CarbonSDKInitOpts | undefined, rainbowKitWalletOpts: RainbowKitWalletOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
117
119
|
static instanceViewOnly(bech32Address: string, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
118
120
|
initialize(): Promise<CarbonSDK>;
|
|
119
121
|
getGasFee(): Promise<GasFee>;
|
|
@@ -128,6 +130,7 @@ declare class CarbonSDK {
|
|
|
128
130
|
connectWithKeplr(keplr: Keplr, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
129
131
|
connectWithLeap(leap: LeapExtended, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
130
132
|
connectWithMetamask(metamask: MetaMask, opts?: CarbonWalletGenericOpts, metamaskWalletOpts?: MetaMaskWalletOpts): Promise<ConnectedCarbonSDK>;
|
|
133
|
+
connectWithRainbowKit(rainbowKit: RainbowKitAccount, rainbowKitWalletOpts: RainbowKitWalletOpts, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
131
134
|
connectViewOnly(bech32Address: string, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
132
135
|
getConfig(): NetworkConfig;
|
|
133
136
|
getTokenClient(): TokenClient;
|
package/lib/CarbonSDK.js
CHANGED
|
@@ -232,6 +232,12 @@ class CarbonSDK {
|
|
|
232
232
|
return sdk.connectWithMetamask(metamask, walletOpts, metamaskWalletOpts);
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
+
static instanceWithRainbowKit(rainbowKit, sdkOpts = DEFAULT_SDK_INIT_OPTS, rainbowKitWalletOpts, walletOpts) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
238
|
+
return sdk.connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, walletOpts);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
235
241
|
static instanceViewOnly(bech32Address, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
236
242
|
return __awaiter(this, void 0, void 0, function* () {
|
|
237
243
|
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
@@ -394,6 +400,17 @@ class CarbonSDK {
|
|
|
394
400
|
return this.connect(wallet);
|
|
395
401
|
});
|
|
396
402
|
}
|
|
403
|
+
connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, opts) {
|
|
404
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
+
const evmChainId = this.evmChainId;
|
|
406
|
+
const addressOptions = {
|
|
407
|
+
network: this.networkConfig.network,
|
|
408
|
+
bech32Prefix: this.networkConfig.Bech32Prefix,
|
|
409
|
+
};
|
|
410
|
+
const wallet = wallet_1.CarbonWallet.withRainbowKit(rainbowKit, evmChainId, rainbowKitWalletOpts.publicKeyBase64, addressOptions, rainbowKitWalletOpts.walletProvider, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
|
|
411
|
+
return this.connect(wallet);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
397
414
|
connectViewOnly(bech32Address, opts) {
|
|
398
415
|
return __awaiter(this, void 0, void 0, function* () {
|
|
399
416
|
const wallet = wallet_1.CarbonWallet.withAddress(bech32Address, Object.assign(Object.assign({}, opts), { network: this.network, config: this.configOverride }));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import CarbonSDK from "../CarbonSDK";
|
|
2
|
+
import { NetworkConfigProvider } from "../constant";
|
|
3
|
+
import { CarbonTx } from "../util";
|
|
4
|
+
import { Coin } from "@cosmjs/stargate";
|
|
5
|
+
import BigNumber from "bignumber.js";
|
|
6
|
+
import { ethers } from "ethers";
|
|
7
|
+
export interface AxelarBridgeClientOpts {
|
|
8
|
+
configProvider: NetworkConfigProvider;
|
|
9
|
+
}
|
|
10
|
+
export interface DepositParams {
|
|
11
|
+
contractAddress: string;
|
|
12
|
+
senderAddress: string;
|
|
13
|
+
receiverAddress: string;
|
|
14
|
+
amount: BigNumber;
|
|
15
|
+
depositTokenExternalAddress: string;
|
|
16
|
+
rpcUrl: string;
|
|
17
|
+
gasPriceGwei?: BigNumber;
|
|
18
|
+
gasLimit?: BigNumber;
|
|
19
|
+
signer: ethers.Signer;
|
|
20
|
+
nonce?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface WithdrawParams {
|
|
23
|
+
connectionId: string;
|
|
24
|
+
receiver: string;
|
|
25
|
+
tokens: Coin;
|
|
26
|
+
relayFee: Coin;
|
|
27
|
+
expirySeconds: number;
|
|
28
|
+
}
|
|
29
|
+
export interface EthersTransactionResponse extends ethers.Transaction {
|
|
30
|
+
wait: () => Promise<ethers.Transaction>;
|
|
31
|
+
}
|
|
32
|
+
export declare class AxelarBridgeClient {
|
|
33
|
+
readonly configProvider: NetworkConfigProvider;
|
|
34
|
+
private constructor();
|
|
35
|
+
static instance(opts: AxelarBridgeClientOpts): AxelarBridgeClient;
|
|
36
|
+
deposit(params: DepositParams): Promise<EthersTransactionResponse>;
|
|
37
|
+
withdraw(api: CarbonSDK, params: WithdrawParams, opts?: CarbonTx.SignTxOpts): Promise<import("../CarbonSDK").CarbonWallet.SendTxResponse>;
|
|
38
|
+
}
|
|
39
|
+
export default AxelarBridgeClient;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AxelarBridgeClient = void 0;
|
|
16
|
+
const codec_1 = require("../codec");
|
|
17
|
+
const eth_1 = require("../eth");
|
|
18
|
+
const util_1 = require("../util");
|
|
19
|
+
const ethers_1 = require("ethers");
|
|
20
|
+
const long_1 = __importDefault(require("long"));
|
|
21
|
+
class AxelarBridgeClient {
|
|
22
|
+
constructor(configProvider) {
|
|
23
|
+
this.configProvider = configProvider;
|
|
24
|
+
}
|
|
25
|
+
static instance(opts) {
|
|
26
|
+
const { configProvider } = opts;
|
|
27
|
+
return new AxelarBridgeClient(configProvider);
|
|
28
|
+
}
|
|
29
|
+
// lock deposit
|
|
30
|
+
deposit(params) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { contractAddress, senderAddress, receiverAddress, depositTokenExternalAddress, amount, signer, rpcUrl } = params;
|
|
33
|
+
const rpcProvider = new ethers_1.ethers.providers.JsonRpcProvider(rpcUrl);
|
|
34
|
+
const contract = new ethers_1.ethers.Contract(contractAddress, eth_1.ABIs.axelarBridge, rpcProvider);
|
|
35
|
+
return yield contract.connect(signer).deposit(senderAddress, // tokenSender
|
|
36
|
+
receiverAddress, // carbonReceiver bech32Address
|
|
37
|
+
depositTokenExternalAddress, // asset
|
|
38
|
+
amount.toString(10));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
withdraw(api, params, opts) {
|
|
42
|
+
var _a;
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
const { connectionId, receiver, tokens, relayFee, expirySeconds, } = params;
|
|
45
|
+
const wallet = api.getConnectedWallet();
|
|
46
|
+
const walletAddress = (_a = wallet.bech32Address) !== null && _a !== void 0 ? _a : '';
|
|
47
|
+
const expiryDuration = codec_1.Duration.fromPartial({
|
|
48
|
+
seconds: new long_1.default(expirySeconds),
|
|
49
|
+
});
|
|
50
|
+
const value = codec_1.Carbon.Bridge.MsgWithdrawToken.fromPartial({
|
|
51
|
+
creator: walletAddress,
|
|
52
|
+
connectionId,
|
|
53
|
+
receiver,
|
|
54
|
+
tokens,
|
|
55
|
+
relayFee,
|
|
56
|
+
expiryDuration,
|
|
57
|
+
});
|
|
58
|
+
return yield wallet.sendTx({
|
|
59
|
+
typeUrl: util_1.CarbonTx.Types.MsgWithdrawToken,
|
|
60
|
+
value,
|
|
61
|
+
}, opts);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.AxelarBridgeClient = AxelarBridgeClient;
|
|
66
|
+
exports.default = AxelarBridgeClient;
|
|
@@ -18,8 +18,6 @@ declare class InsightsQueryClient {
|
|
|
18
18
|
UserPnl(req: Insights.QueryGetUserPnlPathParams, query: Insights.QueryGetUserPnlGraphQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserPnlResponse>>;
|
|
19
19
|
UserBalanceGraph(req: Insights.QueryGetUserBalanceGraphPathParams, query: Insights.QueryGetUserBalanceGraphQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserBalanceGraphResponse>>;
|
|
20
20
|
UserPnlGraph(req: Insights.QueryGetUserPnlGraphPathParams, query: Insights.QueryGetUserPnlGraphQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserPnlGraphResponse>>;
|
|
21
|
-
UserFundings(req: Insights.QueryGetUserFundingsPathParams, query: Insights.QueryGetUserFundingsQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserFundingsResponse>>;
|
|
22
|
-
UserFundingBreakdown(req: Insights.QueryGetFundingBreakdownChartPathParams, query: Insights.QueryGetFundingBreakdownChartQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetFundingBreakdownChartResponse>>;
|
|
23
21
|
Pools(req?: Insights.QueryGetPoolsRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsResponse>>;
|
|
24
22
|
PoolHistory(query: Insights.QueryGetPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolHistoryResponse>>;
|
|
25
23
|
PerpPoolHistory(query: Insights.QueryGetPerpPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPerpPoolHistoryResponse>>;
|
|
@@ -40,7 +38,6 @@ declare class InsightsQueryClient {
|
|
|
40
38
|
PNLCompetitionLeaderboard(req: Insights.QueryGetPNLCompetitionLeaderboardRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPNLCompetitionLeaderboardResponse>>;
|
|
41
39
|
LotteryCompetitionLeaderboard(req: Insights.QueryGetLotteryCompetitionLeaderboardRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetLotteryCompetitionLeaderboardResponse>>;
|
|
42
40
|
LeagueCompetitionLeaderboard(req: Insights.QueryGetLeagueCompetitionLeaderboardRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetLeagueCompetitionLeaderboardResponse>>;
|
|
43
|
-
CosmosCompetitionLeaderboard(req: Insights.QueryGetCosmosCompetitionLeaderboardRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetCosmosCompetitionLeaderboardResponse>>;
|
|
44
41
|
PoolsLiquidity(req?: Insights.QueryGetPoolsLiquidityRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsLiquidityResponse>>;
|
|
45
42
|
MarketsVolume(req?: Insights.QueryGetMarketVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetMarketVolumeResponse>>;
|
|
46
43
|
CarbonCreditsRewards(req: Insights.QueryCarbonCreditsRewardsRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryCarbonCreditsRewardsResponse>>;
|
|
@@ -60,7 +57,6 @@ declare class InsightsQueryClient {
|
|
|
60
57
|
DenomToGeckoIdMap(): Promise<Insights.InsightsQueryResponse<Insights.QueryDenomToGeckoIdMap>>;
|
|
61
58
|
FundingHistory(query: Insights.QueryGetFundingHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetFundingHistoryResponse>>;
|
|
62
59
|
HistoricalFundingHistory(query: Insights.QueryGetFundingRateRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetFundingRateResponse>>;
|
|
63
|
-
FundingHistoryGraphData(query: Insights.QueryGetFundingHistoryGraphDataRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetFundingHistoryGraphDataResponse>>;
|
|
64
60
|
ProposalVotes(req: Insights.GetProposalVotesPathParams, query: Insights.GetProposalVotesQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetProposalVotesResponse>>;
|
|
65
61
|
Delegations(req: Insights.GetDelegationsPathParams, query: Insights.GetDelegationsQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetDelegationsResponse>>;
|
|
66
62
|
OraclePrices(req?: Insights.QueryGetOraclesPriceRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetOraclesPriceResponse>>;
|
|
@@ -140,20 +140,6 @@ class InsightsQueryClient {
|
|
|
140
140
|
return response.data;
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
UserFundings(req, query) {
|
|
144
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
-
const request = this.apiManager.path("user/fundings", req, query);
|
|
146
|
-
const response = yield request.get();
|
|
147
|
-
return response.data;
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
UserFundingBreakdown(req, query) {
|
|
151
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
const request = this.apiManager.path("user/funding/breakdown", req, query);
|
|
153
|
-
const response = yield request.get();
|
|
154
|
-
return response.data;
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
143
|
// Pool api
|
|
158
144
|
Pools(req = {}) {
|
|
159
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -289,23 +275,12 @@ class InsightsQueryClient {
|
|
|
289
275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
290
276
|
const queryParams = {
|
|
291
277
|
competitionId: req.competitionId,
|
|
292
|
-
subCompetitionId: req.subCompetitionId,
|
|
293
278
|
};
|
|
294
279
|
const request = this.apiManager.path("competition/leaderboardleague", {}, queryParams);
|
|
295
280
|
const response = yield request.get();
|
|
296
281
|
return response.data;
|
|
297
282
|
});
|
|
298
283
|
}
|
|
299
|
-
CosmosCompetitionLeaderboard(req) {
|
|
300
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
-
const queryParams = {
|
|
302
|
-
competitionId: req.competitionId,
|
|
303
|
-
};
|
|
304
|
-
const request = this.apiManager.path("competition/leaderboardcosmos", {}, queryParams);
|
|
305
|
-
const response = yield request.get();
|
|
306
|
-
return response.data;
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
284
|
PoolsLiquidity(req = {}) {
|
|
310
285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
311
286
|
const queryParams = {
|
|
@@ -503,16 +478,6 @@ class InsightsQueryClient {
|
|
|
503
478
|
return response.data;
|
|
504
479
|
});
|
|
505
480
|
}
|
|
506
|
-
FundingHistoryGraphData(query) {
|
|
507
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
508
|
-
const request = this.apiManager.path("market/funding/history/chart", {}, {
|
|
509
|
-
market: query.market,
|
|
510
|
-
period: query.period,
|
|
511
|
-
});
|
|
512
|
-
const response = yield request.get();
|
|
513
|
-
return response.data;
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
481
|
ProposalVotes(req, query) {
|
|
517
482
|
return __awaiter(this, void 0, void 0, function* () {
|
|
518
483
|
const request = this.apiManager.path("proposal/votes", req, query);
|
package/lib/clients/ZILClient.js
CHANGED
|
@@ -288,12 +288,12 @@ class ZILClient {
|
|
|
288
288
|
{
|
|
289
289
|
vname: "amount",
|
|
290
290
|
type: "Uint256",
|
|
291
|
-
value: amount.toString(
|
|
291
|
+
value: amount.toString(),
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
vname: "withdrawFeeAmount",
|
|
295
295
|
type: "Uint256",
|
|
296
|
-
value: feeAmount.toString(
|
|
296
|
+
value: feeAmount.toString(),
|
|
297
297
|
},
|
|
298
298
|
];
|
|
299
299
|
const data = {
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { CoinSpent, CoinReceived, CoinSent, CoinMint, CoinBurn } from "./event";
|
|
2
|
-
export { InternalTransfer, Coin, QueryInternalTransfersRequest, QueryInternalTransfersResponse
|
|
3
|
-
export { MsgBlacklistAddress, MsgBlacklistAddressResponse, MsgUnblacklistAddress, MsgUnblacklistAddressResponse } from "./tx";
|
|
2
|
+
export { InternalTransfer, Coin, QueryInternalTransfersRequest, QueryInternalTransfersResponse } from "./query";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.QueryInternalTransfersResponse = exports.QueryInternalTransfersRequest = exports.Coin = exports.InternalTransfer = exports.CoinBurn = exports.CoinMint = exports.CoinSent = exports.CoinReceived = exports.CoinSpent = void 0;
|
|
4
4
|
var event_1 = require("./event");
|
|
5
5
|
Object.defineProperty(exports, "CoinSpent", { enumerable: true, get: function () { return event_1.CoinSpent; } });
|
|
6
6
|
Object.defineProperty(exports, "CoinReceived", { enumerable: true, get: function () { return event_1.CoinReceived; } });
|
|
@@ -12,12 +12,3 @@ Object.defineProperty(exports, "InternalTransfer", { enumerable: true, get: func
|
|
|
12
12
|
Object.defineProperty(exports, "Coin", { enumerable: true, get: function () { return query_1.Coin; } });
|
|
13
13
|
Object.defineProperty(exports, "QueryInternalTransfersRequest", { enumerable: true, get: function () { return query_1.QueryInternalTransfersRequest; } });
|
|
14
14
|
Object.defineProperty(exports, "QueryInternalTransfersResponse", { enumerable: true, get: function () { return query_1.QueryInternalTransfersResponse; } });
|
|
15
|
-
Object.defineProperty(exports, "QueryBlacklistRequest", { enumerable: true, get: function () { return query_1.QueryBlacklistRequest; } });
|
|
16
|
-
Object.defineProperty(exports, "QueryBlacklistResponse", { enumerable: true, get: function () { return query_1.QueryBlacklistResponse; } });
|
|
17
|
-
Object.defineProperty(exports, "QueryBlacklistAllRequest", { enumerable: true, get: function () { return query_1.QueryBlacklistAllRequest; } });
|
|
18
|
-
Object.defineProperty(exports, "QueryBlacklistAllResponse", { enumerable: true, get: function () { return query_1.QueryBlacklistAllResponse; } });
|
|
19
|
-
var tx_1 = require("./tx");
|
|
20
|
-
Object.defineProperty(exports, "MsgBlacklistAddress", { enumerable: true, get: function () { return tx_1.MsgBlacklistAddress; } });
|
|
21
|
-
Object.defineProperty(exports, "MsgBlacklistAddressResponse", { enumerable: true, get: function () { return tx_1.MsgBlacklistAddressResponse; } });
|
|
22
|
-
Object.defineProperty(exports, "MsgUnblacklistAddress", { enumerable: true, get: function () { return tx_1.MsgUnblacklistAddress; } });
|
|
23
|
-
Object.defineProperty(exports, "MsgUnblacklistAddressResponse", { enumerable: true, get: function () { return tx_1.MsgUnblacklistAddressResponse; } });
|
|
@@ -3,14 +3,13 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
export declare const protobufPackage = "Switcheo.carbon.bank";
|
|
4
4
|
/** GenesisState defines the bank module's genesis state. */
|
|
5
5
|
export interface GenesisState {
|
|
6
|
-
blacklistedAddresses: string[];
|
|
7
6
|
}
|
|
8
7
|
export declare const GenesisState: {
|
|
9
|
-
encode(
|
|
8
|
+
encode(_: GenesisState, writer?: _m0.Writer): _m0.Writer;
|
|
10
9
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState;
|
|
11
|
-
fromJSON(
|
|
12
|
-
toJSON(
|
|
13
|
-
fromPartial(
|
|
10
|
+
fromJSON(_: any): GenesisState;
|
|
11
|
+
toJSON(_: GenesisState): unknown;
|
|
12
|
+
fromPartial(_: DeepPartial<GenesisState>): GenesisState;
|
|
14
13
|
};
|
|
15
14
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
16
15
|
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
@@ -8,25 +8,18 @@ exports.GenesisState = exports.protobufPackage = void 0;
|
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
10
|
exports.protobufPackage = "Switcheo.carbon.bank";
|
|
11
|
-
const baseGenesisState = {
|
|
11
|
+
const baseGenesisState = {};
|
|
12
12
|
exports.GenesisState = {
|
|
13
|
-
encode(
|
|
14
|
-
for (const v of message.blacklistedAddresses) {
|
|
15
|
-
writer.uint32(10).string(v);
|
|
16
|
-
}
|
|
13
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
17
14
|
return writer;
|
|
18
15
|
},
|
|
19
16
|
decode(input, length) {
|
|
20
17
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
21
18
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
22
19
|
const message = Object.assign({}, baseGenesisState);
|
|
23
|
-
message.blacklistedAddresses = [];
|
|
24
20
|
while (reader.pos < end) {
|
|
25
21
|
const tag = reader.uint32();
|
|
26
22
|
switch (tag >>> 3) {
|
|
27
|
-
case 1:
|
|
28
|
-
message.blacklistedAddresses.push(reader.string());
|
|
29
|
-
break;
|
|
30
23
|
default:
|
|
31
24
|
reader.skipType(tag & 7);
|
|
32
25
|
break;
|
|
@@ -34,26 +27,16 @@ exports.GenesisState = {
|
|
|
34
27
|
}
|
|
35
28
|
return message;
|
|
36
29
|
},
|
|
37
|
-
fromJSON(
|
|
38
|
-
var _a;
|
|
30
|
+
fromJSON(_) {
|
|
39
31
|
const message = Object.assign({}, baseGenesisState);
|
|
40
|
-
message.blacklistedAddresses = ((_a = object.blacklistedAddresses) !== null && _a !== void 0 ? _a : []).map((e) => String(e));
|
|
41
32
|
return message;
|
|
42
33
|
},
|
|
43
|
-
toJSON(
|
|
34
|
+
toJSON(_) {
|
|
44
35
|
const obj = {};
|
|
45
|
-
if (message.blacklistedAddresses) {
|
|
46
|
-
obj.blacklistedAddresses = message.blacklistedAddresses.map((e) => e);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
obj.blacklistedAddresses = [];
|
|
50
|
-
}
|
|
51
36
|
return obj;
|
|
52
37
|
},
|
|
53
|
-
fromPartial(
|
|
54
|
-
var _a;
|
|
38
|
+
fromPartial(_) {
|
|
55
39
|
const message = Object.assign({}, baseGenesisState);
|
|
56
|
-
message.blacklistedAddresses = ((_a = object.blacklistedAddresses) !== null && _a !== void 0 ? _a : []).map((e) => e);
|
|
57
40
|
return message;
|
|
58
41
|
},
|
|
59
42
|
};
|
|
@@ -29,17 +29,6 @@ export interface QueryInternalTransfersResponse {
|
|
|
29
29
|
internalTransfers: InternalTransfer[];
|
|
30
30
|
pagination?: PageResponse;
|
|
31
31
|
}
|
|
32
|
-
export interface QueryBlacklistRequest {
|
|
33
|
-
address: string;
|
|
34
|
-
}
|
|
35
|
-
export interface QueryBlacklistResponse {
|
|
36
|
-
isBlacklisted: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface QueryBlacklistAllRequest {
|
|
39
|
-
}
|
|
40
|
-
export interface QueryBlacklistAllResponse {
|
|
41
|
-
address: string[];
|
|
42
|
-
}
|
|
43
32
|
export declare const InternalTransfer: {
|
|
44
33
|
encode(message: InternalTransfer, writer?: _m0.Writer): _m0.Writer;
|
|
45
34
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InternalTransfer;
|
|
@@ -68,49 +57,15 @@ export declare const QueryInternalTransfersResponse: {
|
|
|
68
57
|
toJSON(message: QueryInternalTransfersResponse): unknown;
|
|
69
58
|
fromPartial(object: DeepPartial<QueryInternalTransfersResponse>): QueryInternalTransfersResponse;
|
|
70
59
|
};
|
|
71
|
-
export declare const QueryBlacklistRequest: {
|
|
72
|
-
encode(message: QueryBlacklistRequest, writer?: _m0.Writer): _m0.Writer;
|
|
73
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistRequest;
|
|
74
|
-
fromJSON(object: any): QueryBlacklistRequest;
|
|
75
|
-
toJSON(message: QueryBlacklistRequest): unknown;
|
|
76
|
-
fromPartial(object: DeepPartial<QueryBlacklistRequest>): QueryBlacklistRequest;
|
|
77
|
-
};
|
|
78
|
-
export declare const QueryBlacklistResponse: {
|
|
79
|
-
encode(message: QueryBlacklistResponse, writer?: _m0.Writer): _m0.Writer;
|
|
80
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistResponse;
|
|
81
|
-
fromJSON(object: any): QueryBlacklistResponse;
|
|
82
|
-
toJSON(message: QueryBlacklistResponse): unknown;
|
|
83
|
-
fromPartial(object: DeepPartial<QueryBlacklistResponse>): QueryBlacklistResponse;
|
|
84
|
-
};
|
|
85
|
-
export declare const QueryBlacklistAllRequest: {
|
|
86
|
-
encode(_: QueryBlacklistAllRequest, writer?: _m0.Writer): _m0.Writer;
|
|
87
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistAllRequest;
|
|
88
|
-
fromJSON(_: any): QueryBlacklistAllRequest;
|
|
89
|
-
toJSON(_: QueryBlacklistAllRequest): unknown;
|
|
90
|
-
fromPartial(_: DeepPartial<QueryBlacklistAllRequest>): QueryBlacklistAllRequest;
|
|
91
|
-
};
|
|
92
|
-
export declare const QueryBlacklistAllResponse: {
|
|
93
|
-
encode(message: QueryBlacklistAllResponse, writer?: _m0.Writer): _m0.Writer;
|
|
94
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistAllResponse;
|
|
95
|
-
fromJSON(object: any): QueryBlacklistAllResponse;
|
|
96
|
-
toJSON(message: QueryBlacklistAllResponse): unknown;
|
|
97
|
-
fromPartial(object: DeepPartial<QueryBlacklistAllResponse>): QueryBlacklistAllResponse;
|
|
98
|
-
};
|
|
99
60
|
/** Query defines the gRPC querier service. */
|
|
100
61
|
export interface Query {
|
|
101
62
|
/** this line is used by starport scaffolding # 2 */
|
|
102
63
|
InternalTransfers(request: QueryInternalTransfersRequest): Promise<QueryInternalTransfersResponse>;
|
|
103
|
-
/** Get whether a specific address is blacklisted. */
|
|
104
|
-
Blacklist(request: QueryBlacklistRequest): Promise<QueryBlacklistResponse>;
|
|
105
|
-
/** Queries a list of blacklist items. */
|
|
106
|
-
BlacklistAll(request: QueryBlacklistAllRequest): Promise<QueryBlacklistAllResponse>;
|
|
107
64
|
}
|
|
108
65
|
export declare class QueryClientImpl implements Query {
|
|
109
66
|
private readonly rpc;
|
|
110
67
|
constructor(rpc: Rpc);
|
|
111
68
|
InternalTransfers(request: QueryInternalTransfersRequest): Promise<QueryInternalTransfersResponse>;
|
|
112
|
-
Blacklist(request: QueryBlacklistRequest): Promise<QueryBlacklistResponse>;
|
|
113
|
-
BlacklistAll(request: QueryBlacklistAllRequest): Promise<QueryBlacklistAllResponse>;
|
|
114
69
|
}
|
|
115
70
|
interface Rpc {
|
|
116
71
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
@@ -3,7 +3,7 @@ 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
|
-
exports.QueryClientImpl = exports.
|
|
6
|
+
exports.QueryClientImpl = exports.QueryInternalTransfersResponse = exports.QueryInternalTransfersRequest = exports.Coin = exports.InternalTransfer = exports.protobufPackage = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -417,200 +417,16 @@ exports.QueryInternalTransfersResponse = {
|
|
|
417
417
|
return message;
|
|
418
418
|
},
|
|
419
419
|
};
|
|
420
|
-
const baseQueryBlacklistRequest = { address: "" };
|
|
421
|
-
exports.QueryBlacklistRequest = {
|
|
422
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
423
|
-
if (message.address !== "") {
|
|
424
|
-
writer.uint32(10).string(message.address);
|
|
425
|
-
}
|
|
426
|
-
return writer;
|
|
427
|
-
},
|
|
428
|
-
decode(input, length) {
|
|
429
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
430
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
431
|
-
const message = Object.assign({}, baseQueryBlacklistRequest);
|
|
432
|
-
while (reader.pos < end) {
|
|
433
|
-
const tag = reader.uint32();
|
|
434
|
-
switch (tag >>> 3) {
|
|
435
|
-
case 1:
|
|
436
|
-
message.address = reader.string();
|
|
437
|
-
break;
|
|
438
|
-
default:
|
|
439
|
-
reader.skipType(tag & 7);
|
|
440
|
-
break;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
return message;
|
|
444
|
-
},
|
|
445
|
-
fromJSON(object) {
|
|
446
|
-
const message = Object.assign({}, baseQueryBlacklistRequest);
|
|
447
|
-
message.address =
|
|
448
|
-
object.address !== undefined && object.address !== null
|
|
449
|
-
? String(object.address)
|
|
450
|
-
: "";
|
|
451
|
-
return message;
|
|
452
|
-
},
|
|
453
|
-
toJSON(message) {
|
|
454
|
-
const obj = {};
|
|
455
|
-
message.address !== undefined && (obj.address = message.address);
|
|
456
|
-
return obj;
|
|
457
|
-
},
|
|
458
|
-
fromPartial(object) {
|
|
459
|
-
var _a;
|
|
460
|
-
const message = Object.assign({}, baseQueryBlacklistRequest);
|
|
461
|
-
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
|
|
462
|
-
return message;
|
|
463
|
-
},
|
|
464
|
-
};
|
|
465
|
-
const baseQueryBlacklistResponse = { isBlacklisted: false };
|
|
466
|
-
exports.QueryBlacklistResponse = {
|
|
467
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
468
|
-
if (message.isBlacklisted === true) {
|
|
469
|
-
writer.uint32(8).bool(message.isBlacklisted);
|
|
470
|
-
}
|
|
471
|
-
return writer;
|
|
472
|
-
},
|
|
473
|
-
decode(input, length) {
|
|
474
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
475
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
476
|
-
const message = Object.assign({}, baseQueryBlacklistResponse);
|
|
477
|
-
while (reader.pos < end) {
|
|
478
|
-
const tag = reader.uint32();
|
|
479
|
-
switch (tag >>> 3) {
|
|
480
|
-
case 1:
|
|
481
|
-
message.isBlacklisted = reader.bool();
|
|
482
|
-
break;
|
|
483
|
-
default:
|
|
484
|
-
reader.skipType(tag & 7);
|
|
485
|
-
break;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
return message;
|
|
489
|
-
},
|
|
490
|
-
fromJSON(object) {
|
|
491
|
-
const message = Object.assign({}, baseQueryBlacklistResponse);
|
|
492
|
-
message.isBlacklisted =
|
|
493
|
-
object.isBlacklisted !== undefined && object.isBlacklisted !== null
|
|
494
|
-
? Boolean(object.isBlacklisted)
|
|
495
|
-
: false;
|
|
496
|
-
return message;
|
|
497
|
-
},
|
|
498
|
-
toJSON(message) {
|
|
499
|
-
const obj = {};
|
|
500
|
-
message.isBlacklisted !== undefined &&
|
|
501
|
-
(obj.isBlacklisted = message.isBlacklisted);
|
|
502
|
-
return obj;
|
|
503
|
-
},
|
|
504
|
-
fromPartial(object) {
|
|
505
|
-
var _a;
|
|
506
|
-
const message = Object.assign({}, baseQueryBlacklistResponse);
|
|
507
|
-
message.isBlacklisted = (_a = object.isBlacklisted) !== null && _a !== void 0 ? _a : false;
|
|
508
|
-
return message;
|
|
509
|
-
},
|
|
510
|
-
};
|
|
511
|
-
const baseQueryBlacklistAllRequest = {};
|
|
512
|
-
exports.QueryBlacklistAllRequest = {
|
|
513
|
-
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
514
|
-
return writer;
|
|
515
|
-
},
|
|
516
|
-
decode(input, length) {
|
|
517
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
518
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
519
|
-
const message = Object.assign({}, baseQueryBlacklistAllRequest);
|
|
520
|
-
while (reader.pos < end) {
|
|
521
|
-
const tag = reader.uint32();
|
|
522
|
-
switch (tag >>> 3) {
|
|
523
|
-
default:
|
|
524
|
-
reader.skipType(tag & 7);
|
|
525
|
-
break;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
return message;
|
|
529
|
-
},
|
|
530
|
-
fromJSON(_) {
|
|
531
|
-
const message = Object.assign({}, baseQueryBlacklistAllRequest);
|
|
532
|
-
return message;
|
|
533
|
-
},
|
|
534
|
-
toJSON(_) {
|
|
535
|
-
const obj = {};
|
|
536
|
-
return obj;
|
|
537
|
-
},
|
|
538
|
-
fromPartial(_) {
|
|
539
|
-
const message = Object.assign({}, baseQueryBlacklistAllRequest);
|
|
540
|
-
return message;
|
|
541
|
-
},
|
|
542
|
-
};
|
|
543
|
-
const baseQueryBlacklistAllResponse = { address: "" };
|
|
544
|
-
exports.QueryBlacklistAllResponse = {
|
|
545
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
546
|
-
for (const v of message.address) {
|
|
547
|
-
writer.uint32(10).string(v);
|
|
548
|
-
}
|
|
549
|
-
return writer;
|
|
550
|
-
},
|
|
551
|
-
decode(input, length) {
|
|
552
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
553
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
554
|
-
const message = Object.assign({}, baseQueryBlacklistAllResponse);
|
|
555
|
-
message.address = [];
|
|
556
|
-
while (reader.pos < end) {
|
|
557
|
-
const tag = reader.uint32();
|
|
558
|
-
switch (tag >>> 3) {
|
|
559
|
-
case 1:
|
|
560
|
-
message.address.push(reader.string());
|
|
561
|
-
break;
|
|
562
|
-
default:
|
|
563
|
-
reader.skipType(tag & 7);
|
|
564
|
-
break;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
return message;
|
|
568
|
-
},
|
|
569
|
-
fromJSON(object) {
|
|
570
|
-
var _a;
|
|
571
|
-
const message = Object.assign({}, baseQueryBlacklistAllResponse);
|
|
572
|
-
message.address = ((_a = object.address) !== null && _a !== void 0 ? _a : []).map((e) => String(e));
|
|
573
|
-
return message;
|
|
574
|
-
},
|
|
575
|
-
toJSON(message) {
|
|
576
|
-
const obj = {};
|
|
577
|
-
if (message.address) {
|
|
578
|
-
obj.address = message.address.map((e) => e);
|
|
579
|
-
}
|
|
580
|
-
else {
|
|
581
|
-
obj.address = [];
|
|
582
|
-
}
|
|
583
|
-
return obj;
|
|
584
|
-
},
|
|
585
|
-
fromPartial(object) {
|
|
586
|
-
var _a;
|
|
587
|
-
const message = Object.assign({}, baseQueryBlacklistAllResponse);
|
|
588
|
-
message.address = ((_a = object.address) !== null && _a !== void 0 ? _a : []).map((e) => e);
|
|
589
|
-
return message;
|
|
590
|
-
},
|
|
591
|
-
};
|
|
592
420
|
class QueryClientImpl {
|
|
593
421
|
constructor(rpc) {
|
|
594
422
|
this.rpc = rpc;
|
|
595
423
|
this.InternalTransfers = this.InternalTransfers.bind(this);
|
|
596
|
-
this.Blacklist = this.Blacklist.bind(this);
|
|
597
|
-
this.BlacklistAll = this.BlacklistAll.bind(this);
|
|
598
424
|
}
|
|
599
425
|
InternalTransfers(request) {
|
|
600
426
|
const data = exports.QueryInternalTransfersRequest.encode(request).finish();
|
|
601
427
|
const promise = this.rpc.request("Switcheo.carbon.bank.Query", "InternalTransfers", data);
|
|
602
428
|
return promise.then((data) => exports.QueryInternalTransfersResponse.decode(new minimal_1.default.Reader(data)));
|
|
603
429
|
}
|
|
604
|
-
Blacklist(request) {
|
|
605
|
-
const data = exports.QueryBlacklistRequest.encode(request).finish();
|
|
606
|
-
const promise = this.rpc.request("Switcheo.carbon.bank.Query", "Blacklist", data);
|
|
607
|
-
return promise.then((data) => exports.QueryBlacklistResponse.decode(new minimal_1.default.Reader(data)));
|
|
608
|
-
}
|
|
609
|
-
BlacklistAll(request) {
|
|
610
|
-
const data = exports.QueryBlacklistAllRequest.encode(request).finish();
|
|
611
|
-
const promise = this.rpc.request("Switcheo.carbon.bank.Query", "BlacklistAll", data);
|
|
612
|
-
return promise.then((data) => exports.QueryBlacklistAllResponse.decode(new minimal_1.default.Reader(data)));
|
|
613
|
-
}
|
|
614
430
|
}
|
|
615
431
|
exports.QueryClientImpl = QueryClientImpl;
|
|
616
432
|
function toTimestamp(date) {
|