diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 236987c4..68bce37a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: python: ["3.9", "3.10", "3.11"] - os: [ubuntu-latest, macos-13, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} env: OS: ${{ matrix.os }} @@ -22,8 +22,13 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Set ARCHFLAGS for macOS + if: runner.os == 'macOS' + run: echo "ARCHFLAGS=-arch arm64" >> $GITHUB_ENV + - name: Install poetry run: python -m pip install poetry + - name: Cache the virtualenv id: cache-venv uses: actions/cache@v4 @@ -37,7 +42,7 @@ jobs: - name: Run tests and Generate coverage run: | - poetry run pytest --cov --cov-report=xml + poetry run pytest --cov --cov-report=xml -v --full-trace - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 diff --git a/examples/exchange_client/explorer_rpc/11_GetContractsTxsV2.py b/examples/exchange_client/explorer_rpc/11_GetContractsTxsV2.py new file mode 100644 index 00000000..22f01844 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/11_GetContractsTxsV2.py @@ -0,0 +1,47 @@ +import asyncio +import time + +from pyinjective.async_client import AsyncClient +from pyinjective.client.model.pagination import PaginationOption +from pyinjective.core.network import Network + + +async def main() -> None: + # Select network: local, testnet, mainnet, or custom + network = Network.testnet() + + # Initialize client + client = AsyncClient(network) + + try: + # Example parameters for fetching contract transactions + address = "inj1ady3s7whq30l4fx8sj3x6muv5mx4dfdlcpv8n7" # Replace with actual contract address + + # Optional pagination and filtering parameters + pagination = PaginationOption( + limit=10, + start_time=int((time.time() - 100) * 1000), + end_time=int(time.time() * 1000), + ) + + # Fetch contract transactions V2 + response = await client.fetch_contract_txs_v2(address=address, height=60_000_000, pagination=pagination) + + # Print the results + print("Contract Transactions V2:") + print("Total Transactions:", len(response["data"])) + + for tx in response["data"]: + print("\nTransaction Details:") + print("ID:", tx["id"]) + print("Block Number:", tx["blockNumber"]) + print("Timestamp:", tx["blockTimestamp"]) + print("Hash:", tx["hash"]) + print("Tx Number:", tx["txNumber"]) + + except Exception as e: + print(f"Error occurred: {e}") + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/12_GetValidators.py b/examples/exchange_client/explorer_rpc/12_GetValidators.py new file mode 100644 index 00000000..fcaf0f8d --- /dev/null +++ b/examples/exchange_client/explorer_rpc/12_GetValidators.py @@ -0,0 +1,27 @@ +import asyncio + +from pyinjective.async_client import AsyncClient +from pyinjective.core.network import Network + + +async def main(): + # Select network: choose between testnet, mainnet, or local + network = Network.testnet() + + # Initialize AsyncClient + client = AsyncClient(network) + + try: + # Fetch validators + validators = await client.fetch_validators() + + # Print validators + print("Validators:") + print(validators) + + except Exception as e: + print(f"Error: {e}") + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/13_GetValidator.py b/examples/exchange_client/explorer_rpc/13_GetValidator.py new file mode 100644 index 00000000..2adac7d7 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/13_GetValidator.py @@ -0,0 +1,28 @@ +import asyncio + +from pyinjective.async_client import AsyncClient +from pyinjective.core.network import Network + + +async def main(): + # Select network: choose between testnet, mainnet, or local + network = Network.testnet() + + # Initialize AsyncClient + client = AsyncClient(network) + address = "injvaloper1kk523rsm9pey740cx4plalp40009ncs0wrchfe" + + try: + # Fetch validator + validator = await client.fetch_validator(address=address) + + # Print validators + print("Validator:") + print(validator) + + except Exception as e: + print(f"Error: {e}") + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/14_GetValidatorUptime.py b/examples/exchange_client/explorer_rpc/14_GetValidatorUptime.py new file mode 100644 index 00000000..fc4a1a84 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/14_GetValidatorUptime.py @@ -0,0 +1,28 @@ +import asyncio + +from pyinjective.async_client import AsyncClient +from pyinjective.core.network import Network + + +async def main(): + # Select network: choose between testnet, mainnet, or local + network = Network.testnet() + + # Initialize AsyncClient + client = AsyncClient(network) + address = "injvaloper1kk523rsm9pey740cx4plalp40009ncs0wrchfe" + + try: + # Fetch validator uptime + uptime = await client.fetch_validator_uptime(address=address) + + # Print uptime + print("Validator uptime:") + print(uptime) + + except Exception as e: + print(f"Error: {e}") + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/15_GetWasmCodes.py b/examples/exchange_client/explorer_rpc/15_GetWasmCodes.py new file mode 100644 index 00000000..49c48698 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/15_GetWasmCodes.py @@ -0,0 +1,29 @@ +import asyncio +import logging + +from pyinjective.async_client import AsyncClient +from pyinjective.client.model.pagination import PaginationOption +from pyinjective.core.network import Network + + +async def main() -> None: + # network: Network = Network.testnet() + network: Network = Network.testnet() + client: AsyncClient = AsyncClient(network) + + pagination = PaginationOption( + limit=10, + from_number=1000, + to_number=2000, + ) + + wasm_codes = await client.fetch_wasm_codes( + pagination=pagination, + ) + print("Wasm codes:") + print(wasm_codes) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/16_GetWasmCodeById.py b/examples/exchange_client/explorer_rpc/16_GetWasmCodeById.py new file mode 100644 index 00000000..fc8f3c89 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/16_GetWasmCodeById.py @@ -0,0 +1,24 @@ +import asyncio +import logging + +from pyinjective.async_client import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # network: Network = Network.testnet() + network: Network = Network.testnet() + client: AsyncClient = AsyncClient(network) + + code_id = 2008 + + wasm_code = await client.fetch_wasm_code_by_id( + code_id=code_id, + ) + print("Wasm code:") + print(wasm_code) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/17_GetWasmContracts.py b/examples/exchange_client/explorer_rpc/17_GetWasmContracts.py new file mode 100644 index 00000000..93a46b9e --- /dev/null +++ b/examples/exchange_client/explorer_rpc/17_GetWasmContracts.py @@ -0,0 +1,30 @@ +import asyncio +import logging + +from pyinjective.async_client import AsyncClient +from pyinjective.client.model.pagination import PaginationOption +from pyinjective.core.network import Network + + +async def main() -> None: + # network: Network = Network.testnet() + network: Network = Network.testnet() + client: AsyncClient = AsyncClient(network) + + pagination = PaginationOption( + limit=10, + from_number=1000, + to_number=2000, + ) + + wasm_contracts = await client.fetch_wasm_contracts( + assets_only=True, + pagination=pagination, + ) + print("Wasm contracts:") + print(wasm_contracts) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/18_GetWasmContractByAddress.py b/examples/exchange_client/explorer_rpc/18_GetWasmContractByAddress.py new file mode 100644 index 00000000..fd43d8c7 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/18_GetWasmContractByAddress.py @@ -0,0 +1,22 @@ +import asyncio +import logging + +from pyinjective.async_client import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # network: Network = Network.testnet() + network: Network = Network.testnet() + client: AsyncClient = AsyncClient(network) + + address = "inj1yhz4e7df95908jhs9erl87vdzjkdsc24q7afjf" + + wasm_contract = await client.fetch_wasm_contract_by_address(address=address) + print("Wasm contract:") + print(wasm_contract) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/19_GetCw20Balance.py b/examples/exchange_client/explorer_rpc/19_GetCw20Balance.py new file mode 100644 index 00000000..e2eb64c3 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/19_GetCw20Balance.py @@ -0,0 +1,22 @@ +import asyncio +import logging + +from pyinjective.async_client import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # network: Network = Network.testnet() + network: Network = Network.testnet() + client: AsyncClient = AsyncClient(network) + + address = "inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex" + + balance = await client.fetch_cw20_balance(address=address) + print("Cw20 balance:") + print(balance) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/20_Relayers.py b/examples/exchange_client/explorer_rpc/20_Relayers.py new file mode 100644 index 00000000..ffb21849 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/20_Relayers.py @@ -0,0 +1,27 @@ +import asyncio + +from pyinjective.async_client import AsyncClient +from pyinjective.core.network import Network + + +async def main(): + # Select network: choose between testnet, mainnet, or local + network = Network.testnet() + + # Initialize AsyncClient + client = AsyncClient(network) + + try: + # Fetch relayers + validators = await client.fetch_relayers() + + # Print relayers + print("Relayers:") + print(validators) + + except Exception as e: + print(f"Error: {e}") + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/exchange_client/explorer_rpc/21_GetBankTransfers.py b/examples/exchange_client/explorer_rpc/21_GetBankTransfers.py new file mode 100644 index 00000000..ed1f00b7 --- /dev/null +++ b/examples/exchange_client/explorer_rpc/21_GetBankTransfers.py @@ -0,0 +1,25 @@ +import asyncio +import json +import logging + +from pyinjective.async_client import AsyncClient +from pyinjective.client.model.pagination import PaginationOption +from pyinjective.core.network import Network + + +async def main() -> None: + # network: Network = Network.testnet() + network: Network = Network.testnet() + client: AsyncClient = AsyncClient(network) + + pagination = PaginationOption(limit=5) + senders = ["inj17xpfvakm2amg962yls6f84z3kell8c5l6s5ye9"] + + bank_transfers = await client.fetch_bank_transfers(senders=senders, pagination=pagination) + print("Bank transfers:") + print(json.dumps(bank_transfers, indent=2)) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.get_event_loop().run_until_complete(main()) diff --git a/poetry.lock b/poetry.lock index 13667dc7..75020cb6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -138,6 +138,17 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + [[package]] name = "asn1crypto" version = "1.5.1" @@ -352,33 +363,33 @@ files = [ [[package]] name = "black" -version = "23.12.1" +version = "24.10.0" description = "The uncompromising code formatter." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, - {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, - {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, - {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, - {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, - {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, - {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, - {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, - {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, - {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, - {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, - {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, - {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"}, - {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"}, - {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"}, - {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"}, - {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, - {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, - {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, - {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, - {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, - {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, + {file = "black-24.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6668650ea4b685440857138e5fe40cde4d652633b1bdffc62933d0db4ed9812"}, + {file = "black-24.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1c536fcf674217e87b8cc3657b81809d3c085d7bf3ef262ead700da345bfa6ea"}, + {file = "black-24.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:649fff99a20bd06c6f727d2a27f401331dc0cc861fb69cde910fe95b01b5928f"}, + {file = "black-24.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:fe4d6476887de70546212c99ac9bd803d90b42fc4767f058a0baa895013fbb3e"}, + {file = "black-24.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5a2221696a8224e335c28816a9d331a6c2ae15a2ee34ec857dcf3e45dbfa99ad"}, + {file = "black-24.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f9da3333530dbcecc1be13e69c250ed8dfa67f43c4005fb537bb426e19200d50"}, + {file = "black-24.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4007b1393d902b48b36958a216c20c4482f601569d19ed1df294a496eb366392"}, + {file = "black-24.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:394d4ddc64782e51153eadcaaca95144ac4c35e27ef9b0a42e121ae7e57a9175"}, + {file = "black-24.10.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b5e39e0fae001df40f95bd8cc36b9165c5e2ea88900167bddf258bacef9bbdc3"}, + {file = "black-24.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d37d422772111794b26757c5b55a3eade028aa3fde43121ab7b673d050949d65"}, + {file = "black-24.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:14b3502784f09ce2443830e3133dacf2c0110d45191ed470ecb04d0f5f6fcb0f"}, + {file = "black-24.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:30d2c30dc5139211dda799758559d1b049f7f14c580c409d6ad925b74a4208a8"}, + {file = "black-24.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cbacacb19e922a1d75ef2b6ccaefcd6e93a2c05ede32f06a21386a04cedb981"}, + {file = "black-24.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f93102e0c5bb3907451063e08b9876dbeac810e7da5a8bfb7aeb5a9ef89066b"}, + {file = "black-24.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ddacb691cdcdf77b96f549cf9591701d8db36b2f19519373d60d31746068dbf2"}, + {file = "black-24.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:680359d932801c76d2e9c9068d05c6b107f2584b2a5b88831c83962eb9984c1b"}, + {file = "black-24.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:17374989640fbca88b6a448129cd1745c5eb8d9547b464f281b251dd00155ccd"}, + {file = "black-24.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:63f626344343083322233f175aaf372d326de8436f5928c042639a4afbbf1d3f"}, + {file = "black-24.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfa1d0cb6200857f1923b602f978386a3a2758a65b52e0950299ea014be6800"}, + {file = "black-24.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:2cd9c95431d94adc56600710f8813ee27eea544dd118d45896bb734e9d7a0dc7"}, + {file = "black-24.10.0-py3-none-any.whl", hash = "sha256:3bb2b7a1f7b685f85b11fed1ef10f8a9148bceb49853e47a294a3dd963c1dd7d"}, + {file = "black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875"}, ] [package.dependencies] @@ -392,7 +403,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] +d = ["aiohttp (>=3.10)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -600,96 +611,105 @@ files = [ [[package]] name = "ckzg" -version = "1.0.2" +version = "2.0.1" description = "Python bindings for C-KZG-4844" optional = false python-versions = "*" files = [ - {file = "ckzg-1.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bdd082bc0f2a595e3546658ecbe1ff78fe65b0ab7e619a8197a62d94f46b5b46"}, - {file = "ckzg-1.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:50ca4af4e2f1a1e8b0a7e97b3aef39dedbb0d52d90866ece424f13f8df1b5972"}, - {file = "ckzg-1.0.2-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e9dc671b0a307ea65d0a216ca496c272dd3c1ed890ddc2a306da49b0d8ffc83"}, - {file = "ckzg-1.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d95e97a0d0f7758119bb905fb5688222b1556de465035614883c42fe4a047d1f"}, - {file = "ckzg-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27261672154cbd477d84d289845b0022fbdbe2ba45b7a2a2051c345fa04c8334"}, - {file = "ckzg-1.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c16d5ee1ddbbbad0367ff970b3ec9f6d1879e9f928023beda59ae9e16ad99e4c"}, - {file = "ckzg-1.0.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:09043738b029bdf4fdc82041b395cfc6f5b5cf63435e5d4d685d24fd14c834d3"}, - {file = "ckzg-1.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3c0afa232d2312e3101aaddb6971b486b0038a0f9171500bc23143f5749eff55"}, - {file = "ckzg-1.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:96e8281b6d58cf91b9559e1bd38132161d63467500838753364c68e825df2e2c"}, - {file = "ckzg-1.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b874167de1d6de72890a2ad5bd9aa7adbddc41c3409923b59cf4ef27f83f79da"}, - {file = "ckzg-1.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3d2ccd68b0743e20e853e31a08da490a8d38c7f12b9a0c4ee63ef5afa0dc2427"}, - {file = "ckzg-1.0.2-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e8d534ddbe785c44cf1cd62ee32d78b4310d66dd70e42851f5468af655b81f5"}, - {file = "ckzg-1.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c732cda00c76b326f39ae97edfc6773dd231b7c77288b38282584a7aee77c3a7"}, - {file = "ckzg-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abc5a27284db479ead4c053ff086d6e222914f1b0aa08b80eabfa116dbed4f7a"}, - {file = "ckzg-1.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e6bd5006cb3e802744309450183087a6594d50554814eee19065f7064dff7b05"}, - {file = "ckzg-1.0.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3594470134eda7adf2813ad3f1da55ced98c8a393262f47ce3890c5afa05b23e"}, - {file = "ckzg-1.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fea56f39e48b60c1ff6f751c47489e353d1bd95cae65c429cf5f87735d794431"}, - {file = "ckzg-1.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:f769eb2e1056ca396462460079f6849c778f58884bb24b638ff7028dd2120b65"}, - {file = "ckzg-1.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e3cb2f8c767aee57e88944f90848e8689ce43993b9ff21589cfb97a562208fe7"}, - {file = "ckzg-1.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5b29889f5bc5db530f766871c0ff4133e7270ecf63aaa3ca756d3b2731980802"}, - {file = "ckzg-1.0.2-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfcc70fb76b3d36125d646110d5001f2aa89c1c09ff5537a4550cdb7951f44d4"}, - {file = "ckzg-1.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ca8a256cdd56d06bc5ef24caac64845240dbabca402c5a1966d519b2514b4ec"}, - {file = "ckzg-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ea91b0236384f93ad1df01d530672f09e254bd8c3cf097ebf486aebb97f6c8c"}, - {file = "ckzg-1.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:65311e72780105f239d1d66512629a9f468b7c9f2609b8567fc68963ac638ef9"}, - {file = "ckzg-1.0.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:0d7600ce7a73ac41d348712d0c1fe5e4cb6caa329377064cfa3a6fd8fbffb410"}, - {file = "ckzg-1.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:19893ee7bd7da8688382cb134cb9ee7bce5c38e3a9386e3ed99bb010487d2d17"}, - {file = "ckzg-1.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:c3e1a9a72695e777497e95bb2213316a1138f82d1bb5d67b9c029a522d24908e"}, - {file = "ckzg-1.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:a2f59da9cb82b6a4be615f2561a255731eededa7ecd6ba4b2f2dedfc918ef137"}, - {file = "ckzg-1.0.2-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c915e1f2ef51657c3255d8b1e2aea6e0b93348ae316b2b79eaadfb17ad8f514e"}, - {file = "ckzg-1.0.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcc0d2031fcabc4be37e9e602c926ef9347238d2f58c1b07e0c147f60b9e760b"}, - {file = "ckzg-1.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3cdaad2745425d7708e76e8e56a52fdaf5c5cc1cfefd5129d24ff8dbe06a012d"}, - {file = "ckzg-1.0.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:1ec775649daade1b93041aac9c1660c2ad9828b57ccd2eeb5a3074d8f05e544a"}, - {file = "ckzg-1.0.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:02f9cc3e38b3702ec5895a1ebf927fd02b8f5c2f93c7cb9e438581b5b74472c8"}, - {file = "ckzg-1.0.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0e816af31951b5e94e6bc069f21fe783427c190526e0437e16c4488a34ddcacc"}, - {file = "ckzg-1.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:651ba33ee2d7fefff14ca519a72996b733402f8b043fbfef12d5fe2a442d86d8"}, - {file = "ckzg-1.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:489763ad92e2175fb6ab455411f03ec104c630470d483e11578bf2e00608f283"}, - {file = "ckzg-1.0.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:69e1376284e9a5094d7c4d3e552202d6b32a67c5acc461b0b35718d8ec5c7363"}, - {file = "ckzg-1.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb9d0b09ca1bdb5955b626d6645f811424ae0fcab47699a1a938a3ce0438c25f"}, - {file = "ckzg-1.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d87a121ace8feb6c9386f247e7e36ef55e584fc8a6b1bc2c60757a59c1efe364"}, - {file = "ckzg-1.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:97c27153fab853f017fed159333b27beeb2e0da834c92c9ecdc26d0e5c3983b3"}, - {file = "ckzg-1.0.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b26799907257c39471cb3665f66f7630797140131606085c2c94a7094ab6ddf2"}, - {file = "ckzg-1.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:283a40c625222560fda3dcb912b666f7d50f9502587b73c4358979f519f1c961"}, - {file = "ckzg-1.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:5f029822d27c52b9c3dbe5706408b099da779f10929be0422a09a34aa026a872"}, - {file = "ckzg-1.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:edaea8fb50b01c6c19768d9305ad365639a8cd804754277d5108dcae4808f00b"}, - {file = "ckzg-1.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:27be65c88d5d773a30e6f198719cefede7e25cad807384c3d65a09c11616fc9d"}, - {file = "ckzg-1.0.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9ac729c5c6f3d2c030c0bc8c9e10edc253e36f002cfe227292035009965d349"}, - {file = "ckzg-1.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1528bc2b95aac6d184a90b023602c40d7b11b577235848c1b5593c00cf51d37"}, - {file = "ckzg-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:071dc7fc179316ce1bfabaa056156e4e84f312c4560ab7b9529a3b9a84019df3"}, - {file = "ckzg-1.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:895044069de7010be6c7ee703f03fd7548267a0823cf60b9dd26ec50267dd9e8"}, - {file = "ckzg-1.0.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ed8c99cd3d9af596470e0481fd58931007288951719bad026f0dd486dd0ec11"}, - {file = "ckzg-1.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:74d87eafe561d4bfb544a4f3419d26c56ad7de00f39789ef0fdb09515544d12e"}, - {file = "ckzg-1.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:54d71e5ca416bd51c543f9f51e426e6792f8a0280b83aef92faad1b826f401ea"}, - {file = "ckzg-1.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:da2d9988781a09a4577ee7ea8f51fe4a94b4422789a523164f5ba3118566ad41"}, - {file = "ckzg-1.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d9e030af7d6acdcb356fddfb095048bc8e880fe4cd70ff2206c64f33bf384a0d"}, - {file = "ckzg-1.0.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:145ae31c3d499d1950567bd636dc5b24292b600296b9deb5523bc20d8f7b51c3"}, - {file = "ckzg-1.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d81e68e84d80084da298471ad5eaddfcc1cf73545cb24e9453550c8186870982"}, - {file = "ckzg-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c67064bbbeba1a6892c9c80b3d0c2a540ff48a5ca5356fdb2a8d998b264e43e6"}, - {file = "ckzg-1.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:99694917eb6decefc0d330d9887a89ea770824b2fa76eb830bab5fe57ea5c20c"}, - {file = "ckzg-1.0.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:fca227ce0ce3427254a113fdb3aed5ecd99c1fc670cb0c60cc8a2154793678e4"}, - {file = "ckzg-1.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a66a690d3d1801085d11de6825df47a99b465ff32dbe90be4a3c9f43c577da96"}, - {file = "ckzg-1.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:272adfe471380d10e4a0e1639d877e504555079a60233dd82249c799b15be81e"}, - {file = "ckzg-1.0.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f37be0054ebb4b8ac6e6d5267290b239b09e7ddc611776051b4c3c4032d161ba"}, - {file = "ckzg-1.0.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:611c03a170f0f746180eeb0cc28cdc6f954561b8eb9013605a046de86520ee6b"}, - {file = "ckzg-1.0.2-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75b2f0ab341f3c33702ce64e1c101116c7462a25686d0b1a0193ca654ad4f96e"}, - {file = "ckzg-1.0.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab29fc61fbd32096b82b02e6b18ae0d7423048d3540b7b90805b16ae10bdb769"}, - {file = "ckzg-1.0.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e43741e7453262aa3ba1754623d7864250b33751bd850dd548e3ed6bd1911093"}, - {file = "ckzg-1.0.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:155eacc237cb28c9eafda1c47a89e6e4550f1c2e711f2eee21e0bb2f4df75546"}, - {file = "ckzg-1.0.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d31d7fbe396a51f43375e38c31bc3a96c7996882582f95f3fcfd54acfa7b3ce6"}, - {file = "ckzg-1.0.2-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9d3d049186c9966e9140de39a9979d7adcfe22f8b02d2852c94d3c363235cc18"}, - {file = "ckzg-1.0.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88728fbd410d61bd5d655ac50b842714c38bc34ff717f73592132d28911fc88e"}, - {file = "ckzg-1.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:052d302058d72431acc9dd4a9c76854c8dfce10c698deef5252884e32a1ac7bf"}, - {file = "ckzg-1.0.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:633110a9431231664be2ad32baf10971547f18289d33967654581b9ae9c94a7e"}, - {file = "ckzg-1.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f439c9e5297ae29a700f6d55de1525e2e295dbbb7366f0974c8702fca9e536b9"}, - {file = "ckzg-1.0.2-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:94f7eb080c00c0ccbd4fafad69f0b35b624a6a229a28e11d365b60b58a072832"}, - {file = "ckzg-1.0.2-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f876783ec654b7b9525503c2a0a1b086e5d4f52ff65cac7e8747769b0c2e5468"}, - {file = "ckzg-1.0.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7e039800e50592580171830e788ef4a1d6bb54300d074ae9f9119e92aefc568"}, - {file = "ckzg-1.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13a8cccf0070a29bc01493179db2e61220ee1a6cb17f8ea41c68a2f043ace87f"}, - {file = "ckzg-1.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4f86cef801d7b0838e17b6ee2f2c9e747447d91ad1220a701baccdf7ef11a3c8"}, - {file = "ckzg-1.0.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2433a89af4158beddebbdd66fae95b34d40f2467bee8dc40df0333de5e616b5f"}, - {file = "ckzg-1.0.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c49d5dc0918ad912777720035f9820bdbb6c7e7d1898e12506d44ab3c938d525"}, - {file = "ckzg-1.0.2-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:331d49bc72430a3f85ea6ecb55a0d0d65f66a21d61af5783b465906a741366d5"}, - {file = "ckzg-1.0.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86627bc33bc63b8de869d7d5bfa9868619a4f3e4e7082103935c52f56c66b5"}, - {file = "ckzg-1.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab6a2ba2706b5eaa1ce6bc7c4e72970bf9587e2e0e482e5fb4df1996bccb7a40"}, - {file = "ckzg-1.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8bca5e7c38d913fabc24ad09545f78ba23cfc13e1ac8250644231729ca908549"}, - {file = "ckzg-1.0.2.tar.gz", hash = "sha256:4295acc380f8d42ebea4a4a0a68c424a322bb335a33bad05c72ead8cbb28d118"}, + {file = "ckzg-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b7f9ba6d215f8981c5545f952aac84875bd564a63da02fb22a3d1321662ecdc0"}, + {file = "ckzg-2.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8fdec3ff96399acba9baeef9e1b0b5258c08f73245780e6c69f7b73def5e8d0a"}, + {file = "ckzg-2.0.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1644369af9900a9f109d417d6760693edf134118f3100d0c68f56667de775b80"}, + {file = "ckzg-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c0a2146f122d489ac7e67ae0c0743f8d0db1718e6aeed8f05717340594fe07dd"}, + {file = "ckzg-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:979841be50f2782b447762db38e9bc927ae251f6ca86c54a26561a52068ee779"}, + {file = "ckzg-2.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4516d86647ee4e8ea9470f4adf68fbebb6dc1bdedff7d9592c2504fe53145908"}, + {file = "ckzg-2.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:91866fc58a29b4829201efd9ffadfac3ffeca6359254a54a360ff6a189c34bf5"}, + {file = "ckzg-2.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ed35508dac059b2c0a7994383bc7a92eaf35d0b9ce790016819e2619e0f4b8a9"}, + {file = "ckzg-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:449c4fe38017351eca362106420eeb2d28d50b7e54aa8668b3af29a8ab780132"}, + {file = "ckzg-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:260608a22e2f2cadcd31f4495832d45d6460438c38faba9761b92df885a99d88"}, + {file = "ckzg-2.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e1015f99c50215098751b07d7e459ba9a2790d3692ca81552eed29996128e90d"}, + {file = "ckzg-2.0.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9dd350d97554c161dc5b8c7b32c2dc8e659632c374f60e2669fb3c9b5b294827"}, + {file = "ckzg-2.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eec7724fa8dc4ae95757efe4a87e7b2d4b880cb348c72ce7355fc0c4f64bc298"}, + {file = "ckzg-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3fa0f4398fa67fb71f0a2b34a652cc89e6e0e6af1340b0dc771db1a5f3e089c"}, + {file = "ckzg-2.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f865a0297aabeeb638187a46f7df445763360417b9df4dea60560d512c2cda09"}, + {file = "ckzg-2.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b6ec738350771dbf5974fb70cc8bbb20a4df784af770f7e655922adc08a2171"}, + {file = "ckzg-2.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9b4b669fc77edeb16adc182efc32b3737b36f741a2e33a170d40619e8b171a94"}, + {file = "ckzg-2.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:decb97f4a17c7338b2130dcc4b045df4cc0e7785ece872c764b554c7c73a99ff"}, + {file = "ckzg-2.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:285cf3121b8a8c5609c5b706314f68d2ba2784ab02c5bb7487c6ae1714ecb27f"}, + {file = "ckzg-2.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2f927bc41c2551b0ef0056a649a7ebed29d9665680a10795f4cee5002c69ddb7"}, + {file = "ckzg-2.0.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fd9fb690c88919f30c9f3ab7cc46a7ecd734d5ff4c9ccea383c119b9b7cc4da"}, + {file = "ckzg-2.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fabc3bd41b306d1c7025d561c3281a007c2aca8ceaf998582dc3894904d9c73e"}, + {file = "ckzg-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2eb50c53efdb9c34f762bd0c8006cf79bc92a9daf47aa6b541e496988484124f"}, + {file = "ckzg-2.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7960cc62f959403293fb53a3c2404778369ae7cefc6d7f202e5e00567cf98c4b"}, + {file = "ckzg-2.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d721bcd492294c70eca39da0b0a433c29b6a571dbac2f7084bab06334904af06"}, + {file = "ckzg-2.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dde2391d025b5033ef0eeacf62b11ecfe446aea25682b5f547a907766ad0a8cb"}, + {file = "ckzg-2.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fab8859d9420f6f7df4e094ee3639bc49d18c8dab0df81bee825e2363dd67a09"}, + {file = "ckzg-2.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9747d92883199d4f8f3a3d7018134745fddcf692dfe67115434e4b32609ea785"}, + {file = "ckzg-2.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b2cf58fb9e165da97f0ffe9f4a6efb73992645fac8e0fa223a6cc7ec486a434a"}, + {file = "ckzg-2.0.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d25d006899d76bb8c9d3e8b27981dd6b66a78f9826e33c1bf981af6577a69a19"}, + {file = "ckzg-2.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a04bf0b32f04f5ea5e4b8518e292d3321bc05596fde95f9c3b4f504e5e4bc780"}, + {file = "ckzg-2.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d0cf3dccd72376bff10e1833641cc9d642f34f60ca63972626d9dfcfdc8e77f"}, + {file = "ckzg-2.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:770809c7e93087470cc524724419b0f85590edb033c7c73ba94aef70b36ca18b"}, + {file = "ckzg-2.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e31b59b8124148d5e21f7e41b35532d7af98260c44a77c3917958adece84296d"}, + {file = "ckzg-2.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:174f0c356df644d6e349ce03b7284d83dbec859e11ca5d1b1b3bace8b8fbc65d"}, + {file = "ckzg-2.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:30e375cd45142e56b5dbfdec05ce4deb2368d7f7dedfc7408ba37d5639af05ff"}, + {file = "ckzg-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:abdee71958b214730a8341b16bdd413d0fab1b1a2504fbdb7b0ef2aeee9f9d22"}, + {file = "ckzg-2.0.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b4442667058db791325fe231f22e4fc7aaa3495d535d75af5595bc5f4f86036"}, + {file = "ckzg-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c3c9aa9d4477ad52f3561b717e776c1a8a442d9d8b06600c7d8a2857d1ecf05"}, + {file = "ckzg-2.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68e0a9cde35f11e80b4e560d22990f2f29dd200a95d3141acde137cb6c883f9a"}, + {file = "ckzg-2.0.1-cp36-cp36m-musllinux_1_2_aarch64.whl", hash = "sha256:4508a089e53330866d3360000d76483400eeab5f8057b8e1f3e344ce2cc0097b"}, + {file = "ckzg-2.0.1-cp36-cp36m-musllinux_1_2_i686.whl", hash = "sha256:828cecee16ec576dcf4386beac4eedfd058fd32ee90827f2282e7156a53600be"}, + {file = "ckzg-2.0.1-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:bd437ec1dfb4f5609979328b5f465a74307f45d46d24234868c67d44da96903b"}, + {file = "ckzg-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:70406b10acf68469ac62110047044a6c1a998f5d5fcd6e27cb3ec2d5760d0490"}, + {file = "ckzg-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2f53fba88febac17e82a96eb83dc38ecf4b28abcdd15c0246534c358bd3b26c4"}, + {file = "ckzg-2.0.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be8e0d5015e7755af4ddaab9ae1a4084f72c84b2cbb53628f4366aeed46cc380"}, + {file = "ckzg-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:261414121091042d29f28fc319d7c9a7f950f91f8bf54c010b581ee6a0499473"}, + {file = "ckzg-2.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:524e1e66edd2be2c38b660824aa7b5d4525b41b30ac029d80738a8eee491aeb5"}, + {file = "ckzg-2.0.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:4a12a1d8ef8f475d9f0af9a538e1674057e007806cb1204bb269ea00d9f8c1e5"}, + {file = "ckzg-2.0.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:4cc4bb5f62417a58065deeaf124e178cb1787ef3228e6032600d1e0a2775765b"}, + {file = "ckzg-2.0.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:e7b015f5615bcb82fa0d935481a209fc1dcd9308fb52fb1a7e5400108df67a94"}, + {file = "ckzg-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:0518933ff3b9550f9dd60d833cdb74e8e97cc1cc58f0560b706916606dfd47d0"}, + {file = "ckzg-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1ac0bca0795990076cde1930ecec307379b5303e34367c6e6e8a16bdba5a7ba5"}, + {file = "ckzg-2.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8086d23a41020ede312843bda7ea4ee0c9831265379027904106f99f2f8ed469"}, + {file = "ckzg-2.0.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:31d1b141d41fa51aeac9440c936b812e885aef5719adfbd3a27550d8dc433997"}, + {file = "ckzg-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60a58e4d8cb91bad669ca111b7ccdd05c32de6787fdb571bb599625b043ad75b"}, + {file = "ckzg-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:633e143385622d7a43fcb5c4f400ec5ec15df0b1c74ab7d6449a41a7abed24ad"}, + {file = "ckzg-2.0.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:4876313614ea01f9a0039b5ca2c754340ba40aa8405f8756912d90ae55718011"}, + {file = "ckzg-2.0.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:19c86c8102200484074afac06b3946b457ba9915636de187f63854522be2e3bd"}, + {file = "ckzg-2.0.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:564abf27878f129781e1df4d33b1c4e264e5b25f89c1bdf95b7d6256e4bceb6c"}, + {file = "ckzg-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:bc2da29bb970d3f5de04fb60797dbb4490c010ffc683cbc6016349dd6fa60d14"}, + {file = "ckzg-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9c1869671140ae7e698520b678b594ebd26fb59ef476711403541597d7d32c01"}, + {file = "ckzg-2.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1dd2aec2c61e8cc2ec815900f6768c6fe74b8fd29810e79b57c4150c6db32fb6"}, + {file = "ckzg-2.0.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9632ef17285dbdd3fcd9780f599c266da736d9b2897decc4ea02ba8690bdf72"}, + {file = "ckzg-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5747d7926873e3af0f6af5fca666feb0097d06cab525950e2664a6fbcb90165d"}, + {file = "ckzg-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75484ffb78aaebaeb3a30f1194a9143b904312b0f365fc4101e58e1bf5f89f66"}, + {file = "ckzg-2.0.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b2f72bc861b8bee9bac3314c58586d1ab2d23530f932a8f0a8562c8a4a6a45f9"}, + {file = "ckzg-2.0.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6f85e5802fea5b77f52fc3a14c8dec18a3f2b7c7070c811a4608940834f563cc"}, + {file = "ckzg-2.0.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:583a0b6b531a16974676439b23e7defb3dfe9732f18d13d2316152019c538af1"}, + {file = "ckzg-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:fafb9ac36b3398f8091d40773d9a450e5f74883dad8ca4ee22d472e7a231ef4d"}, + {file = "ckzg-2.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a12e96f20dce35e5222f898a5c8355054ef7c5ee038eeb97dbb694640b57577b"}, + {file = "ckzg-2.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:4e0ebc55253addaa24dd2cd871bbe3b8f57855f32b5f74e70bf2cb76b6f7da54"}, + {file = "ckzg-2.0.1-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8f917a7bf363a3735db30559e1ed63cf1ccf414234433ba687fa72c007abd756"}, + {file = "ckzg-2.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30f08c984286853271d4adae219e9ba87275a15047dbaa262ab8dd6c01be97b0"}, + {file = "ckzg-2.0.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fa1ea4888417e1f109fd5e57965788fb7f53b674329b937a65604a3c1ca1d03"}, + {file = "ckzg-2.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0b249914aeaf05cabc71c5c3797e3d6c126cb2c64192b7eb6755ef6aa5ab2f11"}, + {file = "ckzg-2.0.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a038e26baf650e1c733dcaa066ec948e75556b0c485e8c790c9a758875c71a93"}, + {file = "ckzg-2.0.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d6deb2c822122bdd32b555fa3b9216c86a355f24a2cc6a46b9b5743b412b60c"}, + {file = "ckzg-2.0.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50f6f2fbceba9ece3fbc1d2613a246f4e6ec4d787f542859e70c358928c0e4a1"}, + {file = "ckzg-2.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33ca40ef30129e2347bff3c95ad093403a0d5703476705ab92c92fbffe89bd5a"}, + {file = "ckzg-2.0.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:700b989c2f7089edc8fac6dfbd1b4677e85b966216ebedee8eb5e7894765c188"}, + {file = "ckzg-2.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f11933c007c3df02446a81957ac6e2488058b969e2eff5357c98ab569a0c7999"}, + {file = "ckzg-2.0.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:3dbc9580eccecbd485f22e48f6044c48cbe6d838a7b7514cce179c085c65a960"}, + {file = "ckzg-2.0.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ad6eb83f343fea6dd9a13fd1bce87b9cd26abeeb72f0674a62d26e40fe0b8aca"}, + {file = "ckzg-2.0.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:269f82b992facbd20461310cf5784551c77d11017b7d4b85d741d70359be6794"}, + {file = "ckzg-2.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:895d67cfd43130652e1ae39b90465b392d9a72c7c7e6f250eaf14689bfda6351"}, + {file = "ckzg-2.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:369cf1aeaf336c31f2050a7f54ae21cf46f4b2db23ebb013fff621144ab361bb"}, + {file = "ckzg-2.0.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:24fda2637598a467e7b11ff664805ee7fdf4f6c7b0c043d6d0a6ccb69b5681ee"}, + {file = "ckzg-2.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ea27baabe5b22b92901c428768eacf93b992ac7681f93768ab24818ad26ccfed"}, + {file = "ckzg-2.0.1-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a33f71e382020f2bc4ead2bd6881a9bd3811d929f272da239ac01ad615a00802"}, + {file = "ckzg-2.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:926507c569727bb4c851a1eea702c5e902267de96e06ce2d685019f973f72968"}, + {file = "ckzg-2.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f5f29518b0a4555d8f2a28559209bd1d4080547aa629ff9ee51799346573b3f"}, + {file = "ckzg-2.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4595db84ce63c227e4448de0f7b39d3043e3477d78394ff651708c37fee6c486"}, + {file = "ckzg-2.0.1.tar.gz", hash = "sha256:62c5adc381637affa7e1df465c57750b356a761b8a3164c3106589b02532b9c9"}, ] [[package]] @@ -1076,29 +1096,30 @@ tools = ["hypothesis (>=6.22.0,<6.108.7)"] [[package]] name = "eth-account" -version = "0.11.3" +version = "0.13.4" description = "eth-account: Sign Ethereum transactions and messages with local private keys" optional = false python-versions = "<4,>=3.8" files = [ - {file = "eth_account-0.11.3-py3-none-any.whl", hash = "sha256:16cf58aabc65171fc206489899b7e5546e3215e1a4debc12dbd55345c979081e"}, - {file = "eth_account-0.11.3.tar.gz", hash = "sha256:a712a9534638a7cfaa4cc069f1b9d5cefeee70362cfc3a7b0a2534ee61ce76c9"}, + {file = "eth_account-0.13.4-py3-none-any.whl", hash = "sha256:a4c109e9bad3a278243fcc028b755fb72b43e25b1e6256b3f309a44f5f7d87c3"}, + {file = "eth_account-0.13.4.tar.gz", hash = "sha256:2e1f2de240bef3d9f3d8013656135d2a79b6be6d4e7885bce9cace4334a4a376"}, ] [package.dependencies] bitarray = ">=2.4.0" -ckzg = ">=0.4.3,<2" +ckzg = ">=2.0.0" eth-abi = ">=4.0.0-b.2" -eth-keyfile = ">=0.6.0" +eth-keyfile = ">=0.7.0,<0.9.0" eth-keys = ">=0.4.0" -eth-rlp = ">=0.3.0" +eth-rlp = ">=2.1.0" eth-utils = ">=2.0.0" -hexbytes = ">=0.1.0,<0.4.0" +hexbytes = ">=1.2.0" +pydantic = ">=2.0.0" rlp = ">=1.0.0" [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "coverage", "hypothesis (>=4.18.0,<5)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "coverage", "hypothesis (>=4.18.0,<5)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] test = ["coverage", "hypothesis (>=4.18.0,<5)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] @@ -1166,20 +1187,20 @@ test = ["asn1tools (>=0.146.2)", "eth-hash[pysha3]", "factory-boy (>=3.0.1)", "h [[package]] name = "eth-rlp" -version = "1.0.1" +version = "2.1.0" description = "eth-rlp: RLP definitions for common Ethereum objects in Python" optional = false python-versions = ">=3.8, <4" files = [ - {file = "eth-rlp-1.0.1.tar.gz", hash = "sha256:d61dbda892ee1220f28fb3663c08f6383c305db9f1f5624dc585c9cd05115027"}, - {file = "eth_rlp-1.0.1-py3-none-any.whl", hash = "sha256:dd76515d71654277377d48876b88e839d61553aaf56952e580bb7cebef2b1517"}, + {file = "eth-rlp-2.1.0.tar.gz", hash = "sha256:d5b408a8cd20ed496e8e66d0559560d29bc21cee482f893936a1f05d0dddc4a0"}, + {file = "eth_rlp-2.1.0-py3-none-any.whl", hash = "sha256:6f476eb7e37d81feaba5d98aed887e467be92648778c44b19fe594aea209cde1"}, ] [package.dependencies] eth-utils = ">=2.0.0" -hexbytes = ">=0.1.0,<1" +hexbytes = ">=1.2.0" rlp = ">=0.6.0" -typing-extensions = {version = ">=4.0.1", markers = "python_version <= \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version <= \"3.10\""} [package.extras] dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "eth-hash[pycryptodome]", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] @@ -1188,44 +1209,44 @@ test = ["eth-hash[pycryptodome]", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "eth-typing" -version = "4.4.0" +version = "5.1.0" description = "eth-typing: Common type annotations for ethereum python packages" optional = false python-versions = "<4,>=3.8" files = [ - {file = "eth_typing-4.4.0-py3-none-any.whl", hash = "sha256:a5e30a6e69edda7b1d1e96e9d71bab48b9bb988a77909d8d1666242c5562f841"}, - {file = "eth_typing-4.4.0.tar.gz", hash = "sha256:93848083ac6bb4c20cc209ea9153a08b0a528be23337c889f89e1e5ffbe9807d"}, + {file = "eth_typing-5.1.0-py3-none-any.whl", hash = "sha256:c0d6b93f5385aa84efc4b47ae2bd478da069bc0ffda8b67e0ccb573f43defd29"}, + {file = "eth_typing-5.1.0.tar.gz", hash = "sha256:8581f212ee6252aaa285377a77620f6e5f6e16ac3f144c61f098fafd47967b1a"}, ] [package.dependencies] -typing-extensions = ">=4.5.0" +typing_extensions = ">=4.5.0" [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] test = ["pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "eth-utils" -version = "4.1.1" +version = "5.2.0" description = "eth-utils: Common utility functions for python code that interacts with Ethereum" optional = false python-versions = "<4,>=3.8" files = [ - {file = "eth_utils-4.1.1-py3-none-any.whl", hash = "sha256:ccbbac68a6d65cb6e294c5bcb6c6a5cec79a241c56dc5d9c345ed788c30f8534"}, - {file = "eth_utils-4.1.1.tar.gz", hash = "sha256:71c8d10dec7494aeed20fa7a4d52ec2ce4a2e52fdce80aab4f5c3c19f3648b25"}, + {file = "eth_utils-5.2.0-py3-none-any.whl", hash = "sha256:4d43eeb6720e89a042ad5b28d4b2111630ae764f444b85cbafb708d7f076da10"}, + {file = "eth_utils-5.2.0.tar.gz", hash = "sha256:17e474eb654df6e18f20797b22c6caabb77415a996b3ba0f3cc8df3437463134"}, ] [package.dependencies] cytoolz = {version = ">=0.10.1", markers = "implementation_name == \"cpython\""} eth-hash = ">=0.3.1" -eth-typing = ">=3.0.0" +eth-typing = ">=5.0.0" toolz = {version = ">0.8.2", markers = "implementation_name == \"pypy\""} [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "eth-hash[pycryptodome]", "hypothesis (>=4.43.0)", "ipython", "mypy (==1.5.1)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -test = ["hypothesis (>=4.43.0)", "mypy (==1.5.1)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] +dev = ["build (>=0.9.0)", "bump-my-version (>=0.19.0)", "eth-hash[pycryptodome]", "hypothesis (>=4.43.0)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=24,<25)"] +test = ["hypothesis (>=4.43.0)", "mypy (==1.10.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "exceptiongroup" @@ -1243,18 +1264,18 @@ test = ["pytest (>=6)"] [[package]] name = "filelock" -version = "3.16.1" +version = "3.17.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, - {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, + {file = "filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338"}, + {file = "filelock-3.17.0.tar.gz", hash = "sha256:ee4e77401ef576ebb38cd7f13b9b28893194acc20a8e68e18730ba9c0e54660e"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] typing = ["typing-extensions (>=4.12.2)"] [[package]] @@ -1548,30 +1569,29 @@ ecdsa = ">=0.14.0" [[package]] name = "hexbytes" -version = "0.3.1" +version = "1.3.0" description = "hexbytes: Python `bytes` subclass that decodes hex, with a readable console output" optional = false -python-versions = ">=3.7, <4" +python-versions = "<4,>=3.8" files = [ - {file = "hexbytes-0.3.1-py3-none-any.whl", hash = "sha256:383595ad75026cf00abd570f44b368c6cdac0c6becfae5c39ff88829877f8a59"}, - {file = "hexbytes-0.3.1.tar.gz", hash = "sha256:a3fe35c6831ee8fafd048c4c086b986075fc14fd46258fa24ecb8d65745f9a9d"}, + {file = "hexbytes-1.3.0-py3-none-any.whl", hash = "sha256:83720b529c6e15ed21627962938dc2dec9bb1010f17bbbd66bf1e6a8287d522c"}, + {file = "hexbytes-1.3.0.tar.gz", hash = "sha256:4a61840c24b0909a6534350e2d28ee50159ca1c9e89ce275fd31c110312cf684"}, ] [package.extras] -dev = ["black (>=22)", "bumpversion (>=0.5.3)", "eth-utils (>=1.0.1,<3)", "flake8 (==6.0.0)", "flake8-bugbear (==23.3.23)", "hypothesis (>=3.44.24,<=6.31.6)", "ipython", "isort (>=5.10.1)", "mypy (==0.971)", "pydocstyle (>=5.0.0)", "pytest (>=7.0.0)", "pytest-watch (>=4.1.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=5.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -doc = ["sphinx (>=5.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -lint = ["black (>=22)", "flake8 (==6.0.0)", "flake8-bugbear (==23.3.23)", "isort (>=5.10.1)", "mypy (==0.971)", "pydocstyle (>=5.0.0)"] -test = ["eth-utils (>=1.0.1,<3)", "hypothesis (>=3.44.24,<=6.31.6)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "eth_utils (>=2.0.0)", "hypothesis (>=3.44.24,<=6.31.6)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] +test = ["eth_utils (>=2.0.0)", "hypothesis (>=3.44.24,<=6.31.6)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "identify" -version = "2.6.5" +version = "2.6.6" description = "File identification library for Python" optional = false python-versions = ">=3.9" files = [ - {file = "identify-2.6.5-py2.py3-none-any.whl", hash = "sha256:14181a47091eb75b337af4c23078c9d09225cd4c48929f521f3bf16b09d02566"}, - {file = "identify-2.6.5.tar.gz", hash = "sha256:c10b33f250e5bba374fae86fb57f3adcebf1161bce7cdf92031915fd480c13bc"}, + {file = "identify-2.6.6-py2.py3-none-any.whl", hash = "sha256:cbd1810bce79f8b671ecb20f53ee0ae8e86ae84b557de31d89709dc2a48ba881"}, + {file = "identify-2.6.6.tar.gz", hash = "sha256:7bec12768ed44ea4761efb47806f0a41f86e7c0a5fdf5950d4648c90eca7e251"}, ] [package.extras] @@ -1635,135 +1655,6 @@ files = [ [package.extras] colors = ["colorama (>=0.4.6)"] -[[package]] -name = "jsonschema" -version = "4.23.0" -description = "An implementation of JSON Schema validation for Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, - {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, -] - -[package.dependencies] -attrs = ">=22.2.0" -jsonschema-specifications = ">=2023.03.6" -referencing = ">=0.28.4" -rpds-py = ">=0.7.1" - -[package.extras] -format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] -format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=24.6.0)"] - -[[package]] -name = "jsonschema-specifications" -version = "2024.10.1" -description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" -optional = false -python-versions = ">=3.9" -files = [ - {file = "jsonschema_specifications-2024.10.1-py3-none-any.whl", hash = "sha256:a09a0680616357d9a0ecf05c12ad234479f549239d0f5b55f3deea67475da9bf"}, - {file = "jsonschema_specifications-2024.10.1.tar.gz", hash = "sha256:0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272"}, -] - -[package.dependencies] -referencing = ">=0.31.0" - -[[package]] -name = "lru-dict" -version = "1.2.0" -description = "An Dict like LRU container." -optional = false -python-versions = "*" -files = [ - {file = "lru-dict-1.2.0.tar.gz", hash = "sha256:13c56782f19d68ddf4d8db0170041192859616514c706b126d0df2ec72a11bd7"}, - {file = "lru_dict-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:de906e5486b5c053d15b7731583c25e3c9147c288ac8152a6d1f9bccdec72641"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:604d07c7604b20b3130405d137cae61579578b0e8377daae4125098feebcb970"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:203b3e78d03d88f491fa134f85a42919020686b6e6f2d09759b2f5517260c651"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:020b93870f8c7195774cbd94f033b96c14f51c57537969965c3af300331724fe"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1184d91cfebd5d1e659d47f17a60185bbf621635ca56dcdc46c6a1745d25df5c"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:fc42882b554a86e564e0b662da47b8a4b32fa966920bd165e27bb8079a323bc1"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:18ee88ada65bd2ffd483023be0fa1c0a6a051ef666d1cd89e921dcce134149f2"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:756230c22257597b7557eaef7f90484c489e9ba78e5bb6ab5a5bcfb6b03cb075"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c4da599af36618881748b5db457d937955bb2b4800db891647d46767d636c408"}, - {file = "lru_dict-1.2.0-cp310-cp310-win32.whl", hash = "sha256:35a142a7d1a4fd5d5799cc4f8ab2fff50a598d8cee1d1c611f50722b3e27874f"}, - {file = "lru_dict-1.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:6da5b8099766c4da3bf1ed6e7d7f5eff1681aff6b5987d1258a13bd2ed54f0c9"}, - {file = "lru_dict-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b20b7c9beb481e92e07368ebfaa363ed7ef61e65ffe6e0edbdbaceb33e134124"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22147367b296be31cc858bf167c448af02435cac44806b228c9be8117f1bfce4"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34a3091abeb95e707f381a8b5b7dc8e4ee016316c659c49b726857b0d6d1bd7a"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:877801a20f05c467126b55338a4e9fa30e2a141eb7b0b740794571b7d619ee11"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d3336e901acec897bcd318c42c2b93d5f1d038e67688f497045fc6bad2c0be7"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8dafc481d2defb381f19b22cc51837e8a42631e98e34b9e0892245cc96593deb"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:87bbad3f5c3de8897b8c1263a9af73bbb6469fb90e7b57225dad89b8ef62cd8d"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:25f9e0bc2fe8f41c2711ccefd2871f8a5f50a39e6293b68c3dec576112937aad"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ae301c282a499dc1968dd633cfef8771dd84228ae9d40002a3ea990e4ff0c469"}, - {file = "lru_dict-1.2.0-cp311-cp311-win32.whl", hash = "sha256:c9617583173a29048e11397f165501edc5ae223504a404b2532a212a71ecc9ed"}, - {file = "lru_dict-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6b7a031e47421d4b7aa626b8c91c180a9f037f89e5d0a71c4bb7afcf4036c774"}, - {file = "lru_dict-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ea2ac3f7a7a2f32f194c84d82a034e66780057fd908b421becd2f173504d040e"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd46c94966f631a81ffe33eee928db58e9fbee15baba5923d284aeadc0e0fa76"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:086ce993414f0b28530ded7e004c77dc57c5748fa6da488602aa6e7f79e6210e"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:df25a426446197488a6702954dcc1de511deee20c9db730499a2aa83fddf0df1"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c53b12b89bd7a6c79f0536ff0d0a84fdf4ab5f6252d94b24b9b753bd9ada2ddf"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:f9484016e6765bd295708cccc9def49f708ce07ac003808f69efa386633affb9"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:d0f7ec902a0097ac39f1922c89be9eaccf00eb87751e28915320b4f72912d057"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:981ef3edc82da38d39eb60eae225b88a538d47b90cce2e5808846fd2cf64384b"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:e25b2e90a032dc248213af7f3f3e975e1934b204f3b16aeeaeaff27a3b65e128"}, - {file = "lru_dict-1.2.0-cp36-cp36m-win32.whl", hash = "sha256:59f3df78e94e07959f17764e7fa7ca6b54e9296953d2626a112eab08e1beb2db"}, - {file = "lru_dict-1.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:de24b47159e07833aeab517d9cb1c3c5c2d6445cc378b1c2f1d8d15fb4841d63"}, - {file = "lru_dict-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d0dd4cd58220351233002f910e35cc01d30337696b55c6578f71318b137770f9"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a87bdc291718bbdf9ea4be12ae7af26cbf0706fa62c2ac332748e3116c5510a7"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05fb8744f91f58479cbe07ed80ada6696ec7df21ea1740891d4107a8dd99a970"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00f6e8a3fc91481b40395316a14c94daa0f0a5de62e7e01a7d589f8d29224052"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5b172fce0a0ffc0fa6d282c14256d5a68b5db1e64719c2915e69084c4b6bf555"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:e707d93bae8f0a14e6df1ae8b0f076532b35f00e691995f33132d806a88e5c18"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b9ec7a4a0d6b8297102aa56758434fb1fca276a82ed7362e37817407185c3abb"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:f404dcc8172da1f28da9b1f0087009578e608a4899b96d244925c4f463201f2a"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1171ad3bff32aa8086778be4a3bdff595cc2692e78685bcce9cb06b96b22dcc2"}, - {file = "lru_dict-1.2.0-cp37-cp37m-win32.whl", hash = "sha256:0c316dfa3897fabaa1fe08aae89352a3b109e5f88b25529bc01e98ac029bf878"}, - {file = "lru_dict-1.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:5919dd04446bc1ee8d6ecda2187deeebfff5903538ae71083e069bc678599446"}, - {file = "lru_dict-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fbf36c5a220a85187cacc1fcb7dd87070e04b5fc28df7a43f6842f7c8224a388"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:712e71b64da181e1c0a2eaa76cd860265980cd15cb0e0498602b8aa35d5db9f8"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f54908bf91280a9b8fa6a8c8f3c2f65850ce6acae2852bbe292391628ebca42f"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3838e33710935da2ade1dd404a8b936d571e29268a70ff4ca5ba758abb3850df"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5d5a5f976b39af73324f2b793862859902ccb9542621856d51a5993064f25e4"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8bda3a9afd241ee0181661decaae25e5336ce513ac268ab57da737eacaa7871f"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:bd2cd1b998ea4c8c1dad829fc4fa88aeed4dee555b5e03c132fc618e6123f168"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b55753ee23028ba8644fd22e50de7b8f85fa60b562a0fafaad788701d6131ff8"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e51fa6a203fa91d415f3b2900e5748ec8e06ad75777c98cc3aeb3983ca416d7"}, - {file = "lru_dict-1.2.0-cp38-cp38-win32.whl", hash = "sha256:cd6806313606559e6c7adfa0dbeb30fc5ab625f00958c3d93f84831e7a32b71e"}, - {file = "lru_dict-1.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:5d90a70c53b0566084447c3ef9374cc5a9be886e867b36f89495f211baabd322"}, - {file = "lru_dict-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3ea7571b6bf2090a85ff037e6593bbafe1a8598d5c3b4560eb56187bcccb4dc"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:287c2115a59c1c9ed0d5d8ae7671e594b1206c36ea9df2fca6b17b86c468ff99"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b5ccfd2291c93746a286c87c3f895165b697399969d24c54804ec3ec559d4e43"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b710f0f4d7ec4f9fa89dfde7002f80bcd77de8024017e70706b0911ea086e2ef"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5345bf50e127bd2767e9fd42393635bbc0146eac01f6baf6ef12c332d1a6a329"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:291d13f85224551913a78fe695cde04cbca9dcb1d84c540167c443eb913603c9"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d5bb41bc74b321789803d45b124fc2145c1b3353b4ad43296d9d1d242574969b"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:0facf49b053bf4926d92d8d5a46fe07eecd2af0441add0182c7432d53d6da667"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:987b73a06bcf5a95d7dc296241c6b1f9bc6cda42586948c9dabf386dc2bef1cd"}, - {file = "lru_dict-1.2.0-cp39-cp39-win32.whl", hash = "sha256:231d7608f029dda42f9610e5723614a35b1fff035a8060cf7d2be19f1711ace8"}, - {file = "lru_dict-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:71da89e134747e20ed5b8ad5b4ee93fc5b31022c2b71e8176e73c5a44699061b"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:21b3090928c7b6cec509e755cc3ab742154b33660a9b433923bd12c37c448e3e"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaecd7085212d0aa4cd855f38b9d61803d6509731138bf798a9594745953245b"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ead83ac59a29d6439ddff46e205ce32f8b7f71a6bd8062347f77e232825e3d0a"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:312b6b2a30188586fe71358f0f33e4bac882d33f5e5019b26f084363f42f986f"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:b30122e098c80e36d0117810d46459a46313421ce3298709170b687dc1240b02"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f010cfad3ab10676e44dc72a813c968cd586f37b466d27cde73d1f7f1ba158c2"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20f5f411f7751ad9a2c02e80287cedf69ae032edd321fe696e310d32dd30a1f8"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:afdadd73304c9befaed02eb42f5f09fdc16288de0a08b32b8080f0f0f6350aa6"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7ab0c10c4fa99dc9e26b04e6b62ac32d2bcaea3aad9b81ec8ce9a7aa32b7b1b"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:edad398d5d402c43d2adada390dd83c74e46e020945ff4df801166047013617e"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:91d577a11b84387013815b1ad0bb6e604558d646003b44c92b3ddf886ad0f879"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb12f19cdf9c4f2d9aa259562e19b188ff34afab28dd9509ff32a3f1c2c29326"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e4c85aa8844bdca3c8abac3b7f78da1531c74e9f8b3e4890c6e6d86a5a3f6c0"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c6acbd097b15bead4de8e83e8a1030bb4d8257723669097eac643a301a952f0"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b6613daa851745dd22b860651de930275be9d3e9373283a2164992abacb75b62"}, -] - -[package.extras] -test = ["pytest"] - [[package]] name = "mccabe" version = "0.6.1" @@ -1981,13 +1872,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.8.0" +version = "4.1.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" files = [ - {file = "pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f"}, - {file = "pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af"}, + {file = "pre_commit-4.1.0-py2.py3-none-any.whl", hash = "sha256:d29e7cb346295bcc1cc75fc3e92e343495e3ea0196c9ec6ba53f49f10ab6ae7b"}, + {file = "pre_commit-4.1.0.tar.gz", hash = "sha256:ae3f018575a588e30dfddfab9a05448bfbd6b73d78709617b5a2b853549716d4"}, ] [package.dependencies] @@ -2171,6 +2062,138 @@ files = [ {file = "pycryptodome-3.21.0.tar.gz", hash = "sha256:f7787e0d469bdae763b876174cf2e6c0f7be79808af26b1da96f1a64bcf47297"}, ] +[[package]] +name = "pydantic" +version = "2.10.5" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic-2.10.5-py3-none-any.whl", hash = "sha256:4dd4e322dbe55472cb7ca7e73f4b63574eecccf2835ffa2af9021ce113c83c53"}, + {file = "pydantic-2.10.5.tar.gz", hash = "sha256:278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff"}, +] + +[package.dependencies] +annotated-types = ">=0.6.0" +pydantic-core = "2.27.2" +typing-extensions = ">=4.12.2" + +[package.extras] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] + +[[package]] +name = "pydantic-core" +version = "2.27.2" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, + {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" + [[package]] name = "pyflakes" version = "2.4.0" @@ -2220,19 +2243,18 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments [[package]] name = "pytest-aioresponses" -version = "0.2.0" +version = "0.3.0" description = "py.test integration for aioresponses" optional = false -python-versions = ">=3.6,<4.0" +python-versions = "<4.0,>=3.6" files = [ - {file = "pytest-aioresponses-0.2.0.tar.gz", hash = "sha256:61cced206857cb4e7aab10b61600527f505c358d046e7d3ad3ae09455d02d937"}, - {file = "pytest_aioresponses-0.2.0-py3-none-any.whl", hash = "sha256:1a78d1eb76e1bffe7adc83a1bad0d48c373b41289367ae1f5e7ec0fceb60a04d"}, + {file = "pytest_aioresponses-0.3.0-py3-none-any.whl", hash = "sha256:60f3124ff05a0210a5f369dd95e4cf66090774ba76b322f7178858ce4e6c1647"}, + {file = "pytest_aioresponses-0.3.0.tar.gz", hash = "sha256:5677b32dfa1a36908b347524b5867aab35ac1c5ce1d4970244d6f66009bca7b6"}, ] [package.dependencies] aioresponses = ">=0.7.1,<0.8.0" pytest = ">=3.5.0" -pytest-asyncio = ">=0.14.0" [[package]] name = "pytest-asyncio" @@ -2254,21 +2276,21 @@ testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] name = "pytest-cov" -version = "4.1.0" +version = "6.0.0" description = "Pytest plugin for measuring coverage." optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, - {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, + {file = "pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0"}, + {file = "pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35"}, ] [package.dependencies] -coverage = {version = ">=5.2.1", extras = ["toml"]} +coverage = {version = ">=7.5", extras = ["toml"]} pytest = ">=4.6" [package.extras] -testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] +testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] [[package]] name = "pytest-grpc" @@ -2398,22 +2420,6 @@ files = [ {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] -[[package]] -name = "referencing" -version = "0.36.1" -description = "JSON Referencing + Python" -optional = false -python-versions = ">=3.9" -files = [ - {file = "referencing-0.36.1-py3-none-any.whl", hash = "sha256:363d9c65f080d0d70bc41c721dce3c7f3e77fc09f269cd5c8813da18069a6794"}, - {file = "referencing-0.36.1.tar.gz", hash = "sha256:ca2e6492769e3602957e9b831b94211599d2aade9477f5d44110d2530cf9aade"}, -] - -[package.dependencies] -attrs = ">=22.2.0" -rpds-py = ">=0.7.0" -typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""} - [[package]] name = "regex" version = "2024.11.6" @@ -2575,118 +2581,6 @@ docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme rust-backend = ["rusty-rlp (>=0.2.1)"] test = ["hypothesis (==5.19.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] -[[package]] -name = "rpds-py" -version = "0.22.3" -description = "Python bindings to Rust's persistent data structures (rpds)" -optional = false -python-versions = ">=3.9" -files = [ - {file = "rpds_py-0.22.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6c7b99ca52c2c1752b544e310101b98a659b720b21db00e65edca34483259967"}, - {file = "rpds_py-0.22.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:be2eb3f2495ba669d2a985f9b426c1797b7d48d6963899276d22f23e33d47e37"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70eb60b3ae9245ddea20f8a4190bd79c705a22f8028aaf8bbdebe4716c3fab24"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4041711832360a9b75cfb11b25a6a97c8fb49c07b8bd43d0d02b45d0b499a4ff"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64607d4cbf1b7e3c3c8a14948b99345eda0e161b852e122c6bb71aab6d1d798c"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e69b0a0e2537f26d73b4e43ad7bc8c8efb39621639b4434b76a3de50c6966e"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc27863442d388870c1809a87507727b799c8460573cfbb6dc0eeaef5a11b5ec"}, - {file = "rpds_py-0.22.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e79dd39f1e8c3504be0607e5fc6e86bb60fe3584bec8b782578c3b0fde8d932c"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e0fa2d4ec53dc51cf7d3bb22e0aa0143966119f42a0c3e4998293a3dd2856b09"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fda7cb070f442bf80b642cd56483b5548e43d366fe3f39b98e67cce780cded00"}, - {file = "rpds_py-0.22.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cff63a0272fcd259dcc3be1657b07c929c466b067ceb1c20060e8d10af56f5bf"}, - {file = "rpds_py-0.22.3-cp310-cp310-win32.whl", hash = "sha256:9bd7228827ec7bb817089e2eb301d907c0d9827a9e558f22f762bb690b131652"}, - {file = "rpds_py-0.22.3-cp310-cp310-win_amd64.whl", hash = "sha256:9beeb01d8c190d7581a4d59522cd3d4b6887040dcfc744af99aa59fef3e041a8"}, - {file = "rpds_py-0.22.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d20cfb4e099748ea39e6f7b16c91ab057989712d31761d3300d43134e26e165f"}, - {file = "rpds_py-0.22.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:68049202f67380ff9aa52f12e92b1c30115f32e6895cd7198fa2a7961621fc5a"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb4f868f712b2dd4bcc538b0a0c1f63a2b1d584c925e69a224d759e7070a12d5"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bc51abd01f08117283c5ebf64844a35144a0843ff7b2983e0648e4d3d9f10dbb"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f3cec041684de9a4684b1572fe28c7267410e02450f4561700ca5a3bc6695a2"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7ef9d9da710be50ff6809fed8f1963fecdfecc8b86656cadfca3bc24289414b0"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59f4a79c19232a5774aee369a0c296712ad0e77f24e62cad53160312b1c1eaa1"}, - {file = "rpds_py-0.22.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a60bce91f81ddaac922a40bbb571a12c1070cb20ebd6d49c48e0b101d87300d"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e89391e6d60251560f0a8f4bd32137b077a80d9b7dbe6d5cab1cd80d2746f648"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e3fb866d9932a3d7d0c82da76d816996d1667c44891bd861a0f97ba27e84fc74"}, - {file = "rpds_py-0.22.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1352ae4f7c717ae8cba93421a63373e582d19d55d2ee2cbb184344c82d2ae55a"}, - {file = "rpds_py-0.22.3-cp311-cp311-win32.whl", hash = "sha256:b0b4136a252cadfa1adb705bb81524eee47d9f6aab4f2ee4fa1e9d3cd4581f64"}, - {file = "rpds_py-0.22.3-cp311-cp311-win_amd64.whl", hash = "sha256:8bd7c8cfc0b8247c8799080fbff54e0b9619e17cdfeb0478ba7295d43f635d7c"}, - {file = "rpds_py-0.22.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:27e98004595899949bd7a7b34e91fa7c44d7a97c40fcaf1d874168bb652ec67e"}, - {file = "rpds_py-0.22.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1978d0021e943aae58b9b0b196fb4895a25cc53d3956b8e35e0b7682eefb6d56"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:655ca44a831ecb238d124e0402d98f6212ac527a0ba6c55ca26f616604e60a45"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:feea821ee2a9273771bae61194004ee2fc33f8ec7db08117ef9147d4bbcbca8e"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22bebe05a9ffc70ebfa127efbc429bc26ec9e9b4ee4d15a740033efda515cf3d"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3af6e48651c4e0d2d166dc1b033b7042ea3f871504b6805ba5f4fe31581d8d38"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67ba3c290821343c192f7eae1d8fd5999ca2dc99994114643e2f2d3e6138b15"}, - {file = "rpds_py-0.22.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:02fbb9c288ae08bcb34fb41d516d5eeb0455ac35b5512d03181d755d80810059"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f56a6b404f74ab372da986d240e2e002769a7d7102cc73eb238a4f72eec5284e"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0a0461200769ab3b9ab7e513f6013b7a97fdeee41c29b9db343f3c5a8e2b9e61"}, - {file = "rpds_py-0.22.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8633e471c6207a039eff6aa116e35f69f3156b3989ea3e2d755f7bc41754a4a7"}, - {file = "rpds_py-0.22.3-cp312-cp312-win32.whl", hash = "sha256:593eba61ba0c3baae5bc9be2f5232430453fb4432048de28399ca7376de9c627"}, - {file = "rpds_py-0.22.3-cp312-cp312-win_amd64.whl", hash = "sha256:d115bffdd417c6d806ea9069237a4ae02f513b778e3789a359bc5856e0404cc4"}, - {file = "rpds_py-0.22.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:ea7433ce7e4bfc3a85654aeb6747babe3f66eaf9a1d0c1e7a4435bbdf27fea84"}, - {file = "rpds_py-0.22.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6dd9412824c4ce1aca56c47b0991e65bebb7ac3f4edccfd3f156150c96a7bf25"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20070c65396f7373f5df4005862fa162db5d25d56150bddd0b3e8214e8ef45b4"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0b09865a9abc0ddff4e50b5ef65467cd94176bf1e0004184eb915cbc10fc05c5"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3453e8d41fe5f17d1f8e9c383a7473cd46a63661628ec58e07777c2fff7196dc"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f5d36399a1b96e1a5fdc91e0522544580dbebeb1f77f27b2b0ab25559e103b8b"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:009de23c9c9ee54bf11303a966edf4d9087cd43a6003672e6aa7def643d06518"}, - {file = "rpds_py-0.22.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1aef18820ef3e4587ebe8b3bc9ba6e55892a6d7b93bac6d29d9f631a3b4befbd"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f60bd8423be1d9d833f230fdbccf8f57af322d96bcad6599e5a771b151398eb2"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:62d9cfcf4948683a18a9aff0ab7e1474d407b7bab2ca03116109f8464698ab16"}, - {file = "rpds_py-0.22.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9253fc214112405f0afa7db88739294295f0e08466987f1d70e29930262b4c8f"}, - {file = "rpds_py-0.22.3-cp313-cp313-win32.whl", hash = "sha256:fb0ba113b4983beac1a2eb16faffd76cb41e176bf58c4afe3e14b9c681f702de"}, - {file = "rpds_py-0.22.3-cp313-cp313-win_amd64.whl", hash = "sha256:c58e2339def52ef6b71b8f36d13c3688ea23fa093353f3a4fee2556e62086ec9"}, - {file = "rpds_py-0.22.3-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:f82a116a1d03628a8ace4859556fb39fd1424c933341a08ea3ed6de1edb0283b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3dfcbc95bd7992b16f3f7ba05af8a64ca694331bd24f9157b49dadeeb287493b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59259dc58e57b10e7e18ce02c311804c10c5a793e6568f8af4dead03264584d1"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5725dd9cc02068996d4438d397e255dcb1df776b7ceea3b9cb972bdb11260a83"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99b37292234e61325e7a5bb9689e55e48c3f5f603af88b1642666277a81f1fbd"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:27b1d3b3915a99208fee9ab092b8184c420f2905b7d7feb4aeb5e4a9c509b8a1"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f612463ac081803f243ff13cccc648578e2279295048f2a8d5eb430af2bae6e3"}, - {file = "rpds_py-0.22.3-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f73d3fef726b3243a811121de45193c0ca75f6407fe66f3f4e183c983573e130"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3f21f0495edea7fdbaaa87e633a8689cd285f8f4af5c869f27bc8074638ad69c"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1e9663daaf7a63ceccbbb8e3808fe90415b0757e2abddbfc2e06c857bf8c5e2b"}, - {file = "rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a76e42402542b1fae59798fab64432b2d015ab9d0c8c47ba7addddbaf7952333"}, - {file = "rpds_py-0.22.3-cp313-cp313t-win32.whl", hash = "sha256:69803198097467ee7282750acb507fba35ca22cc3b85f16cf45fb01cb9097730"}, - {file = "rpds_py-0.22.3-cp313-cp313t-win_amd64.whl", hash = "sha256:f5cf2a0c2bdadf3791b5c205d55a37a54025c6e18a71c71f82bb536cf9a454bf"}, - {file = "rpds_py-0.22.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:378753b4a4de2a7b34063d6f95ae81bfa7b15f2c1a04a9518e8644e81807ebea"}, - {file = "rpds_py-0.22.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3445e07bf2e8ecfeef6ef67ac83de670358abf2996916039b16a218e3d95e97e"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b2513ba235829860b13faa931f3b6846548021846ac808455301c23a101689d"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eaf16ae9ae519a0e237a0f528fd9f0197b9bb70f40263ee57ae53c2b8d48aeb3"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:583f6a1993ca3369e0f80ba99d796d8e6b1a3a2a442dd4e1a79e652116413091"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4617e1915a539a0d9a9567795023de41a87106522ff83fbfaf1f6baf8e85437e"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c150c7a61ed4a4f4955a96626574e9baf1adf772c2fb61ef6a5027e52803543"}, - {file = "rpds_py-0.22.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fa4331c200c2521512595253f5bb70858b90f750d39b8cbfd67465f8d1b596d"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:214b7a953d73b5e87f0ebece4a32a5bd83c60a3ecc9d4ec8f1dca968a2d91e99"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f47ad3d5f3258bd7058d2d506852217865afefe6153a36eb4b6928758041d831"}, - {file = "rpds_py-0.22.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f276b245347e6e36526cbd4a266a417796fc531ddf391e43574cf6466c492520"}, - {file = "rpds_py-0.22.3-cp39-cp39-win32.whl", hash = "sha256:bbb232860e3d03d544bc03ac57855cd82ddf19c7a07651a7c0fdb95e9efea8b9"}, - {file = "rpds_py-0.22.3-cp39-cp39-win_amd64.whl", hash = "sha256:cfbc454a2880389dbb9b5b398e50d439e2e58669160f27b60e5eca11f68ae17c"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:d48424e39c2611ee1b84ad0f44fb3b2b53d473e65de061e3f460fc0be5f1939d"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:24e8abb5878e250f2eb0d7859a8e561846f98910326d06c0d51381fed59357bd"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b232061ca880db21fa14defe219840ad9b74b6158adb52ddf0e87bead9e8493"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac0a03221cdb5058ce0167ecc92a8c89e8d0decdc9e99a2ec23380793c4dcb96"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb0c341fa71df5a4595f9501df4ac5abfb5a09580081dffbd1ddd4654e6e9123"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf9db5488121b596dbfc6718c76092fda77b703c1f7533a226a5a9f65248f8ad"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b8db6b5b2d4491ad5b6bdc2bc7c017eec108acbf4e6785f42a9eb0ba234f4c9"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b3d504047aba448d70cf6fa22e06cb09f7cbd761939fdd47604f5e007675c24e"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:e61b02c3f7a1e0b75e20c3978f7135fd13cb6cf551bf4a6d29b999a88830a338"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:e35ba67d65d49080e8e5a1dd40101fccdd9798adb9b050ff670b7d74fa41c566"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:26fd7cac7dd51011a245f29a2cc6489c4608b5a8ce8d75661bb4a1066c52dfbe"}, - {file = "rpds_py-0.22.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:177c7c0fce2855833819c98e43c262007f42ce86651ffbb84f37883308cb0e7d"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bb47271f60660803ad11f4c61b42242b8c1312a31c98c578f79ef9387bbde21c"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:70fb28128acbfd264eda9bf47015537ba3fe86e40d046eb2963d75024be4d055"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44d61b4b7d0c2c9ac019c314e52d7cbda0ae31078aabd0f22e583af3e0d79723"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f0e260eaf54380380ac3808aa4ebe2d8ca28b9087cf411649f96bad6900c728"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b25bc607423935079e05619d7de556c91fb6adeae9d5f80868dde3468657994b"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fb6116dfb8d1925cbdb52595560584db42a7f664617a1f7d7f6e32f138cdf37d"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a63cbdd98acef6570c62b92a1e43266f9e8b21e699c363c0fef13bd530799c11"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2b8f60e1b739a74bab7e01fcbe3dddd4657ec685caa04681df9d562ef15b625f"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2e8b55d8517a2fda8d95cb45d62a5a8bbf9dd0ad39c5b25c8833efea07b880ca"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:2de29005e11637e7a2361fa151f780ff8eb2543a0da1413bb951e9f14b699ef3"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:666ecce376999bf619756a24ce15bb14c5bfaf04bf00abc7e663ce17c3f34fe7"}, - {file = "rpds_py-0.22.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5246b14ca64a8675e0a7161f7af68fe3e910e6b90542b4bfb5439ba752191df6"}, - {file = "rpds_py-0.22.3.tar.gz", hash = "sha256:e32fee8ab45d3c2db6da19a5323bc3362237c8b653c70194414b892fd06a080d"}, -] - [[package]] name = "safe-pysha3" version = "1.0.4" @@ -2791,6 +2685,20 @@ files = [ {file = "toolz-1.0.0.tar.gz", hash = "sha256:2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02"}, ] +[[package]] +name = "types-requests" +version = "2.32.0.20241016" +description = "Typing stubs for requests" +optional = false +python-versions = ">=3.8" +files = [ + {file = "types-requests-2.32.0.20241016.tar.gz", hash = "sha256:0d9cad2f27515d0e3e3da7134a1b6f28fb97129d86b867f24d9c726452634d95"}, + {file = "types_requests-2.32.0.20241016-py3-none-any.whl", hash = "sha256:4195d62d6d3e043a4eaaf08ff8a62184584d2e8684e9d2aa178c7915a7da3747"}, +] + +[package.dependencies] +urllib3 = ">=2" + [[package]] name = "typing-extensions" version = "4.12.2" @@ -2841,38 +2749,36 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [[package]] name = "web3" -version = "6.20.3" -description = "web3.py" +version = "7.5.0" +description = "web3: A Python library for interacting with Ethereum" optional = false -python-versions = ">=3.7.2" +python-versions = "<4,>=3.8" files = [ - {file = "web3-6.20.3-py3-none-any.whl", hash = "sha256:529fbb33f2476ce8185f7a2ed7e2e07c4c28621b0e89b845fbfdcaea9571286d"}, - {file = "web3-6.20.3.tar.gz", hash = "sha256:c69dbf1a61ace172741d06990e60afc7f55f303eac087e7235f382df3047d017"}, + {file = "web3-7.5.0-py3-none-any.whl", hash = "sha256:16fea8ee9c042a60edfdc2388c4d2c0177a9be383c76a4913cf9acb156df1954"}, + {file = "web3-7.5.0.tar.gz", hash = "sha256:42477d076c745da05e595e8aec91a3a168d87b09b85b0424181cac69edb9b4a2"}, ] [package.dependencies] aiohttp = ">=3.7.4.post0" -ckzg = "<2" -eth-abi = ">=4.0.0" -eth-account = ">=0.8.0,<0.13" +eth-abi = ">=5.0.1" +eth-account = ">=0.13.1" eth-hash = {version = ">=0.5.1", extras = ["pycryptodome"]} -eth-typing = ">=3.0.0,<4.2.0 || >4.2.0,<5.0.0" -eth-utils = ">=2.1.0,<5" -hexbytes = ">=0.1.0,<0.4.0" -jsonschema = ">=4.0.0" -lru-dict = ">=1.1.6,<1.3.0" -protobuf = ">=4.21.6" +eth-typing = ">=5.0.0" +eth-utils = ">=5.0.0" +hexbytes = ">=1.2.0" +pydantic = ">=2.4.0" pyunormalize = ">=15.0.0" pywin32 = {version = ">=223", markers = "platform_system == \"Windows\""} -requests = ">=2.16.0" +requests = ">=2.23.0" +types-requests = ">=2.0.0" typing-extensions = ">=4.0.1" websockets = ">=10.0.0" [package.extras] -dev = ["build (>=0.9.0)", "bumpversion", "eth-tester[py-evm] (>=0.11.0b1,<0.12.0b1)", "eth-tester[py-evm] (>=0.9.0b1,<0.10.0b1)", "flaky (>=3.7.0)", "hypothesis (>=3.31.2)", "importlib-metadata (<5.0)", "ipfshttpclient (==0.8.0a2)", "pre-commit (>=2.21.0)", "py-geth (>=3.14.0,<4)", "pytest (>=7.0.0)", "pytest-asyncio (>=0.21.2,<0.23)", "pytest-mock (>=1.10)", "pytest-watch (>=4.2)", "pytest-xdist (>=1.29)", "setuptools (>=38.6.0)", "sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=3.18.0)", "tqdm (>4.32)", "twine (>=1.13)", "when-changed (>=0.3.0)"] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -ipfs = ["ipfshttpclient (==0.8.0a2)"] -tester = ["eth-tester[py-evm] (>=0.11.0b1,<0.12.0b1)", "eth-tester[py-evm] (>=0.9.0b1,<0.10.0b1)", "py-geth (>=3.14.0,<4)"] +dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "eth-tester[py-evm] (>=0.11.0b1,<0.13.0b1)", "flaky (>=3.7.0)", "hypothesis (>=3.31.2)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "py-geth (>=5.0.0)", "pytest (>=7.0.0)", "pytest-asyncio (>=0.18.1,<0.23)", "pytest-mock (>=1.10)", "pytest-xdist (>=2.4.0)", "setuptools (>=38.6.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "tqdm (>4.32)", "twine (>=1.13)", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +test = ["eth-tester[py-evm] (>=0.11.0b1,<0.13.0b1)", "flaky (>=3.7.0)", "hypothesis (>=3.31.2)", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "py-geth (>=5.0.0)", "pytest (>=7.0.0)", "pytest-asyncio (>=0.18.1,<0.23)", "pytest-mock (>=1.10)", "pytest-xdist (>=2.4.0)", "tox (>=4.0.0)"] +tester = ["eth-tester[py-evm] (>=0.11.0b1,<0.13.0b1)", "py-geth (>=5.0.0)"] [[package]] name = "websockets" @@ -3070,4 +2976,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f14650203ccf0f3b487bc33f0765cfade66566d752bf39abfab0bc3b7e93a43e" +content-hash = "968fa5fac500b8b371153f169ec301f38fe1e4f9a1ab670b949e5427340d8c63" diff --git a/pyinjective/async_client.py b/pyinjective/async_client.py index af84597a..3c19c774 100644 --- a/pyinjective/async_client.py +++ b/pyinjective/async_client.py @@ -1,11 +1,9 @@ import asyncio -import time from copy import deepcopy from decimal import Decimal -from typing import Any, Callable, Dict, List, Optional, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Tuple from warnings import warn -import grpc from google.protobuf import json_format from pyinjective.client.chain.grpc.chain_grpc_auth_api import ChainGrpcAuthApi @@ -47,34 +45,21 @@ from pyinjective.core.tokens_file_loader import TokensFileLoader from pyinjective.core.tx.grpc.tx_grpc_api import TxGrpcApi from pyinjective.exceptions import NotFoundError -from pyinjective.proto.cosmos.auth.v1beta1 import query_pb2 as auth_query, query_pb2_grpc as auth_query_grpc -from pyinjective.proto.cosmos.authz.v1beta1 import query_pb2 as authz_query, query_pb2_grpc as authz_query_grpc -from pyinjective.proto.cosmos.bank.v1beta1 import query_pb2 as bank_query, query_pb2_grpc as bank_query_grpc -from pyinjective.proto.cosmos.base.abci.v1beta1 import abci_pb2 as abci_type -from pyinjective.proto.cosmos.base.tendermint.v1beta1 import ( - query_pb2 as tendermint_query, - query_pb2_grpc as tendermint_query_grpc, -) +from pyinjective.proto.cosmos.auth.v1beta1 import query_pb2_grpc as auth_query_grpc +from pyinjective.proto.cosmos.authz.v1beta1 import query_pb2_grpc as authz_query_grpc +from pyinjective.proto.cosmos.bank.v1beta1 import query_pb2_grpc as bank_query_grpc +from pyinjective.proto.cosmos.base.tendermint.v1beta1 import query_pb2_grpc as tendermint_query_grpc from pyinjective.proto.cosmos.crypto.ed25519 import keys_pb2 as ed25519_keys # noqa: F401 for validator set responses from pyinjective.proto.cosmos.tx.v1beta1 import service_pb2 as tx_service, service_pb2_grpc as tx_service_grpc from pyinjective.proto.exchange import ( - injective_accounts_rpc_pb2 as exchange_accounts_rpc_pb, injective_accounts_rpc_pb2_grpc as exchange_accounts_rpc_grpc, - injective_auction_rpc_pb2 as auction_rpc_pb, injective_auction_rpc_pb2_grpc as auction_rpc_grpc, - injective_derivative_exchange_rpc_pb2 as derivative_exchange_rpc_pb, injective_derivative_exchange_rpc_pb2_grpc as derivative_exchange_rpc_grpc, - injective_explorer_rpc_pb2 as explorer_rpc_pb, injective_explorer_rpc_pb2_grpc as explorer_rpc_grpc, - injective_insurance_rpc_pb2 as insurance_rpc_pb, injective_insurance_rpc_pb2_grpc as insurance_rpc_grpc, - injective_meta_rpc_pb2 as exchange_meta_rpc_pb, injective_meta_rpc_pb2_grpc as exchange_meta_rpc_grpc, - injective_oracle_rpc_pb2 as oracle_rpc_pb, injective_oracle_rpc_pb2_grpc as oracle_rpc_grpc, - injective_portfolio_rpc_pb2 as portfolio_rpc_pb, injective_portfolio_rpc_pb2_grpc as portfolio_rpc_grpc, - injective_spot_exchange_rpc_pb2 as spot_exchange_rpc_pb, injective_spot_exchange_rpc_pb2_grpc as spot_exchange_rpc_grpc, ) from pyinjective.proto.ibc.lightclients.tendermint.v1 import ( # noqa: F401 for validator set responses @@ -97,24 +82,7 @@ class AsyncClient: def __init__( self, network: Network, - insecure: Optional[bool] = None, - credentials=None, ): - # the `insecure` parameter is ignored and will be deprecated soon. The value is taken directly from `network` - if insecure is not None: - warn( - "insecure parameter in AsyncClient is no longer used and will be deprecated", - DeprecationWarning, - stacklevel=2, - ) - # the `credentials` parameter is ignored and will be deprecated soon. The value is taken directly from `network` - if credentials is not None: - warn( - "credentials parameter in AsyncClient is no longer used and will be deprecated", - DeprecationWarning, - stacklevel=2, - ) - self.addr = "" self.number = 0 self.sequence = 0 @@ -332,13 +300,6 @@ def get_sequence(self): def get_number(self): return self.number - async def get_tx(self, tx_hash): - """ - This method is deprecated and will be removed soon. Please use `fetch_tx` instead - """ - warn("This method is deprecated. Use fetch_tx instead", DeprecationWarning, stacklevel=2) - return await self.stubTx.GetTx(tx_service.GetTxRequest(hash=tx_hash)) - async def fetch_tx(self, hash: str) -> Dict[str, Any]: return await self.tx_api.fetch_tx(hash=hash) @@ -362,28 +323,6 @@ async def sync_timeout_height(self): # default client methods - async def get_account(self, address: str) -> Optional[account_pb2.EthAccount]: - """ - This method is deprecated and will be removed soon. Please use `fetch_account` instead - """ - warn("This method is deprecated. Use fetch_account instead", DeprecationWarning, stacklevel=2) - - try: - metadata = self.network.chain_cookie_assistant.metadata() - account_any = ( - await self.stubAuth.Account(auth_query.QueryAccountRequest(address=address), metadata=metadata) - ).account - account = account_pb2.EthAccount() - if account_any.Is(account.DESCRIPTOR): - account_any.Unpack(account) - self.number = int(account.base_account.account_number) - self.sequence = int(account.base_account.sequence) - except Exception as e: - LoggerProvider().logger_for_class(logging_class=self.__class__).debug( - f"error while fetching sequence and number {e}" - ) - return None - async def fetch_account(self, address: str) -> Optional[account_pb2.EthAccount]: result_account = None try: @@ -418,74 +357,19 @@ async def get_request_id_by_tx_hash(self, tx_hash: str) -> List[int]: raise NotFoundError("Request Id is not found") return request_ids - async def simulate_tx(self, tx_byte: bytes) -> Tuple[Union[abci_type.SimulationResponse, grpc.RpcError], bool]: - """ - This method is deprecated and will be removed soon. Please use `simulate` instead - """ - warn("This method is deprecated. Use simulate instead", DeprecationWarning, stacklevel=2) - try: - req = tx_service.SimulateRequest(tx_bytes=tx_byte) - metadata = self.network.chain_cookie_assistant.metadata() - return await self.stubTx.Simulate(request=req, metadata=metadata), True - except grpc.RpcError as err: - return err, False - async def simulate(self, tx_bytes: bytes) -> Dict[str, Any]: return await self.tx_api.simulate(tx_bytes=tx_bytes) - async def send_tx_sync_mode(self, tx_byte: bytes) -> abci_type.TxResponse: - """ - This method is deprecated and will be removed soon. Please use `broadcast_tx_sync_mode` instead - """ - warn("This method is deprecated. Use broadcast_tx_sync_mode instead", DeprecationWarning, stacklevel=2) - req = tx_service.BroadcastTxRequest(tx_bytes=tx_byte, mode=tx_service.BroadcastMode.BROADCAST_MODE_SYNC) - metadata = self.network.chain_cookie_assistant.metadata() - result = await self.stubTx.BroadcastTx(request=req, metadata=metadata) - return result.tx_response - async def broadcast_tx_sync_mode(self, tx_bytes: bytes) -> Dict[str, Any]: return await self.tx_api.broadcast(tx_bytes=tx_bytes, mode=tx_service.BroadcastMode.BROADCAST_MODE_SYNC) - async def send_tx_async_mode(self, tx_byte: bytes) -> abci_type.TxResponse: - """ - This method is deprecated and will be removed soon. Please use `broadcast_tx_async_mode` instead - """ - warn("This method is deprecated. Use broadcast_tx_async_mode instead", DeprecationWarning, stacklevel=2) - req = tx_service.BroadcastTxRequest(tx_bytes=tx_byte, mode=tx_service.BroadcastMode.BROADCAST_MODE_ASYNC) - metadata = self.network.chain_cookie_assistant.metadata() - result = await self.stubTx.BroadcastTx(request=req, metadata=metadata) - return result.tx_response - async def broadcast_tx_async_mode(self, tx_bytes: bytes) -> Dict[str, Any]: return await self.tx_api.broadcast(tx_bytes=tx_bytes, mode=tx_service.BroadcastMode.BROADCAST_MODE_ASYNC) - async def send_tx_block_mode(self, tx_byte: bytes) -> abci_type.TxResponse: - """ - This method is deprecated and will be removed soon. BLOCK broadcast mode should not be used - """ - warn("This method is deprecated. BLOCK broadcast mode should not be used", DeprecationWarning, stacklevel=2) - req = tx_service.BroadcastTxRequest(tx_bytes=tx_byte, mode=tx_service.BroadcastMode.BROADCAST_MODE_BLOCK) - metadata = self.network.chain_cookie_assistant.metadata() - result = await self.stubTx.BroadcastTx(request=req, metadata=metadata) - return result.tx_response - async def get_chain_id(self) -> str: latest_block = await self.fetch_latest_block() return latest_block["block"]["header"]["chainId"] - async def get_grants(self, granter: str, grantee: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_grants` instead - """ - warn("This method is deprecated. Use fetch_grants instead", DeprecationWarning, stacklevel=2) - return await self.stubAuthz.Grants( - authz_query.QueryGrantsRequest( - granter=granter, - grantee=grantee, - msg_type_url=kwargs.get("msg_type_url"), - ) - ) - async def fetch_grants( self, granter: str, @@ -500,23 +384,9 @@ async def fetch_grants( pagination=pagination, ) - async def get_bank_balances(self, address: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_balances` instead - """ - warn("This method is deprecated. Use fetch_bank_balances instead", DeprecationWarning, stacklevel=2) - return await self.stubBank.AllBalances(bank_query.QueryAllBalancesRequest(address=address)) - async def fetch_bank_balances(self, address: str) -> Dict[str, Any]: return await self.bank_api.fetch_balances(account_address=address) - async def get_bank_balance(self, address: str, denom: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_bank_balance` instead - """ - warn("This method is deprecated. Use fetch_bank_balance instead", DeprecationWarning, stacklevel=2) - return await self.stubBank.Balance(bank_query.QueryBalanceRequest(address=address, denom=denom)) - async def fetch_bank_balance(self, address: str, denom: str) -> Dict[str, Any]: return await self.bank_api.fetch_balance(account_address=address, denom=denom) @@ -1027,36 +897,12 @@ async def fetch_denom_min_notionals(self) -> Dict[str, Any]: # Auction RPC - async def get_auction(self, bid_round: int): - """ - This method is deprecated and will be removed soon. Please use `fetch_auction` instead - """ - warn("This method is deprecated. Use fetch_auction instead", DeprecationWarning, stacklevel=2) - req = auction_rpc_pb.AuctionEndpointRequest(round=bid_round) - return await self.stubAuction.AuctionEndpoint(req) - async def fetch_auction(self, round: int) -> Dict[str, Any]: return await self.exchange_auction_api.fetch_auction(round=round) - async def get_auctions(self): - """ - This method is deprecated and will be removed soon. Please use `fetch_auctions` instead - """ - warn("This method is deprecated. Use fetch_auctions instead", DeprecationWarning, stacklevel=2) - req = auction_rpc_pb.AuctionsRequest() - return await self.stubAuction.Auctions(req) - async def fetch_auctions(self) -> Dict[str, Any]: return await self.exchange_auction_api.fetch_auctions() - async def stream_bids(self): - """ - This method is deprecated and will be removed soon. Please use `listen_bids_updates` instead - """ - warn("This method is deprecated. Use listen_bids_updates instead", DeprecationWarning, stacklevel=2) - req = auction_rpc_pb.StreamBidsRequest() - return self.stubAuction.StreamBids(req) - async def listen_bids_updates( self, callback: Callable, @@ -1074,49 +920,15 @@ async def fetch_inj_burnt(self) -> Dict[str, Any]: # Meta RPC - async def ping(self): - """ - This method is deprecated and will be removed soon. Please use `fetch_ping` instead - """ - warn("This method is deprecated. Use fetch_ping instead", DeprecationWarning, stacklevel=2) - req = exchange_meta_rpc_pb.PingRequest() - return await self.stubMeta.Ping(req) - async def fetch_ping(self) -> Dict[str, Any]: return await self.exchange_meta_api.fetch_ping() - async def version(self): - """ - This method is deprecated and will be removed soon. Please use `fetch_version` instead - """ - warn("This method is deprecated. Use fetch_version instead", DeprecationWarning, stacklevel=2) - req = exchange_meta_rpc_pb.VersionRequest() - return await self.stubMeta.Version(req) - async def fetch_version(self) -> Dict[str, Any]: return await self.exchange_meta_api.fetch_version() - async def info(self): - """ - This method is deprecated and will be removed soon. Please use `fetch_info` instead - """ - warn("This method is deprecated. Use fetch_info instead", DeprecationWarning, stacklevel=2) - req = exchange_meta_rpc_pb.InfoRequest( - timestamp=int(time.time() * 1000), - ) - return await self.stubMeta.Info(req) - async def fetch_info(self) -> Dict[str, Any]: return await self.exchange_meta_api.fetch_info() - async def stream_keepalive(self): - """ - This method is deprecated and will be removed soon. Please use `listen_keepalive` instead - """ - warn("This method is deprecated. Use listen_keepalive instead", DeprecationWarning, stacklevel=2) - req = exchange_meta_rpc_pb.StreamKeepaliveRequest() - return self.stubMeta.StreamKeepalive(req) - async def listen_keepalive( self, callback: Callable, @@ -1224,14 +1036,6 @@ async def fetch_node_info(self) -> Dict[str, Any]: async def fetch_syncing(self) -> Dict[str, Any]: return await self.tendermint_api.fetch_syncing() - async def get_latest_block(self) -> tendermint_query.GetLatestBlockResponse: - """ - This method is deprecated and will be removed soon. Please use `fetch_latest_block` instead - """ - warn("This method is deprecated. Use fetch_latest_block instead", DeprecationWarning, stacklevel=2) - req = tendermint_query.GetLatestBlockRequest() - return await self.stubCosmosTendermint.GetLatestBlock(req) - async def fetch_latest_block(self) -> Dict[str, Any]: return await self.tendermint_api.fetch_latest_block() @@ -1256,34 +1060,9 @@ async def abci_query( # ------------------------------ # Explorer RPC - async def get_tx_by_hash(self, tx_hash: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_tx_by_tx_hash` instead - """ - warn("This method is deprecated. Use fetch_tx_by_tx_hash instead", DeprecationWarning, stacklevel=2) - - req = explorer_rpc_pb.GetTxByTxHashRequest(hash=tx_hash) - return await self.stubExplorer.GetTxByTxHash(req) - async def fetch_tx_by_tx_hash(self, tx_hash: str) -> Dict[str, Any]: return await self.exchange_explorer_api.fetch_tx_by_tx_hash(tx_hash=tx_hash) - async def get_account_txs(self, address: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_account_txs` instead - """ - warn("This method is deprecated. Use fetch_account_txs instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.GetAccountTxsRequest( - address=address, - before=kwargs.get("before"), - after=kwargs.get("after"), - limit=kwargs.get("limit"), - skip=kwargs.get("skip"), - type=kwargs.get("type"), - module=kwargs.get("module"), - ) - return await self.stubExplorer.GetAccountTxs(req) - async def fetch_account_txs( self, address: str, @@ -1308,17 +1087,19 @@ async def fetch_account_txs( pagination=pagination, ) - async def get_blocks(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_blocks` instead - """ - warn("This method is deprecated. Use fetch_blocks instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.GetBlocksRequest( - before=kwargs.get("before"), - after=kwargs.get("after"), - limit=kwargs.get("limit"), + async def fetch_contract_txs_v2( + self, + address: str, + height: Optional[int] = None, + token: Optional[str] = None, + pagination: Optional[PaginationOption] = None, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_contract_txs_v2( + address=address, + height=height, + token=token, + pagination=pagination, ) - return await self.stubExplorer.GetBlocks(req) async def fetch_blocks( self, @@ -1328,31 +1109,23 @@ async def fetch_blocks( ) -> Dict[str, Any]: return await self.exchange_explorer_api.fetch_blocks(before=before, after=after, pagination=pagination) - async def get_block(self, block_height: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_block` instead - """ - warn("This method is deprecated. Use fetch_block instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.GetBlockRequest(id=block_height) - return await self.stubExplorer.GetBlock(req) - async def fetch_block(self, block_id: str) -> Dict[str, Any]: return await self.exchange_explorer_api.fetch_block(block_id=block_id) - async def get_txs(self, **kwargs): + async def fetch_validators(self) -> Dict[str, Any]: """ - This method is deprecated and will be removed soon. Please use `fetch_txs` instead + Fetch validators from the explorer API. + + Returns: + Dict containing validator information """ - warn("This method is deprecated. Use fetch_txs instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.GetTxsRequest( - before=kwargs.get("before"), - after=kwargs.get("after"), - limit=kwargs.get("limit"), - skip=kwargs.get("skip"), - type=kwargs.get("type"), - module=kwargs.get("module"), - ) - return await self.stubExplorer.GetTxs(req) + return await self.exchange_explorer_api.fetch_validators() + + async def fetch_validator(self, address: str) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_validator(address) + + async def fetch_validator_uptime(self, address: str) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_validator_uptime(address=address) async def fetch_txs( self, @@ -1376,14 +1149,6 @@ async def fetch_txs( pagination=pagination, ) - async def stream_txs(self): - """ - This method is deprecated and will be removed soon. Please use `listen_txs_updates` instead - """ - warn("This method is deprecated. Use listen_txs_updates instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.StreamTxsRequest() - return self.stubExplorer.StreamTxs(req) - async def listen_txs_updates( self, callback: Callable, @@ -1396,14 +1161,6 @@ async def listen_txs_updates( on_status_callback=on_status_callback, ) - async def stream_blocks(self): - """ - This method is deprecated and will be removed soon. Please use `listen_blocks_updates` instead - """ - warn("This method is deprecated. Use listen_blocks_updates instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.StreamBlocksRequest() - return self.stubExplorer.StreamBlocks(req) - async def listen_blocks_updates( self, callback: Callable, @@ -1416,19 +1173,6 @@ async def listen_blocks_updates( on_status_callback=on_status_callback, ) - async def get_peggy_deposits(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_peggy_deposit_txs` instead - """ - warn("This method is deprecated. Use fetch_peggy_deposit_txs instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.GetPeggyDepositTxsRequest( - sender=kwargs.get("sender"), - receiver=kwargs.get("receiver"), - limit=kwargs.get("limit"), - skip=kwargs.get("skip"), - ) - return await self.stubExplorer.GetPeggyDepositTxs(req) - async def fetch_peggy_deposit_txs( self, sender: Optional[str] = None, @@ -1441,19 +1185,6 @@ async def fetch_peggy_deposit_txs( pagination=pagination, ) - async def get_peggy_withdrawals(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_peggy_withdrawal_txs` instead - """ - warn("This method is deprecated. Use fetch_peggy_withdrawal_txs instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.GetPeggyWithdrawalTxsRequest( - sender=kwargs.get("sender"), - receiver=kwargs.get("receiver"), - limit=kwargs.get("limit"), - skip=kwargs.get("skip"), - ) - return await self.stubExplorer.GetPeggyWithdrawalTxs(req) - async def fetch_peggy_withdrawal_txs( self, sender: Optional[str] = None, @@ -1466,23 +1197,6 @@ async def fetch_peggy_withdrawal_txs( pagination=pagination, ) - async def get_ibc_transfers(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_ibc_transfer_txs` instead - """ - warn("This method is deprecated. Use fetch_ibc_transfer_txs instead", DeprecationWarning, stacklevel=2) - req = explorer_rpc_pb.GetIBCTransferTxsRequest( - sender=kwargs.get("sender"), - receiver=kwargs.get("receiver"), - src_channel=kwargs.get("src_channel"), - src_port=kwargs.get("src_port"), - dest_channel=kwargs.get("dest_channel"), - dest_port=kwargs.get("dest_port"), - limit=kwargs.get("limit"), - skip=kwargs.get("skip"), - ) - return await self.stubExplorer.GetIBCTransferTxs(req) - async def fetch_ibc_transfer_txs( self, sender: Optional[str] = None, @@ -1503,19 +1217,79 @@ async def fetch_ibc_transfer_txs( pagination=pagination, ) - # AccountsRPC + async def fetch_wasm_codes( + self, + pagination: Optional[PaginationOption] = None, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_wasm_codes( + pagination=pagination, + ) - async def stream_subaccount_balance(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_subaccount_balance_updates` instead - """ - warn( - "This method is deprecated. Use listen_subaccount_balance_updates instead", DeprecationWarning, stacklevel=2 + async def fetch_wasm_code_by_id( + self, + code_id: int, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_wasm_code_by_id(code_id=code_id) + + async def fetch_wasm_contracts( + self, + code_id: Optional[int] = None, + assets_only: Optional[bool] = None, + label: Optional[str] = None, + pagination: Optional[PaginationOption] = None, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_wasm_contracts( + code_id=code_id, + assets_only=assets_only, + label=label, + pagination=pagination, + ) + + async def fetch_wasm_contract_by_address( + self, + address: str, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_wasm_contract_by_address(address=address) + + async def fetch_cw20_balance( + self, + address: str, + pagination: Optional[PaginationOption] = None, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_cw20_balance( + address=address, + pagination=pagination, + ) + + async def fetch_relayers( + self, + market_ids: Optional[List[str]] = None, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_relayers( + market_ids=market_ids, ) - req = exchange_accounts_rpc_pb.StreamSubaccountBalanceRequest( - subaccount_id=subaccount_id, denoms=kwargs.get("denoms") + + async def fetch_bank_transfers( + self, + senders: Optional[List[str]] = None, + recipients: Optional[List[str]] = None, + is_community_pool_related: Optional[bool] = None, + address: Optional[List[str]] = None, + per_page: Optional[int] = None, + token: Optional[str] = None, + pagination: Optional[PaginationOption] = None, + ) -> Dict[str, Any]: + return await self.exchange_explorer_api.fetch_bank_transfers( + senders=senders, + recipients=recipients, + is_community_pool_related=is_community_pool_related, + address=address, + per_page=per_page, + token=token, + pagination=pagination, ) - return self.stubExchangeAccount.StreamSubaccountBalance(req) + + # AccountsRPC async def listen_subaccount_balance_updates( self, @@ -1533,38 +1307,12 @@ async def listen_subaccount_balance_updates( denoms=denoms, ) - async def get_subaccount_balance(self, subaccount_id: str, denom: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_subaccount_balance` instead - """ - warn("This method is deprecated. Use fetch_subaccount_balance instead", DeprecationWarning, stacklevel=2) - req = exchange_accounts_rpc_pb.SubaccountBalanceEndpointRequest(subaccount_id=subaccount_id, denom=denom) - return await self.stubExchangeAccount.SubaccountBalanceEndpoint(req) - async def fetch_subaccount_balance(self, subaccount_id: str, denom: str) -> Dict[str, Any]: return await self.exchange_account_api.fetch_subaccount_balance(subaccount_id=subaccount_id, denom=denom) - async def get_subaccount_list(self, account_address: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_subaccounts_list` instead - """ - warn("This method is deprecated. Use fetch_subaccounts_list instead", DeprecationWarning, stacklevel=2) - req = exchange_accounts_rpc_pb.SubaccountsListRequest(account_address=account_address) - return await self.stubExchangeAccount.SubaccountsList(req) - async def fetch_subaccounts_list(self, address: str) -> Dict[str, Any]: return await self.exchange_account_api.fetch_subaccounts_list(address=address) - async def get_subaccount_balances_list(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_subaccount_balances_list` instead - """ - warn("This method is deprecated. Use fetch_subaccount_balances_list instead", DeprecationWarning, stacklevel=2) - req = exchange_accounts_rpc_pb.SubaccountBalancesListRequest( - subaccount_id=subaccount_id, denoms=kwargs.get("denoms") - ) - return await self.stubExchangeAccount.SubaccountBalancesList(req) - async def fetch_subaccount_balances_list( self, subaccount_id: str, denoms: Optional[List[str]] = None ) -> Dict[str, Any]: @@ -1572,21 +1320,6 @@ async def fetch_subaccount_balances_list( subaccount_id=subaccount_id, denoms=denoms ) - async def get_subaccount_history(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_subaccount_history` instead - """ - warn("This method is deprecated. Use fetch_subaccount_history instead", DeprecationWarning, stacklevel=2) - req = exchange_accounts_rpc_pb.SubaccountHistoryRequest( - subaccount_id=subaccount_id, - denom=kwargs.get("denom"), - transfer_types=kwargs.get("transfer_types"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - end_time=kwargs.get("end_time"), - ) - return await self.stubExchangeAccount.SubaccountHistory(req) - async def fetch_subaccount_history( self, subaccount_id: str, @@ -1601,18 +1334,6 @@ async def fetch_subaccount_history( pagination=pagination, ) - async def get_subaccount_order_summary(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_subaccount_order_summary` instead - """ - warn("This method is deprecated. Use fetch_subaccount_order_summary instead", DeprecationWarning, stacklevel=2) - req = exchange_accounts_rpc_pb.SubaccountOrderSummaryRequest( - subaccount_id=subaccount_id, - order_direction=kwargs.get("order_direction"), - market_id=kwargs.get("market_id"), - ) - return await self.stubExchangeAccount.SubaccountOrderSummary(req) - async def fetch_subaccount_order_summary( self, subaccount_id: str, @@ -1625,17 +1346,6 @@ async def fetch_subaccount_order_summary( order_direction=order_direction, ) - async def get_order_states(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_order_states` instead - """ - warn("This method is deprecated. Use fetch_order_states instead", DeprecationWarning, stacklevel=2) - req = exchange_accounts_rpc_pb.OrderStatesRequest( - spot_order_hashes=kwargs.get("spot_order_hashes"), - derivative_order_hashes=kwargs.get("derivative_order_hashes"), - ) - return await self.stubExchangeAccount.OrderStates(req) - async def fetch_order_states( self, spot_order_hashes: Optional[List[str]] = None, @@ -1646,43 +1356,14 @@ async def fetch_order_states( derivative_order_hashes=derivative_order_hashes, ) - async def get_portfolio(self, account_address: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_portfolio` instead - """ - warn("This method is deprecated. Use fetch_portfolio instead", DeprecationWarning, stacklevel=2) - - req = exchange_accounts_rpc_pb.PortfolioRequest(account_address=account_address) - return await self.stubExchangeAccount.Portfolio(req) - async def fetch_portfolio(self, account_address: str) -> Dict[str, Any]: return await self.exchange_account_api.fetch_portfolio(account_address=account_address) - async def get_rewards(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_rewards` instead - """ - warn("This method is deprecated. Use fetch_rewards instead", DeprecationWarning, stacklevel=2) - req = exchange_accounts_rpc_pb.RewardsRequest( - account_address=kwargs.get("account_address"), epoch=kwargs.get("epoch") - ) - return await self.stubExchangeAccount.Rewards(req) - async def fetch_rewards(self, account_address: Optional[str] = None, epoch: Optional[int] = None) -> Dict[str, Any]: return await self.exchange_account_api.fetch_rewards(account_address=account_address, epoch=epoch) # OracleRPC - async def stream_oracle_prices(self, base_symbol: str, quote_symbol: str, oracle_type: str): - """ - This method is deprecated and will be removed soon. Please use `listen_subaccount_balance_updates` instead - """ - warn("This method is deprecated. Use listen_oracle_prices_updates instead", DeprecationWarning, stacklevel=2) - req = oracle_rpc_pb.StreamPricesRequest( - base_symbol=base_symbol, quote_symbol=quote_symbol, oracle_type=oracle_type - ) - return self.stubOracle.StreamPrices(req) - async def listen_oracle_prices_updates( self, callback: Callable, @@ -1701,25 +1382,6 @@ async def listen_oracle_prices_updates( oracle_type=oracle_type, ) - async def get_oracle_prices( - self, - base_symbol: str, - quote_symbol: str, - oracle_type: str, - oracle_scale_factor: int, - ): - """ - This method is deprecated and will be removed soon. Please use `fetch_oracle_price` instead - """ - warn("This method is deprecated. Use fetch_oracle_price instead", DeprecationWarning, stacklevel=2) - req = oracle_rpc_pb.PriceRequest( - base_symbol=base_symbol, - quote_symbol=quote_symbol, - oracle_type=oracle_type, - oracle_scale_factor=oracle_scale_factor, - ) - return await self.stubOracle.Price(req) - async def fetch_oracle_price( self, base_symbol: Optional[str] = None, @@ -1734,42 +1396,14 @@ async def fetch_oracle_price( oracle_scale_factor=oracle_scale_factor, ) - async def get_oracle_list(self): - """ - This method is deprecated and will be removed soon. Please use `fetch_oracle_list` instead - """ - warn("This method is deprecated. Use fetch_oracle_list instead", DeprecationWarning, stacklevel=2) - req = oracle_rpc_pb.OracleListRequest() - return await self.stubOracle.OracleList(req) - async def fetch_oracle_list(self) -> Dict[str, Any]: return await self.exchange_oracle_api.fetch_oracle_list() # InsuranceRPC - async def get_insurance_funds(self): - """ - This method is deprecated and will be removed soon. Please use `fetch_insurance_funds` instead - """ - warn("This method is deprecated. Use fetch_insurance_funds instead", DeprecationWarning, stacklevel=2) - req = insurance_rpc_pb.FundsRequest() - return await self.stubInsurance.Funds(req) - async def fetch_insurance_funds(self) -> Dict[str, Any]: return await self.exchange_insurance_api.fetch_insurance_funds() - async def get_redemptions(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_redemptions` instead - """ - warn("This method is deprecated. Use fetch_redemptions instead", DeprecationWarning, stacklevel=2) - req = insurance_rpc_pb.RedemptionsRequest( - redeemer=kwargs.get("redeemer"), - redemption_denom=kwargs.get("redemption_denom"), - status=kwargs.get("status"), - ) - return await self.stubInsurance.Redemptions(req) - async def fetch_redemptions( self, address: Optional[str] = None, @@ -1784,29 +1418,9 @@ async def fetch_redemptions( # SpotRPC - async def get_spot_market(self, market_id: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_market` instead - """ - warn("This method is deprecated. Use fetch_spot_market instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.MarketRequest(market_id=market_id) - return await self.stubSpotExchange.Market(req) - async def fetch_spot_market(self, market_id: str) -> Dict[str, Any]: return await self.exchange_spot_api.fetch_market(market_id=market_id) - async def get_spot_markets(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_markets` instead - """ - warn("This method is deprecated. Use fetch_spot_markets instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.MarketsRequest( - market_status=kwargs.get("market_status"), - base_denom=kwargs.get("base_denom"), - quote_denom=kwargs.get("quote_denom"), - ) - return await self.stubSpotExchange.Markets(req) - async def fetch_spot_markets( self, market_statuses: Optional[List[str]] = None, @@ -1817,16 +1431,6 @@ async def fetch_spot_markets( market_statuses=market_statuses, base_denom=base_denom, quote_denom=quote_denom ) - async def stream_spot_markets(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_spot_markets_updates` instead - """ - warn("This method is deprecated. Use listen_spot_markets_updates instead", DeprecationWarning, stacklevel=2) - - req = spot_exchange_rpc_pb.StreamMarketsRequest(market_ids=kwargs.get("market_ids")) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubSpotExchange.StreamMarkets(request=req, metadata=metadata) - async def listen_spot_markets_updates( self, callback: Callable, @@ -1841,49 +1445,12 @@ async def listen_spot_markets_updates( market_ids=market_ids, ) - async def get_spot_orderbookV2(self, market_id: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_orderbook_v2` instead - """ - warn("This method is deprecated. Use fetch_spot_orderbook_v2 instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.OrderbookV2Request(market_id=market_id) - return await self.stubSpotExchange.OrderbookV2(req) - async def fetch_spot_orderbook_v2(self, market_id: str) -> Dict[str, Any]: return await self.exchange_spot_api.fetch_orderbook_v2(market_id=market_id) - async def get_spot_orderbooksV2(self, market_ids: List): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_orderbooks_v2` instead - """ - warn("This method is deprecated. Use fetch_spot_orderbooks_v2 instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.OrderbooksV2Request(market_ids=market_ids) - return await self.stubSpotExchange.OrderbooksV2(req) - async def fetch_spot_orderbooks_v2(self, market_ids: List[str]) -> Dict[str, Any]: return await self.exchange_spot_api.fetch_orderbooks_v2(market_ids=market_ids) - async def get_spot_orders(self, market_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_orders` instead - """ - warn("This method is deprecated. Use fetch_spot_orders instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.OrdersRequest( - market_id=market_id, - order_side=kwargs.get("order_side"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - include_inactive=kwargs.get("include_inactive"), - subaccount_total_orders=kwargs.get("subaccount_total_orders"), - trade_id=kwargs.get("trade_id"), - cid=kwargs.get("cid"), - ) - return await self.stubSpotExchange.Orders(req) - async def fetch_spot_orders( self, market_ids: Optional[List[str]] = None, @@ -1906,35 +1473,6 @@ async def fetch_spot_orders( pagination=pagination, ) - async def get_historical_spot_orders(self, market_id: Optional[str] = None, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_orders_history` instead - """ - warn("This method is deprecated. Use fetch_spot_orders_history instead", DeprecationWarning, stacklevel=2) - market_ids = kwargs.get("market_ids", []) - if market_id is not None: - market_ids.append(market_id) - order_types = kwargs.get("order_types", []) - order_type = kwargs.get("order_type") - if order_type is not None: - order_types.append(market_id) - req = spot_exchange_rpc_pb.OrdersHistoryRequest( - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - order_types=order_types, - direction=kwargs.get("direction"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - state=kwargs.get("state"), - execution_types=kwargs.get("execution_types", []), - market_ids=market_ids, - trade_id=kwargs.get("trade_id"), - active_markets_only=kwargs.get("active_markets_only"), - cid=kwargs.get("cid"), - ) - return await self.stubSpotExchange.OrdersHistory(req) - async def fetch_spot_orders_history( self, subaccount_id: Optional[str] = None, @@ -1961,29 +1499,6 @@ async def fetch_spot_orders_history( pagination=pagination, ) - async def get_spot_trades(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_trades` instead - """ - warn("This method is deprecated. Use fetch_spot_trades instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.TradesRequest( - market_id=kwargs.get("market_id"), - execution_side=kwargs.get("execution_side"), - direction=kwargs.get("direction"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - subaccount_ids=kwargs.get("subaccount_ids"), - execution_types=kwargs.get("execution_types"), - trade_id=kwargs.get("trade_id"), - account_address=kwargs.get("account_address"), - cid=kwargs.get("cid"), - ) - return await self.stubSpotExchange.Trades(req) - async def fetch_spot_trades( self, market_ids: Optional[List[str]] = None, @@ -2010,15 +1525,6 @@ async def fetch_spot_trades( pagination=pagination, ) - async def stream_spot_orderbook_snapshot(self, market_ids: List[str]): - """ - This method is deprecated and will be removed soon. Please use `listen_spot_orderbook_snapshots` instead - """ - warn("This method is deprecated. Use listen_spot_orderbook_snapshots instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.StreamOrderbookV2Request(market_ids=market_ids) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubSpotExchange.StreamOrderbookV2(request=req, metadata=metadata) - async def listen_spot_orderbook_snapshots( self, market_ids: List[str], @@ -2033,15 +1539,6 @@ async def listen_spot_orderbook_snapshots( on_status_callback=on_status_callback, ) - async def stream_spot_orderbook_update(self, market_ids: List[str]): - """ - This method is deprecated and will be removed soon. Please use `listen_spot_orderbook_updates` instead - """ - warn("This method is deprecated. Use listen_spot_orderbook_updates instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.StreamOrderbookUpdateRequest(market_ids=market_ids) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubSpotExchange.StreamOrderbookUpdate(request=req, metadata=metadata) - async def listen_spot_orderbook_updates( self, market_ids: List[str], @@ -2056,28 +1553,6 @@ async def listen_spot_orderbook_updates( on_status_callback=on_status_callback, ) - async def stream_spot_orders(self, market_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_spot_orders_updates` instead - """ - warn("This method is deprecated. Use listen_spot_orders_updates instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.StreamOrdersRequest( - market_id=market_id, - order_side=kwargs.get("order_side"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - include_inactive=kwargs.get("include_inactive"), - subaccount_total_orders=kwargs.get("subaccount_total_orders"), - trade_id=kwargs.get("trade_id"), - cid=kwargs.get("cid"), - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubSpotExchange.StreamOrders(request=req, metadata=metadata) - async def listen_spot_orders_updates( self, callback: Callable, @@ -2106,26 +1581,6 @@ async def listen_spot_orders_updates( pagination=pagination, ) - async def stream_historical_spot_orders(self, market_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_spot_orders_history_updates` instead - """ - warn( - "This method is deprecated. Use listen_spot_orders_history_updates instead", - DeprecationWarning, - stacklevel=2, - ) - req = spot_exchange_rpc_pb.StreamOrdersHistoryRequest( - market_id=market_id, - direction=kwargs.get("direction"), - subaccount_id=kwargs.get("subaccount_id"), - order_types=kwargs.get("order_types"), - state=kwargs.get("state"), - execution_types=kwargs.get("execution_types"), - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubSpotExchange.StreamOrdersHistory(request=req, metadata=metadata) - async def listen_spot_orders_history_updates( self, callback: Callable, @@ -2150,27 +1605,6 @@ async def listen_spot_orders_history_updates( execution_types=execution_types, ) - async def stream_historical_derivative_orders(self, market_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. - Please use `listen_derivative_orders_history_updates` instead - """ - warn( - "This method is deprecated. Use listen_derivative_orders_history_updates instead", - DeprecationWarning, - stacklevel=2, - ) - req = derivative_exchange_rpc_pb.StreamOrdersHistoryRequest( - market_id=market_id, - direction=kwargs.get("direction"), - subaccount_id=kwargs.get("subaccount_id"), - order_types=kwargs.get("order_types"), - state=kwargs.get("state"), - execution_types=kwargs.get("execution_types"), - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubDerivativeExchange.StreamOrdersHistory(request=req, metadata=metadata) - async def listen_derivative_orders_history_updates( self, callback: Callable, @@ -2195,30 +1629,6 @@ async def listen_derivative_orders_history_updates( execution_types=execution_types, ) - async def stream_spot_trades(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_spot_trades_updates` instead - """ - warn("This method is deprecated. Use listen_spot_trades_updates instead", DeprecationWarning, stacklevel=2) - req = spot_exchange_rpc_pb.StreamTradesRequest( - market_id=kwargs.get("market_id"), - execution_side=kwargs.get("execution_side"), - direction=kwargs.get("direction"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - subaccount_ids=kwargs.get("subaccount_ids"), - execution_types=kwargs.get("execution_types"), - trade_id=kwargs.get("trade_id"), - account_address=kwargs.get("account_address"), - cid=kwargs.get("cid"), - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubSpotExchange.StreamTrades(request=req, metadata=metadata) - async def listen_spot_trades_updates( self, callback: Callable, @@ -2251,21 +1661,6 @@ async def listen_spot_trades_updates( pagination=pagination, ) - async def get_spot_subaccount_orders(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_subaccount_orders_list` instead - """ - warn( - "This method is deprecated. Use fetch_spot_subaccount_orders_list instead", DeprecationWarning, stacklevel=2 - ) - req = spot_exchange_rpc_pb.SubaccountOrdersListRequest( - subaccount_id=subaccount_id, - market_id=kwargs.get("market_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - ) - return await self.stubSpotExchange.SubaccountOrdersList(req) - async def fetch_spot_subaccount_orders_list( self, subaccount_id: str, @@ -2276,23 +1671,6 @@ async def fetch_spot_subaccount_orders_list( subaccount_id=subaccount_id, market_id=market_id, pagination=pagination ) - async def get_spot_subaccount_trades(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_spot_subaccount_trades_list` instead - """ - warn( - "This method is deprecated. Use fetch_spot_subaccount_trades_list instead", DeprecationWarning, stacklevel=2 - ) - req = spot_exchange_rpc_pb.SubaccountTradesListRequest( - subaccount_id=subaccount_id, - market_id=kwargs.get("market_id"), - execution_type=kwargs.get("execution_type"), - direction=kwargs.get("direction"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - ) - return await self.stubSpotExchange.SubaccountTradesList(req) - async def fetch_spot_subaccount_trades_list( self, subaccount_id: str, @@ -2311,28 +1689,9 @@ async def fetch_spot_subaccount_trades_list( # DerivativeRPC - async def get_derivative_market(self, market_id: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_market` instead - """ - warn("This method is deprecated. Use fetch_derivative_market instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.MarketRequest(market_id=market_id) - return await self.stubDerivativeExchange.Market(req) - async def fetch_derivative_market(self, market_id: str) -> Dict[str, Any]: return await self.exchange_derivative_api.fetch_market(market_id=market_id) - async def get_derivative_markets(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_markets` instead - """ - warn("This method is deprecated. Use fetch_derivative_markets instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.MarketsRequest( - market_status=kwargs.get("market_status"), - quote_denom=kwargs.get("quote_denom"), - ) - return await self.stubDerivativeExchange.Markets(req) - async def fetch_derivative_markets( self, market_statuses: Optional[List[str]] = None, @@ -2343,17 +1702,6 @@ async def fetch_derivative_markets( quote_denom=quote_denom, ) - async def stream_derivative_markets(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_derivative_market_updates` instead - """ - warn( - "This method is deprecated. Use listen_derivative_market_updates instead", DeprecationWarning, stacklevel=2 - ) - req = derivative_exchange_rpc_pb.StreamMarketRequest(market_ids=kwargs.get("market_ids")) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubDerivativeExchange.StreamMarket(request=req, metadata=metadata) - async def listen_derivative_market_updates( self, callback: Callable, @@ -2368,51 +1716,12 @@ async def listen_derivative_market_updates( market_ids=market_ids, ) - async def get_derivative_orderbook(self, market_id: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_orderbook_v2` instead - """ - warn("This method is deprecated. Use fetch_derivative_orderbook_v2 instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.OrderbookV2Request(market_id=market_id) - return await self.stubDerivativeExchange.OrderbookV2(req) - async def fetch_derivative_orderbook_v2(self, market_id: str) -> Dict[str, Any]: return await self.exchange_derivative_api.fetch_orderbook_v2(market_id=market_id) - async def get_derivative_orderbooksV2(self, market_ids: List[str]): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_orderbooks_v2` instead - """ - warn("This method is deprecated. Use fetch_derivative_orderbooks_v2 instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.OrderbooksV2Request(market_ids=market_ids) - return await self.stubDerivativeExchange.OrderbooksV2(req) - async def fetch_derivative_orderbooks_v2(self, market_ids: List[str]) -> Dict[str, Any]: return await self.exchange_derivative_api.fetch_orderbooks_v2(market_ids=market_ids) - async def get_derivative_orders(self, market_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_orders` instead - """ - warn("This method is deprecated. Use fetch_derivative_orders instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.OrdersRequest( - market_id=market_id, - order_side=kwargs.get("order_side"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - is_conditional=kwargs.get("is_conditional"), - order_type=kwargs.get("order_type"), - include_inactive=kwargs.get("include_inactive"), - subaccount_total_orders=kwargs.get("subaccount_total_orders"), - trade_id=kwargs.get("trade_id"), - cid=kwargs.get("cid"), - ) - return await self.stubDerivativeExchange.Orders(req) - async def fetch_derivative_orders( self, market_ids: Optional[List[str]] = None, @@ -2439,36 +1748,6 @@ async def fetch_derivative_orders( pagination=pagination, ) - async def get_historical_derivative_orders(self, market_id: Optional[str] = None, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_orders_history` instead - """ - warn("This method is deprecated. Use fetch_derivative_orders_history instead", DeprecationWarning, stacklevel=2) - market_ids = kwargs.get("market_ids", []) - if market_id is not None: - market_ids.append(market_id) - order_types = kwargs.get("order_types", []) - order_type = kwargs.get("order_type") - if order_type is not None: - order_types.append(market_id) - req = derivative_exchange_rpc_pb.OrdersHistoryRequest( - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - order_types=order_types, - direction=kwargs.get("direction"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - is_conditional=kwargs.get("is_conditional"), - state=kwargs.get("state"), - execution_types=kwargs.get("execution_types", []), - market_ids=market_ids, - trade_id=kwargs.get("trade_id"), - active_markets_only=kwargs.get("active_markets_only"), - cid=kwargs.get("cid"), - ) - return await self.stubDerivativeExchange.OrdersHistory(req) - async def fetch_derivative_orders_history( self, subaccount_id: Optional[str] = None, @@ -2497,29 +1776,6 @@ async def fetch_derivative_orders_history( pagination=pagination, ) - async def get_derivative_trades(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_trades` instead - """ - warn("This method is deprecated. Use fetch_derivative_trades instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.TradesRequest( - market_id=kwargs.get("market_id"), - execution_side=kwargs.get("execution_side"), - direction=kwargs.get("direction"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - subaccount_ids=kwargs.get("subaccount_ids"), - execution_types=kwargs.get("execution_types"), - trade_id=kwargs.get("trade_id"), - account_address=kwargs.get("account_address"), - cid=kwargs.get("cid"), - ) - return await self.stubDerivativeExchange.Trades(req) - async def fetch_derivative_trades( self, market_ids: Optional[List[str]] = None, @@ -2546,19 +1802,6 @@ async def fetch_derivative_trades( pagination=pagination, ) - async def stream_derivative_orderbook_snapshot(self, market_ids: List[str]): - """ - This method is deprecated and will be removed soon. Please use `listen_derivative_orderbook_snapshots` instead - """ - warn( - "This method is deprecated. Use listen_derivative_orderbook_snapshots instead", - DeprecationWarning, - stacklevel=2, - ) - req = derivative_exchange_rpc_pb.StreamOrderbookV2Request(market_ids=market_ids) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubDerivativeExchange.StreamOrderbookV2(request=req, metadata=metadata) - async def listen_derivative_orderbook_snapshots( self, market_ids: List[str], @@ -2573,19 +1816,6 @@ async def listen_derivative_orderbook_snapshots( on_status_callback=on_status_callback, ) - async def stream_derivative_orderbook_update(self, market_ids: List[str]): - """ - This method is deprecated and will be removed soon. Please use `listen_derivative_orderbook_updates` instead - """ - warn( - "This method is deprecated. Use listen_derivative_orderbook_updates instead", - DeprecationWarning, - stacklevel=2, - ) - req = derivative_exchange_rpc_pb.StreamOrderbookUpdateRequest(market_ids=market_ids) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubDerivativeExchange.StreamOrderbookUpdate(request=req, metadata=metadata) - async def listen_derivative_orderbook_updates( self, market_ids: List[str], @@ -2600,32 +1830,6 @@ async def listen_derivative_orderbook_updates( on_status_callback=on_status_callback, ) - async def stream_derivative_orders(self, market_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_derivative_orders_updates` instead - """ - warn( - "This method is deprecated. Use listen_derivative_orders_updates instead", DeprecationWarning, stacklevel=2 - ) - req = derivative_exchange_rpc_pb.StreamOrdersRequest( - market_id=market_id, - order_side=kwargs.get("order_side"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - is_conditional=kwargs.get("is_conditional"), - order_type=kwargs.get("order_type"), - include_inactive=kwargs.get("include_inactive"), - subaccount_total_orders=kwargs.get("subaccount_total_orders"), - trade_id=kwargs.get("trade_id"), - cid=kwargs.get("cid"), - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubDerivativeExchange.StreamOrders(request=req, metadata=metadata) - async def listen_derivative_orders_updates( self, callback: Callable, @@ -2658,32 +1862,6 @@ async def listen_derivative_orders_updates( pagination=pagination, ) - async def stream_derivative_trades(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_derivative_trades_updates` instead - """ - warn( - "This method is deprecated. Use listen_derivative_trades_updates instead", DeprecationWarning, stacklevel=2 - ) - req = derivative_exchange_rpc_pb.StreamTradesRequest( - market_id=kwargs.get("market_id"), - execution_side=kwargs.get("execution_side"), - direction=kwargs.get("direction"), - subaccount_id=kwargs.get("subaccount_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - start_time=kwargs.get("start_time"), - end_time=kwargs.get("end_time"), - market_ids=kwargs.get("market_ids"), - subaccount_ids=kwargs.get("subaccount_ids"), - execution_types=kwargs.get("execution_types"), - trade_id=kwargs.get("trade_id"), - account_address=kwargs.get("account_address"), - cid=kwargs.get("cid"), - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubDerivativeExchange.StreamTrades(request=req, metadata=metadata) - async def listen_derivative_trades_updates( self, callback: Callable, @@ -2716,22 +1894,6 @@ async def listen_derivative_trades_updates( pagination=pagination, ) - async def get_derivative_positions(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_positions_v2` instead - """ - warn("This method is deprecated. Use fetch_derivative_positions_v2 instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.PositionsRequest( - market_id=kwargs.get("market_id"), - market_ids=kwargs.get("market_ids"), - subaccount_id=kwargs.get("subaccount_id"), - direction=kwargs.get("direction"), - subaccount_total_positions=kwargs.get("subaccount_total_positions"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - ) - return await self.stubDerivativeExchange.Positions(req) - async def fetch_derivative_positions_v2( self, market_ids: Optional[List[str]] = None, @@ -2748,24 +1910,6 @@ async def fetch_derivative_positions_v2( pagination=pagination, ) - async def stream_derivative_positions(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_derivative_positions_updates` instead - """ - warn( - "This method is deprecated. Use listen_derivative_positions_updates instead", - DeprecationWarning, - stacklevel=2, - ) - req = derivative_exchange_rpc_pb.StreamPositionsRequest( - market_id=kwargs.get("market_id"), - market_ids=kwargs.get("market_ids"), - subaccount_id=kwargs.get("subaccount_id"), - subaccount_ids=kwargs.get("subaccount_ids"), - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubDerivativeExchange.StreamPositions(request=req, metadata=metadata) - async def listen_derivative_positions_updates( self, callback: Callable, @@ -2824,22 +1968,6 @@ async def listen_derivative_positions_v2_updates( account_address=account_address, ) - async def get_derivative_liquidable_positions(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_liquidable_positions` instead - """ - warn( - "This method is deprecated. Use fetch_derivative_liquidable_positions instead", - DeprecationWarning, - stacklevel=2, - ) - req = derivative_exchange_rpc_pb.LiquidablePositionsRequest( - market_id=kwargs.get("market_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - ) - return await self.stubDerivativeExchange.LiquidablePositions(req) - async def fetch_derivative_liquidable_positions( self, market_id: Optional[str] = None, @@ -2850,23 +1978,6 @@ async def fetch_derivative_liquidable_positions( pagination=pagination, ) - async def get_derivative_subaccount_orders(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_subaccount_orders` instead - """ - warn( - "This method is deprecated. Use fetch_derivative_subaccount_orders instead", - DeprecationWarning, - stacklevel=2, - ) - req = derivative_exchange_rpc_pb.SubaccountOrdersListRequest( - subaccount_id=subaccount_id, - market_id=kwargs.get("market_id"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - ) - return await self.stubDerivativeExchange.SubaccountOrdersList(req) - async def fetch_subaccount_orders_list( self, subaccount_id: str, @@ -2877,25 +1988,6 @@ async def fetch_subaccount_orders_list( subaccount_id=subaccount_id, market_id=market_id, pagination=pagination ) - async def get_derivative_subaccount_trades(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_derivative_subaccount_trades` instead - """ - warn( - "This method is deprecated. Use fetch_derivative_subaccount_trades instead", - DeprecationWarning, - stacklevel=2, - ) - req = derivative_exchange_rpc_pb.SubaccountTradesListRequest( - subaccount_id=subaccount_id, - market_id=kwargs.get("market_id"), - execution_type=kwargs.get("execution_type"), - direction=kwargs.get("direction"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - ) - return await self.stubDerivativeExchange.SubaccountTradesList(req) - async def fetch_derivative_subaccount_trades_list( self, subaccount_id: str, @@ -2912,21 +2004,6 @@ async def fetch_derivative_subaccount_trades_list( pagination=pagination, ) - async def get_funding_payments(self, subaccount_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_funding_payments` instead - """ - warn("This method is deprecated. Use fetch_funding_payments instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.FundingPaymentsRequest( - subaccount_id=subaccount_id, - market_id=kwargs.get("market_id"), - market_ids=kwargs.get("market_ids"), - skip=kwargs.get("skip"), - end_time=kwargs.get("end_time"), - limit=kwargs.get("limit"), - ) - return await self.stubDerivativeExchange.FundingPayments(req) - async def fetch_funding_payments( self, market_ids: Optional[List[str]] = None, @@ -2937,19 +2014,6 @@ async def fetch_funding_payments( market_ids=market_ids, subaccount_id=subaccount_id, pagination=pagination ) - async def get_funding_rates(self, market_id: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_funding_rates` instead - """ - warn("This method is deprecated. Use fetch_funding_rates instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.FundingRatesRequest( - market_id=market_id, - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - end_time=kwargs.get("end_time"), - ) - return await self.stubDerivativeExchange.FundingRates(req) - async def fetch_funding_rates( self, market_id: str, @@ -2957,19 +2021,6 @@ async def fetch_funding_rates( ) -> Dict[str, Any]: return await self.exchange_derivative_api.fetch_funding_rates(market_id=market_id, pagination=pagination) - async def get_binary_options_markets(self, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `fetch_binary_options_markets` instead - """ - warn("This method is deprecated. Use fetch_binary_options_markets instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.BinaryOptionsMarketsRequest( - market_status=kwargs.get("market_status"), - quote_denom=kwargs.get("quote_denom"), - skip=kwargs.get("skip"), - limit=kwargs.get("limit"), - ) - return await self.stubDerivativeExchange.BinaryOptionsMarkets(req) - async def fetch_binary_options_markets( self, market_status: Optional[str] = None, @@ -2982,45 +2033,13 @@ async def fetch_binary_options_markets( pagination=pagination, ) - async def get_binary_options_market(self, market_id: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_binary_options_market` instead - """ - warn("This method is deprecated. Use fetch_binary_options_market instead", DeprecationWarning, stacklevel=2) - req = derivative_exchange_rpc_pb.BinaryOptionsMarketRequest(market_id=market_id) - return await self.stubDerivativeExchange.BinaryOptionsMarket(req) - async def fetch_binary_options_market(self, market_id: str) -> Dict[str, Any]: return await self.exchange_derivative_api.fetch_binary_options_market(market_id=market_id) # PortfolioRPC - - async def get_account_portfolio(self, account_address: str): - """ - This method is deprecated and will be removed soon. Please use `fetch_account_portfolio_balances` instead - """ - warn( - "This method is deprecated. Use fetch_account_portfolio_balances instead", DeprecationWarning, stacklevel=2 - ) - req = portfolio_rpc_pb.AccountPortfolioRequest(account_address=account_address) - return await self.stubPortfolio.AccountPortfolio(req) - async def fetch_account_portfolio_balances(self, account_address: str) -> Dict[str, Any]: return await self.exchange_portfolio_api.fetch_account_portfolio_balances(account_address=account_address) - async def stream_account_portfolio(self, account_address: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `listen_account_portfolio_updates` instead - """ - warn( - "This method is deprecated. Use listen_account_portfolio_updates instead", DeprecationWarning, stacklevel=2 - ) - req = portfolio_rpc_pb.StreamAccountPortfolioRequest( - account_address=account_address, subaccount_id=kwargs.get("subaccount_id"), type=kwargs.get("type") - ) - metadata = self.network.exchange_cookie_assistant.metadata() - return self.stubPortfolio.StreamAccountPortfolio(request=req, metadata=metadata) - async def listen_account_portfolio_updates( self, account_address: str, @@ -3039,38 +2058,6 @@ async def listen_account_portfolio_updates( update_type=update_type, ) - async def chain_stream( - self, - bank_balances_filter: Optional[chain_stream_query.BankBalancesFilter] = None, - subaccount_deposits_filter: Optional[chain_stream_query.SubaccountDepositsFilter] = None, - spot_trades_filter: Optional[chain_stream_query.TradesFilter] = None, - derivative_trades_filter: Optional[chain_stream_query.TradesFilter] = None, - spot_orders_filter: Optional[chain_stream_query.OrdersFilter] = None, - derivative_orders_filter: Optional[chain_stream_query.OrdersFilter] = None, - spot_orderbooks_filter: Optional[chain_stream_query.OrderbookFilter] = None, - derivative_orderbooks_filter: Optional[chain_stream_query.OrderbookFilter] = None, - positions_filter: Optional[chain_stream_query.PositionsFilter] = None, - oracle_price_filter: Optional[chain_stream_query.OraclePriceFilter] = None, - ): - """ - This method is deprecated and will be removed soon. Please use `listen_chain_stream_updates` instead - """ - warn("This method is deprecated. Use listen_chain_stream_updates instead", DeprecationWarning, stacklevel=2) - request = chain_stream_query.StreamRequest( - bank_balances_filter=bank_balances_filter, - subaccount_deposits_filter=subaccount_deposits_filter, - spot_trades_filter=spot_trades_filter, - derivative_trades_filter=derivative_trades_filter, - spot_orders_filter=spot_orders_filter, - derivative_orders_filter=derivative_orders_filter, - spot_orderbooks_filter=spot_orderbooks_filter, - derivative_orderbooks_filter=derivative_orderbooks_filter, - positions_filter=positions_filter, - oracle_price_filter=oracle_price_filter, - ) - metadata = self.network.chain_cookie_assistant.metadata() - return self.chain_stream_stub.Stream(request=request, metadata=metadata) - async def listen_chain_stream_updates( self, callback: Callable, diff --git a/pyinjective/client/indexer/grpc/indexer_grpc_explorer_api.py b/pyinjective/client/indexer/grpc/indexer_grpc_explorer_api.py index b08f5390..7d4fa044 100644 --- a/pyinjective/client/indexer/grpc/indexer_grpc_explorer_api.py +++ b/pyinjective/client/indexer/grpc/indexer_grpc_explorer_api.py @@ -68,6 +68,29 @@ async def fetch_contract_txs( return response + async def fetch_contract_txs_v2( + self, + address: str, + height: Optional[int] = None, + token: Optional[str] = None, + pagination: Optional[PaginationOption] = None, + ) -> Dict[str, Any]: + pagination = pagination or PaginationOption() + request = exchange_explorer_pb.GetContractTxsV2Request( + address=address, + token=token, + ) + if height is not None: + request.height = height + if pagination is not None: + setattr(request, "from", pagination.start_time) + request.to = pagination.end_time + request.limit = pagination.limit + + response = await self._execute_call(call=self._stub.GetContractTxsV2, request=request) + + return response + async def fetch_blocks( self, before: Optional[int] = None, @@ -214,15 +237,13 @@ async def fetch_ibc_transfer_txs( async def fetch_wasm_codes( self, - from_number: Optional[int] = None, - to_number: Optional[int] = None, pagination: Optional[PaginationOption] = None, ) -> Dict[str, Any]: pagination = pagination or PaginationOption() request = exchange_explorer_pb.GetWasmCodesRequest( limit=pagination.limit, - from_number=from_number, - to_number=to_number, + from_number=pagination.from_number, + to_number=pagination.to_number, ) response = await self._execute_call(call=self._stub.GetWasmCodes, request=request) @@ -242,8 +263,6 @@ async def fetch_wasm_code_by_id( async def fetch_wasm_contracts( self, code_id: Optional[int] = None, - from_number: Optional[int] = None, - to_number: Optional[int] = None, assets_only: Optional[bool] = None, label: Optional[str] = None, pagination: Optional[PaginationOption] = None, @@ -252,8 +271,8 @@ async def fetch_wasm_contracts( request = exchange_explorer_pb.GetWasmContractsRequest( limit=pagination.limit, code_id=code_id, - from_number=from_number, - to_number=to_number, + from_number=pagination.from_number, + to_number=pagination.to_number, assets_only=assets_only, skip=pagination.skip, label=label, diff --git a/pyinjective/composer.py b/pyinjective/composer.py index 00e5f73c..8a0ed982 100644 --- a/pyinjective/composer.py +++ b/pyinjective/composer.py @@ -145,13 +145,6 @@ def __init__( self._ofac_checker = OfacChecker() - def Coin(self, amount: int, denom: str): - """ - This method is deprecated and will be removed soon. Please use `coin` instead - """ - warn("This method is deprecated. Use coin instead", DeprecationWarning, stacklevel=2) - return base_coin_pb.Coin(amount=str(amount), denom=denom) - def coin(self, amount: int, denom: str) -> base_coin_pb.Coin: """ This method create an instance of Coin gRPC type, considering the amount is already expressed in chain format @@ -167,27 +160,6 @@ def create_coin_amount(self, amount: Decimal, token_name: str) -> base_coin_pb.C chain_amount = token.chain_formatted_value(human_readable_value=amount) return self.coin(amount=int(chain_amount), denom=token.denom) - def OrderData( - self, market_id: str, subaccount_id: str, order_hash: Optional[str] = None, cid: Optional[str] = None, **kwargs - ): - """ - This method is deprecated and will be removed soon. Please use `order_data` instead - """ - warn("This method is deprecated. Use order_data instead", DeprecationWarning, stacklevel=2) - - is_conditional = kwargs.get("is_conditional", False) - is_buy = kwargs.get("order_direction", "buy") == "buy" - is_market_order = kwargs.get("order_type", "limit") == "market" - order_mask = self._order_mask(is_conditional=is_conditional, is_buy=is_buy, is_market_order=is_market_order) - - return injective_exchange_tx_pb.OrderData( - market_id=market_id, - subaccount_id=subaccount_id, - order_hash=order_hash, - order_mask=order_mask, - cid=cid, - ) - def order_data( self, market_id: str, @@ -223,53 +195,6 @@ def order_data_without_mask( cid=cid, ) - def SpotOrder( - self, - market_id: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `spot_order` instead - """ - warn("This method is deprecated. Use spot_order instead", DeprecationWarning, stacklevel=2) - - market = self.spot_markets[market_id] - - # prepare values - quantity = market.quantity_to_chain_format(human_readable_value=Decimal(str(quantity))) - price = market.price_to_chain_format(human_readable_value=Decimal(str(price))) - trigger_price = market.price_to_chain_format(human_readable_value=Decimal(0)) - - if kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.BUY - - elif not kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.SELL - - elif kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.BUY_PO - - elif not kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.SELL_PO - - return injective_exchange_pb.SpotOrder( - market_id=market_id, - order_info=injective_exchange_pb.OrderInfo( - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=str(int(price)), - quantity=str(int(quantity)), - cid=cid, - ), - order_type=order_type, - trigger_price=str(int(trigger_price)), - ) - def spot_order( self, market_id: str, @@ -314,75 +239,6 @@ def calculate_margin( return margin - def DerivativeOrder( - self, - market_id: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - trigger_price: float = 0, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `derivative_order` instead - """ - warn("This method is deprecated. Use derivative_order instead", DeprecationWarning, stacklevel=2) - market = self.derivative_markets[market_id] - - if kwargs.get("is_reduce_only", False): - margin = 0 - else: - margin = market.calculate_margin_in_chain_format( - human_readable_quantity=Decimal(str(quantity)), - human_readable_price=Decimal(str(price)), - leverage=Decimal(str(kwargs["leverage"])), - ) - - # prepare values - quantity = market.quantity_to_chain_format(human_readable_value=Decimal(str(quantity))) - price = market.price_to_chain_format(human_readable_value=Decimal(str(price))) - trigger_price = market.price_to_chain_format(human_readable_value=Decimal(str(trigger_price))) - - if kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.BUY - - elif not kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.SELL - - elif kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.BUY_PO - - elif not kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.SELL_PO - - elif kwargs.get("stop_buy"): - order_type = injective_exchange_pb.OrderType.STOP_BUY - - elif kwargs.get("stop_sell"): - order_type = injective_exchange_pb.OrderType.STOP_SEll - - elif kwargs.get("take_buy"): - order_type = injective_exchange_pb.OrderType.TAKE_BUY - - elif kwargs.get("take_sell"): - order_type = injective_exchange_pb.OrderType.TAKE_SELL - - return injective_exchange_pb.DerivativeOrder( - market_id=market_id, - order_info=injective_exchange_pb.OrderInfo( - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=str(int(price)), - quantity=str(int(quantity)), - cid=cid, - ), - margin=str(int(margin)), - order_type=order_type, - trigger_price=str(int(trigger_price)), - ) - def derivative_order( self, market_id: str, @@ -516,18 +372,6 @@ def MsgSend(self, from_address: str, to_address: str, amount: float, denom: str) # endregion # region Chain Exchange module - def MsgDeposit(self, sender: str, subaccount_id: str, amount: float, denom: str): - """ - This method is deprecated and will be removed soon. Please use `msg_deposit` instead - """ - warn("This method is deprecated. Use msg_deposit instead", DeprecationWarning, stacklevel=2) - coin = self.create_coin_amount(amount=Decimal(str(amount)), token_name=denom) - - return injective_exchange_tx_pb.MsgDeposit( - sender=sender, - subaccount_id=subaccount_id, - amount=coin, - ) def msg_deposit(self, sender: str, subaccount_id: str, amount: Decimal, denom: str): coin = self.create_coin_amount(amount=amount, token_name=denom) @@ -538,19 +382,6 @@ def msg_deposit(self, sender: str, subaccount_id: str, amount: Decimal, denom: s amount=coin, ) - def MsgWithdraw(self, sender: str, subaccount_id: str, amount: float, denom: str): - """ - This method is deprecated and will be removed soon. Please use `msg_withdraw` instead - """ - warn("This method is deprecated. Use msg_withdraw instead", DeprecationWarning, stacklevel=2) - be_amount = self.create_coin_amount(amount=Decimal(str(amount)), token_name=denom) - - return injective_exchange_tx_pb.MsgWithdraw( - sender=sender, - subaccount_id=subaccount_id, - amount=be_amount, - ) - def msg_withdraw(self, sender: str, subaccount_id: str, amount: Decimal, denom: str): be_amount = self.create_coin_amount(amount=amount, token_name=denom) @@ -695,48 +526,6 @@ def msg_instant_expiry_futures_market_launch( min_notional=f"{chain_min_notional.normalize():f}", ) - def MsgCreateSpotLimitOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_create_spot_limit_order` instead - """ - warn("This method is deprecated. Use msg_create_spot_limit_order instead", DeprecationWarning, stacklevel=2) - - order_type_name = "BUY" - if kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type_name = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY) - - elif not kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type_name = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL) - - elif kwargs.get("is_buy") and kwargs.get("is_po"): - order_type_name = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY_PO) - - elif not kwargs.get("is_buy") and kwargs.get("is_po"): - order_type_name = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL_PO) - - return injective_exchange_tx_pb.MsgCreateSpotLimitOrder( - sender=sender, - order=self.spot_order( - market_id=market_id, - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=Decimal(str(price)), - quantity=Decimal(str(quantity)), - order_type=order_type_name, - cid=cid, - ), - ) - def msg_create_spot_limit_order( self, market_id: str, @@ -763,55 +552,11 @@ def msg_create_spot_limit_order( ), ) - def MsgBatchCreateSpotLimitOrders(self, sender: str, orders: List): - """ - This method is deprecated and will be removed soon. Please use `msg_batch_create_spot_limit_orders` instead - """ - warn( - "This method is deprecated. Use msg_batch_create_spot_limit_orders instead", - DeprecationWarning, - stacklevel=2, - ) - return injective_exchange_tx_pb.MsgBatchCreateSpotLimitOrders(sender=sender, orders=orders) - def msg_batch_create_spot_limit_orders( self, sender: str, orders: List[injective_exchange_pb.SpotOrder] ) -> injective_exchange_tx_pb.MsgBatchCreateSpotLimitOrders: return injective_exchange_tx_pb.MsgBatchCreateSpotLimitOrders(sender=sender, orders=orders) - def MsgCreateSpotMarketOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - is_buy: bool, - cid: Optional[str] = None, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_create_spot_market_order` instead - """ - warn("This method is deprecated. Use msg_create_spot_market_order instead", DeprecationWarning, stacklevel=2) - - order_type_name = "BUY" - if not is_buy: - order_type_name = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL) - - return injective_exchange_tx_pb.MsgCreateSpotMarketOrder( - sender=sender, - order=self.spot_order( - market_id=market_id, - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=Decimal(str(price)), - quantity=Decimal(str(quantity)), - order_type=order_type_name, - cid=cid, - ), - ) - def msg_create_spot_market_order( self, market_id: str, @@ -838,26 +583,6 @@ def msg_create_spot_market_order( ), ) - def MsgCancelSpotOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - order_hash: Optional[str] = None, - cid: Optional[str] = None, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_cancel_spot_order` instead - """ - warn("This method is deprecated. Use msg_cancel_spot_order instead", DeprecationWarning, stacklevel=2) - return injective_exchange_tx_pb.MsgCancelSpotOrder( - sender=sender, - market_id=market_id, - subaccount_id=subaccount_id, - order_hash=order_hash, - cid=cid, - ) - def msg_cancel_spot_order( self, market_id: str, @@ -874,37 +599,11 @@ def msg_cancel_spot_order( cid=cid, ) - def MsgBatchCancelSpotOrders(self, sender: str, data: List): - """ - This method is deprecated and will be removed soon. Please use `msg_batch_cancel_spot_orders` instead - """ - warn("This method is deprecated. Use msg_batch_cancel_spot_orders instead", DeprecationWarning, stacklevel=2) - return injective_exchange_tx_pb.MsgBatchCancelSpotOrders(sender=sender, data=data) - def msg_batch_cancel_spot_orders( self, sender: str, orders_data: List[injective_exchange_tx_pb.OrderData] ) -> injective_exchange_tx_pb.MsgBatchCancelSpotOrders: return injective_exchange_tx_pb.MsgBatchCancelSpotOrders(sender=sender, data=orders_data) - def MsgBatchUpdateOrders(self, sender: str, **kwargs): - """ - This method is deprecated and will be removed soon. Please use `msg_batch_update_orders` instead - """ - warn("This method is deprecated. Use msg_batch_update_orders instead", DeprecationWarning, stacklevel=2) - return injective_exchange_tx_pb.MsgBatchUpdateOrders( - sender=sender, - subaccount_id=kwargs.get("subaccount_id"), - spot_market_ids_to_cancel_all=kwargs.get("spot_market_ids_to_cancel_all"), - derivative_market_ids_to_cancel_all=kwargs.get("derivative_market_ids_to_cancel_all"), - spot_orders_to_cancel=kwargs.get("spot_orders_to_cancel"), - derivative_orders_to_cancel=kwargs.get("derivative_orders_to_cancel"), - spot_orders_to_create=kwargs.get("spot_orders_to_create"), - derivative_orders_to_create=kwargs.get("derivative_orders_to_create"), - binary_options_orders_to_cancel=kwargs.get("binary_options_orders_to_cancel"), - binary_options_market_ids_to_cancel_all=kwargs.get("binary_options_market_ids_to_cancel_all"), - binary_options_orders_to_create=kwargs.get("binary_options_orders_to_create"), - ) - def msg_batch_update_orders( self, sender: str, @@ -933,22 +632,6 @@ def msg_batch_update_orders( binary_options_orders_to_create=binary_options_orders_to_create, ) - def MsgPrivilegedExecuteContract( - self, sender: str, contract: str, msg: str, **kwargs - ) -> injective_exchange_tx_pb.MsgPrivilegedExecuteContract: - """ - This method is deprecated and will be removed soon. Please use `msg_privileged_execute_contract` instead - """ - warn("This method is deprecated. Use msg_privileged_execute_contract instead", DeprecationWarning, stacklevel=2) - - return injective_exchange_tx_pb.MsgPrivilegedExecuteContract( - sender=sender, - contract_address=contract, - data=msg, - funds=kwargs.get("funds") # funds is a string of Coin strings, comma separated, - # e.g. 100000inj,20000000000usdt - ) - def msg_privileged_execute_contract( self, sender: str, @@ -964,68 +647,6 @@ def msg_privileged_execute_contract( funds=funds, ) - def MsgCreateDerivativeLimitOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_create_derivative_limit_order` instead - """ - warn( - "This method is deprecated. Use msg_create_derivative_limit_order instead", DeprecationWarning, stacklevel=2 - ) - - if kwargs.get("is_reduce_only", False): - margin = Decimal(0) - else: - margin = Decimal(str(price)) * Decimal(str(quantity)) / Decimal(str(kwargs["leverage"])) - - if kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY) - - elif not kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL) - - elif kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY_PO) - - elif not kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL_PO) - - elif kwargs.get("stop_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_BUY) - - elif kwargs.get("stop_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_SEll) - - elif kwargs.get("take_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_BUY) - - elif kwargs.get("take_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_SELL) - - return injective_exchange_tx_pb.MsgCreateDerivativeLimitOrder( - sender=sender, - order=self.derivative_order( - market_id=market_id, - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=Decimal(str(price)), - quantity=Decimal(str(quantity)), - margin=margin, - order_type=order_type, - cid=cid, - trigger_price=Decimal(str(kwargs["trigger_price"])) if "trigger_price" in kwargs else None, - ), - ) - def msg_create_derivative_limit_order( self, market_id: str, @@ -1054,18 +675,6 @@ def msg_create_derivative_limit_order( ), ) - def MsgBatchCreateDerivativeLimitOrders(self, sender: str, orders: List): - """ - This method is deprecated and will be removed soon. - Please use `msg_batch_create_derivative_limit_orders` instead - """ - warn( - "This method is deprecated. Use msg_batch_create_derivative_limit_orders instead", - DeprecationWarning, - stacklevel=2, - ) - return injective_exchange_tx_pb.MsgBatchCreateDerivativeLimitOrders(sender=sender, orders=orders) - def msg_batch_create_derivative_limit_orders( self, sender: str, @@ -1073,70 +682,6 @@ def msg_batch_create_derivative_limit_orders( ) -> injective_exchange_tx_pb.MsgBatchCreateDerivativeLimitOrders: return injective_exchange_tx_pb.MsgBatchCreateDerivativeLimitOrders(sender=sender, orders=orders) - def MsgCreateDerivativeMarketOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_create_derivative_market_order` instead - """ - warn( - "This method is deprecated. Use msg_create_derivative_market_order instead", - DeprecationWarning, - stacklevel=2, - ) - - if kwargs.get("is_reduce_only", False): - margin = Decimal(0) - else: - margin = Decimal(str(price)) * Decimal(str(quantity)) / Decimal(str(kwargs["leverage"])) - - if kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY) - - elif not kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL) - - elif kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY_PO) - - elif not kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL_PO) - - elif kwargs.get("stop_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_BUY) - - elif kwargs.get("stop_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_SEll) - - elif kwargs.get("take_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_BUY) - - elif kwargs.get("take_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_SELL) - - return injective_exchange_tx_pb.MsgCreateDerivativeMarketOrder( - sender=sender, - order=self.derivative_order( - market_id=market_id, - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=Decimal(str(price)), - quantity=Decimal(str(quantity)), - margin=margin, - order_type=order_type, - cid=cid, - trigger_price=Decimal(str(kwargs["trigger_price"])) if "trigger_price" in kwargs else None, - ), - ) - def msg_create_derivative_market_order( self, market_id: str, @@ -1165,38 +710,6 @@ def msg_create_derivative_market_order( ), ) - def MsgCancelDerivativeOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - order_hash: Optional[str] = None, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_cancel_derivative_order` instead - """ - warn( - "This method is deprecated. Use msg_cancel_derivative_order instead", - DeprecationWarning, - stacklevel=2, - ) - - is_conditional = kwargs.get("is_conditional", False) - is_buy = kwargs.get("order_direction", "buy") == "buy" - is_market_order = kwargs.get("order_type", "limit") == "market" - order_mask = self._order_mask(is_conditional=is_conditional, is_buy=is_buy, is_market_order=is_market_order) - - return injective_exchange_tx_pb.MsgCancelDerivativeOrder( - sender=sender, - market_id=market_id, - subaccount_id=subaccount_id, - order_hash=order_hash, - order_mask=order_mask, - cid=cid, - ) - def msg_cancel_derivative_order( self, market_id: str, @@ -1219,78 +732,11 @@ def msg_cancel_derivative_order( cid=cid, ) - def MsgBatchCancelDerivativeOrders(self, sender: str, data: List): - """ - This method is deprecated and will be removed soon. Please use `msg_batch_cancel_derivative_orders` instead - """ - warn( - "This method is deprecated. Use msg_batch_cancel_derivative_orders instead", - DeprecationWarning, - stacklevel=2, - ) - return injective_exchange_tx_pb.MsgBatchCancelDerivativeOrders(sender=sender, data=data) - def msg_batch_cancel_derivative_orders( self, sender: str, orders_data: List[injective_exchange_tx_pb.OrderData] ) -> injective_exchange_tx_pb.MsgBatchCancelDerivativeOrders: return injective_exchange_tx_pb.MsgBatchCancelDerivativeOrders(sender=sender, data=orders_data) - def MsgInstantBinaryOptionsMarketLaunch( - self, - sender: str, - ticker: str, - oracle_symbol: str, - oracle_provider: str, - oracle_type: str, - oracle_scale_factor: int, - maker_fee_rate: float, - taker_fee_rate: float, - expiration_timestamp: int, - settlement_timestamp: int, - quote_denom: str, - quote_decimals: int, - min_price_tick_size: float, - min_quantity_tick_size: float, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. - Please use `msg_instant_binary_options_market_launch` instead - """ - warn( - "This method is deprecated. Use msg_instant_binary_options_market_launch instead", - DeprecationWarning, - stacklevel=2, - ) - scaled_maker_fee_rate = Decimal((maker_fee_rate * pow(10, 18))) - maker_fee_to_bytes = bytes(str(scaled_maker_fee_rate), "utf-8") - - scaled_taker_fee_rate = Decimal((taker_fee_rate * pow(10, 18))) - taker_fee_to_bytes = bytes(str(scaled_taker_fee_rate), "utf-8") - - scaled_min_price_tick_size = Decimal((min_price_tick_size * pow(10, quote_decimals + 18))) - min_price_to_bytes = bytes(str(scaled_min_price_tick_size), "utf-8") - - scaled_min_quantity_tick_size = Decimal((min_quantity_tick_size * pow(10, 18))) - min_quantity_to_bytes = bytes(str(scaled_min_quantity_tick_size), "utf-8") - - return injective_exchange_tx_pb.MsgInstantBinaryOptionsMarketLaunch( - sender=sender, - ticker=ticker, - oracle_symbol=oracle_symbol, - oracle_provider=oracle_provider, - oracle_type=oracle_type, - oracle_scale_factor=oracle_scale_factor, - maker_fee_rate=maker_fee_to_bytes, - taker_fee_rate=taker_fee_to_bytes, - expiration_timestamp=expiration_timestamp, - settlement_timestamp=settlement_timestamp, - quote_denom=quote_denom, - min_price_tick_size=min_price_to_bytes, - min_quantity_tick_size=min_quantity_to_bytes, - admin=kwargs.get("admin"), - ) - def msg_instant_binary_options_market_launch( self, sender: str, @@ -1339,70 +785,6 @@ def msg_instant_binary_options_market_launch( min_notional=f"{chain_min_notional.normalize():f}", ) - def MsgCreateBinaryOptionsLimitOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_create_binary_options_limit_order` instead - """ - warn( - "This method is deprecated. Use msg_create_binary_options_limit_order instead", - DeprecationWarning, - stacklevel=2, - ) - if kwargs.get("is_reduce_only", False): - margin = Decimal(0) - else: - margin = Decimal(str(price)) * Decimal(str(quantity)) - - if kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY) - - elif not kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL) - - elif kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY_PO) - - elif not kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL_PO) - - elif kwargs.get("stop_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_BUY) - - elif kwargs.get("stop_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_SEll) - - elif kwargs.get("take_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_BUY) - - elif kwargs.get("take_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_SELL) - - return injective_exchange_tx_pb.MsgCreateBinaryOptionsLimitOrder( - sender=sender, - order=self.binary_options_order( - market_id=market_id, - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=Decimal(str(price)), - quantity=Decimal(str(quantity)), - margin=margin, - order_type=order_type, - cid=cid, - trigger_price=Decimal(str(kwargs["trigger_price"])) if "trigger_price" in kwargs else None, - denom=kwargs.get("denom"), - ), - ) - def msg_create_binary_options_limit_order( self, market_id: str, @@ -1433,70 +815,6 @@ def msg_create_binary_options_limit_order( ), ) - def MsgCreateBinaryOptionsMarketOrder( - self, - market_id: str, - sender: str, - subaccount_id: str, - fee_recipient: str, - price: float, - quantity: float, - cid: Optional[str] = None, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_create_binary_options_market_order` instead - """ - warn( - "This method is deprecated. Use msg_create_binary_options_market_order instead", - DeprecationWarning, - stacklevel=2, - ) - if kwargs.get("is_reduce_only", False): - margin = Decimal(0) - else: - margin = Decimal(str(price)) * Decimal(str(quantity)) - - if kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY) - - elif not kwargs.get("is_buy") and not kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL) - - elif kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.BUY_PO) - - elif not kwargs.get("is_buy") and kwargs.get("is_po"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.SELL_PO) - - elif kwargs.get("stop_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_BUY) - - elif kwargs.get("stop_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.STOP_SEll) - - elif kwargs.get("take_buy"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_BUY) - - elif kwargs.get("take_sell"): - order_type = injective_exchange_pb.OrderType.Name(injective_exchange_pb.OrderType.TAKE_SELL) - - return injective_exchange_tx_pb.MsgCreateBinaryOptionsMarketOrder( - sender=sender, - order=self.binary_options_order( - market_id=market_id, - subaccount_id=subaccount_id, - fee_recipient=fee_recipient, - price=Decimal(str(price)), - quantity=Decimal(str(quantity)), - margin=margin, - order_type=order_type, - cid=cid, - trigger_price=Decimal(str(kwargs["trigger_price"])) if "trigger_price" in kwargs else None, - denom=kwargs.get("denom"), - ), - ) - def msg_create_binary_options_market_order( self, market_id: str, @@ -1527,30 +845,6 @@ def msg_create_binary_options_market_order( ), ) - def MsgCancelBinaryOptionsOrder( - self, - sender: str, - market_id: str, - subaccount_id: str, - order_hash: Optional[str] = None, - cid: Optional[str] = None, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_cancel_binary_options_order` instead - """ - warn( - "This method is deprecated. Use msg_cancel_binary_options_order instead", - DeprecationWarning, - stacklevel=2, - ) - return injective_exchange_tx_pb.MsgCancelBinaryOptionsOrder( - sender=sender, - market_id=market_id, - subaccount_id=subaccount_id, - order_hash=order_hash, - cid=cid, - ) - def msg_cancel_binary_options_order( self, market_id: str, @@ -1573,31 +867,6 @@ def msg_cancel_binary_options_order( cid=cid, ) - def MsgSubaccountTransfer( - self, - sender: str, - source_subaccount_id: str, - destination_subaccount_id: str, - amount: int, - denom: str, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_subaccount_transfer` instead - """ - warn( - "This method is deprecated. Use msg_subaccount_transfer instead", - DeprecationWarning, - stacklevel=2, - ) - be_amount = self.create_coin_amount(amount=Decimal(str(amount)), token_name=denom) - - return injective_exchange_tx_pb.MsgSubaccountTransfer( - sender=sender, - source_subaccount_id=source_subaccount_id, - destination_subaccount_id=destination_subaccount_id, - amount=be_amount, - ) - def msg_subaccount_transfer( self, sender: str, @@ -1615,31 +884,6 @@ def msg_subaccount_transfer( amount=be_amount, ) - def MsgExternalTransfer( - self, - sender: str, - source_subaccount_id: str, - destination_subaccount_id: str, - amount: int, - denom: str, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_external_transfer` instead - """ - warn( - "This method is deprecated. Use msg_external_transfer instead", - DeprecationWarning, - stacklevel=2, - ) - coin = self.create_coin_amount(amount=Decimal(str(amount)), token_name=denom) - - return injective_exchange_tx_pb.MsgExternalTransfer( - sender=sender, - source_subaccount_id=source_subaccount_id, - destination_subaccount_id=destination_subaccount_id, - amount=coin, - ) - def msg_external_transfer( self, sender: str, @@ -1657,25 +901,6 @@ def msg_external_transfer( amount=coin, ) - def MsgLiquidatePosition( - self, - sender: str, - subaccount_id: str, - market_id: str, - order: Optional[injective_exchange_pb.DerivativeOrder] = None, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_liquidate_position` instead - """ - warn( - "This method is deprecated. Use msg_liquidate_position instead", - DeprecationWarning, - stacklevel=2, - ) - return injective_exchange_tx_pb.MsgLiquidatePosition( - sender=sender, subaccount_id=subaccount_id, market_id=market_id, order=order - ) - def msg_liquidate_position( self, sender: str, @@ -1697,33 +922,6 @@ def msg_emergency_settle_market( sender=sender, subaccount_id=subaccount_id, market_id=market_id ) - def MsgIncreasePositionMargin( - self, - sender: str, - source_subaccount_id: str, - destination_subaccount_id: str, - market_id: str, - amount: float, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_increase_position_margin` instead - """ - warn( - "This method is deprecated. Use msg_increase_position_margin instead", - DeprecationWarning, - stacklevel=2, - ) - market = self.derivative_markets[market_id] - - additional_margin = market.margin_to_chain_format(human_readable_value=Decimal(str(amount))) - return injective_exchange_tx_pb.MsgIncreasePositionMargin( - sender=sender, - source_subaccount_id=source_subaccount_id, - destination_subaccount_id=destination_subaccount_id, - market_id=market_id, - amount=str(int(additional_margin)), - ) - def msg_increase_position_margin( self, sender: str, @@ -1743,52 +941,9 @@ def msg_increase_position_margin( amount=str(int(additional_margin)), ) - def MsgRewardsOptOut(self, sender: str): - """ - This method is deprecated and will be removed soon. Please use `msg_rewards_opt_out` instead - """ - warn( - "This method is deprecated. Use msg_rewards_opt_out instead", - DeprecationWarning, - stacklevel=2, - ) - return injective_exchange_tx_pb.MsgRewardsOptOut(sender=sender) - def msg_rewards_opt_out(self, sender: str) -> injective_exchange_tx_pb.MsgRewardsOptOut: return injective_exchange_tx_pb.MsgRewardsOptOut(sender=sender) - def MsgAdminUpdateBinaryOptionsMarket( - self, - sender: str, - market_id: str, - status: str, - **kwargs, - ): - """ - This method is deprecated and will be removed soon. Please use `msg_admin_update_binary_options_market` instead - """ - warn( - "This method is deprecated. Use msg_admin_update_binary_options_market instead", - DeprecationWarning, - stacklevel=2, - ) - - if kwargs.get("settlement_price") is not None: - scale_price = Decimal((kwargs.get("settlement_price") * pow(10, 18))) - price_to_bytes = bytes(str(scale_price), "utf-8") - - else: - price_to_bytes = "" - - return injective_exchange_tx_pb.MsgAdminUpdateBinaryOptionsMarket( - sender=sender, - market_id=market_id, - settlement_price=price_to_bytes, - expiration_timestamp=kwargs.get("expiration_timestamp"), - settlement_timestamp=kwargs.get("settlement_timestamp"), - status=status, - ) - def msg_admin_update_binary_options_market( self, sender: str, @@ -2263,16 +1418,6 @@ def msg_set_withdraw_address(self, delegator_address: str, withdraw_address: str delegator_address=delegator_address, withdraw_address=withdraw_address ) - # Deprecated - def MsgWithdrawDelegatorReward(self, delegator_address: str, validator_address: str): - """ - This method is deprecated and will be removed soon. Please use `msg_withdraw_delegator_reward` instead - """ - warn("This method is deprecated. Use msg_withdraw_delegator_reward instead", DeprecationWarning, stacklevel=2) - return cosmos_distribution_tx_pb.MsgWithdrawDelegatorReward( - delegator_address=delegator_address, validator_address=validator_address - ) - def msg_withdraw_delegator_reward(self, delegator_address: str, validator_address: str): return cosmos_distribution_tx_pb.MsgWithdrawDelegatorReward( delegator_address=delegator_address, validator_address=validator_address diff --git a/pyproject.toml b/pyproject.toml index 05a14602..ab868fe1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,22 +35,22 @@ protobuf = "^5.26.1" requests = "*" safe-pysha3 = "*" websockets = "*" -web3 = "^6.0" +web3 = "^7.0.0" [tool.poetry.group.test.dependencies] pytest = "*" pytest-asyncio = "*" pytest-grpc = "*" requests-mock = "*" -pytest-cov = "^4.1.0" -pytest-aioresponses = "^0.2.0" +pytest-cov = ">=4.1.0" +pytest-aioresponses = ">=0.2.0" [tool.poetry.group.dev.dependencies] -pre-commit = "^3.4.0" -flakeheaven = "^3.3.0" -isort = "^5.12.0" -black = "^23.9.1" -python-dotenv = "^1.0.1" +pre-commit = ">=3.4.0" +flakeheaven = ">=3.3.0" +isort = ">=5.12.0" +black = ">=23.9.1" +python-dotenv = ">=1.0.1" importlib-metadata = "<5.0" diff --git a/tests/client/indexer/configurable_explorer_query_servicer.py b/tests/client/indexer/configurable_explorer_query_servicer.py index ce240bf3..e6f3a5b1 100644 --- a/tests/client/indexer/configurable_explorer_query_servicer.py +++ b/tests/client/indexer/configurable_explorer_query_servicer.py @@ -32,6 +32,9 @@ def __init__(self): self.stream_txs_responses = deque() self.stream_blocks_responses = deque() + # Add new attribute for contract_txs_v2_responses + self.contract_txs_v2_responses = deque() + async def GetAccountTxs(self, request: exchange_explorer_pb.GetAccountTxsRequest, context=None, metadata=None): return self.account_txs_responses.pop() @@ -110,3 +113,8 @@ async def StreamTxs(self, request: exchange_explorer_pb.StreamTxsRequest, contex async def StreamBlocks(self, request: exchange_explorer_pb.StreamBlocksRequest, context=None, metadata=None): for event in self.stream_blocks_responses: yield event + + async def GetContractTxsV2( + self, request: exchange_explorer_pb.GetContractTxsV2Request, context=None, metadata=None + ): + return self.contract_txs_v2_responses.pop() diff --git a/tests/client/indexer/grpc/test_indexer_grpc_explorer_api.py b/tests/client/indexer/grpc/test_indexer_grpc_explorer_api.py index ac92f333..ead944df 100644 --- a/tests/client/indexer/grpc/test_indexer_grpc_explorer_api.py +++ b/tests/client/indexer/grpc/test_indexer_grpc_explorer_api.py @@ -311,6 +311,142 @@ async def test_fetch_contract_txs( assert result_contract_txs == expected_contract_txs + @pytest.mark.asyncio + async def test_fetch_contract_txs_v2( + self, + explorer_servicer, + ): + code = 5 + coin = exchange_explorer_pb.CosmosCoin( + denom="inj", + amount="200000000000000", + ) + gas_fee = exchange_explorer_pb.GasFee( + amount=[coin], gas_limit=400000, payer="inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex", granter="test granter" + ) + event = exchange_explorer_pb.Event(type="test event type", attributes={"first_attribute": "attribute 1"}) + signature = exchange_explorer_pb.Signature( + pubkey="02c33c539e2aea9f97137e8168f6e22f57b829876823fa04b878a2b7c2010465d9", + address="inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex", + sequence=223460, + signature="gFXPJ5QENzq9SUHshE8g++aRLIlRCRVcOsYq+EOr3T4QgAAs5bVHf8NhugBjJP9B+AfQjQNNneHXPF9dEp4Uehs=", + ) + claim_id = 100 + + tx_data = exchange_explorer_pb.TxDetailData( + id="test id", + block_number=18138926, + block_timestamp="2023-11-07 23:19:55.371 +0000 UTC", + hash="0x3790ade2bea6c8605851ec89fa968adf2a2037a5ecac11ca95e99260508a3b7e", + code=code, + data=b"\022&\n$/cosmos.bank.v1beta1.MsgSendResponse", + info="test info", + gas_wanted=400000, + gas_used=93696, + gas_fee=gas_fee, + codespace="test codespace", + events=[event], + tx_type="injective-web3", + messages=b'[{"type":"/cosmos.bank.v1beta1.MsgSend","value":{' + b'"from_address":"inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex",' + b'"to_address":"inj1d6qx83nhx3a3gx7e654x4su8hur5s83u84h2xc",' + b'"amount":[{"denom":"factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/weth",' + b'"amount":"100000000000000000"}]}}]', + signatures=[signature], + memo="test memo", + tx_number=221429, + block_unix_timestamp=1699399195371, + error_log="", + logs=b'[{"msg_index":0,"events":[{"type":"message","attributes":[' + b'{"key":"action","value":"/cosmos.bank.v1beta1.MsgSend"},' + b'{"key":"sender","value":"inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex"},' + b'{"key":"module","value":"bank"}]},{"type":"coin_spent","attributes":[' + b'{"key":"spender","value":"inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex"},' + b'{"key":"amount","value":"100000000000000000factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/weth"}' + b']},{"type":"coin_received","attributes":[' + b'{"key":"receiver","value":"inj1d6qx83nhx3a3gx7e654x4su8hur5s83u84h2xc"},' + b'{"key":"amount","value":"100000000000000000factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/weth"}' + b']},{"type":"transfer","attributes":[' + b'{"key":"recipient","value":"inj1d6qx83nhx3a3gx7e654x4su8hur5s83u84h2xc"},' + b'{"key":"sender","value":"inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex"},' + b'{"key":"amount","value":"100000000000000000factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/weth"}' + b']},{"type":"message","attributes":[' + b'{"key":"sender","value":"inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex"}]}]}]', + claim_ids=[claim_id], + ) + + explorer_servicer.contract_txs_v2_responses.append( + exchange_explorer_pb.GetContractTxsV2Response( + data=[tx_data], + next=["next-page"], + ) + ) + + api = self._api_instance(servicer=explorer_servicer) + + result_contract_txs = await api.fetch_contract_txs_v2( + address="inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex", + height=8, + token="inj", + pagination=PaginationOption( + limit=100, + start_time=1699544939364, + end_time=1699744939364, + ), + ) + expected_contract_txs = { + "data": [ + { + "id": tx_data.id, + "blockNumber": str(tx_data.block_number), + "blockTimestamp": tx_data.block_timestamp, + "hash": tx_data.hash, + "code": tx_data.code, + "data": base64.b64encode(tx_data.data).decode(), + "info": tx_data.info, + "gasWanted": str(tx_data.gas_wanted), + "gasUsed": str(tx_data.gas_used), + "gasFee": { + "amount": [ + { + "denom": coin.denom, + "amount": coin.amount, + } + ], + "gasLimit": str(gas_fee.gas_limit), + "payer": gas_fee.payer, + "granter": gas_fee.granter, + }, + "codespace": tx_data.codespace, + "events": [ + { + "type": event.type, + "attributes": event.attributes, + } + ], + "txType": tx_data.tx_type, + "messages": base64.b64encode(tx_data.messages).decode(), + "signatures": [ + { + "pubkey": signature.pubkey, + "address": signature.address, + "sequence": str(signature.sequence), + "signature": signature.signature, + } + ], + "memo": tx_data.memo, + "txNumber": str(tx_data.tx_number), + "blockUnixTimestamp": str(tx_data.block_unix_timestamp), + "errorLog": tx_data.error_log, + "logs": base64.b64encode(tx_data.logs).decode(), + "claimIds": [str(claim_id)], + }, + ], + "next": ["next-page"], + } + + assert result_contract_txs == expected_contract_txs + @pytest.mark.asyncio async def test_fetch_blocks( self, @@ -1120,10 +1256,10 @@ async def test_fetch_wasm_codes( api = self._api_instance(servicer=explorer_servicer) result_wasm_codes = await api.fetch_wasm_codes( - from_number=1, - to_number=1000, pagination=PaginationOption( limit=100, + from_number=1, + to_number=1000, ), ) expected_wasm_codes = { @@ -1263,13 +1399,13 @@ async def test_fetch_wasm_contracts( result_wasm_contracts = await api.fetch_wasm_contracts( code_id=wasm_contract.code_id, - from_number=1, - to_number=1000, assets_only=False, label=wasm_contract.label, pagination=PaginationOption( limit=100, skip=10, + from_number=1, + to_number=1000, ), ) expected_wasm_contracts = { diff --git a/tests/test_async_client_deprecation_warnings.py b/tests/test_async_client_deprecation_warnings.py index a305d11a..6e59b7a9 100644 --- a/tests/test_async_client_deprecation_warnings.py +++ b/tests/test_async_client_deprecation_warnings.py @@ -1,1728 +1,13 @@ from warnings import catch_warnings -import grpc import pytest from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network -from pyinjective.proto.cosmos.authz.v1beta1 import query_pb2 as authz_query -from pyinjective.proto.cosmos.bank.v1beta1 import query_pb2 as bank_query_pb -from pyinjective.proto.cosmos.base.tendermint.v1beta1 import query_pb2 as tendermint_query -from pyinjective.proto.cosmos.tx.v1beta1 import service_pb2 as tx_service -from pyinjective.proto.exchange import ( - injective_accounts_rpc_pb2 as exchange_accounts_pb, - injective_auction_rpc_pb2 as exchange_auction_pb, - injective_derivative_exchange_rpc_pb2 as exchange_derivative_pb, - injective_explorer_rpc_pb2 as exchange_explorer_pb, - injective_insurance_rpc_pb2 as exchange_insurance_pb, - injective_meta_rpc_pb2 as exchange_meta_pb, - injective_oracle_rpc_pb2 as exchange_oracle_pb, - injective_portfolio_rpc_pb2 as exchange_portfolio_pb, - injective_spot_exchange_rpc_pb2 as exchange_spot_pb, -) -from pyinjective.proto.injective.stream.v1beta1 import query_pb2 as chain_stream_pb -from pyinjective.proto.injective.types.v1beta1 import account_pb2 as account_pb -from tests.client.chain.grpc.configurable_auth_query_servicer import ConfigurableAuthQueryServicer -from tests.client.chain.grpc.configurable_authz_query_servicer import ConfigurableAuthZQueryServicer -from tests.client.chain.grpc.configurable_bank_query_servicer import ConfigurableBankQueryServicer -from tests.client.chain.stream_grpc.configurable_chain_stream_query_servicer import ConfigurableChainStreamQueryServicer -from tests.client.indexer.configurable_account_query_servicer import ConfigurableAccountQueryServicer -from tests.client.indexer.configurable_auction_query_servicer import ConfigurableAuctionQueryServicer -from tests.client.indexer.configurable_derivative_query_servicer import ConfigurableDerivativeQueryServicer -from tests.client.indexer.configurable_explorer_query_servicer import ConfigurableExplorerQueryServicer -from tests.client.indexer.configurable_insurance_query_servicer import ConfigurableInsuranceQueryServicer -from tests.client.indexer.configurable_meta_query_servicer import ConfigurableMetaQueryServicer -from tests.client.indexer.configurable_oracle_query_servicer import ConfigurableOracleQueryServicer -from tests.client.indexer.configurable_portfolio_query_servicer import ConfigurablePortfolioQueryServicer -from tests.client.indexer.configurable_spot_query_servicer import ConfigurableSpotQueryServicer -from tests.core.tendermint.grpc.configurable_tendermint_query_servicer import ConfigurableTendermintQueryServicer -from tests.core.tx.grpc.configurable_tx_query_servicer import ConfigurableTxQueryServicer - - -@pytest.fixture -def account_servicer(): - return ConfigurableAccountQueryServicer() - - -@pytest.fixture -def auction_servicer(): - return ConfigurableAuctionQueryServicer() - - -@pytest.fixture -def auth_servicer(): - return ConfigurableAuthQueryServicer() - - -@pytest.fixture -def authz_servicer(): - return ConfigurableAuthZQueryServicer() - - -@pytest.fixture -def bank_servicer(): - return ConfigurableBankQueryServicer() - - -@pytest.fixture -def chain_stream_servicer(): - return ConfigurableChainStreamQueryServicer() - - -@pytest.fixture -def derivative_servicer(): - return ConfigurableDerivativeQueryServicer() - - -@pytest.fixture -def explorer_servicer(): - return ConfigurableExplorerQueryServicer() - - -@pytest.fixture -def insurance_servicer(): - return ConfigurableInsuranceQueryServicer() - - -@pytest.fixture -def meta_servicer(): - return ConfigurableMetaQueryServicer() - - -@pytest.fixture -def oracle_servicer(): - return ConfigurableOracleQueryServicer() - - -@pytest.fixture -def portfolio_servicer(): - return ConfigurablePortfolioQueryServicer() - - -@pytest.fixture -def spot_servicer(): - return ConfigurableSpotQueryServicer() - - -@pytest.fixture -def tx_servicer(): - return ConfigurableTxQueryServicer() - - -@pytest.fixture -def tendermint_servicer(): - return ConfigurableTendermintQueryServicer() class TestAsyncClientDeprecationWarnings: - def test_insecure_parameter_deprecation_warning( - self, - auth_servicer, - ): - with catch_warnings(record=True) as all_warnings: - AsyncClient( - network=Network.local(), - insecure=False, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "insecure parameter in AsyncClient is no longer used and will be deprecated" - ) - - @pytest.mark.asyncio - async def test_get_account_deprecation_warning( - self, - auth_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubAuth = auth_servicer - auth_servicer.account_responses.append(account_pb.EthAccount()) - - with catch_warnings(record=True) as all_warnings: - await client.get_account(address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_account instead" - - @pytest.mark.asyncio - async def test_get_bank_balance_deprecation_warning( - self, - bank_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubBank = bank_servicer - bank_servicer.balance_responses.append(bank_query_pb.QueryBalanceResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_bank_balance(address="", denom="inj") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_bank_balance instead" - - @pytest.mark.asyncio - async def test_get_bank_balances_deprecation_warning( - self, - bank_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubBank = bank_servicer - bank_servicer.balances_responses.append(bank_query_pb.QueryAllBalancesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_bank_balances(address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_bank_balances instead" - - @pytest.mark.asyncio - async def test_get_order_states_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.order_states_responses.append(exchange_accounts_pb.OrderStatesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_order_states(spot_order_hashes=["hash1"], derivative_order_hashes=["hash2"]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_order_states instead" - - @pytest.mark.asyncio - async def test_get_subaccount_list_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.subaccounts_list_responses.append(exchange_accounts_pb.SubaccountsListResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_subaccount_list(account_address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_subaccounts_list instead" - - @pytest.mark.asyncio - async def test_get_subaccount_balances_list_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.subaccount_balances_list_responses.append( - exchange_accounts_pb.SubaccountBalancesListResponse() - ) - - with catch_warnings(record=True) as all_warnings: - await client.get_subaccount_balances_list(subaccount_id="", denoms=[]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_subaccount_balances_list instead" - ) - - @pytest.mark.asyncio - async def test_get_subaccount_balance_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.subaccount_balance_responses.append(exchange_accounts_pb.SubaccountBalanceEndpointResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_subaccount_balance(subaccount_id="", denom="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_subaccount_balance instead" - - @pytest.mark.asyncio - async def test_get_subaccount_history_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.subaccount_history_responses.append(exchange_accounts_pb.SubaccountHistoryResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_subaccount_history(subaccount_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_subaccount_history instead" - - @pytest.mark.asyncio - async def test_get_subaccount_order_summary_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.subaccount_order_summary_responses.append( - exchange_accounts_pb.SubaccountOrderSummaryResponse() - ) - - with catch_warnings(record=True) as all_warnings: - await client.get_subaccount_order_summary(subaccount_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_subaccount_order_summary instead" - ) - - @pytest.mark.asyncio - async def test_get_portfolio_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.portfolio_responses.append(exchange_accounts_pb.PortfolioResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_portfolio(account_address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_portfolio instead" - - @pytest.mark.asyncio - async def test_get_rewards_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.rewards_responses.append(exchange_accounts_pb.RewardsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_rewards(account_address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_rewards instead" - - @pytest.mark.asyncio - async def test_stream_subaccount_balance_deprecation_warning( - self, - account_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - account_servicer.stream_subaccount_balance_responses.append( - exchange_accounts_pb.StreamSubaccountBalanceResponse() - ) - - with catch_warnings(record=True) as all_warnings: - await client.stream_subaccount_balance(subaccount_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_subaccount_balance_updates instead" - ) - - @pytest.mark.asyncio - async def test_get_grants_deprecation_warning( - self, - authz_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubAuthz = authz_servicer - authz_servicer.grants_responses.append(authz_query.QueryGrantsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_grants(granter="granter", grantee="grantee") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_grants instead" - - @pytest.mark.asyncio - async def test_simulate_deprecation_warning( - self, - tx_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubTx = tx_servicer - tx_servicer.simulate_responses.append(tx_service.SimulateResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.simulate_tx(tx_byte="".encode()) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use simulate instead" - - @pytest.mark.asyncio - async def test_get_tx_deprecation_warning( - self, - tx_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubTx = tx_servicer - tx_servicer.get_tx_responses.append(tx_service.GetTxResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_tx(tx_hash="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_tx instead" - - @pytest.mark.asyncio - async def test_send_tx_sync_mode_deprecation_warning( - self, - tx_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubTx = tx_servicer - tx_servicer.broadcast_responses.append(tx_service.BroadcastTxResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.send_tx_sync_mode(tx_byte="".encode()) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use broadcast_tx_sync_mode instead" - - @pytest.mark.asyncio - async def test_send_tx_async_mode_deprecation_warning( - self, - tx_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubTx = tx_servicer - tx_servicer.broadcast_responses.append(tx_service.BroadcastTxResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.send_tx_async_mode(tx_byte="".encode()) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use broadcast_tx_async_mode instead" - - @pytest.mark.asyncio - async def test_send_tx_block_mode_deprecation_warning( - self, - tx_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubTx = tx_servicer - tx_servicer.broadcast_responses.append(tx_service.BroadcastTxResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.send_tx_block_mode(tx_byte="".encode()) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. BLOCK broadcast mode should not be used" - ) - - @pytest.mark.asyncio - async def test_ping_deprecation_warning( - self, - meta_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubMeta = meta_servicer - meta_servicer.ping_responses.append(exchange_meta_pb.PingResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.ping() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_ping instead" - - @pytest.mark.asyncio - async def test_version_deprecation_warning( - self, - meta_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubMeta = meta_servicer - meta_servicer.version_responses.append(exchange_meta_pb.VersionResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.version() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_version instead" - - @pytest.mark.asyncio - async def test_info_deprecation_warning( - self, - meta_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubMeta = meta_servicer - meta_servicer.info_responses.append(exchange_meta_pb.InfoResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.info() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_info instead" - - @pytest.mark.asyncio - async def test_stream_keepalive_deprecation_warning( - self, - meta_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExchangeAccount = account_servicer - meta_servicer.stream_keepalive_responses.append(exchange_meta_pb.StreamKeepaliveResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_keepalive() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_keepalive instead" - - @pytest.mark.asyncio - async def test_get_oracle_list_deprecation_warning( - self, - oracle_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubOracle = oracle_servicer - oracle_servicer.oracle_list_responses.append(exchange_oracle_pb.OracleListResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_oracle_list() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_oracle_list instead" - - @pytest.mark.asyncio - async def test_get_oracle_prices_deprecation_warning( - self, - oracle_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubOracle = oracle_servicer - oracle_servicer.price_responses.append(exchange_oracle_pb.PriceResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_oracle_prices( - base_symbol="Gold", - quote_symbol="USDT", - oracle_type="pricefeed", - oracle_scale_factor=6, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_oracle_price instead" - - @pytest.mark.asyncio - async def test_stream_oracle_prices_deprecation_warning( - self, - oracle_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubOracle = oracle_servicer - oracle_servicer.stream_prices_responses.append(exchange_oracle_pb.StreamPricesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_oracle_prices( - base_symbol="Gold", - quote_symbol="USDT", - oracle_type="pricefeed", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_oracle_prices_updates instead" - ) - - @pytest.mark.asyncio - async def test_get_insurance_funds_deprecation_warning( - self, - insurance_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubInsurance = insurance_servicer - insurance_servicer.funds_responses.append(exchange_insurance_pb.FundsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_insurance_funds() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_insurance_funds instead" - - @pytest.mark.asyncio - async def test_get_redemptions_deprecation_warning( - self, - insurance_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubInsurance = insurance_servicer - insurance_servicer.redemptions_responses.append(exchange_insurance_pb.RedemptionsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_redemptions() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_redemptions instead" - - @pytest.mark.asyncio - async def test_get_auction_deprecation_warning( - self, - auction_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubAuction = auction_servicer - auction_servicer.auction_endpoint_responses.append(exchange_auction_pb.AuctionEndpointResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_auction(bid_round=1) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_auction instead" - - @pytest.mark.asyncio - async def test_get_auctions_deprecation_warning( - self, - auction_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubAuction = auction_servicer - auction_servicer.auctions_responses.append(exchange_auction_pb.AuctionsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_auctions() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_auctions instead" - - @pytest.mark.asyncio - async def test_stream_bids_deprecation_warning( - self, - auction_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubAuction = auction_servicer - auction_servicer.stream_bids_responses.append(exchange_auction_pb.StreamBidsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_bids() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_bids_updates instead" - - @pytest.mark.asyncio - async def test_get_spot_markets_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.markets_responses.append(exchange_spot_pb.MarketsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_markets() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_spot_markets instead" - - @pytest.mark.asyncio - async def test_get_spot_market_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.market_responses.append(exchange_spot_pb.MarketResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_market(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_spot_market instead" - - @pytest.mark.asyncio - async def test_get_spot_orderbookV2_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.orderbook_v2_responses.append(exchange_spot_pb.OrderbookV2Response()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_orderbookV2(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_spot_orderbook_v2 instead" - - @pytest.mark.asyncio - async def test_get_spot_orderbooksV2_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.orderbooks_v2_responses.append(exchange_spot_pb.OrderbooksV2Response()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_orderbooksV2(market_ids=[]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_spot_orderbooks_v2 instead" - - @pytest.mark.asyncio - async def test_get_spot_orders_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.orders_responses.append(exchange_spot_pb.OrdersResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_orders(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_spot_orders instead" - - @pytest.mark.asyncio - async def test_get_spot_trades_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.trades_responses.append(exchange_spot_pb.TradesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_trades() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_spot_trades instead" - - @pytest.mark.asyncio - async def test_get_spot_subaccount_orders_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.subaccount_orders_list_responses.append(exchange_spot_pb.SubaccountOrdersListResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_subaccount_orders(subaccount_id="", market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_spot_subaccount_orders_list instead" - ) - - @pytest.mark.asyncio - async def test_get_spot_subaccount_trades_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.subaccount_trades_list_responses.append(exchange_spot_pb.SubaccountTradesListResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_spot_subaccount_trades(subaccount_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_spot_subaccount_trades_list instead" - ) - - @pytest.mark.asyncio - async def test_get_historical_spot_orders_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.orders_history_responses.append(exchange_spot_pb.SubaccountTradesListResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_historical_spot_orders() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_spot_orders_history instead" - ) - - @pytest.mark.asyncio - async def test_stream_spot_markets_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.stream_markets_responses.append(exchange_spot_pb.StreamMarketsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_spot_markets() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_spot_markets_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_spot_orderbook_snapshot_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.stream_orderbook_v2_responses.append(exchange_spot_pb.StreamOrderbookV2Response()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_spot_orderbook_snapshot(market_ids=[]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_spot_orderbook_snapshots instead" - ) - - @pytest.mark.asyncio - async def test_stream_spot_orderbook_update_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.stream_orderbook_update_responses.append(exchange_spot_pb.StreamOrderbookUpdateRequest()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_spot_orderbook_update(market_ids=[]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_spot_orderbook_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_spot_orders_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.stream_orders_responses.append(exchange_spot_pb.StreamOrdersRequest()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_spot_orders(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_spot_orders_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_spot_trades_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.stream_orders_responses.append(exchange_spot_pb.StreamTradesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_spot_trades() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_spot_trades_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_historical_spot_orders_deprecation_warning( - self, - spot_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - spot_servicer.stream_orders_history_responses.append(exchange_spot_pb.StreamOrdersHistoryRequest()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_historical_spot_orders(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_spot_orders_history_updates instead" - ) - - @pytest.mark.asyncio - async def test_get_derivative_markets_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.markets_responses.append(exchange_derivative_pb.MarketsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_markets() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_derivative_markets instead" - - @pytest.mark.asyncio - async def test_get_derivative_market_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.market_responses.append(exchange_derivative_pb.MarketResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_market(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_derivative_market instead" - - @pytest.mark.asyncio - async def test_get_binary_options_markets_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.binary_options_markets_responses.append( - exchange_derivative_pb.BinaryOptionsMarketsResponse() - ) - - with catch_warnings(record=True) as all_warnings: - await client.get_binary_options_markets() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_binary_options_markets instead" - ) - - @pytest.mark.asyncio - async def test_get_binary_options_market_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.binary_options_market_responses.append(exchange_derivative_pb.BinaryOptionsMarketResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_binary_options_market(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_binary_options_market instead" - ) - - @pytest.mark.asyncio - async def test_get_derivative_orderbook_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.orderbook_v2_responses.append(exchange_derivative_pb.OrderbookV2Request()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_orderbook(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_derivative_orderbook_v2 instead" - ) - - @pytest.mark.asyncio - async def test_get_derivative_orderbooksV2_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.orderbooks_v2_responses.append(exchange_derivative_pb.OrderbooksV2Request()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_orderbooksV2(market_ids=[]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_derivative_orderbooks_v2 instead" - ) - - @pytest.mark.asyncio - async def test_get_derivative_orders_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.orders_responses.append(exchange_derivative_pb.OrdersResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_orders(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_derivative_orders instead" - - @pytest.mark.asyncio - async def test_get_derivative_positions_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.positions_responses.append(exchange_derivative_pb.PositionsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_positions() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_derivative_positions_v2 instead" - ) - - @pytest.mark.asyncio - async def test_get_derivative_liquidable_positions_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.liquidable_positions_responses.append(exchange_derivative_pb.LiquidablePositionsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_liquidable_positions() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_derivative_liquidable_positions instead" - ) - - @pytest.mark.asyncio - async def test_get_funding_payments_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.funding_payments_responses.append(exchange_derivative_pb.FundingPaymentsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_funding_payments(subaccount_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_funding_payments instead" - - @pytest.mark.asyncio - async def test_get_funding_rates_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.funding_rates_responses.append(exchange_derivative_pb.FundingRatesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_funding_rates(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_funding_rates instead" - - @pytest.mark.asyncio - async def test_get_derivative_trades_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.trades_responses.append(exchange_derivative_pb.TradesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_trades() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_derivative_trades instead" - - @pytest.mark.asyncio - async def test_get_derivative_subaccount_orders_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.subaccount_orders_list_responses.append( - exchange_derivative_pb.SubaccountOrdersListResponse() - ) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_subaccount_orders(subaccount_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_derivative_subaccount_orders instead" - ) - - @pytest.mark.asyncio - async def test_get_derivative_subaccount_trades_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.subaccount_trades_list_responses.append( - exchange_derivative_pb.SubaccountTradesListResponse() - ) - - with catch_warnings(record=True) as all_warnings: - await client.get_derivative_subaccount_trades(subaccount_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_derivative_subaccount_trades instead" - ) - - @pytest.mark.asyncio - async def test_get_historical_derivative_orders_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.orders_history_responses.append(exchange_derivative_pb.OrdersHistoryResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_historical_derivative_orders() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_derivative_orders_history instead" - ) - - @pytest.mark.asyncio - async def test_stream_derivative_markets_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.stream_market_responses.append(exchange_derivative_pb.StreamMarketResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_derivative_markets() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_derivative_market_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_derivative_orderbook_snapshot_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = spot_servicer - derivative_servicer.stream_orderbook_v2_responses.append(exchange_derivative_pb.StreamOrderbookV2Response()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_derivative_orderbook_snapshot(market_ids=[]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_derivative_orderbook_snapshots instead" - ) - - @pytest.mark.asyncio - async def test_stream_derivative_orderbook_update_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.stream_orderbook_update_responses.append( - exchange_derivative_pb.StreamOrderbookUpdateRequest() - ) - - with catch_warnings(record=True) as all_warnings: - await client.stream_derivative_orderbook_update(market_ids=[]) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_derivative_orderbook_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_derivative_positions_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubDerivativeExchange = derivative_servicer - derivative_servicer.stream_positions_responses.append(exchange_derivative_pb.StreamPositionsRequest()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_derivative_positions() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_derivative_positions_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_derivative_orders_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = derivative_servicer - derivative_servicer.stream_orders_responses.append(exchange_derivative_pb.StreamOrdersRequest()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_derivative_orders(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_derivative_orders_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_derivative_trades_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = derivative_servicer - derivative_servicer.stream_orders_responses.append(exchange_derivative_pb.StreamTradesResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_derivative_trades() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_derivative_trades_updates instead" - ) - - @pytest.mark.asyncio - async def test_stream_historical_derivative_orders_deprecation_warning( - self, - derivative_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubSpotExchange = derivative_servicer - derivative_servicer.stream_orders_history_responses.append(exchange_spot_pb.StreamOrdersHistoryRequest()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_historical_derivative_orders(market_id="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_derivative_orders_history_updates instead" - ) - - @pytest.mark.asyncio - async def test_get_account_portfolio_deprecation_warning( - self, - portfolio_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubPortfolio = portfolio_servicer - portfolio_servicer.account_portfolio_responses.append(exchange_portfolio_pb.AccountPortfolioResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_account_portfolio(account_address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use fetch_account_portfolio_balances instead" - ) - - @pytest.mark.asyncio - async def test_stream_account_portfolio_deprecation_warning( - self, - portfolio_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubPortfolio = portfolio_servicer - portfolio_servicer.stream_account_portfolio_responses.append( - exchange_portfolio_pb.StreamAccountPortfolioResponse() - ) - - with catch_warnings(record=True) as all_warnings: - await client.stream_account_portfolio(account_address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use listen_account_portfolio_updates instead" - ) - - @pytest.mark.asyncio - async def test_get_account_txs_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.account_txs_responses.append(exchange_explorer_pb.GetAccountTxsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_account_txs(address="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_account_txs instead" - - @pytest.mark.asyncio - async def test_get_blocks_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.blocks_responses.append(exchange_explorer_pb.GetBlocksResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_blocks() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_blocks instead" - - @pytest.mark.asyncio - async def test_get_block_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.block_responses.append(exchange_explorer_pb.GetBlockResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_block(block_height="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_block instead" - - @pytest.mark.asyncio - async def test_get_txs_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.txs_responses.append(exchange_explorer_pb.GetTxsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_txs() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_txs instead" - - @pytest.mark.asyncio - async def test_get_tx_by_hash_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.tx_by_tx_hash_responses.append(exchange_explorer_pb.GetTxByTxHashResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_tx_by_hash(tx_hash="") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_tx_by_tx_hash instead" - - @pytest.mark.asyncio - async def test_get_peggy_deposits_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.peggy_deposit_txs_responses.append(exchange_explorer_pb.GetPeggyDepositTxsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_peggy_deposits() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_peggy_deposit_txs instead" - - @pytest.mark.asyncio - async def test_get_peggy_withdrawals_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.peggy_withdrawal_txs_responses.append(exchange_explorer_pb.GetPeggyWithdrawalTxsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_peggy_withdrawals() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_peggy_withdrawal_txs instead" - ) - - @pytest.mark.asyncio - async def test_get_ibc_transfers_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubExplorer = explorer_servicer - explorer_servicer.ibc_transfer_txs_responses.append(exchange_explorer_pb.GetIBCTransferTxsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_ibc_transfers() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_ibc_transfer_txs instead" - - @pytest.mark.asyncio - async def test_stream_txs_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubPortfolio = explorer_servicer - explorer_servicer.stream_txs_responses.append(exchange_explorer_pb.StreamTxsResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_txs() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_txs_updates instead" - - @pytest.mark.asyncio - async def test_stream_blocks_deprecation_warning( - self, - explorer_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubPortfolio = explorer_servicer - explorer_servicer.stream_blocks_responses.append(exchange_explorer_pb.StreamBlocksResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.stream_blocks() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_blocks_updates instead" - - @pytest.mark.asyncio - async def test_chain_stream_deprecation_warning( - self, - chain_stream_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.chain_stream_stub = chain_stream_servicer - chain_stream_servicer.stream_responses.append(chain_stream_pb.StreamRequest()) - - with catch_warnings(record=True) as all_warnings: - await client.chain_stream() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use listen_chain_stream_updates instead" - ) - - @pytest.mark.asyncio - async def test_get_latest_block_deprecation_warning( - self, - tendermint_servicer, - ): - client = AsyncClient( - network=Network.local(), - ) - client.stubCosmosTendermint = tendermint_servicer - tendermint_servicer.get_latest_block_responses.append(tendermint_query.GetLatestBlockResponse()) - - with catch_warnings(record=True) as all_warnings: - await client.get_latest_block() - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use fetch_latest_block instead" - - def test_credentials_parameter_deprecation_warning( - self, - auth_servicer, - ): - with catch_warnings(record=True) as all_warnings: - AsyncClient(network=Network.local(), credentials=grpc.ssl_channel_credentials()) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "credentials parameter in AsyncClient is no longer used and will be deprecated" - ) - + @pytest.mark.skip(reason="This test is failing in Windows CI") @pytest.mark.asyncio async def test_listen_derivative_positions_updates_deprecation(self): # Create a mock AsyncClient (you might need to adjust this based on your actual implementation) diff --git a/tests/test_composer_deprecation_warnings.py b/tests/test_composer_deprecation_warnings.py deleted file mode 100644 index 70425269..00000000 --- a/tests/test_composer_deprecation_warnings.py +++ /dev/null @@ -1,536 +0,0 @@ -import warnings -from decimal import Decimal - -import pytest - -from pyinjective.composer import Composer -from pyinjective.core.network import Network -from tests.model_fixtures.markets_fixtures import btc_usdt_perp_market # noqa: F401 -from tests.model_fixtures.markets_fixtures import first_match_bet_market # noqa: F401 -from tests.model_fixtures.markets_fixtures import inj_token # noqa: F401 -from tests.model_fixtures.markets_fixtures import inj_usdt_spot_market # noqa: F401 -from tests.model_fixtures.markets_fixtures import usdt_perp_token # noqa: F401 -from tests.model_fixtures.markets_fixtures import usdt_token # noqa: F401 - - -class TestComposerDeprecationWarnings: - @pytest.fixture - def basic_composer(self, inj_usdt_spot_market, btc_usdt_perp_market, first_match_bet_market): - composer = Composer( - network=Network.devnet().string(), - spot_markets={inj_usdt_spot_market.id: inj_usdt_spot_market}, - derivative_markets={btc_usdt_perp_market.id: btc_usdt_perp_market}, - binary_option_markets={first_match_bet_market.id: first_match_bet_market}, - tokens={ - inj_usdt_spot_market.base_token.symbol: inj_usdt_spot_market.base_token, - inj_usdt_spot_market.quote_token.symbol: inj_usdt_spot_market.quote_token, - btc_usdt_perp_market.quote_token.symbol: btc_usdt_perp_market.quote_token, - }, - ) - - return composer - - def test_msg_deposit_deprecation_warning(self, basic_composer): - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgDeposit(sender="sender", subaccount_id="subaccount id", amount=1, denom="INJ") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_deposit instead" - - def test_msg_withdraw_deprecation_warning(self, basic_composer): - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgWithdraw(sender="sender", subaccount_id="subaccount id", amount=1, denom="USDT") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_withdraw instead" - - def test_coin_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.Coin( - amount=1, - denom="INJ", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use coin instead" - - def test_order_data_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.OrderData( - market_id="market id", - subaccount_id="subaccount id", - order_hash="order hash", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use order_data instead" - - def test_spot_order_deprecation_warning(self, basic_composer): - with warnings.catch_warnings(record=True) as all_warnings: - market_id = list(basic_composer.spot_markets.keys())[0] - basic_composer.SpotOrder( - market_id=market_id, - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - is_buy=True, - cid="cid", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use spot_order instead" - - def test_derivative_order_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.derivative_markets.keys())[0] - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.DerivativeOrder( - market_id=market_id, - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - is_buy=True, - cid="cid", - leverage=1, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use derivative_order instead" - - def test_msg_create_spot_limit_order_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.spot_markets.keys())[0] - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgCreateSpotLimitOrder( - market_id=market_id, - sender="sender", - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - cid="cid", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_create_spot_limit_order instead" - ) - - def test_msg_batch_create_spot_limit_orders_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.spot_markets.keys())[0] - order = basic_composer.spot_order( - market_id=market_id, - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=Decimal(1), - quantity=Decimal(1), - order_type="BUY", - ) - - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgBatchCreateSpotLimitOrders( - sender="sender", - orders=[order], - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_batch_create_spot_limit_orders instead" - ) - - def test_msg_create_spot_market_order_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.spot_markets.keys())[0] - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgCreateSpotMarketOrder( - market_id=market_id, - sender="sender", - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - is_buy=True, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_create_spot_market_order instead" - ) - - def test_msg_cancel_spot_order_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgCancelSpotOrder( - market_id="0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0", - sender="sender", - subaccount_id="subaccount id", - order_hash="order hash", - cid="cid", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_cancel_spot_order instead" - - def test_msg_batch_cancel_spot_orders_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - orders = [ - composer.order_data( - market_id="0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0", - subaccount_id="subaccount_id", - order_hash="0x3870fbdd91f07d54425147b1bb96404f4f043ba6335b422a6d494d285b387f2d", - ), - ] - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgBatchCancelSpotOrders(sender="sender", data=orders) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_batch_cancel_spot_orders instead" - ) - - def test_msg_batch_update_orders_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgBatchUpdateOrders(sender="sender") - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_batch_update_orders instead" - - def test_msg_privileged_execute_contract_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgPrivilegedExecuteContract( - sender="sender", - contract="contract", - msg="msg", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_privileged_execute_contract instead" - ) - - def test_msg_create_derivative_limit_order_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.derivative_markets.keys())[0] - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgCreateDerivativeLimitOrder( - market_id=market_id, - sender="sender", - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - cid="cid", - leverage=1, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_create_derivative_limit_order instead" - ) - - def test_msg_batch_create_derivative_limit_orders_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.derivative_markets.keys())[0] - order = basic_composer.derivative_order( - market_id=market_id, - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=Decimal(1), - quantity=Decimal(1), - margin=Decimal(1), - order_type="BUY", - ) - - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgBatchCreateDerivativeLimitOrders( - sender="sender", - orders=[order], - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_batch_create_derivative_limit_orders instead" - ) - - def test_msg_create_derivative_market_order_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.derivative_markets.keys())[0] - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgCreateDerivativeMarketOrder( - market_id=market_id, - sender="sender", - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - cid="cid", - leverage=1, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_create_derivative_market_order instead" - ) - - def test_msg_cancel_derivative_order_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgCancelDerivativeOrder( - market_id="0x7cc8b10d7deb61e744ef83bdec2bbcf4a056867e89b062c6a453020ca82bd4e4", - sender="sender", - subaccount_id="subaccount id", - order_hash="order hash", - cid="cid", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_cancel_derivative_order instead" - ) - - def test_msg_batch_cancel_derivative_orders_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - orders = [ - composer.order_data( - market_id="0x7cc8b10d7deb61e744ef83bdec2bbcf4a056867e89b062c6a453020ca82bd4e4", - subaccount_id="subaccount_id", - order_hash="0x3870fbdd91f07d54425147b1bb96404f4f043ba6335b422a6d494d285b387f2d", - ), - ] - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgBatchCancelDerivativeOrders(sender="sender", data=orders) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_batch_cancel_derivative_orders instead" - ) - - def test_msg_instant_binary_options_market_launch_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgInstantBinaryOptionsMarketLaunch( - sender="sender", - ticker="B2400/INJ", - oracle_symbol="B2400/INJ", - oracle_provider="injective", - oracle_type="Band", - oracle_scale_factor=6, - maker_fee_rate=0.001, - taker_fee_rate=0.001, - expiration_timestamp=1630000000, - settlement_timestamp=1630000000, - quote_denom="inj", - quote_decimals=18, - min_price_tick_size=0.01, - min_quantity_tick_size=0.01, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_instant_binary_options_market_launch instead" - ) - - def test_msg_create_binary_options_limit_order_deprecation_warning(self, basic_composer): - market = list(basic_composer.binary_option_markets.values())[0] - - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgCreateBinaryOptionsLimitOrder( - market_id=market.id, - sender="sender", - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - cid="cid", - is_buy=True, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_create_binary_options_limit_order instead" - ) - - def test_msg_create_binary_options_market_order_deprecation_warning(self, basic_composer): - market = list(basic_composer.binary_option_markets.values())[0] - - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgCreateBinaryOptionsMarketOrder( - market_id=market.id, - sender="sender", - subaccount_id="subaccount id", - fee_recipient="fee recipient", - price=1, - quantity=1, - cid="cid", - is_buy=True, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_create_binary_options_market_order instead" - ) - - def test_msg_cancel_binary_options_order_deprecation_warning(self, basic_composer): - market = list(basic_composer.binary_option_markets.values())[0] - - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgCancelBinaryOptionsOrder( - market_id=market.id, - sender="sender", - subaccount_id="subaccount id", - order_hash="order hash", - cid="cid", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_cancel_binary_options_order instead" - ) - - def test_msg_subaccount_transfer_deprecation_warning(self, basic_composer): - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgSubaccountTransfer( - sender="sender", - source_subaccount_id="source subaccount id", - destination_subaccount_id="destination subaccount id", - amount=1, - denom="INJ", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_subaccount_transfer instead" - - def test_msg_external_transfer_deprecation_warning(self, basic_composer): - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgExternalTransfer( - sender="sender", - source_subaccount_id="source subaccount id", - destination_subaccount_id="destination subaccount id", - amount=1, - denom="INJ", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_external_transfer instead" - - def test_msg_liquidate_position_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgLiquidatePosition( - sender="sender", - subaccount_id="subaccount id", - market_id="0x7cc8b10d7deb61e744ef83bdec2bbcf4a056867e89b062c6a453020ca82bd4e4", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_liquidate_position instead" - - def test_msg_increase_position_margin_deprecation_warning(self, basic_composer): - market_id = list(basic_composer.derivative_markets.keys())[0] - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgIncreasePositionMargin( - sender="sender", - source_subaccount_id="source_subaccount id", - destination_subaccount_id="destination_subaccount id", - market_id=market_id, - amount=1, - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_increase_position_margin instead" - ) - - def test_msg_rewards_opt_out_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgRewardsOptOut( - sender="sender", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert str(deprecation_warnings[0].message) == "This method is deprecated. Use msg_rewards_opt_out instead" - - def test_msg_admin_update_binary_options_market_deprecation_warning(self, basic_composer): - market = list(basic_composer.binary_option_markets.values())[0] - - with warnings.catch_warnings(record=True) as all_warnings: - basic_composer.MsgAdminUpdateBinaryOptionsMarket( - sender="sender", - market_id=market.id, - status="Paused", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_admin_update_binary_options_market instead" - ) - - def test_msg_withdraw_delegator_reward_deprecation_warning(self): - composer = Composer(network=Network.devnet().string()) - - with warnings.catch_warnings(record=True) as all_warnings: - composer.MsgWithdrawDelegatorReward( - delegator_address="delegator address", - validator_address="validator address", - ) - - deprecation_warnings = [warning for warning in all_warnings if issubclass(warning.category, DeprecationWarning)] - assert len(deprecation_warnings) == 1 - assert ( - str(deprecation_warnings[0].message) - == "This method is deprecated. Use msg_withdraw_delegator_reward instead" - )