carbon-js-sdk 0.7.2-beta.2 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CarbonSDK.js +6 -2
- package/lib/clients/BatchQueryClient.js +4 -4
- package/lib/clients/CarbonQueryClient.js +1 -1
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/InsightsQueryClient.d.ts +7 -0
- package/lib/clients/InsightsQueryClient.js +17 -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/adl/genesis.d.ts +3 -3
- package/lib/codec/admin/genesis.d.ts +3 -3
- package/lib/codec/admin/query.d.ts +6 -6
- package/lib/codec/admin/tx.d.ts +6 -6
- package/lib/codec/alliance/alliance.d.ts +5 -5
- package/lib/codec/alliance/delegations.d.ts +8 -8
- package/lib/codec/alliance/events.d.ts +6 -6
- package/lib/codec/alliance/genesis.d.ts +7 -7
- package/lib/codec/alliance/gov.d.ts +5 -5
- package/lib/codec/alliance/params.d.ts +4 -4
- package/lib/codec/alliance/query.d.ts +24 -24
- package/lib/codec/alliance/tx.d.ts +10 -10
- package/lib/codec/bank/event.d.ts +7 -7
- package/lib/codec/bank/genesis.d.ts +3 -3
- package/lib/codec/bank/query.d.ts +6 -6
- package/lib/codec/book/book.d.ts +6 -6
- package/lib/codec/book/event.d.ts +3 -3
- package/lib/codec/book/genesis.d.ts +3 -3
- package/lib/codec/book/legacy.d.ts +3 -3
- package/lib/codec/book/query.d.ts +12 -12
- package/lib/codec/broker/amm.d.ts +5 -5
- package/lib/codec/broker/candlestick.d.ts +3 -3
- package/lib/codec/broker/event.d.ts +4 -4
- package/lib/codec/broker/genesis.d.ts +3 -3
- package/lib/codec/broker/incoming_liquidations.d.ts +3 -3
- package/lib/codec/broker/pagination.d.ts +3 -3
- package/lib/codec/broker/query.d.ts +8 -8
- package/lib/codec/broker/tx.d.ts +5 -5
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +3 -3
- package/lib/codec/btcx/denom_info.d.ts +3 -3
- package/lib/codec/btcx/genesis.d.ts +3 -3
- package/lib/codec/btcx/query.d.ts +6 -6
- package/lib/codec/btcx/tx.d.ts +8 -8
- package/lib/codec/carbon-models.js +5 -1
- package/lib/codec/ccm/ccm.d.ts +3 -3
- package/lib/codec/ccm/genesis.d.ts +7 -7
- package/lib/codec/ccm/query.d.ts +4 -4
- package/lib/codec/ccm/tx.d.ts +8 -8
- package/lib/codec/cdp/asset_params.d.ts +5 -5
- package/lib/codec/cdp/cdp_liquidations.d.ts +3 -3
- package/lib/codec/cdp/debt_info.d.ts +3 -3
- package/lib/codec/cdp/e_mode_category.d.ts +3 -3
- package/lib/codec/cdp/event.d.ts +36 -36
- package/lib/codec/cdp/genesis.d.ts +10 -10
- package/lib/codec/cdp/params.d.ts +3 -3
- package/lib/codec/cdp/query.d.ts +53 -53
- package/lib/codec/cdp/rate_strategy_params.d.ts +3 -3
- package/lib/codec/cdp/reward_scheme.d.ts +6 -6
- package/lib/codec/cdp/stablecoin_debt_info.d.ts +3 -3
- package/lib/codec/cdp/stablecoin_interest_info.d.ts +3 -3
- package/lib/codec/cdp/tx.d.ts +87 -87
- package/lib/codec/coin/bridge.d.ts +3 -3
- package/lib/codec/coin/event.d.ts +14 -14
- package/lib/codec/coin/genesis.d.ts +4 -4
- package/lib/codec/coin/group.d.ts +5 -5
- package/lib/codec/coin/proposal.d.ts +3 -3
- package/lib/codec/coin/query.d.ts +26 -26
- package/lib/codec/coin/token.d.ts +9 -9
- package/lib/codec/coin/tx.d.ts +48 -48
- package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +3 -3
- package/lib/codec/cosmos/app/v1alpha1/config.d.ts +4 -4
- package/lib/codec/cosmos/app/v1alpha1/module.d.ts +5 -5
- package/lib/codec/cosmos/app/v1alpha1/query.d.ts +4 -4
- package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +5 -5
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +20 -20
- package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +6 -6
- package/lib/codec/cosmos/authz/v1beta1/event.d.ts +4 -4
- package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +8 -8
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +3 -3
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +9 -9
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +21 -21
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +6 -6
- package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +12 -12
- package/lib/codec/cosmos/base/kv/v1beta1/kv.d.ts +4 -4
- package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +4 -4
- package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +4 -4
- package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +6 -6
- package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +28 -28
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +11 -11
- package/lib/codec/cosmos/base/store/v1beta1/commit_info.d.ts +5 -5
- package/lib/codec/cosmos/base/store/v1beta1/listening.d.ts +5 -5
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +21 -21
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +4 -4
- package/lib/codec/cosmos/base/v1beta1/coin.d.ts +6 -6
- package/lib/codec/cosmos/capability/v1beta1/capability.d.ts +5 -5
- package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +4 -4
- package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +3 -3
- package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +7 -7
- package/lib/codec/cosmos/crypto/multisig/keys.d.ts +3 -3
- package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +4 -4
- package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +4 -4
- package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +4 -4
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +14 -14
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +10 -10
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +22 -22
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +10 -10
- package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +3 -3
- package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +6 -6
- package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +6 -6
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +6 -6
- package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/gov/v1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/gov/v1/gov.d.ts +10 -10
- package/lib/codec/cosmos/gov/v1/query.d.ts +18 -18
- package/lib/codec/cosmos/gov/v1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1/tx.d.ts +12 -12
- package/lib/codec/cosmos/gov/v1/tx.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +11 -11
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +18 -18
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +10 -10
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/group/v1/events.d.ts +11 -11
- package/lib/codec/cosmos/group/v1/events.js +2 -2
- package/lib/codec/cosmos/group/v1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/group/v1/query.d.ts +30 -30
- package/lib/codec/cosmos/group/v1/tx.d.ts +30 -30
- package/lib/codec/cosmos/group/v1/tx.js +4 -4
- package/lib/codec/cosmos/group/v1/types.d.ts +13 -13
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +4 -4
- package/lib/codec/cosmos/mint/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/nft/v1beta1/event.d.ts +5 -5
- package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +4 -4
- package/lib/codec/cosmos/nft/v1beta1/query.d.ts +16 -16
- package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +3 -3
- package/lib/codec/cosmos/orm/v1/orm.d.ts +6 -6
- package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +4 -4
- package/lib/codec/cosmos/params/v1beta1/params.d.ts +4 -4
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +7 -7
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +6 -6
- package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +8 -8
- package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +4 -4
- package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +4 -4
- package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +4 -4
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +30 -30
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +22 -22
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +14 -14
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +7 -7
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +12 -12
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +15 -15
- package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +12 -12
- package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +6 -6
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +6 -6
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +8 -8
- package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +8 -8
- package/lib/codec/cosmos-models.js +5 -1
- package/lib/codec/erc20/erc20.d.ts +3 -3
- package/lib/codec/erc20/events.d.ts +6 -6
- package/lib/codec/erc20/genesis.d.ts +4 -4
- package/lib/codec/erc20/query.d.ts +8 -8
- package/lib/codec/erc20/tx.d.ts +16 -16
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +4 -4
- package/lib/codec/ethermint/evm/v1/events.d.ts +6 -6
- package/lib/codec/ethermint/evm/v1/evm.d.ts +10 -10
- package/lib/codec/ethermint/evm/v1/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 +10 -10
- package/lib/codec/ethermint/feemarket/v1/events.d.ts +4 -4
- 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/feemarket/v1/tx.d.ts +4 -4
- package/lib/codec/ethermint/types/v1/account.d.ts +3 -3
- package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +3 -3
- package/lib/codec/ethermint/types/v1/indexer.d.ts +3 -3
- package/lib/codec/ethermint/types/v1/web3.d.ts +3 -3
- package/lib/codec/ethermint-models.js +5 -1
- package/lib/codec/evmbank/genesis.d.ts +4 -4
- package/lib/codec/evmbank/query.d.ts +4 -4
- package/lib/codec/evmcontract/genesis.d.ts +3 -3
- package/lib/codec/evmmerge/address.d.ts +3 -3
- package/lib/codec/evmmerge/event.d.ts +3 -3
- package/lib/codec/evmmerge/genesis.d.ts +5 -5
- package/lib/codec/evmmerge/offchain.d.ts +3 -3
- package/lib/codec/evmmerge/query.d.ts +6 -6
- package/lib/codec/evmmerge/tx.d.ts +4 -4
- package/lib/codec/fee/event.d.ts +3 -3
- package/lib/codec/fee/fee.d.ts +5 -5
- package/lib/codec/fee/genesis.d.ts +3 -3
- package/lib/codec/fee/proposal.d.ts +6 -6
- package/lib/codec/fee/query.d.ts +10 -10
- package/lib/codec/fee/tx.d.ts +10 -10
- package/lib/codec/google/protobuf/any.d.ts +3 -3
- package/lib/codec/google/protobuf/duration.d.ts +3 -3
- package/lib/codec/google/protobuf/timestamp.d.ts +3 -3
- package/lib/codec/google/protobuf/wrappers.d.ts +11 -11
- package/lib/codec/headersync/consensus_peers.d.ts +7 -7
- package/lib/codec/headersync/genesis.d.ts +7 -7
- package/lib/codec/headersync/query.d.ts +6 -6
- package/lib/codec/headersync/tx.d.ts +6 -6
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +3 -3
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +6 -6
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +7 -7
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +3 -3
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +22 -22
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +10 -10
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +6 -6
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +6 -6
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +7 -7
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +4 -4
- package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +3 -3
- package/lib/codec/ibc/applications/interchain_accounts/v1/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 +12 -12
- 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 +9 -9
- 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 +20 -20
- 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 +14 -14
- 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/inflation/genesis.d.ts +3 -3
- package/lib/codec/inflation/inflation.d.ts +3 -3
- package/lib/codec/inflation/query.d.ts +4 -4
- package/lib/codec/insurance/event.d.ts +3 -3
- package/lib/codec/insurance/fund.d.ts +4 -4
- package/lib/codec/insurance/genesis.d.ts +3 -3
- package/lib/codec/insurance/query.d.ts +4 -4
- package/lib/codec/insurance/tx.d.ts +4 -4
- package/lib/codec/leverage/event.d.ts +3 -3
- package/lib/codec/leverage/genesis.d.ts +3 -3
- package/lib/codec/leverage/leverage.d.ts +4 -4
- package/lib/codec/leverage/query.d.ts +6 -6
- package/lib/codec/leverage/tx.d.ts +4 -4
- package/lib/codec/liquidation/genesis.d.ts +4 -4
- package/lib/codec/liquidation/liquidation.d.ts +3 -3
- package/lib/codec/liquidation/outstanding_position.d.ts +4 -4
- package/lib/codec/liquidation/query.d.ts +6 -6
- package/lib/codec/liquidation/quote_changes.d.ts +3 -3
- package/lib/codec/liquiditypool/event.d.ts +15 -15
- package/lib/codec/liquiditypool/genesis.d.ts +3 -3
- package/lib/codec/liquiditypool/liquiditypool.d.ts +12 -12
- package/lib/codec/liquiditypool/proposal.d.ts +11 -11
- package/lib/codec/liquiditypool/query.d.ts +31 -31
- package/lib/codec/liquiditypool/reward.d.ts +18 -18
- package/lib/codec/liquiditypool/tx.d.ts +39 -39
- package/lib/codec/lockproxy/event.d.ts +4 -4
- package/lib/codec/lockproxy/genesis.d.ts +6 -6
- package/lib/codec/lockproxy/lockproxy.d.ts +3 -3
- package/lib/codec/lockproxy/query.d.ts +6 -6
- package/lib/codec/lockproxy/tx.d.ts +12 -12
- package/lib/codec/market/event.d.ts +3 -3
- package/lib/codec/market/fee.d.ts +7 -7
- package/lib/codec/market/genesis.d.ts +3 -3
- package/lib/codec/market/market.d.ts +7 -7
- package/lib/codec/market/proposal.d.ts +5 -5
- package/lib/codec/market/query.d.ts +20 -20
- package/lib/codec/market/tx.d.ts +21 -21
- package/lib/codec/marketstats/genesis.d.ts +3 -3
- package/lib/codec/marketstats/marketstats.d.ts +3 -3
- package/lib/codec/marketstats/params.d.ts +3 -3
- package/lib/codec/marketstats/query.d.ts +6 -6
- package/lib/codec/misc/block.d.ts +3 -3
- package/lib/codec/misc/message.d.ts +3 -3
- package/lib/codec/misc/message_type.d.ts +3 -3
- package/lib/codec/misc/query.d.ts +16 -16
- package/lib/codec/misc/trade.d.ts +3 -3
- package/lib/codec/misc/transaction.d.ts +4 -4
- package/lib/codec/oracle/event.d.ts +4 -4
- package/lib/codec/oracle/genesis.d.ts +3 -3
- package/lib/codec/oracle/oracle.d.ts +8 -8
- package/lib/codec/oracle/proposal.d.ts +3 -3
- package/lib/codec/oracle/query.d.ts +28 -28
- package/lib/codec/oracle/slashing.d.ts +4 -4
- package/lib/codec/oracle/tx.d.ts +14 -14
- package/lib/codec/order/event.d.ts +3 -3
- package/lib/codec/order/genesis.d.ts +6 -6
- package/lib/codec/order/order.d.ts +9 -9
- package/lib/codec/order/query.d.ts +12 -12
- package/lib/codec/order/tx.d.ts +12 -12
- package/lib/codec/perpspool/event.d.ts +9 -9
- package/lib/codec/perpspool/genesis.d.ts +6 -6
- package/lib/codec/perpspool/market.d.ts +8 -8
- package/lib/codec/perpspool/params.d.ts +3 -3
- package/lib/codec/perpspool/pool.d.ts +8 -8
- package/lib/codec/perpspool/query.d.ts +20 -20
- package/lib/codec/perpspool/tx.d.ts +18 -18
- package/lib/codec/polynetwork-models.js +5 -1
- package/lib/codec/position/event.d.ts +3 -3
- package/lib/codec/position/genesis.d.ts +3 -3
- package/lib/codec/position/position.d.ts +6 -6
- package/lib/codec/position/query.d.ts +8 -8
- package/lib/codec/position/tx.d.ts +4 -4
- package/lib/codec/pricing/event.d.ts +8 -8
- package/lib/codec/pricing/genesis.d.ts +3 -3
- package/lib/codec/pricing/legacy.d.ts +3 -3
- package/lib/codec/pricing/pricing.d.ts +5 -5
- package/lib/codec/pricing/proposal.d.ts +4 -4
- package/lib/codec/pricing/query.d.ts +16 -16
- package/lib/codec/pricing/tx.d.ts +12 -12
- package/lib/codec/profile/event.d.ts +3 -3
- package/lib/codec/profile/genesis.d.ts +3 -3
- package/lib/codec/profile/profile.d.ts +3 -3
- package/lib/codec/profile/query.d.ts +8 -8
- package/lib/codec/profile/tx.d.ts +4 -4
- package/lib/codec/proofs.d.ts +15 -15
- package/lib/codec/sequence/genesis.d.ts +4 -4
- package/lib/codec/sequence/query.d.ts +6 -6
- package/lib/codec/sequence/tx.d.ts +4 -4
- package/lib/codec/subaccount/genesis.d.ts +3 -3
- package/lib/codec/subaccount/legacy.d.ts +3 -3
- package/lib/codec/subaccount/query.d.ts +17 -17
- package/lib/codec/subaccount/subaccount.d.ts +6 -6
- package/lib/codec/subaccount/tx.d.ts +8 -8
- package/lib/codec/tendermint/abci/types.d.ts +46 -46
- package/lib/codec/tendermint/crypto/keys.d.ts +3 -3
- package/lib/codec/tendermint/crypto/proof.d.ts +7 -7
- package/lib/codec/tendermint/libs/bits/types.d.ts +3 -3
- package/lib/codec/tendermint/p2p/types.d.ts +6 -6
- package/lib/codec/tendermint/types/block.d.ts +3 -3
- package/lib/codec/tendermint/types/evidence.d.ts +6 -6
- package/lib/codec/tendermint/types/params.d.ts +8 -8
- package/lib/codec/tendermint/types/types.d.ts +15 -15
- package/lib/codec/tendermint/types/validator.d.ts +5 -5
- package/lib/codec/tendermint/version/types.d.ts +4 -4
- package/lib/constant/address.d.ts +1 -1
- package/lib/constant/generic.js +1 -1
- package/lib/constant/ibc.d.ts +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 +2 -1
- package/lib/insights/common.js +1 -0
- package/lib/insights/competition.d.ts +15 -0
- 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 +5 -5
- 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/modules/test.d.ts +0 -0
- package/lib/modules/test.js +1 -0
- 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 +7 -3
- 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 +1 -1
- package/lib/wallet/CarbonWallet.js +11 -11
- 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/ibc/applications/interchain_accounts/v1/genesis.d.ts +0 -76
- package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.js +0 -424
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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];
|
|
@@ -44,9 +48,9 @@ const MsgWithdrawDelegatorReward = {
|
|
|
44
48
|
valueMap: {},
|
|
45
49
|
};
|
|
46
50
|
const StakingAmino = {
|
|
47
|
-
[CarbonTx.Types.MsgDelegate]: utils_1.generateAminoType(MsgDelegate),
|
|
48
|
-
[CarbonTx.Types.MsgUndelegate]: utils_1.generateAminoType(MsgUndelegate),
|
|
49
|
-
[CarbonTx.Types.MsgBeginRedelegate]: utils_1.generateAminoType(MsgBeginRedelegate),
|
|
50
|
-
[CarbonTx.Types.MsgWithdrawDelegatorReward]: utils_1.generateAminoType(MsgWithdrawDelegatorReward),
|
|
51
|
+
[CarbonTx.Types.MsgDelegate]: (0, utils_1.generateAminoType)(MsgDelegate),
|
|
52
|
+
[CarbonTx.Types.MsgUndelegate]: (0, utils_1.generateAminoType)(MsgUndelegate),
|
|
53
|
+
[CarbonTx.Types.MsgBeginRedelegate]: (0, utils_1.generateAminoType)(MsgBeginRedelegate),
|
|
54
|
+
[CarbonTx.Types.MsgWithdrawDelegatorReward]: (0, utils_1.generateAminoType)(MsgWithdrawDelegatorReward),
|
|
51
55
|
};
|
|
52
56
|
exports.default = StakingAmino;
|
|
@@ -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];
|
|
@@ -39,8 +43,8 @@ const MsgRemoveSubAccount = {
|
|
|
39
43
|
valueMap: {},
|
|
40
44
|
};
|
|
41
45
|
const SubAccountAmino = {
|
|
42
|
-
[CarbonTx.Types.MsgCreateSubAccount]: utils_1.generateAminoType(MsgCreateSubAccount),
|
|
43
|
-
[CarbonTx.Types.MsgActivateSubAccount]: utils_1.generateAminoType(MsgActivateSubAccount),
|
|
44
|
-
[CarbonTx.Types.MsgRemoveSubAccount]: utils_1.generateAminoType(MsgRemoveSubAccount),
|
|
46
|
+
[CarbonTx.Types.MsgCreateSubAccount]: (0, utils_1.generateAminoType)(MsgCreateSubAccount),
|
|
47
|
+
[CarbonTx.Types.MsgActivateSubAccount]: (0, utils_1.generateAminoType)(MsgActivateSubAccount),
|
|
48
|
+
[CarbonTx.Types.MsgRemoveSubAccount]: (0, utils_1.generateAminoType)(MsgRemoveSubAccount),
|
|
45
49
|
};
|
|
46
50
|
exports.default = SubAccountAmino;
|
|
@@ -11,7 +11,7 @@ export declare enum ConvertEncType {
|
|
|
11
11
|
DateToNum = "date-number",
|
|
12
12
|
Duration = "duration"
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type AminoValueMap = SimpleMap<ConvertEncType> | SimpleMap<SimpleMap<ConvertEncType>> | SimpleMap<SimpleMap<SimpleMap<ConvertEncType>>> | SimpleMap<SimpleMap<SimpleMap<SimpleMap<ConvertEncType>>>> | SimpleMap<SimpleMap<SimpleMap<SimpleMap<SimpleMap<ConvertEncType>>>>> | SimpleMap<SimpleMap<ConvertEncType> | ConvertEncType> | SimpleMap<SimpleMap<SimpleMap<SimpleMap<ConvertEncType> | ConvertEncType>>> | SimpleMap<SimpleMap<SimpleMap<SimpleMap<SimpleMap<ConvertEncType> | ConvertEncType>>>>;
|
|
15
15
|
export interface AminoInit {
|
|
16
16
|
aminoType: string;
|
|
17
17
|
valueMap: AminoValueMap;
|
|
@@ -37,6 +37,6 @@ export declare const mapEachIndiv: (mapItem: TypeUtils.SimpleMap<any> | null | u
|
|
|
37
37
|
* @param type param type (check ConvertEncType for list of types)
|
|
38
38
|
* @param toAmino indicates whether to convert to amino or direct
|
|
39
39
|
*/
|
|
40
|
-
export declare const paramConverter: (value: any, type?: ConvertEncType
|
|
40
|
+
export declare const paramConverter: (value: any, type?: ConvertEncType, toAmino?: boolean) => unknown;
|
|
41
41
|
export declare const generateAminoType: (amino: AminoInit, aminoProcess?: AminoProcess) => AminoConverter;
|
|
42
42
|
export declare const pruneAmino: (value: any, pruneMap: TypeUtils.SimpleMap<ConvertEncType>) => any;
|
|
@@ -44,23 +44,23 @@ const mapEachIndiv = (mapItem, valueKey, toAmino = false) => {
|
|
|
44
44
|
if (typeof keyMap !== "object") {
|
|
45
45
|
// Check if this is a Long/BigNumber/Buffer/Date/Duration obj or a non-object/array
|
|
46
46
|
if (typeCheck(mapItem[key]) || typeof mapItem[key] !== "object") {
|
|
47
|
-
directMap[altKey] = exports.paramConverter(mapItem[key], keyMap, toAmino);
|
|
47
|
+
directMap[altKey] = (0, exports.paramConverter)(mapItem[key], keyMap, toAmino);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
if (mapItem[key].length && typeof mapItem[key] === "object") {
|
|
52
52
|
// If value is an array of objects, iterate through objects and call mapToObj function
|
|
53
53
|
directMap[altKey] = mapItem[key].map((newMap) => {
|
|
54
|
-
return exports.mapEachIndiv(newMap, valueKey, toAmino);
|
|
54
|
+
return (0, exports.mapEachIndiv)(newMap, valueKey, toAmino);
|
|
55
55
|
});
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
59
|
if (util_1.TypeUtils.isDurationType(mapItem[key])) {
|
|
60
|
-
directMap[altKey] = exports.paramConverter(mapItem[key], keyMap, toAmino);
|
|
60
|
+
directMap[altKey] = (0, exports.paramConverter)(mapItem[key], keyMap, toAmino);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
directMap[altKey] = exports.mapEachIndiv(mapItem[key], keyMap, toAmino);
|
|
63
|
+
directMap[altKey] = (0, exports.mapEachIndiv)(mapItem[key], keyMap, toAmino);
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
return directMap;
|
|
@@ -139,11 +139,11 @@ const generateAminoType = (amino, aminoProcess = {}) => {
|
|
|
139
139
|
if (!newInput[key])
|
|
140
140
|
return;
|
|
141
141
|
if (typeCheck(newInput[key])) {
|
|
142
|
-
aminoObj[snakeKey] = exports.paramConverter(newInput[key], newAminoMap[key], true);
|
|
142
|
+
aminoObj[snakeKey] = (0, exports.paramConverter)(newInput[key], newAminoMap[key], true);
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
if (typeof newInput[key] !== "object" && typeof newAminoMap[key] !== "object") {
|
|
146
|
-
aminoObj[snakeKey] = exports.paramConverter(newInput[key], newAminoMap[key], true);
|
|
146
|
+
aminoObj[snakeKey] = (0, exports.paramConverter)(newInput[key], newAminoMap[key], true);
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
149
149
|
// empty array should be mapped over too
|
|
@@ -152,10 +152,10 @@ const generateAminoType = (amino, aminoProcess = {}) => {
|
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
if (((_b = newInput[key]) === null || _b === void 0 ? void 0 : _b.length) && typeof newInput[key] === "object") {
|
|
155
|
-
aminoObj[snakeKey] = newInput[key].map((newItem) => exports.mapEachIndiv(newItem, newAminoMap[key], true));
|
|
155
|
+
aminoObj[snakeKey] = newInput[key].map((newItem) => (0, exports.mapEachIndiv)(newItem, newAminoMap[key], true));
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
aminoObj[snakeKey] = exports.mapEachIndiv(newInput[key], newAminoMap[key], true);
|
|
158
|
+
aminoObj[snakeKey] = (0, exports.mapEachIndiv)(newInput[key], newAminoMap[key], true);
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
161
|
return aminoObj;
|
|
@@ -169,14 +169,14 @@ const generateAminoType = (amino, aminoProcess = {}) => {
|
|
|
169
169
|
var _a;
|
|
170
170
|
const camelKey = util_1.TypeUtils.snakeToCamel(key);
|
|
171
171
|
if (typeof newInput[key] !== "object" && typeof newAminoMap[key] !== "object") {
|
|
172
|
-
aminoObj[camelKey] = exports.paramConverter(newInput[key], newAminoMap[camelKey], false);
|
|
172
|
+
aminoObj[camelKey] = (0, exports.paramConverter)(newInput[key], newAminoMap[camelKey], false);
|
|
173
173
|
}
|
|
174
174
|
else {
|
|
175
175
|
if (((_a = newInput[key]) === null || _a === void 0 ? void 0 : _a.length) && typeof newInput[key] === "object") {
|
|
176
|
-
aminoObj[camelKey] = newInput[key].map((newItem) => exports.mapEachIndiv(newItem, newAminoMap[camelKey], false));
|
|
176
|
+
aminoObj[camelKey] = newInput[key].map((newItem) => (0, exports.mapEachIndiv)(newItem, newAminoMap[camelKey], false));
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
aminoObj[camelKey] = exports.mapEachIndiv(newInput[key], newAminoMap[camelKey], false);
|
|
179
|
+
aminoObj[camelKey] = (0, exports.mapEachIndiv)(newInput[key], newAminoMap[camelKey], false);
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
return aminoObj;
|
|
@@ -27,13 +27,13 @@ const SWTH = {
|
|
|
27
27
|
class KeplrAccount {
|
|
28
28
|
static createKeplrSigner(keplr, chainInfo, account) {
|
|
29
29
|
const signDirect = (signerAddress, doc) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
return yield provider_1.signTransactionWrapper(() => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return yield (0, provider_1.signTransactionWrapper)(() => __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
const signOpts = { preferNoSetFee: true };
|
|
32
32
|
return yield keplr.signDirect(chainInfo.chainId, signerAddress, doc, signOpts);
|
|
33
33
|
}));
|
|
34
34
|
});
|
|
35
35
|
const signAmino = (signerAddress, doc) => __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
return yield provider_1.signTransactionWrapper(() => __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return yield (0, provider_1.signTransactionWrapper)(() => __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const signOpts = { preferNoSetFee: true };
|
|
38
38
|
return yield keplr.signAmino(chainInfo.chainId, signerAddress, doc, signOpts);
|
|
39
39
|
}));
|
|
@@ -50,7 +50,7 @@ class KeplrAccount {
|
|
|
50
50
|
const sendEvmTransaction = (api, req) => __awaiter(this, void 0, void 0, function* () {
|
|
51
51
|
var _a, _b, _c, _d;
|
|
52
52
|
try {
|
|
53
|
-
const request = yield ethermint_1.populateEvmTransactionDetails(api, req);
|
|
53
|
+
const request = yield (0, ethermint_1.populateEvmTransactionDetails)(api, req);
|
|
54
54
|
const signedTx = yield keplr.signEthereum(
|
|
55
55
|
// carbon chain id
|
|
56
56
|
(_b = (_a = api.wallet) === null || _a === void 0 ? void 0 : _a.getChainId()) !== null && _b !== void 0 ? _b : '',
|
|
@@ -62,7 +62,7 @@ class KeplrAccount {
|
|
|
62
62
|
}
|
|
63
63
|
catch (error) {
|
|
64
64
|
console.error(error);
|
|
65
|
-
throw (error_1.parseEvmError(error));
|
|
65
|
+
throw ((0, error_1.parseEvmError)(error));
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
return {
|
|
@@ -90,7 +90,7 @@ class KeplrAccount {
|
|
|
90
90
|
const sendEvmTransaction = (api, req) => __awaiter(this, void 0, void 0, function* () {
|
|
91
91
|
var _a, _b, _c, _d;
|
|
92
92
|
try {
|
|
93
|
-
const request = yield ethermint_1.populateEvmTransactionDetails(api, req);
|
|
93
|
+
const request = yield (0, ethermint_1.populateEvmTransactionDetails)(api, req);
|
|
94
94
|
const signedTx = yield keplr.signEthereum(
|
|
95
95
|
// carbon chain id
|
|
96
96
|
(_b = (_a = api.wallet) === null || _a === void 0 ? void 0 : _a.getChainId()) !== null && _b !== void 0 ? _b : '',
|
|
@@ -102,7 +102,7 @@ class KeplrAccount {
|
|
|
102
102
|
}
|
|
103
103
|
catch (error) {
|
|
104
104
|
console.error(error);
|
|
105
|
-
throw (error_1.parseEvmError(error));
|
|
105
|
+
throw ((0, error_1.parseEvmError)(error));
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
return {
|
|
@@ -23,13 +23,13 @@ const SWTH = {
|
|
|
23
23
|
class LeapAccount {
|
|
24
24
|
static createLeapSigner(leap, chainId) {
|
|
25
25
|
const signDirect = (signerAddress, doc) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
return yield provider_1.signTransactionWrapper(() => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield (0, provider_1.signTransactionWrapper)(() => __awaiter(this, void 0, void 0, function* () {
|
|
27
27
|
const signOpts = { preferNoSetFee: true };
|
|
28
28
|
return yield leap.signDirect(chainId, signerAddress, doc, signOpts);
|
|
29
29
|
}));
|
|
30
30
|
});
|
|
31
31
|
const signAmino = (signerAddress, doc) => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
return yield provider_1.signTransactionWrapper(() => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return yield (0, provider_1.signTransactionWrapper)(() => __awaiter(this, void 0, void 0, function* () {
|
|
33
33
|
const signOpts = { preferNoSetFee: true };
|
|
34
34
|
return yield leap.signAmino(chainId, signerAddress, doc, signOpts);
|
|
35
35
|
}));
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
/* @ts-nocheck */
|
|
4
4
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
5
|
if (k2 === undefined) k2 = k;
|
|
6
|
-
Object.
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
7
11
|
}) : (function(o, m, k, k2) {
|
|
8
12
|
if (k2 === undefined) k2 = k;
|
|
9
13
|
o[k2] = m[k];
|
|
@@ -163,7 +167,7 @@ class CosmosLedger {
|
|
|
163
167
|
const response = yield this.cosmosApp.getVersion();
|
|
164
168
|
yield this.checkLedgerErrors(response);
|
|
165
169
|
const { major, minor, patch, test_mode } = response;
|
|
166
|
-
exports.checkAppMode(this.testModeAllowed, test_mode);
|
|
170
|
+
(0, exports.checkAppMode)(this.testModeAllowed, test_mode);
|
|
167
171
|
const version = versionString({ major, minor, patch });
|
|
168
172
|
return version;
|
|
169
173
|
});
|
|
@@ -251,12 +255,12 @@ class CosmosLedger {
|
|
|
251
255
|
sign(signMessage) {
|
|
252
256
|
return __awaiter(this, void 0, void 0, function* () {
|
|
253
257
|
yield this.connect();
|
|
254
|
-
const response = yield provider_1.signTransactionWrapper(() => __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const response = yield (0, provider_1.signTransactionWrapper)(() => __awaiter(this, void 0, void 0, function* () {
|
|
255
259
|
return yield this.cosmosApp.sign(this.hdPath, signMessage);
|
|
256
260
|
}));
|
|
257
261
|
yield this.checkLedgerErrors(response);
|
|
258
262
|
// we have to parse the signature from Ledger as it's in DER format
|
|
259
|
-
const parsedSignature = secp256k1_1.signatureImport(response.signature);
|
|
263
|
+
const parsedSignature = (0, secp256k1_1.signatureImport)(response.signature);
|
|
260
264
|
return parsedSignature;
|
|
261
265
|
});
|
|
262
266
|
}
|
|
@@ -318,10 +322,9 @@ function isWindows(platform) {
|
|
|
318
322
|
return platform.indexOf("Win") > -1;
|
|
319
323
|
}
|
|
320
324
|
function getBrowser(userAgent) {
|
|
321
|
-
var _a;
|
|
322
325
|
const ua = userAgent.toLowerCase();
|
|
323
326
|
const isChrome = /chrome|crios/.test(ua) && !/edge\//.test(ua);
|
|
324
|
-
const isBrave = isChrome && !(
|
|
327
|
+
const isBrave = isChrome && !(window === null || window === void 0 ? void 0 : window.google);
|
|
325
328
|
const isOpera = /opr/.test(ua);
|
|
326
329
|
if (!isChrome && !isBrave && !isOpera) {
|
|
327
330
|
throw new Error("Your browser doesn't support Ledger devices.");
|
|
@@ -6,7 +6,7 @@ import { CarbonSDK } from "../../index";
|
|
|
6
6
|
import { StdFee } from "@cosmjs/stargate";
|
|
7
7
|
import { AminoMsg } from "@cosmjs/amino";
|
|
8
8
|
import { SWTHAddressOptions } from "../../util/address";
|
|
9
|
-
export
|
|
9
|
+
export type EVMChain = EVMChainV2;
|
|
10
10
|
interface RequestArguments {
|
|
11
11
|
method: string;
|
|
12
12
|
params?: unknown[] | object;
|
|
@@ -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];
|
|
@@ -120,28 +124,28 @@ const CarbonEvmNativeCurrency = {
|
|
|
120
124
|
symbol: "SWTH",
|
|
121
125
|
};
|
|
122
126
|
const CARBON_EVM_LOCALHOST = {
|
|
123
|
-
chainId: `0x${Number(ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[constant_1.Network.LocalHost])).toString(16)}`,
|
|
127
|
+
chainId: `0x${Number((0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[constant_1.Network.LocalHost])).toString(16)}`,
|
|
124
128
|
blockExplorerUrls: ["https://evm-scan.carbon.network"],
|
|
125
129
|
chainName: "Carbon EVM Localhost",
|
|
126
130
|
rpcUrls: [`${constant_1.NetworkConfigs[constant_1.Network.LocalHost].evmJsonRpcUrl}`],
|
|
127
131
|
nativeCurrency: CarbonEvmNativeCurrency,
|
|
128
132
|
};
|
|
129
133
|
const CARBON_EVM_DEVNET = {
|
|
130
|
-
chainId: `0x${Number(ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[constant_1.Network.DevNet])).toString(16)}`,
|
|
134
|
+
chainId: `0x${Number((0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[constant_1.Network.DevNet])).toString(16)}`,
|
|
131
135
|
blockExplorerUrls: ["https://evm-scan.carbon.network"],
|
|
132
136
|
chainName: "Carbon EVM Devnet",
|
|
133
137
|
rpcUrls: [`${constant_1.NetworkConfigs[constant_1.Network.DevNet].evmJsonRpcUrl}`],
|
|
134
138
|
nativeCurrency: CarbonEvmNativeCurrency,
|
|
135
139
|
};
|
|
136
140
|
const CARBON_EVM_TESTNET = {
|
|
137
|
-
chainId: `0x${Number(ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[constant_1.Network.TestNet])).toString(16)}`,
|
|
141
|
+
chainId: `0x${Number((0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[constant_1.Network.TestNet])).toString(16)}`,
|
|
138
142
|
blockExplorerUrls: ["https://evm-scan.carbon.network"],
|
|
139
143
|
chainName: "Carbon EVM Testnet",
|
|
140
144
|
rpcUrls: [`${constant_1.NetworkConfigs[constant_1.Network.TestNet].evmJsonRpcUrl}`],
|
|
141
145
|
nativeCurrency: CarbonEvmNativeCurrency,
|
|
142
146
|
};
|
|
143
147
|
const CARBON_EVM_MAINNET = {
|
|
144
|
-
chainId: `0x${Number(ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[constant_1.Network.MainNet])).toString(16)}`,
|
|
148
|
+
chainId: `0x${Number((0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[constant_1.Network.MainNet])).toString(16)}`,
|
|
145
149
|
blockExplorerUrls: ["https://evm-scan.carbon.network"],
|
|
146
150
|
chainName: "Carbon EVM",
|
|
147
151
|
rpcUrls: [`${constant_1.NetworkConfigs[constant_1.Network.MainNet].evmJsonRpcUrl}`],
|
|
@@ -267,12 +271,6 @@ const OKC_TESTNET = {
|
|
|
267
271
|
* TODO: Add docs
|
|
268
272
|
*/
|
|
269
273
|
class MetaMask {
|
|
270
|
-
constructor(network, legacyEip712SignMode = false) {
|
|
271
|
-
this.network = network;
|
|
272
|
-
this.legacyEip712SignMode = legacyEip712SignMode;
|
|
273
|
-
this.blockchain = 'Ethereum';
|
|
274
|
-
this.connectedAccount = '';
|
|
275
|
-
}
|
|
276
274
|
static createMetamaskSigner(metamask, evmChainId, pubKeyBase64, addressOptions) {
|
|
277
275
|
const evmHexAddress = util_1.AddressUtils.ETHAddress.publicKeyToAddress(Buffer.from(pubKeyBase64, "base64"), addressOptions);
|
|
278
276
|
const signDirect = (_, doc) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -352,13 +350,13 @@ class MetaMask {
|
|
|
352
350
|
});
|
|
353
351
|
const sendEvmTransaction = (api, req) => __awaiter(this, void 0, void 0, function* () {
|
|
354
352
|
try {
|
|
355
|
-
const request = yield ethermint_1.populateEvmTransactionDetails(api, req);
|
|
353
|
+
const request = yield (0, ethermint_1.populateEvmTransactionDetails)(api, req);
|
|
356
354
|
const response = yield metamask.sendEvmTransaction(request);
|
|
357
355
|
return response;
|
|
358
356
|
}
|
|
359
357
|
catch (error) {
|
|
360
358
|
console.error(error);
|
|
361
|
-
throw (error_1.parseEvmError(error, index_1.ProviderAgent.MetamaskExtension));
|
|
359
|
+
throw ((0, error_1.parseEvmError)(error, index_1.ProviderAgent.MetamaskExtension));
|
|
362
360
|
}
|
|
363
361
|
});
|
|
364
362
|
return {
|
|
@@ -418,7 +416,7 @@ class MetaMask {
|
|
|
418
416
|
}
|
|
419
417
|
static getRequiredChainId(network, blockchain = 'Ethereum') {
|
|
420
418
|
if (blockchain === "Carbon") {
|
|
421
|
-
return Number(ethermint_1.parseChainId(constant_1.CarbonEvmChainIDs[network]));
|
|
419
|
+
return Number((0, ethermint_1.parseChainId)(constant_1.CarbonEvmChainIDs[network]));
|
|
422
420
|
}
|
|
423
421
|
if (network === constant_1.Network.MainNet) {
|
|
424
422
|
switch (blockchain) {
|
|
@@ -447,6 +445,12 @@ class MetaMask {
|
|
|
447
445
|
return 5;
|
|
448
446
|
}
|
|
449
447
|
}
|
|
448
|
+
constructor(network, legacyEip712SignMode = false) {
|
|
449
|
+
this.network = network;
|
|
450
|
+
this.legacyEip712SignMode = legacyEip712SignMode;
|
|
451
|
+
this.blockchain = 'Ethereum';
|
|
452
|
+
this.connectedAccount = '';
|
|
453
|
+
}
|
|
450
454
|
checkProvider(blockchain = this.blockchain) {
|
|
451
455
|
const config = constant_1.NetworkConfigs[this.network];
|
|
452
456
|
if (!config[blockchain_1.BLOCKCHAIN_V2_TO_V1_MAPPING[blockchain]]) {
|
|
@@ -470,7 +474,7 @@ class MetaMask {
|
|
|
470
474
|
const metamaskAPI = yield this.getAPI();
|
|
471
475
|
const chainIdHex = (yield (metamaskAPI === null || metamaskAPI === void 0 ? void 0 : metamaskAPI.request({ method: "eth_chainId" })));
|
|
472
476
|
const chainId = chainIdHex ? parseInt(chainIdHex, 16) : undefined;
|
|
473
|
-
const blockchain = blockchain_1.getBlockchainFromChainV2(chainId);
|
|
477
|
+
const blockchain = (0, blockchain_1.getBlockchainFromChainV2)(chainId);
|
|
474
478
|
this.blockchain = blockchain;
|
|
475
479
|
return { chainId, blockchain };
|
|
476
480
|
});
|
|
@@ -483,7 +487,7 @@ class MetaMask {
|
|
|
483
487
|
}
|
|
484
488
|
getAPI() {
|
|
485
489
|
return __awaiter(this, void 0, void 0, function* () {
|
|
486
|
-
return yield detect_provider_1.default();
|
|
490
|
+
return yield (0, detect_provider_1.default)();
|
|
487
491
|
});
|
|
488
492
|
}
|
|
489
493
|
getConnectedAPI() {
|
|
@@ -577,7 +581,7 @@ class MetaMask {
|
|
|
577
581
|
}
|
|
578
582
|
verifyNetwork(evmChainId) {
|
|
579
583
|
return __awaiter(this, void 0, void 0, function* () {
|
|
580
|
-
const network = network_1.carbonNetworkFromChainId(evmChainId);
|
|
584
|
+
const network = (0, network_1.carbonNetworkFromChainId)(evmChainId);
|
|
581
585
|
yield this.changeNetworkIfRequired("Carbon", network);
|
|
582
586
|
});
|
|
583
587
|
}
|
|
@@ -657,7 +661,7 @@ class MetaMask {
|
|
|
657
661
|
const ethAddress = ethers_1.ethers.utils.getAddress(address);
|
|
658
662
|
return (yield api.request({
|
|
659
663
|
method: "personal_sign",
|
|
660
|
-
params: [generic_1.appendHexPrefix(Buffer.from(message, "utf-8").toString("hex")), ethAddress],
|
|
664
|
+
params: [(0, generic_1.appendHexPrefix)(Buffer.from(message, "utf-8").toString("hex")), ethAddress],
|
|
661
665
|
}));
|
|
662
666
|
});
|
|
663
667
|
}
|
|
@@ -681,11 +685,11 @@ class MetaMask {
|
|
|
681
685
|
}
|
|
682
686
|
signEip712(evmHexAddress, accountNumber, evmChainId, msgs, fee, memo, sequence, feePayer = '') {
|
|
683
687
|
return __awaiter(this, void 0, void 0, function* () {
|
|
684
|
-
yield this.verifyNetworkAndConnectedAccount(evmHexAddress, ethermint_1.parseChainId(evmChainId));
|
|
688
|
+
yield this.verifyNetworkAndConnectedAccount(evmHexAddress, (0, ethermint_1.parseChainId)(evmChainId));
|
|
685
689
|
const metamaskAPI = yield this.getConnectedAPI();
|
|
686
|
-
const stdSignDoc = build_1.makeSignDoc(msgs, fee, evmChainId, memo, accountNumber, sequence);
|
|
687
|
-
const eip712Tx = this.legacyEip712SignMode ? legacyEIP712_1.legacyConstructEIP712Tx(Object.assign(Object.assign({}, stdSignDoc), { fee: Object.assign(Object.assign({}, fee), { feePayer }) })) : eip712_1.constructEIP712Tx(stdSignDoc);
|
|
688
|
-
return yield provider_1.signTransactionWrapper(() => __awaiter(this, void 0, void 0, function* () {
|
|
690
|
+
const stdSignDoc = (0, build_1.makeSignDoc)(msgs, fee, evmChainId, memo, accountNumber, sequence);
|
|
691
|
+
const eip712Tx = this.legacyEip712SignMode ? (0, legacyEIP712_1.legacyConstructEIP712Tx)(Object.assign(Object.assign({}, stdSignDoc), { fee: Object.assign(Object.assign({}, fee), { feePayer }) })) : (0, eip712_1.constructEIP712Tx)(stdSignDoc);
|
|
692
|
+
return yield (0, provider_1.signTransactionWrapper)(() => __awaiter(this, void 0, void 0, function* () {
|
|
689
693
|
const signature = (yield metamaskAPI.request({
|
|
690
694
|
method: 'eth_signTypedData_v4',
|
|
691
695
|
params: [
|
|
@@ -776,10 +780,10 @@ class MetaMask {
|
|
|
776
780
|
ephemPublicKey,
|
|
777
781
|
ciphertext,
|
|
778
782
|
};
|
|
779
|
-
const decryptedCipherText = (_a = (yield metamaskAPI.request({
|
|
783
|
+
const decryptedCipherText = (_a = ((yield metamaskAPI.request({
|
|
780
784
|
method: "eth_decrypt",
|
|
781
785
|
params: [JSON.stringify(cipher), defaultAccount],
|
|
782
|
-
}))) === null || _a === void 0 ? void 0 : _a.trim();
|
|
786
|
+
})))) === null || _a === void 0 ? void 0 : _a.trim();
|
|
783
787
|
// legacy encrypted mnemonic doesnt include warning message.
|
|
784
788
|
if (decryptedCipherText.match(MNEMONIC_MATCH_REGEX_LEGACY)) {
|
|
785
789
|
return decryptedCipherText;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProviderAgent } from "../../constant";
|
|
2
|
-
export declare const parseEvmError: (error: Error, providerAgent?: ProviderAgent
|
|
2
|
+
export declare const parseEvmError: (error: Error, providerAgent?: ProviderAgent) => Error;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CarbonSDK } from "../../index";
|
|
2
2
|
import { ExternalUtils } from "../../util";
|
|
3
3
|
import BigNumber from "bignumber.js";
|
|
4
|
-
export
|
|
4
|
+
export type AcceptedNets = "N3MainNet" | "MainNet";
|
|
5
5
|
export declare enum Events {
|
|
6
6
|
Ready,
|
|
7
7
|
AccountChanged,
|
|
@@ -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];
|
|
@@ -60,9 +64,9 @@ class O3Wallet {
|
|
|
60
64
|
return {
|
|
61
65
|
type: wallet_1.CarbonSignerTypes.BrowserInjected,
|
|
62
66
|
signAmino: (_, doc) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
const msg = JSON.stringify(generic_1.sortObject(doc));
|
|
67
|
+
const msg = JSON.stringify((0, generic_1.sortObject)(doc));
|
|
64
68
|
const signBytes = yield dapi.signMessage(msg);
|
|
65
|
-
const signature = amino_1.encodeSecp256k1Signature(pubKey, signBytes);
|
|
69
|
+
const signature = (0, amino_1.encodeSecp256k1Signature)(pubKey, signBytes);
|
|
66
70
|
return {
|
|
67
71
|
signed: doc,
|
|
68
72
|
signature,
|
|
@@ -83,7 +87,7 @@ class O3Wallet {
|
|
|
83
87
|
};
|
|
84
88
|
}
|
|
85
89
|
connectWallet() {
|
|
86
|
-
var _a, _b
|
|
90
|
+
var _a, _b;
|
|
87
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
92
|
try {
|
|
89
93
|
const publicKeyOutput = (yield this.getPublicKeyOutput());
|
|
@@ -93,7 +97,7 @@ class O3Wallet {
|
|
|
93
97
|
}
|
|
94
98
|
catch (err) {
|
|
95
99
|
const type = (_a = err.type) !== null && _a !== void 0 ? _a : "";
|
|
96
|
-
throw new Error((
|
|
100
|
+
throw new Error((_b = type !== null && type !== void 0 ? type : err === null || err === void 0 ? void 0 : err.message) !== null && _b !== void 0 ? _b : "");
|
|
97
101
|
}
|
|
98
102
|
});
|
|
99
103
|
}
|
|
@@ -106,7 +110,7 @@ class O3Wallet {
|
|
|
106
110
|
return this.address !== "";
|
|
107
111
|
}
|
|
108
112
|
lockDeposit(lockParams) {
|
|
109
|
-
var _a
|
|
113
|
+
var _a;
|
|
110
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
115
|
const { token, amount, feeAmount, toAddress, fromAddress } = lockParams;
|
|
112
116
|
try {
|
|
@@ -139,12 +143,12 @@ class O3Wallet {
|
|
|
139
143
|
}
|
|
140
144
|
catch (err) {
|
|
141
145
|
const type = err.type;
|
|
142
|
-
throw new Error((
|
|
146
|
+
throw new Error((_a = type !== null && type !== void 0 ? type : err === null || err === void 0 ? void 0 : err.message) !== null && _a !== void 0 ? _a : "");
|
|
143
147
|
}
|
|
144
148
|
});
|
|
145
149
|
}
|
|
146
150
|
assembleAndInvoke(operation, scriptHash, args, broadcastOverride = false, signers) {
|
|
147
|
-
var _a
|
|
151
|
+
var _a;
|
|
148
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
153
|
try {
|
|
150
154
|
const dApi = this.getDAPI();
|
|
@@ -155,12 +159,12 @@ class O3Wallet {
|
|
|
155
159
|
}
|
|
156
160
|
catch (err) {
|
|
157
161
|
const type = err.type;
|
|
158
|
-
throw new Error((
|
|
162
|
+
throw new Error((_a = type !== null && type !== void 0 ? type : err === null || err === void 0 ? void 0 : err.message) !== null && _a !== void 0 ? _a : "");
|
|
159
163
|
}
|
|
160
164
|
});
|
|
161
165
|
}
|
|
162
166
|
getWalletBalances(tokens) {
|
|
163
|
-
var _a
|
|
167
|
+
var _a;
|
|
164
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
169
|
try {
|
|
166
170
|
if (!this.isConnected()) {
|
|
@@ -198,7 +202,7 @@ class O3Wallet {
|
|
|
198
202
|
}
|
|
199
203
|
catch (err) {
|
|
200
204
|
const type = err.type;
|
|
201
|
-
throw new Error((
|
|
205
|
+
throw new Error((_a = type !== null && type !== void 0 ? type : err === null || err === void 0 ? void 0 : err.message) !== null && _a !== void 0 ? _a : "");
|
|
202
206
|
}
|
|
203
207
|
});
|
|
204
208
|
}
|
package/lib/provider/o3/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];
|
|
@@ -13,10 +13,6 @@ exports.Zilpay = void 0;
|
|
|
13
13
|
const util_1 = require("../../util");
|
|
14
14
|
const constant_1 = require("../../constant");
|
|
15
15
|
class Zilpay {
|
|
16
|
-
constructor(network) {
|
|
17
|
-
this.network = network;
|
|
18
|
-
this.blockchain = util_1.BlockchainUtils.Blockchain.Zilliqa;
|
|
19
|
-
}
|
|
20
16
|
static getNetworkParams(network) {
|
|
21
17
|
if (network === constant_1.Network.MainNet) {
|
|
22
18
|
// currently zilpay only used by zilliqa
|
|
@@ -49,6 +45,10 @@ class Zilpay {
|
|
|
49
45
|
// Testnet
|
|
50
46
|
return 333;
|
|
51
47
|
}
|
|
48
|
+
constructor(network) {
|
|
49
|
+
this.network = network;
|
|
50
|
+
this.blockchain = util_1.BlockchainUtils.Blockchain.Zilliqa;
|
|
51
|
+
}
|
|
52
52
|
getBlockchain() {
|
|
53
53
|
return this.blockchain;
|
|
54
54
|
}
|
|
@@ -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/address.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Bech32AddrType, Network } from "../constant";
|
|
|
7
7
|
* @param encoding BufferEncoding from Buffer
|
|
8
8
|
* @param force option to return an empty buffer regardless of input
|
|
9
9
|
*/
|
|
10
|
-
export declare const stringOrBufferToBuffer: (stringOrBuffer?: string | Buffer
|
|
10
|
+
export declare const stringOrBufferToBuffer: (stringOrBuffer?: string | Buffer, encoding?: BufferEncoding, force?: boolean) => Buffer | null;
|
|
11
11
|
export declare class BIP44Path {
|
|
12
12
|
purpose: number;
|
|
13
13
|
coinType: number;
|
|
@@ -53,7 +53,7 @@ export interface SWTHAddressOptions extends AddressOptions {
|
|
|
53
53
|
bech32Prefix?: string;
|
|
54
54
|
type?: Bech32AddrType;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
type SWTHAddressType = AddressBuilder<SWTHAddressOptions> & {
|
|
57
57
|
newMnemonic(): string;
|
|
58
58
|
getBech32Prefix(net?: Network, bech32Prefix?: string, type?: Bech32AddrType): string;
|
|
59
59
|
addrPrefix: {
|
|
@@ -65,14 +65,14 @@ declare type SWTHAddressType = AddressBuilder<SWTHAddressOptions> & {
|
|
|
65
65
|
getModuleAddress(moduleKey: string, network?: Network): string;
|
|
66
66
|
};
|
|
67
67
|
export declare const SWTHAddress: SWTHAddressType;
|
|
68
|
-
|
|
68
|
+
type NEOAddressType = AddressBuilder<AddressOptions> & {
|
|
69
69
|
isAddress(address: string): boolean;
|
|
70
70
|
encode(hash: string | Buffer, version?: string): string;
|
|
71
71
|
};
|
|
72
72
|
export declare const NEOAddress: NEOAddressType;
|
|
73
|
-
|
|
73
|
+
type N3AddressType = NEOAddressType & object;
|
|
74
74
|
export declare const N3Address: N3AddressType;
|
|
75
|
-
|
|
75
|
+
type ETHAddressType = AddressBuilder<AddressOptions> & {
|
|
76
76
|
encode(hash: string | Buffer, opts?: SWTHAddressOptions): string;
|
|
77
77
|
publicKeyToBech32Address(publicKey: string | Buffer, opts?: SWTHAddressOptions): string;
|
|
78
78
|
};
|