carbon-js-sdk 0.2.7-beta.1 → 0.2.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CarbonSDK.d.ts +103 -0
- package/lib/clients/BlockchainClient.d.ts +16 -0
- package/lib/clients/CarbonQueryClient.d.ts +80 -0
- package/lib/clients/ETHClient.d.ts +101 -0
- package/lib/clients/HydrogenClient.d.ts +21 -0
- package/lib/clients/InsightsQueryClient.d.ts +36 -0
- package/lib/clients/N3Client.d.ts +73 -0
- package/lib/clients/NEOClient.d.ts +57 -0
- package/lib/clients/TokenClient.d.ts +56 -0
- package/lib/clients/ZILClient.d.ts +106 -0
- package/lib/clients/index.d.ts +8 -0
- package/lib/codec/adl/genesis.d.ts +18 -0
- package/lib/codec/adl/query.d.ts +12 -0
- package/lib/codec/adl/tx.d.ts +12 -0
- package/lib/codec/bank/event.d.ts +31 -0
- package/lib/codec/bank/genesis.d.ts +18 -0
- package/lib/codec/bank/query.d.ts +11 -0
- package/lib/codec/bank/tx.d.ts +64 -0
- package/lib/codec/book/book.d.ts +44 -0
- package/lib/codec/book/event.d.ts +22 -0
- package/lib/codec/book/genesis.d.ts +25 -0
- package/lib/codec/book/query.d.ts +68 -0
- package/lib/codec/book/tx.d.ts +12 -0
- package/lib/codec/broker/amm.d.ts +21 -0
- package/lib/codec/broker/candlestick.d.ts +26 -0
- package/lib/codec/broker/event.d.ts +34 -0
- package/lib/codec/broker/genesis.d.ts +24 -0
- package/lib/codec/broker/incoming_liquidations.d.ts +18 -0
- package/lib/codec/broker/incoming_pool_swap.d.ts +23 -0
- package/lib/codec/broker/pagination.d.ts +19 -0
- package/lib/codec/broker/query.d.ts +110 -0
- package/lib/codec/broker/tx.d.ts +53 -0
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +21 -0
- package/lib/codec/btcx/denom_info.d.ts +24 -0
- package/lib/codec/btcx/export.d.ts +4 -0
- package/lib/codec/btcx/genesis.d.ts +18 -0
- package/lib/codec/btcx/query.d.ts +68 -0
- package/lib/codec/btcx/tx.d.ts +92 -0
- package/lib/codec/ccm/ccm.d.ts +19 -0
- package/lib/codec/ccm/export.d.ts +4 -0
- package/lib/codec/ccm/genesis.d.ts +83 -0
- package/lib/codec/ccm/query.d.ts +45 -0
- package/lib/codec/ccm/tx.d.ts +97 -0
- package/lib/codec/cdp/event.d.ts +34 -0
- package/lib/codec/cdp/genesis.d.ts +23 -0
- package/lib/codec/cdp/query.d.ts +139 -0
- package/lib/codec/cdp/tx.d.ts +135 -0
- package/lib/codec/cdp/vault.d.ts +44 -0
- package/lib/codec/coin/bridge.d.ts +24 -0
- package/lib/codec/coin/event.d.ts +62 -0
- package/lib/codec/coin/genesis.d.ts +40 -0
- package/lib/codec/coin/proposal.d.ts +21 -0
- package/lib/codec/coin/query.d.ts +228 -0
- package/lib/codec/coin/token.d.ts +94 -0
- package/lib/codec/coin/tx.d.ts +390 -0
- package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +55 -0
- package/lib/codec/cosmos/auth/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +24 -0
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +114 -0
- package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +40 -0
- package/lib/codec/cosmos/authz/v1beta1/event.d.ts +41 -0
- package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +35 -0
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +54 -0
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +126 -0
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +25 -0
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +138 -0
- package/lib/codec/cosmos/bank/v1beta1/export.d.ts +5 -0
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +48 -0
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +240 -0
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +71 -0
- package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +212 -0
- package/lib/codec/cosmos/base/kv/v1beta1/kv.d.ts +31 -0
- package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +84 -0
- package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +81 -0
- package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +414 -0
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +35 -0
- package/lib/codec/cosmos/base/store/v1beta1/commit_info.d.ts +53 -0
- package/lib/codec/cosmos/base/store/v1beta1/listening.d.ts +30 -0
- package/lib/codec/cosmos/base/store/v1beta1/snapshot.d.ts +45 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +231 -0
- package/lib/codec/cosmos/base/v1beta1/coin.d.ts +64 -0
- package/lib/codec/cosmos/capability/v1beta1/capability.d.ts +51 -0
- package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +40 -0
- package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +24 -0
- package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +44 -0
- package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +39 -0
- package/lib/codec/cosmos/crypto/multisig/keys.d.ts +25 -0
- package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +40 -0
- package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +36 -0
- package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +36 -0
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +206 -0
- package/lib/codec/cosmos/distribution/v1beta1/export.d.ts +4 -0
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +156 -0
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +353 -0
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +142 -0
- package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +25 -0
- package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +21 -0
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +82 -0
- package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +52 -0
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +96 -0
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +21 -0
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +80 -0
- package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +85 -0
- package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +20 -0
- package/lib/codec/cosmos/gov/v1beta1/export.d.ts +3 -0
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +33 -0
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +216 -0
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +263 -0
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +141 -0
- package/lib/codec/cosmos/mint/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +23 -0
- package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +44 -0
- package/lib/codec/cosmos/mint/v1beta1/query.d.ts +103 -0
- package/lib/codec/cosmos/params/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/params/v1beta1/params.d.ts +37 -0
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +51 -0
- package/lib/codec/cosmos/slashing/v1beta1/export.d.ts +4 -0
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +76 -0
- package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +110 -0
- package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +58 -0
- package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +46 -0
- package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +66 -0
- package/lib/codec/cosmos/staking/v1beta1/export.d.ts +5 -0
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +54 -0
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +494 -0
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +382 -0
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +183 -0
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +115 -0
- package/lib/codec/cosmos/tx/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +208 -0
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +275 -0
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +177 -0
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +104 -0
- package/lib/codec/cosmos/vesting/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +53 -0
- package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +103 -0
- package/lib/codec/cosmos-models.d.ts +10 -0
- package/lib/codec/crisis/genesis.d.ts +18 -0
- package/lib/codec/crisis/query.d.ts +43 -0
- package/lib/codec/crisis/tx.d.ts +12 -0
- package/lib/codec/fee/event.d.ts +20 -0
- package/lib/codec/fee/fee.d.ts +42 -0
- package/lib/codec/fee/genesis.d.ts +23 -0
- package/lib/codec/fee/proposal.d.ts +57 -0
- package/lib/codec/fee/query.d.ts +114 -0
- package/lib/codec/fee/tx.d.ts +108 -0
- package/lib/codec/google/protobuf/any.d.ts +130 -0
- package/lib/codec/google/protobuf/duration.d.ts +92 -0
- package/lib/codec/google/protobuf/timestamp.d.ts +123 -0
- package/lib/codec/google/protobuf/wrappers.d.ts +152 -0
- package/lib/codec/headersync/consensus_peers.d.ts +44 -0
- package/lib/codec/headersync/export.d.ts +4 -0
- package/lib/codec/headersync/genesis.d.ts +79 -0
- package/lib/codec/headersync/query.d.ts +64 -0
- package/lib/codec/headersync/tx.d.ts +64 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.d.ts +2 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +23 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +44 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/export.d.ts +2 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +25 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +44 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +21 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.d.ts +4 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.d.ts +76 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.d.ts +36 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/packet.d.ts +46 -0
- package/lib/codec/ibc/applications/transfer/v1/export.d.ts +3 -0
- package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +22 -0
- package/lib/codec/ibc/applications/transfer/v1/query.d.ts +146 -0
- package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +53 -0
- package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +67 -0
- package/lib/codec/ibc/applications/transfer/v2/export.d.ts +1 -0
- package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +30 -0
- package/lib/codec/ibc/core/channel/v1/channel.d.ts +193 -0
- package/lib/codec/ibc/core/channel/v1/export.d.ts +4 -0
- package/lib/codec/ibc/core/channel/v1/genesis.d.ts +44 -0
- package/lib/codec/ibc/core/channel/v1/query.d.ts +562 -0
- package/lib/codec/ibc/core/channel/v1/tx.d.ts +350 -0
- package/lib/codec/ibc/core/client/v1/client.d.ts +149 -0
- package/lib/codec/ibc/core/client/v1/export.d.ts +4 -0
- package/lib/codec/ibc/core/client/v1/genesis.d.ts +62 -0
- package/lib/codec/ibc/core/client/v1/query.d.ts +309 -0
- package/lib/codec/ibc/core/client/v1/tx.d.ts +159 -0
- package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +70 -0
- package/lib/codec/ibc/core/commitment/v1/export.d.ts +1 -0
- package/lib/codec/ibc/core/connection/v1/connection.d.ts +170 -0
- package/lib/codec/ibc/core/connection/v1/export.d.ts +3 -0
- package/lib/codec/ibc/core/connection/v1/genesis.d.ts +24 -0
- package/lib/codec/ibc/core/connection/v1/query.d.ts +220 -0
- package/lib/codec/ibc/core/connection/v1/tx.d.ts +182 -0
- package/lib/codec/ibc/core/types/v1/genesis.d.ts +27 -0
- package/lib/codec/ibc/lightclients/localhost/v1/export.d.ts +1 -0
- package/lib/codec/ibc/lightclients/localhost/v1/localhost.d.ts +26 -0
- package/lib/codec/ibc/lightclients/solomachine/v1/export.d.ts +1 -0
- package/lib/codec/ibc/lightclients/solomachine/v1/solomachine.d.ts +298 -0
- package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.d.ts +298 -0
- package/lib/codec/ibc/lightclients/tendermint/v1/export.d.ts +1 -0
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +140 -0
- package/lib/codec/ibc-models.d.ts +12 -0
- package/lib/codec/index.d.ts +348 -0
- package/lib/codec/inflation/genesis.d.ts +25 -0
- package/lib/codec/inflation/inflation.d.ts +21 -0
- package/lib/codec/inflation/query.d.ts +41 -0
- package/lib/codec/inflation/tx.d.ts +12 -0
- package/lib/codec/insurance/event.d.ts +24 -0
- package/lib/codec/insurance/fund.d.ts +29 -0
- package/lib/codec/insurance/genesis.d.ts +25 -0
- package/lib/codec/insurance/query.d.ts +41 -0
- package/lib/codec/insurance/tx.d.ts +12 -0
- package/lib/codec/leverage/event.d.ts +21 -0
- package/lib/codec/leverage/genesis.d.ts +24 -0
- package/lib/codec/leverage/leverage.d.ts +30 -0
- package/lib/codec/leverage/query.d.ts +70 -0
- package/lib/codec/leverage/tx.d.ts +43 -0
- package/lib/codec/liquidation/genesis.d.ts +37 -0
- package/lib/codec/liquidation/liquidation.d.ts +17 -0
- package/lib/codec/liquidation/outstanding_position.d.ts +33 -0
- package/lib/codec/liquidation/query.d.ts +76 -0
- package/lib/codec/liquidation/quote_changes.d.ts +22 -0
- package/lib/codec/liquidation/tx.d.ts +12 -0
- package/lib/codec/liquiditypool/event.d.ts +69 -0
- package/lib/codec/liquiditypool/genesis.d.ts +32 -0
- package/lib/codec/liquiditypool/liquiditypool.d.ts +98 -0
- package/lib/codec/liquiditypool/proposal.d.ts +81 -0
- package/lib/codec/liquiditypool/query.d.ts +321 -0
- package/lib/codec/liquiditypool/reward.d.ts +196 -0
- package/lib/codec/liquiditypool/tx.d.ts +396 -0
- package/lib/codec/lockproxy/event.d.ts +46 -0
- package/lib/codec/lockproxy/export.d.ts +5 -0
- package/lib/codec/lockproxy/genesis.d.ts +68 -0
- package/lib/codec/lockproxy/lockproxy.d.ts +22 -0
- package/lib/codec/lockproxy/query.d.ts +67 -0
- package/lib/codec/lockproxy/tx.d.ts +147 -0
- package/lib/codec/market/event.d.ts +20 -0
- package/lib/codec/market/genesis.d.ts +27 -0
- package/lib/codec/market/legacy.d.ts +62 -0
- package/lib/codec/market/market.d.ts +117 -0
- package/lib/codec/market/proposal.d.ts +46 -0
- package/lib/codec/market/query.d.ts +93 -0
- package/lib/codec/market/tx.d.ts +96 -0
- package/lib/codec/marketstats/genesis.d.ts +21 -0
- package/lib/codec/marketstats/marketstats.d.ts +31 -0
- package/lib/codec/marketstats/params.d.ts +18 -0
- package/lib/codec/marketstats/query.d.ts +66 -0
- package/lib/codec/marketstats/tx.d.ts +12 -0
- package/lib/codec/misc/block.d.ts +21 -0
- package/lib/codec/misc/message.d.ts +22 -0
- package/lib/codec/misc/message_type.d.ts +18 -0
- package/lib/codec/misc/query.d.ts +178 -0
- package/lib/codec/misc/trade.d.ts +27 -0
- package/lib/codec/misc/transaction.d.ts +45 -0
- package/lib/codec/oracle/event.d.ts +68 -0
- package/lib/codec/oracle/genesis.d.ts +25 -0
- package/lib/codec/oracle/oracle.d.ts +83 -0
- package/lib/codec/oracle/proposal.d.ts +21 -0
- package/lib/codec/oracle/query.d.ts +264 -0
- package/lib/codec/oracle/slashing.d.ts +33 -0
- package/lib/codec/oracle/tx.d.ts +169 -0
- package/lib/codec/order/event.d.ts +23 -0
- package/lib/codec/order/genesis.d.ts +62 -0
- package/lib/codec/order/order.d.ts +112 -0
- package/lib/codec/order/query.d.ts +143 -0
- package/lib/codec/order/tx.d.ts +146 -0
- package/lib/codec/polynetwork-models.d.ts +4 -0
- package/lib/codec/position/event.d.ts +26 -0
- package/lib/codec/position/genesis.d.ts +24 -0
- package/lib/codec/position/position.d.ts +72 -0
- package/lib/codec/position/query.d.ts +93 -0
- package/lib/codec/position/tx.d.ts +42 -0
- package/lib/codec/pricing/event.d.ts +19 -0
- package/lib/codec/pricing/genesis.d.ts +25 -0
- package/lib/codec/pricing/pricing.d.ts +45 -0
- package/lib/codec/pricing/proposal.d.ts +31 -0
- package/lib/codec/pricing/query.d.ts +116 -0
- package/lib/codec/pricing/tx.d.ts +12 -0
- package/lib/codec/profile/event.d.ts +20 -0
- package/lib/codec/profile/genesis.d.ts +24 -0
- package/lib/codec/profile/profile.d.ts +20 -0
- package/lib/codec/profile/query.d.ts +69 -0
- package/lib/codec/profile/tx.d.ts +43 -0
- package/lib/codec/proofs.d.ts +315 -0
- package/lib/codec/query/pagination.d.ts +29 -0
- package/lib/codec/subaccount/genesis.d.ts +24 -0
- package/lib/codec/subaccount/query.d.ts +115 -0
- package/lib/codec/subaccount/subaccount.d.ts +31 -0
- package/lib/codec/subaccount/tx.d.ts +86 -0
- package/lib/codec/tendermint/abci/types.d.ts +698 -0
- package/lib/codec/tendermint/crypto/keys.d.ts +20 -0
- package/lib/codec/tendermint/crypto/proof.d.ts +74 -0
- package/lib/codec/tendermint/libs/bits/types.d.ts +19 -0
- package/lib/codec/tendermint/p2p/types.d.ts +60 -0
- package/lib/codec/tendermint/types/block.d.ts +23 -0
- package/lib/codec/tendermint/types/evidence.d.ts +61 -0
- package/lib/codec/tendermint/types/params.d.ts +125 -0
- package/lib/codec/tendermint/types/types.d.ts +234 -0
- package/lib/codec/tendermint/types/validator.d.ts +45 -0
- package/lib/codec/tendermint/version/types.d.ts +40 -0
- package/lib/constant/address.d.ts +2 -0
- package/lib/constant/generic.d.ts +7 -0
- package/lib/constant/ibc.d.ts +71 -0
- package/lib/constant/index.d.ts +7 -0
- package/lib/constant/network.d.ts +54 -0
- package/lib/constant/node.d.ts +5 -0
- package/lib/constant/token.d.ts +4 -0
- package/lib/constant/walletProvider.d.ts +6 -0
- package/lib/eth/abis/index.d.ts +7 -0
- package/lib/eth/index.d.ts +1 -0
- package/lib/hydrogen/feeQuote.d.ts +23 -0
- package/lib/hydrogen/index.d.ts +3 -0
- package/lib/hydrogen/relays.d.ts +32 -0
- package/lib/hydrogen/stats.d.ts +26 -0
- package/lib/hydrogen/transfer.d.ts +149 -0
- package/lib/index.d.ts +12 -0
- package/lib/insights/balance.d.ts +74 -0
- package/lib/insights/block.d.ts +25 -0
- package/lib/insights/chain.d.ts +40 -0
- package/lib/insights/common.d.ts +56 -0
- package/lib/insights/competition.d.ts +18 -0
- package/lib/insights/funding.d.ts +15 -0
- package/lib/insights/index.d.ts +10 -0
- package/lib/insights/market.d.ts +20 -0
- package/lib/insights/node.d.ts +32 -0
- package/lib/insights/pool.d.ts +94 -0
- package/lib/insights/position.d.ts +85 -0
- package/lib/insights/transaction.d.ts +30 -0
- package/lib/insights/user.d.ts +56 -0
- package/lib/modules/admin.d.ts +255 -0
- package/lib/modules/bank.d.ts +14 -0
- package/lib/modules/base.d.ts +12 -0
- package/lib/modules/broker.d.ts +16 -0
- package/lib/modules/cdp.d.ts +27 -0
- package/lib/modules/coin.d.ts +22 -0
- package/lib/modules/fee.d.ts +5 -0
- package/lib/modules/gov.d.ts +42 -0
- package/lib/modules/ibc.d.ts +19 -0
- package/lib/modules/index.d.ts +17 -0
- package/lib/modules/leverage.d.ts +13 -0
- package/lib/modules/liquiditypool.d.ts +73 -0
- package/lib/modules/market.d.ts +50 -0
- package/lib/modules/oracle.d.ts +12 -0
- package/lib/modules/order.d.ts +60 -0
- package/lib/modules/position.d.ts +13 -0
- package/lib/modules/profile.d.ts +11 -0
- package/lib/modules/staking.d.ts +36 -0
- package/lib/modules/subaccount.d.ts +18 -0
- package/lib/modules/xchain.d.ts +23 -0
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.d.ts +29 -0
- package/lib/provider/account/EthLedgerAccount/EthLedgerSigner.d.ts +13 -0
- package/lib/provider/account/EthLedgerAccount/index.d.ts +2 -0
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/BIP44.d.ts +5 -0
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.d.ts +40 -0
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.d.ts +3 -0
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.d.ts +42 -0
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.d.ts +24 -0
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.d.ts +59 -0
- package/lib/provider/account/NeoLedgerAccount/index.d.ts +1 -0
- package/lib/provider/account/index.d.ts +2 -0
- package/lib/provider/amino/AminoTypesMap.d.ts +3 -0
- package/lib/provider/amino/index.d.ts +1 -0
- package/lib/provider/amino/types/admin.d.ts +4 -0
- package/lib/provider/amino/types/bank.d.ts +4 -0
- package/lib/provider/amino/types/broker.d.ts +4 -0
- package/lib/provider/amino/types/cdp.d.ts +4 -0
- package/lib/provider/amino/types/coin.d.ts +4 -0
- package/lib/provider/amino/types/gov.d.ts +4 -0
- package/lib/provider/amino/types/ibc.d.ts +4 -0
- package/lib/provider/amino/types/index.d.ts +16 -0
- package/lib/provider/amino/types/leverage.d.ts +4 -0
- package/lib/provider/amino/types/liquidityPool.d.ts +4 -0
- package/lib/provider/amino/types/market.d.ts +4 -0
- package/lib/provider/amino/types/oracle.d.ts +4 -0
- package/lib/provider/amino/types/order.d.ts +4 -0
- package/lib/provider/amino/types/position.d.ts +4 -0
- package/lib/provider/amino/types/profile.d.ts +4 -0
- package/lib/provider/amino/types/staking.d.ts +4 -0
- package/lib/provider/amino/types/subaccount.d.ts +4 -0
- package/lib/provider/amino/utils.d.ts +42 -0
- package/lib/provider/index.d.ts +8 -0
- package/lib/provider/keplr/KeplrAccount.d.ts +28 -0
- package/lib/provider/keplr/KeplrStore.d.ts +9 -0
- package/lib/provider/keplr/index.d.ts +4 -0
- package/lib/provider/ledger/index.d.ts +1 -0
- package/lib/provider/ledger/ledger.d.ts +24 -0
- package/lib/provider/metamask/MetaMask.d.ts +58 -0
- package/lib/provider/metamask/index.d.ts +1 -0
- package/lib/provider/o3/O3Types.d.ts +84 -0
- package/lib/provider/o3/O3Wallet.d.ts +28 -0
- package/lib/provider/o3/index.d.ts +2 -0
- package/lib/provider/sdk/SDKProvider.d.ts +11 -0
- package/lib/provider/sdk/index.d.ts +1 -0
- package/lib/provider/zilpay/Zilpay.d.ts +33 -0
- package/lib/provider/zilpay/index.d.ts +1 -0
- package/lib/util/address.d.ts +75 -0
- package/lib/util/api.d.ts +117 -0
- package/lib/util/blockchain.d.ts +43 -0
- package/lib/util/external.d.ts +11 -0
- package/lib/util/fetch.d.ts +1 -0
- package/lib/util/generic.d.ts +37 -0
- package/lib/util/gov.d.ts +31 -0
- package/lib/util/ibc.d.ts +15 -0
- package/lib/util/index.d.ts +14 -0
- package/lib/util/ledger.d.ts +3 -0
- package/lib/util/network.d.ts +8 -0
- package/lib/util/number.d.ts +8 -0
- package/lib/util/token.d.ts +2 -0
- package/lib/util/transferfees.d.ts +18 -0
- package/lib/util/tx.d.ts +303 -0
- package/lib/util/type.d.ts +22 -0
- package/lib/wallet/CarbonSigner.d.ts +42 -0
- package/lib/wallet/CarbonSigningClient.d.ts +40 -0
- package/lib/wallet/CarbonWallet.d.ts +150 -0
- package/lib/wallet/index.d.ts +2 -0
- package/lib/websocket/channel.d.ts +3 -0
- package/lib/websocket/connector.d.ts +233 -0
- package/lib/websocket/index.d.ts +1 -0
- package/lib/websocket/models.d.ts +146 -0
- package/lib/websocket/types.d.ts +140 -0
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Network, Network as _Network, NetworkConfig } from "./constant";
|
|
3
|
+
import { OfflineDirectSigner, OfflineSigner } from "@cosmjs/proto-signing";
|
|
4
|
+
import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
|
|
5
|
+
import { CarbonQueryClient, ETHClient, HydrogenClient, InsightsQueryClient, NEOClient, TokenClient, ZILClient } from "./clients";
|
|
6
|
+
import N3Client from "./clients/N3Client";
|
|
7
|
+
import { AdminModule, BankModule, BrokerModule, CDPModule, CoinModule, FeeModule, GovModule, IBCModule, LeverageModule, LiquidityPoolModule, MarketModule, OracleModule, OrderModule, PositionModule, ProfileModule, SubAccountModule, XChainModule } from "./modules";
|
|
8
|
+
import { StakingModule } from "./modules/staking";
|
|
9
|
+
import { CosmosLedger, Keplr } from "./provider";
|
|
10
|
+
import { CarbonSigner, CarbonWallet, CarbonWalletGenericOpts } from "./wallet";
|
|
11
|
+
export { CarbonTx } from "./util";
|
|
12
|
+
export { CarbonSigner, CarbonSignerTypes, CarbonWallet, CarbonWalletGenericOpts, CarbonWalletInitOpts } from "./wallet";
|
|
13
|
+
export interface CarbonSDKOpts {
|
|
14
|
+
network: Network;
|
|
15
|
+
tmClient: Tendermint34Client;
|
|
16
|
+
token?: TokenClient;
|
|
17
|
+
config?: Partial<NetworkConfig>;
|
|
18
|
+
defaultTimeoutBlocks?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface CarbonSDKInitOpts {
|
|
21
|
+
network: Network;
|
|
22
|
+
tmClient?: Tendermint34Client;
|
|
23
|
+
config?: Partial<NetworkConfig>;
|
|
24
|
+
wallet?: CarbonWallet;
|
|
25
|
+
skipInit?: boolean;
|
|
26
|
+
defaultTimeoutBlocks?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Carbon SDK
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
declare class CarbonSDK {
|
|
34
|
+
static DEFAULT_NETWORK: Network;
|
|
35
|
+
static TokenClient: typeof TokenClient;
|
|
36
|
+
readonly query: CarbonQueryClient;
|
|
37
|
+
insights: InsightsQueryClient;
|
|
38
|
+
hydrogen: HydrogenClient;
|
|
39
|
+
wallet?: CarbonWallet;
|
|
40
|
+
network: Network;
|
|
41
|
+
configOverride: Partial<NetworkConfig>;
|
|
42
|
+
networkConfig: NetworkConfig;
|
|
43
|
+
tmClient: Tendermint34Client;
|
|
44
|
+
token: TokenClient;
|
|
45
|
+
admin: AdminModule;
|
|
46
|
+
order: OrderModule;
|
|
47
|
+
lp: LiquidityPoolModule;
|
|
48
|
+
subaccount: SubAccountModule;
|
|
49
|
+
profile: ProfileModule;
|
|
50
|
+
cdp: CDPModule;
|
|
51
|
+
leverage: LeverageModule;
|
|
52
|
+
market: MarketModule;
|
|
53
|
+
broker: BrokerModule;
|
|
54
|
+
position: PositionModule;
|
|
55
|
+
coin: CoinModule;
|
|
56
|
+
oracle: OracleModule;
|
|
57
|
+
gov: GovModule;
|
|
58
|
+
staking: StakingModule;
|
|
59
|
+
bank: BankModule;
|
|
60
|
+
fee: FeeModule;
|
|
61
|
+
ibc: IBCModule;
|
|
62
|
+
xchain: XChainModule;
|
|
63
|
+
neo: NEOClient;
|
|
64
|
+
eth: ETHClient;
|
|
65
|
+
bsc: ETHClient;
|
|
66
|
+
zil: ZILClient;
|
|
67
|
+
n3: N3Client;
|
|
68
|
+
constructor(opts: CarbonSDKOpts);
|
|
69
|
+
static instance(opts?: CarbonSDKInitOpts): Promise<CarbonSDK>;
|
|
70
|
+
static instanceWithWallet(wallet: CarbonWallet, sdkOpts?: CarbonSDKInitOpts): Promise<ConnectedCarbonSDK>;
|
|
71
|
+
static instanceWithPrivateKey(privateKey: string | Buffer, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
72
|
+
static instanceWithMnemonic(mnemonic: string, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
73
|
+
static instanceWithSigner(signer: CarbonSigner, publicKeyBase64: string, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts, customSigner?: OfflineSigner & OfflineDirectSigner): Promise<ConnectedCarbonSDK>;
|
|
74
|
+
static instanceWithLedger(ledger: CosmosLedger, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
75
|
+
static instanceWithKeplr(keplr: Keplr, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
76
|
+
static instanceViewOnly(bech32Address: string, sdkOpts?: CarbonSDKInitOpts, walletOpts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
77
|
+
initialize(): Promise<CarbonSDK>;
|
|
78
|
+
clone(): CarbonSDK;
|
|
79
|
+
generateOpts(): CarbonSDKOpts;
|
|
80
|
+
connect(wallet: CarbonWallet): Promise<ConnectedCarbonSDK>;
|
|
81
|
+
disconnect(): CarbonSDK;
|
|
82
|
+
connectWithPrivateKey(privateKey: string | Buffer, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
83
|
+
connectWithMnemonic(mnemonic: string, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
84
|
+
connectWithSigner(signer: CarbonSigner, publicKeyBase64: string, opts?: CarbonWalletGenericOpts, customSigner?: OfflineSigner & OfflineDirectSigner): Promise<ConnectedCarbonSDK>;
|
|
85
|
+
connectWithLedger(ledger: CosmosLedger, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
86
|
+
connectWithKeplr(keplr: Keplr, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
87
|
+
connectViewOnly(bech32Address: string, opts?: CarbonWalletGenericOpts): Promise<ConnectedCarbonSDK>;
|
|
88
|
+
getConfig(): NetworkConfig;
|
|
89
|
+
getTokenClient(): TokenClient;
|
|
90
|
+
getConnectedWallet(): CarbonWallet;
|
|
91
|
+
log(...args: any[]): void;
|
|
92
|
+
private checkWallet;
|
|
93
|
+
static parseNetwork: (network: string, defaultNetwork?: Network | null) => Network | null;
|
|
94
|
+
}
|
|
95
|
+
export declare class ConnectedCarbonSDK extends CarbonSDK {
|
|
96
|
+
wallet: CarbonWallet;
|
|
97
|
+
constructor(wallet: CarbonWallet, opts: CarbonSDKOpts);
|
|
98
|
+
clone(): ConnectedCarbonSDK;
|
|
99
|
+
}
|
|
100
|
+
declare namespace CarbonSDK {
|
|
101
|
+
export import Network = _Network;
|
|
102
|
+
}
|
|
103
|
+
export default CarbonSDK;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StargateClient } from "@cosmjs/stargate";
|
|
2
|
+
import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
|
|
3
|
+
/**
|
|
4
|
+
* BlockchainClient is functionally the same with StargateClient,
|
|
5
|
+
* with an additional static initializer:
|
|
6
|
+
*
|
|
7
|
+
* ```
|
|
8
|
+
* BlockchainClient.connectWithTm(tmClient: Tendermint34Client)
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @see StargateClient
|
|
12
|
+
*/
|
|
13
|
+
declare class BlockchainClient extends StargateClient {
|
|
14
|
+
static connectWithTm(tmClient: Tendermint34Client): BlockchainClient;
|
|
15
|
+
}
|
|
16
|
+
export default BlockchainClient;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { QueryClientImpl as ADLQueryClient } from "../codec/adl/query";
|
|
2
|
+
import { QueryClientImpl as BookQueryClient } from "../codec/book/query";
|
|
3
|
+
import { QueryClientImpl as BrokerQueryClient } from "../codec/broker/query";
|
|
4
|
+
import { QueryClientImpl as CDPQueryClient } from "../codec/cdp/query";
|
|
5
|
+
import { QueryClientImpl as CoinQueryClient } from "../codec/coin/query";
|
|
6
|
+
import { QueryClientImpl as AuthQueryClient } from "../codec/cosmos/auth/v1beta1/query";
|
|
7
|
+
import { QueryClientImpl as BankQueryClient } from "../codec/cosmos/bank/v1beta1/query";
|
|
8
|
+
import { QueryClientImpl as DistributionQueryClient } from "../codec/cosmos/distribution/v1beta1/query";
|
|
9
|
+
import { QueryClientImpl as EvidenceQueryClient } from "../codec/cosmos/evidence/v1beta1/query";
|
|
10
|
+
import { QueryClientImpl as GovQueryClient } from "../codec/cosmos/gov/v1beta1/query";
|
|
11
|
+
import { QueryClientImpl as MintQueryClient } from "../codec/cosmos/mint/v1beta1/query";
|
|
12
|
+
import { QueryClientImpl as ParamsQueryClient } from "../codec/cosmos/params/v1beta1/query";
|
|
13
|
+
import { QueryClientImpl as SlashingQueryClient } from "../codec/cosmos/slashing/v1beta1/query";
|
|
14
|
+
import { QueryClientImpl as StakingQueryClient } from "../codec/cosmos/staking/v1beta1/query";
|
|
15
|
+
import { QueryClientImpl as UpgradeQueryClient } from "../codec/cosmos/upgrade/v1beta1/query";
|
|
16
|
+
import { QueryClientImpl as IBCInterchainControlQueryClient } from "../codec/ibc/applications/interchain_accounts/controller/v1/query";
|
|
17
|
+
import { QueryClientImpl as IBCInterchainHostQueryClient } from "../codec/ibc/applications/interchain_accounts/host/v1/query";
|
|
18
|
+
import { QueryClientImpl as IBCTransferQueryClient } from "../codec/ibc/applications/transfer/v1/query";
|
|
19
|
+
import { QueryClientImpl as FeeQueryClient } from "../codec/fee/query";
|
|
20
|
+
import { QueryClientImpl as InflationQueryClient } from "../codec/inflation/query";
|
|
21
|
+
import { QueryClientImpl as InsuranceQueryClient } from "../codec/insurance/query";
|
|
22
|
+
import { QueryClientImpl as LeverageQueryClient } from "../codec/leverage/query";
|
|
23
|
+
import { QueryClientImpl as LiquidationQueryClient } from "../codec/liquidation/query";
|
|
24
|
+
import { QueryClientImpl as LiquidityPoolQueryClient } from "../codec/liquiditypool/query";
|
|
25
|
+
import { QueryClientImpl as MarketQueryClient } from "../codec/market/query";
|
|
26
|
+
import { QueryClientImpl as MarketStatsQueryClient } from "../codec/marketstats/query";
|
|
27
|
+
import { QueryClientImpl as MiscQueryClient } from "../codec/misc/query";
|
|
28
|
+
import { QueryClientImpl as OracleQueryClient } from "../codec/oracle/query";
|
|
29
|
+
import { QueryClientImpl as OrderQueryClient } from "../codec/order/query";
|
|
30
|
+
import { QueryClientImpl as PositionQueryClient } from "../codec/position/query";
|
|
31
|
+
import { QueryClientImpl as PricingQueryClient } from "../codec/pricing/query";
|
|
32
|
+
import { QueryClientImpl as ProfileQueryClient } from "../codec/profile/query";
|
|
33
|
+
import { QueryClientImpl as SubaccountQueryClient } from "../codec/subaccount/query";
|
|
34
|
+
import { QueryClientImpl as HeadersyncQueryClient } from "../codec/headersync/query";
|
|
35
|
+
import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
|
|
36
|
+
import BlockchainClient from "./BlockchainClient";
|
|
37
|
+
export interface IBCClientGroup {
|
|
38
|
+
controller: IBCInterchainControlQueryClient;
|
|
39
|
+
host: IBCInterchainHostQueryClient;
|
|
40
|
+
transfer: IBCTransferQueryClient;
|
|
41
|
+
}
|
|
42
|
+
declare class CarbonQueryClient {
|
|
43
|
+
private readonly tmClient;
|
|
44
|
+
adl: ADLQueryClient;
|
|
45
|
+
book: BookQueryClient;
|
|
46
|
+
broker: BrokerQueryClient;
|
|
47
|
+
coin: CoinQueryClient;
|
|
48
|
+
cdp: CDPQueryClient;
|
|
49
|
+
fee: FeeQueryClient;
|
|
50
|
+
inflation: InflationQueryClient;
|
|
51
|
+
insurance: InsuranceQueryClient;
|
|
52
|
+
leverage: LeverageQueryClient;
|
|
53
|
+
liquidation: LiquidationQueryClient;
|
|
54
|
+
liquiditypool: LiquidityPoolQueryClient;
|
|
55
|
+
market: MarketQueryClient;
|
|
56
|
+
marketstats: MarketStatsQueryClient;
|
|
57
|
+
misc: MiscQueryClient;
|
|
58
|
+
oracle: OracleQueryClient;
|
|
59
|
+
order: OrderQueryClient;
|
|
60
|
+
position: PositionQueryClient;
|
|
61
|
+
pricing: PricingQueryClient;
|
|
62
|
+
profile: ProfileQueryClient;
|
|
63
|
+
subaccount: SubaccountQueryClient;
|
|
64
|
+
headersync: HeadersyncQueryClient;
|
|
65
|
+
auth: AuthQueryClient;
|
|
66
|
+
bank: BankQueryClient;
|
|
67
|
+
distribution: DistributionQueryClient;
|
|
68
|
+
evidence: EvidenceQueryClient;
|
|
69
|
+
gov: GovQueryClient;
|
|
70
|
+
mint: MintQueryClient;
|
|
71
|
+
params: ParamsQueryClient;
|
|
72
|
+
slashing: SlashingQueryClient;
|
|
73
|
+
staking: StakingQueryClient;
|
|
74
|
+
upgrade: UpgradeQueryClient;
|
|
75
|
+
chain: BlockchainClient;
|
|
76
|
+
ibc: IBCClientGroup;
|
|
77
|
+
private baseClient;
|
|
78
|
+
constructor(tmClient: Tendermint34Client);
|
|
79
|
+
}
|
|
80
|
+
export default CarbonQueryClient;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import CarbonSDK from "../CarbonSDK";
|
|
2
|
+
import { EthNetworkConfig, NetworkConfig, NetworkConfigProvider } from "../constant";
|
|
3
|
+
import { Models } from "../index";
|
|
4
|
+
import { Blockchain } from "../util/blockchain";
|
|
5
|
+
import { TokenInitInfo, TokensWithExternalBalance } from "../util/external";
|
|
6
|
+
import BigNumber from "bignumber.js";
|
|
7
|
+
import { ethers } from "ethers";
|
|
8
|
+
import TokenClient from "./TokenClient";
|
|
9
|
+
export interface ETHClientOpts {
|
|
10
|
+
configProvider: NetworkConfigProvider;
|
|
11
|
+
tokenClient: TokenClient;
|
|
12
|
+
blockchain: Blockchain;
|
|
13
|
+
}
|
|
14
|
+
interface ETHTxParams {
|
|
15
|
+
gasPriceGwei: BigNumber;
|
|
16
|
+
gasLimit: BigNumber;
|
|
17
|
+
ethAddress: string;
|
|
18
|
+
signer: ethers.Signer;
|
|
19
|
+
}
|
|
20
|
+
export interface BridgeParams {
|
|
21
|
+
fromToken: Models.Token;
|
|
22
|
+
toToken: Models.Token;
|
|
23
|
+
amount: BigNumber;
|
|
24
|
+
fromAddress: string;
|
|
25
|
+
recoveryAddress: string;
|
|
26
|
+
toAddress: string;
|
|
27
|
+
feeAmount: BigNumber;
|
|
28
|
+
gasPriceGwei: BigNumber;
|
|
29
|
+
gasLimit: BigNumber;
|
|
30
|
+
signer: ethers.Signer;
|
|
31
|
+
signCompleteCallback?: () => void;
|
|
32
|
+
}
|
|
33
|
+
export interface LockParams extends ETHTxParams {
|
|
34
|
+
address: Uint8Array;
|
|
35
|
+
amount: BigNumber;
|
|
36
|
+
token: Models.Token;
|
|
37
|
+
signCompleteCallback?: () => void;
|
|
38
|
+
}
|
|
39
|
+
export interface ApproveERC20Params extends ETHTxParams {
|
|
40
|
+
token: Models.Token;
|
|
41
|
+
spenderAddress?: string;
|
|
42
|
+
signCompleteCallback?: () => void;
|
|
43
|
+
}
|
|
44
|
+
export interface EthersTransactionResponse extends ethers.Transaction {
|
|
45
|
+
wait: () => Promise<ethers.Transaction>;
|
|
46
|
+
}
|
|
47
|
+
export declare const FEE_MULTIPLIER: ethers.BigNumber;
|
|
48
|
+
export declare class ETHClient {
|
|
49
|
+
readonly configProvider: NetworkConfigProvider;
|
|
50
|
+
readonly blockchain: Blockchain;
|
|
51
|
+
readonly tokenClient: TokenClient;
|
|
52
|
+
static SUPPORTED_BLOCKCHAINS: Blockchain[];
|
|
53
|
+
static BLOCKCHAIN_KEY: {
|
|
54
|
+
bsc: string;
|
|
55
|
+
eth: string;
|
|
56
|
+
};
|
|
57
|
+
private constructor();
|
|
58
|
+
static instance(opts: ETHClientOpts): ETHClient;
|
|
59
|
+
getExternalBalances(api: CarbonSDK, address: string, whitelistDenoms?: string[]): Promise<TokensWithExternalBalance[]>;
|
|
60
|
+
approveERC20(params: ApproveERC20Params): Promise<EthersTransactionResponse>;
|
|
61
|
+
checkAllowanceERC20(token: Models.Token, owner: string, spender: string): Promise<BigNumber>;
|
|
62
|
+
bridgeTokens(params: BridgeParams): Promise<EthersTransactionResponse>;
|
|
63
|
+
lockDeposit(params: LockParams): Promise<EthersTransactionResponse>;
|
|
64
|
+
getDepositContractAddress(swthBech32Address: string, ownerEthAddress: string): Promise<string>;
|
|
65
|
+
sendDeposit(tokenWithExternalBalances: TokensWithExternalBalance, swthAddress: string, ethAddress: string, getSignatureCallback: (msg: string) => Promise<{
|
|
66
|
+
address: string;
|
|
67
|
+
signature: string;
|
|
68
|
+
}>, overrideFee?: ethers.BigNumber): Promise<Response | "insufficient balance">;
|
|
69
|
+
getDepositFeeAmount(token: Models.Token, depositAddress: string): Promise<ethers.BigNumber>;
|
|
70
|
+
isContract(address: string): Promise<boolean>;
|
|
71
|
+
retrieveERC20Info(address: string): Promise<TokenInitInfo>;
|
|
72
|
+
formatWithdrawalAddress(address: string): Promise<string>;
|
|
73
|
+
getEthSigner(privateKey: ethers.utils.BytesLike): ethers.Wallet;
|
|
74
|
+
sign(message: string, privateKey: ethers.utils.BytesLike): Promise<{
|
|
75
|
+
address: string;
|
|
76
|
+
signature: string;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* TargetProxyHash is a hash of token originator address that is used
|
|
80
|
+
* for lockproxy asset registration and identification
|
|
81
|
+
*
|
|
82
|
+
* @param token
|
|
83
|
+
*/
|
|
84
|
+
getTargetProxyHash(token: Models.Token): string;
|
|
85
|
+
getProvider(): ethers.providers.JsonRpcProvider;
|
|
86
|
+
getNetworkConfig(): NetworkConfig;
|
|
87
|
+
getConfig(): EthNetworkConfig;
|
|
88
|
+
getPayerUrl(): string;
|
|
89
|
+
getProviderUrl(): string;
|
|
90
|
+
getLockProxyAddress(): string;
|
|
91
|
+
getBalanceReaderAddress(): string;
|
|
92
|
+
getWalletBytecodeHash(): string;
|
|
93
|
+
getBridgeEntranceAddr(): string;
|
|
94
|
+
/**
|
|
95
|
+
* verify that address is a valid checksum.
|
|
96
|
+
* Returns checksum address if valid, returns undefined if invalid
|
|
97
|
+
* @input address to be verified
|
|
98
|
+
*/
|
|
99
|
+
verifyChecksum(input: string): string | undefined;
|
|
100
|
+
}
|
|
101
|
+
export default ETHClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NetworkConfig } from "../constant";
|
|
2
|
+
import { GetDetailedTransfersResponse, GetRelaysRequest, GetStatsResponse, GetTransfersRequest, GetTransfersResponse } from "../hydrogen";
|
|
3
|
+
import { GetFeeQuoteRequest, GetFeeQuoteResponse } from "../hydrogen/feeQuote";
|
|
4
|
+
export declare const HydrogenEndpoints: {
|
|
5
|
+
stats: string;
|
|
6
|
+
transfer_payloads: string;
|
|
7
|
+
relays: string;
|
|
8
|
+
fee_quote: string;
|
|
9
|
+
};
|
|
10
|
+
declare class HydrogenClient {
|
|
11
|
+
private config;
|
|
12
|
+
private readonly apiManager;
|
|
13
|
+
constructor(config: NetworkConfig);
|
|
14
|
+
checkState(): void;
|
|
15
|
+
getStats(): Promise<GetStatsResponse>;
|
|
16
|
+
getTransfers(req: GetTransfersRequest): Promise<GetTransfersResponse>;
|
|
17
|
+
getDetailedTransfers(req: GetTransfersRequest): Promise<GetDetailedTransfersResponse>;
|
|
18
|
+
getRelaysTransfers(req: GetRelaysRequest): Promise<GetDetailedTransfersResponse>;
|
|
19
|
+
getFeeQuote(req: GetFeeQuoteRequest): Promise<GetFeeQuoteResponse>;
|
|
20
|
+
}
|
|
21
|
+
export default HydrogenClient;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { NetworkConfig } from "../constant";
|
|
2
|
+
import { Insights } from "../index";
|
|
3
|
+
import { APIUtils } from "../util";
|
|
4
|
+
declare class InsightsQueryClient {
|
|
5
|
+
readonly apiManager: APIUtils.APIManager<typeof Insights.InsightsEndpoints>;
|
|
6
|
+
constructor(config: NetworkConfig);
|
|
7
|
+
parseResponse(response: Response): Promise<APIUtils.RequestResult>;
|
|
8
|
+
Stake(req?: Insights.QueryGetStakeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetStakeResponse>>;
|
|
9
|
+
Transaction(req?: Insights.QueryGetTransactionRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetTransactionResponse>>;
|
|
10
|
+
AvgBlockTime(req: Insights.QueryGetAvgBlockTimeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetAvgBlockTimeResponse>>;
|
|
11
|
+
ActiveAccounts(req?: Insights.QueryGetActiveAccountsRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetActiveAccountsResponse>>;
|
|
12
|
+
UserProfile(req: Insights.QueryGetUserProfileRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserProfileResponse>>;
|
|
13
|
+
UserGrowth(req?: Insights.QueryGetUserGrowthRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserGrowthResponse>>;
|
|
14
|
+
TotalUsers(req?: Insights.QueryGetTotalUsersRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetTotalUsersResponse>>;
|
|
15
|
+
Pools(req?: Insights.QueryGetPoolsRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsResponse>>;
|
|
16
|
+
PoolHistory(query: Insights.QueryGetPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolHistoryResponse>>;
|
|
17
|
+
PoolVolume(req: Insights.QueryGetPoolVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolVolumeResponse>>;
|
|
18
|
+
PoolsVolume(req?: Insights.QueryGetPoolsVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsVolumeResponse>>;
|
|
19
|
+
CompetitionLeaderboard(req: Insights.QueryGetCompetitionLeaderboardRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetCompetitionLeaderboardResponse>>;
|
|
20
|
+
PoolsLiquidity(req?: Insights.QueryGetPoolsLiquidityRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsLiquidityResponse>>;
|
|
21
|
+
MarketsVolume(req?: Insights.QueryGetMarketVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetMarketVolumeResponse>>;
|
|
22
|
+
Nodes(req?: Insights.QueryGetNodesRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetNodesResponse>>;
|
|
23
|
+
BalanceTotal(req: Insights.QueryGetTotalBalanceRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetTotalBalanceResponse>>;
|
|
24
|
+
BalanceList(req: Insights.QueryGetBalanceListRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetBalanceListResponse>>;
|
|
25
|
+
BalanceChange(req: Insights.QueryGetBalanceChangeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetBalanceChangeResponse>>;
|
|
26
|
+
BalanceHistory(req: Insights.QueryGetBalanceHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetBalanceHistoryResponse>>;
|
|
27
|
+
BalanceSupply(): Promise<Insights.InsightsQueryResponse<Insights.QueryGetBalanceSupplyResponse>>;
|
|
28
|
+
BalanceDistribution(req?: Insights.QueryGetBalanceDistributionRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetBalanceDistributionResponse>>;
|
|
29
|
+
LiquidationEngine(query: Insights.GetLiquidationEngineParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetLiquidationEngineResponse>>;
|
|
30
|
+
LiquidationAndADL(query: Insights.GetLiquidationAndADLQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetLiquidationAndADLResponse>>;
|
|
31
|
+
PositionsView(req: Insights.GetPositionsViewPathParams, query: Insights.GetPositionsViewQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPositionsViewResponse>>;
|
|
32
|
+
Leaderboard(req: Insights.GetLeaderboardPathParams, query: Insights.GetLeaderboardQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetLeaderboardResponse>>;
|
|
33
|
+
DenomToGeckoIdMap(): Promise<Insights.InsightsQueryResponse<Insights.QueryDenomToGeckoIdMap>>;
|
|
34
|
+
FundingHistory(query: Insights.QueryGetFundingRateRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetFundingRateResponse>>;
|
|
35
|
+
}
|
|
36
|
+
export default InsightsQueryClient;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import CarbonSDK from "../CarbonSDK";
|
|
2
|
+
import { NetworkConfigProvider } from "../constant";
|
|
3
|
+
import { NeoLedgerAccount } from "../provider/account";
|
|
4
|
+
import { O3Wallet } from "../provider/o3";
|
|
5
|
+
import { Blockchain } from "../util/blockchain";
|
|
6
|
+
import { TokensWithExternalBalance } from "../util/external";
|
|
7
|
+
import { SimpleMap } from "../util/type";
|
|
8
|
+
import { tx, u } from "@cityofzion/neon-core-next";
|
|
9
|
+
import BigNumber from "bignumber.js";
|
|
10
|
+
export interface N3ClientOpts {
|
|
11
|
+
configProvider: NetworkConfigProvider;
|
|
12
|
+
blockchain?: Blockchain;
|
|
13
|
+
}
|
|
14
|
+
export interface LockLedgerDepositParams {
|
|
15
|
+
token: TokensWithExternalBalance;
|
|
16
|
+
toAddressHex: string;
|
|
17
|
+
feeAmount: BigNumber;
|
|
18
|
+
amount: BigNumber;
|
|
19
|
+
signCompleteCallback?: () => void;
|
|
20
|
+
ledger: NeoLedgerAccount;
|
|
21
|
+
}
|
|
22
|
+
export interface LockO3DepositParams {
|
|
23
|
+
token: TokensWithExternalBalance;
|
|
24
|
+
toAddressHex: string;
|
|
25
|
+
feeAmount: BigNumber;
|
|
26
|
+
amount: BigNumber;
|
|
27
|
+
signCompleteCallback?: () => void;
|
|
28
|
+
o3Wallet: O3Wallet;
|
|
29
|
+
}
|
|
30
|
+
export interface NeoDapiInvokeArgs {
|
|
31
|
+
scriptHash: string;
|
|
32
|
+
args?: any[];
|
|
33
|
+
operation: string;
|
|
34
|
+
fee?: string;
|
|
35
|
+
signers: any[];
|
|
36
|
+
}
|
|
37
|
+
export interface NeoDapiInvokeOutput {
|
|
38
|
+
txid: string;
|
|
39
|
+
nodeUrl: string;
|
|
40
|
+
}
|
|
41
|
+
export interface N3Signer {
|
|
42
|
+
scriptHash: string;
|
|
43
|
+
sign: (txn: tx.Transaction, networkMagic?: number, k?: string | number) => Promise<tx.Transaction>;
|
|
44
|
+
}
|
|
45
|
+
export declare class N3Client {
|
|
46
|
+
readonly configProvider: NetworkConfigProvider;
|
|
47
|
+
readonly blockchain: Blockchain;
|
|
48
|
+
static SUPPORTED_BLOCKCHAINS: Blockchain[];
|
|
49
|
+
static BLOCKCHAIN_KEY: {
|
|
50
|
+
neo3: string;
|
|
51
|
+
};
|
|
52
|
+
private rpcClient;
|
|
53
|
+
private constructor();
|
|
54
|
+
static signerFromPrivateKey(privateKey: string): N3Signer;
|
|
55
|
+
static signerFromLedger(ledger: NeoLedgerAccount): N3Signer;
|
|
56
|
+
static instance(opts: N3ClientOpts): N3Client;
|
|
57
|
+
getExternalBalances(sdk: CarbonSDK, address: string, whitelistDenoms?: string[]): Promise<TokensWithExternalBalance[]>;
|
|
58
|
+
getAllN3Balances(address: string): Promise<SimpleMap<string>>;
|
|
59
|
+
lock(lockProxyScriptHash: string, tokenScriptHash: string, fromAddressHex: string, toAddressHex: string, amount: BigNumber, feeAmount: BigNumber, signer: N3Signer): Promise<string | false>;
|
|
60
|
+
lockDeposit(token: TokensWithExternalBalance, feeAmountInput: string, swthAddress: string, neoPrivateKey: string): Promise<string | false>;
|
|
61
|
+
lockO3Deposit(params: LockO3DepositParams): Promise<string>;
|
|
62
|
+
lockLedgerDeposit(params: LockLedgerDepositParams): Promise<string | false>;
|
|
63
|
+
getNetworkFee(txn: tx.Transaction, networkFee: number): Promise<u.BigInteger>;
|
|
64
|
+
getSystemFee(txn: tx.Transaction, systemFee: number, signers?: (tx.Signer | tx.SignerJson)[]): Promise<u.BigInteger>;
|
|
65
|
+
formatWithdrawalAddress(address: string): Promise<string>;
|
|
66
|
+
retrieveNEP17Info(address: string): Promise<{
|
|
67
|
+
name: string;
|
|
68
|
+
symbol: string;
|
|
69
|
+
address: string;
|
|
70
|
+
decimals: number;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
export default N3Client;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import CarbonSDK from "../CarbonSDK";
|
|
2
|
+
import { NeoNetworkConfig, NetworkConfig, NetworkConfigProvider } from "../constant";
|
|
3
|
+
import { Models } from "../index";
|
|
4
|
+
import { NeoLedgerAccount } from "../provider/account";
|
|
5
|
+
import { O3Wallet } from "../provider/o3";
|
|
6
|
+
import { Blockchain } from "../util/blockchain";
|
|
7
|
+
import { TokenInitInfo, TokensWithExternalBalance } from "../util/external";
|
|
8
|
+
import BigNumber from "bignumber.js";
|
|
9
|
+
export interface NEOClientOpts {
|
|
10
|
+
configProvider: NetworkConfigProvider;
|
|
11
|
+
blockchain?: Blockchain;
|
|
12
|
+
}
|
|
13
|
+
export interface LockLedgerDepositParams {
|
|
14
|
+
feeAmount: BigNumber;
|
|
15
|
+
amount: BigNumber;
|
|
16
|
+
address: Uint8Array;
|
|
17
|
+
token: TokensWithExternalBalance;
|
|
18
|
+
ledger: NeoLedgerAccount;
|
|
19
|
+
signCompleteCallback?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface LockO3DepositParams {
|
|
22
|
+
feeAmount: BigNumber;
|
|
23
|
+
amount: BigNumber;
|
|
24
|
+
address: Uint8Array;
|
|
25
|
+
token: TokensWithExternalBalance;
|
|
26
|
+
o3Wallet: O3Wallet;
|
|
27
|
+
signCompleteCallback?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export declare class NEOClient {
|
|
30
|
+
readonly configProvider: NetworkConfigProvider;
|
|
31
|
+
readonly blockchain: Blockchain;
|
|
32
|
+
static SUPPORTED_BLOCKCHAINS: Blockchain[];
|
|
33
|
+
static BLOCKCHAIN_KEY: {
|
|
34
|
+
neo: string;
|
|
35
|
+
};
|
|
36
|
+
private constructor();
|
|
37
|
+
static instance(opts: NEOClientOpts): NEOClient;
|
|
38
|
+
private parseHexNum;
|
|
39
|
+
getExternalBalances(sdk: CarbonSDK, address: string, url: string, whitelistDenoms?: string[]): Promise<TokensWithExternalBalance[]>;
|
|
40
|
+
lockDeposit(token: TokensWithExternalBalance, feeAmountInput: string, swthAddress: string, neoPrivateKey: string): Promise<false | import("@cityofzion/neon-api/lib/funcs/types").DoInvokeConfig>;
|
|
41
|
+
lockO3Deposit(params: LockO3DepositParams): Promise<any>;
|
|
42
|
+
lockLedgerDeposit(params: LockLedgerDepositParams): Promise<any>;
|
|
43
|
+
retrieveNEP5Info(scriptHash: string): Promise<TokenInitInfo>;
|
|
44
|
+
wrapNeoToNneo(neoAmount: BigNumber, neoPrivateKey: string): Promise<import("@cityofzion/neon-api/lib/funcs/types").DoInvokeConfig>;
|
|
45
|
+
formatWithdrawalAddress(address: string): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* TargetProxyHash is a hash of token originator address that is used
|
|
48
|
+
* for lockproxy asset registration and identification
|
|
49
|
+
*
|
|
50
|
+
* @param token
|
|
51
|
+
*/
|
|
52
|
+
getTargetProxyHash(token: Models.Token): string;
|
|
53
|
+
getNetworkConfig(): NetworkConfig;
|
|
54
|
+
getConfig(): NeoNetworkConfig;
|
|
55
|
+
getProviderUrl(): string;
|
|
56
|
+
}
|
|
57
|
+
export default NEOClient;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Token } from "../codec";
|
|
2
|
+
import { NetworkConfigProvider } from "../constant";
|
|
3
|
+
import { BlockchainUtils, TypeUtils } from "../util";
|
|
4
|
+
import BigNumber from "bignumber.js";
|
|
5
|
+
import CarbonQueryClient from "./CarbonQueryClient";
|
|
6
|
+
declare class TokenClient {
|
|
7
|
+
readonly query: CarbonQueryClient;
|
|
8
|
+
readonly configProvider: NetworkConfigProvider;
|
|
9
|
+
static Blacklist: Partial<TypeUtils.NetworkMap<string[]>>;
|
|
10
|
+
readonly tokens: TypeUtils.SimpleMap<Token>;
|
|
11
|
+
readonly wrapperMap: TypeUtils.SimpleMap<string>;
|
|
12
|
+
readonly poolTokens: TypeUtils.SimpleMap<Token>;
|
|
13
|
+
readonly symbols: TypeUtils.SimpleMap<string>;
|
|
14
|
+
readonly usdValues: TypeUtils.SimpleMap<BigNumber>;
|
|
15
|
+
readonly commonAssetNames: TypeUtils.SimpleMap<string>;
|
|
16
|
+
readonly geckoTokenNames: TypeUtils.SimpleMap<string>;
|
|
17
|
+
private additionalGeckoDenoms;
|
|
18
|
+
private constructor();
|
|
19
|
+
static instance(query: CarbonQueryClient, configProvider: NetworkConfigProvider): TokenClient;
|
|
20
|
+
initialize(): Promise<void>;
|
|
21
|
+
registerGeckoIdMap(map: TypeUtils.SimpleMap<string>): void;
|
|
22
|
+
getCommonDenom(denom: string): string;
|
|
23
|
+
getDecimals(denom: string): number | undefined;
|
|
24
|
+
getBlockchain(denom: string): BlockchainUtils.Blockchain | undefined;
|
|
25
|
+
getSymbol(denom: string): string;
|
|
26
|
+
getUSDValue(denom: string): BigNumber | undefined;
|
|
27
|
+
toHuman(denom: string, unitlessAmt: BigNumber): BigNumber;
|
|
28
|
+
toUnitless(denom: string, humanAmt: BigNumber): BigNumber;
|
|
29
|
+
tokenForId(id: string): Token | undefined;
|
|
30
|
+
tokenForDenom(denom: string): Token | undefined;
|
|
31
|
+
getFeeInfo(denom: string): Promise<any>;
|
|
32
|
+
getTokenName(denom: string, overrideMap?: TypeUtils.SimpleMap<string>): string;
|
|
33
|
+
getTokenDesc(denom: string): string;
|
|
34
|
+
static isPoolTokenNew(denom: string): boolean;
|
|
35
|
+
static isPoolTokenLegacy(denom: string): boolean;
|
|
36
|
+
static isPoolToken(denom: string): boolean;
|
|
37
|
+
static isIBCDenom(denom: string): boolean;
|
|
38
|
+
isWrappedToken(denom?: string): boolean;
|
|
39
|
+
hasWrappedToken(denom?: string): boolean;
|
|
40
|
+
getWrappedTokens(denom: string): Token[];
|
|
41
|
+
getWrappedToken(denom: string, blockchain?: BlockchainUtils.Blockchain): Token | null;
|
|
42
|
+
getSourceToken(denom: string): Token | null;
|
|
43
|
+
getNativeToken(): Token | undefined;
|
|
44
|
+
isNativeToken(denom: string): boolean;
|
|
45
|
+
getDepositTokenFor(tokenDenom: string, chain: BlockchainUtils.Blockchain): Token | undefined;
|
|
46
|
+
getAllTokens(): Promise<Token[]>;
|
|
47
|
+
reloadTokens(): Promise<TypeUtils.SimpleMap<Token>>;
|
|
48
|
+
getCarbonIbcTokens(): Token[];
|
|
49
|
+
reloadWrapperMap(): Promise<TypeUtils.SimpleMap<string>>;
|
|
50
|
+
reloadDenomGeckoMap(): Promise<void>;
|
|
51
|
+
reloadUSDValues(denoms?: string[]): Promise<TypeUtils.SimpleMap<BigNumber>>;
|
|
52
|
+
getUSDValuesFromCoinGecko(geckoIds: string[]): Promise<any>;
|
|
53
|
+
getDenomToGeckoIdMap(): Promise<TypeUtils.SimpleMap<string>>;
|
|
54
|
+
setCommonAssetConfig(): void;
|
|
55
|
+
}
|
|
56
|
+
export default TokenClient;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import CarbonSDK from "../CarbonSDK";
|
|
2
|
+
import { NetworkConfig, NetworkConfigProvider, ZilNetworkConfig } from "../constant";
|
|
3
|
+
import { Models } from "../index";
|
|
4
|
+
import { Blockchain } from "../util/blockchain";
|
|
5
|
+
import { TokensWithExternalBalance } from "../util/external";
|
|
6
|
+
import { Transaction, Wallet } from "@zilliqa-js/account";
|
|
7
|
+
import { Zilliqa } from "@zilliqa-js/zilliqa";
|
|
8
|
+
import BigNumber from "bignumber.js";
|
|
9
|
+
export declare type WalletProvider = Omit<Zilliqa & {
|
|
10
|
+
wallet: Wallet & {
|
|
11
|
+
net: string;
|
|
12
|
+
defaultAccount: {
|
|
13
|
+
base16: string;
|
|
14
|
+
bech32: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}, // ugly hack for zilpay non-standard API
|
|
18
|
+
'subscriptionBuilder'>;
|
|
19
|
+
export interface ZILClientOpts {
|
|
20
|
+
configProvider: NetworkConfigProvider;
|
|
21
|
+
blockchain: Blockchain;
|
|
22
|
+
}
|
|
23
|
+
interface ZILTxParams {
|
|
24
|
+
gasPrice: BigNumber;
|
|
25
|
+
gasLimit: BigNumber;
|
|
26
|
+
zilAddress: string;
|
|
27
|
+
signer: WalletProvider | string;
|
|
28
|
+
}
|
|
29
|
+
export interface ZILLockParams extends ZILTxParams {
|
|
30
|
+
address: Uint8Array;
|
|
31
|
+
amount: BigNumber;
|
|
32
|
+
token: Models.Token;
|
|
33
|
+
signCompleteCallback?: () => void;
|
|
34
|
+
}
|
|
35
|
+
export interface ZilBridgeParams {
|
|
36
|
+
fromToken: Models.Token;
|
|
37
|
+
toToken: Models.Token;
|
|
38
|
+
amount: BigNumber;
|
|
39
|
+
fromAddress: string;
|
|
40
|
+
recoveryAddress: string;
|
|
41
|
+
toAddress: string;
|
|
42
|
+
feeAmount: BigNumber;
|
|
43
|
+
gasPrice: BigNumber;
|
|
44
|
+
gasLimit: BigNumber;
|
|
45
|
+
signer: WalletProvider | string;
|
|
46
|
+
signCompleteCallback?: () => void;
|
|
47
|
+
}
|
|
48
|
+
export interface ApproveZRC2Params extends ZILTxParams {
|
|
49
|
+
token: Models.Token;
|
|
50
|
+
spenderAddress?: string;
|
|
51
|
+
signCompleteCallback?: () => void;
|
|
52
|
+
}
|
|
53
|
+
export declare enum BatchRequestType {
|
|
54
|
+
Balance = "balance",
|
|
55
|
+
TokenBalance = "tokenBalance",
|
|
56
|
+
TokenAllowance = "tokenAllowance"
|
|
57
|
+
}
|
|
58
|
+
interface BatchRequestItem {
|
|
59
|
+
id: string;
|
|
60
|
+
jsonrpc: string;
|
|
61
|
+
method: string;
|
|
62
|
+
params: any[];
|
|
63
|
+
}
|
|
64
|
+
interface BatchRequest {
|
|
65
|
+
type: string;
|
|
66
|
+
item: BatchRequestItem;
|
|
67
|
+
}
|
|
68
|
+
export declare const tokenBalanceBatchRequest: (tokenAddress: string, walletAddress: string) => BatchRequest;
|
|
69
|
+
export declare const balanceBatchRequest: (address: string) => BatchRequest;
|
|
70
|
+
export declare class ZILClient {
|
|
71
|
+
readonly configProvider: NetworkConfigProvider;
|
|
72
|
+
readonly blockchain: Blockchain;
|
|
73
|
+
static SUPPORTED_BLOCKCHAINS: Blockchain[];
|
|
74
|
+
static BLOCKCHAIN_KEY: {
|
|
75
|
+
zil: string;
|
|
76
|
+
};
|
|
77
|
+
private walletProvider?;
|
|
78
|
+
private constructor();
|
|
79
|
+
static instance(opts: ZILClientOpts): ZILClient;
|
|
80
|
+
getExternalBalances(sdk: CarbonSDK, address: string, whitelistDenoms?: string[]): Promise<TokensWithExternalBalance[]>;
|
|
81
|
+
formatWithdrawalAddress(bech32Address: string): Promise<string>;
|
|
82
|
+
private callContract;
|
|
83
|
+
approveZRC2(params: ApproveZRC2Params): Promise<Transaction>;
|
|
84
|
+
checkAllowanceZRC2(token: Models.Token, owner: string, spender: string): Promise<BigNumber>;
|
|
85
|
+
bridgeTokens(params: ZilBridgeParams): Promise<Transaction>;
|
|
86
|
+
lockDeposit(params: ZILLockParams): Promise<Transaction>;
|
|
87
|
+
retrieveZRC2Info(address: string): Promise<{
|
|
88
|
+
decimals: number;
|
|
89
|
+
name: string;
|
|
90
|
+
symbol: string;
|
|
91
|
+
address: string;
|
|
92
|
+
}>;
|
|
93
|
+
/**
|
|
94
|
+
* TargetProxyHash is a hash of token originator address that is used
|
|
95
|
+
* for lockproxy asset registration and identification
|
|
96
|
+
*
|
|
97
|
+
* @param token
|
|
98
|
+
*/
|
|
99
|
+
getTargetProxyHash(token: Models.Token): string;
|
|
100
|
+
getNetworkConfig(): NetworkConfig;
|
|
101
|
+
getConfig(): ZilNetworkConfig;
|
|
102
|
+
getProviderUrl(): string;
|
|
103
|
+
getLockProxyAddress(): string;
|
|
104
|
+
getBridgeEntranceAddr(): string;
|
|
105
|
+
}
|
|
106
|
+
export default ZILClient;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as BlockchainClient } from "./BlockchainClient";
|
|
2
|
+
export { default as CarbonQueryClient } from "./CarbonQueryClient";
|
|
3
|
+
export { default as ETHClient } from "./ETHClient";
|
|
4
|
+
export { default as NEOClient } from "./NEOClient";
|
|
5
|
+
export { default as ZILClient } from "./ZILClient";
|
|
6
|
+
export { default as TokenClient } from "./TokenClient";
|
|
7
|
+
export { default as InsightsQueryClient } from "./InsightsQueryClient";
|
|
8
|
+
export { default as HydrogenClient } from "./HydrogenClient";
|