diff --git a/multiversx_sdk/__init__.py b/multiversx_sdk/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/multiversx_sdk/core/__init__.py b/multiversx_sdk/core/__init__.py index 28b5aa75..62a72145 100644 --- a/multiversx_sdk/core/__init__.py +++ b/multiversx_sdk/core/__init__.py @@ -1,15 +1,15 @@ -from multiversx_sdk_core.account import AccountNonceHolder -from multiversx_sdk_core.address import (Address, AddressComputer, +from multiversx_sdk.core.account import AccountNonceHolder +from multiversx_sdk.core.address import (Address, AddressComputer, AddressFactory) -from multiversx_sdk_core.code_metadata import CodeMetadata -from multiversx_sdk_core.contract_query import ContractQuery -from multiversx_sdk_core.contract_query_builder import ContractQueryBuilder -from multiversx_sdk_core.message import Message, MessageComputer -from multiversx_sdk_core.token_payment import TokenPayment -from multiversx_sdk_core.tokens import (Token, TokenComputer, +from multiversx_sdk.core.code_metadata import CodeMetadata +from multiversx_sdk.core.contract_query import ContractQuery +from multiversx_sdk.core.contract_query_builder import ContractQueryBuilder +from multiversx_sdk.core.message import Message, MessageComputer +from multiversx_sdk.core.token_payment import TokenPayment +from multiversx_sdk.core.tokens import (Token, TokenComputer, TokenIdentifierParts, TokenTransfer) -from multiversx_sdk_core.transaction import Transaction, TransactionComputer -from multiversx_sdk_core.transaction_payload import TransactionPayload +from multiversx_sdk.core.transaction import Transaction, TransactionComputer +from multiversx_sdk.core.transaction_payload import TransactionPayload __all__ = [ "AccountNonceHolder", "Address", "AddressFactory", "AddressComputer", diff --git a/multiversx_sdk/core/account.py b/multiversx_sdk/core/account.py index e07aab92..631c0e32 100644 --- a/multiversx_sdk/core/account.py +++ b/multiversx_sdk/core/account.py @@ -1,5 +1,5 @@ -from multiversx_sdk_core.interfaces import INonce +from multiversx_sdk.core.interfaces import INonce class AccountNonceHolder(): diff --git a/multiversx_sdk/core/account_test.py b/multiversx_sdk/core/account_test.py index 380a096c..6c099638 100644 --- a/multiversx_sdk/core/account_test.py +++ b/multiversx_sdk/core/account_test.py @@ -1,5 +1,5 @@ -from multiversx_sdk_core.account import AccountNonceHolder +from multiversx_sdk.core.account import AccountNonceHolder def test_account_nonce_holder(): diff --git a/multiversx_sdk/core/address.py b/multiversx_sdk/core/address.py index 34ebea51..48647eb1 100644 --- a/multiversx_sdk/core/address.py +++ b/multiversx_sdk/core/address.py @@ -3,9 +3,9 @@ from Cryptodome.Hash import keccak -from multiversx_sdk_core import bech32 -from multiversx_sdk_core.constants import DEFAULT_HRP, METACHAIN_ID -from multiversx_sdk_core.errors import ErrBadAddress, ErrBadPubkeyLength +from multiversx_sdk.core import bech32 +from multiversx_sdk.core.constants import DEFAULT_HRP, METACHAIN_ID +from multiversx_sdk.core.errors import ErrBadAddress, ErrBadPubkeyLength SC_HEX_PUBKEY_PREFIX = "0" * 16 PUBKEY_LENGTH = 32 diff --git a/multiversx_sdk/core/address_test.py b/multiversx_sdk/core/address_test.py index 15fd26fc..77d309c8 100644 --- a/multiversx_sdk/core/address_test.py +++ b/multiversx_sdk/core/address_test.py @@ -1,9 +1,9 @@ import pytest -from multiversx_sdk_core.address import (Address, AddressComputer, +from multiversx_sdk.core.address import (Address, AddressComputer, AddressFactory, is_valid_bech32) -from multiversx_sdk_core.errors import ErrBadAddress, ErrBadPubkeyLength +from multiversx_sdk.core.errors import ErrBadAddress, ErrBadPubkeyLength def test_address(): diff --git a/multiversx_sdk/core/code_metadata_test.py b/multiversx_sdk/core/code_metadata_test.py index 1adec4c1..3a01eda4 100644 --- a/multiversx_sdk/core/code_metadata_test.py +++ b/multiversx_sdk/core/code_metadata_test.py @@ -1,6 +1,6 @@ -from multiversx_sdk_core.code_metadata import CodeMetadata +from multiversx_sdk.core.code_metadata import CodeMetadata def test_code_metadata_serialize(): diff --git a/multiversx_sdk/core/codec.py b/multiversx_sdk/core/codec.py index 32013c85..28b3f80d 100644 --- a/multiversx_sdk/core/codec.py +++ b/multiversx_sdk/core/codec.py @@ -1,5 +1,5 @@ -from multiversx_sdk_core.constants import INTEGER_MAX_NUM_BYTES +from multiversx_sdk.core.constants import INTEGER_MAX_NUM_BYTES def encode_unsigned_number(arg: int) -> bytes: diff --git a/multiversx_sdk/core/contract_query.py b/multiversx_sdk/core/contract_query.py index 418891bc..8001192b 100644 --- a/multiversx_sdk/core/contract_query.py +++ b/multiversx_sdk/core/contract_query.py @@ -2,7 +2,7 @@ from typing import List, Optional, Sequence -from multiversx_sdk_core.interfaces import IAddress +from multiversx_sdk.core.interfaces import IAddress class ContractQuery: diff --git a/multiversx_sdk/core/contract_query_builder.py b/multiversx_sdk/core/contract_query_builder.py index c0cb5077..bb0cf461 100644 --- a/multiversx_sdk/core/contract_query_builder.py +++ b/multiversx_sdk/core/contract_query_builder.py @@ -2,9 +2,9 @@ from typing import Any, Optional, Sequence -from multiversx_sdk_core.contract_query import ContractQuery -from multiversx_sdk_core.interfaces import IAddress -from multiversx_sdk_core.serializer import args_to_strings +from multiversx_sdk.core.contract_query import ContractQuery +from multiversx_sdk.core.interfaces import IAddress +from multiversx_sdk.core.serializer import args_to_strings class ContractQueryBuilder(): diff --git a/multiversx_sdk/core/contract_query_builder_test.py b/multiversx_sdk/core/contract_query_builder_test.py index 773c9fac..829482b7 100644 --- a/multiversx_sdk/core/contract_query_builder_test.py +++ b/multiversx_sdk/core/contract_query_builder_test.py @@ -1,5 +1,5 @@ -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.contract_query_builder import ContractQueryBuilder +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.contract_query_builder import ContractQueryBuilder def test_contract_query_builder(): diff --git a/multiversx_sdk/core/message.py b/multiversx_sdk/core/message.py index 83eec667..361568f8 100644 --- a/multiversx_sdk/core/message.py +++ b/multiversx_sdk/core/message.py @@ -1,6 +1,6 @@ from Cryptodome.Hash import keccak -from multiversx_sdk_core.interfaces import IMessage +from multiversx_sdk.core.interfaces import IMessage class Message: @@ -11,7 +11,7 @@ def __init__(self, data: bytes, signature: bytes = b"") -> None: class MessageComputer: """ - Also see: + Also see: - https://github.com/multiversx/mx-sdk-js-core/blob/v11.2.0/src/signableMessage.ts - https://eips.ethereum.org/EIPS/eip-712 (in the past, it served as a basis for the implementation) """ diff --git a/multiversx_sdk/core/message_test.py b/multiversx_sdk/core/message_test.py index e19aec89..d435bdbb 100644 --- a/multiversx_sdk/core/message_test.py +++ b/multiversx_sdk/core/message_test.py @@ -1,4 +1,4 @@ -from multiversx_sdk_core.message import Message, MessageComputer +from multiversx_sdk.core.message import Message, MessageComputer def test_message_v1_serialize_for_signing(): diff --git a/multiversx_sdk/core/proto/transaction_serializer.py b/multiversx_sdk/core/proto/transaction_serializer.py index a22034c1..652331e4 100644 --- a/multiversx_sdk/core/proto/transaction_serializer.py +++ b/multiversx_sdk/core/proto/transaction_serializer.py @@ -1,8 +1,8 @@ from typing import Protocol -import multiversx_sdk_core.proto.transaction_pb2 as ProtoTransaction -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.codec import encode_unsigned_number +import multiversx_sdk.core.proto.transaction_pb2 as ProtoTransaction +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.codec import encode_unsigned_number class ITransaction(Protocol): diff --git a/multiversx_sdk/core/proto/transaction_serializer_test.py b/multiversx_sdk/core/proto/transaction_serializer_test.py index e21bdafc..855a8270 100644 --- a/multiversx_sdk/core/proto/transaction_serializer_test.py +++ b/multiversx_sdk/core/proto/transaction_serializer_test.py @@ -1,6 +1,6 @@ -from multiversx_sdk_core.proto.transaction_serializer import ProtoSerializer -from multiversx_sdk_core.testutils.wallets import load_wallets -from multiversx_sdk_core.transaction import Transaction, TransactionComputer +from multiversx_sdk.core.proto.transaction_serializer import ProtoSerializer +from multiversx_sdk.core.transaction import Transaction, TransactionComputer +from multiversx_sdk.testutils.wallets import load_wallets class TestProtoSerializer: diff --git a/multiversx_sdk/core/serializer.py b/multiversx_sdk/core/serializer.py index 3ec791cc..e4f03fd8 100644 --- a/multiversx_sdk/core/serializer.py +++ b/multiversx_sdk/core/serializer.py @@ -1,8 +1,9 @@ from typing import Any, List, Protocol, Sequence, runtime_checkable -from multiversx_sdk_core.codec import encode_unsigned_number, encode_signed_number -from multiversx_sdk_core.constants import ARGS_SEPARATOR -from multiversx_sdk_core.errors import ErrCannotSerializeArgument +from multiversx_sdk.core.codec import (encode_signed_number, + encode_unsigned_number) +from multiversx_sdk.core.constants import ARGS_SEPARATOR +from multiversx_sdk.core.errors import ErrCannotSerializeArgument @runtime_checkable diff --git a/multiversx_sdk/core/token_payment.py b/multiversx_sdk/core/token_payment.py index b505ea3f..b0febbe6 100644 --- a/multiversx_sdk/core/token_payment.py +++ b/multiversx_sdk/core/token_payment.py @@ -1,10 +1,10 @@ from decimal import ROUND_DOWN, Context, Decimal, localcontext from typing import Union -from multiversx_sdk_core import typecheck -from multiversx_sdk_core.constants import (EGLD_NUM_DECIMALS, +from multiversx_sdk.core import typecheck +from multiversx_sdk.core.constants import (EGLD_NUM_DECIMALS, EGLD_TOKEN_IDENTIFIER) -from multiversx_sdk_core.interfaces import INonce, ITokenIdentifier +from multiversx_sdk.core.interfaces import INonce, ITokenIdentifier class TokenPayment: diff --git a/multiversx_sdk/core/token_payment_test.py b/multiversx_sdk/core/token_payment_test.py index f91630dc..d69b5c87 100644 --- a/multiversx_sdk/core/token_payment_test.py +++ b/multiversx_sdk/core/token_payment_test.py @@ -4,7 +4,7 @@ import pytest -from multiversx_sdk_core.token_payment import TokenPayment +from multiversx_sdk.core.token_payment import TokenPayment def test_with_egld(): diff --git a/multiversx_sdk/core/tokens.py b/multiversx_sdk/core/tokens.py index 4b5350b7..2b38001f 100644 --- a/multiversx_sdk/core/tokens.py +++ b/multiversx_sdk/core/tokens.py @@ -1,11 +1,11 @@ from typing import List -from multiversx_sdk_core.codec import (decode_unsigned_number, +from multiversx_sdk.core.codec import (decode_unsigned_number, encode_unsigned_number) -from multiversx_sdk_core.constants import TOKEN_RANDOM_SEQUENCE_LENGTH -from multiversx_sdk_core.errors import (BadUsageError, +from multiversx_sdk.core.constants import TOKEN_RANDOM_SEQUENCE_LENGTH +from multiversx_sdk.core.errors import (BadUsageError, InvalidTokenIdentifierError) -from multiversx_sdk_core.interfaces import IToken, ITokenIdentifierParts +from multiversx_sdk.core.interfaces import IToken, ITokenIdentifierParts class Token: diff --git a/multiversx_sdk/core/tokens_test.py b/multiversx_sdk/core/tokens_test.py index 5a3be02d..5ab6d4fa 100644 --- a/multiversx_sdk/core/tokens_test.py +++ b/multiversx_sdk/core/tokens_test.py @@ -1,7 +1,7 @@ import pytest -from multiversx_sdk_core.errors import BadUsageError -from multiversx_sdk_core.tokens import (Token, TokenComputer, +from multiversx_sdk.core.errors import BadUsageError +from multiversx_sdk.core.tokens import (Token, TokenComputer, TokenIdentifierParts) diff --git a/multiversx_sdk/core/transaction.py b/multiversx_sdk/core/transaction.py index c15d0afc..381ce9a5 100644 --- a/multiversx_sdk/core/transaction.py +++ b/multiversx_sdk/core/transaction.py @@ -4,13 +4,13 @@ from hashlib import blake2b from typing import Any, Dict, Optional, Protocol -from multiversx_sdk_core.constants import (DEFAULT_HRP, DIGEST_SIZE, +from multiversx_sdk.core.constants import (DEFAULT_HRP, DIGEST_SIZE, TRANSACTION_MIN_GAS_PRICE, TRANSACTION_OPTIONS_DEFAULT, TRANSACTION_VERSION_DEFAULT) -from multiversx_sdk_core.errors import NotEnoughGasError -from multiversx_sdk_core.interfaces import INetworkConfig, ITransaction -from multiversx_sdk_core.proto.transaction_serializer import ProtoSerializer +from multiversx_sdk.core.errors import NotEnoughGasError +from multiversx_sdk.core.interfaces import INetworkConfig, ITransaction +from multiversx_sdk.core.proto.transaction_serializer import ProtoSerializer class IAddressConverter(Protocol): diff --git a/multiversx_sdk/core/transaction_builders/__init__.py b/multiversx_sdk/core/transaction_builders/__init__.py index f535b5f8..2fd2ebaa 100644 --- a/multiversx_sdk/core/transaction_builders/__init__.py +++ b/multiversx_sdk/core/transaction_builders/__init__.py @@ -1,17 +1,17 @@ -from multiversx_sdk_core.transaction_builders.contract_builders import ( +from multiversx_sdk.core.transaction_builders.contract_builders import ( ContractCallBuilder, ContractDeploymentBuilder, ContractUpgradeBuilder) -from multiversx_sdk_core.transaction_builders.default_configuration import \ +from multiversx_sdk.core.transaction_builders.default_configuration import \ DefaultTransactionBuildersConfiguration -from multiversx_sdk_core.transaction_builders.esdt_builders import \ +from multiversx_sdk.core.transaction_builders.esdt_builders import \ ESDTIssueBuilder -from multiversx_sdk_core.transaction_builders.relayed_v1_builder import \ +from multiversx_sdk.core.transaction_builders.relayed_v1_builder import \ RelayedTransactionV1Builder -from multiversx_sdk_core.transaction_builders.relayed_v2_builder import \ +from multiversx_sdk.core.transaction_builders.relayed_v2_builder import \ RelayedTransactionV2Builder -from multiversx_sdk_core.transaction_builders.transaction_builder import \ +from multiversx_sdk.core.transaction_builders.transaction_builder import \ TransactionBuilder -from multiversx_sdk_core.transaction_builders.transfers_builders import ( +from multiversx_sdk.core.transaction_builders.transfers_builders import ( EGLDTransferBuilder, ESDTNFTTransferBuilder, ESDTTransferBuilder, MultiESDTNFTTransferBuilder) diff --git a/multiversx_sdk/core/transaction_builders/contract_builders.py b/multiversx_sdk/core/transaction_builders/contract_builders.py index 5d67c06b..db452d2e 100644 --- a/multiversx_sdk/core/transaction_builders/contract_builders.py +++ b/multiversx_sdk/core/transaction_builders/contract_builders.py @@ -1,11 +1,11 @@ from typing import Any, List, Optional, Protocol, Sequence -from multiversx_sdk_core.constants import VM_TYPE_WASM_VM -from multiversx_sdk_core.interfaces import (IAddress, ICodeMetadata, IGasLimit, +from multiversx_sdk.core.constants import VM_TYPE_WASM_VM +from multiversx_sdk.core.interfaces import (IAddress, ICodeMetadata, IGasLimit, IGasPrice, INonce, ITokenPayment, ITransactionValue) -from multiversx_sdk_core.serializer import arg_to_string, args_to_strings -from multiversx_sdk_core.transaction_builders.transaction_builder import ( +from multiversx_sdk.core.serializer import arg_to_string, args_to_strings +from multiversx_sdk.core.transaction_builders.transaction_builder import ( ITransactionBuilderConfiguration, TransactionBuilder) diff --git a/multiversx_sdk/core/transaction_builders/contract_builders_test.py b/multiversx_sdk/core/transaction_builders/contract_builders_test.py index 13fa49a1..dfb20c87 100644 --- a/multiversx_sdk/core/transaction_builders/contract_builders_test.py +++ b/multiversx_sdk/core/transaction_builders/contract_builders_test.py @@ -1,12 +1,12 @@ from typing import List -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.code_metadata import CodeMetadata -from multiversx_sdk_core.interfaces import ITokenPayment -from multiversx_sdk_core.token_payment import TokenPayment -from multiversx_sdk_core.transaction_builders.contract_builders import ( +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.code_metadata import CodeMetadata +from multiversx_sdk.core.interfaces import ITokenPayment +from multiversx_sdk.core.token_payment import TokenPayment +from multiversx_sdk.core.transaction_builders.contract_builders import ( ContractCallBuilder, ContractDeploymentBuilder, ContractUpgradeBuilder) -from multiversx_sdk_core.transaction_builders.default_configuration import \ +from multiversx_sdk.core.transaction_builders.default_configuration import \ DefaultTransactionBuildersConfiguration dummyConfig = DefaultTransactionBuildersConfiguration(chain_id="D") diff --git a/multiversx_sdk/core/transaction_builders/default_configuration.py b/multiversx_sdk/core/transaction_builders/default_configuration.py index 5b3629f8..94fe4191 100644 --- a/multiversx_sdk/core/transaction_builders/default_configuration.py +++ b/multiversx_sdk/core/transaction_builders/default_configuration.py @@ -1,7 +1,7 @@ from dataclasses import dataclass -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.interfaces import (IAddress, IChainID, IGasPrice, +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.interfaces import (IAddress, IChainID, IGasPrice, ITransactionValue) diff --git a/multiversx_sdk/core/transaction_builders/default_configuration_test.py b/multiversx_sdk/core/transaction_builders/default_configuration_test.py index 494da6b0..bf345d46 100644 --- a/multiversx_sdk/core/transaction_builders/default_configuration_test.py +++ b/multiversx_sdk/core/transaction_builders/default_configuration_test.py @@ -1,4 +1,4 @@ -from multiversx_sdk_core.transaction_builders.default_configuration import \ +from multiversx_sdk.core.transaction_builders.default_configuration import \ DefaultTransactionBuildersConfiguration diff --git a/multiversx_sdk/core/transaction_builders/esdt_builders.py b/multiversx_sdk/core/transaction_builders/esdt_builders.py index 7d53aa06..a1a17029 100644 --- a/multiversx_sdk/core/transaction_builders/esdt_builders.py +++ b/multiversx_sdk/core/transaction_builders/esdt_builders.py @@ -1,9 +1,9 @@ from typing import List, Optional, Protocol -from multiversx_sdk_core.interfaces import (IAddress, IGasLimit, IGasPrice, +from multiversx_sdk.core.interfaces import (IAddress, IGasLimit, IGasPrice, INonce, ITransactionValue) -from multiversx_sdk_core.serializer import arg_to_string, args_to_strings -from multiversx_sdk_core.transaction_builders.transaction_builder import ( +from multiversx_sdk.core.serializer import arg_to_string, args_to_strings +from multiversx_sdk.core.transaction_builders.transaction_builder import ( ITransactionBuilderConfiguration, TransactionBuilder) diff --git a/multiversx_sdk/core/transaction_builders/esdt_builders_test.py b/multiversx_sdk/core/transaction_builders/esdt_builders_test.py index 8b37b1f6..60e18f01 100644 --- a/multiversx_sdk/core/transaction_builders/esdt_builders_test.py +++ b/multiversx_sdk/core/transaction_builders/esdt_builders_test.py @@ -1,8 +1,8 @@ -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.transaction_builders.default_configuration import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.transaction_builders.default_configuration import \ DefaultTransactionBuildersConfiguration -from multiversx_sdk_core.transaction_builders.esdt_builders import \ +from multiversx_sdk.core.transaction_builders.esdt_builders import \ ESDTIssueBuilder dummyConfig = DefaultTransactionBuildersConfiguration(chain_id="D") diff --git a/multiversx_sdk/core/transaction_builders/relayed_v1_builder.py b/multiversx_sdk/core/transaction_builders/relayed_v1_builder.py index 4b29d307..84c931e0 100644 --- a/multiversx_sdk/core/transaction_builders/relayed_v1_builder.py +++ b/multiversx_sdk/core/transaction_builders/relayed_v1_builder.py @@ -2,12 +2,12 @@ import json from typing import Any, Dict, Optional -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.errors import ErrInvalidRelayerV1BuilderArguments -from multiversx_sdk_core.interfaces import (IAddress, INetworkConfig, INonce, +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.errors import ErrInvalidRelayerV1BuilderArguments +from multiversx_sdk.core.interfaces import (IAddress, INetworkConfig, INonce, ITransactionOptions, ITransactionVersion) -from multiversx_sdk_core.transaction import Transaction +from multiversx_sdk.core.transaction import Transaction class RelayedTransactionV1Builder: diff --git a/multiversx_sdk/core/transaction_builders/relayed_v1_builder_test.py b/multiversx_sdk/core/transaction_builders/relayed_v1_builder_test.py index e2082226..8924941c 100644 --- a/multiversx_sdk/core/transaction_builders/relayed_v1_builder_test.py +++ b/multiversx_sdk/core/transaction_builders/relayed_v1_builder_test.py @@ -1,12 +1,12 @@ import pytest -from multiversx_sdk_core import TokenPayment -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.errors import ErrInvalidRelayerV1BuilderArguments -from multiversx_sdk_core.testutils.wallets import load_wallets -from multiversx_sdk_core.transaction import Transaction, TransactionComputer -from multiversx_sdk_core.transaction_builders.relayed_v1_builder import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.errors import ErrInvalidRelayerV1BuilderArguments +from multiversx_sdk.core.token_payment import TokenPayment +from multiversx_sdk.core.transaction import Transaction, TransactionComputer +from multiversx_sdk.core.transaction_builders.relayed_v1_builder import \ RelayedTransactionV1Builder +from multiversx_sdk.testutils.wallets import load_wallets class NetworkConfig: diff --git a/multiversx_sdk/core/transaction_builders/relayed_v2_builder.py b/multiversx_sdk/core/transaction_builders/relayed_v2_builder.py index 0f6ea39d..a556afe5 100644 --- a/multiversx_sdk/core/transaction_builders/relayed_v2_builder.py +++ b/multiversx_sdk/core/transaction_builders/relayed_v2_builder.py @@ -1,13 +1,13 @@ from typing import Any, List, Optional -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.errors import (ErrInvalidGasLimitForInnerTransaction, +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.errors import (ErrInvalidGasLimitForInnerTransaction, ErrInvalidRelayerV2BuilderArguments) -from multiversx_sdk_core.interfaces import (IAddress, IGasLimit, +from multiversx_sdk.core.interfaces import (IAddress, IGasLimit, INetworkConfig, INonce) -from multiversx_sdk_core.serializer import args_to_string -from multiversx_sdk_core.transaction import Transaction -from multiversx_sdk_core.transaction_payload import TransactionPayload +from multiversx_sdk.core.serializer import args_to_string +from multiversx_sdk.core.transaction import Transaction +from multiversx_sdk.core.transaction_payload import TransactionPayload class RelayedTransactionV2Builder: diff --git a/multiversx_sdk/core/transaction_builders/relayed_v2_builder_test.py b/multiversx_sdk/core/transaction_builders/relayed_v2_builder_test.py index aa2dd0ee..a75d96a2 100644 --- a/multiversx_sdk/core/transaction_builders/relayed_v2_builder_test.py +++ b/multiversx_sdk/core/transaction_builders/relayed_v2_builder_test.py @@ -1,12 +1,12 @@ import pytest -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.errors import (ErrInvalidGasLimitForInnerTransaction, +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.errors import (ErrInvalidGasLimitForInnerTransaction, ErrInvalidRelayerV2BuilderArguments) -from multiversx_sdk_core.testutils.wallets import load_wallets -from multiversx_sdk_core.transaction import Transaction, TransactionComputer -from multiversx_sdk_core.transaction_builders.relayed_v2_builder import \ +from multiversx_sdk.core.transaction import Transaction, TransactionComputer +from multiversx_sdk.core.transaction_builders.relayed_v2_builder import \ RelayedTransactionV2Builder +from multiversx_sdk.testutils.wallets import load_wallets class NetworkConfig: diff --git a/multiversx_sdk/core/transaction_builders/transaction_builder.py b/multiversx_sdk/core/transaction_builders/transaction_builder.py index d0642ece..4c81cee8 100644 --- a/multiversx_sdk/core/transaction_builders/transaction_builder.py +++ b/multiversx_sdk/core/transaction_builders/transaction_builder.py @@ -1,17 +1,17 @@ import logging from typing import List, Optional, Protocol -from multiversx_sdk_core.constants import (ARGS_SEPARATOR, +from multiversx_sdk.core.constants import (ARGS_SEPARATOR, TRANSACTION_OPTIONS_DEFAULT, TRANSACTION_VERSION_DEFAULT) -from multiversx_sdk_core.interfaces import (IAddress, IChainID, IGasLimit, +from multiversx_sdk.core.interfaces import (IAddress, IChainID, IGasLimit, IGasPrice, INonce, ITransactionOptions, ITransactionPayload, ITransactionValue, ITransactionVersion) -from multiversx_sdk_core.transaction import Transaction -from multiversx_sdk_core.transaction_payload import TransactionPayload +from multiversx_sdk.core.transaction import Transaction +from multiversx_sdk.core.transaction_payload import TransactionPayload logger = logging.getLogger("transaction_builder") diff --git a/multiversx_sdk/core/transaction_builders/transfers_builders.py b/multiversx_sdk/core/transaction_builders/transfers_builders.py index 047808f6..e1ec5357 100644 --- a/multiversx_sdk/core/transaction_builders/transfers_builders.py +++ b/multiversx_sdk/core/transaction_builders/transfers_builders.py @@ -1,10 +1,10 @@ from typing import List, Optional, Protocol, Sequence -from multiversx_sdk_core.interfaces import (IAddress, IGasLimit, IGasPrice, +from multiversx_sdk.core.interfaces import (IAddress, IGasLimit, IGasPrice, INonce, ITokenPayment, ITransactionValue) -from multiversx_sdk_core.serializer import arg_to_string -from multiversx_sdk_core.transaction_builders.transaction_builder import ( +from multiversx_sdk.core.serializer import arg_to_string +from multiversx_sdk.core.transaction_builders.transaction_builder import ( ITransactionBuilderConfiguration, TransactionBuilder) diff --git a/multiversx_sdk/core/transaction_builders/transfers_builders_test.py b/multiversx_sdk/core/transaction_builders/transfers_builders_test.py index 2b8afe80..a58bc3d1 100644 --- a/multiversx_sdk/core/transaction_builders/transfers_builders_test.py +++ b/multiversx_sdk/core/transaction_builders/transfers_builders_test.py @@ -1,9 +1,9 @@ -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.token_payment import TokenPayment -from multiversx_sdk_core.transaction_builders.default_configuration import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.token_payment import TokenPayment +from multiversx_sdk.core.transaction_builders.default_configuration import \ DefaultTransactionBuildersConfiguration -from multiversx_sdk_core.transaction_builders.transfers_builders import ( +from multiversx_sdk.core.transaction_builders.transfers_builders import ( EGLDTransferBuilder, ESDTNFTTransferBuilder, ESDTTransferBuilder, MultiESDTNFTTransferBuilder) diff --git a/multiversx_sdk/core/transaction_factories/__init__.py b/multiversx_sdk/core/transaction_factories/__init__.py index 04cc985f..743c9caa 100644 --- a/multiversx_sdk/core/transaction_factories/__init__.py +++ b/multiversx_sdk/core/transaction_factories/__init__.py @@ -1,12 +1,12 @@ -from multiversx_sdk_core.transaction_factories.delegation_transactions_factory import \ +from multiversx_sdk.core.transaction_factories.delegation_transactions_factory import \ DelegationTransactionsFactory -from multiversx_sdk_core.transaction_factories.smart_contract_transactions_factory import \ +from multiversx_sdk.core.transaction_factories.smart_contract_transactions_factory import \ SmartContractTransactionsFactory -from multiversx_sdk_core.transaction_factories.token_management_transactions_factory import ( +from multiversx_sdk.core.transaction_factories.token_management_transactions_factory import ( RegisterAndSetAllRolesTokenType, TokenManagementTransactionsFactory) -from multiversx_sdk_core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ TransactionsFactoryConfig -from multiversx_sdk_core.transaction_factories.transfer_transactions_factory import \ +from multiversx_sdk.core.transaction_factories.transfer_transactions_factory import \ TransferTransactionsFactory __all__ = [ diff --git a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory.py b/multiversx_sdk/core/transaction_factories/delegation_transactions_factory.py index 5abb630c..6fe5f7e0 100644 --- a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory.py +++ b/multiversx_sdk/core/transaction_factories/delegation_transactions_factory.py @@ -1,12 +1,12 @@ from typing import Protocol, Sequence -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.constants import DELEGATION_MANAGER_SC_ADDRESS -from multiversx_sdk_core.errors import ErrListsLengthMismatch -from multiversx_sdk_core.interfaces import IAddress, IValidatorPublicKey -from multiversx_sdk_core.serializer import arg_to_string -from multiversx_sdk_core.transaction import Transaction -from multiversx_sdk_core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.constants import DELEGATION_MANAGER_SC_ADDRESS +from multiversx_sdk.core.errors import ErrListsLengthMismatch +from multiversx_sdk.core.interfaces import IAddress, IValidatorPublicKey +from multiversx_sdk.core.serializer import arg_to_string +from multiversx_sdk.core.transaction import Transaction +from multiversx_sdk.core.transaction_factories.transaction_builder import \ TransactionBuilder diff --git a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory_test.py b/multiversx_sdk/core/transaction_factories/delegation_transactions_factory_test.py index 52b8be0c..6399d417 100644 --- a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory_test.py +++ b/multiversx_sdk/core/transaction_factories/delegation_transactions_factory_test.py @@ -1,11 +1,10 @@ -from multiversx_sdk_wallet import ValidatorSecretKey, ValidatorSigner - -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.constants import DELEGATION_MANAGER_SC_ADDRESS -from multiversx_sdk_core.transaction_factories.delegation_transactions_factory import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.constants import DELEGATION_MANAGER_SC_ADDRESS +from multiversx_sdk.core.transaction_factories.delegation_transactions_factory import \ DelegationTransactionsFactory -from multiversx_sdk_core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ TransactionsFactoryConfig +from multiversx_sdk.wallet import ValidatorSecretKey, ValidatorSigner class TestDelegationTransactionsFactory: diff --git a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory.py b/multiversx_sdk/core/transaction_factories/relayed_transactions_factory.py index f53ca727..4b3e2040 100644 --- a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory.py +++ b/multiversx_sdk/core/transaction_factories/relayed_transactions_factory.py @@ -2,11 +2,11 @@ import json from typing import Any, Dict, List, Protocol -from multiversx_sdk_core import Address -from multiversx_sdk_core.errors import InvalidInnerTransactionError -from multiversx_sdk_core.interfaces import IAddress, ITransaction -from multiversx_sdk_core.serializer import args_to_string -from multiversx_sdk_core.transaction import Transaction +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.errors import InvalidInnerTransactionError +from multiversx_sdk.core.interfaces import IAddress, ITransaction +from multiversx_sdk.core.serializer import args_to_string +from multiversx_sdk.core.transaction import Transaction class IConfig(Protocol): diff --git a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory_test.py b/multiversx_sdk/core/transaction_factories/relayed_transactions_factory_test.py index d2c36375..3878f37a 100644 --- a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory_test.py +++ b/multiversx_sdk/core/transaction_factories/relayed_transactions_factory_test.py @@ -1,13 +1,13 @@ import pytest -from multiversx_sdk_core import Address -from multiversx_sdk_core.errors import InvalidInnerTransactionError -from multiversx_sdk_core.testutils.wallets import load_wallets -from multiversx_sdk_core.transaction import Transaction, TransactionComputer -from multiversx_sdk_core.transaction_factories.relayed_transactions_factory import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.errors import InvalidInnerTransactionError +from multiversx_sdk.core.transaction import Transaction, TransactionComputer +from multiversx_sdk.core.transaction_factories.relayed_transactions_factory import \ RelayedTransactionsFactory -from multiversx_sdk_core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ TransactionsFactoryConfig +from multiversx_sdk.testutils.wallets import load_wallets class TestRelayedTransactionsFactory: diff --git a/multiversx_sdk/core/transaction_factories/smart_contract_transaction_factory_test.py b/multiversx_sdk/core/transaction_factories/smart_contract_transaction_factory_test.py index 70eff49c..7831453f 100644 --- a/multiversx_sdk/core/transaction_factories/smart_contract_transaction_factory_test.py +++ b/multiversx_sdk/core/transaction_factories/smart_contract_transaction_factory_test.py @@ -1,11 +1,11 @@ from pathlib import Path -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.constants import CONTRACT_DEPLOY_ADDRESS -from multiversx_sdk_core.tokens import Token, TokenComputer, TokenTransfer -from multiversx_sdk_core.transaction_factories.smart_contract_transactions_factory import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.constants import CONTRACT_DEPLOY_ADDRESS +from multiversx_sdk.core.tokens import Token, TokenComputer, TokenTransfer +from multiversx_sdk.core.transaction_factories.smart_contract_transactions_factory import \ SmartContractTransactionsFactory -from multiversx_sdk_core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ TransactionsFactoryConfig diff --git a/multiversx_sdk/core/transaction_factories/smart_contract_transactions_factory.py b/multiversx_sdk/core/transaction_factories/smart_contract_transactions_factory.py index fe4c5891..108d2f75 100644 --- a/multiversx_sdk/core/transaction_factories/smart_contract_transactions_factory.py +++ b/multiversx_sdk/core/transaction_factories/smart_contract_transactions_factory.py @@ -1,17 +1,17 @@ from pathlib import Path from typing import Any, List, Protocol, Sequence, Union -from multiversx_sdk_core import Transaction -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.code_metadata import CodeMetadata -from multiversx_sdk_core.constants import (CONTRACT_DEPLOY_ADDRESS, +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.code_metadata import CodeMetadata +from multiversx_sdk.core.constants import (CONTRACT_DEPLOY_ADDRESS, VM_TYPE_WASM_VM) -from multiversx_sdk_core.errors import BadUsageError -from multiversx_sdk_core.interfaces import IAddress, IToken, ITokenTransfer -from multiversx_sdk_core.serializer import arg_to_string, args_to_strings -from multiversx_sdk_core.transaction_factories.token_transfers_data_builder import \ +from multiversx_sdk.core.errors import BadUsageError +from multiversx_sdk.core.interfaces import IAddress, IToken, ITokenTransfer +from multiversx_sdk.core.serializer import arg_to_string, args_to_strings +from multiversx_sdk.core.transaction import Transaction +from multiversx_sdk.core.transaction_factories.token_transfers_data_builder import \ TokenTransfersDataBuilder -from multiversx_sdk_core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.transaction_factories.transaction_builder import \ TransactionBuilder diff --git a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory.py b/multiversx_sdk/core/transaction_factories/token_management_transactions_factory.py index 88c67e91..6cb54031 100644 --- a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory.py +++ b/multiversx_sdk/core/transaction_factories/token_management_transactions_factory.py @@ -3,10 +3,10 @@ from enum import Enum from typing import List, Protocol -from multiversx_sdk_core.interfaces import IAddress -from multiversx_sdk_core.serializer import arg_to_string -from multiversx_sdk_core.transaction import Transaction -from multiversx_sdk_core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.interfaces import IAddress +from multiversx_sdk.core.serializer import arg_to_string +from multiversx_sdk.core.transaction import Transaction +from multiversx_sdk.core.transaction_factories.transaction_builder import \ TransactionBuilder logger = logging.getLogger(__name__) diff --git a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory_test.py b/multiversx_sdk/core/transaction_factories/token_management_transactions_factory_test.py index 83744b82..7e7d932f 100644 --- a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory_test.py +++ b/multiversx_sdk/core/transaction_factories/token_management_transactions_factory_test.py @@ -1,7 +1,7 @@ -from multiversx_sdk_core import Address -from multiversx_sdk_core.transaction_factories.token_management_transactions_factory import ( +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.transaction_factories.token_management_transactions_factory import ( RegisterAndSetAllRolesTokenType, TokenManagementTransactionsFactory) -from multiversx_sdk_core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ TransactionsFactoryConfig frank = Address.new_from_bech32("erd1kdl46yctawygtwg2k462307dmz2v55c605737dp3zkxh04sct7asqylhyv") diff --git a/multiversx_sdk/core/transaction_factories/token_transfers_data_builder.py b/multiversx_sdk/core/transaction_factories/token_transfers_data_builder.py index 11a3cac4..283978d2 100644 --- a/multiversx_sdk/core/transaction_factories/token_transfers_data_builder.py +++ b/multiversx_sdk/core/transaction_factories/token_transfers_data_builder.py @@ -1,7 +1,7 @@ from typing import List, Protocol, Sequence -from multiversx_sdk_core.interfaces import IAddress, ITokenTransfer -from multiversx_sdk_core.serializer import arg_to_string, args_to_strings +from multiversx_sdk.core.interfaces import IAddress, ITokenTransfer +from multiversx_sdk.core.serializer import arg_to_string, args_to_strings class ITokenComputer(Protocol): diff --git a/multiversx_sdk/core/transaction_factories/transaction_builder.py b/multiversx_sdk/core/transaction_factories/transaction_builder.py index c2dc0281..d09a6a58 100644 --- a/multiversx_sdk/core/transaction_factories/transaction_builder.py +++ b/multiversx_sdk/core/transaction_factories/transaction_builder.py @@ -1,8 +1,8 @@ from typing import List, Optional, Protocol -from multiversx_sdk_core.constants import ARGS_SEPARATOR -from multiversx_sdk_core.interfaces import IAddress -from multiversx_sdk_core.transaction import Transaction +from multiversx_sdk.core.constants import ARGS_SEPARATOR +from multiversx_sdk.core.interfaces import IAddress +from multiversx_sdk.core.transaction import Transaction class IConfig(Protocol): diff --git a/multiversx_sdk/core/transaction_factories/transactions_factory_config.py b/multiversx_sdk/core/transaction_factories/transactions_factory_config.py index da7b9802..356f1b40 100644 --- a/multiversx_sdk/core/transaction_factories/transactions_factory_config.py +++ b/multiversx_sdk/core/transaction_factories/transactions_factory_config.py @@ -1,5 +1,6 @@ -from multiversx_sdk_core.address import DEFAULT_HRP, Address -from multiversx_sdk_core.interfaces import IAddress +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.constants import DEFAULT_HRP +from multiversx_sdk.core.interfaces import IAddress class TransactionsFactoryConfig: diff --git a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory.py b/multiversx_sdk/core/transaction_factories/transfer_transactions_factory.py index 63b37ee3..301a2d48 100644 --- a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory.py +++ b/multiversx_sdk/core/transaction_factories/transfer_transactions_factory.py @@ -1,11 +1,11 @@ from typing import List, Optional, Protocol, Sequence -from multiversx_sdk_core.errors import BadUsageError -from multiversx_sdk_core.interfaces import IAddress, IToken, ITokenTransfer -from multiversx_sdk_core.transaction import Transaction -from multiversx_sdk_core.transaction_factories.token_transfers_data_builder import \ +from multiversx_sdk.core.errors import BadUsageError +from multiversx_sdk.core.interfaces import IAddress, IToken, ITokenTransfer +from multiversx_sdk.core.transaction import Transaction +from multiversx_sdk.core.transaction_factories.token_transfers_data_builder import \ TokenTransfersDataBuilder -from multiversx_sdk_core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.transaction_factories.transaction_builder import \ TransactionBuilder ADDITIONAL_GAS_FOR_ESDT_TRANSFER = 100000 diff --git a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory_test.py b/multiversx_sdk/core/transaction_factories/transfer_transactions_factory_test.py index cf7f170a..81346389 100644 --- a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory_test.py +++ b/multiversx_sdk/core/transaction_factories/transfer_transactions_factory_test.py @@ -1,8 +1,8 @@ -from multiversx_sdk_core.address import Address -from multiversx_sdk_core.tokens import Token, TokenComputer, TokenTransfer -from multiversx_sdk_core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.tokens import Token, TokenComputer, TokenTransfer +from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ TransactionsFactoryConfig -from multiversx_sdk_core.transaction_factories.transfer_transactions_factory import \ +from multiversx_sdk.core.transaction_factories.transfer_transactions_factory import \ TransferTransactionsFactory diff --git a/multiversx_sdk/core/transaction_parsers/__init__.py b/multiversx_sdk/core/transaction_parsers/__init__.py index 8b98f82d..fc71d869 100644 --- a/multiversx_sdk/core/transaction_parsers/__init__.py +++ b/multiversx_sdk/core/transaction_parsers/__init__.py @@ -1,4 +1,4 @@ -from multiversx_sdk_core.transaction_parsers.token_operations_outcome_parser import \ +from multiversx_sdk.core.transaction_parsers.token_operations_outcome_parser import \ TokenOperationsOutcomeParser __all__ = [ diff --git a/multiversx_sdk/core/transaction_parsers/interfaces.py b/multiversx_sdk/core/transaction_parsers/interfaces.py index 83a9a4a1..afdc3904 100644 --- a/multiversx_sdk/core/transaction_parsers/interfaces.py +++ b/multiversx_sdk/core/transaction_parsers/interfaces.py @@ -1,6 +1,6 @@ from typing import Protocol, Sequence -from multiversx_sdk_core.interfaces import IAddress +from multiversx_sdk.core.interfaces import IAddress class ITransactionOnNetwork(Protocol): diff --git a/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser.py b/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser.py index 02f770e7..46181c0d 100644 --- a/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser.py +++ b/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser.py @@ -1,14 +1,14 @@ from typing import Protocol -from multiversx_sdk_core import Address -from multiversx_sdk_core.codec import decode_unsigned_number -from multiversx_sdk_core.transaction_parsers.token_operations_outcome_parser_types import ( +from multiversx_sdk.core import Address +from multiversx_sdk.core.codec import decode_unsigned_number +from multiversx_sdk.core.transaction_parsers.token_operations_outcome_parser_types import ( AddQuantityOutcome, BurnOutcome, BurnQuantityOutcome, ESDTIssueOutcome, FreezingOutcome, MintOutcome, NFTCreateOutcome, PausingOutcome, RegisterAndSetAllRolesOutcome, SetSpecialRoleOutcome, UpdateAttributesOutcome, WipingOutcome) -from multiversx_sdk_core.transaction_parsers.transaction_on_network_wrapper import ( +from multiversx_sdk.core.transaction_parsers.transaction_on_network_wrapper import ( ITransactionEvent, ITransactionOnNetwork, TransactionOnNetworkWrapper) diff --git a/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py b/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py index 363d28cb..e6a95bde 100644 --- a/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py +++ b/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py @@ -1,10 +1,10 @@ -from multiversx_sdk_core import Address -from multiversx_sdk_core.codec import encode_unsigned_number -from multiversx_sdk_core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core import Address +from multiversx_sdk.core.codec import encode_unsigned_number +from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ TransactionsFactoryConfig -from multiversx_sdk_core.transaction_parsers.token_operations_outcome_parser import \ +from multiversx_sdk.core.transaction_parsers.token_operations_outcome_parser import \ TokenOperationsOutcomeParser -from multiversx_sdk_core.transaction_parsers.transaction_on_network_wrapper import ( +from multiversx_sdk.core.transaction_parsers.transaction_on_network_wrapper import ( ContractResultsWrapper, TransactionEventTopicWrapper, TransactionEventWrapper, TransactionLogsWrapper, TransactionOnNetworkWrapper) diff --git a/multiversx_sdk/core/transaction_parsers/transaction_on_network_wrapper.py b/multiversx_sdk/core/transaction_parsers/transaction_on_network_wrapper.py index 4aa19afb..577fb537 100644 --- a/multiversx_sdk/core/transaction_parsers/transaction_on_network_wrapper.py +++ b/multiversx_sdk/core/transaction_parsers/transaction_on_network_wrapper.py @@ -1,7 +1,7 @@ from typing import List, Sequence -from multiversx_sdk_core.interfaces import IAddress -from multiversx_sdk_core.transaction_parsers.interfaces import ( +from multiversx_sdk.core.interfaces import IAddress +from multiversx_sdk.core.transaction_parsers.interfaces import ( IContractResultItem, IContractResults, ITransactionEvent, ITransactionEventTopic, ITransactionLogs, ITransactionOnNetwork) diff --git a/multiversx_sdk/core/transaction_payload.py b/multiversx_sdk/core/transaction_payload.py index 052b880f..438aedba 100644 --- a/multiversx_sdk/core/transaction_payload.py +++ b/multiversx_sdk/core/transaction_payload.py @@ -1,6 +1,6 @@ import base64 -from multiversx_sdk_core.interfaces import ITransactionPayload +from multiversx_sdk.core.interfaces import ITransactionPayload class TransactionPayload(ITransactionPayload): diff --git a/multiversx_sdk/core/transaction_test.py b/multiversx_sdk/core/transaction_test.py index 88ca4ffb..57a27525 100644 --- a/multiversx_sdk/core/transaction_test.py +++ b/multiversx_sdk/core/transaction_test.py @@ -1,10 +1,10 @@ import pytest -from multiversx_sdk_wallet import UserSecretKey -from multiversx_sdk_core.errors import NotEnoughGasError -from multiversx_sdk_core.proto.transaction_serializer import ProtoSerializer -from multiversx_sdk_core.testutils.wallets import load_wallets -from multiversx_sdk_core.transaction import Transaction, TransactionComputer +from multiversx_sdk.core.errors import NotEnoughGasError +from multiversx_sdk.core.proto.transaction_serializer import ProtoSerializer +from multiversx_sdk.core.transaction import Transaction, TransactionComputer +from multiversx_sdk.testutils.wallets import load_wallets +from multiversx_sdk.wallet import UserSecretKey class NetworkConfig: diff --git a/multiversx_sdk/network_providers/__init__.py b/multiversx_sdk/network_providers/__init__.py index b8d741af..18fb9540 100644 --- a/multiversx_sdk/network_providers/__init__.py +++ b/multiversx_sdk/network_providers/__init__.py @@ -1,6 +1,8 @@ -from multiversx_sdk_network_providers.errors import GenericError -from multiversx_sdk_network_providers.resources import GenericResponse -from multiversx_sdk_network_providers.api_network_provider import ApiNetworkProvider -from multiversx_sdk_network_providers.proxy_network_provider import ProxyNetworkProvider +from multiversx_sdk.network_providers.api_network_provider import \ + ApiNetworkProvider +from multiversx_sdk.network_providers.errors import GenericError +from multiversx_sdk.network_providers.proxy_network_provider import \ + ProxyNetworkProvider +from multiversx_sdk.network_providers.resources import GenericResponse __all__ = ["GenericError", "GenericResponse", "ApiNetworkProvider", "ProxyNetworkProvider"] diff --git a/multiversx_sdk/network_providers/accounts.py b/multiversx_sdk/network_providers/accounts.py index cae0fcb6..bd062b3c 100644 --- a/multiversx_sdk/network_providers/accounts.py +++ b/multiversx_sdk/network_providers/accounts.py @@ -1,9 +1,8 @@ from typing import Any, Dict -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress class AccountOnNetwork: diff --git a/multiversx_sdk/network_providers/api_network_provider.py b/multiversx_sdk/network_providers/api_network_provider.py index e1a16bf4..db62cd2c 100644 --- a/multiversx_sdk/network_providers/api_network_provider.py +++ b/multiversx_sdk/network_providers/api_network_provider.py @@ -3,35 +3,35 @@ import requests from requests.auth import AuthBase -from multiversx_sdk_network_providers.accounts import (AccountOnNetwork, +from multiversx_sdk.network_providers.accounts import (AccountOnNetwork, GuardianData) -from multiversx_sdk_network_providers.config import DefaultPagination -from multiversx_sdk_network_providers.constants import DEFAULT_ADDRESS_HRP -from multiversx_sdk_network_providers.contract_query_requests import \ +from multiversx_sdk.network_providers.config import DefaultPagination +from multiversx_sdk.network_providers.constants import DEFAULT_ADDRESS_HRP +from multiversx_sdk.network_providers.contract_query_requests import \ ContractQueryRequest -from multiversx_sdk_network_providers.contract_query_response import \ +from multiversx_sdk.network_providers.contract_query_response import \ ContractQueryResponse -from multiversx_sdk_network_providers.errors import GenericError -from multiversx_sdk_network_providers.interface import (IAddress, +from multiversx_sdk.network_providers.errors import GenericError +from multiversx_sdk.network_providers.interface import (IAddress, IContractQuery, IPagination) -from multiversx_sdk_network_providers.network_config import NetworkConfig -from multiversx_sdk_network_providers.network_general_statistics import \ +from multiversx_sdk.network_providers.network_config import NetworkConfig +from multiversx_sdk.network_providers.network_general_statistics import \ NetworkGeneralStatistics -from multiversx_sdk_network_providers.network_stake import NetworkStake -from multiversx_sdk_network_providers.network_status import NetworkStatus -from multiversx_sdk_network_providers.proxy_network_provider import \ +from multiversx_sdk.network_providers.network_stake import NetworkStake +from multiversx_sdk.network_providers.network_status import NetworkStatus +from multiversx_sdk.network_providers.proxy_network_provider import \ ProxyNetworkProvider -from multiversx_sdk_network_providers.token_definitions import ( +from multiversx_sdk.network_providers.token_definitions import ( DefinitionOfFungibleTokenOnNetwork, DefinitionOfTokenCollectionOnNetwork) -from multiversx_sdk_network_providers.tokens import ( +from multiversx_sdk.network_providers.tokens import ( FungibleTokenOfAccountOnNetwork, NonFungibleTokenOfAccountOnNetwork) -from multiversx_sdk_network_providers.transaction_status import \ +from multiversx_sdk.network_providers.transaction_status import \ TransactionStatus -from multiversx_sdk_network_providers.transactions import ( +from multiversx_sdk.network_providers.transactions import ( ITransaction, TransactionInMempool, TransactionOnNetwork, transaction_to_dictionary) -from multiversx_sdk_network_providers.utils import decimal_to_padded_hex +from multiversx_sdk.network_providers.utils import decimal_to_padded_hex class ApiNetworkProvider: diff --git a/multiversx_sdk/network_providers/api_network_provider_test.py b/multiversx_sdk/network_providers/api_network_provider_test.py index 4e530641..9302a8ba 100644 --- a/multiversx_sdk/network_providers/api_network_provider_test.py +++ b/multiversx_sdk/network_providers/api_network_provider_test.py @@ -1,11 +1,12 @@ import pytest -from multiversx_sdk_core import Address, Transaction -from multiversx_sdk_network_providers.api_network_provider import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.core.transaction import Transaction +from multiversx_sdk.network_providers.api_network_provider import \ ApiNetworkProvider -from multiversx_sdk_network_providers.errors import GenericError -from multiversx_sdk_network_providers.interface import IPagination -from multiversx_sdk_network_providers.proxy_network_provider import \ +from multiversx_sdk.network_providers.errors import GenericError +from multiversx_sdk.network_providers.interface import IPagination +from multiversx_sdk.network_providers.proxy_network_provider import \ ContractQuery diff --git a/multiversx_sdk/network_providers/config.py b/multiversx_sdk/network_providers/config.py index c954d6d2..28d03fd5 100644 --- a/multiversx_sdk/network_providers/config.py +++ b/multiversx_sdk/network_providers/config.py @@ -1,4 +1,4 @@ -from multiversx_sdk_network_providers.interface import IPagination +from multiversx_sdk.network_providers.interface import IPagination class DefaultPagination(IPagination): diff --git a/multiversx_sdk/network_providers/constants.py b/multiversx_sdk/network_providers/constants.py index 7638af3b..a8aec20e 100644 --- a/multiversx_sdk/network_providers/constants.py +++ b/multiversx_sdk/network_providers/constants.py @@ -1,4 +1,4 @@ -from multiversx_sdk_core import Address +from multiversx_sdk.core import Address ESDT_CONTRACT_ADDRESS = Address.new_from_bech32("erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u") METACHAIN_ID = 4294967295 diff --git a/multiversx_sdk/network_providers/contract_query_requests.py b/multiversx_sdk/network_providers/contract_query_requests.py index 7d068dd2..fb299336 100644 --- a/multiversx_sdk/network_providers/contract_query_requests.py +++ b/multiversx_sdk/network_providers/contract_query_requests.py @@ -1,6 +1,6 @@ from typing import Any, Dict -from multiversx_sdk_network_providers.interface import IContractQuery +from multiversx_sdk.network_providers.interface import IContractQuery class ContractQueryRequest: diff --git a/multiversx_sdk/network_providers/contract_query_response.py b/multiversx_sdk/network_providers/contract_query_response.py index e657c69b..033ad2f1 100644 --- a/multiversx_sdk/network_providers/contract_query_response.py +++ b/multiversx_sdk/network_providers/contract_query_response.py @@ -1,6 +1,7 @@ -from typing import Any, Dict, List import base64 -from multiversx_sdk_network_providers.constants import MAX_UINT64 +from typing import Any, Dict, List + +from multiversx_sdk.network_providers.constants import MAX_UINT64 class ContractQueryResponse: @@ -28,7 +29,7 @@ def from_http_response(payload: Dict[str, Any]) -> 'ContractQueryResponse': def get_return_data_parts(self) -> List[bytes]: return [base64.b64decode(item) for item in self.return_data] - + def to_dictionary(self) -> Dict[str, Any]: return { "returnData": self.return_data, diff --git a/multiversx_sdk/network_providers/contract_results.py b/multiversx_sdk/network_providers/contract_results.py index daeffe1a..e00eefc4 100644 --- a/multiversx_sdk/network_providers/contract_results.py +++ b/multiversx_sdk/network_providers/contract_results.py @@ -1,11 +1,10 @@ import base64 from typing import Any, Dict, List -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress -from multiversx_sdk_network_providers.transaction_logs import TransactionLogs +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress +from multiversx_sdk.network_providers.transaction_logs import TransactionLogs class ContractResults: diff --git a/multiversx_sdk/network_providers/proxy_network_provider.py b/multiversx_sdk/network_providers/proxy_network_provider.py index 268499c0..feaaecac 100644 --- a/multiversx_sdk/network_providers/proxy_network_provider.py +++ b/multiversx_sdk/network_providers/proxy_network_provider.py @@ -4,28 +4,28 @@ import requests from requests.auth import AuthBase -from multiversx_sdk_network_providers.accounts import (AccountOnNetwork, +from multiversx_sdk.network_providers.accounts import (AccountOnNetwork, GuardianData) -from multiversx_sdk_network_providers.constants import (DEFAULT_ADDRESS_HRP, +from multiversx_sdk.network_providers.constants import (DEFAULT_ADDRESS_HRP, ESDT_CONTRACT_ADDRESS, METACHAIN_ID) -from multiversx_sdk_network_providers.contract_query_requests import \ +from multiversx_sdk.network_providers.contract_query_requests import \ ContractQueryRequest -from multiversx_sdk_network_providers.contract_query_response import \ +from multiversx_sdk.network_providers.contract_query_response import \ ContractQueryResponse -from multiversx_sdk_network_providers.errors import GenericError -from multiversx_sdk_network_providers.interface import IAddress, IContractQuery -from multiversx_sdk_network_providers.network_config import NetworkConfig -from multiversx_sdk_network_providers.network_status import NetworkStatus -from multiversx_sdk_network_providers.resources import (GenericResponse, +from multiversx_sdk.network_providers.errors import GenericError +from multiversx_sdk.network_providers.interface import IAddress, IContractQuery +from multiversx_sdk.network_providers.network_config import NetworkConfig +from multiversx_sdk.network_providers.network_status import NetworkStatus +from multiversx_sdk.network_providers.resources import (GenericResponse, SimulateResponse) -from multiversx_sdk_network_providers.token_definitions import ( +from multiversx_sdk.network_providers.token_definitions import ( DefinitionOfFungibleTokenOnNetwork, DefinitionOfTokenCollectionOnNetwork) -from multiversx_sdk_network_providers.tokens import ( +from multiversx_sdk.network_providers.tokens import ( FungibleTokenOfAccountOnNetwork, NonFungibleTokenOfAccountOnNetwork) -from multiversx_sdk_network_providers.transaction_status import \ +from multiversx_sdk.network_providers.transaction_status import \ TransactionStatus -from multiversx_sdk_network_providers.transactions import ( +from multiversx_sdk.network_providers.transactions import ( ITransaction, TransactionOnNetwork, transaction_to_dictionary) diff --git a/multiversx_sdk/network_providers/proxy_network_provider_test.py b/multiversx_sdk/network_providers/proxy_network_provider_test.py index 8fdd793b..1f2d1115 100644 --- a/multiversx_sdk/network_providers/proxy_network_provider_test.py +++ b/multiversx_sdk/network_providers/proxy_network_provider_test.py @@ -1,6 +1,6 @@ -from multiversx_sdk_core import Address, Transaction - -from multiversx_sdk_network_providers.proxy_network_provider import ( +from multiversx_sdk.core import Transaction +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.proxy_network_provider import ( ContractQuery, ProxyNetworkProvider) diff --git a/multiversx_sdk/network_providers/token_definitions.py b/multiversx_sdk/network_providers/token_definitions.py index e5116554..439d11e6 100644 --- a/multiversx_sdk/network_providers/token_definitions.py +++ b/multiversx_sdk/network_providers/token_definitions.py @@ -1,9 +1,8 @@ from typing import Any, Dict, List -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress class DefinitionOfFungibleTokenOnNetwork: diff --git a/multiversx_sdk/network_providers/tokens.py b/multiversx_sdk/network_providers/tokens.py index 3a68bb46..bbd36a8d 100644 --- a/multiversx_sdk/network_providers/tokens.py +++ b/multiversx_sdk/network_providers/tokens.py @@ -1,10 +1,9 @@ from typing import Any, Dict, List -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress -from multiversx_sdk_network_providers.utils import decimal_to_padded_hex +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress +from multiversx_sdk.network_providers.utils import decimal_to_padded_hex class FungibleTokenOfAccountOnNetwork: diff --git a/multiversx_sdk/network_providers/transaction_events.py b/multiversx_sdk/network_providers/transaction_events.py index 4afbf41b..3da90bc5 100644 --- a/multiversx_sdk/network_providers/transaction_events.py +++ b/multiversx_sdk/network_providers/transaction_events.py @@ -1,10 +1,9 @@ import base64 from typing import Any, Dict, List, Optional -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress class TransactionEvent: diff --git a/multiversx_sdk/network_providers/transaction_logs.py b/multiversx_sdk/network_providers/transaction_logs.py index e4aa8dfc..290016ef 100644 --- a/multiversx_sdk/network_providers/transaction_logs.py +++ b/multiversx_sdk/network_providers/transaction_logs.py @@ -1,10 +1,9 @@ from typing import Any, Callable, Dict, List, Optional, Union -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress -from multiversx_sdk_network_providers.transaction_events import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress +from multiversx_sdk.network_providers.transaction_events import \ TransactionEvent diff --git a/multiversx_sdk/network_providers/transaction_receipt.py b/multiversx_sdk/network_providers/transaction_receipt.py index 2264cbb5..c83c7ba3 100644 --- a/multiversx_sdk/network_providers/transaction_receipt.py +++ b/multiversx_sdk/network_providers/transaction_receipt.py @@ -1,9 +1,8 @@ from typing import Any, Dict -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress class TransactionReceipt: diff --git a/multiversx_sdk/network_providers/transactions.py b/multiversx_sdk/network_providers/transactions.py index deae1d1b..2644585d 100644 --- a/multiversx_sdk/network_providers/transactions.py +++ b/multiversx_sdk/network_providers/transactions.py @@ -1,15 +1,14 @@ import base64 from typing import Any, Dict, Optional, Protocol -from multiversx_sdk_core import Address - -from multiversx_sdk_network_providers.contract_results import ContractResults -from multiversx_sdk_network_providers.interface import IAddress -from multiversx_sdk_network_providers.resources import EmptyAddress -from multiversx_sdk_network_providers.transaction_logs import TransactionLogs -from multiversx_sdk_network_providers.transaction_receipt import \ +from multiversx_sdk.core.address import Address +from multiversx_sdk.network_providers.contract_results import ContractResults +from multiversx_sdk.network_providers.interface import IAddress +from multiversx_sdk.network_providers.resources import EmptyAddress +from multiversx_sdk.network_providers.transaction_logs import TransactionLogs +from multiversx_sdk.network_providers.transaction_receipt import \ TransactionReceipt -from multiversx_sdk_network_providers.transaction_status import \ +from multiversx_sdk.network_providers.transaction_status import \ TransactionStatus diff --git a/multiversx_sdk/testutils/wallets.py b/multiversx_sdk/testutils/wallets.py index 399e39d8..0eab4602 100644 --- a/multiversx_sdk/testutils/wallets.py +++ b/multiversx_sdk/testutils/wallets.py @@ -1,7 +1,7 @@ from pathlib import Path from typing import Dict -from multiversx_sdk_wallet import UserPEM +from multiversx_sdk.wallet.user_pem import UserPEM alice_pem = Path(__file__).parent / "testwallets" / "alice.pem" bob_pem = Path(__file__).parent / "testwallets" / "bob.pem" diff --git a/multiversx_sdk/wallet/__init__.py b/multiversx_sdk/wallet/__init__.py index fcd2f97d..5091f2cd 100644 --- a/multiversx_sdk/wallet/__init__.py +++ b/multiversx_sdk/wallet/__init__.py @@ -1,12 +1,12 @@ -from multiversx_sdk_wallet.mnemonic import Mnemonic -from multiversx_sdk_wallet.user_keys import UserPublicKey, UserSecretKey -from multiversx_sdk_wallet.user_pem import UserPEM -from multiversx_sdk_wallet.user_signer import UserSigner -from multiversx_sdk_wallet.user_verifer import UserVerifier -from multiversx_sdk_wallet.user_wallet import UserWallet -from multiversx_sdk_wallet.validator_keys import (ValidatorPublicKey, +from multiversx_sdk.wallet.mnemonic import Mnemonic +from multiversx_sdk.wallet.user_keys import UserPublicKey, UserSecretKey +from multiversx_sdk.wallet.user_pem import UserPEM +from multiversx_sdk.wallet.user_signer import UserSigner +from multiversx_sdk.wallet.user_verifer import UserVerifier +from multiversx_sdk.wallet.user_wallet import UserWallet +from multiversx_sdk.wallet.validator_keys import (ValidatorPublicKey, ValidatorSecretKey) -from multiversx_sdk_wallet.validator_signer import ValidatorSigner -from multiversx_sdk_wallet.validator_verifier import ValidatorVerifier +from multiversx_sdk.wallet.validator_signer import ValidatorSigner +from multiversx_sdk.wallet.validator_verifier import ValidatorVerifier __all__ = ["UserSigner", "Mnemonic", "UserSecretKey", "UserPublicKey", "ValidatorSecretKey", "ValidatorPublicKey", "UserVerifier", "ValidatorSigner", "ValidatorVerifier", "UserWallet", "UserPEM"] diff --git a/multiversx_sdk/wallet/crypto/__init__.py b/multiversx_sdk/wallet/crypto/__init__.py index 6d0bcb17..19b035ac 100644 --- a/multiversx_sdk/wallet/crypto/__init__.py +++ b/multiversx_sdk/wallet/crypto/__init__.py @@ -1,6 +1,6 @@ -from multiversx_sdk_wallet.crypto import decryptor, encryptor -from multiversx_sdk_wallet.crypto.encrypted_data import EncryptedData -from multiversx_sdk_wallet.crypto.randomness import Randomness +from multiversx_sdk.wallet.crypto import decryptor, encryptor +from multiversx_sdk.wallet.crypto.encrypted_data import EncryptedData +from multiversx_sdk.wallet.crypto.randomness import Randomness __all__ = [ 'EncryptedData', diff --git a/multiversx_sdk/wallet/crypto/decryptor.py b/multiversx_sdk/wallet/crypto/decryptor.py index b743050a..d3569ea1 100644 --- a/multiversx_sdk/wallet/crypto/decryptor.py +++ b/multiversx_sdk/wallet/crypto/decryptor.py @@ -3,10 +3,10 @@ from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.primitives.kdf.scrypt import Scrypt -from multiversx_sdk_wallet.crypto.constants import ( +from multiversx_sdk.wallet.crypto.constants import ( CIPHER_ALGORITHM_AES_128_CTR, KEY_DERIVATION_FUNCTION_SCRYPT) -from multiversx_sdk_wallet.crypto.encrypted_data import EncryptedData -from multiversx_sdk_wallet.errors import (ErrInvalidKeystoreFilePassword, +from multiversx_sdk.wallet.crypto.encrypted_data import EncryptedData +from multiversx_sdk.wallet.errors import (ErrInvalidKeystoreFilePassword, ErrUnknownCipher, ErrUnknownDerivationFunction) diff --git a/multiversx_sdk/wallet/crypto/encryptor.py b/multiversx_sdk/wallet/crypto/encryptor.py index e9cce364..cb1ad585 100644 --- a/multiversx_sdk/wallet/crypto/encryptor.py +++ b/multiversx_sdk/wallet/crypto/encryptor.py @@ -3,12 +3,12 @@ from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.primitives.kdf.scrypt import Scrypt -from multiversx_sdk_wallet.crypto.constants import ( +from multiversx_sdk.wallet.crypto.constants import ( CIPHER_ALGORITHM_AES_128_CTR, ENCRYPTOR_VERSION, KEY_DERIVATION_FUNCTION_SCRYPT) -from multiversx_sdk_wallet.crypto.encrypted_data import (EncryptedData, +from multiversx_sdk.wallet.crypto.encrypted_data import (EncryptedData, KeyDerivationParams) -from multiversx_sdk_wallet.interfaces import IRandomness +from multiversx_sdk.wallet.interfaces import IRandomness def encrypt(data: bytes, password: str, randomness: IRandomness) -> EncryptedData: diff --git a/multiversx_sdk/wallet/crypto/randomness.py b/multiversx_sdk/wallet/crypto/randomness.py index d70fc201..72a521bf 100644 --- a/multiversx_sdk/wallet/crypto/randomness.py +++ b/multiversx_sdk/wallet/crypto/randomness.py @@ -2,7 +2,7 @@ from typing import Optional from uuid import uuid4 -from multiversx_sdk_wallet.crypto.constants import (RANDOM_IV_LENGTH, +from multiversx_sdk.wallet.crypto.constants import (RANDOM_IV_LENGTH, RANDOM_SALT_LENGTH) diff --git a/multiversx_sdk/wallet/libraries/bls_facade.py b/multiversx_sdk/wallet/libraries/bls_facade.py index d6c63a9c..a7fe6cc4 100644 --- a/multiversx_sdk/wallet/libraries/bls_facade.py +++ b/multiversx_sdk/wallet/libraries/bls_facade.py @@ -4,7 +4,7 @@ from pathlib import Path from typing import Optional -from multiversx_sdk_wallet.errors import ErrLibraryNotFound, ErrUnsupportedOS +from multiversx_sdk.wallet.errors import ErrLibraryNotFound, ErrUnsupportedOS class BLSFacade: diff --git a/multiversx_sdk/wallet/libraries/bls_facade_test.py b/multiversx_sdk/wallet/libraries/bls_facade_test.py index 27f9f83e..00a76360 100644 --- a/multiversx_sdk/wallet/libraries/bls_facade_test.py +++ b/multiversx_sdk/wallet/libraries/bls_facade_test.py @@ -1,4 +1,4 @@ -from multiversx_sdk_wallet.libraries.bls_facade import BLSFacade +from multiversx_sdk.wallet.libraries.bls_facade import BLSFacade def test_generate_public_key(): diff --git a/multiversx_sdk/wallet/mnemonic.py b/multiversx_sdk/wallet/mnemonic.py index f48147f3..bb9a7d0c 100644 --- a/multiversx_sdk/wallet/mnemonic.py +++ b/multiversx_sdk/wallet/mnemonic.py @@ -2,10 +2,10 @@ import mnemonic -from multiversx_sdk_wallet import core -from multiversx_sdk_wallet.constants import BIP39_LANGUAGE, BIP39_STRENGTH -from multiversx_sdk_wallet.errors import ErrBadMnemonic -from multiversx_sdk_wallet.user_keys import UserSecretKey +from multiversx_sdk.wallet import core +from multiversx_sdk.wallet.constants import BIP39_LANGUAGE, BIP39_STRENGTH +from multiversx_sdk.wallet.errors import ErrBadMnemonic +from multiversx_sdk.wallet.user_keys import UserSecretKey class Mnemonic: diff --git a/multiversx_sdk/wallet/mnemonic_test.py b/multiversx_sdk/wallet/mnemonic_test.py index 0f36bef8..648fc34c 100644 --- a/multiversx_sdk/wallet/mnemonic_test.py +++ b/multiversx_sdk/wallet/mnemonic_test.py @@ -1,7 +1,7 @@ import pytest -from multiversx_sdk_wallet.errors import ErrBadMnemonic -from multiversx_sdk_wallet.mnemonic import Mnemonic +from multiversx_sdk.wallet.errors import ErrBadMnemonic +from multiversx_sdk.wallet.mnemonic import Mnemonic def test_assert_text_is_valid(): diff --git a/multiversx_sdk/wallet/pem_entry_test.py b/multiversx_sdk/wallet/pem_entry_test.py index 18520c0e..877bdd51 100644 --- a/multiversx_sdk/wallet/pem_entry_test.py +++ b/multiversx_sdk/wallet/pem_entry_test.py @@ -1,19 +1,19 @@ from pathlib import Path -from multiversx_sdk_wallet.constants import USER_SEED_LENGTH -from multiversx_sdk_wallet.pem_entry import PemEntry +from multiversx_sdk.wallet.constants import USER_SEED_LENGTH +from multiversx_sdk.wallet.pem_entry import PemEntry def test_from_text_all(): - text = Path("./multiversx_sdk_wallet/testdata/alice.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/alice.pem").read_text() entries = PemEntry.from_text_all(text) entry = entries[0] assert len(entries) == 1 assert entry.label == "erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th" assert entry.message[0:USER_SEED_LENGTH].hex() == "413f42575f7f26fad3317a778771212fdb80245850981e48b58a4f25e344e8f9" - text = Path("./multiversx_sdk_wallet/testdata/multipleUserKeys.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/multipleUserKeys.pem").read_text() entries = PemEntry.from_text_all(text) entry = entries[0] assert len(entries) == 3 @@ -30,12 +30,12 @@ def test_from_text_all(): def test_from_text_all_for_validators(): - text = Path("./multiversx_sdk_wallet/testdata/validatorKey00.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/validatorKey00.pem").read_text() entry = PemEntry.from_text_all(text)[0] assert entry.label == "e7beaa95b3877f47348df4dd1cb578a4f7cabf7a20bfeefe5cdd263878ff132b765e04fef6f40c93512b666c47ed7719b8902f6c922c04247989b7137e837cc81a62e54712471c97a2ddab75aa9c2f58f813ed4c0fa722bde0ab718bff382208" assert entry.message.hex() == "7cff99bd671502db7d15bc8abc0c9a804fb925406fbdd50f1e4c17a4cd774247" - text = Path("./multiversx_sdk_wallet/testdata/multipleValidatorKeys.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/multipleValidatorKeys.pem").read_text() entries = PemEntry.from_text_all(text) entry = entries[0] @@ -56,18 +56,18 @@ def test_from_text_all_for_validators(): def test_to_text(): - text = Path("./multiversx_sdk_wallet/testdata/alice.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/alice.pem").read_text() assert PemEntry.from_text_all(text)[0].to_text() == text.strip() - text = Path("./multiversx_sdk_wallet/testdata/validatorKey00.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/validatorKey00.pem").read_text() assert PemEntry.from_text_all(text)[0].to_text() == text.strip() - text = Path("./multiversx_sdk_wallet/testdata/multipleUserKeys.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/multipleUserKeys.pem").read_text() entries = PemEntry.from_text_all(text) text_actual = "\n".join([entry.to_text() for entry in entries]) assert text_actual == text.strip() - text = Path("./multiversx_sdk_wallet/testdata/multipleValidatorKeys.pem").read_text() + text = Path("./multiversx_sdk.wallet/testdata/multipleValidatorKeys.pem").read_text() entries = PemEntry.from_text_all(text) text_actual = "\n".join([entry.to_text() for entry in entries]) assert text_actual == text.strip() diff --git a/multiversx_sdk/wallet/user_keys.py b/multiversx_sdk/wallet/user_keys.py index 429aae47..0b4d78b0 100644 --- a/multiversx_sdk/wallet/user_keys.py +++ b/multiversx_sdk/wallet/user_keys.py @@ -1,11 +1,11 @@ import nacl.signing -from multiversx_sdk_core import Address -from multiversx_sdk_wallet.constants import (USER_PUBKEY_LENGTH, +from multiversx_sdk.core import Address +from multiversx_sdk.wallet.constants import (USER_PUBKEY_LENGTH, USER_SEED_LENGTH) -from multiversx_sdk_wallet.errors import (ErrBadPublicKeyLength, +from multiversx_sdk.wallet.errors import (ErrBadPublicKeyLength, ErrBadSecretKeyLength) -from multiversx_sdk_wallet.interfaces import IAddress, ISignature +from multiversx_sdk.wallet.interfaces import IAddress, ISignature class UserSecretKey: diff --git a/multiversx_sdk/wallet/user_pem.py b/multiversx_sdk/wallet/user_pem.py index bbba6ee3..043a237b 100644 --- a/multiversx_sdk/wallet/user_pem.py +++ b/multiversx_sdk/wallet/user_pem.py @@ -1,9 +1,9 @@ from pathlib import Path from typing import List -from multiversx_sdk_wallet.constants import USER_SEED_LENGTH -from multiversx_sdk_wallet.pem_entry import PemEntry -from multiversx_sdk_wallet.user_keys import UserSecretKey +from multiversx_sdk.wallet.constants import USER_SEED_LENGTH +from multiversx_sdk.wallet.pem_entry import PemEntry +from multiversx_sdk.wallet.user_keys import UserSecretKey class UserPEM: diff --git a/multiversx_sdk/wallet/user_signer.py b/multiversx_sdk/wallet/user_signer.py index 10975358..664c5f00 100644 --- a/multiversx_sdk/wallet/user_signer.py +++ b/multiversx_sdk/wallet/user_signer.py @@ -1,10 +1,10 @@ from pathlib import Path -from multiversx_sdk_wallet.errors import ErrCannotSign -from multiversx_sdk_wallet.interfaces import ISignature -from multiversx_sdk_wallet.user_keys import UserPublicKey, UserSecretKey -from multiversx_sdk_wallet.user_pem import UserPEM -from multiversx_sdk_wallet.user_wallet import UserWallet +from multiversx_sdk.wallet.errors import ErrCannotSign +from multiversx_sdk.wallet.interfaces import ISignature +from multiversx_sdk.wallet.user_keys import UserPublicKey, UserSecretKey +from multiversx_sdk.wallet.user_pem import UserPEM +from multiversx_sdk.wallet.user_wallet import UserWallet class UserSigner: diff --git a/multiversx_sdk/wallet/user_test.py b/multiversx_sdk/wallet/user_test.py index a015354f..0381c8f7 100644 --- a/multiversx_sdk/wallet/user_test.py +++ b/multiversx_sdk/wallet/user_test.py @@ -2,15 +2,15 @@ from pathlib import Path import pytest -from multiversx_sdk_core import (Address, Message, MessageComputer, - Transaction, TransactionComputer) -from multiversx_sdk_wallet.crypto.randomness import Randomness -from multiversx_sdk_wallet.user_keys import UserSecretKey -from multiversx_sdk_wallet.user_pem import UserPEM -from multiversx_sdk_wallet.user_signer import UserSigner -from multiversx_sdk_wallet.user_verifer import UserVerifier -from multiversx_sdk_wallet.user_wallet import UserWallet +from multiversx_sdk.core import (Address, Message, MessageComputer, + Transaction, TransactionComputer) +from multiversx_sdk.wallet.crypto.randomness import Randomness +from multiversx_sdk.wallet.user_keys import UserSecretKey +from multiversx_sdk.wallet.user_pem import UserPEM +from multiversx_sdk.wallet.user_signer import UserSigner +from multiversx_sdk.wallet.user_verifer import UserVerifier +from multiversx_sdk.wallet.user_wallet import UserWallet DUMMY_MNEMONIC = "moral volcano peasant pass circle pen over picture flat shop clap goat never lyrics gather prepare woman film husband gravity behind test tiger improve" @@ -32,13 +32,13 @@ def test_user_secret_key_generate_public_key(): def test_user_signer_from_pem_file(): - pubkey = UserSigner.from_pem_file(Path("./multiversx_sdk_wallet/testdata/alice.pem"), 0).get_pubkey() + pubkey = UserSigner.from_pem_file(Path("./multiversx_sdk.wallet/testdata/alice.pem"), 0).get_pubkey() assert Address(pubkey.buffer, "erd").to_bech32() == "erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th" - pubkey = UserSigner.from_pem_file(Path("./multiversx_sdk_wallet/testdata/bob.pem"), 0).get_pubkey() + pubkey = UserSigner.from_pem_file(Path("./multiversx_sdk.wallet/testdata/bob.pem"), 0).get_pubkey() assert Address(pubkey.buffer, "erd").to_bech32() == "erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx" - pubkey = UserSigner.from_pem_file(Path("./multiversx_sdk_wallet/testdata/carol.pem"), 0).get_pubkey() + pubkey = UserSigner.from_pem_file(Path("./multiversx_sdk.wallet/testdata/carol.pem"), 0).get_pubkey() assert Address(pubkey.buffer, "erd").to_bech32() == "erd1k2s324ww2g0yj38qn2ch2jwctdy8mnfxep94q9arncc6xecg3xaq6mjse8" @@ -64,17 +64,17 @@ def test_user_wallet_to_keyfile_object_using_known_test_wallets_with_their_rando id="65894f35-d142-41d2-9335-6ad02e0ed0be" )) - alice_saved_path = Path("./multiversx_sdk_wallet/testdata/alice.saved.json") - bob_saved_path = Path("./multiversx_sdk_wallet/testdata/bob.saved.json") - carol_saved_path = Path("./multiversx_sdk_wallet/testdata/carol.saved.json") + alice_saved_path = Path("./multiversx_sdk.wallet/testdata/alice.saved.json") + bob_saved_path = Path("./multiversx_sdk.wallet/testdata/bob.saved.json") + carol_saved_path = Path("./multiversx_sdk.wallet/testdata/carol.saved.json") alice_wallet.save(alice_saved_path, "erd") bob_wallet.save(bob_saved_path, "erd") carol_wallet.save(carol_saved_path, "erd") - assert alice_saved_path.read_text().strip() == Path("./multiversx_sdk_wallet/testdata/alice.json").read_text().strip() - assert bob_saved_path.read_text().strip() == Path("./multiversx_sdk_wallet/testdata/bob.json").read_text().strip() - assert carol_saved_path.read_text().strip() == Path("./multiversx_sdk_wallet/testdata/carol.json").read_text().strip() + assert alice_saved_path.read_text().strip() == Path("./multiversx_sdk.wallet/testdata/alice.json").read_text().strip() + assert bob_saved_path.read_text().strip() == Path("./multiversx_sdk.wallet/testdata/bob.json").read_text().strip() + assert carol_saved_path.read_text().strip() == Path("./multiversx_sdk.wallet/testdata/carol.json").read_text().strip() alice_saved_path.unlink() bob_saved_path.unlink() @@ -119,7 +119,7 @@ def test_sign_transaction(): options=0 ) - signer = UserSigner.from_pem_file(Path("./multiversx_sdk_wallet/testdata/alice.pem")) + signer = UserSigner.from_pem_file(Path("./multiversx_sdk.wallet/testdata/alice.pem")) verifier = UserVerifier.from_address(Address.new_from_bech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th")) transaction_computer = TransactionComputer() @@ -132,7 +132,7 @@ def test_sign_message(): message = Message("hello".encode()) message_computer = MessageComputer() - signer = UserSigner.from_pem_file(Path("./multiversx_sdk_wallet/testdata/alice.pem")) + signer = UserSigner.from_pem_file(Path("./multiversx_sdk.wallet/testdata/alice.pem")) verifier = UserVerifier.from_address(Address.new_from_bech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th")) message.signature = signer.sign(message_computer.compute_bytes_for_signing(message)) @@ -141,7 +141,7 @@ def test_sign_message(): def test_user_pem_save(): - path = Path("./multiversx_sdk_wallet/testdata/alice.pem") + path = Path("./multiversx_sdk.wallet/testdata/alice.pem") path_saved = path.with_suffix(".saved") content_expected = path.read_text().strip() @@ -154,14 +154,14 @@ def test_user_pem_save(): def test_load_secret_key_but_without_kind_field(): - keystore_path = Path("./multiversx_sdk_wallet/testdata/withoutKind.json") + keystore_path = Path("./multiversx_sdk.wallet/testdata/withoutKind.json") secret_key = UserWallet.load_secret_key(keystore_path, "password") actual_address = (secret_key.generate_public_key().to_address("erd")).to_bech32() assert actual_address == "erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th" def test_load_secret_key_with_unecessary_address_index(): - keystore_path = Path("./multiversx_sdk_wallet/testdata/alice.json") + keystore_path = Path("./multiversx_sdk.wallet/testdata/alice.json") with pytest.raises(Exception, match="address_index must not be provided when kind == 'secretKey'"): UserWallet.load_secret_key(keystore_path, "password", 42) @@ -177,7 +177,7 @@ def test_create_keystore_file_with_mnemonic(): def test_create_keystore_with_mnemonic_with_randomness(): - expected_dummy_wallet_json = Path("./multiversx_sdk_wallet/testdata/withDummyMnemonic.json").read_text() + expected_dummy_wallet_json = Path("./multiversx_sdk.wallet/testdata/withDummyMnemonic.json").read_text() expected_dummy_wallet_dict = json.loads(expected_dummy_wallet_json) randomness = Randomness( @@ -193,7 +193,7 @@ def test_create_keystore_with_mnemonic_with_randomness(): def test_load_secret_key_with_mnemonic(): - keystore_path = Path("./multiversx_sdk_wallet/testdata/withDummyMnemonic.json") + keystore_path = Path("./multiversx_sdk.wallet/testdata/withDummyMnemonic.json") assert UserWallet.load_secret_key(keystore_path, "password", 1).generate_public_key().to_address("erd").to_bech32() == "erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx" assert UserWallet.load_secret_key(keystore_path, "password", 2).generate_public_key().to_address("erd").to_bech32() == "erd1k2s324ww2g0yj38qn2ch2jwctdy8mnfxep94q9arncc6xecg3xaq6mjse8" diff --git a/multiversx_sdk/wallet/user_verifer.py b/multiversx_sdk/wallet/user_verifer.py index 66f9cd33..2e724f6b 100644 --- a/multiversx_sdk/wallet/user_verifer.py +++ b/multiversx_sdk/wallet/user_verifer.py @@ -1,7 +1,6 @@ -from multiversx_sdk_core import Address - -from multiversx_sdk_wallet.interfaces import IAddress, ISignature -from multiversx_sdk_wallet.user_keys import UserPublicKey +from multiversx_sdk.core import Address +from multiversx_sdk.wallet.interfaces import IAddress, ISignature +from multiversx_sdk.wallet.user_keys import UserPublicKey class UserVerifier: diff --git a/multiversx_sdk/wallet/user_wallet.py b/multiversx_sdk/wallet/user_wallet.py index c2bbef27..4be3220d 100644 --- a/multiversx_sdk/wallet/user_wallet.py +++ b/multiversx_sdk/wallet/user_wallet.py @@ -4,11 +4,11 @@ from pathlib import Path from typing import Any, Dict, Optional, Union -from multiversx_sdk_wallet.crypto import (EncryptedData, Randomness, decryptor, +from multiversx_sdk.wallet.crypto import (EncryptedData, Randomness, decryptor, encryptor) -from multiversx_sdk_wallet.interfaces import IRandomness -from multiversx_sdk_wallet.mnemonic import Mnemonic -from multiversx_sdk_wallet.user_keys import UserPublicKey, UserSecretKey +from multiversx_sdk.wallet.interfaces import IRandomness +from multiversx_sdk.wallet.mnemonic import Mnemonic +from multiversx_sdk.wallet.user_keys import UserPublicKey, UserSecretKey class UserWalletKind(str, Enum): diff --git a/multiversx_sdk/wallet/validator_keys.py b/multiversx_sdk/wallet/validator_keys.py index cac49a5c..b1a9604a 100644 --- a/multiversx_sdk/wallet/validator_keys.py +++ b/multiversx_sdk/wallet/validator_keys.py @@ -1,8 +1,8 @@ -from multiversx_sdk_wallet.constants import (VALIDATOR_PUBKEY_LENGTH, +from multiversx_sdk.wallet.constants import (VALIDATOR_PUBKEY_LENGTH, VALIDATOR_SECRETKEY_LENGTH) -from multiversx_sdk_wallet.errors import ErrBadSecretKeyLength -from multiversx_sdk_wallet.interfaces import ISignature -from multiversx_sdk_wallet.libraries.bls_facade import BLSFacade +from multiversx_sdk.wallet.errors import ErrBadSecretKeyLength +from multiversx_sdk.wallet.interfaces import ISignature +from multiversx_sdk.wallet.libraries.bls_facade import BLSFacade class ValidatorSecretKey: diff --git a/multiversx_sdk/wallet/validator_pem.py b/multiversx_sdk/wallet/validator_pem.py index 8c407d0d..471c7696 100644 --- a/multiversx_sdk/wallet/validator_pem.py +++ b/multiversx_sdk/wallet/validator_pem.py @@ -1,8 +1,8 @@ from pathlib import Path from typing import List -from multiversx_sdk_wallet.pem_entry import PemEntry -from multiversx_sdk_wallet.validator_keys import ValidatorSecretKey +from multiversx_sdk.wallet.pem_entry import PemEntry +from multiversx_sdk.wallet.validator_keys import ValidatorSecretKey class ValidatorPEM: diff --git a/multiversx_sdk/wallet/validator_signer.py b/multiversx_sdk/wallet/validator_signer.py index aad83cb5..8217b0c0 100644 --- a/multiversx_sdk/wallet/validator_signer.py +++ b/multiversx_sdk/wallet/validator_signer.py @@ -1,10 +1,10 @@ from pathlib import Path -from multiversx_sdk_wallet.errors import ErrCannotSign -from multiversx_sdk_wallet.interfaces import ISignature -from multiversx_sdk_wallet.validator_keys import (ValidatorPublicKey, +from multiversx_sdk.wallet.errors import ErrCannotSign +from multiversx_sdk.wallet.interfaces import ISignature +from multiversx_sdk.wallet.validator_keys import (ValidatorPublicKey, ValidatorSecretKey) -from multiversx_sdk_wallet.validator_pem import ValidatorPEM +from multiversx_sdk.wallet.validator_pem import ValidatorPEM class ValidatorSigner: diff --git a/multiversx_sdk/wallet/validator_test.py b/multiversx_sdk/wallet/validator_test.py index aa24743e..aced64af 100644 --- a/multiversx_sdk/wallet/validator_test.py +++ b/multiversx_sdk/wallet/validator_test.py @@ -1,10 +1,10 @@ import os from pathlib import Path -from multiversx_sdk_wallet.validator_keys import ValidatorSecretKey -from multiversx_sdk_wallet.validator_pem import ValidatorPEM -from multiversx_sdk_wallet.validator_signer import ValidatorSigner -from multiversx_sdk_wallet.validator_verifier import ValidatorVerifier +from multiversx_sdk.wallet.validator_keys import ValidatorSecretKey +from multiversx_sdk.wallet.validator_pem import ValidatorPEM +from multiversx_sdk.wallet.validator_signer import ValidatorSigner +from multiversx_sdk.wallet.validator_verifier import ValidatorVerifier def test_validator_secret_key_generate_public_key(): @@ -12,7 +12,7 @@ def test_validator_secret_key_generate_public_key(): def test_sign_message(): - signer = ValidatorSigner.from_pem_file(Path("./multiversx_sdk_wallet/testdata/validatorKey00.pem")) + signer = ValidatorSigner.from_pem_file(Path("./multiversx_sdk.wallet/testdata/validatorKey00.pem")) message = b"hello" signature = signer.sign(message) assert signature.hex() == "84fd0a3a9d4f1ea2d4b40c6da67f9b786284a1c3895b7253fec7311597cda3f757862bb0690a92a13ce612c33889fd86" @@ -20,10 +20,10 @@ def test_sign_message(): def test_verify_message(): verifier = ValidatorVerifier.from_string("e7beaa95b3877f47348df4dd1cb578a4f7cabf7a20bfeefe5cdd263878ff132b765e04fef6f40c93512b666c47ed7719b8902f6c922c04247989b7137e837cc81a62e54712471c97a2ddab75aa9c2f58f813ed4c0fa722bde0ab718bff382208") - + message = b"hello" signature = bytes.fromhex("84fd0a3a9d4f1ea2d4b40c6da67f9b786284a1c3895b7253fec7311597cda3f757862bb0690a92a13ce612c33889fd86") - + assert verifier.verify(message, signature) == True invalid_signature = bytes.fromhex("94fd0a3a9d4f1ea2d4b40c6da67f9b786284a1c3895b7253fec7311597cda3f757862bb0690a92a13ce612c33889fd86") @@ -31,7 +31,7 @@ def test_verify_message(): def test_pem_save(): - path = Path("./multiversx_sdk_wallet/testdata/validatorKey00.pem") + path = Path("./multiversx_sdk.wallet/testdata/validatorKey00.pem") path_saved = path.with_suffix(".saved") with open(path) as f: diff --git a/multiversx_sdk/wallet/validator_verifier.py b/multiversx_sdk/wallet/validator_verifier.py index 1bdd2a47..adce0319 100644 --- a/multiversx_sdk/wallet/validator_verifier.py +++ b/multiversx_sdk/wallet/validator_verifier.py @@ -1,5 +1,5 @@ -from multiversx_sdk_wallet.interfaces import ISignature -from multiversx_sdk_wallet.validator_keys import ValidatorPublicKey +from multiversx_sdk.wallet.interfaces import ISignature +from multiversx_sdk.wallet.validator_keys import ValidatorPublicKey class ValidatorVerifier: