From cfdc9f2628ea3e6f675981bcc1d3fcd04a89d15f Mon Sep 17 00:00:00 2001 From: James Jia Date: Fri, 8 Sep 2023 11:31:29 -0700 Subject: [PATCH] Update dydxpy -> v4-proto, rename PyPI package (#25) * Update dydxpy -> v4-proto * dydx4 -> v4_client_py --- v4-client-py/README.md | 6 +-- v4-client-py/dydx4/__init__.py | 10 ---- v4-client-py/examples/account_endpoints.py | 4 +- v4-client-py/examples/chain_client/Account.py | 4 +- .../examples/chain_client/BankBalance.py | 4 +- .../examples/chain_client/BankBalances.py | 4 +- v4-client-py/examples/chain_client/GetTx.py | 4 +- v4-client-py/examples/composite_example.py | 8 ++-- v4-client-py/examples/faucet_endpoint.py | 4 +- v4-client-py/examples/markets_endpoints.py | 4 +- .../examples/transfer_example_deposit.py | 8 ++-- .../transfer_example_subaccount_transfer.py | 8 ++-- .../examples/transfer_example_withdraw.py | 8 ++-- .../examples/validator_get_examples.py | 4 +- .../examples/validator_post_examples.py | 12 ++--- v4-client-py/examples/wallet_address.py | 4 +- v4-client-py/examples/websocket_example.py | 4 +- v4-client-py/pyproject.toml | 6 +-- v4-client-py/requirements-test.txt | 2 +- v4-client-py/requirements.txt | 2 +- v4-client-py/tests/constants.py | 6 +-- .../tests/test_indexer_account_endpoints.py | 4 +- .../tests/test_indexer_markets_endpoints.py | 4 +- v4-client-py/tests/test_request_helpers.py | 2 +- .../tests/test_validator_get_endpoints.py | 4 +- v4-client-py/tests_integration/test_faucet.py | 4 +- v4-client-py/tests_integration/test_trades.py | 12 ++--- .../tests_integration/test_transfers.py | 8 ++-- v4-client-py/v4_client_py/__init__.py | 10 ++++ .../{dydx4 => v4_client_py}/chain/__init__.py | 0 .../chain/aerial/__init__.py | 0 .../chain/aerial/client/__init__.py | 28 +++++------ .../chain/aerial/client/bank.py | 4 +- .../chain/aerial/client/distribution.py | 2 +- .../chain/aerial/client/staking.py | 4 +- .../chain/aerial/client/utils.py | 4 +- .../chain/aerial/coins.py | 2 +- .../chain/aerial/config.py | 0 .../chain/aerial/exceptions.py | 0 .../chain/aerial/faucet.py | 0 .../chain/aerial/gas.py | 0 .../chain/aerial/tx.py | 6 +-- .../chain/aerial/tx_helpers.py | 0 .../chain/aerial/urls.py | 0 .../chain/aerial/wallet.py | 0 .../chain/auth/__init__.py | 0 .../chain/auth/interface.py | 2 +- .../chain/auth/rest_client.py | 2 +- .../chain/bank/__init__.py | 0 .../chain/bank/interface.py | 2 +- .../chain/bank/rest_client.py | 2 +- .../chain/common/__init__.py | 0 .../chain/common/rest_client.py | 0 .../chain/common/types.py | 0 .../chain/common/utils.py | 0 .../chain/crypto/__init__.py | 0 .../chain/crypto/address.py | 0 .../chain/crypto/hashfuncs.py | 0 .../chain/crypto/interface.py | 0 .../chain/crypto/keypairs.py | 0 .../chain/crypto/keypairs_bls.py | 0 .../chain/distribution/__init__.py | 0 .../chain/distribution/interface.py | 2 +- .../chain/distribution/rest_client.py | 2 +- .../chain/evidence/__init__.py | 0 .../chain/evidence/interface.py | 2 +- .../chain/evidence/rest_client.py | 2 +- .../chain/gov/__init__.py | 0 .../chain/gov/interface.py | 2 +- .../chain/gov/rest_client.py | 2 +- .../chain/mint/__init__.py | 0 .../chain/mint/interface.py | 2 +- .../chain/mint/rest_client.py | 2 +- .../chain/params/__init__.py | 0 .../chain/params/interface.py | 2 +- .../chain/params/rest_client.py | 2 +- .../chain/slashing/__init__.py | 0 .../chain/slashing/interface.py | 2 +- .../chain/slashing/rest_client.py | 2 +- .../chain/staking/__init__.py | 0 .../chain/staking/interface.py | 2 +- .../chain/staking/rest_client.py | 2 +- .../chain/tendermint/__init__.py | 0 .../chain/tendermint/interface.py | 2 +- .../chain/tendermint/rest_client.py | 2 +- .../chain/tx/__init__.py | 0 .../chain/tx/interface.py | 2 +- .../chain/tx/rest_client.py | 4 +- .../chain/upgrade/__init__.py | 0 .../chain/upgrade/interface.py | 2 +- .../chain/upgrade/rest_client.py | 2 +- .../clients/__init__.py | 0 .../clients/composer.py | 10 ++-- .../clients/constants.py | 0 .../clients/dydx_composite_client.py | 14 +++--- .../clients/dydx_faucet_client.py | 0 .../clients/dydx_indexer_client.py | 0 .../clients/dydx_socket_client.py | 0 .../clients/dydx_subaccount.py | 4 +- .../clients/dydx_validator_client.py | 0 .../{dydx4 => v4_client_py}/clients/errors.py | 0 .../clients/helpers/__init__.py | 0 .../clients/helpers/chain_helpers.py | 2 +- .../clients/helpers/request_helpers.py | 0 .../clients/helpers/requests.py | 0 .../clients/modules/__init__.py | 0 .../clients/modules/account.py | 0 .../clients/modules/get.py | 48 +++++++++---------- .../clients/modules/markets.py | 0 .../clients/modules/post.py | 6 +-- 110 files changed, 174 insertions(+), 174 deletions(-) delete mode 100644 v4-client-py/dydx4/__init__.py create mode 100644 v4-client-py/v4_client_py/__init__.py rename v4-client-py/{dydx4 => v4_client_py}/chain/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/client/__init__.py (95%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/client/bank.py (82%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/client/distribution.py (83%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/client/staking.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/client/utils.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/coins.py (91%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/config.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/exceptions.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/faucet.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/gas.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/tx.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/tx_helpers.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/urls.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/aerial/wallet.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/auth/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/auth/interface.py (93%) rename v4-client-py/{dydx4 => v4_client_py}/chain/auth/rest_client.py (95%) rename v4-client-py/{dydx4 => v4_client_py}/chain/bank/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/bank/interface.py (97%) rename v4-client-py/{dydx4 => v4_client_py}/chain/bank/rest_client.py (98%) rename v4-client-py/{dydx4 => v4_client_py}/chain/common/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/common/rest_client.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/common/types.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/common/utils.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/crypto/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/crypto/address.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/crypto/hashfuncs.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/crypto/interface.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/crypto/keypairs.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/crypto/keypairs_bls.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/distribution/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/distribution/interface.py (98%) rename v4-client-py/{dydx4 => v4_client_py}/chain/distribution/rest_client.py (99%) rename v4-client-py/{dydx4 => v4_client_py}/chain/evidence/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/evidence/interface.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/evidence/rest_client.py (97%) rename v4-client-py/{dydx4 => v4_client_py}/chain/gov/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/gov/interface.py (98%) rename v4-client-py/{dydx4 => v4_client_py}/chain/gov/rest_client.py (98%) rename v4-client-py/{dydx4 => v4_client_py}/chain/mint/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/mint/interface.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/mint/rest_client.py (98%) rename v4-client-py/{dydx4 => v4_client_py}/chain/params/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/params/interface.py (95%) rename v4-client-py/{dydx4 => v4_client_py}/chain/params/rest_client.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/slashing/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/slashing/interface.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/slashing/rest_client.py (97%) rename v4-client-py/{dydx4 => v4_client_py}/chain/staking/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/staking/interface.py (99%) rename v4-client-py/{dydx4 => v4_client_py}/chain/staking/rest_client.py (99%) rename v4-client-py/{dydx4 => v4_client_py}/chain/tendermint/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/tendermint/interface.py (97%) rename v4-client-py/{dydx4 => v4_client_py}/chain/tendermint/rest_client.py (98%) rename v4-client-py/{dydx4 => v4_client_py}/chain/tx/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/tx/interface.py (97%) rename v4-client-py/{dydx4 => v4_client_py}/chain/tx/rest_client.py (95%) rename v4-client-py/{dydx4 => v4_client_py}/chain/upgrade/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/chain/upgrade/interface.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/chain/upgrade/rest_client.py (97%) rename v4-client-py/{dydx4 => v4_client_py}/clients/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/composer.py (93%) rename v4-client-py/{dydx4 => v4_client_py}/clients/constants.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/dydx_composite_client.py (96%) rename v4-client-py/{dydx4 => v4_client_py}/clients/dydx_faucet_client.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/dydx_indexer_client.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/dydx_socket_client.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/dydx_subaccount.py (85%) rename v4-client-py/{dydx4 => v4_client_py}/clients/dydx_validator_client.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/errors.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/helpers/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/helpers/chain_helpers.py (98%) rename v4-client-py/{dydx4 => v4_client_py}/clients/helpers/request_helpers.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/helpers/requests.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/modules/__init__.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/modules/account.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/modules/get.py (83%) rename v4-client-py/{dydx4 => v4_client_py}/clients/modules/markets.py (100%) rename v4-client-py/{dydx4 => v4_client_py}/clients/modules/post.py (97%) diff --git a/v4-client-py/README.md b/v4-client-py/README.md index d9ab7fd1..1a98452f 100644 --- a/v4-client-py/README.md +++ b/v4-client-py/README.md @@ -34,11 +34,11 @@ Select Venv Select Python 3.9 as interpreter Select requirements.txt as the dependencies to install -TODO: Add dydxpy to the requirements.txt +TODO: Add v4-proto to the requirements.txt -Install dydxpy +Install v4-proto ``` -pip install -i https://test.pypi.org/simple/ dydxpy== +pip install -i https://test.pypi.org/simple/ v4-proto== ``` VS Code will automatically switch to .venv environment when running example code. Or you can manually switch diff --git a/v4-client-py/dydx4/__init__.py b/v4-client-py/dydx4/__init__.py deleted file mode 100644 index 1794fc4f..00000000 --- a/v4-client-py/dydx4/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -from dydx4.clients.dydx_indexer_client import IndexerClient -from dydx4.clients.dydx_composite_client import CompositeClient -from dydx4.clients.dydx_socket_client import SocketClient -from dydx4.clients.dydx_faucet_client import FaucetClient -from dydx4.clients.errors import DydxError, DydxApiError, TransactionReverted - - -# Export useful helper functions and objects. -from dydx4.clients.helpers.request_helpers import epoch_seconds_to_iso -from dydx4.clients.helpers.request_helpers import iso_to_epoch_seconds \ No newline at end of file diff --git a/v4-client-py/examples/account_endpoints.py b/v4-client-py/examples/account_endpoints.py index efe8aff2..32785d18 100644 --- a/v4-client-py/examples/account_endpoints.py +++ b/v4-client-py/examples/account_endpoints.py @@ -3,8 +3,8 @@ Usage: python -m examples.private_endpoints ''' -from dydx4.clients import IndexerClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import IndexerClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/chain_client/Account.py b/v4-client-py/examples/chain_client/Account.py index 5e749192..d155e4e9 100644 --- a/v4-client-py/examples/chain_client/Account.py +++ b/v4-client-py/examples/chain_client/Account.py @@ -1,8 +1,8 @@ import asyncio import logging -from dydx4.clients import ValidatorClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import ValidatorClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/chain_client/BankBalance.py b/v4-client-py/examples/chain_client/BankBalance.py index 62878fa7..da689956 100644 --- a/v4-client-py/examples/chain_client/BankBalance.py +++ b/v4-client-py/examples/chain_client/BankBalance.py @@ -2,8 +2,8 @@ import logging -from dydx4.clients import ValidatorClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import ValidatorClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/chain_client/BankBalances.py b/v4-client-py/examples/chain_client/BankBalances.py index 7423bed1..837b1d10 100644 --- a/v4-client-py/examples/chain_client/BankBalances.py +++ b/v4-client-py/examples/chain_client/BankBalances.py @@ -2,8 +2,8 @@ import logging -from dydx4.clients import ValidatorClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import ValidatorClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/chain_client/GetTx.py b/v4-client-py/examples/chain_client/GetTx.py index 0c105fcb..60a25f85 100644 --- a/v4-client-py/examples/chain_client/GetTx.py +++ b/v4-client-py/examples/chain_client/GetTx.py @@ -1,8 +1,8 @@ import asyncio import logging -from dydx4.clients import ValidatorClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import ValidatorClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/composite_example.py b/v4-client-py/examples/composite_example.py index 77f68d83..ab820f5f 100644 --- a/v4-client-py/examples/composite_example.py +++ b/v4-client-py/examples/composite_example.py @@ -5,11 +5,11 @@ import asyncio import logging from random import randrange -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients import CompositeClient, Subaccount -from dydx4.clients.constants import BECH32_PREFIX, Network +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients import CompositeClient, Subaccount +from v4_client_py.clients.constants import BECH32_PREFIX, Network -from dydx4.clients.helpers.chain_helpers import ( +from v4_client_py.clients.helpers.chain_helpers import ( OrderType, OrderSide, OrderTimeInForce, diff --git a/v4-client-py/examples/faucet_endpoint.py b/v4-client-py/examples/faucet_endpoint.py index 8dd66724..838bed21 100644 --- a/v4-client-py/examples/faucet_endpoint.py +++ b/v4-client-py/examples/faucet_endpoint.py @@ -2,8 +2,8 @@ Usage: python -m examples.faucet_endpoint ''' -from dydx4.clients import FaucetClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import FaucetClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/markets_endpoints.py b/v4-client-py/examples/markets_endpoints.py index d99a5d86..055924f1 100644 --- a/v4-client-py/examples/markets_endpoints.py +++ b/v4-client-py/examples/markets_endpoints.py @@ -3,8 +3,8 @@ Usage: python -m examples.markets_endpoints ''' -from dydx4.clients import IndexerClient -from dydx4.clients.constants import Network, MARKET_BTC_USD +from v4_client_py.clients import IndexerClient +from v4_client_py.clients.constants import Network, MARKET_BTC_USD client = IndexerClient( config=Network.staging().indexer_config, diff --git a/v4-client-py/examples/transfer_example_deposit.py b/v4-client-py/examples/transfer_example_deposit.py index 4f670d92..78e0e86c 100644 --- a/v4-client-py/examples/transfer_example_deposit.py +++ b/v4-client-py/examples/transfer_example_deposit.py @@ -1,10 +1,10 @@ import asyncio import logging -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.dydx_subaccount import Subaccount +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.dydx_subaccount import Subaccount -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import BECH32_PREFIX, Network +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import BECH32_PREFIX, Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/transfer_example_subaccount_transfer.py b/v4-client-py/examples/transfer_example_subaccount_transfer.py index 57e9b659..53f36710 100644 --- a/v4-client-py/examples/transfer_example_subaccount_transfer.py +++ b/v4-client-py/examples/transfer_example_subaccount_transfer.py @@ -1,10 +1,10 @@ import asyncio import logging -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.dydx_subaccount import Subaccount +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.dydx_subaccount import Subaccount -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import BECH32_PREFIX, Network +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import BECH32_PREFIX, Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/transfer_example_withdraw.py b/v4-client-py/examples/transfer_example_withdraw.py index ad2934ae..213063ea 100644 --- a/v4-client-py/examples/transfer_example_withdraw.py +++ b/v4-client-py/examples/transfer_example_withdraw.py @@ -1,10 +1,10 @@ import asyncio import logging -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.dydx_subaccount import Subaccount +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.dydx_subaccount import Subaccount -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import BECH32_PREFIX, Network +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import BECH32_PREFIX, Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/validator_get_examples.py b/v4-client-py/examples/validator_get_examples.py index de100350..5fd5f34e 100644 --- a/v4-client-py/examples/validator_get_examples.py +++ b/v4-client-py/examples/validator_get_examples.py @@ -1,8 +1,8 @@ import asyncio import logging -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import Network +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_ADDRESS diff --git a/v4-client-py/examples/validator_post_examples.py b/v4-client-py/examples/validator_post_examples.py index 60114d7f..e722174f 100644 --- a/v4-client-py/examples/validator_post_examples.py +++ b/v4-client-py/examples/validator_post_examples.py @@ -3,13 +3,13 @@ import logging import random from time import sleep -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.dydx_subaccount import Subaccount -from dydxpy.proto.dydxprotocol.clob.order_pb2 import Order +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.dydx_subaccount import Subaccount +from v4_proto.dydxprotocol.clob.order_pb2 import Order -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import BECH32_PREFIX, Network -from dydx4.clients.helpers.chain_helpers import ORDER_FLAGS_SHORT_TERM +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import BECH32_PREFIX, Network +from v4_client_py.clients.helpers.chain_helpers import ORDER_FLAGS_SHORT_TERM from examples.utils import loadJson from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/wallet_address.py b/v4-client-py/examples/wallet_address.py index 605876e3..383b6c44 100644 --- a/v4-client-py/examples/wallet_address.py +++ b/v4-client-py/examples/wallet_address.py @@ -1,5 +1,5 @@ -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.constants import BECH32_PREFIX +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.constants import BECH32_PREFIX from tests.constants import DYDX_TEST_ADDRESS, DYDX_TEST_PRIVATE_KEY, DYDX_TEST_MNEMONIC diff --git a/v4-client-py/examples/websocket_example.py b/v4-client-py/examples/websocket_example.py index d49969d3..b99ef707 100644 --- a/v4-client-py/examples/websocket_example.py +++ b/v4-client-py/examples/websocket_example.py @@ -6,8 +6,8 @@ import asyncio import json -from dydx4.clients.dydx_socket_client import SocketClient -from dydx4.clients.constants import Network +from v4_client_py.clients.dydx_socket_client import SocketClient +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_ADDRESS diff --git a/v4-client-py/pyproject.toml b/v4-client-py/pyproject.toml index f3f947d1..e3524e1d 100644 --- a/v4-client-py/pyproject.toml +++ b/v4-client-py/pyproject.toml @@ -1,11 +1,11 @@ # pyproject.toml [tool.setuptools] -package-dir = {"" = "dydx4"} +package-dir = {"" = "v4_client_py"} [tool.poetry] -name = "dydx4" -version = "0.3.0" +name = "v4-client-py" +version = "0.4.0" description = "dYdX v4 Client" authors = ["John Huang "] license = "BSL-1.1" diff --git a/v4-client-py/requirements-test.txt b/v4-client-py/requirements-test.txt index 28cdbf6e..0cb9495e 100644 --- a/v4-client-py/requirements-test.txt +++ b/v4-client-py/requirements-test.txt @@ -5,7 +5,7 @@ bip_utils>=1.6.0 brownie>=0.5.0 cytoolz>=0.12.1 dateparser>=1.0.0 -dydxpy>=0.4.0.post1 +v4-proto>=0.2.1 ecdsa>=0.16.0 eth_keys>=0.4.0 eth-account>=0.9.0 diff --git a/v4-client-py/requirements.txt b/v4-client-py/requirements.txt index fe063363..f6c88b11 100644 --- a/v4-client-py/requirements.txt +++ b/v4-client-py/requirements.txt @@ -5,7 +5,7 @@ bip_utils>=2.7.0 brownie>=0.5.0 cytoolz>=0.12.1 dateparser>=1.0.0 -dydxpy>=0.4.0.post1 +v4-proto>=0.2.1 ecdsa>=0.18.0 eth_keys>=0.4.0 eth-account>=0.9.0 diff --git a/v4-client-py/tests/constants.py b/v4-client-py/tests/constants.py index b7d2bb48..8c465f86 100644 --- a/v4-client-py/tests/constants.py +++ b/v4-client-py/tests/constants.py @@ -1,7 +1,7 @@ # ------------ Constants for Testing ------------ -from dydx4.clients.constants import ORDER_SIDE_BUY -from dydx4.clients.helpers.chain_helpers import ORDER_FLAGS_SHORT_TERM -from dydxpy.proto.dydxprotocol.clob.order_pb2 import Order +from v4_client_py.clients.constants import ORDER_SIDE_BUY +from v4_client_py.clients.helpers.chain_helpers import ORDER_FLAGS_SHORT_TERM +from v4_proto.dydxprotocol.clob.order_pb2 import Order DEFAULT_HOST = 'http://localhost:8080' diff --git a/v4-client-py/tests/test_indexer_account_endpoints.py b/v4-client-py/tests/test_indexer_account_endpoints.py index a2903370..f6b09b00 100644 --- a/v4-client-py/tests/test_indexer_account_endpoints.py +++ b/v4-client-py/tests/test_indexer_account_endpoints.py @@ -1,6 +1,6 @@ -from dydx4.clients import IndexerClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import IndexerClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/tests/test_indexer_markets_endpoints.py b/v4-client-py/tests/test_indexer_markets_endpoints.py index 15746f86..dc2af2c7 100644 --- a/v4-client-py/tests/test_indexer_markets_endpoints.py +++ b/v4-client-py/tests/test_indexer_markets_endpoints.py @@ -1,6 +1,6 @@ -from dydx4.clients import IndexerClient -from dydx4.clients.constants import Network, MARKET_BTC_USD +from v4_client_py.clients import IndexerClient +from v4_client_py.clients.constants import Network, MARKET_BTC_USD client = IndexerClient( config=Network.staging().indexer_config, diff --git a/v4-client-py/tests/test_request_helpers.py b/v4-client-py/tests/test_request_helpers.py index f11c99f2..8e585c8b 100644 --- a/v4-client-py/tests/test_request_helpers.py +++ b/v4-client-py/tests/test_request_helpers.py @@ -1,4 +1,4 @@ -from dydx4.clients.helpers.request_helpers import generate_query_path +from v4_client_py.clients.helpers.request_helpers import generate_query_path def test_generate_query_path(): query_path = generate_query_path('https://google.com', {'a': True, 'b': False, 'c': 'TEST'}) diff --git a/v4-client-py/tests/test_validator_get_endpoints.py b/v4-client-py/tests/test_validator_get_endpoints.py index cb794bb6..261728f3 100644 --- a/v4-client-py/tests/test_validator_get_endpoints.py +++ b/v4-client-py/tests/test_validator_get_endpoints.py @@ -1,5 +1,5 @@ -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import Network +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_ADDRESS diff --git a/v4-client-py/tests_integration/test_faucet.py b/v4-client-py/tests_integration/test_faucet.py index 6e5c5360..e0d6e0bf 100644 --- a/v4-client-py/tests_integration/test_faucet.py +++ b/v4-client-py/tests_integration/test_faucet.py @@ -1,6 +1,6 @@ -from dydx4.clients import FaucetClient, Subaccount -from dydx4.clients.constants import Network +from v4_client_py.clients import FaucetClient, Subaccount +from v4_client_py.clients.constants import Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/tests_integration/test_trades.py b/v4-client-py/tests_integration/test_trades.py index 8d6c518f..3332938e 100644 --- a/v4-client-py/tests_integration/test_trades.py +++ b/v4-client-py/tests_integration/test_trades.py @@ -2,13 +2,13 @@ import datetime import logging import random -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.dydx_subaccount import Subaccount -from dydxpy.proto.dydxprotocol.clob.order_pb2 import Order +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.dydx_subaccount import Subaccount +from v4_proto.dydxprotocol.clob.order_pb2 import Order -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import BECH32_PREFIX, Network -from dydx4.clients.helpers.chain_helpers import ORDER_FLAGS_SHORT_TERM +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import BECH32_PREFIX, Network +from v4_client_py.clients.helpers.chain_helpers import ORDER_FLAGS_SHORT_TERM from examples.utils import loadJson from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/tests_integration/test_transfers.py b/v4-client-py/tests_integration/test_transfers.py index f5d23eed..2f20f777 100644 --- a/v4-client-py/tests_integration/test_transfers.py +++ b/v4-client-py/tests_integration/test_transfers.py @@ -1,10 +1,10 @@ import asyncio import logging -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.dydx_subaccount import Subaccount +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.dydx_subaccount import Subaccount -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.constants import BECH32_PREFIX, Network +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.constants import BECH32_PREFIX, Network from tests.constants import DYDX_TEST_MNEMONIC diff --git a/v4-client-py/v4_client_py/__init__.py b/v4-client-py/v4_client_py/__init__.py new file mode 100644 index 00000000..adb909c6 --- /dev/null +++ b/v4-client-py/v4_client_py/__init__.py @@ -0,0 +1,10 @@ +from v4_client_py.clients.dydx_indexer_client import IndexerClient +from v4_client_py.clients.dydx_composite_client import CompositeClient +from v4_client_py.clients.dydx_socket_client import SocketClient +from v4_client_py.clients.dydx_faucet_client import FaucetClient +from v4_client_py.clients.errors import DydxError, DydxApiError, TransactionReverted + + +# Export useful helper functions and objects. +from v4_client_py.clients.helpers.request_helpers import epoch_seconds_to_iso +from v4_client_py.clients.helpers.request_helpers import iso_to_epoch_seconds \ No newline at end of file diff --git a/v4-client-py/dydx4/chain/__init__.py b/v4-client-py/v4_client_py/chain/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/__init__.py rename to v4-client-py/v4_client_py/chain/__init__.py diff --git a/v4-client-py/dydx4/chain/aerial/__init__.py b/v4-client-py/v4_client_py/chain/aerial/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/__init__.py rename to v4-client-py/v4_client_py/chain/aerial/__init__.py diff --git a/v4-client-py/dydx4/chain/aerial/client/__init__.py b/v4-client-py/v4_client_py/chain/aerial/client/__init__.py similarity index 95% rename from v4-client-py/dydx4/chain/aerial/client/__init__.py rename to v4-client-py/v4_client_py/chain/aerial/client/__init__.py index 5a6abaea..cb901200 100644 --- a/v4-client-py/dydx4/chain/aerial/client/__init__.py +++ b/v4-client-py/v4_client_py/chain/aerial/client/__init__.py @@ -11,42 +11,42 @@ import certifi import grpc -from dydxpy.proto.cosmos.auth.v1beta1.auth_pb2 import BaseAccount -from dydxpy.proto.cosmos.auth.v1beta1.query_pb2 import QueryAccountRequest -from dydxpy.proto.cosmos.auth.v1beta1.query_pb2_grpc import QueryStub as AuthGrpcClient -from dydxpy.proto.cosmos.bank.v1beta1.query_pb2 import ( +from v4_proto.cosmos.auth.v1beta1.auth_pb2 import BaseAccount +from v4_proto.cosmos.auth.v1beta1.query_pb2 import QueryAccountRequest +from v4_proto.cosmos.auth.v1beta1.query_pb2_grpc import QueryStub as AuthGrpcClient +from v4_proto.cosmos.bank.v1beta1.query_pb2 import ( QueryAllBalancesRequest, QueryBalanceRequest, ) -from dydxpy.proto.cosmos.bank.v1beta1.query_pb2_grpc import QueryStub as BankGrpcClient -from dydxpy.proto.cosmos.crypto.ed25519.keys_pb2 import ( # noqa # pylint: disable=unused-import +from v4_proto.cosmos.bank.v1beta1.query_pb2_grpc import QueryStub as BankGrpcClient +from v4_proto.cosmos.crypto.ed25519.keys_pb2 import ( # noqa # pylint: disable=unused-import PubKey, ) -from dydxpy.proto.cosmos.distribution.v1beta1.query_pb2 import ( +from v4_proto.cosmos.distribution.v1beta1.query_pb2 import ( QueryDelegationRewardsRequest, ) -from dydxpy.proto.cosmos.distribution.v1beta1.query_pb2_grpc import ( +from v4_proto.cosmos.distribution.v1beta1.query_pb2_grpc import ( QueryStub as DistributionGrpcClient, ) -from dydxpy.proto.cosmos.params.v1beta1.query_pb2 import QueryParamsRequest -from dydxpy.proto.cosmos.params.v1beta1.query_pb2_grpc import ( +from v4_proto.cosmos.params.v1beta1.query_pb2 import QueryParamsRequest +from v4_proto.cosmos.params.v1beta1.query_pb2_grpc import ( QueryStub as QueryParamsGrpcClient, ) -from dydxpy.proto.cosmos.staking.v1beta1.query_pb2 import ( +from v4_proto.cosmos.staking.v1beta1.query_pb2 import ( QueryDelegatorDelegationsRequest, QueryDelegatorUnbondingDelegationsRequest, QueryValidatorsRequest, ) -from dydxpy.proto.cosmos.staking.v1beta1.query_pb2_grpc import ( +from v4_proto.cosmos.staking.v1beta1.query_pb2_grpc import ( QueryStub as StakingGrpcClient, ) -from dydxpy.proto.cosmos.tx.v1beta1.service_pb2 import ( +from v4_proto.cosmos.tx.v1beta1.service_pb2 import ( BroadcastMode, BroadcastTxRequest, GetTxRequest, SimulateRequest, ) -from dydxpy.proto.cosmos.tx.v1beta1.service_pb2_grpc import ServiceStub as TxGrpcClient +from v4_proto.cosmos.tx.v1beta1.service_pb2_grpc import ServiceStub as TxGrpcClient from .bank import create_bank_send_msg from .distribution import create_withdraw_delegator_reward diff --git a/v4-client-py/dydx4/chain/aerial/client/bank.py b/v4-client-py/v4_client_py/chain/aerial/client/bank.py similarity index 82% rename from v4-client-py/dydx4/chain/aerial/client/bank.py rename to v4-client-py/v4_client_py/chain/aerial/client/bank.py index 32a32ccc..76a45781 100644 --- a/v4-client-py/dydx4/chain/aerial/client/bank.py +++ b/v4-client-py/v4_client_py/chain/aerial/client/bank.py @@ -1,8 +1,8 @@ """Bank send message.""" -from dydxpy.proto.cosmos.bank.v1beta1.tx_pb2 import MsgSend -from dydxpy.proto.cosmos.base.v1beta1.coin_pb2 import Coin +from v4_proto.cosmos.bank.v1beta1.tx_pb2 import MsgSend +from v4_proto.cosmos.base.v1beta1.coin_pb2 import Coin from ...crypto.address import Address diff --git a/v4-client-py/dydx4/chain/aerial/client/distribution.py b/v4-client-py/v4_client_py/chain/aerial/client/distribution.py similarity index 83% rename from v4-client-py/dydx4/chain/aerial/client/distribution.py rename to v4-client-py/v4_client_py/chain/aerial/client/distribution.py index 98b44030..b6c66f9a 100644 --- a/v4-client-py/dydx4/chain/aerial/client/distribution.py +++ b/v4-client-py/v4_client_py/chain/aerial/client/distribution.py @@ -1,7 +1,7 @@ """Distribution.""" -from dydxpy.proto.cosmos.distribution.v1beta1.tx_pb2 import MsgWithdrawDelegatorReward +from v4_proto.cosmos.distribution.v1beta1.tx_pb2 import MsgWithdrawDelegatorReward from ...crypto.address import Address diff --git a/v4-client-py/dydx4/chain/aerial/client/staking.py b/v4-client-py/v4_client_py/chain/aerial/client/staking.py similarity index 96% rename from v4-client-py/dydx4/chain/aerial/client/staking.py rename to v4-client-py/v4_client_py/chain/aerial/client/staking.py index f5124ea7..935b90ac 100644 --- a/v4-client-py/dydx4/chain/aerial/client/staking.py +++ b/v4-client-py/v4_client_py/chain/aerial/client/staking.py @@ -3,8 +3,8 @@ from enum import Enum -from dydxpy.proto.cosmos.base.v1beta1.coin_pb2 import Coin -from dydxpy.proto.cosmos.staking.v1beta1.tx_pb2 import ( +from v4_proto.cosmos.base.v1beta1.coin_pb2 import Coin +from v4_proto.cosmos.staking.v1beta1.tx_pb2 import ( MsgBeginRedelegate, MsgDelegate, MsgUndelegate, diff --git a/v4-client-py/dydx4/chain/aerial/client/utils.py b/v4-client-py/v4_client_py/chain/aerial/client/utils.py similarity index 96% rename from v4-client-py/dydx4/chain/aerial/client/utils.py rename to v4-client-py/v4_client_py/chain/aerial/client/utils.py index 34ff6df3..a220281e 100644 --- a/v4-client-py/dydx4/chain/aerial/client/utils.py +++ b/v4-client-py/v4_client_py/chain/aerial/client/utils.py @@ -3,9 +3,9 @@ from datetime import timedelta from typing import Any, Callable, List, Optional, Union -from dydx4.clients.constants import BroadcastMode +from v4_client_py.clients.constants import BroadcastMode -from dydxpy.proto.cosmos.base.query.v1beta1.pagination_pb2 import PageRequest +from v4_proto.cosmos.base.query.v1beta1.pagination_pb2 import PageRequest from ..tx import SigningCfg from ..tx_helpers import SubmittedTx diff --git a/v4-client-py/dydx4/chain/aerial/coins.py b/v4-client-py/v4_client_py/chain/aerial/coins.py similarity index 91% rename from v4-client-py/dydx4/chain/aerial/coins.py rename to v4-client-py/v4_client_py/chain/aerial/coins.py index 468bf2ec..6e8f9b8a 100644 --- a/v4-client-py/dydx4/chain/aerial/coins.py +++ b/v4-client-py/v4_client_py/chain/aerial/coins.py @@ -4,7 +4,7 @@ import re from typing import List -from dydxpy.proto.cosmos.base.v1beta1.coin_pb2 import Coin +from v4_proto.cosmos.base.v1beta1.coin_pb2 import Coin def parse_coins(value: str) -> List[Coin]: """Parse the coins. diff --git a/v4-client-py/dydx4/chain/aerial/config.py b/v4-client-py/v4_client_py/chain/aerial/config.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/config.py rename to v4-client-py/v4_client_py/chain/aerial/config.py diff --git a/v4-client-py/dydx4/chain/aerial/exceptions.py b/v4-client-py/v4_client_py/chain/aerial/exceptions.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/exceptions.py rename to v4-client-py/v4_client_py/chain/aerial/exceptions.py diff --git a/v4-client-py/dydx4/chain/aerial/faucet.py b/v4-client-py/v4_client_py/chain/aerial/faucet.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/faucet.py rename to v4-client-py/v4_client_py/chain/aerial/faucet.py diff --git a/v4-client-py/dydx4/chain/aerial/gas.py b/v4-client-py/v4_client_py/chain/aerial/gas.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/gas.py rename to v4-client-py/v4_client_py/chain/aerial/gas.py diff --git a/v4-client-py/dydx4/chain/aerial/tx.py b/v4-client-py/v4_client_py/chain/aerial/tx.py similarity index 96% rename from v4-client-py/dydx4/chain/aerial/tx.py rename to v4-client-py/v4_client_py/chain/aerial/tx.py index bb43fe6d..2aaa116f 100644 --- a/v4-client-py/dydx4/chain/aerial/tx.py +++ b/v4-client-py/v4_client_py/chain/aerial/tx.py @@ -7,9 +7,9 @@ from google.protobuf.any_pb2 import Any as ProtoAny -from dydxpy.proto.cosmos.crypto.secp256k1.keys_pb2 import PubKey as ProtoPubKey -from dydxpy.proto.cosmos.tx.signing.v1beta1.signing_pb2 import SignMode -from dydxpy.proto.cosmos.tx.v1beta1.tx_pb2 import ( +from v4_proto.cosmos.crypto.secp256k1.keys_pb2 import PubKey as ProtoPubKey +from v4_proto.cosmos.tx.signing.v1beta1.signing_pb2 import SignMode +from v4_proto.cosmos.tx.v1beta1.tx_pb2 import ( AuthInfo, Fee, ModeInfo, diff --git a/v4-client-py/dydx4/chain/aerial/tx_helpers.py b/v4-client-py/v4_client_py/chain/aerial/tx_helpers.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/tx_helpers.py rename to v4-client-py/v4_client_py/chain/aerial/tx_helpers.py diff --git a/v4-client-py/dydx4/chain/aerial/urls.py b/v4-client-py/v4_client_py/chain/aerial/urls.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/urls.py rename to v4-client-py/v4_client_py/chain/aerial/urls.py diff --git a/v4-client-py/dydx4/chain/aerial/wallet.py b/v4-client-py/v4_client_py/chain/aerial/wallet.py similarity index 100% rename from v4-client-py/dydx4/chain/aerial/wallet.py rename to v4-client-py/v4_client_py/chain/aerial/wallet.py diff --git a/v4-client-py/dydx4/chain/auth/__init__.py b/v4-client-py/v4_client_py/chain/auth/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/auth/__init__.py rename to v4-client-py/v4_client_py/chain/auth/__init__.py diff --git a/v4-client-py/dydx4/chain/auth/interface.py b/v4-client-py/v4_client_py/chain/auth/interface.py similarity index 93% rename from v4-client-py/dydx4/chain/auth/interface.py rename to v4-client-py/v4_client_py/chain/auth/interface.py index fcbdd9ad..b0f6cd14 100644 --- a/v4-client-py/dydx4/chain/auth/interface.py +++ b/v4-client-py/v4_client_py/chain/auth/interface.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.auth.v1beta1.query_pb2 import ( +from v4_proto.cosmos.auth.v1beta1.query_pb2 import ( QueryAccountRequest, QueryAccountResponse, QueryParamsRequest, diff --git a/v4-client-py/dydx4/chain/auth/rest_client.py b/v4-client-py/v4_client_py/chain/auth/rest_client.py similarity index 95% rename from v4-client-py/dydx4/chain/auth/rest_client.py rename to v4-client-py/v4_client_py/chain/auth/rest_client.py index cf00dfec..80bae429 100644 --- a/v4-client-py/dydx4/chain/auth/rest_client.py +++ b/v4-client-py/v4_client_py/chain/auth/rest_client.py @@ -3,7 +3,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.auth.v1beta1.query_pb2 import ( +from v4_proto.cosmos.auth.v1beta1.query_pb2 import ( QueryAccountRequest, QueryAccountResponse, QueryParamsRequest, diff --git a/v4-client-py/dydx4/chain/bank/__init__.py b/v4-client-py/v4_client_py/chain/bank/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/bank/__init__.py rename to v4-client-py/v4_client_py/chain/bank/__init__.py diff --git a/v4-client-py/dydx4/chain/bank/interface.py b/v4-client-py/v4_client_py/chain/bank/interface.py similarity index 97% rename from v4-client-py/dydx4/chain/bank/interface.py rename to v4-client-py/v4_client_py/chain/bank/interface.py index ca730c28..359d3021 100644 --- a/v4-client-py/dydx4/chain/bank/interface.py +++ b/v4-client-py/v4_client_py/chain/bank/interface.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.bank.v1beta1.query_pb2 import ( +from v4_proto.cosmos.bank.v1beta1.query_pb2 import ( QueryAllBalancesRequest, QueryAllBalancesResponse, QueryBalanceRequest, diff --git a/v4-client-py/dydx4/chain/bank/rest_client.py b/v4-client-py/v4_client_py/chain/bank/rest_client.py similarity index 98% rename from v4-client-py/dydx4/chain/bank/rest_client.py rename to v4-client-py/v4_client_py/chain/bank/rest_client.py index 51058657..b2a2850e 100644 --- a/v4-client-py/dydx4/chain/bank/rest_client.py +++ b/v4-client-py/v4_client_py/chain/bank/rest_client.py @@ -3,7 +3,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.bank.v1beta1.query_pb2 import ( +from v4_proto.cosmos.bank.v1beta1.query_pb2 import ( QueryAllBalancesRequest, QueryAllBalancesResponse, QueryBalanceRequest, diff --git a/v4-client-py/dydx4/chain/common/__init__.py b/v4-client-py/v4_client_py/chain/common/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/common/__init__.py rename to v4-client-py/v4_client_py/chain/common/__init__.py diff --git a/v4-client-py/dydx4/chain/common/rest_client.py b/v4-client-py/v4_client_py/chain/common/rest_client.py similarity index 100% rename from v4-client-py/dydx4/chain/common/rest_client.py rename to v4-client-py/v4_client_py/chain/common/rest_client.py diff --git a/v4-client-py/dydx4/chain/common/types.py b/v4-client-py/v4_client_py/chain/common/types.py similarity index 100% rename from v4-client-py/dydx4/chain/common/types.py rename to v4-client-py/v4_client_py/chain/common/types.py diff --git a/v4-client-py/dydx4/chain/common/utils.py b/v4-client-py/v4_client_py/chain/common/utils.py similarity index 100% rename from v4-client-py/dydx4/chain/common/utils.py rename to v4-client-py/v4_client_py/chain/common/utils.py diff --git a/v4-client-py/dydx4/chain/crypto/__init__.py b/v4-client-py/v4_client_py/chain/crypto/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/crypto/__init__.py rename to v4-client-py/v4_client_py/chain/crypto/__init__.py diff --git a/v4-client-py/dydx4/chain/crypto/address.py b/v4-client-py/v4_client_py/chain/crypto/address.py similarity index 100% rename from v4-client-py/dydx4/chain/crypto/address.py rename to v4-client-py/v4_client_py/chain/crypto/address.py diff --git a/v4-client-py/dydx4/chain/crypto/hashfuncs.py b/v4-client-py/v4_client_py/chain/crypto/hashfuncs.py similarity index 100% rename from v4-client-py/dydx4/chain/crypto/hashfuncs.py rename to v4-client-py/v4_client_py/chain/crypto/hashfuncs.py diff --git a/v4-client-py/dydx4/chain/crypto/interface.py b/v4-client-py/v4_client_py/chain/crypto/interface.py similarity index 100% rename from v4-client-py/dydx4/chain/crypto/interface.py rename to v4-client-py/v4_client_py/chain/crypto/interface.py diff --git a/v4-client-py/dydx4/chain/crypto/keypairs.py b/v4-client-py/v4_client_py/chain/crypto/keypairs.py similarity index 100% rename from v4-client-py/dydx4/chain/crypto/keypairs.py rename to v4-client-py/v4_client_py/chain/crypto/keypairs.py diff --git a/v4-client-py/dydx4/chain/crypto/keypairs_bls.py b/v4-client-py/v4_client_py/chain/crypto/keypairs_bls.py similarity index 100% rename from v4-client-py/dydx4/chain/crypto/keypairs_bls.py rename to v4-client-py/v4_client_py/chain/crypto/keypairs_bls.py diff --git a/v4-client-py/dydx4/chain/distribution/__init__.py b/v4-client-py/v4_client_py/chain/distribution/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/distribution/__init__.py rename to v4-client-py/v4_client_py/chain/distribution/__init__.py diff --git a/v4-client-py/dydx4/chain/distribution/interface.py b/v4-client-py/v4_client_py/chain/distribution/interface.py similarity index 98% rename from v4-client-py/dydx4/chain/distribution/interface.py rename to v4-client-py/v4_client_py/chain/distribution/interface.py index 1231da47..324e4544 100644 --- a/v4-client-py/dydx4/chain/distribution/interface.py +++ b/v4-client-py/v4_client_py/chain/distribution/interface.py @@ -21,7 +21,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.distribution.v1beta1.query_pb2 import ( +from v4_proto.cosmos.distribution.v1beta1.query_pb2 import ( QueryCommunityPoolResponse, QueryDelegationRewardsRequest, QueryDelegationRewardsResponse, diff --git a/v4-client-py/dydx4/chain/distribution/rest_client.py b/v4-client-py/v4_client_py/chain/distribution/rest_client.py similarity index 99% rename from v4-client-py/dydx4/chain/distribution/rest_client.py rename to v4-client-py/v4_client_py/chain/distribution/rest_client.py index 3c6e4e05..15f06159 100644 --- a/v4-client-py/dydx4/chain/distribution/rest_client.py +++ b/v4-client-py/v4_client_py/chain/distribution/rest_client.py @@ -21,7 +21,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.distribution.v1beta1.query_pb2 import ( +from v4_proto.cosmos.distribution.v1beta1.query_pb2 import ( QueryCommunityPoolResponse, QueryDelegationRewardsRequest, QueryDelegationRewardsResponse, diff --git a/v4-client-py/dydx4/chain/evidence/__init__.py b/v4-client-py/v4_client_py/chain/evidence/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/evidence/__init__.py rename to v4-client-py/v4_client_py/chain/evidence/__init__.py diff --git a/v4-client-py/dydx4/chain/evidence/interface.py b/v4-client-py/v4_client_py/chain/evidence/interface.py similarity index 96% rename from v4-client-py/dydx4/chain/evidence/interface.py rename to v4-client-py/v4_client_py/chain/evidence/interface.py index a1a436b6..39af274d 100644 --- a/v4-client-py/dydx4/chain/evidence/interface.py +++ b/v4-client-py/v4_client_py/chain/evidence/interface.py @@ -20,7 +20,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.evidence.v1beta1.query_pb2 import ( +from v4_proto.cosmos.evidence.v1beta1.query_pb2 import ( QueryAllEvidenceRequest, QueryAllEvidenceResponse, QueryEvidenceRequest, diff --git a/v4-client-py/dydx4/chain/evidence/rest_client.py b/v4-client-py/v4_client_py/chain/evidence/rest_client.py similarity index 97% rename from v4-client-py/dydx4/chain/evidence/rest_client.py rename to v4-client-py/v4_client_py/chain/evidence/rest_client.py index 050ad0c9..a62b7889 100644 --- a/v4-client-py/dydx4/chain/evidence/rest_client.py +++ b/v4-client-py/v4_client_py/chain/evidence/rest_client.py @@ -21,7 +21,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.evidence.v1beta1.query_pb2 import ( +from v4_proto.cosmos.evidence.v1beta1.query_pb2 import ( QueryAllEvidenceRequest, QueryAllEvidenceResponse, QueryEvidenceRequest, diff --git a/v4-client-py/dydx4/chain/gov/__init__.py b/v4-client-py/v4_client_py/chain/gov/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/gov/__init__.py rename to v4-client-py/v4_client_py/chain/gov/__init__.py diff --git a/v4-client-py/dydx4/chain/gov/interface.py b/v4-client-py/v4_client_py/chain/gov/interface.py similarity index 98% rename from v4-client-py/dydx4/chain/gov/interface.py rename to v4-client-py/v4_client_py/chain/gov/interface.py index cf685c73..487fff87 100644 --- a/v4-client-py/dydx4/chain/gov/interface.py +++ b/v4-client-py/v4_client_py/chain/gov/interface.py @@ -20,7 +20,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.gov.v1beta1.query_pb2 import ( +from v4_proto.cosmos.gov.v1beta1.query_pb2 import ( QueryDepositRequest, QueryDepositResponse, QueryDepositsRequest, diff --git a/v4-client-py/dydx4/chain/gov/rest_client.py b/v4-client-py/v4_client_py/chain/gov/rest_client.py similarity index 98% rename from v4-client-py/dydx4/chain/gov/rest_client.py rename to v4-client-py/v4_client_py/chain/gov/rest_client.py index 3c1d6c25..d159b833 100644 --- a/v4-client-py/dydx4/chain/gov/rest_client.py +++ b/v4-client-py/v4_client_py/chain/gov/rest_client.py @@ -20,7 +20,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.gov.v1beta1.query_pb2 import ( +from v4_proto.cosmos.gov.v1beta1.query_pb2 import ( QueryDepositRequest, QueryDepositResponse, QueryDepositsRequest, diff --git a/v4-client-py/dydx4/chain/mint/__init__.py b/v4-client-py/v4_client_py/chain/mint/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/mint/__init__.py rename to v4-client-py/v4_client_py/chain/mint/__init__.py diff --git a/v4-client-py/dydx4/chain/mint/interface.py b/v4-client-py/v4_client_py/chain/mint/interface.py similarity index 96% rename from v4-client-py/dydx4/chain/mint/interface.py rename to v4-client-py/v4_client_py/chain/mint/interface.py index e7d7622d..2d0499f6 100644 --- a/v4-client-py/dydx4/chain/mint/interface.py +++ b/v4-client-py/v4_client_py/chain/mint/interface.py @@ -21,7 +21,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.mint.v1beta1.query_pb2 import ( +from v4_proto.cosmos.mint.v1beta1.query_pb2 import ( QueryAnnualProvisionsResponse, QueryInflationResponse, QueryParamsResponse, diff --git a/v4-client-py/dydx4/chain/mint/rest_client.py b/v4-client-py/v4_client_py/chain/mint/rest_client.py similarity index 98% rename from v4-client-py/dydx4/chain/mint/rest_client.py rename to v4-client-py/v4_client_py/chain/mint/rest_client.py index c14e75dd..682db225 100644 --- a/v4-client-py/dydx4/chain/mint/rest_client.py +++ b/v4-client-py/v4_client_py/chain/mint/rest_client.py @@ -24,7 +24,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.mint.v1beta1.query_pb2 import ( +from v4_proto.cosmos.mint.v1beta1.query_pb2 import ( QueryAnnualProvisionsResponse, QueryInflationResponse, QueryParamsResponse, diff --git a/v4-client-py/dydx4/chain/params/__init__.py b/v4-client-py/v4_client_py/chain/params/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/params/__init__.py rename to v4-client-py/v4_client_py/chain/params/__init__.py diff --git a/v4-client-py/dydx4/chain/params/interface.py b/v4-client-py/v4_client_py/chain/params/interface.py similarity index 95% rename from v4-client-py/dydx4/chain/params/interface.py rename to v4-client-py/v4_client_py/chain/params/interface.py index 97ad8c52..96535c33 100644 --- a/v4-client-py/dydx4/chain/params/interface.py +++ b/v4-client-py/v4_client_py/chain/params/interface.py @@ -21,7 +21,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.params.v1beta1.query_pb2 import ( +from v4_proto.cosmos.params.v1beta1.query_pb2 import ( QueryParamsRequest, QueryParamsResponse, ) diff --git a/v4-client-py/dydx4/chain/params/rest_client.py b/v4-client-py/v4_client_py/chain/params/rest_client.py similarity index 96% rename from v4-client-py/dydx4/chain/params/rest_client.py rename to v4-client-py/v4_client_py/chain/params/rest_client.py index c3dd36fd..929f7013 100644 --- a/v4-client-py/dydx4/chain/params/rest_client.py +++ b/v4-client-py/v4_client_py/chain/params/rest_client.py @@ -21,7 +21,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.params.v1beta1.query_pb2 import ( +from v4_proto.cosmos.params.v1beta1.query_pb2 import ( QueryParamsRequest, QueryParamsResponse, ) diff --git a/v4-client-py/dydx4/chain/slashing/__init__.py b/v4-client-py/v4_client_py/chain/slashing/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/slashing/__init__.py rename to v4-client-py/v4_client_py/chain/slashing/__init__.py diff --git a/v4-client-py/dydx4/chain/slashing/interface.py b/v4-client-py/v4_client_py/chain/slashing/interface.py similarity index 96% rename from v4-client-py/dydx4/chain/slashing/interface.py rename to v4-client-py/v4_client_py/chain/slashing/interface.py index 2bb759fb..1cabdcdc 100644 --- a/v4-client-py/dydx4/chain/slashing/interface.py +++ b/v4-client-py/v4_client_py/chain/slashing/interface.py @@ -20,7 +20,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.slashing.v1beta1.query_pb2 import ( +from v4_proto.cosmos.slashing.v1beta1.query_pb2 import ( QueryParamsResponse, QuerySigningInfoRequest, QuerySigningInfoResponse, diff --git a/v4-client-py/dydx4/chain/slashing/rest_client.py b/v4-client-py/v4_client_py/chain/slashing/rest_client.py similarity index 97% rename from v4-client-py/dydx4/chain/slashing/rest_client.py rename to v4-client-py/v4_client_py/chain/slashing/rest_client.py index ceac63c0..00cab1cf 100644 --- a/v4-client-py/dydx4/chain/slashing/rest_client.py +++ b/v4-client-py/v4_client_py/chain/slashing/rest_client.py @@ -20,7 +20,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.slashing.v1beta1.query_pb2 import ( +from v4_proto.cosmos.slashing.v1beta1.query_pb2 import ( QueryParamsResponse, QuerySigningInfoRequest, QuerySigningInfoResponse, diff --git a/v4-client-py/dydx4/chain/staking/__init__.py b/v4-client-py/v4_client_py/chain/staking/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/staking/__init__.py rename to v4-client-py/v4_client_py/chain/staking/__init__.py diff --git a/v4-client-py/dydx4/chain/staking/interface.py b/v4-client-py/v4_client_py/chain/staking/interface.py similarity index 99% rename from v4-client-py/dydx4/chain/staking/interface.py rename to v4-client-py/v4_client_py/chain/staking/interface.py index f68e292d..662b0454 100644 --- a/v4-client-py/dydx4/chain/staking/interface.py +++ b/v4-client-py/v4_client_py/chain/staking/interface.py @@ -21,7 +21,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.staking.v1beta1.query_pb2 import ( +from v4_proto.cosmos.staking.v1beta1.query_pb2 import ( QueryDelegationRequest, QueryDelegationResponse, QueryDelegatorDelegationsRequest, diff --git a/v4-client-py/dydx4/chain/staking/rest_client.py b/v4-client-py/v4_client_py/chain/staking/rest_client.py similarity index 99% rename from v4-client-py/dydx4/chain/staking/rest_client.py rename to v4-client-py/v4_client_py/chain/staking/rest_client.py index ef5b9181..9c42c79e 100644 --- a/v4-client-py/dydx4/chain/staking/rest_client.py +++ b/v4-client-py/v4_client_py/chain/staking/rest_client.py @@ -21,7 +21,7 @@ from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.staking.v1beta1.query_pb2 import ( +from v4_proto.cosmos.staking.v1beta1.query_pb2 import ( QueryDelegationRequest, QueryDelegationResponse, QueryDelegatorDelegationsRequest, diff --git a/v4-client-py/dydx4/chain/tendermint/__init__.py b/v4-client-py/v4_client_py/chain/tendermint/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/tendermint/__init__.py rename to v4-client-py/v4_client_py/chain/tendermint/__init__.py diff --git a/v4-client-py/dydx4/chain/tendermint/interface.py b/v4-client-py/v4_client_py/chain/tendermint/interface.py similarity index 97% rename from v4-client-py/dydx4/chain/tendermint/interface.py rename to v4-client-py/v4_client_py/chain/tendermint/interface.py index 9daff282..84e205d8 100644 --- a/v4-client-py/dydx4/chain/tendermint/interface.py +++ b/v4-client-py/v4_client_py/chain/tendermint/interface.py @@ -20,7 +20,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.base.tendermint.v1beta1.query_pb2 import ( +from v4_proto.cosmos.base.tendermint.v1beta1.query_pb2 import ( GetBlockByHeightRequest, GetBlockByHeightResponse, GetLatestBlockRequest, diff --git a/v4-client-py/dydx4/chain/tendermint/rest_client.py b/v4-client-py/v4_client_py/chain/tendermint/rest_client.py similarity index 98% rename from v4-client-py/dydx4/chain/tendermint/rest_client.py rename to v4-client-py/v4_client_py/chain/tendermint/rest_client.py index 85473e02..d3500b20 100644 --- a/v4-client-py/dydx4/chain/tendermint/rest_client.py +++ b/v4-client-py/v4_client_py/chain/tendermint/rest_client.py @@ -19,7 +19,7 @@ """Implementation of IBC Applications Transfer interface using REST.""" from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.base.tendermint.v1beta1.query_pb2 import ( +from v4_proto.cosmos.base.tendermint.v1beta1.query_pb2 import ( GetBlockByHeightRequest, GetBlockByHeightResponse, GetLatestBlockRequest, diff --git a/v4-client-py/dydx4/chain/tx/__init__.py b/v4-client-py/v4_client_py/chain/tx/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/tx/__init__.py rename to v4-client-py/v4_client_py/chain/tx/__init__.py diff --git a/v4-client-py/dydx4/chain/tx/interface.py b/v4-client-py/v4_client_py/chain/tx/interface.py similarity index 97% rename from v4-client-py/dydx4/chain/tx/interface.py rename to v4-client-py/v4_client_py/chain/tx/interface.py index 9ec1c64e..d46f5d18 100644 --- a/v4-client-py/dydx4/chain/tx/interface.py +++ b/v4-client-py/v4_client_py/chain/tx/interface.py @@ -21,7 +21,7 @@ from abc import ABC, abstractmethod -import dydxpy.proto.cosmos.tx.v1beta1.service_pb2 as svc +import v4_proto.cosmos.tx.v1beta1.service_pb2 as svc class TxInterface(ABC): diff --git a/v4-client-py/dydx4/chain/tx/rest_client.py b/v4-client-py/v4_client_py/chain/tx/rest_client.py similarity index 95% rename from v4-client-py/dydx4/chain/tx/rest_client.py rename to v4-client-py/v4_client_py/chain/tx/rest_client.py index a62a8c6f..8c3cdd72 100644 --- a/v4-client-py/dydx4/chain/tx/rest_client.py +++ b/v4-client-py/v4_client_py/chain/tx/rest_client.py @@ -25,10 +25,10 @@ from google.protobuf.json_format import Parse, ParseDict -from dydxpy.proto.cosmos.crypto.secp256k1.keys_pb2 import ( # noqa: F401 # pylint: disable=unused-import +from v4_proto.cosmos.crypto.secp256k1.keys_pb2 import ( # noqa: F401 # pylint: disable=unused-import PubKey as ProtoPubKey, ) -from dydxpy.proto.cosmos.tx.v1beta1.service_pb2 import ( +from v4_proto.cosmos.tx.v1beta1.service_pb2 import ( BroadcastTxRequest, BroadcastTxResponse, GetTxRequest, diff --git a/v4-client-py/dydx4/chain/upgrade/__init__.py b/v4-client-py/v4_client_py/chain/upgrade/__init__.py similarity index 100% rename from v4-client-py/dydx4/chain/upgrade/__init__.py rename to v4-client-py/v4_client_py/chain/upgrade/__init__.py diff --git a/v4-client-py/dydx4/chain/upgrade/interface.py b/v4-client-py/v4_client_py/chain/upgrade/interface.py similarity index 96% rename from v4-client-py/dydx4/chain/upgrade/interface.py rename to v4-client-py/v4_client_py/chain/upgrade/interface.py index a3b5f529..972caf8f 100644 --- a/v4-client-py/dydx4/chain/upgrade/interface.py +++ b/v4-client-py/v4_client_py/chain/upgrade/interface.py @@ -20,7 +20,7 @@ from abc import ABC, abstractmethod -from dydxpy.proto.cosmos.upgrade.v1beta1.query_pb2 import ( +from v4_proto.cosmos.upgrade.v1beta1.query_pb2 import ( QueryAppliedPlanRequest, QueryAppliedPlanResponse, QueryCurrentPlanRequest, diff --git a/v4-client-py/dydx4/chain/upgrade/rest_client.py b/v4-client-py/v4_client_py/chain/upgrade/rest_client.py similarity index 97% rename from v4-client-py/dydx4/chain/upgrade/rest_client.py rename to v4-client-py/v4_client_py/chain/upgrade/rest_client.py index 30de06ff..ce0a934a 100644 --- a/v4-client-py/dydx4/chain/upgrade/rest_client.py +++ b/v4-client-py/v4_client_py/chain/upgrade/rest_client.py @@ -19,7 +19,7 @@ """Implementation of IBC Applications Transfer interface using REST.""" from google.protobuf.json_format import Parse -from dydxpy.proto.cosmos.upgrade.v1beta1.query_pb2 import ( +from v4_proto.cosmos.upgrade.v1beta1.query_pb2 import ( QueryAppliedPlanRequest, QueryAppliedPlanResponse, QueryCurrentPlanRequest, diff --git a/v4-client-py/dydx4/clients/__init__.py b/v4-client-py/v4_client_py/clients/__init__.py similarity index 100% rename from v4-client-py/dydx4/clients/__init__.py rename to v4-client-py/v4_client_py/clients/__init__.py diff --git a/v4-client-py/dydx4/clients/composer.py b/v4-client-py/v4_client_py/clients/composer.py similarity index 93% rename from v4-client-py/dydx4/clients/composer.py rename to v4-client-py/v4_client_py/clients/composer.py index 0dcdf5bb..2b5f4e49 100644 --- a/v4-client-py/dydx4/clients/composer.py +++ b/v4-client-py/v4_client_py/clients/composer.py @@ -1,10 +1,10 @@ -from dydxpy.proto.dydxprotocol.clob.tx_pb2 import MsgPlaceOrder, MsgCancelOrder -from dydxpy.proto.dydxprotocol.clob.order_pb2 import Order, OrderId -from dydxpy.proto.dydxprotocol.subaccounts.subaccount_pb2 import SubaccountId -from dydxpy.proto.dydxprotocol.sending.transfer_pb2 import Transfer, MsgWithdrawFromSubaccount, MsgDepositToSubaccount -from dydxpy.proto.dydxprotocol.sending.tx_pb2 import MsgCreateTransfer +from v4_proto.dydxprotocol.clob.tx_pb2 import MsgPlaceOrder, MsgCancelOrder +from v4_proto.dydxprotocol.clob.order_pb2 import Order, OrderId +from v4_proto.dydxprotocol.subaccounts.subaccount_pb2 import SubaccountId +from v4_proto.dydxprotocol.sending.transfer_pb2 import Transfer, MsgWithdrawFromSubaccount, MsgDepositToSubaccount +from v4_proto.dydxprotocol.sending.tx_pb2 import MsgCreateTransfer class Composer: diff --git a/v4-client-py/dydx4/clients/constants.py b/v4-client-py/v4_client_py/clients/constants.py similarity index 100% rename from v4-client-py/dydx4/clients/constants.py rename to v4-client-py/v4_client_py/clients/constants.py diff --git a/v4-client-py/dydx4/clients/dydx_composite_client.py b/v4-client-py/v4_client_py/clients/dydx_composite_client.py similarity index 96% rename from v4-client-py/dydx4/clients/dydx_composite_client.py rename to v4-client-py/v4_client_py/clients/dydx_composite_client.py index f2d1b3a6..ccfaffa7 100644 --- a/v4-client-py/dydx4/clients/dydx_composite_client.py +++ b/v4-client-py/v4_client_py/clients/dydx_composite_client.py @@ -2,8 +2,8 @@ from datetime import datetime, timedelta -from dydxpy.proto.dydxprotocol.clob.tx_pb2 import MsgPlaceOrder -from dydx4.clients.helpers.chain_helpers import ( +from v4_proto.dydxprotocol.clob.tx_pb2 import MsgPlaceOrder +from v4_client_py.clients.helpers.chain_helpers import ( QUOTE_QUANTUMS_ATOMIC_RESOLUTION, Order, OrderType, @@ -20,12 +20,12 @@ ORDER_FLAGS_CONDITIONAL, ) -from dydx4.clients.constants import Network -from dydx4.clients.dydx_indexer_client import IndexerClient -from dydx4.clients.dydx_validator_client import ValidatorClient -from dydx4.clients.dydx_subaccount import Subaccount +from v4_client_py.clients.constants import Network +from v4_client_py.clients.dydx_indexer_client import IndexerClient +from v4_client_py.clients.dydx_validator_client import ValidatorClient +from v4_client_py.clients.dydx_subaccount import Subaccount -from dydx4.chain.aerial.tx_helpers import SubmittedTx +from v4_client_py.chain.aerial.tx_helpers import SubmittedTx class CompositeClient: diff --git a/v4-client-py/dydx4/clients/dydx_faucet_client.py b/v4-client-py/v4_client_py/clients/dydx_faucet_client.py similarity index 100% rename from v4-client-py/dydx4/clients/dydx_faucet_client.py rename to v4-client-py/v4_client_py/clients/dydx_faucet_client.py diff --git a/v4-client-py/dydx4/clients/dydx_indexer_client.py b/v4-client-py/v4_client_py/clients/dydx_indexer_client.py similarity index 100% rename from v4-client-py/dydx4/clients/dydx_indexer_client.py rename to v4-client-py/v4_client_py/clients/dydx_indexer_client.py diff --git a/v4-client-py/dydx4/clients/dydx_socket_client.py b/v4-client-py/v4_client_py/clients/dydx_socket_client.py similarity index 100% rename from v4-client-py/dydx4/clients/dydx_socket_client.py rename to v4-client-py/v4_client_py/clients/dydx_socket_client.py diff --git a/v4-client-py/dydx4/clients/dydx_subaccount.py b/v4-client-py/v4_client_py/clients/dydx_subaccount.py similarity index 85% rename from v4-client-py/dydx4/clients/dydx_subaccount.py rename to v4-client-py/v4_client_py/clients/dydx_subaccount.py index d9c70a16..d13dc275 100644 --- a/v4-client-py/dydx4/clients/dydx_subaccount.py +++ b/v4-client-py/v4_client_py/clients/dydx_subaccount.py @@ -1,6 +1,6 @@ -from dydx4.chain.aerial.wallet import LocalWallet -from dydx4.clients.constants import BECH32_PREFIX +from v4_client_py.chain.aerial.wallet import LocalWallet +from v4_client_py.clients.constants import BECH32_PREFIX class Subaccount: def __init__( diff --git a/v4-client-py/dydx4/clients/dydx_validator_client.py b/v4-client-py/v4_client_py/clients/dydx_validator_client.py similarity index 100% rename from v4-client-py/dydx4/clients/dydx_validator_client.py rename to v4-client-py/v4_client_py/clients/dydx_validator_client.py diff --git a/v4-client-py/dydx4/clients/errors.py b/v4-client-py/v4_client_py/clients/errors.py similarity index 100% rename from v4-client-py/dydx4/clients/errors.py rename to v4-client-py/v4_client_py/clients/errors.py diff --git a/v4-client-py/dydx4/clients/helpers/__init__.py b/v4-client-py/v4_client_py/clients/helpers/__init__.py similarity index 100% rename from v4-client-py/dydx4/clients/helpers/__init__.py rename to v4-client-py/v4_client_py/clients/helpers/__init__.py diff --git a/v4-client-py/dydx4/clients/helpers/chain_helpers.py b/v4-client-py/v4_client_py/clients/helpers/chain_helpers.py similarity index 98% rename from v4-client-py/dydx4/clients/helpers/chain_helpers.py rename to v4-client-py/v4_client_py/clients/helpers/chain_helpers.py index 0ab6b824..7eb0fdeb 100644 --- a/v4-client-py/dydx4/clients/helpers/chain_helpers.py +++ b/v4-client-py/v4_client_py/clients/helpers/chain_helpers.py @@ -1,6 +1,6 @@ from enum import Flag, auto -from dydxpy.proto.dydxprotocol.clob.order_pb2 import Order +from v4_proto.dydxprotocol.clob.order_pb2 import Order class OrderType(Flag): MARKET = auto() diff --git a/v4-client-py/dydx4/clients/helpers/request_helpers.py b/v4-client-py/v4_client_py/clients/helpers/request_helpers.py similarity index 100% rename from v4-client-py/dydx4/clients/helpers/request_helpers.py rename to v4-client-py/v4_client_py/clients/helpers/request_helpers.py diff --git a/v4-client-py/dydx4/clients/helpers/requests.py b/v4-client-py/v4_client_py/clients/helpers/requests.py similarity index 100% rename from v4-client-py/dydx4/clients/helpers/requests.py rename to v4-client-py/v4_client_py/clients/helpers/requests.py diff --git a/v4-client-py/dydx4/clients/modules/__init__.py b/v4-client-py/v4_client_py/clients/modules/__init__.py similarity index 100% rename from v4-client-py/dydx4/clients/modules/__init__.py rename to v4-client-py/v4_client_py/clients/modules/__init__.py diff --git a/v4-client-py/dydx4/clients/modules/account.py b/v4-client-py/v4_client_py/clients/modules/account.py similarity index 100% rename from v4-client-py/dydx4/clients/modules/account.py rename to v4-client-py/v4_client_py/clients/modules/account.py diff --git a/v4-client-py/dydx4/clients/modules/get.py b/v4-client-py/v4_client_py/clients/modules/get.py similarity index 83% rename from v4-client-py/dydx4/clients/modules/get.py rename to v4-client-py/v4_client_py/clients/modules/get.py index eb2fdeb3..8ae62561 100644 --- a/v4-client-py/dydx4/clients/modules/get.py +++ b/v4-client-py/v4_client_py/clients/modules/get.py @@ -6,69 +6,69 @@ from ..constants import ValidatorConfig -from dydxpy.proto.dydxprotocol.clob.order_pb2 import * -from dydxpy.proto.dydxprotocol.clob.tx_pb2 import * -from dydxpy.proto.dydxprotocol.clob.query_pb2 import * +from v4_proto.dydxprotocol.clob.order_pb2 import * +from v4_proto.dydxprotocol.clob.tx_pb2 import * +from v4_proto.dydxprotocol.clob.query_pb2 import * -from dydxpy.proto.dydxprotocol.subaccounts.subaccount_pb2 import * -from dydxpy.proto.dydxprotocol.subaccounts.query_pb2 import * +from v4_proto.dydxprotocol.subaccounts.subaccount_pb2 import * +from v4_proto.dydxprotocol.subaccounts.query_pb2 import * -from dydxpy.proto.dydxprotocol.sending.transfer_pb2 import * -from dydxpy.proto.dydxprotocol.sending.tx_pb2 import * +from v4_proto.dydxprotocol.sending.transfer_pb2 import * +from v4_proto.dydxprotocol.sending.tx_pb2 import * -from dydxpy.proto.dydxprotocol.assets.genesis_pb2 import * -from dydxpy.proto.dydxprotocol.assets.query_pb2 import * -from dydxpy.proto.dydxprotocol.assets.asset_pb2 import * +from v4_proto.dydxprotocol.assets.genesis_pb2 import * +from v4_proto.dydxprotocol.assets.query_pb2 import * +from v4_proto.dydxprotocol.assets.asset_pb2 import * -from dydxpy.proto.dydxprotocol.perpetuals.query_pb2 import * -from dydxpy.proto.dydxprotocol.perpetuals.perpetual_pb2 import * +from v4_proto.dydxprotocol.perpetuals.query_pb2 import * +from v4_proto.dydxprotocol.perpetuals.perpetual_pb2 import * -from dydxpy.proto.dydxprotocol.prices.query_pb2 import * -from dydxpy.proto.dydxprotocol.prices.market_price_pb2 import * +from v4_proto.dydxprotocol.prices.query_pb2 import * +from v4_proto.dydxprotocol.prices.market_price_pb2 import * -from dydxpy.proto.cosmos.base.tendermint.v1beta1 import ( +from v4_proto.cosmos.base.tendermint.v1beta1 import ( query_pb2_grpc as tendermint_query_grpc, query_pb2 as tendermint_query, ) -from dydxpy.proto.cosmos.auth.v1beta1 import ( +from v4_proto.cosmos.auth.v1beta1 import ( query_pb2_grpc as auth_query_grpc, query_pb2 as auth_query, auth_pb2 as auth_type, ) -from dydxpy.proto.cosmos.authz.v1beta1 import ( +from v4_proto.cosmos.authz.v1beta1 import ( query_pb2_grpc as authz_query_grpc, ) -from dydxpy.proto.cosmos.bank.v1beta1 import ( +from v4_proto.cosmos.bank.v1beta1 import ( query_pb2_grpc as bank_query_grpc, query_pb2 as bank_query, ) -from dydxpy.proto.cosmos.tx.v1beta1 import ( +from v4_proto.cosmos.tx.v1beta1 import ( service_pb2_grpc as tx_service_grpc, service_pb2 as tx_service, ) -from dydxpy.proto.dydxprotocol.subaccounts import ( +from v4_proto.dydxprotocol.subaccounts import ( query_pb2_grpc as subaccounts_query_grpc, subaccount_pb2 as subaccount_type, ) -from dydxpy.proto.dydxprotocol.assets import ( +from v4_proto.dydxprotocol.assets import ( query_pb2_grpc as assets_query_grpc, ) -from dydxpy.proto.dydxprotocol.perpetuals import ( +from v4_proto.dydxprotocol.perpetuals import ( query_pb2_grpc as perpetuals_query_grpc, ) -from dydxpy.proto.dydxprotocol.prices import ( +from v4_proto.dydxprotocol.prices import ( query_pb2_grpc as prices_query_grpc, market_price_pb2 as market_price_type, ) -from dydxpy.proto.dydxprotocol.clob import ( +from v4_proto.dydxprotocol.clob import ( query_pb2_grpc as clob_query_grpc, query_pb2 as clob_query, clob_pair_pb2 as clob_pair_type, diff --git a/v4-client-py/dydx4/clients/modules/markets.py b/v4-client-py/v4_client_py/clients/modules/markets.py similarity index 100% rename from v4-client-py/dydx4/clients/modules/markets.py rename to v4-client-py/v4_client_py/clients/modules/markets.py diff --git a/v4-client-py/dydx4/clients/modules/post.py b/v4-client-py/v4_client_py/clients/modules/post.py similarity index 97% rename from v4-client-py/dydx4/clients/modules/post.py rename to v4-client-py/v4_client_py/clients/modules/post.py index 75db877b..fff67069 100644 --- a/v4-client-py/dydx4/clients/modules/post.py +++ b/v4-client-py/v4_client_py/clients/modules/post.py @@ -1,9 +1,9 @@ from google.protobuf import message as _message -from dydxpy.proto.dydxprotocol.clob.tx_pb2 import MsgPlaceOrder -from dydxpy.proto.dydxprotocol.clob.order_pb2 import Order +from v4_proto.dydxprotocol.clob.tx_pb2 import MsgPlaceOrder +from v4_proto.dydxprotocol.clob.order_pb2 import Order -from dydx4.clients.helpers.chain_helpers import ORDER_FLAGS_LONG_TERM, ORDER_FLAGS_SHORT_TERM +from v4_client_py.clients.helpers.chain_helpers import ORDER_FLAGS_LONG_TERM, ORDER_FLAGS_SHORT_TERM from ..constants import BroadcastMode, ValidatorConfig from ..composer import Composer