carbon-js-sdk 0.7.6 → 0.7.7
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 +4 -0
- package/lib/CarbonSDK.js +50 -12
- package/lib/clients/BatchQueryClient.js +4 -4
- package/lib/clients/CarbonQueryClient.js +1 -1
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/GasFee.d.ts +12 -0
- package/lib/clients/GasFee.js +38 -0
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/InsightsQueryClient.js +3 -3
- package/lib/clients/NEOClient.js +12 -8
- package/lib/clients/TokenClient.js +2 -2
- package/lib/clients/ZILClient.js +17 -17
- package/lib/codec/Switcheo/carbon/adl/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/admin/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/admin/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/admin/tx.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/bank/event.d.ts +7 -7
- package/lib/codec/Switcheo/carbon/bank/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/bank/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/book/book.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/book/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/book/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/book/legacy.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/book/query.d.ts +12 -12
- package/lib/codec/Switcheo/carbon/broker/amm.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/broker/candlestick.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/broker/event.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/broker/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/broker/incoming_liquidations.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/broker/pagination.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/broker/query.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/broker/tx.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/btcx/denom_cross_chain_info.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/btcx/denom_info.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/btcx/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/btcx/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/btcx/tx.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/ccm/ccm.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/ccm/genesis.d.ts +7 -7
- package/lib/codec/Switcheo/carbon/ccm/query.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/ccm/tx.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/cdp/asset_params.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/cdp/cdp_liquidations.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/cdp/debt_info.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/cdp/e_mode_category.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/cdp/event.d.ts +36 -36
- package/lib/codec/Switcheo/carbon/cdp/genesis.d.ts +10 -10
- package/lib/codec/Switcheo/carbon/cdp/params.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/cdp/query.d.ts +53 -53
- package/lib/codec/Switcheo/carbon/cdp/rate_strategy_params.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/cdp/reward_scheme.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_debt_info.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_interest_info.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/cdp/tx.d.ts +87 -87
- package/lib/codec/Switcheo/carbon/coin/bridge.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/coin/event.d.ts +14 -14
- package/lib/codec/Switcheo/carbon/coin/genesis.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/coin/group.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/coin/proposal.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/coin/query.d.ts +26 -26
- package/lib/codec/Switcheo/carbon/coin/token.d.ts +9 -9
- package/lib/codec/Switcheo/carbon/coin/tx.d.ts +48 -48
- package/lib/codec/Switcheo/carbon/erc20/erc20.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/erc20/events.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/erc20/genesis.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/erc20/query.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/erc20/tx.d.ts +16 -16
- package/lib/codec/Switcheo/carbon/evmbank/genesis.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/evmbank/query.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/evmcontract/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/evmmerge/address.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/evmmerge/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/evmmerge/genesis.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/evmmerge/offchain.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/evmmerge/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/evmmerge/tx.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/fee/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/fee/fee.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/fee/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/fee/proposal.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/fee/query.d.ts +10 -10
- package/lib/codec/Switcheo/carbon/fee/tx.d.ts +10 -10
- package/lib/codec/Switcheo/carbon/headersync/consensus_peers.d.ts +7 -7
- package/lib/codec/Switcheo/carbon/headersync/genesis.d.ts +7 -7
- package/lib/codec/Switcheo/carbon/headersync/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/headersync/tx.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/inflation/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/inflation/inflation.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/inflation/query.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/insurance/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/insurance/fund.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/insurance/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/insurance/query.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/insurance/tx.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/leverage/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/leverage/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/leverage/leverage.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/leverage/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/leverage/tx.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/liquidation/genesis.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/liquidation/liquidation.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/liquidation/outstanding_position.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/liquidation/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/liquidation/quote_changes.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/liquiditypool/event.d.ts +15 -15
- package/lib/codec/Switcheo/carbon/liquiditypool/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.d.ts +12 -12
- package/lib/codec/Switcheo/carbon/liquiditypool/proposal.d.ts +11 -11
- package/lib/codec/Switcheo/carbon/liquiditypool/query.d.ts +31 -31
- package/lib/codec/Switcheo/carbon/liquiditypool/reward.d.ts +18 -18
- package/lib/codec/Switcheo/carbon/liquiditypool/tx.d.ts +39 -39
- package/lib/codec/Switcheo/carbon/lockproxy/event.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/lockproxy/genesis.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/lockproxy/lockproxy.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/lockproxy/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/lockproxy/tx.d.ts +12 -12
- package/lib/codec/Switcheo/carbon/market/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/market/fee.d.ts +7 -7
- package/lib/codec/Switcheo/carbon/market/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/market/market.d.ts +7 -7
- package/lib/codec/Switcheo/carbon/market/proposal.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/market/query.d.ts +20 -20
- package/lib/codec/Switcheo/carbon/market/tx.d.ts +21 -21
- package/lib/codec/Switcheo/carbon/marketstats/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/marketstats/marketstats.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/marketstats/params.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/marketstats/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/misc/block.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/misc/message.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/misc/message_type.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/misc/query.d.ts +16 -16
- package/lib/codec/Switcheo/carbon/misc/trade.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/misc/transaction.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/oracle/event.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/oracle/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/oracle/oracle.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/oracle/proposal.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/oracle/query.d.ts +28 -28
- package/lib/codec/Switcheo/carbon/oracle/slashing.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/oracle/tx.d.ts +14 -14
- package/lib/codec/Switcheo/carbon/order/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/order/genesis.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/order/order.d.ts +9 -9
- package/lib/codec/Switcheo/carbon/order/query.d.ts +12 -12
- package/lib/codec/Switcheo/carbon/order/tx.d.ts +12 -12
- package/lib/codec/Switcheo/carbon/perpspool/event.d.ts +9 -9
- package/lib/codec/Switcheo/carbon/perpspool/genesis.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/perpspool/market.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/perpspool/params.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/perpspool/pool.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/perpspool/query.d.ts +20 -20
- package/lib/codec/Switcheo/carbon/perpspool/tx.d.ts +18 -18
- package/lib/codec/Switcheo/carbon/position/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/position/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/position/position.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/position/query.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/position/tx.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/pricing/event.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/pricing/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/pricing/legacy.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/pricing/pricing.d.ts +5 -5
- package/lib/codec/Switcheo/carbon/pricing/proposal.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/pricing/query.d.ts +16 -16
- package/lib/codec/Switcheo/carbon/pricing/tx.d.ts +12 -12
- package/lib/codec/Switcheo/carbon/profile/event.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/profile/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/profile/profile.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/profile/query.d.ts +8 -8
- package/lib/codec/Switcheo/carbon/profile/tx.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/sequence/genesis.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/sequence/query.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/sequence/tx.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/subaccount/genesis.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/subaccount/legacy.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/subaccount/query.d.ts +19 -19
- package/lib/codec/Switcheo/carbon/subaccount/subaccount.d.ts +6 -6
- package/lib/codec/Switcheo/carbon/subaccount/tx.d.ts +8 -8
- 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/carbon-models.js +5 -1
- 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 +5 -1
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +4 -4
- package/lib/codec/ethermint/evm/v1/evm.d.ts +10 -10
- 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 +8 -8
- package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +3 -3
- 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/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 +5 -1
- 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/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +4 -4
- 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/genesis.d.ts +7 -7
- 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/genesis.d.ts +3 -3
- package/lib/codec/ibc/applications/transfer/v1/query.d.ts +10 -10
- package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +4 -4
- package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +4 -4
- package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +3 -3
- package/lib/codec/ibc/core/channel/v1/channel.d.ts +8 -8
- 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 +22 -22
- package/lib/codec/ibc/core/client/v1/client.d.ts +9 -9
- package/lib/codec/ibc/core/client/v1/genesis.d.ts +5 -5
- package/lib/codec/ibc/core/client/v1/query.d.ts +18 -18
- 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/genesis.d.ts +3 -3
- package/lib/codec/ibc/core/connection/v1/query.d.ts +12 -12
- package/lib/codec/ibc/core/connection/v1/tx.d.ts +10 -10
- 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 +7 -7
- package/lib/codec/ibc-models.js +5 -1
- package/lib/codec/index.js +5 -1
- package/lib/codec/polynetwork-models.js +5 -1
- package/lib/codec/proofs.d.ts +15 -15
- 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 +3 -3
- package/lib/constant/ibc.js +5 -1
- package/lib/constant/index.js +5 -1
- package/lib/constant/node.d.ts +1 -1
- package/lib/eth/index.js +5 -1
- package/lib/hydrogen/index.js +5 -1
- package/lib/hydrogen/transfer.d.ts +2 -2
- package/lib/index.js +5 -1
- package/lib/insights/common.d.ts +1 -1
- package/lib/insights/index.js +5 -1
- package/lib/insights/position.d.ts +1 -1
- package/lib/modules/cdp.js +45 -45
- package/lib/modules/cosmwasm.js +2 -2
- package/lib/modules/evm.d.ts +1 -1
- package/lib/modules/evm.js +6 -6
- package/lib/modules/gov.js +12 -12
- package/lib/modules/index.js +5 -1
- package/lib/modules/liquiditypool.js +1 -1
- package/lib/modules/order.js +2 -2
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/EthLedgerAccount/index.js +5 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.js +5 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.d.ts +1 -1
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +8 -4
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/index.js +5 -1
- package/lib/provider/account/index.js +5 -1
- package/lib/provider/amino/types/admin.js +32 -28
- package/lib/provider/amino/types/bank.js +6 -2
- package/lib/provider/amino/types/broker.js +6 -2
- package/lib/provider/amino/types/cdp.js +31 -27
- package/lib/provider/amino/types/coin.js +9 -5
- package/lib/provider/amino/types/erc20.js +7 -3
- package/lib/provider/amino/types/evm.js +6 -2
- package/lib/provider/amino/types/evmmerge.js +6 -2
- package/lib/provider/amino/types/feemarket.js +6 -2
- package/lib/provider/amino/types/gov.js +10 -6
- package/lib/provider/amino/types/ibc.js +6 -2
- package/lib/provider/amino/types/leverage.js +6 -2
- package/lib/provider/amino/types/liquidityPool.js +12 -8
- package/lib/provider/amino/types/market.js +11 -7
- package/lib/provider/amino/types/oracle.js +7 -3
- package/lib/provider/amino/types/order.js +9 -5
- package/lib/provider/amino/types/perpspool.js +11 -7
- package/lib/provider/amino/types/position.js +6 -2
- package/lib/provider/amino/types/profile.js +6 -2
- package/lib/provider/amino/types/staking.js +9 -5
- package/lib/provider/amino/types/subaccount.js +8 -4
- 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 +9 -6
- package/lib/provider/metamask/MetaMask.d.ts +1 -1
- package/lib/provider/metamask/MetaMask.js +28 -24
- package/lib/provider/metamask/error.d.ts +1 -1
- package/lib/provider/o3/O3Types.d.ts +1 -1
- package/lib/provider/o3/O3Wallet.js +15 -11
- package/lib/provider/o3/index.js +5 -1
- package/lib/provider/zilpay/Zilpay.js +4 -4
- package/lib/provider/zilpay/index.js +5 -1
- package/lib/util/address.d.ts +5 -5
- package/lib/util/address.js +19 -15
- 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/fetch.js +1 -1
- package/lib/util/generic.d.ts +3 -2
- package/lib/util/generic.js +3 -3
- package/lib/util/gov.d.ts +1 -1
- package/lib/util/index.js +5 -1
- 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 +3 -3
- package/lib/util/tx.js +5 -1
- 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.js +15 -15
- package/lib/wallet/CarbonWallet.d.ts +4 -14
- package/lib/wallet/CarbonWallet.js +23 -51
- package/lib/wallet/index.js +5 -1
- package/lib/websocket/connector.js +8 -4
- package/lib/websocket/index.js +5 -1
- package/lib/websocket/types.d.ts +1 -1
- package/package.json +1 -1
- package/lib/codec/adl/genesis.d.ts +0 -18
- package/lib/codec/adl/genesis.js +0 -46
- package/lib/codec/adl/query.d.ts +0 -12
- package/lib/codec/adl/query.js +0 -20
- package/lib/codec/adl/tx.d.ts +0 -12
- package/lib/codec/adl/tx.js +0 -20
- package/lib/codec/admin/export.d.ts +0 -2
- package/lib/codec/admin/export.js +0 -13
- package/lib/codec/admin/genesis.d.ts +0 -18
- package/lib/codec/admin/genesis.js +0 -46
- package/lib/codec/admin/query.d.ts +0 -62
- package/lib/codec/admin/query.js +0 -186
- package/lib/codec/admin/tx.d.ts +0 -62
- package/lib/codec/admin/tx.js +0 -198
- package/lib/codec/bank/event.d.ts +0 -65
- package/lib/codec/bank/event.js +0 -332
- package/lib/codec/bank/export.d.ts +0 -2
- package/lib/codec/bank/export.js +0 -14
- package/lib/codec/bank/genesis.d.ts +0 -18
- package/lib/codec/bank/genesis.js +0 -46
- package/lib/codec/bank/query.d.ts +0 -77
- package/lib/codec/bank/query.js +0 -459
- package/lib/codec/book/book.d.ts +0 -57
- package/lib/codec/book/book.js +0 -319
- package/lib/codec/book/event.d.ts +0 -22
- package/lib/codec/book/event.js +0 -113
- package/lib/codec/book/export.d.ts +0 -4
- package/lib/codec/book/export.js +0 -23
- package/lib/codec/book/genesis.d.ts +0 -25
- package/lib/codec/book/genesis.js +0 -79
- package/lib/codec/book/legacy.d.ts +0 -22
- package/lib/codec/book/legacy.js +0 -120
- package/lib/codec/book/query.d.ts +0 -141
- package/lib/codec/book/query.js +0 -606
- package/lib/codec/book/tx.d.ts +0 -12
- package/lib/codec/book/tx.js +0 -20
- package/lib/codec/broker/amm.d.ts +0 -50
- package/lib/codec/broker/amm.js +0 -326
- package/lib/codec/broker/candlestick.d.ts +0 -27
- package/lib/codec/broker/candlestick.js +0 -211
- package/lib/codec/broker/event.d.ts +0 -53
- package/lib/codec/broker/event.js +0 -485
- package/lib/codec/broker/export.d.ts +0 -7
- package/lib/codec/broker/export.js +0 -27
- package/lib/codec/broker/genesis.d.ts +0 -25
- package/lib/codec/broker/genesis.js +0 -79
- package/lib/codec/broker/incoming_liquidations.d.ts +0 -18
- package/lib/codec/broker/incoming_liquidations.js +0 -93
- package/lib/codec/broker/incoming_pool_swap.d.ts +0 -23
- package/lib/codec/broker/incoming_pool_swap.js +0 -136
- package/lib/codec/broker/pagination.d.ts +0 -19
- package/lib/codec/broker/pagination.js +0 -78
- package/lib/codec/broker/query.d.ts +0 -107
- package/lib/codec/broker/query.js +0 -597
- package/lib/codec/broker/tx.d.ts +0 -53
- package/lib/codec/broker/tx.js +0 -176
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +0 -21
- package/lib/codec/btcx/denom_cross_chain_info.js +0 -98
- package/lib/codec/btcx/denom_info.d.ts +0 -24
- package/lib/codec/btcx/denom_info.js +0 -140
- package/lib/codec/btcx/export.d.ts +0 -4
- package/lib/codec/btcx/export.js +0 -19
- package/lib/codec/btcx/genesis.d.ts +0 -18
- package/lib/codec/btcx/genesis.js +0 -46
- package/lib/codec/btcx/query.d.ts +0 -68
- package/lib/codec/btcx/query.js +0 -275
- package/lib/codec/btcx/tx.d.ts +0 -92
- package/lib/codec/btcx/tx.js +0 -436
- package/lib/codec/ccm/ccm.d.ts +0 -19
- package/lib/codec/ccm/ccm.js +0 -60
- package/lib/codec/ccm/export.d.ts +0 -4
- package/lib/codec/ccm/export.js +0 -20
- package/lib/codec/ccm/genesis.d.ts +0 -83
- package/lib/codec/ccm/genesis.js +0 -438
- package/lib/codec/ccm/query.d.ts +0 -45
- package/lib/codec/ccm/query.js +0 -197
- package/lib/codec/ccm/tx.d.ts +0 -97
- package/lib/codec/ccm/tx.js +0 -462
- package/lib/codec/cdp/asset_params.d.ts +0 -57
- package/lib/codec/cdp/asset_params.js +0 -411
- package/lib/codec/cdp/cdp_liquidations.d.ts +0 -32
- package/lib/codec/cdp/cdp_liquidations.js +0 -288
- package/lib/codec/cdp/debt_info.d.ts +0 -23
- package/lib/codec/cdp/debt_info.js +0 -158
- package/lib/codec/cdp/e_mode_category.d.ts +0 -23
- package/lib/codec/cdp/e_mode_category.js +0 -135
- package/lib/codec/cdp/event.d.ts +0 -446
- package/lib/codec/cdp/event.js +0 -2913
- package/lib/codec/cdp/export.d.ts +0 -13
- package/lib/codec/cdp/export.js +0 -210
- package/lib/codec/cdp/genesis.d.ts +0 -134
- package/lib/codec/cdp/genesis.js +0 -825
- package/lib/codec/cdp/params.d.ts +0 -68
- package/lib/codec/cdp/params.js +0 -210
- package/lib/codec/cdp/query.d.ts +0 -644
- package/lib/codec/cdp/query.js +0 -3099
- package/lib/codec/cdp/rate_strategy_params.d.ts +0 -26
- package/lib/codec/cdp/rate_strategy_params.js +0 -180
- package/lib/codec/cdp/reward_scheme.d.ts +0 -71
- package/lib/codec/cdp/reward_scheme.js +0 -550
- package/lib/codec/cdp/stablecoin_debt_info.d.ts +0 -22
- package/lib/codec/cdp/stablecoin_debt_info.js +0 -144
- package/lib/codec/cdp/stablecoin_interest_info.d.ts +0 -19
- package/lib/codec/cdp/stablecoin_interest_info.js +0 -99
- package/lib/codec/cdp/tx.d.ts +0 -1026
- package/lib/codec/cdp/tx.js +0 -5191
- package/lib/codec/coin/bridge.d.ts +0 -24
- package/lib/codec/coin/bridge.js +0 -151
- package/lib/codec/coin/event.d.ts +0 -143
- package/lib/codec/coin/event.js +0 -775
- package/lib/codec/coin/export.d.ts +0 -8
- package/lib/codec/coin/export.js +0 -107
- package/lib/codec/coin/genesis.d.ts +0 -42
- package/lib/codec/coin/genesis.js +0 -207
- package/lib/codec/coin/group.d.ts +0 -50
- package/lib/codec/coin/group.js +0 -230
- package/lib/codec/coin/proposal.d.ts +0 -21
- package/lib/codec/coin/proposal.js +0 -91
- package/lib/codec/coin/query.d.ts +0 -310
- package/lib/codec/coin/query.js +0 -1439
- package/lib/codec/coin/token.d.ts +0 -104
- package/lib/codec/coin/token.js +0 -700
- package/lib/codec/coin/tx.d.ts +0 -586
- package/lib/codec/coin/tx.js +0 -3131
- package/lib/codec/crisis/genesis.d.ts +0 -18
- package/lib/codec/crisis/genesis.js +0 -46
- package/lib/codec/crisis/query.d.ts +0 -43
- package/lib/codec/crisis/query.js +0 -103
- package/lib/codec/crisis/tx.d.ts +0 -12
- package/lib/codec/crisis/tx.js +0 -20
- package/lib/codec/erc20/erc20.d.ts +0 -41
- package/lib/codec/erc20/erc20.js +0 -144
- package/lib/codec/erc20/events.d.ts +0 -76
- package/lib/codec/erc20/events.js +0 -330
- package/lib/codec/erc20/export.d.ts +0 -5
- package/lib/codec/erc20/export.js +0 -37
- package/lib/codec/erc20/genesis.d.ts +0 -40
- package/lib/codec/erc20/genesis.js +0 -139
- package/lib/codec/erc20/query.d.ts +0 -117
- package/lib/codec/erc20/query.js +0 -333
- package/lib/codec/erc20/tx.d.ts +0 -232
- package/lib/codec/erc20/tx.js +0 -765
- package/lib/codec/ethermint/evm/v1/events.d.ts +0 -72
- package/lib/codec/ethermint/evm/v1/events.js +0 -303
- package/lib/codec/ethermint/feemarket/v1/events.d.ts +0 -34
- package/lib/codec/ethermint/feemarket/v1/events.js +0 -116
- package/lib/codec/ethermint/feemarket/v1/tx.d.ts +0 -55
- package/lib/codec/ethermint/feemarket/v1/tx.js +0 -120
- package/lib/codec/evmbank/export.d.ts +0 -2
- package/lib/codec/evmbank/export.js +0 -8
- package/lib/codec/evmbank/genesis.d.ts +0 -32
- package/lib/codec/evmbank/genesis.js +0 -152
- package/lib/codec/evmbank/query.d.ts +0 -40
- package/lib/codec/evmbank/query.js +0 -116
- package/lib/codec/evmcontract/genesis.d.ts +0 -18
- package/lib/codec/evmcontract/genesis.js +0 -46
- package/lib/codec/evmcontract/query.d.ts +0 -12
- package/lib/codec/evmcontract/query.js +0 -20
- package/lib/codec/evmcontract/tx.d.ts +0 -12
- package/lib/codec/evmcontract/tx.js +0 -20
- package/lib/codec/evmmerge/address.d.ts +0 -19
- package/lib/codec/evmmerge/address.js +0 -75
- package/lib/codec/evmmerge/event.d.ts +0 -20
- package/lib/codec/evmmerge/event.js +0 -90
- package/lib/codec/evmmerge/export.d.ts +0 -6
- package/lib/codec/evmmerge/export.js +0 -20
- package/lib/codec/evmmerge/genesis.d.ts +0 -48
- package/lib/codec/evmmerge/genesis.js +0 -216
- package/lib/codec/evmmerge/offchain.d.ts +0 -22
- package/lib/codec/evmmerge/offchain.js +0 -105
- package/lib/codec/evmmerge/query.d.ts +0 -75
- package/lib/codec/evmmerge/query.js +0 -254
- package/lib/codec/evmmerge/tx.d.ts +0 -45
- package/lib/codec/evmmerge/tx.js +0 -128
- package/lib/codec/fee/event.d.ts +0 -20
- package/lib/codec/fee/event.js +0 -83
- package/lib/codec/fee/export.d.ts +0 -5
- package/lib/codec/fee/export.js +0 -32
- package/lib/codec/fee/fee.d.ts +0 -42
- package/lib/codec/fee/fee.js +0 -183
- package/lib/codec/fee/genesis.d.ts +0 -23
- package/lib/codec/fee/genesis.js +0 -79
- package/lib/codec/fee/proposal.d.ts +0 -57
- package/lib/codec/fee/proposal.js +0 -311
- package/lib/codec/fee/query.d.ts +0 -114
- package/lib/codec/fee/query.js +0 -470
- package/lib/codec/fee/tx.d.ts +0 -108
- package/lib/codec/fee/tx.js +0 -415
- package/lib/codec/headersync/consensus_peers.d.ts +0 -70
- package/lib/codec/headersync/consensus_peers.js +0 -383
- package/lib/codec/headersync/export.d.ts +0 -4
- package/lib/codec/headersync/export.js +0 -24
- package/lib/codec/headersync/genesis.d.ts +0 -79
- package/lib/codec/headersync/genesis.js +0 -419
- package/lib/codec/headersync/query.d.ts +0 -64
- package/lib/codec/headersync/query.js +0 -231
- package/lib/codec/headersync/tx.d.ts +0 -64
- package/lib/codec/headersync/tx.js +0 -215
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +0 -24
- package/lib/codec/ibc/applications/fee/v1/ack.js +0 -125
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +0 -68
- package/lib/codec/ibc/applications/fee/v1/fee.js +0 -289
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +0 -93
- package/lib/codec/ibc/applications/fee/v1/genesis.js +0 -390
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +0 -25
- package/lib/codec/ibc/applications/fee/v1/metadata.js +0 -71
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +0 -312
- package/lib/codec/ibc/applications/fee/v1/query.js +0 -1187
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +0 -171
- package/lib/codec/ibc/applications/fee/v1/tx.js +0 -524
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +0 -78
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +0 -296
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +0 -80
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +0 -439
- package/lib/codec/inflation/export.d.ts +0 -2
- package/lib/codec/inflation/export.js +0 -8
- package/lib/codec/inflation/genesis.d.ts +0 -25
- package/lib/codec/inflation/genesis.js +0 -79
- package/lib/codec/inflation/inflation.d.ts +0 -26
- package/lib/codec/inflation/inflation.js +0 -165
- package/lib/codec/inflation/query.d.ts +0 -41
- package/lib/codec/inflation/query.js +0 -109
- package/lib/codec/inflation/tx.d.ts +0 -12
- package/lib/codec/inflation/tx.js +0 -20
- package/lib/codec/insurance/event.d.ts +0 -24
- package/lib/codec/insurance/event.js +0 -46
- package/lib/codec/insurance/export.d.ts +0 -4
- package/lib/codec/insurance/export.js +0 -14
- package/lib/codec/insurance/fund.d.ts +0 -29
- package/lib/codec/insurance/fund.js +0 -148
- package/lib/codec/insurance/genesis.d.ts +0 -18
- package/lib/codec/insurance/genesis.js +0 -46
- package/lib/codec/insurance/query.d.ts +0 -41
- package/lib/codec/insurance/query.js +0 -108
- package/lib/codec/insurance/tx.d.ts +0 -44
- package/lib/codec/insurance/tx.js +0 -144
- package/lib/codec/leverage/event.d.ts +0 -21
- package/lib/codec/leverage/event.js +0 -100
- package/lib/codec/leverage/export.d.ts +0 -4
- package/lib/codec/leverage/export.js +0 -16
- package/lib/codec/leverage/genesis.d.ts +0 -24
- package/lib/codec/leverage/genesis.js +0 -64
- package/lib/codec/leverage/leverage.d.ts +0 -30
- package/lib/codec/leverage/leverage.js +0 -134
- package/lib/codec/leverage/query.d.ts +0 -70
- package/lib/codec/leverage/query.js +0 -234
- package/lib/codec/leverage/tx.d.ts +0 -43
- package/lib/codec/leverage/tx.js +0 -127
- package/lib/codec/liquidation/export.d.ts +0 -5
- package/lib/codec/liquidation/export.js +0 -17
- package/lib/codec/liquidation/genesis.d.ts +0 -37
- package/lib/codec/liquidation/genesis.js +0 -136
- package/lib/codec/liquidation/liquidation.d.ts +0 -17
- package/lib/codec/liquidation/liquidation.js +0 -46
- package/lib/codec/liquidation/outstanding_position.d.ts +0 -33
- package/lib/codec/liquidation/outstanding_position.js +0 -203
- package/lib/codec/liquidation/query.d.ts +0 -77
- package/lib/codec/liquidation/query.js +0 -341
- package/lib/codec/liquidation/quote_changes.d.ts +0 -22
- package/lib/codec/liquidation/quote_changes.js +0 -95
- package/lib/codec/liquidation/tx.d.ts +0 -12
- package/lib/codec/liquidation/tx.js +0 -20
- package/lib/codec/liquiditypool/event.d.ts +0 -182
- package/lib/codec/liquiditypool/event.js +0 -1268
- package/lib/codec/liquiditypool/export.d.ts +0 -6
- package/lib/codec/liquiditypool/export.js +0 -125
- package/lib/codec/liquiditypool/genesis.d.ts +0 -32
- package/lib/codec/liquiditypool/genesis.js +0 -228
- package/lib/codec/liquiditypool/liquiditypool.d.ts +0 -138
- package/lib/codec/liquiditypool/liquiditypool.js +0 -943
- package/lib/codec/liquiditypool/proposal.d.ts +0 -117
- package/lib/codec/liquiditypool/proposal.js +0 -697
- package/lib/codec/liquiditypool/query.d.ts +0 -370
- package/lib/codec/liquiditypool/query.js +0 -1738
- package/lib/codec/liquiditypool/reward.d.ts +0 -196
- package/lib/codec/liquiditypool/reward.js +0 -1204
- package/lib/codec/liquiditypool/tx.d.ts +0 -453
- package/lib/codec/liquiditypool/tx.js +0 -2423
- package/lib/codec/lockproxy/event.d.ts +0 -46
- package/lib/codec/lockproxy/event.js +0 -348
- package/lib/codec/lockproxy/export.d.ts +0 -5
- package/lib/codec/lockproxy/export.js +0 -28
- package/lib/codec/lockproxy/genesis.d.ts +0 -68
- package/lib/codec/lockproxy/genesis.js +0 -355
- package/lib/codec/lockproxy/lockproxy.d.ts +0 -22
- package/lib/codec/lockproxy/lockproxy.js +0 -147
- package/lib/codec/lockproxy/query.d.ts +0 -67
- package/lib/codec/lockproxy/query.js +0 -274
- package/lib/codec/lockproxy/tx.d.ts +0 -147
- package/lib/codec/lockproxy/tx.js +0 -808
- package/lib/codec/market/event.d.ts +0 -20
- package/lib/codec/market/event.js +0 -76
- package/lib/codec/market/export.d.ts +0 -6
- package/lib/codec/market/export.js +0 -61
- package/lib/codec/market/fee.d.ts +0 -123
- package/lib/codec/market/fee.js +0 -334
- package/lib/codec/market/genesis.d.ts +0 -31
- package/lib/codec/market/genesis.js +0 -147
- package/lib/codec/market/legacy.d.ts +0 -62
- package/lib/codec/market/legacy.js +0 -630
- package/lib/codec/market/market.d.ts +0 -131
- package/lib/codec/market/market.js +0 -1245
- package/lib/codec/market/proposal.d.ts +0 -46
- package/lib/codec/market/proposal.js +0 -245
- package/lib/codec/market/query.d.ts +0 -233
- package/lib/codec/market/query.js +0 -938
- package/lib/codec/market/tx.d.ts +0 -250
- package/lib/codec/market/tx.js +0 -1265
- package/lib/codec/marketstats/export.d.ts +0 -3
- package/lib/codec/marketstats/export.js +0 -12
- package/lib/codec/marketstats/genesis.d.ts +0 -21
- package/lib/codec/marketstats/genesis.js +0 -63
- package/lib/codec/marketstats/marketstats.d.ts +0 -31
- package/lib/codec/marketstats/marketstats.js +0 -258
- package/lib/codec/marketstats/params.d.ts +0 -18
- package/lib/codec/marketstats/params.js +0 -46
- package/lib/codec/marketstats/query.d.ts +0 -66
- package/lib/codec/marketstats/query.js +0 -195
- package/lib/codec/marketstats/tx.d.ts +0 -12
- package/lib/codec/marketstats/tx.js +0 -20
- package/lib/codec/misc/block.d.ts +0 -21
- package/lib/codec/misc/block.js +0 -105
- package/lib/codec/misc/export.d.ts +0 -6
- package/lib/codec/misc/export.js +0 -29
- package/lib/codec/misc/message.d.ts +0 -22
- package/lib/codec/misc/message.js +0 -128
- package/lib/codec/misc/message_type.d.ts +0 -18
- package/lib/codec/misc/message_type.js +0 -60
- package/lib/codec/misc/query.d.ts +0 -192
- package/lib/codec/misc/query.js +0 -884
- package/lib/codec/misc/trade.d.ts +0 -28
- package/lib/codec/misc/trade.js +0 -224
- package/lib/codec/misc/transaction.d.ts +0 -45
- package/lib/codec/misc/transaction.js +0 -369
- package/lib/codec/oracle/event.d.ts +0 -37
- package/lib/codec/oracle/event.js +0 -228
- package/lib/codec/oracle/export.d.ts +0 -6
- package/lib/codec/oracle/export.js +0 -58
- package/lib/codec/oracle/genesis.d.ts +0 -28
- package/lib/codec/oracle/genesis.js +0 -141
- package/lib/codec/oracle/oracle.d.ts +0 -94
- package/lib/codec/oracle/oracle.js +0 -650
- package/lib/codec/oracle/proposal.d.ts +0 -21
- package/lib/codec/oracle/proposal.js +0 -91
- package/lib/codec/oracle/query.d.ts +0 -336
- package/lib/codec/oracle/query.js +0 -1551
- package/lib/codec/oracle/slashing.d.ts +0 -33
- package/lib/codec/oracle/slashing.js +0 -191
- package/lib/codec/oracle/tx.d.ts +0 -169
- package/lib/codec/oracle/tx.js +0 -877
- package/lib/codec/order/event.d.ts +0 -23
- package/lib/codec/order/event.js +0 -146
- package/lib/codec/order/export.d.ts +0 -5
- package/lib/codec/order/export.js +0 -39
- package/lib/codec/order/genesis.d.ts +0 -62
- package/lib/codec/order/genesis.js +0 -322
- package/lib/codec/order/order.d.ts +0 -113
- package/lib/codec/order/order.js +0 -875
- package/lib/codec/order/query.d.ts +0 -143
- package/lib/codec/order/query.js +0 -596
- package/lib/codec/order/tx.d.ts +0 -146
- package/lib/codec/order/tx.js +0 -715
- package/lib/codec/perpsliquidity/event.d.ts +0 -115
- package/lib/codec/perpsliquidity/event.js +0 -657
- package/lib/codec/perpsliquidity/genesis.d.ts +0 -36
- package/lib/codec/perpsliquidity/genesis.js +0 -163
- package/lib/codec/perpsliquidity/market.d.ts +0 -84
- package/lib/codec/perpsliquidity/market.js +0 -431
- package/lib/codec/perpsliquidity/params.d.ts +0 -27
- package/lib/codec/perpsliquidity/params.js +0 -129
- package/lib/codec/perpsliquidity/pool.d.ts +0 -119
- package/lib/codec/perpsliquidity/pool.js +0 -774
- package/lib/codec/perpsliquidity/query.d.ts +0 -246
- package/lib/codec/perpsliquidity/query.js +0 -1125
- package/lib/codec/perpsliquidity/tx.d.ts +0 -203
- package/lib/codec/perpsliquidity/tx.js +0 -973
- package/lib/codec/perpspool/event.d.ts +0 -95
- package/lib/codec/perpspool/event.js +0 -561
- package/lib/codec/perpspool/export.d.ts +0 -7
- package/lib/codec/perpspool/export.js +0 -68
- package/lib/codec/perpspool/genesis.d.ts +0 -61
- package/lib/codec/perpspool/genesis.js +0 -343
- package/lib/codec/perpspool/market.d.ts +0 -96
- package/lib/codec/perpspool/market.js +0 -493
- package/lib/codec/perpspool/params.d.ts +0 -30
- package/lib/codec/perpspool/params.js +0 -189
- package/lib/codec/perpspool/pool.d.ts +0 -103
- package/lib/codec/perpspool/pool.js +0 -638
- package/lib/codec/perpspool/query.d.ts +0 -247
- package/lib/codec/perpspool/query.js +0 -1141
- package/lib/codec/perpspool/tx.d.ts +0 -229
- package/lib/codec/perpspool/tx.js +0 -1144
- package/lib/codec/position/event.d.ts +0 -26
- package/lib/codec/position/event.js +0 -180
- package/lib/codec/position/export.d.ts +0 -4
- package/lib/codec/position/export.js +0 -20
- package/lib/codec/position/genesis.d.ts +0 -24
- package/lib/codec/position/genesis.js +0 -64
- package/lib/codec/position/position.d.ts +0 -74
- package/lib/codec/position/position.js +0 -601
- package/lib/codec/position/query.d.ts +0 -92
- package/lib/codec/position/query.js +0 -400
- package/lib/codec/position/tx.d.ts +0 -42
- package/lib/codec/position/tx.js +0 -127
- package/lib/codec/pricing/event.d.ts +0 -74
- package/lib/codec/pricing/event.js +0 -361
- package/lib/codec/pricing/export.d.ts +0 -6
- package/lib/codec/pricing/export.js +0 -45
- package/lib/codec/pricing/genesis.d.ts +0 -26
- package/lib/codec/pricing/genesis.js +0 -95
- package/lib/codec/pricing/legacy.d.ts +0 -22
- package/lib/codec/pricing/legacy.js +0 -93
- package/lib/codec/pricing/pricing.d.ts +0 -60
- package/lib/codec/pricing/pricing.js +0 -456
- package/lib/codec/pricing/proposal.d.ts +0 -31
- package/lib/codec/pricing/proposal.js +0 -148
- package/lib/codec/pricing/query.d.ts +0 -183
- package/lib/codec/pricing/query.js +0 -759
- package/lib/codec/pricing/tx.d.ts +0 -131
- package/lib/codec/pricing/tx.js +0 -529
- package/lib/codec/profile/event.d.ts +0 -20
- package/lib/codec/profile/event.js +0 -78
- package/lib/codec/profile/export.d.ts +0 -4
- package/lib/codec/profile/export.js +0 -17
- package/lib/codec/profile/genesis.d.ts +0 -24
- package/lib/codec/profile/genesis.js +0 -64
- package/lib/codec/profile/profile.d.ts +0 -20
- package/lib/codec/profile/profile.js +0 -83
- package/lib/codec/profile/query.d.ts +0 -92
- package/lib/codec/profile/query.js +0 -360
- package/lib/codec/profile/tx.d.ts +0 -43
- package/lib/codec/profile/tx.js +0 -127
- package/lib/codec/query/pagination.d.ts +0 -29
- package/lib/codec/query/pagination.js +0 -126
- package/lib/codec/sequence/export.d.ts +0 -3
- package/lib/codec/sequence/export.js +0 -13
- package/lib/codec/sequence/genesis.d.ts +0 -30
- package/lib/codec/sequence/genesis.js +0 -122
- package/lib/codec/sequence/query.d.ts +0 -63
- package/lib/codec/sequence/query.js +0 -208
- package/lib/codec/sequence/tx.d.ts +0 -41
- package/lib/codec/sequence/tx.js +0 -148
- package/lib/codec/subaccount/export.d.ts +0 -4
- package/lib/codec/subaccount/export.js +0 -35
- package/lib/codec/subaccount/genesis.d.ts +0 -28
- package/lib/codec/subaccount/genesis.js +0 -110
- package/lib/codec/subaccount/legacy.d.ts +0 -19
- package/lib/codec/subaccount/legacy.js +0 -72
- package/lib/codec/subaccount/query.d.ts +0 -229
- package/lib/codec/subaccount/query.js +0 -1026
- package/lib/codec/subaccount/subaccount.d.ts +0 -57
- package/lib/codec/subaccount/subaccount.js +0 -349
- package/lib/codec/subaccount/tx.d.ts +0 -92
- package/lib/codec/subaccount/tx.js +0 -395
- package/lib/modules/feemarket.d.ts +0 -20
- package/lib/modules/feemarket.js +0 -45
- package/lib/modules/perpsliquidity.d.ts +0 -49
- package/lib/modules/perpsliquidity.js +0 -118
- package/lib/modules/vault.d.ts +0 -56
- package/lib/modules/vault.js +0 -128
- package/lib/provider/amino/types/perpsliquidity.d.ts +0 -4
- package/lib/provider/amino/types/perpsliquidity.js +0 -73
- package/lib/provider/station/StationAccount.d.ts +0 -28
- package/lib/provider/station/StationAccount.js +0 -168
- package/lib/provider/station/index.d.ts +0 -2
- package/lib/provider/station/index.js +0 -10
package/lib/util/generic.js
CHANGED
|
@@ -21,7 +21,7 @@ const overrideConfig = (defaults, override) => {
|
|
|
21
21
|
if (typeof member === "undefined")
|
|
22
22
|
continue;
|
|
23
23
|
if (typeof member === "object") {
|
|
24
|
-
result[key] = exports.overrideConfig(result[key], member);
|
|
24
|
+
result[key] = (0, exports.overrideConfig)(result[key], member);
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
result[key] = member;
|
|
@@ -38,7 +38,7 @@ const sortObject = (input) => {
|
|
|
38
38
|
const output = {};
|
|
39
39
|
Object.keys(input)
|
|
40
40
|
.sort()
|
|
41
|
-
.forEach((key) => (output[key] = exports.sortObject(input[key])));
|
|
41
|
+
.forEach((key) => (output[key] = (0, exports.sortObject)(input[key])));
|
|
42
42
|
return output;
|
|
43
43
|
};
|
|
44
44
|
exports.sortObject = sortObject;
|
|
@@ -53,7 +53,7 @@ exports.appendHexPrefix = appendHexPrefix;
|
|
|
53
53
|
const computeTxHash = (bytes) => {
|
|
54
54
|
if (!bytes)
|
|
55
55
|
return bytes;
|
|
56
|
-
return exports.toTxHash(crypto_1.sha256(bytes));
|
|
56
|
+
return (0, exports.toTxHash)((0, crypto_1.sha256)(bytes));
|
|
57
57
|
};
|
|
58
58
|
exports.computeTxHash = computeTxHash;
|
|
59
59
|
const toTxHash = (bytes) => {
|
package/lib/util/gov.d.ts
CHANGED
package/lib/util/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -8,12 +8,12 @@ export interface LegacyEIP712Tx {
|
|
|
8
8
|
readonly domain: TypedDataDomain;
|
|
9
9
|
readonly message: LegacyEIP712StdSignDoc;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type EIP712Fee = {
|
|
12
12
|
readonly amount: readonly Coin[];
|
|
13
13
|
readonly gas: string;
|
|
14
14
|
readonly feePayer: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type LegacyEIP712StdSignDoc = StdSignDoc & {
|
|
17
17
|
fee: EIP712Fee;
|
|
18
18
|
};
|
|
19
19
|
export declare function legacyConstructEIP712Tx(doc: LegacyEIP712StdSignDoc): LegacyEIP712Tx;
|
package/lib/util/legacyEIP712.js
CHANGED
|
@@ -62,7 +62,7 @@ function getMsgValueType(msgTypeUrl, msgValue, msgTypeName, objectName, nestedTy
|
|
|
62
62
|
}
|
|
63
63
|
function getTypeName(name, objectName, nestedType = false, isArray = false) {
|
|
64
64
|
if (nestedType) {
|
|
65
|
-
return `Type${objectName === 'MsgValue' ? '' : objectName}${name.split('_').map(subName => lodash_1.capitalize(subName)).join('')}${isArray ? '[]' : ''}`;
|
|
65
|
+
return `Type${objectName === 'MsgValue' ? '' : objectName}${name.split('_').map(subName => (0, lodash_1.capitalize)(subName)).join('')}${isArray ? '[]' : ''}`;
|
|
66
66
|
}
|
|
67
67
|
return name;
|
|
68
68
|
}
|
|
@@ -90,7 +90,7 @@ function legacyConstructEIP712Tx(doc) {
|
|
|
90
90
|
const eip712Tx = {
|
|
91
91
|
types: getTypes(AminoTypesMap_1.default.fromAmino(msg).typeUrl, msg.value),
|
|
92
92
|
primaryType: "Tx",
|
|
93
|
-
domain: Object.assign(Object.assign({}, eip712_1.DEFAULT_CARBON_DOMAIN_FIELDS), { chainId: ethermint_1.parseChainId(doc.chain_id) }),
|
|
93
|
+
domain: Object.assign(Object.assign({}, eip712_1.DEFAULT_CARBON_DOMAIN_FIELDS), { chainId: (0, ethermint_1.parseChainId)(doc.chain_id) }),
|
|
94
94
|
message: doc,
|
|
95
95
|
};
|
|
96
96
|
return eip712Tx;
|
package/lib/util/network.js
CHANGED
|
@@ -31,9 +31,9 @@ const parseNetwork = (network, defaultNetwork = constant_1.DEFAULT_NETWORK) => {
|
|
|
31
31
|
exports.parseNetwork = parseNetwork;
|
|
32
32
|
const carbonNetworkFromChainId = (parsedEvmChainId) => {
|
|
33
33
|
switch (parsedEvmChainId) {
|
|
34
|
-
case ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.LocalHost]): return index_1.CarbonSDK.Network.LocalHost;
|
|
35
|
-
case ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.DevNet]): return index_1.CarbonSDK.Network.DevNet;
|
|
36
|
-
case ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.TestNet]): return index_1.CarbonSDK.Network.TestNet;
|
|
34
|
+
case (0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.LocalHost]): return index_1.CarbonSDK.Network.LocalHost;
|
|
35
|
+
case (0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.DevNet]): return index_1.CarbonSDK.Network.DevNet;
|
|
36
|
+
case (0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[index_1.CarbonSDK.Network.TestNet]): return index_1.CarbonSDK.Network.TestNet;
|
|
37
37
|
default: return index_1.CarbonSDK.Network.MainNet;
|
|
38
38
|
}
|
|
39
39
|
};
|
package/lib/util/number.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import BigNumber from "bignumber.js";
|
|
|
2
2
|
export declare const BN_ONE: BigNumber;
|
|
3
3
|
export declare const BN_ZERO: BigNumber;
|
|
4
4
|
export declare const BN_10000: BigNumber;
|
|
5
|
-
export declare const parseBN: (input?: string |
|
|
6
|
-
export declare const bnOrZero: (input?: string |
|
|
7
|
-
export declare const toHuman: (value?:
|
|
8
|
-
export declare const toUnitless: (value?:
|
|
5
|
+
export declare const parseBN: (input?: string | BigNumber | number | null, defaultValue?: BigNumber) => BigNumber | undefined;
|
|
6
|
+
export declare const bnOrZero: (input?: string | BigNumber | number | null, defaultValue?: BigNumber) => BigNumber;
|
|
7
|
+
export declare const toHuman: (value?: null | BigNumber | string | number, decimals?: null | BigNumber | string | number) => BigNumber | undefined;
|
|
8
|
+
export declare const toUnitless: (value?: null | BigNumber | string | number, decimals?: null | BigNumber | string | number) => BigNumber | undefined;
|
|
9
9
|
export declare const generateNonce: () => number;
|
package/lib/util/number.js
CHANGED
|
@@ -18,26 +18,26 @@ const parseBN = (input, defaultValue) => {
|
|
|
18
18
|
};
|
|
19
19
|
exports.parseBN = parseBN;
|
|
20
20
|
const bnOrZero = (input, defaultValue = exports.BN_ZERO) => {
|
|
21
|
-
return exports.parseBN(input, defaultValue);
|
|
21
|
+
return (0, exports.parseBN)(input, defaultValue);
|
|
22
22
|
};
|
|
23
23
|
exports.bnOrZero = bnOrZero;
|
|
24
24
|
const toHuman = (value, decimals) => {
|
|
25
25
|
if (value === undefined || value === null)
|
|
26
26
|
return undefined;
|
|
27
|
-
const valueBN = exports.bnOrZero(value);
|
|
27
|
+
const valueBN = (0, exports.bnOrZero)(value);
|
|
28
28
|
if (!decimals)
|
|
29
29
|
return valueBN; // decimals = 0 or nullish
|
|
30
|
-
const decimalsBN = exports.bnOrZero(decimals);
|
|
30
|
+
const decimalsBN = (0, exports.bnOrZero)(decimals);
|
|
31
31
|
return valueBN.shiftedBy(decimalsBN.negated().toNumber());
|
|
32
32
|
};
|
|
33
33
|
exports.toHuman = toHuman;
|
|
34
34
|
const toUnitless = (value, decimals) => {
|
|
35
35
|
if (value === undefined || value === null)
|
|
36
36
|
return undefined;
|
|
37
|
-
const valueBN = exports.bnOrZero(value);
|
|
37
|
+
const valueBN = (0, exports.bnOrZero)(value);
|
|
38
38
|
if (!decimals)
|
|
39
39
|
return valueBN; // decimals = 0 or nullish
|
|
40
|
-
const decimalsBN = exports.bnOrZero(decimals);
|
|
40
|
+
const decimalsBN = (0, exports.bnOrZero)(decimals);
|
|
41
41
|
return valueBN.shiftedBy(decimalsBN.toNumber());
|
|
42
42
|
};
|
|
43
43
|
exports.toUnitless = toUnitless;
|
package/lib/util/tx.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export interface TxBody extends Omit<CosmosModels.Tx.TxBody, "messages"> {
|
|
|
10
10
|
export interface Tx extends Omit<CosmosModels.Tx.Tx, "body"> {
|
|
11
11
|
body?: TxBody;
|
|
12
12
|
}
|
|
13
|
-
export declare const decode: (bytes?: Uint8Array | Buffer
|
|
14
|
-
export declare const getSender: (decodedTx: Tx, opts?: SWTHAddressOptions
|
|
13
|
+
export declare const decode: (bytes?: Uint8Array | Buffer) => Tx | undefined;
|
|
14
|
+
export declare const getSender: (decodedTx: Tx, opts?: SWTHAddressOptions) => string;
|
|
15
15
|
export declare enum BroadcastTxMode {
|
|
16
16
|
BroadcastTxSync = "sync",
|
|
17
17
|
BroadcastTxAsync = "async",
|
|
@@ -35,7 +35,7 @@ export interface BroadcastTxOpts {
|
|
|
35
35
|
timeoutMs?: number;
|
|
36
36
|
pollIntervalMs?: number;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export type SignAndBroadcastOpts = Partial<SignTxOpts & BroadcastTxOpts>;
|
|
39
39
|
export interface TxLog {
|
|
40
40
|
msg_index: number;
|
|
41
41
|
log: string;
|
package/lib/util/tx.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/util/type.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface NetworkMap<T> {
|
|
|
8
8
|
[Network.DevNet]: T;
|
|
9
9
|
[Network.LocalHost]: T;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type OptionalNetworkMap<T> = Partial<NetworkMap<T>>;
|
|
12
12
|
/**
|
|
13
13
|
* converts snakecase strings to camelcase
|
|
14
14
|
* @param snakeStr string to convert to camelcase
|
|
@@ -18,15 +18,15 @@ export interface EIP712Signer extends EvmSigner {
|
|
|
18
18
|
legacyEip712SignMode: boolean;
|
|
19
19
|
readonly signLegacyEip712: (signerAddress: string, signDoc: StdSignDoc) => Promise<LegacyEIP712AminoSignResponse>;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
21
|
+
export type CarbonSigner = DirectCarbonSigner | AminoCarbonSigner | CarbonEIP712Signer;
|
|
22
|
+
export type CarbonEIP712Signer = (DirectCarbonSigner | AminoCarbonSigner) & EIP712Signer;
|
|
23
|
+
export type DirectCarbonSigner = OfflineDirectSigner & EvmSigner & {
|
|
24
24
|
type: CarbonSignerTypes;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type AminoCarbonSigner = OfflineAminoSigner & EvmSigner & {
|
|
27
27
|
type: CarbonSignerTypes;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type LegacyEIP712AminoSignResponse = AminoSignResponse & {
|
|
30
30
|
feePayer: string;
|
|
31
31
|
};
|
|
32
32
|
export declare function isCarbonEIP712Signer(signer: OfflineSigner): boolean;
|
|
@@ -92,10 +92,6 @@ class CarbonNonSigner {
|
|
|
92
92
|
exports.CarbonNonSigner = CarbonNonSigner;
|
|
93
93
|
// Uses amino because ledger does not work with protobuf yet
|
|
94
94
|
class CarbonLedgerSigner {
|
|
95
|
-
constructor(ledger) {
|
|
96
|
-
this.ledger = ledger;
|
|
97
|
-
this.type = CarbonSignerTypes.Ledger;
|
|
98
|
-
}
|
|
99
95
|
retrieveAccount() {
|
|
100
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
97
|
if (!this.account) {
|
|
@@ -120,9 +116,9 @@ class CarbonLedgerSigner {
|
|
|
120
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
117
|
const account = yield this.retrieveAccount();
|
|
122
118
|
const { pubkey } = account;
|
|
123
|
-
const msg = JSON.stringify(generic_1.sortObject(doc));
|
|
119
|
+
const msg = JSON.stringify((0, generic_1.sortObject)(doc));
|
|
124
120
|
const signBytes = yield this.ledger.sign(msg);
|
|
125
|
-
const signature = amino_1.encodeSecp256k1Signature(pubkey, signBytes);
|
|
121
|
+
const signature = (0, amino_1.encodeSecp256k1Signature)(pubkey, signBytes);
|
|
126
122
|
return {
|
|
127
123
|
signed: doc,
|
|
128
124
|
signature,
|
|
@@ -134,5 +130,9 @@ class CarbonLedgerSigner {
|
|
|
134
130
|
throw new Error("signing not available");
|
|
135
131
|
});
|
|
136
132
|
}
|
|
133
|
+
constructor(ledger) {
|
|
134
|
+
this.ledger = ledger;
|
|
135
|
+
this.type = CarbonSignerTypes.Ledger;
|
|
136
|
+
}
|
|
137
137
|
}
|
|
138
138
|
exports.CarbonLedgerSigner = CarbonLedgerSigner;
|
|
@@ -90,10 +90,10 @@ class CarbonSigningClient extends stargate_1.StargateClient {
|
|
|
90
90
|
*/
|
|
91
91
|
sign(signerAddress, messages, fee, memo, signerData) {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
if (CarbonSigner_1.isCarbonEIP712Signer(this.signer) && this.signer.legacyEip712SignMode) {
|
|
93
|
+
if ((0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) && this.signer.legacyEip712SignMode) {
|
|
94
94
|
return this.signLegacyEip712(signerAddress, messages, fee, memo, signerData);
|
|
95
95
|
}
|
|
96
|
-
return proto_signing_1.isOfflineDirectSigner(this.signer)
|
|
96
|
+
return (0, proto_signing_1.isOfflineDirectSigner)(this.signer)
|
|
97
97
|
? this.signDirect(signerAddress, messages, fee, memo, signerData)
|
|
98
98
|
: this.signAmino(signerAddress, messages, fee, memo, signerData);
|
|
99
99
|
});
|
|
@@ -102,11 +102,11 @@ class CarbonSigningClient extends stargate_1.StargateClient {
|
|
|
102
102
|
return __awaiter(this, void 0, void 0, function* () {
|
|
103
103
|
const signer = this.signer;
|
|
104
104
|
const accountFromSigner = (yield this.signer.getAccounts()).find((account) => account.address === signerAddress);
|
|
105
|
-
if (!CarbonSigner_1.isCarbonEIP712Signer(this.signer) && !accountFromSigner) {
|
|
105
|
+
if (!(0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) && !accountFromSigner) {
|
|
106
106
|
throw new Error("Failed to retrieve account from signer");
|
|
107
107
|
}
|
|
108
108
|
const pubKeyBz = accountFromSigner ? accountFromSigner.pubkey : (yield this.signer.getAccounts())[0].pubkey;
|
|
109
|
-
const pubkey = CarbonSigner_1.isCarbonEIP712Signer(this.signer) ? ethermint_1.encodeAnyEthSecp256k1PubKey(pubKeyBz) : proto_signing_1.encodePubkey(amino_1.encodeSecp256k1Pubkey(pubKeyBz));
|
|
109
|
+
const pubkey = (0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) ? (0, ethermint_1.encodeAnyEthSecp256k1PubKey)(pubKeyBz) : (0, proto_signing_1.encodePubkey)((0, amino_1.encodeSecp256k1Pubkey)(pubKeyBz));
|
|
110
110
|
const txBodyEncodeObject = {
|
|
111
111
|
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
112
112
|
value: Object.assign({ messages: messages, memo: memo }, (timeoutHeight && {
|
|
@@ -115,13 +115,13 @@ class CarbonSigningClient extends stargate_1.StargateClient {
|
|
|
115
115
|
};
|
|
116
116
|
const txBodyBytes = this.registry.encode(txBodyEncodeObject);
|
|
117
117
|
const gasLimit = math_1.Int53.fromString(fee.gas).toNumber();
|
|
118
|
-
const authInfoBytes = proto_signing_1.makeAuthInfoBytes([{ pubkey, sequence }], fee.amount, gasLimit, undefined, undefined);
|
|
119
|
-
const signDoc = proto_signing_1.makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber);
|
|
118
|
+
const authInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence }], fee.amount, gasLimit, undefined, undefined);
|
|
119
|
+
const signDoc = (0, proto_signing_1.makeSignDoc)(txBodyBytes, authInfoBytes, chainId, accountNumber);
|
|
120
120
|
const { signature, signed } = yield signer.signDirect(signerAddress, signDoc);
|
|
121
121
|
return tx_1.TxRaw.fromPartial({
|
|
122
122
|
bodyBytes: signed.bodyBytes,
|
|
123
123
|
authInfoBytes: signed.authInfoBytes,
|
|
124
|
-
signatures: [encoding_1.fromBase64(signature.signature)],
|
|
124
|
+
signatures: [(0, encoding_1.fromBase64)(signature.signature)],
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
}
|
|
@@ -129,11 +129,11 @@ class CarbonSigningClient extends stargate_1.StargateClient {
|
|
|
129
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
130
|
const signer = this.signer;
|
|
131
131
|
const accountFromSigner = (yield this.signer.getAccounts()).find((account) => account.address === signerAddress);
|
|
132
|
-
if (!CarbonSigner_1.isCarbonEIP712Signer(this.signer) && !accountFromSigner) {
|
|
132
|
+
if (!(0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) && !accountFromSigner) {
|
|
133
133
|
throw new Error("Failed to retrieve account from signer");
|
|
134
134
|
}
|
|
135
135
|
const pubKeyBz = accountFromSigner ? accountFromSigner.pubkey : (yield this.signer.getAccounts())[0].pubkey;
|
|
136
|
-
const pubkey = CarbonSigner_1.isCarbonEIP712Signer(this.signer) ? ethermint_1.encodeAnyEthSecp256k1PubKey(pubKeyBz) : proto_signing_1.encodePubkey(amino_1.encodeSecp256k1Pubkey(pubKeyBz));
|
|
136
|
+
const pubkey = (0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) ? (0, ethermint_1.encodeAnyEthSecp256k1PubKey)(pubKeyBz) : (0, proto_signing_1.encodePubkey)((0, amino_1.encodeSecp256k1Pubkey)(pubKeyBz));
|
|
137
137
|
const signMode = SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
138
138
|
const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg));
|
|
139
139
|
const signDoc = makeSignDocAmino(msgs, fee, chainId, memo, accountNumber, sequence, timeoutHeight !== null && timeoutHeight !== void 0 ? timeoutHeight : 0);
|
|
@@ -148,11 +148,11 @@ class CarbonSigningClient extends stargate_1.StargateClient {
|
|
|
148
148
|
const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject);
|
|
149
149
|
const signedGasLimit = math_1.Int53.fromString(signed.fee.gas).toNumber();
|
|
150
150
|
const signedSequence = math_1.Int53.fromString(signed.sequence).toNumber();
|
|
151
|
-
const signedAuthInfoBytes = proto_signing_1.makeAuthInfoBytes([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, undefined, undefined, signMode);
|
|
151
|
+
const signedAuthInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, undefined, undefined, signMode);
|
|
152
152
|
return tx_1.TxRaw.fromPartial({
|
|
153
153
|
bodyBytes: signedTxBodyBytes,
|
|
154
154
|
authInfoBytes: signedAuthInfoBytes,
|
|
155
|
-
signatures: [encoding_1.fromBase64(signature.signature)],
|
|
155
|
+
signatures: [(0, encoding_1.fromBase64)(signature.signature)],
|
|
156
156
|
});
|
|
157
157
|
});
|
|
158
158
|
}
|
|
@@ -163,7 +163,7 @@ class CarbonSigningClient extends stargate_1.StargateClient {
|
|
|
163
163
|
}
|
|
164
164
|
const signer = this.signer;
|
|
165
165
|
const pubKeyBz = (yield this.signer.getAccounts())[0].pubkey;
|
|
166
|
-
const pubkey = ethermint_1.encodeAnyEthSecp256k1PubKey(pubKeyBz);
|
|
166
|
+
const pubkey = (0, ethermint_1.encodeAnyEthSecp256k1PubKey)(pubKeyBz);
|
|
167
167
|
const signMode = SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
168
168
|
const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg));
|
|
169
169
|
const signDoc = makeSignDocAmino(msgs, fee, evmChainId, memo, accountNumber, sequence);
|
|
@@ -171,14 +171,14 @@ class CarbonSigningClient extends stargate_1.StargateClient {
|
|
|
171
171
|
const eip712ExtensionOptions = {
|
|
172
172
|
typeUrl: "/ethermint.types.v1.ExtensionOptionsWeb3Tx",
|
|
173
173
|
value: web3_1.ExtensionOptionsWeb3Tx.encode(web3_1.ExtensionOptionsWeb3Tx.fromPartial({
|
|
174
|
-
typedDataChainId: ethermint_1.parseChainId(evmChainId),
|
|
174
|
+
typedDataChainId: (0, ethermint_1.parseChainId)(evmChainId),
|
|
175
175
|
feePayer,
|
|
176
|
-
feePayerSig: encoding_1.fromBase64(signature.signature),
|
|
176
|
+
feePayerSig: (0, encoding_1.fromBase64)(signature.signature),
|
|
177
177
|
})).finish(),
|
|
178
178
|
};
|
|
179
179
|
const signedGasLimit = math_1.Int53.fromString(signed.fee.gas).toNumber();
|
|
180
180
|
const signedSequence = math_1.Int53.fromString(signed.sequence).toNumber();
|
|
181
|
-
const signedAuthInfoBytes = proto_signing_1.makeAuthInfoBytes([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, undefined, undefined, signMode);
|
|
181
|
+
const signedAuthInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, undefined, undefined, signMode);
|
|
182
182
|
const signedTxBody = {
|
|
183
183
|
messages: signed.msgs.map((msg) => this.aminoTypes.fromAmino(msg)),
|
|
184
184
|
memo: signed.memo,
|
|
@@ -7,7 +7,6 @@ import { CarbonTx } from "../util";
|
|
|
7
7
|
import { SWTHAddressOptions } from "../util/address";
|
|
8
8
|
import { SmartWalletBlockchain } from "../util/blockchain";
|
|
9
9
|
import { BroadcastTxMode } from "../util/tx";
|
|
10
|
-
import { SimpleMap } from "../util/type";
|
|
11
10
|
import { StdSignature } from "@cosmjs/amino";
|
|
12
11
|
import { EncodeObject, OfflineDirectSigner, OfflineSigner } from "@cosmjs/proto-signing";
|
|
13
12
|
import { Account, DeliverTxResponse } from "@cosmjs/stargate";
|
|
@@ -16,10 +15,10 @@ import { BroadcastTxAsyncResponse, BroadcastTxSyncResponse, TxResponse } from "@
|
|
|
16
15
|
import { Key as LeapKey } from "@cosmos-kit/core";
|
|
17
16
|
import { Leap } from "@cosmos-kit/leap";
|
|
18
17
|
import { Key } from "@keplr-wallet/types";
|
|
19
|
-
import BigNumber from "bignumber.js";
|
|
20
18
|
import { TxRaw as StargateTxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
|
21
19
|
import { CarbonSigner, CarbonSignerTypes } from "./CarbonSigner";
|
|
22
20
|
import { CarbonSigningClient } from "./CarbonSigningClient";
|
|
21
|
+
import GasFee from "../clients/GasFee";
|
|
23
22
|
export interface CarbonWalletGenericOpts {
|
|
24
23
|
tmClient?: Tendermint37Client;
|
|
25
24
|
txDefaultBroadcastMode?: BroadcastTxMode;
|
|
@@ -50,7 +49,7 @@ export interface MetaMaskWalletOpts {
|
|
|
50
49
|
publicKeyMessage?: string;
|
|
51
50
|
publicKeyBase64?: string;
|
|
52
51
|
}
|
|
53
|
-
export
|
|
52
|
+
export type CarbonWalletInitOpts = CarbonWalletGenericOpts & ({
|
|
54
53
|
mnemonic: string;
|
|
55
54
|
privateKey?: string | Buffer;
|
|
56
55
|
signer?: CarbonSigner;
|
|
@@ -102,13 +101,7 @@ export declare class CarbonWallet {
|
|
|
102
101
|
triggerMerge?: boolean;
|
|
103
102
|
publicKey: Buffer;
|
|
104
103
|
query?: CarbonQueryClient;
|
|
105
|
-
|
|
106
|
-
* @deprecated Carbon v2.9.0
|
|
107
|
-
* use gasCosts and gasPrices instead.
|
|
108
|
-
*/
|
|
109
|
-
txFees?: SimpleMap<BigNumber>;
|
|
110
|
-
txGasCosts?: SimpleMap<BigNumber>;
|
|
111
|
-
txGasPrices?: SimpleMap<BigNumber>;
|
|
104
|
+
gasFee?: GasFee;
|
|
112
105
|
txDefaultBroadCastMode?: BroadcastTxMode;
|
|
113
106
|
defaultFeeDenom: string;
|
|
114
107
|
initialized: boolean;
|
|
@@ -131,7 +124,7 @@ export declare class CarbonWallet {
|
|
|
131
124
|
static withLeap(leap: Leap, chainId: string, leapKey: LeapKey, opts?: Omit<CarbonWalletInitOpts, "signer">): CarbonWallet;
|
|
132
125
|
static withMetamask(metamask: MetaMask, evmChainId: string, compressedPubKeyBase64: string, addressOptions: SWTHAddressOptions, opts?: Omit<CarbonWalletInitOpts, "signer">): CarbonWallet;
|
|
133
126
|
static withAddress(bech32Address: string, opts?: Partial<CarbonWalletInitOpts>): CarbonWallet;
|
|
134
|
-
initialize(queryClient: CarbonQueryClient): Promise<CarbonWallet>;
|
|
127
|
+
initialize(queryClient: CarbonQueryClient, gasFee: GasFee): Promise<CarbonWallet>;
|
|
135
128
|
updateNetwork(network: Network): CarbonWallet;
|
|
136
129
|
getSignedTx(signerAddress: string, messages: readonly EncodeObject[], sequence: number, opts: Omit<CarbonTx.SignTxOpts, "sequence">): Promise<CarbonWallet.TxRaw>;
|
|
137
130
|
/**
|
|
@@ -178,9 +171,6 @@ export declare class CarbonWallet {
|
|
|
178
171
|
isBrowserInjectedSigner(): boolean;
|
|
179
172
|
isSmartWalletEnabled(): boolean;
|
|
180
173
|
getSmartWalletPrivateKey(blockchain?: SmartWalletBlockchain): Buffer | null;
|
|
181
|
-
getGasCost(msgTypeUrl: string): BigNumber;
|
|
182
|
-
getGasPrice(denom: string): BigNumber;
|
|
183
|
-
getFee(msgTypeUrl: string, denom?: string): BigNumber;
|
|
184
174
|
reconnectTmClient(): Promise<void>;
|
|
185
175
|
reloadTxFees(): Promise<void>;
|
|
186
176
|
private reloadAccountInfo;
|
|
@@ -146,9 +146,10 @@ class CarbonWallet {
|
|
|
146
146
|
static withAddress(bech32Address, opts = {}) {
|
|
147
147
|
return new CarbonWallet(Object.assign(Object.assign({}, opts), { bech32Address }));
|
|
148
148
|
}
|
|
149
|
-
initialize(queryClient) {
|
|
149
|
+
initialize(queryClient, gasFee) {
|
|
150
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
151
|
this.query = queryClient;
|
|
152
|
+
this.gasFee = gasFee;
|
|
152
153
|
yield Promise.all([this.reconnectTmClient(), this.reloadTxFees(), this.reloadAccountSequence(), this.reloadMergeAccountStatus()]);
|
|
153
154
|
this.initialized = true;
|
|
154
155
|
return this;
|
|
@@ -175,7 +176,7 @@ class CarbonWallet {
|
|
|
175
176
|
const fee = (_a = opts === null || opts === void 0 ? void 0 : opts.fee) !== null && _a !== void 0 ? _a : this.estimateTxFee(messages, feeDenom);
|
|
176
177
|
const txRaw = yield signingClient.sign(signerAddress, messages, fee, memo, signerData);
|
|
177
178
|
let sig;
|
|
178
|
-
if (CarbonSigner_1.isCarbonEIP712Signer(this.signer)) {
|
|
179
|
+
if ((0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer)) {
|
|
179
180
|
if (this.signer.legacyEip712SignMode) {
|
|
180
181
|
const feePayerSigBz = web3_1.ExtensionOptionsWeb3Tx.decode(tx_2.TxBody.decode(txRaw.bodyBytes).extensionOptions[0].value).feePayerSig;
|
|
181
182
|
sig = Uint8Array.from(Buffer.from(feePayerSigBz.slice(0, -1)));
|
|
@@ -183,11 +184,11 @@ class CarbonWallet {
|
|
|
183
184
|
else {
|
|
184
185
|
sig = txRaw.signatures[0];
|
|
185
186
|
}
|
|
186
|
-
signature = amino_1.encodeSecp256k1Signature(account.pubkey, sig);
|
|
187
|
+
signature = (0, amino_1.encodeSecp256k1Signature)(account.pubkey, sig);
|
|
187
188
|
signature = Object.assign(Object.assign({}, signature), { pub_key: Object.assign(Object.assign({}, signature.pub_key), { type: ethermint_1.ETH_SECP256K1_TYPE }) });
|
|
188
189
|
return txRaw;
|
|
189
190
|
}
|
|
190
|
-
signature = amino_1.encodeSecp256k1Signature(account.pubkey, txRaw.signatures[0]);
|
|
191
|
+
signature = (0, amino_1.encodeSecp256k1Signature)(account.pubkey, txRaw.signatures[0]);
|
|
191
192
|
return txRaw;
|
|
192
193
|
}
|
|
193
194
|
finally {
|
|
@@ -226,7 +227,7 @@ class CarbonWallet {
|
|
|
226
227
|
const tx = CarbonWallet.TxRaw.encode(txRaw).finish();
|
|
227
228
|
const carbonClient = this.getSigningClient();
|
|
228
229
|
const response = yield carbonClient.broadcastTx(tx, timeoutMs, pollIntervalMs);
|
|
229
|
-
if (stargate_1.isDeliverTxFailure(response)) {
|
|
230
|
+
if ((0, stargate_1.isDeliverTxFailure)(response)) {
|
|
230
231
|
// tx failed
|
|
231
232
|
throw new tx_1.CarbonCustomError(`[${response.code}] ${response.rawLog}`, tx_1.ErrorType.BLOCK_FAIL, response);
|
|
232
233
|
}
|
|
@@ -242,7 +243,7 @@ class CarbonWallet {
|
|
|
242
243
|
const tx = CarbonWallet.TxRaw.encode(txRaw).finish();
|
|
243
244
|
const tmClient = this.getTmClient();
|
|
244
245
|
const response = yield tmClient.broadcastTxSync({ tx });
|
|
245
|
-
if (!responses_1.broadcastTxSyncSuccess(response)) {
|
|
246
|
+
if (!(0, responses_1.broadcastTxSyncSuccess)(response)) {
|
|
246
247
|
// tx failed
|
|
247
248
|
throw new tx_1.CarbonCustomError(`[${response.code}] ${response.log}`, tx_1.ErrorType.BROADCAST_FAIL, response);
|
|
248
249
|
}
|
|
@@ -283,12 +284,12 @@ class CarbonWallet {
|
|
|
283
284
|
|| ((_a = this.accountInfo) === null || _a === void 0 ? void 0 : _a.address) === this.evmBech32Address // refresh to check if carbon acc is present
|
|
284
285
|
|| this.sequenceInvalidated)
|
|
285
286
|
yield this.reloadAccountSequence();
|
|
286
|
-
const heightResponse = yield fetch_1.fetch(`${this.networkConfig.tmRpcUrl}/blockchain?cache=${new Date().getTime()}`);
|
|
287
|
+
const heightResponse = yield (0, fetch_1.fetch)(`${this.networkConfig.tmRpcUrl}/blockchain?cache=${new Date().getTime()}`);
|
|
287
288
|
const heightRes = yield heightResponse.json();
|
|
288
|
-
const height = number_1.bnOrZero((_b = heightRes.result) === null || _b === void 0 ? void 0 : _b.last_height);
|
|
289
|
+
const height = (0, number_1.bnOrZero)((_b = heightRes.result) === null || _b === void 0 ? void 0 : _b.last_height);
|
|
289
290
|
let timeoutHeight;
|
|
290
291
|
// timeoutHeight is not supported for EIP-712
|
|
291
|
-
if (!CarbonSigner_1.isCarbonEIP712Signer(this.signer)) {
|
|
292
|
+
if (!(0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer)) {
|
|
292
293
|
timeoutHeight = height.isZero() ? undefined : height.toNumber() + this.defaultTimeoutBlocks;
|
|
293
294
|
}
|
|
294
295
|
let sequence;
|
|
@@ -443,7 +444,7 @@ class CarbonWallet {
|
|
|
443
444
|
catch (err) {
|
|
444
445
|
const error = err;
|
|
445
446
|
if (this.isTxHashNotFound(error, txId)) {
|
|
446
|
-
yield utils_1.sleep(pollIntervalMs);
|
|
447
|
+
yield (0, utils_1.sleep)(pollIntervalMs);
|
|
447
448
|
return pollForTx(txId);
|
|
448
449
|
}
|
|
449
450
|
throw err;
|
|
@@ -513,29 +514,6 @@ class CarbonWallet {
|
|
|
513
514
|
return this.privateKey;
|
|
514
515
|
return null;
|
|
515
516
|
}
|
|
516
|
-
getGasCost(msgTypeUrl) {
|
|
517
|
-
var _a, _b, _c, _d;
|
|
518
|
-
if (!this.txGasCosts) {
|
|
519
|
-
console.warn("tx gas costs not initialized");
|
|
520
|
-
}
|
|
521
|
-
return (_d = (_b = (_a = this.txGasCosts) === null || _a === void 0 ? void 0 : _a[msgTypeUrl]) !== null && _b !== void 0 ? _b : (_c = this.txGasCosts) === null || _c === void 0 ? void 0 : _c[util_1.CarbonTx.TxGasCostTypeDefaultKey]) !== null && _d !== void 0 ? _d : number_1.BN_ZERO;
|
|
522
|
-
}
|
|
523
|
-
getGasPrice(denom) {
|
|
524
|
-
var _a;
|
|
525
|
-
if (!this.txGasPrices) {
|
|
526
|
-
console.warn("tx gas prices not initialized");
|
|
527
|
-
}
|
|
528
|
-
const gasPrice = (_a = this.txGasPrices) === null || _a === void 0 ? void 0 : _a[denom];
|
|
529
|
-
if (!gasPrice) {
|
|
530
|
-
console.warn("denom not supported for paying gas");
|
|
531
|
-
}
|
|
532
|
-
return gasPrice !== null && gasPrice !== void 0 ? gasPrice : number_1.BN_ZERO;
|
|
533
|
-
}
|
|
534
|
-
getFee(msgTypeUrl, denom = this.defaultFeeDenom) {
|
|
535
|
-
const minGasPrice = this.getGasPrice(denom);
|
|
536
|
-
const msgGasCost = this.getGasCost(msgTypeUrl);
|
|
537
|
-
return msgGasCost.times(minGasPrice);
|
|
538
|
-
}
|
|
539
517
|
reconnectTmClient() {
|
|
540
518
|
return __awaiter(this, void 0, void 0, function* () {
|
|
541
519
|
this.tmClient = yield tendermint_rpc_1.Tendermint37Client.connect(this.networkConfig.tmRpcUrl);
|
|
@@ -545,21 +523,13 @@ class CarbonWallet {
|
|
|
545
523
|
});
|
|
546
524
|
}
|
|
547
525
|
reloadTxFees() {
|
|
548
|
-
var _a;
|
|
526
|
+
var _a, _b, _c;
|
|
549
527
|
return __awaiter(this, void 0, void 0, function* () {
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}, {});
|
|
556
|
-
const { minGasPrices } = yield queryClient.fee.MinGasPriceAll({});
|
|
557
|
-
this.txGasPrices = minGasPrices.reduce((result, item) => {
|
|
558
|
-
result[item.denom] = number_1.bnOrZero(item.gasPrice).shiftedBy(-18); // sdk.Dec shifting
|
|
559
|
-
return result;
|
|
560
|
-
}, {});
|
|
561
|
-
if (!this.txGasPrices[this.defaultFeeDenom]) {
|
|
562
|
-
const newDefaultFeeDenom = (_a = minGasPrices[0]) === null || _a === void 0 ? void 0 : _a.denom;
|
|
528
|
+
const txGasPrices = (_b = (_a = this.gasFee) === null || _a === void 0 ? void 0 : _a.txGasPrices) !== null && _b !== void 0 ? _b : {};
|
|
529
|
+
if (!txGasPrices[this.defaultFeeDenom]) {
|
|
530
|
+
const queryClient = this.getQueryClient();
|
|
531
|
+
const { minGasPrices } = yield queryClient.fee.MinGasPriceAll({});
|
|
532
|
+
const newDefaultFeeDenom = (_c = minGasPrices[0]) === null || _c === void 0 ? void 0 : _c.denom;
|
|
563
533
|
if (newDefaultFeeDenom) {
|
|
564
534
|
console.warn(`default fee denom ${this.defaultFeeDenom} not supported, using ${newDefaultFeeDenom} instead.`);
|
|
565
535
|
this.defaultFeeDenom = newDefaultFeeDenom;
|
|
@@ -636,12 +606,14 @@ class CarbonWallet {
|
|
|
636
606
|
return this.providerAgent === walletProvider_1.ProviderAgent.MetamaskExtension;
|
|
637
607
|
}
|
|
638
608
|
estimateTxFee(messages, feeDenom = this.defaultFeeDenom) {
|
|
639
|
-
|
|
609
|
+
var _a;
|
|
610
|
+
const denomGasPrice = (_a = this.gasFee) === null || _a === void 0 ? void 0 : _a.getGasPrice(feeDenom);
|
|
640
611
|
let totalGasCost = messages.reduce((result, message) => {
|
|
641
|
-
|
|
642
|
-
|
|
612
|
+
var _a;
|
|
613
|
+
const gasCost = (_a = this.gasFee) === null || _a === void 0 ? void 0 : _a.getGasCost(message.typeUrl);
|
|
614
|
+
return result.plus(gasCost !== null && gasCost !== void 0 ? gasCost : number_1.BN_ZERO);
|
|
643
615
|
}, number_1.BN_ZERO);
|
|
644
|
-
let totalFees = totalGasCost.times(denomGasPrice);
|
|
616
|
+
let totalFees = totalGasCost.times(denomGasPrice !== null && denomGasPrice !== void 0 ? denomGasPrice : number_1.BN_ZERO);
|
|
645
617
|
// override zero gas cost tx with some gas for tx execution
|
|
646
618
|
// set overall fee to zero, implying 0 gas price.
|
|
647
619
|
if (totalGasCost.isZero()) {
|
package/lib/wallet/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -171,7 +175,7 @@ class WSConnector {
|
|
|
171
175
|
params = [params]; // eslint-disable-line no-param-reassign
|
|
172
176
|
}
|
|
173
177
|
for (const param of params) {
|
|
174
|
-
const channelId = channel_1.generateChannelId(param);
|
|
178
|
+
const channelId = (0, channel_1.generateChannelId)(param);
|
|
175
179
|
const shouldSubscribe = this.channelHandlers[channelId] === undefined;
|
|
176
180
|
this.channelHandlers[channelId] = handler;
|
|
177
181
|
if (shouldSubscribe) {
|
|
@@ -193,7 +197,7 @@ class WSConnector {
|
|
|
193
197
|
}
|
|
194
198
|
const channelIds = [];
|
|
195
199
|
for (const param of params) {
|
|
196
|
-
const channelId = channel_1.generateChannelId(param);
|
|
200
|
+
const channelId = (0, channel_1.generateChannelId)(param);
|
|
197
201
|
const shouldUnsubscribe = this.channelHandlers[channelId] !== undefined;
|
|
198
202
|
delete this.channelHandlers[channelId];
|
|
199
203
|
if (shouldUnsubscribe) {
|
|
@@ -281,7 +285,7 @@ class WSConnector {
|
|
|
281
285
|
if (!channelHandler) {
|
|
282
286
|
this.debugLog(`handler not found for channel: ${message.channel}`);
|
|
283
287
|
try {
|
|
284
|
-
const params = channel_1.parseChannelId(message.channel);
|
|
288
|
+
const params = (0, channel_1.parseChannelId)(message.channel);
|
|
285
289
|
this.unsubscribe({ channel: params.channel });
|
|
286
290
|
}
|
|
287
291
|
catch (error) {
|
package/lib/websocket/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/websocket/types.d.ts
CHANGED
|
@@ -230,4 +230,4 @@ export interface WsSubscribeTokenSupplyByDenom extends WsSubscribeParams {
|
|
|
230
230
|
}
|
|
231
231
|
export interface WsSubscribeMarketLiquidityUsageMultiplier extends WsSubscribeParams {
|
|
232
232
|
}
|
|
233
|
-
export
|
|
233
|
+
export type WsSubscriptionParams = WsSubscribeCandlesticksParams | WsSubscribeBooksParams | WsSubscribeRecentTradesParams | WsSubscribeOrdersAllParams | WsSubscribeOrdersByMarketParams | WsSubscribeWalletBalanceParams | WsSubscribeAccountTradesAllParams | WsSubscribeAccountTradesByMarketParams | WsSubscribeMarketStatsAllParams | WsSubscribeMarketStatsByMarketParams | WsSubscribeLeveragesAllParams | WsSubscribeLeveragesByMarketParams | WsSubscribePositionsAllParams | WsSubscribePositionsByMarketParams | WsSubscribePoolsAllParams | WsSubscribePoolsByIdParams | WsSubscribeTokenPrices | WsSubscribeAllTokenPrices | WsSubscribeCommitmentParams | WsUnsubscribeCandlesticksParams | WsSubscribeCDPBorrows | WsSubscribeCDPCollaterals | WsSubscribeCDPLiquidateCollaterals | WsSubscribeTokenDebts | WsSubscribeTokenDebtByDenom | WsSubscribeRewardSchemes | WsSubscribeRewardDebts | WsSubscribeCDPTokenSupply | WsSubscribeCDPTokenSupplyByDenom | WsSubscribeTokenSupplyByDenom | WsSubscribeMarketLiquidityUsageMultiplier;
|