Skip to content

Fix KeyPair imports #1536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ There are some examples how to do it:
from starknet_py.net.account.account import Account
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.models.chains import StarknetChainId
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.net.signer.stark_curve_signer import StarkCurveSigner

# Creates an instance of account which is already deployed
Expand Down
3 changes: 2 additions & 1 deletion starknet_py/net/account/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
)
from starknet_py.net.models.typed_data import TypedDataDict
from starknet_py.net.signer import BaseSigner
from starknet_py.net.signer.stark_curve_signer import KeyPair, StarkCurveSigner
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.net.signer.stark_curve_signer import StarkCurveSigner
from starknet_py.serialization.data_serializers.array_serializer import ArraySerializer
from starknet_py.serialization.data_serializers.felt_serializer import FeltSerializer
from starknet_py.serialization.data_serializers.payload_serializer import (
Expand Down
2 changes: 1 addition & 1 deletion starknet_py/tests/e2e/account/account_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
DeployAccountV3,
InvokeV3,
)
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.net.udc_deployer.deployer import Deployer
from starknet_py.tests.e2e.fixtures.constants import (
MAX_FEE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async def test_deploy_prefunded_account(
from starknet_py.hash.address import compute_address
from starknet_py.net.account.account import Account
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair

# First, make sure to generate private key and salt
# docs: end
Expand Down
2 changes: 1 addition & 1 deletion starknet_py/tests/e2e/docs/code_examples/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.models import StarknetChainId
from starknet_py.net.models.typed_data import TypedDataDict
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair


def test_init():
Expand Down
2 changes: 1 addition & 1 deletion starknet_py/tests/e2e/docs/code_examples/test_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from starknet_py.net.client_models import InvokeTransactionV3, ResourceBounds
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.models import DeclareV2, DeclareV3, StarknetChainId
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.tests.e2e.fixtures.misc import ContractVersion, load_contract


Expand Down
2 changes: 1 addition & 1 deletion starknet_py/tests/e2e/docs/guide/test_custom_nonce.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def test_custom_nonce(account):
from starknet_py.net.client import Client
from starknet_py.net.models import AddressRepresentation, StarknetChainId
from starknet_py.net.signer import BaseSigner
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair

class MyAccount(Account):
def __init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async def test_sign_offchain_message(account):
from starknet_py.net.account.account import Account
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.models import StarknetChainId
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.utils.typed_data import TypedData

# Create a TypedData dictionary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import pytest

from starknet_py.net.signer.key_pair import KeyPair


@pytest.mark.asyncio
async def test_creating_account():
Expand All @@ -8,7 +10,7 @@ async def test_creating_account():
from starknet_py.net.account.account import Account
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.models.chains import StarknetChainId
from starknet_py.net.signer.stark_curve_signer import KeyPair, StarkCurveSigner
from starknet_py.net.signer.stark_curve_signer import StarkCurveSigner

# Creates an instance of account which is already deployed
# Account using transaction version=1 (has __validate__ function)
Expand Down
2 changes: 1 addition & 1 deletion starknet_py/tests/e2e/fixtures/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.http_client import HttpMethod, RpcHttpClient
from starknet_py.net.models import StarknetChainId
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.tests.e2e.fixtures.constants import (
DEVNET_PRE_DEPLOYED_ACCOUNT_ADDRESS,
DEVNET_PRE_DEPLOYED_ACCOUNT_PRIVATE_KEY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from starknet_py.net.account.account import Account
from starknet_py.net.account.base_account import BaseAccount
from starknet_py.net.models import StarknetChainId
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair


@pytest_asyncio.fixture(scope="package")
Expand Down
2 changes: 1 addition & 1 deletion starknet_py/tests/e2e/tests_on_networks/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from starknet_py.net.account.account import Account
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.models import StarknetChainId
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.tests.e2e.fixtures.constants import (
SEPOLIA_ACCOUNT_ADDRESS,
SEPOLIA_ACCOUNT_PRIVATE_KEY,
Expand Down
2 changes: 1 addition & 1 deletion starknet_py/tests/e2e/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from starknet_py.net.http_client import HttpClient, HttpMethod
from starknet_py.net.models import StarknetChainId
from starknet_py.net.models.transaction import DeployAccountV1
from starknet_py.net.signer.stark_curve_signer import KeyPair
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.net.udc_deployer.deployer import _get_random_salt
from starknet_py.tests.e2e.fixtures.constants import MAX_FEE

Expand Down
3 changes: 2 additions & 1 deletion starknet_py/tests/unit/net/account/account_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from starknet_py.net.account.account import Account
from starknet_py.net.full_node_client import FullNodeClient
from starknet_py.net.models import StarknetChainId, parse_address
from starknet_py.net.signer.stark_curve_signer import KeyPair, StarkCurveSigner
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.net.signer.stark_curve_signer import StarkCurveSigner
from starknet_py.tests.e2e.fixtures.constants import (
MAX_FEE,
MAX_RESOURCE_BOUNDS_L1,
Expand Down
3 changes: 2 additions & 1 deletion starknet_py/tests/unit/signer/test_stark_curve_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

from starknet_py.net.models import StarknetChainId
from starknet_py.net.models.transaction import DeclareV3, DeployAccountV3, InvokeV3
from starknet_py.net.signer.stark_curve_signer import KeyPair, StarkCurveSigner
from starknet_py.net.signer.key_pair import KeyPair
from starknet_py.net.signer.stark_curve_signer import StarkCurveSigner


@pytest.mark.parametrize(
Expand Down
Loading